This commit is contained in:
zds
2022-09-06 16:50:38 +08:00
parent 5f84450c25
commit e44ff3bc67

View File

@@ -165,7 +165,14 @@ public class DailyplanServiceImpl implements DailyplanService {
json.put("create_time", now);
json.put("planstart_date", json.getString("planstart_date").substring(0,10));
json.put("plan_finish_date", json.getString("plan_finish_date").substring(0,10));
json.put("planend_date", json.getString("plan_finish_date"));
String planstart_date = json.getString("planstart_date");
Date date = DateUtil.parse(planstart_date);
int days = this.getDays(json.getString("material_id"));
Date planend_date = DateUtil.offsetDay(date,days-1);
json.put("planend_date",DateUtil.formatDate(planend_date));
JSONObject mater = MD_ME_ProducMaterialExt.query("material_id='"+json.getString("material_id")+"'").uniqueResult(0);
double standard_weight = mater.getDouble("standard_weight_pft");
if(standard_weight ==0){
@@ -200,7 +207,13 @@ public class DailyplanServiceImpl implements DailyplanService {
whereJson.put("update_time", now);
whereJson.put("planstart_date", whereJson.getString("planstart_date").substring(0,10));
whereJson.put("plan_finish_date", whereJson.getString("plan_finish_date").substring(0,10));
whereJson.put("planend_date", whereJson.getString("plan_finish_date"));
String planstart_date = whereJson.getString("planstart_date");
Date date = DateUtil.parse(planstart_date);
int days = this.getDays(whereJson.getString("material_id"));
Date planend_date = DateUtil.offsetDay(date,days-1);
whereJson.put("planend_date",DateUtil.formatDate(planend_date));
JSONObject mater = MD_ME_ProducMaterialExt.query("material_id='"+whereJson.getString("material_id")+"'").uniqueResult(0);
double standard_weight = mater.getDouble("standard_weight_pft");
if(standard_weight ==0){