This commit is contained in:
zds
2022-08-02 09:44:29 +08:00
parent f8f07c0124
commit 334b56f550
3 changed files with 12 additions and 5 deletions

View File

@@ -143,7 +143,9 @@ public class DailyplanServiceImpl implements DailyplanService {
json.put("create_id", currentUserId); json.put("create_id", currentUserId);
json.put("create_name", nickName); json.put("create_name", nickName);
json.put("create_time", now); 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); JSONObject mater = MD_ME_ProducMaterialExt.query("material_id='"+json.getString("material_id")+"'").uniqueResult(0);
double standard_weight = mater.getDouble("standard_weight_pft"); double standard_weight = mater.getDouble("standard_weight_pft");
if(standard_weight ==0){ if(standard_weight ==0){
@@ -157,7 +159,7 @@ public class DailyplanServiceImpl implements DailyplanService {
json.put("plan_org_name", product.getString("org_name")); json.put("plan_org_name", product.getString("org_name"));
json.put("product_series", json.getString("product_series_id")); json.put("product_series", json.getString("product_series_id"));
json.put("planend_date", now.substring(0,10));
MPS_BD_ProductDailyPlan.insert(json); MPS_BD_ProductDailyPlan.insert(json);
} }
@@ -167,7 +169,6 @@ public class DailyplanServiceImpl implements DailyplanService {
Long currentUserId = SecurityUtils.getCurrentUserId(); Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName(); String nickName = SecurityUtils.getNickName();
String now = DateUtil.now(); String now = DateUtil.now();
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
WQLObject pdm_bi_productdeptpcsn = WQLObject.getWQLObject("pdm_bi_productdeptpcsn"); WQLObject pdm_bi_productdeptpcsn = WQLObject.getWQLObject("pdm_bi_productdeptpcsn");
WQLObject MPS_BD_ProductDailyPlan = WQLObject.getWQLObject("MPS_BD_ProductDailyPlan"); 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_optid", currentUserId);
whereJson.put("update_optname", nickName); whereJson.put("update_optname", nickName);
whereJson.put("update_time", now); 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); JSONObject mater = MD_ME_ProducMaterialExt.query("material_id='"+whereJson.getString("material_id")+"'").uniqueResult(0);
double standard_weight = mater.getDouble("standard_weight_pft"); double standard_weight = mater.getDouble("standard_weight_pft");
if(standard_weight ==0){ if(standard_weight ==0){
@@ -191,7 +194,6 @@ public class DailyplanServiceImpl implements DailyplanService {
whereJson.put("plan_org_name", product.getString("org_name")); whereJson.put("plan_org_name", product.getString("org_name"));
whereJson.put("product_series", whereJson.getString("product_series_id")); whereJson.put("product_series", whereJson.getString("product_series_id"));
whereJson.put("planend_date", now.substring(0,10));
MPS_BD_ProductDailyPlan.update(whereJson); MPS_BD_ProductDailyPlan.update(whereJson);
} }

View File

@@ -165,6 +165,9 @@ export default {
workorder_type: [ workorder_type: [
{ required: true, message: '计划类型不能为空', trigger: 'blur' } { required: true, message: '计划类型不能为空', trigger: 'blur' }
], ],
device_id: [
{ required: true, message: '关键设备不能为空', trigger: 'blur' }
],
plan_org_code: [ plan_org_code: [
{ required: true, message: '申报单位不能为空', trigger: 'blur' } { required: true, message: '申报单位不能为空', trigger: 'blur' }
], ],

View File

@@ -197,6 +197,7 @@ import workorder from '@/api/wms/pdm/workorder'
import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute' import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute'
import { download } from '@/api/data' import { download } from '@/api/data'
import { downloadFile } from '@/utils' import { downloadFile } from '@/utils'
import crudProducetask from '@/api/wms/pdm/producetask'
export default { export default {
name: 'dailyplan', name: 'dailyplan',
@@ -210,6 +211,7 @@ export default {
idField: 'dailyplan_id', idField: 'dailyplan_id',
sort: 'dailyplan_id', sort: 'dailyplan_id',
query: { device_id: '' }, query: { device_id: '' },
crudMethod: { ...dailyplan },
optShow: { optShow: {
add: true, add: true,
edit: false, edit: false,