|
|
|
@ -1,8 +1,11 @@
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant
|
|
|
|
|
import cn.estsh.i3plus.mes.api.iservice.busi.ISyncFuncService
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.MathOperation
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.dbinterface.MesInterfaceDataMapper
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.model.GenSerialNoModel
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.repository.MesShippingOrderManagementRepository
|
|
|
|
|
import org.slf4j.Logger
|
|
|
|
|
import org.slf4j.LoggerFactory
|
|
|
|
@ -23,6 +26,9 @@ class MesToPiscesMesJisShipping {
|
|
|
|
|
@Autowired
|
|
|
|
|
private MesShippingOrderManagementRepository mesShippingOrderManagementRepository;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISyncFuncService syncFuncService;
|
|
|
|
|
|
|
|
|
|
def filterData(MesInterfaceDataMapper mapper, List<Map<String, Object>> srcData) throws Exception {
|
|
|
|
|
if (srcData == null || srcData.size() == 0) {
|
|
|
|
|
return srcData
|
|
|
|
@ -47,6 +53,16 @@ class MesToPiscesMesJisShipping {
|
|
|
|
|
destData.put(key, rowMap)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//TRANS_ID赋值
|
|
|
|
|
if(mapper.getDestColumnMapping().contains("TRANS_ID")){
|
|
|
|
|
GenSerialNoModel orderSeqSerialNoModel = new GenSerialNoModel("JIS_SHIPPING_TRANS_ID");
|
|
|
|
|
List<String> resultList = syncFuncService.syncSerialNo(orderSeqSerialNoModel.organizeCode(organizeCode), "MES2PISCES发运单", organizeCode, destData.size()).getResultList();
|
|
|
|
|
int index = 0;
|
|
|
|
|
for (Map<String, Object> rowMap : destData.values()) {
|
|
|
|
|
rowMap.put("TRANS_ID",resultList.get(index));
|
|
|
|
|
index++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return new ArrayList<>(destData.values());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|