Merge remote-tracking branch 'origin/master'

This commit is contained in:
2023-12-12 16:56:15 +08:00
3 changed files with 18 additions and 20 deletions

View File

@@ -230,7 +230,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
log.info("下发电气信号失败:" + e.getMessage()); log.info("下发电气信号失败:" + e.getMessage());
e.printStackTrace(); e.printStackTrace();
} }
if (standardAutodoorDeviceDriver.getOpen() == 1) { if (standardAutodoorDeviceDriver.getOpen() == 1 && standardAutodoorDeviceDriver.getToOpen() == 1 ) {
log.info("下发开门信号值为:{},下发关门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose()); log.info("下发开门信号值为:{},下发关门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose());
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
} }

View File

@@ -194,10 +194,10 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
String device_code = dto.getDevice_code(); String device_code = dto.getDevice_code();
DeviceDto deviceDto = this.findByCode(device_code); DeviceDto deviceDto = this.findByCode(device_code);
if (deviceDto != null && deviceDto.getIs_delete().equals("0") // if (deviceDto != null && deviceDto.getIs_delete().equals("0")
&& !deviceDto.getDevice_id().equals(dto.getDevice_id())) { // && !deviceDto.getDevice_id().equals(dto.getDevice_id())) {
throw new BadRequestException("存在相同的设备编码"); // throw new BadRequestException("存在相同的设备编码");
} // }
String currentUsername = SecurityUtils.getCurrentUsername(); String currentUsername = SecurityUtils.getCurrentUsername();
String now = DateUtil.now(); String now = DateUtil.now();

View File

@@ -97,8 +97,6 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase"); WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
// 库区表 // 库区表
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr"); WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
// 子卷包装关系表
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
//根据出入单类型判断回传业务 //根据出入单类型判断回传业务
//1、生产入库回传MES手工入库回传SAP //1、生产入库回传MES手工入库回传SAP
@@ -375,7 +373,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 库区表 // 库区表
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr"); WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
// 子卷包装关系表 // 子卷包装关系表
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation"); WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord");
JSONArray rows = whereJson.getJSONArray("rows"); JSONArray rows = whereJson.getJSONArray("rows");
for (int i = 0; i < rows.size(); i++) { for (int i = 0; i < rows.size(); i++) {
@@ -422,7 +420,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", lgort); // 明細储存地点 jsonDtl.put("LGORT", lgort); // 明細储存地点
} }
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSub)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -495,7 +493,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点 jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
} }
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSub)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -569,8 +567,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", lgort); // 明細储存地点 jsonDtl.put("LGORT", lgort); // 明細储存地点
} }
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
jsonDis.put("VBELN", json.getString("vbeln")); // 交货 jsonDis.put("VBELN", json.getString("vbeln")); // 交货
@@ -627,7 +625,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0); JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
paramDis.put("MATNR", jsonMater.getString("material_code")); paramDis.put("MATNR", jsonMater.getString("material_code"));
JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "' AND bill_id = '"+jsonDis.getString("iostorinv_id")+"'").uniqueResult(0);
paramDis.put("ZHL02", jsonSub.getString("width")); paramDis.put("ZHL02", jsonSub.getString("width"));
paramDis.put("ZZWLHD", jsonSub.getString("thickness")); paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
paramDis.put("CHARG", jsonSub.getString("sap_pcsn")); paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
@@ -761,7 +759,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点 jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
} }
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSub)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -869,7 +867,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 库区表 // 库区表
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr"); WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
// 子卷包装关系表 // 子卷包装关系表
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation"); WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord");
//根据出入单类型判断回传业务 //根据出入单类型判断回传业务
//1、生产入库回传MES手工入库回传SAP //1、生产入库回传MES手工入库回传SAP
@@ -941,7 +939,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点 jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
} }
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) { if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -995,7 +993,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0); JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
paramDis.put("MATNR", jsonMater.getString("material_code")); paramDis.put("MATNR", jsonMater.getString("material_code"));
JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "' AND bill_id = '"+jsonDis.getString("iostorinv_id")+"'").uniqueResult(0);
paramDis.put("ZHL02", jsonSub.getString("width")); paramDis.put("ZHL02", jsonSub.getString("width"));
paramDis.put("ZZWLHD", jsonSub.getString("thickness")); paramDis.put("ZZWLHD", jsonSub.getString("thickness"));
paramDis.put("CHARG", jsonSub.getString("sap_pcsn")); paramDis.put("CHARG", jsonSub.getString("sap_pcsn"));
@@ -1094,7 +1092,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点 jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
} }
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSub)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -1194,7 +1192,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", lgort); // 明細储存地点 jsonDtl.put("LGORT", lgort); // 明細储存地点
} }
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) { if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }
@@ -1461,7 +1459,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点 jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
} }
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "'").uniqueResult(0); JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '" + json2.getString("box_no") + "' AND bill_id = '"+json2.getString("iostorinv_id")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSub)) { if (ObjectUtil.isNotEmpty(jsonSub)) {
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次 jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
} }