From a892e65fec20533b799716242482b153be4c90b9 Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Thu, 10 Nov 2022 20:12:16 +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 --- .../impl/HandNewMaterialServiceImpl.java | 8 ++++++-- .../service/impl/DailyplanServiceImpl.java | 10 ++-------- .../impl/StatisticalReportServiceImpl.java | 7 ++++--- mes/qd/src/views/wms/pcs/orderproc/index.vue | 19 +++++++++++-------- .../pdm/base/CapacityTemplate/AddDialog.vue | 11 ----------- .../views/wms/pdm/produce/dailyplan/index.vue | 3 +-- 6 files changed, 24 insertions(+), 34 deletions(-) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/service/impl/HandNewMaterialServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/service/impl/HandNewMaterialServiceImpl.java index 624e3f59..ff3a045c 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/service/impl/HandNewMaterialServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/in/service/impl/HandNewMaterialServiceImpl.java @@ -553,9 +553,13 @@ public class HandNewMaterialServiceImpl implements HandNewMaterialService { if (receive_dtl_jo.getString("status").equals("99")) { throw new PdaRequestException("收货单明细已完成!"); } - if (receive_dtl_jo.getDoubleValue("status") == 0) { - throw new PdaRequestException("收货明细入库数为0!"); + double unin = receive_dtl_jo.getDouble("receive_qty")-receive_dtl_jo.getDouble("instor_qty"); + if (unin <= 0) { + throw new PdaRequestException("收货明细未入库数为0!"); } + if(bucket_now.getDouble("storage_qty") > unin){ + throw new PdaRequestException("当前组盘入库数"+bucket_now.getDouble("storage_qty")+"大于收货明细未入库数"+unin+"!"); + } bucket_now.put("source_billdtl_id", bill.get("source_billdtl_id")); bucket_now.put("source_bill_type", bill.get("source_bill_type")); bucket_now.put("source_bill_code", bill.get("source_bill_code")); 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 7f9488a8..e17e679d 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 @@ -69,16 +69,10 @@ public class DailyplanServiceImpl implements DailyplanService { String planend_date = jo.getString("planend_date"); Date date = DateUtil.parse(planend_date); - String plan_finish_date = jo.getString("plan_finish_date"); - Date date2 = DateUtil.parse(plan_finish_date); - long days = (int) DateUtil.between(date2,date, DateUnit.DAY); int report_time = jo.getInteger("report_time"); int report_day = report_time/24; - if(date2.getTime() >= date.getTime()){ - jo.put("day_num",days-report_day); - }else{ - jo.put("day_num",-days-report_day); - } + Date date2 = DateUtil.offsetDay(date, report_day); + jo.put("plan_finish_date2",DateUtil.formatDate(date2)); ja.add(jo); } Map jret = new HashMap(); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java index 626b202a..3b8fc42d 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/service/impl/StatisticalReportServiceImpl.java @@ -136,9 +136,10 @@ public class StatisticalReportServiceImpl implements StatisticalReportService { if (dtlJa_map.containsKey(material_id)) { need_qty = dtlJa_map.get(material_id); } - double canuse_num = NumberUtil.sub(now_ivt - need_qty).doubleValue(); - jo1.put(material_id, String.format("%.3f", canuse_num)); + jo1.put(material_id, String.format("%.3f", now_ivt)); + + double canuse_num = NumberUtil.sub(now_ivt - need_qty).doubleValue(); //已开单重量 jo22.put(material_id, String.format("%.3f", need_qty)); //2、排产需求量(未开单的工令重量+排产未生成工令日计划重量)根据bom计算需要多少原料库存重量: @@ -184,7 +185,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService { jo7.put(material_id, String.format("%.3f", safe_qty)); //8、采购缺口:库存+待检+在途+最低储备-排产量 - double buy_qty = bom_qty + safe_qty - (canuse_num + noin_qty + notqty); + double buy_qty = (canuse_num + noin_qty + notqty) - (bom_qty + safe_qty); jo8.put(material_id, String.format("%.3f", buy_qty)); //6、覆盖日期:物料库存可坚持到哪一天:库存现存量减每天需求量,哪天<0,取前一天 diff --git a/mes/qd/src/views/wms/pcs/orderproc/index.vue b/mes/qd/src/views/wms/pcs/orderproc/index.vue index 82a87ab3..8124531c 100644 --- a/mes/qd/src/views/wms/pcs/orderproc/index.vue +++ b/mes/qd/src/views/wms/pcs/orderproc/index.vue @@ -109,21 +109,21 @@ - - - + + + - - + + - - - + + + @@ -249,6 +249,9 @@ export default { this.crud.toQuery() }) }, + planend_timeFormat(row) { + return row.create_date.substring(0, 10) + }, formaterStatus(row, column) { for (const item of this.procStatusList) { if (item.code === row.proc_status) { diff --git a/mes/qd/src/views/wms/pdm/base/CapacityTemplate/AddDialog.vue b/mes/qd/src/views/wms/pdm/base/CapacityTemplate/AddDialog.vue index 2bdf4c01..25214b84 100644 --- a/mes/qd/src/views/wms/pdm/base/CapacityTemplate/AddDialog.vue +++ b/mes/qd/src/views/wms/pdm/base/CapacityTemplate/AddDialog.vue @@ -21,15 +21,6 @@ - @@ -100,8 +91,6 @@ import CRUD, { crud, form } from '@crud/crud' import capacitytemplate from '@/api/wms/pdm/capacitytemplate' import queryDevice from '@/views/wms/pdm/base/CapacityTemplate/queryDevice' -import shutframe from '@/api/wms/st/inStor/shutframe' -import crudDept, {getDepts} from "@/api/system/dept"; import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect' const defaultForm = { 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 e1e02930..341d8186 100644 --- a/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue +++ b/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue @@ -200,8 +200,7 @@ - - +