wms成品部分修改29

master
mengjiao 10 months ago
parent d83f72dbe8
commit 7d2ee34a17

@ -11,6 +11,7 @@ import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.domain.R; import com.op.common.core.domain.R;
import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils; import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.system.api.RemoteQualityService; import com.op.system.api.RemoteQualityService;
import com.op.system.api.domain.quality.QcCheckTaskWarehousingDTO; import com.op.system.api.domain.quality.QcCheckTaskWarehousingDTO;
import com.op.system.api.domain.wms.wmsReportWork; import com.op.system.api.domain.wms.wmsReportWork;
@ -355,35 +356,35 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
wmsProductPutk.setStatus("1"); wmsProductPutk.setStatus("1");
wmsProductPutk.setUnitOfMeasure(mesReportWork.getUnit()); wmsProductPutk.setUnitOfMeasure(mesReportWork.getUnit());
wmsProductPutk.setBatchNumber(mesReportWork.getBatch());// wmsProductPutk.setBatchNumber(mesReportWork.getBatch());//
//wmsProductPutk.setSapStatus("2"); wmsProductPutk.setSapStatus("2");//过账失败的
List<WmsProductPut> wmsProductPutList = wmsProductPutMapper.selectWmsProductPutList(wmsProductPutk); List<WmsProductPut> wmsProductPutList = wmsProductPutMapper.selectWmsProductPutList(wmsProductPutk);
if (wmsProductPutList.size() > 0) { if (wmsProductPutList.size() > 0) {
String id = wmsProductPutList.get(0).getId(); String id = wmsProductPutList.get(0).getId();
mesReportWork.setId(id); mesReportWork.setId(id);
wmsReportWorkList.add(mesReportWork); wmsReportWorkList.add(mesReportWork);//已经插入过并且过账失败的
} else { } else {
wmsReportWorkListRk.add(mesReportWork); wmsReportWorkListRk.add(mesReportWork);//第一次的
} }
} }
for (wmsReportWork mesReportWork : for (wmsReportWork mesReportWork :
wmsReportWorkList) { wmsReportWorkListRk) {
WmsProductPut wmsProductPutk = new WmsProductPut(); // WmsProductPut wmsProductPutk = new WmsProductPut();
wmsProductPutk.setWorkOrder(mesReportWork.getReportCode()); // wmsProductPutk.setWorkOrder(mesReportWork.getReportCode());
wmsProductPutk.setFactoryCode(factoryCode); // wmsProductPutk.setFactoryCode(factoryCode);
wmsProductPutk.setWhCode(mesReportWork.getWhCode());//仓库编码 // wmsProductPutk.setWhCode(mesReportWork.getWhCode());//仓库编码
wmsProductPutk.setProductName(mesReportWork.getProductName()); // wmsProductPutk.setProductName(mesReportWork.getProductName());
wmsProductPutk.setProductCode(mesReportWork.getProductCode()); // wmsProductPutk.setProductCode(mesReportWork.getProductCode());
wmsProductPutk.setProductOrder(mesReportWork.getWorkorderCodeSap()); // wmsProductPutk.setProductOrder(mesReportWork.getWorkorderCodeSap());
wmsProductPutk.setPlanQuantity(mesReportWork.getQuantityFeedback()); // wmsProductPutk.setPlanQuantity(mesReportWork.getQuantityFeedback());
wmsProductPutk.setPutQuantity(mesReportWork.getQuantityQualified()); // wmsProductPutk.setPutQuantity(mesReportWork.getQuantityQualified());
wmsProductPutk.setStatus("1"); // wmsProductPutk.setStatus("1");
wmsProductPutk.setUnitOfMeasure(mesReportWork.getUnit()); // wmsProductPutk.setUnitOfMeasure(mesReportWork.getUnit());
wmsProductPutk.setBatchNumber(mesReportWork.getBatch());// // wmsProductPutk.setBatchNumber(mesReportWork.getBatch());//
wmsProductPutk.setSapStatus("2"); // wmsProductPutk.setSapStatus("2");
List<WmsProductPut> wmsProductPutList = wmsProductPutMapper.selectWmsProductPutList(wmsProductPutk); // List<WmsProductPut> wmsProductPutList = wmsProductPutMapper.selectWmsProductPutList(wmsProductPutk);
if (wmsProductPutList.size() > 0) { // if (wmsProductPutList.size() > 0) {
wmsReportWorkListagain.add(mesReportWork);//再次过账 wmsReportWorkListagain.add(mesReportWork);//
} // }
} }
//先屏蔽起来 //先屏蔽起来
for (wmsReportWork mesReportWork : for (wmsReportWork mesReportWork :
@ -487,10 +488,10 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
wmsProductPutMapper.updateWmsProductPut(wmsProductPut2); wmsProductPutMapper.updateWmsProductPut(wmsProductPut2);
} }
} }
if (wmsReportWorkListagain.size() > 0) { if (wmsReportWorkList.size() > 0) {
List<Map<String, Object>> mapList = new ArrayList<>(); List<Map<String, Object>> mapList = new ArrayList<>();
for (wmsReportWork mesReportWork : for (wmsReportWork mesReportWork :
wmsReportWorkListagain) { wmsReportWorkList) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("AUFNR", mesReportWork.getWorkorderCodeSap()); map.put("AUFNR", mesReportWork.getWorkorderCodeSap());
map.put("WERKS", factoryCode); map.put("WERKS", factoryCode);
@ -508,7 +509,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
int code = result.getCode(); int code = result.getCode();
String msg = result.getMsg(); String msg = result.getMsg();
for (wmsReportWork mesReportWork : for (wmsReportWork mesReportWork :
wmsReportWorkListagain) { wmsReportWorkList) {
WmsProductPut wmsProductPut2 = new WmsProductPut(); WmsProductPut wmsProductPut2 = new WmsProductPut();
wmsProductPut2.setId(mesReportWork.getId()); wmsProductPut2.setId(mesReportWork.getId());
wmsProductPut2.setSapMessage(msg); wmsProductPut2.setSapMessage(msg);
@ -522,7 +523,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
wmsProductPutMapper.updateWmsProductPut(wmsProductPut2); wmsProductPutMapper.updateWmsProductPut(wmsProductPut2);
} }
} }
//
// for (wmsReportWork wmsReportWork: // for (wmsReportWork wmsReportWork:
// wmsReportWorkListagain) { // wmsReportWorkListagain) {
// QcCheckTaskWarehousingDTO qcCheckTaskWarehousingDTO = new QcCheckTaskWarehousingDTO(); // QcCheckTaskWarehousingDTO qcCheckTaskWarehousingDTO = new QcCheckTaskWarehousingDTO();
@ -541,7 +542,8 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
// Date productDate = simpleDateFormat.parse(wmsReportWork.getProductDate()); // Date productDate = simpleDateFormat.parse(wmsReportWork.getProductDate());
// qcCheckTaskWarehousingDTO.setIncomeTime(productDate); // qcCheckTaskWarehousingDTO.setIncomeTime(productDate);
// //qcCheckTaskWarehousingDTO. // //qcCheckTaskWarehousingDTO.
// remoteQualityService.createProductTask(qcCheckTaskWarehousingDTO); // R productTask= remoteQualityService.createProductTask(qcCheckTaskWarehousingDTO);
// productTask.getData();
// } // }
String SUCCESS = "操作完成"; String SUCCESS = "操作完成";

Loading…
Cancel
Save