|
|
@ -55,6 +55,8 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
|
|
|
|
private ProWetMaterialPlanDetailMapper proWetMaterialPlanDetailMapper;
|
|
|
|
private ProWetMaterialPlanDetailMapper proWetMaterialPlanDetailMapper;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private RemoteSapService remoteSapService;
|
|
|
|
private RemoteSapService remoteSapService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private ProWetMaterialPlanMapper proWetMaterialPlanMapper;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询生产工单
|
|
|
|
* 查询生产工单
|
|
|
@ -697,6 +699,13 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
|
|
|
|
if (!(proOrderWorkorder.getStatus().equals("w0") || proOrderWorkorder.getStatus().equals("w1"))) {
|
|
|
|
if (!(proOrderWorkorder.getStatus().equals("w0") || proOrderWorkorder.getStatus().equals("w1"))) {
|
|
|
|
return error("工单已生产,不可变更!");
|
|
|
|
return error("工单已生产,不可变更!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 白坯工单所在湿料计划下发不允许变更
|
|
|
|
|
|
|
|
if (proOrderWorkorder.getProdType().equals("white")) {
|
|
|
|
|
|
|
|
ProWetMaterialPlan plan = proWetMaterialPlanMapper.selectProWetMaterialPlanByWorkId(proOrderWorkorder.getWorkorderId());
|
|
|
|
|
|
|
|
if (plan != null) {
|
|
|
|
|
|
|
|
return error("工单所在湿料计划已下发,不允许变更!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -726,6 +735,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
|
|
|
|
List<ProOrderWorkorder> proOrderWorkorderList = new ArrayList<ProOrderWorkorder>();
|
|
|
|
List<ProOrderWorkorder> proOrderWorkorderList = new ArrayList<ProOrderWorkorder>();
|
|
|
|
// 查询该工单信息
|
|
|
|
// 查询该工单信息
|
|
|
|
ProOrderWorkorder proOrderWorkorder = proOrderWorkorderMapper.selectWorkOrderByCode(code);
|
|
|
|
ProOrderWorkorder proOrderWorkorder = proOrderWorkorderMapper.selectWorkOrderByCode(code);
|
|
|
|
|
|
|
|
formatProOrderWorkorder(proOrderWorkorder);
|
|
|
|
proOrderWorkorderList.add(proOrderWorkorder);
|
|
|
|
proOrderWorkorderList.add(proOrderWorkorder);
|
|
|
|
boolean flag = true;
|
|
|
|
boolean flag = true;
|
|
|
|
|
|
|
|
|
|
|
@ -736,6 +746,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
|
|
|
|
while (flag) {
|
|
|
|
while (flag) {
|
|
|
|
ProOrderWorkorder workorder = proOrderWorkorderMapper.selectWorkOrderByCode(tempCode.toString());
|
|
|
|
ProOrderWorkorder workorder = proOrderWorkorderMapper.selectWorkOrderByCode(tempCode.toString());
|
|
|
|
if (workorder != null) {
|
|
|
|
if (workorder != null) {
|
|
|
|
|
|
|
|
formatProOrderWorkorder(workorder);
|
|
|
|
proOrderWorkorderList.add(workorder);
|
|
|
|
proOrderWorkorderList.add(workorder);
|
|
|
|
tempCode.setLength(0);
|
|
|
|
tempCode.setLength(0);
|
|
|
|
tempCode.append(workorder.getParentOrder());
|
|
|
|
tempCode.append(workorder.getParentOrder());
|
|
|
|