|
|
|
@ -8,10 +8,8 @@ import cn.estsh.i3plus.ext.mes.pcn.apiservice.util.MesPcnException;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesProduceSnPrintDataModel;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesProduceSnPrintModel;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
|
|
|
|
import cn.estsh.i3plus.mes.pcn.api.iservice.busi.ISyncFuncService;
|
|
|
|
|
import cn.estsh.i3plus.mes.pcn.util.DateUtil;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.codemaker.SnowflakeIdMaker;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesCustomerPart;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesNumberRule;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
|
|
|
|
@ -44,12 +42,6 @@ import java.util.*;
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class ChengDuVolvoPartPrintStrategy implements IPrintTemplateStrategyService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISyncFuncService syncFuncService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private SnowflakeIdMaker snowflakeIdMaker;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMesPrintedSnLogService mesPrintedSnLogService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@ -71,9 +63,8 @@ public class ChengDuVolvoPartPrintStrategy implements IPrintTemplateStrategyServ
|
|
|
|
|
}
|
|
|
|
|
//物料信息
|
|
|
|
|
MesCustomerPart customerPart = (!Objects.isNull(genSerialNoModel) && !CollectionUtils.isEmpty(genSerialNoModel.getDataMap()) && genSerialNoModel.getDataMap().containsKey(MesCustomerPart.class.getSimpleName())) ? (MesCustomerPart) genSerialNoModel.getDataMap().get(MesCustomerPart.class.getSimpleName()) : mesCustomerPartService.getMesCustomerPart(organizeCode,mesProduceSnPrintModel.getPartNo());
|
|
|
|
|
Map<String, Object> modelMap = (Map<String, Object>) mesProduceSnPrintModel.getSourceData();
|
|
|
|
|
// 工单信息
|
|
|
|
|
MesWorkOrder workOrder = (MesWorkOrder) modelMap.get("mesWorkOrder");
|
|
|
|
|
MesWorkOrder workOrder = (MesWorkOrder) mesProduceSnPrintModel.getSourceData();
|
|
|
|
|
MesProduceSn mesProduceSn = produceSnExtService.getProduceSnByCustSn(organizeCode, workOrder.getCustSn());
|
|
|
|
|
if (mesProduceSn == null) {
|
|
|
|
|
MesPcnException.throwBusiException("客户条码[%s]不存在!", workOrder.getCustSn());
|
|
|
|
|