|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|
|
|
|
import com.os.common.utils.DateUtils;
|
|
|
|
|
import com.os.common.utils.StringUtils;
|
|
|
|
|
import com.os.mes.base.domain.BaseDeviceLedger;
|
|
|
|
|
import com.os.mes.base.mapper.BaseDeviceLedgerMapper;
|
|
|
|
|
import com.os.mes.base.service.IBaseDeviceLedgerService;
|
|
|
|
|
import com.os.mes.prod.domain.ProdPlanInfo;
|
|
|
|
|
import com.os.mes.prod.service.IProdPlanInfoService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -30,7 +30,7 @@ public class ProdPlanErpInfoServiceImpl implements IProdPlanErpInfoService {
|
|
|
|
|
private IProdPlanInfoService prodPlanInfoService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private BaseDeviceLedgerMapper deviceLedgerMapper;
|
|
|
|
|
private IBaseDeviceLedgerService deviceLedgerService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询生产计划信息
|
|
|
|
@ -111,19 +111,20 @@ public class ProdPlanErpInfoServiceImpl implements IProdPlanErpInfoService {
|
|
|
|
|
public void insertOrUpdateProdPlanErpInfoList(List<ProdPlanErpInfo> dataList) {
|
|
|
|
|
for (ProdPlanErpInfo planErpInfo : dataList) {
|
|
|
|
|
String equipmentNo = planErpInfo.getEquipmentNo();
|
|
|
|
|
String processStage = planErpInfo.getProcessStage();
|
|
|
|
|
if (StringUtils.isNotEmpty(equipmentNo)) {
|
|
|
|
|
BaseDeviceLedger deviceLedger = deviceLedgerMapper.selectBaseDeviceLedgerByDeviceCode(equipmentNo);
|
|
|
|
|
BaseDeviceLedger deviceLedger = deviceLedgerService.selectBaseDeviceLedgerByDeviceCode(equipmentNo, processStage);
|
|
|
|
|
if (StringUtils.isNotNull(deviceLedger)) {
|
|
|
|
|
// 出布、成型、包胶、硫化
|
|
|
|
|
planErpInfo.setStationCode(deviceLedger.getProductLineCode());
|
|
|
|
|
planErpInfo.setProcessCode(deviceLedger.getProcessCode());
|
|
|
|
|
planErpInfo.setStationCode(deviceLedger.getProductLineCode());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String seqNo = planErpInfo.getSeqNo();
|
|
|
|
|
ProdPlanErpInfo selectErpInfo = new ProdPlanErpInfo();
|
|
|
|
|
selectErpInfo.setSeqNo(seqNo);
|
|
|
|
|
List<ProdPlanErpInfo> infoList = prodPlanErpInfoMapper.selectProdPlanErpInfoList(selectErpInfo);
|
|
|
|
|
if (infoList.size() > 0){
|
|
|
|
|
if (!infoList.isEmpty()) {
|
|
|
|
|
ProdPlanInfo prodPlanInfo = new ProdPlanInfo();
|
|
|
|
|
prodPlanInfo.setPlanCode(seqNo);
|
|
|
|
|
List<ProdPlanInfo> planInfoList = prodPlanInfoService.selectProdPlanInfoList(prodPlanInfo);
|
|
|
|
|