This commit is contained in:
zds
2022-10-18 10:45:40 +08:00
parent 9d3c00b5fc
commit df8668d2eb
2 changed files with 14 additions and 19 deletions

View File

@@ -405,7 +405,8 @@ public class DailyplanServiceImpl implements DailyplanService {
new_jo.put("workorder_qty",jo.getString("standard_weight")); new_jo.put("workorder_qty",jo.getString("standard_weight"));
new_jo.put("planstart_time",jo.getString("planstart_date").substring(0,10)+" 08:00:00"); 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("planend_time",jo.getString("planend_date").substring(0,10)+" 23:59:59");
new_jo.put("status","10"); new_jo.put("status",jsonMst.getString("remark"));
new_jo.put("remark","10");
new_jo.put("create_mode","03"); new_jo.put("create_mode","03");
new_jo.put("source_bill_id",jo.getString("dailyplan_id")); 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_type",jo.getString("workorder_type"));

View File

@@ -127,15 +127,12 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
json.put("create_time", now); json.put("create_time", now);
json.put("sysdeptid", deptId); json.put("sysdeptid", deptId);
json.put("syscompanyid", deptId); json.put("syscompanyid", deptId);
String create_mode = json.getString("create_mode"); String planstart_time = json.getString("planstart_time");
if("01".equals(create_mode)){ Date date = DateUtil.parse(planstart_time);
String planstart_time = json.getString("planstart_time"); int days = this.getDays(json.getString("material_id"));
Date date = DateUtil.parse(planstart_time); Date planend_date = DateUtil.offsetDay(date,days-1);
int days = this.getDays(json.getString("material_id")); String planend_time = DateUtil.formatDate(planend_date).substring(0,10);
Date planend_date = DateUtil.offsetDay(date,days-1); json.put("planend_time",planend_time+" 23:59:59");
String planend_time = DateUtil.formatDate(planend_date).substring(0,10);
json.put("planend_time",planend_time+" 23:59:59");
}
mstTab.insert(json); mstTab.insert(json);
this.updatePcsn(json); this.updatePcsn(json);
} }
@@ -176,15 +173,12 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
this.updatePcsn(whereJson); this.updatePcsn(whereJson);
} }
} }
String create_mode = whereJson.getString("create_mode"); String planstart_time = whereJson.getString("planstart_time");
if("01".equals(create_mode)){ Date date = DateUtil.parse(planstart_time);
String planstart_time = whereJson.getString("planstart_time"); int days = this.getDays(whereJson.getString("material_id"));
Date date = DateUtil.parse(planstart_time); Date planend_date = DateUtil.offsetDay(date,days-1);
int days = this.getDays(whereJson.getString("material_id")); String planend_time = DateUtil.formatDate(planend_date).substring(0,10);
Date planend_date = DateUtil.offsetDay(date,days-1); whereJson.put("planend_time",planend_time+" 23:59:59");
String planend_time = DateUtil.formatDate(planend_date).substring(0,10);
whereJson.put("planend_time",planend_time+" 23:59:59");
}
mstTab.update(whereJson); mstTab.update(whereJson);
} }