From 334b56f5505d7899bbc6e251108af07d5004fe4c Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Tue, 2 Aug 2022 09:44:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/pdm/service/impl/DailyplanServiceImpl.java | 12 +++++++----- .../views/wms/pdm/produce/dailyplan/AddDialog.vue | 3 +++ mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue | 2 ++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java index 85c40e66..7a502cdd 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java @@ -143,7 +143,9 @@ public class DailyplanServiceImpl implements DailyplanService { json.put("create_id", currentUserId); json.put("create_name", nickName); 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")); 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){ @@ -157,7 +159,7 @@ public class DailyplanServiceImpl implements DailyplanService { json.put("plan_org_name", product.getString("org_name")); json.put("product_series", json.getString("product_series_id")); - json.put("planend_date", now.substring(0,10)); + MPS_BD_ProductDailyPlan.insert(json); } @@ -167,7 +169,6 @@ public class DailyplanServiceImpl implements DailyplanService { Long currentUserId = SecurityUtils.getCurrentUserId(); String nickName = SecurityUtils.getNickName(); String now = DateUtil.now(); - JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser(); WQLObject pdm_bi_productdeptpcsn = WQLObject.getWQLObject("pdm_bi_productdeptpcsn"); WQLObject MPS_BD_ProductDailyPlan = WQLObject.getWQLObject("MPS_BD_ProductDailyPlan"); @@ -177,7 +178,9 @@ public class DailyplanServiceImpl implements DailyplanService { whereJson.put("update_optid", currentUserId); whereJson.put("update_optname", nickName); 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")); 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){ @@ -191,7 +194,6 @@ public class DailyplanServiceImpl implements DailyplanService { whereJson.put("plan_org_name", product.getString("org_name")); whereJson.put("product_series", whereJson.getString("product_series_id")); - whereJson.put("planend_date", now.substring(0,10)); MPS_BD_ProductDailyPlan.update(whereJson); } diff --git a/mes/qd/src/views/wms/pdm/produce/dailyplan/AddDialog.vue b/mes/qd/src/views/wms/pdm/produce/dailyplan/AddDialog.vue index 224bd874..1117e461 100644 --- a/mes/qd/src/views/wms/pdm/produce/dailyplan/AddDialog.vue +++ b/mes/qd/src/views/wms/pdm/produce/dailyplan/AddDialog.vue @@ -165,6 +165,9 @@ export default { workorder_type: [ { required: true, message: '计划类型不能为空', trigger: 'blur' } ], + device_id: [ + { required: true, message: '关键设备不能为空', trigger: 'blur' } + ], plan_org_code: [ { required: true, message: '申报单位不能为空', trigger: 'blur' } ], diff --git a/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue b/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue index 98d205fb..79820715 100644 --- a/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue +++ b/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue @@ -197,6 +197,7 @@ import workorder from '@/api/wms/pdm/workorder' import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute' import { download } from '@/api/data' import { downloadFile } from '@/utils' +import crudProducetask from '@/api/wms/pdm/producetask' export default { name: 'dailyplan', @@ -210,6 +211,7 @@ export default { idField: 'dailyplan_id', sort: 'dailyplan_id', query: { device_id: '' }, + crudMethod: { ...dailyplan }, optShow: { add: true, edit: false,