forked from I3-YF/i3plus-mes-yfai
武汉CBR负报工
parent
91ba35debe
commit
eac136850f
@ -0,0 +1,46 @@
|
|||||||
|
import cn.estsh.i3plus.mes.api.iservice.busi.ISyncFuncService
|
||||||
|
import cn.estsh.i3plus.platform.common.tool.TimeTool
|
||||||
|
import cn.estsh.i3plus.pojo.mes.dbinterface.MesInterfaceDataMapper
|
||||||
|
import cn.estsh.i3plus.pojo.mes.model.GenSerialNoModel
|
||||||
|
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil
|
||||||
|
import org.slf4j.Logger
|
||||||
|
import org.slf4j.LoggerFactory
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : MES2PISCES-发运单武汉工厂
|
||||||
|
* @Reference :
|
||||||
|
* @Author : junsheng.li
|
||||||
|
* @CreateDate 2024/11/18 20:37
|
||||||
|
* @Modify:
|
||||||
|
* */
|
||||||
|
class MesToPiscesMesJisShippingWh {
|
||||||
|
|
||||||
|
public static final Logger LOGGER = LoggerFactory.getLogger(MesToPiscesMesJisShippingWh.class)
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISyncFuncService syncFuncService;
|
||||||
|
|
||||||
|
def filterData(MesInterfaceDataMapper mapper, List<Map<String, Object>> srcData) throws Exception {
|
||||||
|
if (srcData == null || srcData.size() == 0) {
|
||||||
|
return srcData
|
||||||
|
}
|
||||||
|
String organizeCode = mapper.getOrganizeCode();
|
||||||
|
//TRANS_ID赋值
|
||||||
|
if (mapper.getDestColumnMapping().contains("TRANS_ID")) {
|
||||||
|
Date date = new Date();
|
||||||
|
GenSerialNoModel orderSeqSerialNoModel = new GenSerialNoModel("COKIPIT_PISCES_TRANS_ID");
|
||||||
|
orderSeqSerialNoModel.setYear(MesExtEnumUtil.YEAR_SHORT.valueOfDescription(Integer.parseInt(TimeTool.getYear(date))))
|
||||||
|
orderSeqSerialNoModel.setMonth(MesExtEnumUtil.MONTH_SHORT.valueOfDescription(Integer.parseInt(TimeTool.getMonth(date))))
|
||||||
|
orderSeqSerialNoModel.setDay(TimeTool.getDay(date))
|
||||||
|
List<String> resultList = syncFuncService.syncSerialNo(orderSeqSerialNoModel.organizeCode(organizeCode), "MES2PISCES发运单", organizeCode, srcData.size()).getResultList();
|
||||||
|
int index = 0;
|
||||||
|
for (Map<String, Object> rowMap : srcData) {
|
||||||
|
rowMap.put("TRANS_ID", resultList.get(index));
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new ArrayList<>(srcData);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue