优化
This commit is contained in:
@@ -275,6 +275,7 @@ public class DailyplanServiceImpl implements DailyplanService {
|
||||
new_jo.put("planstart_time",jo.getString("planstart_date").substring(0,10)+" 08:00:00");
|
||||
new_jo.put("planend_time",jo.getString("planend_date").substring(0,10)+" 23:59:59");
|
||||
new_jo.put("status","10");
|
||||
new_jo.put("create_mode","03");
|
||||
new_jo.put("source_bill_id",jo.getString("dailyplan_id"));
|
||||
new_jo.put("source_bill_type",jo.getString("workorder_type"));
|
||||
new_jo.put("source_bill_code",jo.getString("plan_code"));
|
||||
|
||||
@@ -107,9 +107,9 @@ 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("is_delete='0' and status<>'99' and material_id='"+material_id+"' and pcsn='"+pcsn+"'").uniqueResult(0);
|
||||
JSONObject old = mstTab.query("is_delete='0' and material_id='"+material_id+"' and pcsn='"+pcsn+"'").uniqueResult(0);
|
||||
if(old!=null){
|
||||
throw new BadRequestException("已存在相同产品和批次的未完成工令!");
|
||||
throw new BadRequestException("已存在相同产品牌号和批次的工令!");
|
||||
}
|
||||
json.put("pcsn", pcsn);
|
||||
String product_series_id = json.getString("product_series_id");
|
||||
@@ -146,9 +146,9 @@ 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("is_delete='0' and 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 material_id='"+material_id+"' and pcsn='"+pcsn+"' and workorder_id<>'"+workorder_id+"'").uniqueResult(0);
|
||||
if(old!=null){
|
||||
throw new BadRequestException("已存在相同产品和批次的未完成工令!");
|
||||
throw new BadRequestException("已存在相同产品牌号和批次的工令!");
|
||||
}
|
||||
String product_series_id = whereJson.getString("product_series_id");
|
||||
if (StrUtil.isEmpty(product_series_id)) {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
输入.device_id TYPEAS s_string
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.device_code TYPEAS s_string
|
||||
|
||||
输入.create_mode TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -83,6 +83,9 @@
|
||||
OPTION 输入.status <> ""
|
||||
WorkOrder.status = 输入.status
|
||||
ENDOPTION
|
||||
OPTION 输入.create_mode <> ""
|
||||
WorkOrder.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
OPTION 输入.workorder_type <> ""
|
||||
WorkOrder.workorder_type = 输入.workorder_type
|
||||
ENDOPTION
|
||||
@@ -142,6 +145,9 @@
|
||||
ENDOPTION
|
||||
OPTION 输入.pcsn <> ""
|
||||
WorkOrder.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.create_mode <> ""
|
||||
WorkOrder.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
OPTION 输入.workorder_type <> ""
|
||||
WorkOrder.workorder_type = 输入.workorder_type
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user