修改bug

This commit is contained in:
zds
2022-07-27 15:45:00 +08:00
parent 2106f84f9d
commit 9e60a2e1c6

View File

@@ -107,7 +107,7 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
for(int i=0;i<pcsn_num;i++){
JSONObject jo = this.createPcsn(json);
pcsn = jo.getString("pcsn");
JSONObject old = mstTab.query("status<>'99' and material_id='"+material_id+"' and pcsn='"+pcsn+"'").uniqueResult(0);
JSONObject old = mstTab.query("is_delete='0' and status<>'99' and material_id='"+material_id+"' and pcsn='"+pcsn+"'").uniqueResult(0);
if(old!=null){
throw new BadRequestException("已存在相同产品和批次的未完成工令!");
}
@@ -146,7 +146,7 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
String material_id = whereJson.getString("material_id");
String pcsn = whereJson.getString("pcsn");
String workorder_id = whereJson.getString("workorder_id");
JSONObject old = mstTab.query("status<>'99' and material_id='"+material_id+"' and pcsn='"+pcsn+"' and workorder_id<>'"+workorder_id+"'").uniqueResult(0);
JSONObject old = mstTab.query("is_delete='0' and status<>'99' and material_id='"+material_id+"' and pcsn='"+pcsn+"' and workorder_id<>'"+workorder_id+"'").uniqueResult(0);
if(old!=null){
throw new BadRequestException("已存在相同产品和批次的未完成工令!");
}