|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.op.wms.service.impl;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
@ -10,6 +11,8 @@ import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
|
|
|
import com.op.common.core.domain.R;
|
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
|
import com.op.common.core.utils.uuid.IdUtils;
|
|
|
|
|
import com.op.system.api.RemoteQualityService;
|
|
|
|
|
import com.op.system.api.domain.quality.QcCheckTaskWarehousingDTO;
|
|
|
|
|
import com.op.system.api.domain.wms.wmsReportWork;
|
|
|
|
|
import com.op.system.api.RemoteSapService;
|
|
|
|
|
import com.op.wms.domain.*;
|
|
|
|
@ -19,6 +22,10 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|
|
|
|
import org.springframework.data.redis.core.ValueOperations;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.op.wms.service.IWmsProductPutService;
|
|
|
|
|
import org.springframework.web.context.request.RequestContextHolder;
|
|
|
|
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 成品生产入库Service业务层处理
|
|
|
|
@ -40,6 +47,8 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
private WmsFpStorageNewsMapper wmsFpStorageNewsMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private RemoteSapService remoteSapService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private RemoteQualityService remoteQualityService;
|
|
|
|
|
/**
|
|
|
|
|
* 查询成品生产入库
|
|
|
|
|
*
|
|
|
|
@ -301,7 +310,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public String addReportListSap(List<wmsReportWork> mesReportWorks) {
|
|
|
|
|
public String addReportListSap(List<wmsReportWork> mesReportWorks) throws ParseException {
|
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
|
|
Date date = new Date();
|
|
|
|
|
String formattedDate = dateFormat.format(date);//批次
|
|
|
|
@ -309,6 +318,8 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
List<wmsReportWork> wmsReportWorkList=new ArrayList<>();
|
|
|
|
|
List<wmsReportWork> wmsReportWorkListRk=new ArrayList<>();
|
|
|
|
|
List<wmsReportWork> wmsReportWorkListagain=new ArrayList<>();
|
|
|
|
|
//获取当前所选工厂
|
|
|
|
|
|
|
|
|
|
for (wmsReportWork mesReportWork:
|
|
|
|
|
mesReportWorks) {
|
|
|
|
|
WmsProductPut wmsProductPutk=new WmsProductPut();
|
|
|
|
@ -353,138 +364,165 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
wmsReportWorkListagain.add(mesReportWork);//再次过账
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for (wmsReportWork mesReportWork:
|
|
|
|
|
wmsReportWorkListRk) {
|
|
|
|
|
WmsProductPut wmsProductPutk=new WmsProductPut();
|
|
|
|
|
//wms_product_put
|
|
|
|
|
mesReportWork.setId(IdUtils.fastSimpleUUID());
|
|
|
|
|
|
|
|
|
|
wmsProductPutk.setWorkOrder(mesReportWork.getReportCode());
|
|
|
|
|
wmsProductPutk.setFactoryCode(mesReportWork.getFactoryCode());
|
|
|
|
|
wmsProductPutk.setWhCode(mesReportWork.getWhCode());//仓库编码
|
|
|
|
|
wmsProductPutk.setProductName(mesReportWork.getProductName());
|
|
|
|
|
wmsProductPutk.setProductCode(mesReportWork.getProductCode());
|
|
|
|
|
wmsProductPutk.setProductOrder(mesReportWork.getWorkorderCodeSap());
|
|
|
|
|
wmsProductPutk.setPlanQuantity(mesReportWork.getQuantityFeedback());
|
|
|
|
|
wmsProductPutk.setPutQuantity(mesReportWork.getQuantityQualified());
|
|
|
|
|
wmsProductPutk.setStatus("1");
|
|
|
|
|
wmsProductPutk.setUnitOfMeasure(mesReportWork.getUnit());
|
|
|
|
|
wmsProductPutk.setBatchNumber(mesReportWork.getBatch());//
|
|
|
|
|
//List<WmsProductPut> wmsProductPutList= wmsProductPutMapper.selectWmsProductPutList(wmsProductPutk);
|
|
|
|
|
|
|
|
|
|
wmsProductPutk.setAttr3(formattedDate);//
|
|
|
|
|
wmsProductPutk.setCreateBy(mesReportWork.getCreateBy());
|
|
|
|
|
wmsProductPutk.setCreateTime(new Date());
|
|
|
|
|
|
|
|
|
|
wmsProductPutk.setProductDate(mesReportWork.getProductDate());
|
|
|
|
|
wmsProductPutk.setId(mesReportWork.getId());
|
|
|
|
|
wmsProductPutk.setSapStatus("0");
|
|
|
|
|
wmsProductPutMapper.insertWmsProductPut(wmsProductPutk);
|
|
|
|
|
//入库记录
|
|
|
|
|
WmsProductPutRecords wmsProductPutRecords=new WmsProductPutRecords();
|
|
|
|
|
wmsProductPutRecords.setWorkOrder(mesReportWork.getReportCode());
|
|
|
|
|
wmsProductPutRecords.setProductOrder(mesReportWork.getWorkorderCodeSap());
|
|
|
|
|
wmsProductPutRecords.setProductName(mesReportWork.getProductName());
|
|
|
|
|
wmsProductPutRecords.setProductCode(mesReportWork.getProductCode());
|
|
|
|
|
wmsProductPutRecords.setWhCode(mesReportWork.getWhCode());//仓库编码
|
|
|
|
|
wmsProductPutRecords.setId(IdUtils.fastSimpleUUID());
|
|
|
|
|
wmsProductPutRecords.setNumber(mesReportWork.getQuantityQualified().toString());
|
|
|
|
|
wmsProductPutRecords.setCreateBy(mesReportWork.getCreateBy());
|
|
|
|
|
wmsProductPutRecords.setCreateTime(new Date());
|
|
|
|
|
wmsProductPutRecordsMapper.insertWmsProductPutRecords(wmsProductPutRecords);
|
|
|
|
|
|
|
|
|
|
//先屏蔽起来
|
|
|
|
|
// for (wmsReportWork mesReportWork:
|
|
|
|
|
// wmsReportWorkListRk) {
|
|
|
|
|
// WmsProductPut wmsProductPutk=new WmsProductPut();
|
|
|
|
|
// //wms_product_put
|
|
|
|
|
// mesReportWork.setId(IdUtils.fastSimpleUUID());
|
|
|
|
|
//
|
|
|
|
|
// wmsProductPutk.setWorkOrder(mesReportWork.getReportCode());
|
|
|
|
|
// wmsProductPutk.setFactoryCode(mesReportWork.getFactoryCode());
|
|
|
|
|
// wmsProductPutk.setWhCode(mesReportWork.getWhCode());//仓库编码
|
|
|
|
|
// wmsProductPutk.setProductName(mesReportWork.getProductName());
|
|
|
|
|
// wmsProductPutk.setProductCode(mesReportWork.getProductCode());
|
|
|
|
|
// wmsProductPutk.setProductOrder(mesReportWork.getWorkorderCodeSap());
|
|
|
|
|
// wmsProductPutk.setPlanQuantity(mesReportWork.getQuantityFeedback());
|
|
|
|
|
// wmsProductPutk.setPutQuantity(mesReportWork.getQuantityQualified());
|
|
|
|
|
// wmsProductPutk.setStatus("1");
|
|
|
|
|
// wmsProductPutk.setUnitOfMeasure(mesReportWork.getUnit());
|
|
|
|
|
// wmsProductPutk.setBatchNumber(mesReportWork.getBatch());//
|
|
|
|
|
// //List<WmsProductPut> wmsProductPutList= wmsProductPutMapper.selectWmsProductPutList(wmsProductPutk);
|
|
|
|
|
//
|
|
|
|
|
// wmsProductPutk.setAttr3(formattedDate);//
|
|
|
|
|
// wmsProductPutk.setCreateBy(mesReportWork.getCreateBy());
|
|
|
|
|
// wmsProductPutk.setCreateTime(new Date());
|
|
|
|
|
//
|
|
|
|
|
// wmsProductPutk.setProductDate(mesReportWork.getProductDate());
|
|
|
|
|
// wmsProductPutk.setId(mesReportWork.getId());
|
|
|
|
|
// wmsProductPutk.setSapStatus("0");
|
|
|
|
|
// wmsProductPutMapper.insertWmsProductPut(wmsProductPutk);
|
|
|
|
|
// //入库记录
|
|
|
|
|
// WmsProductPutRecords wmsProductPutRecords=new WmsProductPutRecords();
|
|
|
|
|
// wmsProductPutRecords.setWorkOrder(mesReportWork.getReportCode());
|
|
|
|
|
// wmsProductPutRecords.setProductOrder(mesReportWork.getWorkorderCodeSap());
|
|
|
|
|
// wmsProductPutRecords.setProductName(mesReportWork.getProductName());
|
|
|
|
|
// wmsProductPutRecords.setProductCode(mesReportWork.getProductCode());
|
|
|
|
|
// wmsProductPutRecords.setWhCode(mesReportWork.getWhCode());//仓库编码
|
|
|
|
|
// wmsProductPutRecords.setId(IdUtils.fastSimpleUUID());
|
|
|
|
|
// wmsProductPutRecords.setNumber(mesReportWork.getQuantityQualified().toString());
|
|
|
|
|
// wmsProductPutRecords.setCreateBy(mesReportWork.getCreateBy());
|
|
|
|
|
// wmsProductPutRecords.setCreateTime(new Date());
|
|
|
|
|
// wmsProductPutRecordsMapper.insertWmsProductPutRecords(wmsProductPutRecords);
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// WmsFpStorageNews wmsFpStorageNews=new WmsFpStorageNews();
|
|
|
|
|
//
|
|
|
|
|
// wmsFpStorageNews.setWhCode(mesReportWork.getWhCode());//仓库编码
|
|
|
|
|
// // wmsFpStorageNews.setWlCode(mesReportWork.getWlCode());
|
|
|
|
|
// wmsFpStorageNews.setStorageType("成品");
|
|
|
|
|
// wmsFpStorageNews.setProductCode(mesReportWork.getProductCode());
|
|
|
|
|
// wmsFpStorageNews.setProductName(mesReportWork.getProductName());
|
|
|
|
|
// wmsFpStorageNews.setFactoryCode(mesReportWork.getFactoryCode());
|
|
|
|
|
// wmsFpStorageNews.setActiveFlag("1");
|
|
|
|
|
// wmsFpStorageNews.setUserDefined1(mesReportWork.getUnit());
|
|
|
|
|
// List<WmsFpStorageNews> wmsFpStorageNewsList= wmsFpStorageNewsMapper.selectWmsFpStorageNewsList(wmsFpStorageNews);
|
|
|
|
|
// wmsFpStorageNews.setStorageId(IdUtils.fastSimpleUUID());
|
|
|
|
|
// wmsFpStorageNews.setAmount(mesReportWork.getQuantityQualified());
|
|
|
|
|
// wmsFpStorageNews.setCreateBy(mesReportWork.getCreateBy());
|
|
|
|
|
// wmsFpStorageNews.setCreateTime(new Date());
|
|
|
|
|
// if (wmsFpStorageNewsList.size()>0){
|
|
|
|
|
// WmsFpStorageNews wmsFpStorageNews1= wmsFpStorageNewsList.get(0);
|
|
|
|
|
// BigDecimal amount= wmsFpStorageNews1.getAmount();
|
|
|
|
|
// BigDecimal amountAdd= amount.add(wmsFpStorageNews.getAmount());
|
|
|
|
|
// wmsFpStorageNews1.setAmount(amountAdd);
|
|
|
|
|
// wmsFpStorageNewsMapper.updateWmsFpStorageNews(wmsFpStorageNews1);
|
|
|
|
|
// }else {
|
|
|
|
|
// wmsFpStorageNewsMapper.insertWmsFpStorageNews(wmsFpStorageNews);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if(wmsReportWorkListRk.size()>0){
|
|
|
|
|
// List<Map<String, Object>> mapList = new ArrayList<>();
|
|
|
|
|
// for (wmsReportWork mesReportWork:
|
|
|
|
|
// wmsReportWorkListRk) {
|
|
|
|
|
// Map<String, Object> map = new HashMap<>();
|
|
|
|
|
// map.put("AUFNR",mesReportWork.getWorkorderCodeSap());
|
|
|
|
|
// map.put("WERKS",mesReportWork.getFactoryCode());
|
|
|
|
|
// map.put("LGORT",mesReportWork.getWhCode());
|
|
|
|
|
// map.put("QUANTITY",mesReportWork.getQuantityQualified());
|
|
|
|
|
// map.put("ERFME",mesReportWork.getUnit());
|
|
|
|
|
// map.put("BATCH",mesReportWork.getBatch());
|
|
|
|
|
// map.put("HSDAT",mesReportWork.getProductDate());
|
|
|
|
|
// mapList.add(map);
|
|
|
|
|
// }
|
|
|
|
|
// //过账
|
|
|
|
|
// R result=remoteSapService.sapOrderReceipt(mapList);
|
|
|
|
|
// int code= result.getCode();
|
|
|
|
|
// String msg= result.getMsg();
|
|
|
|
|
// for (wmsReportWork mesReportWork:
|
|
|
|
|
// wmsReportWorkListRk) {
|
|
|
|
|
// WmsProductPut wmsProductPut2=new WmsProductPut();
|
|
|
|
|
// wmsProductPut2.setId(mesReportWork.getId());
|
|
|
|
|
// wmsProductPut2.setSapMessage(msg);
|
|
|
|
|
// if (code==200) {//过账成功
|
|
|
|
|
// String tem= (String) result.getData();
|
|
|
|
|
// wmsProductPut2.setSapProof(tem);
|
|
|
|
|
// wmsProductPut2.setSapStatus("1");
|
|
|
|
|
// }else {
|
|
|
|
|
// wmsProductPut2.setSapStatus("2");
|
|
|
|
|
// }
|
|
|
|
|
// wmsProductPutMapper.updateWmsProductPut(wmsProductPut2);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (wmsReportWorkListagain.size()>0){
|
|
|
|
|
// List<Map<String, Object>> mapList = new ArrayList<>();
|
|
|
|
|
// for (wmsReportWork mesReportWork:
|
|
|
|
|
// wmsReportWorkListagain) {
|
|
|
|
|
// Map<String, Object> map = new HashMap<>();
|
|
|
|
|
// map.put("AUFNR",mesReportWork.getWorkorderCodeSap());
|
|
|
|
|
// map.put("WERKS",mesReportWork.getFactoryCode());
|
|
|
|
|
// map.put("LGORT",mesReportWork.getWhCode());
|
|
|
|
|
// map.put("QUANTITY",mesReportWork.getQuantityQualified());
|
|
|
|
|
// map.put("ERFME",mesReportWork.getUnit());
|
|
|
|
|
// map.put("BATCH",mesReportWork.getBatch());
|
|
|
|
|
// map.put("HSDAT",mesReportWork.getProductDate());
|
|
|
|
|
// mapList.add(map);
|
|
|
|
|
// }
|
|
|
|
|
// //过账
|
|
|
|
|
// R result=remoteSapService.sapOrderReceipt(mapList);
|
|
|
|
|
// int code= result.getCode();
|
|
|
|
|
// String msg= result.getMsg();
|
|
|
|
|
// for (wmsReportWork mesReportWork:
|
|
|
|
|
// wmsReportWorkListagain) {
|
|
|
|
|
// WmsProductPut wmsProductPut2=new WmsProductPut();
|
|
|
|
|
// wmsProductPut2.setId(mesReportWork.getId());
|
|
|
|
|
// wmsProductPut2.setSapMessage(msg);
|
|
|
|
|
// if (code==200) {//过账成功
|
|
|
|
|
// String tem= (String) result.getData();
|
|
|
|
|
// wmsProductPut2.setSapProof(tem);
|
|
|
|
|
// wmsProductPut2.setSapStatus("1");
|
|
|
|
|
// }else {
|
|
|
|
|
// wmsProductPut2.setSapStatus("2");
|
|
|
|
|
// }
|
|
|
|
|
// wmsProductPutMapper.updateWmsProductPut(wmsProductPut2);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// //加上质检任务
|
|
|
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
|
|
String key = "#header.poolName";
|
|
|
|
|
String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
|
|
|
|
|
|
|
|
|
|
WmsFpStorageNews wmsFpStorageNews=new WmsFpStorageNews();
|
|
|
|
|
for (wmsReportWork wmsReportWork:
|
|
|
|
|
wmsReportWorkListagain) {
|
|
|
|
|
QcCheckTaskWarehousingDTO qcCheckTaskWarehousingDTO = new QcCheckTaskWarehousingDTO();
|
|
|
|
|
qcCheckTaskWarehousingDTO.setFactoryCode(factoryCode);
|
|
|
|
|
qcCheckTaskWarehousingDTO.setIncomeBatchNo(wmsReportWork.getBatch());
|
|
|
|
|
qcCheckTaskWarehousingDTO.setOrderNo(wmsReportWork.getWorkorderCodeSap());
|
|
|
|
|
qcCheckTaskWarehousingDTO.setMaterialCode(wmsReportWork.getProductCode());
|
|
|
|
|
qcCheckTaskWarehousingDTO.setMaterialName(wmsReportWork.getProductName());
|
|
|
|
|
qcCheckTaskWarehousingDTO.setCheckType("checkTypeCP");
|
|
|
|
|
qcCheckTaskWarehousingDTO.setQuality(wmsReportWork.getQuantityQualified());
|
|
|
|
|
|
|
|
|
|
wmsFpStorageNews.setWhCode(mesReportWork.getWhCode());//仓库编码
|
|
|
|
|
// wmsFpStorageNews.setWlCode(mesReportWork.getWlCode());
|
|
|
|
|
wmsFpStorageNews.setStorageType("成品");
|
|
|
|
|
wmsFpStorageNews.setProductCode(mesReportWork.getProductCode());
|
|
|
|
|
wmsFpStorageNews.setProductName(mesReportWork.getProductName());
|
|
|
|
|
wmsFpStorageNews.setFactoryCode(mesReportWork.getFactoryCode());
|
|
|
|
|
wmsFpStorageNews.setActiveFlag("1");
|
|
|
|
|
wmsFpStorageNews.setUserDefined1(mesReportWork.getUnit());
|
|
|
|
|
List<WmsFpStorageNews> wmsFpStorageNewsList= wmsFpStorageNewsMapper.selectWmsFpStorageNewsList(wmsFpStorageNews);
|
|
|
|
|
wmsFpStorageNews.setStorageId(IdUtils.fastSimpleUUID());
|
|
|
|
|
wmsFpStorageNews.setAmount(mesReportWork.getQuantityQualified());
|
|
|
|
|
wmsFpStorageNews.setCreateBy(mesReportWork.getCreateBy());
|
|
|
|
|
wmsFpStorageNews.setCreateTime(new Date());
|
|
|
|
|
if (wmsFpStorageNewsList.size()>0){
|
|
|
|
|
WmsFpStorageNews wmsFpStorageNews1= wmsFpStorageNewsList.get(0);
|
|
|
|
|
BigDecimal amount= wmsFpStorageNews1.getAmount();
|
|
|
|
|
BigDecimal amountAdd= amount.add(wmsFpStorageNews.getAmount());
|
|
|
|
|
wmsFpStorageNews1.setAmount(amountAdd);
|
|
|
|
|
wmsFpStorageNewsMapper.updateWmsFpStorageNews(wmsFpStorageNews1);
|
|
|
|
|
}else {
|
|
|
|
|
wmsFpStorageNewsMapper.insertWmsFpStorageNews(wmsFpStorageNews);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(wmsReportWorkListRk.size()>0){
|
|
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
|
|
|
|
for (wmsReportWork mesReportWork:
|
|
|
|
|
wmsReportWorkListRk) {
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("AUFNR",mesReportWork.getWorkorderCodeSap());
|
|
|
|
|
map.put("WERKS",mesReportWork.getFactoryCode());
|
|
|
|
|
map.put("LGORT",mesReportWork.getWhCode());
|
|
|
|
|
map.put("QUANTITY",mesReportWork.getQuantityQualified());
|
|
|
|
|
map.put("ERFME",mesReportWork.getUnit());
|
|
|
|
|
map.put("BATCH",mesReportWork.getBatch());
|
|
|
|
|
map.put("HSDAT",mesReportWork.getProductDate());
|
|
|
|
|
mapList.add(map);
|
|
|
|
|
}
|
|
|
|
|
//过账
|
|
|
|
|
R result=remoteSapService.sapOrderReceipt(mapList);
|
|
|
|
|
int code= result.getCode();
|
|
|
|
|
String msg= result.getMsg();
|
|
|
|
|
for (wmsReportWork mesReportWork:
|
|
|
|
|
wmsReportWorkListRk) {
|
|
|
|
|
WmsProductPut wmsProductPut2=new WmsProductPut();
|
|
|
|
|
wmsProductPut2.setId(mesReportWork.getId());
|
|
|
|
|
wmsProductPut2.setSapMessage(msg);
|
|
|
|
|
if (code==200) {//过账成功
|
|
|
|
|
String tem= (String) result.getData();
|
|
|
|
|
wmsProductPut2.setSapProof(tem);
|
|
|
|
|
wmsProductPut2.setSapStatus("1");
|
|
|
|
|
}else {
|
|
|
|
|
wmsProductPut2.setSapStatus("2");
|
|
|
|
|
}
|
|
|
|
|
wmsProductPutMapper.updateWmsProductPut(wmsProductPut2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (wmsReportWorkListagain.size()>0){
|
|
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
|
|
|
|
for (wmsReportWork mesReportWork:
|
|
|
|
|
wmsReportWorkListagain) {
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("AUFNR",mesReportWork.getWorkorderCodeSap());
|
|
|
|
|
map.put("WERKS",mesReportWork.getFactoryCode());
|
|
|
|
|
map.put("LGORT",mesReportWork.getWhCode());
|
|
|
|
|
map.put("QUANTITY",mesReportWork.getQuantityQualified());
|
|
|
|
|
map.put("ERFME",mesReportWork.getUnit());
|
|
|
|
|
map.put("BATCH",mesReportWork.getBatch());
|
|
|
|
|
map.put("HSDAT",mesReportWork.getProductDate());
|
|
|
|
|
mapList.add(map);
|
|
|
|
|
}
|
|
|
|
|
//过账
|
|
|
|
|
R result=remoteSapService.sapOrderReceipt(mapList);
|
|
|
|
|
int code= result.getCode();
|
|
|
|
|
String msg= result.getMsg();
|
|
|
|
|
for (wmsReportWork mesReportWork:
|
|
|
|
|
wmsReportWorkListagain) {
|
|
|
|
|
WmsProductPut wmsProductPut2=new WmsProductPut();
|
|
|
|
|
wmsProductPut2.setId(mesReportWork.getId());
|
|
|
|
|
wmsProductPut2.setSapMessage(msg);
|
|
|
|
|
if (code==200) {//过账成功
|
|
|
|
|
String tem= (String) result.getData();
|
|
|
|
|
wmsProductPut2.setSapProof(tem);
|
|
|
|
|
wmsProductPut2.setSapStatus("1");
|
|
|
|
|
}else {
|
|
|
|
|
wmsProductPut2.setSapStatus("2");
|
|
|
|
|
}
|
|
|
|
|
wmsProductPutMapper.updateWmsProductPut(wmsProductPut2);
|
|
|
|
|
}
|
|
|
|
|
qcCheckTaskWarehousingDTO.setSupplierName("小榄成品现货仓");
|
|
|
|
|
qcCheckTaskWarehousingDTO.setSupplierCode(wmsReportWork.getWhCode());
|
|
|
|
|
qcCheckTaskWarehousingDTO.setCheckLoc("mjtest");
|
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
Date productDate = simpleDateFormat.parse(wmsReportWork.getProductDate());
|
|
|
|
|
qcCheckTaskWarehousingDTO.setIncomeTime(productDate);
|
|
|
|
|
//qcCheckTaskWarehousingDTO.
|
|
|
|
|
remoteQualityService.createProductTask(qcCheckTaskWarehousingDTO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String SUCCESS="操作完成";
|
|
|
|
|
return SUCCESS;
|
|
|
|
|
}
|
|
|
|
|