|
|
@@ -145,8 +145,7 @@ public class MESServiceImpl implements MESService {
|
|
|
if ("".equals(whcode)){
|
|
|
return ApiResponse.failRsp("10015",request.getHeader("RequestId"),"MES仓库编号不能为空!");
|
|
|
}
|
|
|
- int coun = baseDao.getCount("select count(1) from customtabledetail left join customtable on " +
|
|
|
- "cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
+ int coun = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
if (coun<=0){
|
|
|
return ApiResponse.failRsp("10016",request.getHeader("RequestId"),"MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|
|
|
@@ -254,7 +253,7 @@ public class MESServiceImpl implements MESService {
|
|
|
if ("".equals(whcode)) {
|
|
|
return ApiResponse.failRsp("10073", request.getHeader("RequestId"), "MES仓库编号不能为空!");
|
|
|
}
|
|
|
- int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
+ int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
if (count <= 0) {
|
|
|
return ApiResponse.failRsp("10074", request.getHeader("RequestId"), "MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|
|
|
@@ -292,7 +291,7 @@ public class MESServiceImpl implements MESService {
|
|
|
if ("".equals(whcode)){
|
|
|
return ApiResponse.failRsp("10075",request.getHeader("RequestId"),"MES仓库编号不能为空!");
|
|
|
}
|
|
|
- int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
+ int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
if (count<=0){
|
|
|
return ApiResponse.failRsp("10076",request.getHeader("RequestId"),"MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|
|
|
@@ -505,7 +504,7 @@ public class MESServiceImpl implements MESService {
|
|
|
if ("".equals(whcode)){
|
|
|
return ApiResponse.failRsp("10034",request.getHeader("RequestId"),"MES仓库编号不能为空!");
|
|
|
}
|
|
|
- int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
+ int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
if (count<=0){
|
|
|
return ApiResponse.failRsp("10035",request.getHeader("RequestId"),"MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|
|
|
@@ -598,7 +597,7 @@ public class MESServiceImpl implements MESService {
|
|
|
if ("".equals(whcode)){
|
|
|
return ApiResponse.failRsp("10043",request.getHeader("RequestId"),"发料仓库不能为空!");
|
|
|
}
|
|
|
- int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
+ int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
if (count<=0){
|
|
|
return ApiResponse.failRsp("10044",request.getHeader("RequestId"),"MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|
|
|
@@ -610,7 +609,7 @@ public class MESServiceImpl implements MESService {
|
|
|
if ("".equals(whcode2)){
|
|
|
return ApiResponse.failRsp("10043",request.getHeader("RequestId"),"物料所在仓库不能为空!");
|
|
|
}
|
|
|
- int count2 = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode2 + "'");
|
|
|
+ int count2 = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode2 + "'");
|
|
|
if (count2<=0){
|
|
|
return ApiResponse.failRsp("10044",request.getHeader("RequestId"),"MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|
|
|
@@ -754,7 +753,7 @@ public class MESServiceImpl implements MESService {
|
|
|
if ("".equals(whcode)){
|
|
|
return ApiResponse.failRsp("10053",request.getHeader("RequestId"),"仓库编号不能为空!");
|
|
|
}
|
|
|
- int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
+ int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
if (count<=0){
|
|
|
return ApiResponse.failRsp("10054",request.getHeader("RequestId"),"MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|
|
|
@@ -765,7 +764,7 @@ public class MESServiceImpl implements MESService {
|
|
|
if ("".equals(whcode2)){
|
|
|
return ApiResponse.failRsp("10055",request.getHeader("RequestId"),"物料退回仓库不能为空!");
|
|
|
}
|
|
|
- int count2 = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode2 + "'");
|
|
|
+ int count2 = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode2 + "'");
|
|
|
if (count2<=0){
|
|
|
return ApiResponse.failRsp("10056",request.getHeader("RequestId"),"MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|
|
|
@@ -869,17 +868,18 @@ public class MESServiceImpl implements MESService {
|
|
|
if ("".equals(whcode)){
|
|
|
return ApiResponse.failRsp("10063",request.getHeader("RequestId"),"发货仓库不能为空!");
|
|
|
}
|
|
|
- int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
+ int count = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
if (count<=0){
|
|
|
return ApiResponse.failRsp("10064",request.getHeader("RequestId"),"MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|
|
|
- warehouses = baseDao.getFieldsDataByCondition("customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code", "cd_varchar50_3,wh_description", "ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");Map<Object, Object> map2 = JSONUtil.toMap(StringUtil.valueOf(object.get("FDCStockID1")));
|
|
|
+ warehouses = baseDao.getFieldsDataByCondition("customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code", "cd_varchar50_3,wh_description", "ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode + "'");
|
|
|
+ Map<Object, Object> map2 = JSONUtil.toMap(StringUtil.valueOf(object.get("FDCStockID1")));
|
|
|
String whcode2 = StringUtil.nvl(map2.get("FNumber"), "");
|
|
|
String whname2 = StringUtil.nvl(map2.get("FName"), "");
|
|
|
if ("".equals(whcode2)){
|
|
|
return ApiResponse.failRsp("10065",request.getHeader("RequestId"),"收货仓库不能为空!");
|
|
|
}
|
|
|
- int count2 = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id left join Warehouse on cd_varchar50_3=wh_code where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode2 + "'");
|
|
|
+ int count2 = baseDao.getCount("select count(1) from customtabledetail left join customtable on cd_ctid=ct_id where ct_statuscode='AUDITED' and ct_caller='MESWarehouse' and cd_varchar50_1='" + whcode2 + "'");
|
|
|
if (count2<=0){
|
|
|
return ApiResponse.failRsp("10066",request.getHeader("RequestId"),"MES仓库编号在ERP没有对应关系,请联系管理员新增!");
|
|
|
}
|