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