From a5bc2c77ec49a73b205c2053ea141151134a02ce Mon Sep 17 00:00:00 2001
From: zds <2388969634@qq.com>
Date: Tue, 23 Aug 2022 11:44:22 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/wms/pdm/produce/worktask/index.vue | 19 +++++++++++++++++--
.../wms/pdm/produce/worktask/print2Dialog.vue | 4 ++--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/mes/qd/src/views/wms/pdm/produce/worktask/index.vue b/mes/qd/src/views/wms/pdm/produce/worktask/index.vue
index 1a1caf4c..56f21d5a 100644
--- a/mes/qd/src/views/wms/pdm/produce/worktask/index.vue
+++ b/mes/qd/src/views/wms/pdm/produce/worktask/index.vue
@@ -99,7 +99,7 @@
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@input="onInput()"
- @change="crud.toQuery"
+ @change="mytoQuery"
/>
@@ -279,6 +279,7 @@ export default {
printShow: false,
currentRow: null,
checkrows: [],
+ query_flag: true,
XLList: []
}
},
@@ -296,12 +297,26 @@ export default {
this.XLList = res
})
this.crud.query.createTime = [new Date().daysAgo(2), new Date()]
- this.crud.toQuery()
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
+ if(this.query_flag){
+ this.crud.query.begin_time = (new Date().daysAgo(2)).toISOString()
+ this.crud.query.end_time = (new Date()).toISOString()
+ this.query_flag = false
+ }
this.handleCurrentChange()
},
+ mytoQuery(array1){
+ if(array1 === null){
+ this.crud.query.begin_time = ''
+ this.crud.query.end_time = ''
+ }else{
+ this.crud.query.begin_time = array1[0]
+ this.crud.query.end_time = array1[1]
+ }
+ this.crud.toQuery()
+ },
toView(index, row) {
this.mstrow = row
this.viewShow = true
diff --git a/mes/qd/src/views/wms/pdm/produce/worktask/print2Dialog.vue b/mes/qd/src/views/wms/pdm/produce/worktask/print2Dialog.vue
index c4fe9b56..a4308f58 100644
--- a/mes/qd/src/views/wms/pdm/produce/worktask/print2Dialog.vue
+++ b/mes/qd/src/views/wms/pdm/produce/worktask/print2Dialog.vue
@@ -156,8 +156,8 @@ export default {
LODOP.ADD_PRINT_TEXT('43mm', '65mm', '80mm', '27mm', '桶号:' + item.bucketunique + '')
LODOP.ADD_PRINT_TEXT('59mm', '6mm', '140mm', '27mm', '编码:' + item.material_code + '')
- LODOP.ADD_PRINT_TEXT('85mm', '6mm', '140mm', '27mm', '牌号:' + item.old_mark + '')
- LODOP.ADD_PRINT_TEXT('72mm', '6mm', '140mm', '27mm', '名称:' + item.material_name + '')
+ LODOP.ADD_PRINT_TEXT('72mm', '6mm', '140mm', '27mm', '牌号:' + item.old_mark + '')
+ LODOP.ADD_PRINT_TEXT('85mm', '6mm', '140mm', '27mm', '名称:' + item.material_name + '')
LODOP.ADD_PRINT_TEXT('85mm', '110mm', '60mm', '27mm', '序号:' + item.order_no + '')
// LODOP.PREVIEW()// 预览
LODOP.PRINT()// 打印
From a8a249c35025e77e72a899169832733f2c7eeee0 Mon Sep 17 00:00:00 2001
From: zds <2388969634@qq.com>
Date: Tue, 23 Aug 2022 15:13:32 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mes/qd/src/views/wms/basedata/em/equipmentfile/AddDialog.vue | 4 ++--
mes/qd/src/views/wms/basedata/em/equipmentfile/ViewDialog.vue | 4 ++--
mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue | 3 +--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/mes/qd/src/views/wms/basedata/em/equipmentfile/AddDialog.vue b/mes/qd/src/views/wms/basedata/em/equipmentfile/AddDialog.vue
index 2cfd9ab1..bb0f4bec 100644
--- a/mes/qd/src/views/wms/basedata/em/equipmentfile/AddDialog.vue
+++ b/mes/qd/src/views/wms/basedata/em/equipmentfile/AddDialog.vue
@@ -126,8 +126,8 @@
/>
-
-
+
+
diff --git a/mes/qd/src/views/wms/basedata/em/equipmentfile/ViewDialog.vue b/mes/qd/src/views/wms/basedata/em/equipmentfile/ViewDialog.vue
index 582abbcd..01c6c113 100644
--- a/mes/qd/src/views/wms/basedata/em/equipmentfile/ViewDialog.vue
+++ b/mes/qd/src/views/wms/basedata/em/equipmentfile/ViewDialog.vue
@@ -111,8 +111,8 @@
/>
-
-
+
+
diff --git a/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue b/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue
index d634931d..bfdaae02 100644
--- a/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue
+++ b/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue
@@ -199,7 +199,6 @@
@@ -211,7 +210,7 @@
-
+
From d525cbc45a98cb47b38c6990161d8cfef3cb72db Mon Sep 17 00:00:00 2001
From: liuxy
Date: Tue, 23 Aug 2022 16:16:48 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/PhysicalMstServiceImpl.java | 2 +-
.../impl/WorkproceduremstServiceImpl.java | 43 ++++++-
.../rest/RawUatWcQueryController.java | 8 ++
.../service/RawUatWcQueryService.java | 4 +
.../impl/RawUatWcQueryServiceImpl.java | 112 +++++++++++++++++-
.../src/views/wms/ql/physicalMst/Dialog1.vue | 10 +-
.../wms/ql/physicalMstConfirm/Dialog1.vue | 10 +-
.../ql/workprocedureQl/ResultPutDialog.vue | 33 ++++++
.../repair/devicerepairpa/ExecuteDialog.vue | 2 +-
.../wms/statistics/rawUatWcQuery/index.vue | 26 +++-
10 files changed, 235 insertions(+), 15 deletions(-)
diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/PhysicalMstServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/PhysicalMstServiceImpl.java
index 01d8b271..92351774 100644
--- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/PhysicalMstServiceImpl.java
+++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/PhysicalMstServiceImpl.java
@@ -436,7 +436,7 @@ public class PhysicalMstServiceImpl implements PhysicalMstService {
JSONObject JsonValue = phyDtlTab.query("inspection_item_id = '" + inspection_item_id + "' and inspection_id = '" + inspection_id + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(JsonValue)) num = num + 1;
}
- if (itemArr.size() != num) throw new BadRequestException("所有项点必须有值");
+// if (itemArr.size() != num) throw new BadRequestException("所有项点必须有值");
/*
* 理化报告是否有效: 有效更新一级质检单以及一系列操作,
diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/WorkproceduremstServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/WorkproceduremstServiceImpl.java
index 35aa870b..2b06c11d 100644
--- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/WorkproceduremstServiceImpl.java
+++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ql/service/impl/WorkproceduremstServiceImpl.java
@@ -16,10 +16,12 @@ import org.nl.exception.BadRequestException;
import org.nl.modules.security.service.dto.JwtUserDto;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
+import org.nl.utils.SpringContextHolder;
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
import org.nl.wms.basedata.master.service.MaterialbaseService;
import org.nl.wms.ql.Enum.QlBillStatusEnum;
import org.nl.wms.ql.service.InspectionsheetmstService;
+import org.nl.wms.ql.service.PhysicalMstService;
import org.nl.wms.ql.service.WorkproceduremstService;
import org.nl.wms.ql.service.dto.WorkproceduremstDto;
import org.nl.wql.WQL;
@@ -338,8 +340,12 @@ public class WorkproceduremstServiceImpl implements WorkproceduremstService {
public void confirm(JSONObject whereJson) {
String workprocedure_uuid = whereJson.getString("workprocedure_uuid");
+ WQLObject mstTab = WQLObject.getWQLObject("QL_TEST_WorkProcedureMst"); // 工序质检单主表
WQLObject sheetMstTab = WQLObject.getWQLObject("QL_TEST_InspectionSheetMst"); // 质检单主表
WQLObject sheetDtlTab = WQLObject.getWQLObject("QL_TEST_InspectionSheetDtl"); // 质检单明细表
+ WQLObject phyMstTab = WQLObject.getWQLObject("QL_TEST_PhysicalMst"); // 理化报告主表
+ WQLObject workTaskTab = WQLObject.getWQLObject("PDM_BI_WorkTask"); // 工令工序任务表
+
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
@@ -358,9 +364,8 @@ public class WorkproceduremstServiceImpl implements WorkproceduremstService {
JSONObject JsonValue = WQLObject.getWQLObject("QL_TEST_WorkProcedureDtl").query("inspection_item_id = '" + inspection_item_id + "' and inspection_id = '" + whereJson.getString("inspection_id") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(JsonValue)) num = num + 1;
}
- if (itemArr.size() != num) throw new BadRequestException("所有项点必须有值");
+// if (itemArr.size() != num) throw new BadRequestException("所有项点必须有值");
- WQLObject mstTab = WQLObject.getWQLObject("QL_TEST_WorkProcedureMst");
JSONObject jsonMst = mstTab.query("inspection_id = '" + whereJson.getString("inspection_id") + "'").uniqueResult(0);
jsonMst.put("bill_status",QlBillStatusEnum.FINISH.getCode());
jsonMst.put("confirm_optid",currentUserId);
@@ -385,6 +390,40 @@ public class WorkproceduremstServiceImpl implements WorkproceduremstService {
jsonSheetMst.put("confirm_optname", nickName);
jsonSheetMst.put("confirm_time", now);
sheetMstTab.update(jsonSheetMst);
+ /*
+ * 如果此工令工序任务下的所有工序质检单都为不合格:
+ * 判断条件:此工令工序任务必须为完成状态。
+ * 1.如果存在理化报告则确认理化报告为不合格,
+ * 2.确认一级质检单为不合格
+ */
+ // 1. 查询是否存在此物料、此批次、此工序、并且已完成的工序任务
+ String material_id = jsonMst.getString("material_id");
+ String pcsn = jsonMst.getString("pcsn");
+ JSONObject jsonWorkTask = workTaskTab.query("material_id = '" + material_id + "' and pcsn = '" + pcsn + "' and workprocedure_id = '" + workprocedure_uuid + "' and status = '99'").uniqueResult(0);
+ if (ObjectUtil.isNotEmpty(jsonWorkTask)) {
+ // 2.不为空则查出此工序任务下的所有 工序质检单,判断所有的质检单是否都为不合格
+ JSONArray mstArr = mstTab.query("material_id = '" + material_id + "' and pcsn = '" + pcsn + "' and workprocedure_uuid = '" + workprocedure_uuid + "'").getResultJSONArray(0);
+ int flag = 0;
+ for (int i = 0; i < mstArr.size(); i++) {
+ JSONObject json = mstArr.getJSONObject(i);
+ if (StrUtil.equals(json.getString("result"), "02")) {
+ flag += 1;
+ }
+ }
+ if (flag == mstArr.size()) {
+ // 3.都不合格则判断此物料、批次是否存在理化报告;存在则确认理化报告
+ JSONObject jsonPhyMst = phyMstTab.query("material_id = '" + material_id + "' and pcsn = '" + pcsn + "' and is_delete = '0'").uniqueResult(0);
+ if (ObjectUtil.isNotEmpty(jsonPhyMst)) {
+ // 4.不为空、确认理化报告
+ jsonPhyMst.put("result", "02");
+ jsonPhyMst.put("grade", jsonMst.getString("grade"));
+ jsonPhyMst.put("bill_status", QlBillStatusEnum.TEST_LABORATORY.getCode());
+ phyMstTab.update(jsonPhyMst);
+ SpringContextHolder.getBean(PhysicalMstService.class).confirm(jsonPhyMst);
+ }
+ }
+ }
+
}
@Override
diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/rest/RawUatWcQueryController.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/rest/RawUatWcQueryController.java
index 0ec433fb..234ee20e 100644
--- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/rest/RawUatWcQueryController.java
+++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/statistics/rest/RawUatWcQueryController.java
@@ -11,6 +11,8 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
import java.util.Map;
/**
@@ -38,4 +40,10 @@ public class RawUatWcQueryController {
public ResponseEntity
-
+
diff --git a/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue b/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue
index 86d06e2d..8c6f35b0 100644
--- a/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue
@@ -74,7 +74,18 @@
-
+
+
+ 导出Excel
+
+
{
+ downloadFile(result, '原材料碳化钨', 'xlsx')
+ crud.downloadLoading = false
+ }).catch(() => {
+ crud.downloadLoading = false
+ })
+ }
}
}
}
From 4bebb20bf73dda4327f344911dafbeed0f35ee1a Mon Sep 17 00:00:00 2001
From: zds <2388969634@qq.com>
Date: Tue, 23 Aug 2022 16:18:17 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mes/qd/src/views/wms/statistics/hpcQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/ioStorQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/ivtQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/ledgerQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/outStorQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/phySicalQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/powderOrderQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/powderProductionQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/productionDayQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue | 1 +
mes/qd/src/views/wms/statistics/sendReceiveQuery/index.vue | 2 +-
mes/qd/src/views/wms/statistics/stifleQuery/index.vue | 1 +
12 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/mes/qd/src/views/wms/statistics/hpcQuery/index.vue b/mes/qd/src/views/wms/statistics/hpcQuery/index.vue
index 59f5b658..4c14f840 100644
--- a/mes/qd/src/views/wms/statistics/hpcQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/hpcQuery/index.vue
@@ -53,6 +53,7 @@
v-loading="crud.loading"
:data="crud.data"
size="mini"
+ height="420"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
diff --git a/mes/qd/src/views/wms/statistics/ioStorQuery/index.vue b/mes/qd/src/views/wms/statistics/ioStorQuery/index.vue
index f0facb65..d3eb6270 100644
--- a/mes/qd/src/views/wms/statistics/ioStorQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/ioStorQuery/index.vue
@@ -188,6 +188,7 @@
v-loading="crud.loading"
size="mini"
:data="crud.data"
+ height="420"
style="width: 100%;"
:highlight-current-row="true"
@selection-change="crud.selectionChangeHandler"
diff --git a/mes/qd/src/views/wms/statistics/ivtQuery/index.vue b/mes/qd/src/views/wms/statistics/ivtQuery/index.vue
index 18352ebb..99ae1a3b 100644
--- a/mes/qd/src/views/wms/statistics/ivtQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/ivtQuery/index.vue
@@ -151,6 +151,7 @@
ref="table"
v-loading="crud.loading"
:data="crud.data"
+ height="420"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
diff --git a/mes/qd/src/views/wms/statistics/ledgerQuery/index.vue b/mes/qd/src/views/wms/statistics/ledgerQuery/index.vue
index 669443ce..af913cd4 100644
--- a/mes/qd/src/views/wms/statistics/ledgerQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/ledgerQuery/index.vue
@@ -57,6 +57,7 @@
ref="table"
v-loading="crud.loading"
:data="crud.data"
+ height="420"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
diff --git a/mes/qd/src/views/wms/statistics/outStorQuery/index.vue b/mes/qd/src/views/wms/statistics/outStorQuery/index.vue
index 6f872539..e7e8e4d3 100644
--- a/mes/qd/src/views/wms/statistics/outStorQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/outStorQuery/index.vue
@@ -101,6 +101,7 @@
ref="table"
v-loading="crud.loading"
size="mini"
+ height="420"
:data="crud.data"
style="width: 100%;"
:highlight-current-row="true"
diff --git a/mes/qd/src/views/wms/statistics/phySicalQuery/index.vue b/mes/qd/src/views/wms/statistics/phySicalQuery/index.vue
index 5c483626..33fda071 100644
--- a/mes/qd/src/views/wms/statistics/phySicalQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/phySicalQuery/index.vue
@@ -119,6 +119,7 @@
ref="table"
v-loading="crud.loading"
:data="crud.data"
+ height="420"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
diff --git a/mes/qd/src/views/wms/statistics/powderOrderQuery/index.vue b/mes/qd/src/views/wms/statistics/powderOrderQuery/index.vue
index a2f8d467..42237354 100644
--- a/mes/qd/src/views/wms/statistics/powderOrderQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/powderOrderQuery/index.vue
@@ -68,6 +68,7 @@
diff --git a/mes/qd/src/views/wms/statistics/productionDayQuery/index.vue b/mes/qd/src/views/wms/statistics/productionDayQuery/index.vue
index 6eae1287..0f4d701e 100644
--- a/mes/qd/src/views/wms/statistics/productionDayQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/productionDayQuery/index.vue
@@ -63,6 +63,7 @@
v-loading="crud.loading"
:data="crud.data"
size="mini"
+ height="420"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
diff --git a/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue b/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue
index 86d06e2d..e628dbc1 100644
--- a/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/rawUatWcQuery/index.vue
@@ -81,6 +81,7 @@
v-loading="crud.loading"
:data="crud.data"
size="mini"
+ height="420"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
diff --git a/mes/qd/src/views/wms/statistics/sendReceiveQuery/index.vue b/mes/qd/src/views/wms/statistics/sendReceiveQuery/index.vue
index d268d2a7..211c1857 100644
--- a/mes/qd/src/views/wms/statistics/sendReceiveQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/sendReceiveQuery/index.vue
@@ -81,7 +81,7 @@
-
diff --git a/mes/qd/src/views/wms/statistics/stifleQuery/index.vue b/mes/qd/src/views/wms/statistics/stifleQuery/index.vue
index 2dbce11a..6b39caf8 100644
--- a/mes/qd/src/views/wms/statistics/stifleQuery/index.vue
+++ b/mes/qd/src/views/wms/statistics/stifleQuery/index.vue
@@ -52,6 +52,7 @@
ref="table"
v-loading="crud.loading"
:data="crud.data"
+ height="420"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
From 98336e9c34c23cf27845f177fa6e7b8247633379 Mon Sep 17 00:00:00 2001
From: liuxy
Date: Wed, 24 Aug 2022 10:15:56 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../em/service/impl/DevicebomServiceImpl.java | 11 ++---------
.../em/service/impl/DevicefaultclassServiceImpl.java | 12 ++----------
.../impl/DevicemaintenanceitemsServiceImpl.java | 4 ++--
.../service/impl/DevicerepairitemsServiceImpl.java | 4 ++--
.../views/wms/basedata/em/devicebom/AddDialog.vue | 7 ++-----
.../views/wms/basedata/em/devicefaultclass/index.vue | 7 ++-----
.../views/wms/basedata/em/devicemaintain/index.vue | 11 ++++-------
.../wms/basedata/em/devicerepairitems/index.vue | 7 ++-----
8 files changed, 18 insertions(+), 45 deletions(-)
diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicebomServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicebomServiceImpl.java
index 9b38710f..31a8cc2b 100644
--- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicebomServiceImpl.java
+++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicebomServiceImpl.java
@@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import org.nl.exception.BadRequestException;
+import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.basedata.em.service.DevicebomService;
import org.nl.wms.basedata.em.service.dto.DevicebomDto;
import org.nl.wms.basedata.master.service.ClassstandardService;
@@ -106,14 +107,10 @@ public class DevicebomServiceImpl implements DevicebomService {
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
- String device_bom_code = whereJson.getString("device_bom_code");
- JSONObject jsonObject = bomMstTab.query("device_bom_code = '" + device_bom_code + "' and is_delete = '0'").uniqueResult(0);
- if (ObjectUtil.isNotEmpty(jsonObject)) throw new BadRequestException("此编码已存在");
-
// 插入主表
JSONObject jsonMst = new JSONObject();
jsonMst.put("device_bom_id", IdUtil.getSnowflake(1,1).nextId());
- jsonMst.put("device_bom_code",device_bom_code);
+ jsonMst.put("device_bom_code", CodeUtil.getNewCode("DEVICE_BOM_CODE"));
jsonMst.put("material_name",whereJson.getString("material_name"));
jsonMst.put("material_type_id",whereJson.get("material_type_id"));
jsonMst.put("detail_count",tableData.size());
@@ -152,7 +149,6 @@ public class DevicebomServiceImpl implements DevicebomService {
// 修改主表
JSONObject jsonMst = bomMstTab.query("device_bom_id ='" + device_bom_id + "'").uniqueResult(0);
- jsonMst.put("device_bom_code",whereJson.getString("device_bom_code"));
jsonMst.put("material_name",whereJson.getString("material_name"));
jsonMst.put("material_type_id",whereJson.get("material_type_id"));
jsonMst.put("detail_count",tableData.size());
@@ -177,9 +173,6 @@ public class DevicebomServiceImpl implements DevicebomService {
bomDtlTab.insert(jsonDtl);
}
- String device_bom_code = whereJson.getString("device_bom_code");
- JSONArray jsonObject = bomMstTab.query("device_bom_code = '" + device_bom_code + "' and is_delete = '0'").getResultJSONArray(0);
- if (jsonObject.size() > 1) throw new BadRequestException("此编码已存在");
}
@Override
diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicefaultclassServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicefaultclassServiceImpl.java
index 1c654be3..278273e9 100644
--- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicefaultclassServiceImpl.java
+++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicefaultclassServiceImpl.java
@@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import org.nl.exception.BadRequestException;
+import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.basedata.em.service.DevicefaultclassService;
import org.nl.wms.basedata.em.service.dto.DevicefaultclassDto;
import org.nl.wms.basedata.master.service.ClassstandardService;
@@ -101,13 +102,9 @@ public class DevicefaultclassServiceImpl implements DevicefaultclassService {
WQLObject wo = WQLObject.getWQLObject("em_bi_devicefaultclass");
- String device_faultclass_code = whereJson.getString("device_faultclass_code");
- JSONObject jsonObject = wo.query("device_faultclass_code = '" + device_faultclass_code + "' and is_delete = '0'").uniqueResult(0);
- if (ObjectUtil.isNotEmpty(jsonObject)) throw new BadRequestException("此编码已存在");
-
JSONObject json = new JSONObject();
json.put("device_faultclass_id",IdUtil.getSnowflake(1,1).nextId());
- json.put("device_faultclass_code", whereJson.getString("device_faultclass_code"));
+ json.put("device_faultclass_code", CodeUtil.getNewCode("DEVICE_FACLASS_CODE"));
json.put("device_faultclass_name", whereJson.getString("device_faultclass_name"));
json.put("material_type_id", whereJson.getString("material_type_id"));
json.put("solutions", whereJson.getString("solutions"));
@@ -126,7 +123,6 @@ public class DevicefaultclassServiceImpl implements DevicefaultclassService {
WQLObject wo = WQLObject.getWQLObject("em_bi_devicefaultclass");
JSONObject json = wo.query("device_faultclass_id = '" + whereJson.getString("device_faultclass_id") + "'").uniqueResult(0);
- json.put("device_faultclass_code", whereJson.getString("device_faultclass_code"));
json.put("device_faultclass_name", whereJson.getString("device_faultclass_name"));
json.put("material_type_id", whereJson.getString("material_type_id"));
json.put("solutions", whereJson.getString("solutions"));
@@ -136,10 +132,6 @@ public class DevicefaultclassServiceImpl implements DevicefaultclassService {
json.put("update_time", DateUtil.now());
wo.update(json);
- String device_faultclass_code = whereJson.getString("device_faultclass_code");
- JSONArray jsonObject = wo.query("device_faultclass_code = '" + device_faultclass_code + "' and is_delete = '0'").getResultJSONArray(0);
- if (jsonObject.size() > 1) throw new BadRequestException("此编码已存在");
-
}
@Override
diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicemaintenanceitemsServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicemaintenanceitemsServiceImpl.java
index 8c45cd9e..d98873a6 100644
--- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicemaintenanceitemsServiceImpl.java
+++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicemaintenanceitemsServiceImpl.java
@@ -6,6 +6,7 @@ import cn.hutool.core.map.MapUtil;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import org.nl.exception.BadRequestException;
+import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.basedata.em.service.DevicemaintenanceitemsService;
import org.nl.wms.basedata.em.service.dto.DevicemaintenanceitemsDto;
import org.nl.wql.WQL;
@@ -94,7 +95,7 @@ public class DevicemaintenanceitemsServiceImpl implements Devicemaintenanceitems
JSONObject json = new JSONObject();
json.put("maint_item_id", IdUtil.getSnowflake(1,1).nextId());
- json.put("maint_item_code", whereJson.getString("maint_item_code"));
+ json.put("maint_item_code", CodeUtil.getNewCode("MAINT_ITEM_CODE"));
json.put("maint_item_name", whereJson.getString("maint_item_name"));
json.put("item_level", whereJson.getString("item_level"));
json.put("contents", whereJson.getString("contents"));
@@ -119,7 +120,6 @@ public class DevicemaintenanceitemsServiceImpl implements Devicemaintenanceitems
WQLObject wo = WQLObject.getWQLObject("em_bi_devicemaintenanceitems");
JSONObject json = wo.query("maint_item_id = '" + whereJson.getString("maint_item_id") + "'").uniqueResult(0);
- json.put("maint_item_code", whereJson.getString("maint_item_code"));
json.put("maint_item_name", whereJson.getString("maint_item_name"));
json.put("item_level", whereJson.getString("item_level"));
json.put("contents", whereJson.getString("contents"));
diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicerepairitemsServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicerepairitemsServiceImpl.java
index 3aeeb320..61ae4063 100644
--- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicerepairitemsServiceImpl.java
+++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicerepairitemsServiceImpl.java
@@ -6,6 +6,7 @@ import cn.hutool.core.map.MapUtil;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import org.nl.exception.BadRequestException;
+import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.basedata.em.service.DevicerepairitemsService;
import org.nl.wms.basedata.em.service.dto.DevicerepairitemsDto;
import org.nl.wql.WQL;
@@ -90,7 +91,7 @@ public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
JSONObject json = new JSONObject();
json.put("repair_item_id", IdUtil.getSnowflake(1,1).nextId());
- json.put("repair_item_code", whereJson.getString("repair_item_code"));
+ json.put("repair_item_code", CodeUtil.getNewCode("REPAIR_ITEM_CODE"));
json.put("repair_item_name", whereJson.getString("repair_item_name"));
json.put("requirement", whereJson.getString("requirement"));
json.put("remark", whereJson.getString("remark"));
@@ -115,7 +116,6 @@ public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
WQLObject wo = WQLObject.getWQLObject("em_bi_devicerepairitems");
JSONObject json = wo.query("repair_item_id = '" + whereJson.getString("repair_item_id") + "'").uniqueResult(0);
- json.put("repair_item_code", whereJson.getString("repair_item_code"));
json.put("repair_item_name", whereJson.getString("repair_item_name"));
json.put("requirement", whereJson.getString("requirement"));
json.put("remark", whereJson.getString("remark"));
diff --git a/mes/qd/src/views/wms/basedata/em/devicebom/AddDialog.vue b/mes/qd/src/views/wms/basedata/em/devicebom/AddDialog.vue
index 3a319789..539a4a7f 100644
--- a/mes/qd/src/views/wms/basedata/em/devicebom/AddDialog.vue
+++ b/mes/qd/src/views/wms/basedata/em/devicebom/AddDialog.vue
@@ -34,8 +34,8 @@
-
-
+
+
@@ -182,9 +182,6 @@ export default {
material_type_id: [
{ required: true, message: '设备类别不能为空', trigger: 'blur' }
],
- device_bom_code: [
- { required: true, message: '设备BOM编码不能为空', trigger: 'blur' }
- ],
material_name: [
{ required: true, message: '设备BOM名称不能为空', trigger: 'blur' }
]
diff --git a/mes/qd/src/views/wms/basedata/em/devicefaultclass/index.vue b/mes/qd/src/views/wms/basedata/em/devicefaultclass/index.vue
index ffd9d2ef..faf33219 100644
--- a/mes/qd/src/views/wms/basedata/em/devicefaultclass/index.vue
+++ b/mes/qd/src/views/wms/basedata/em/devicefaultclass/index.vue
@@ -41,10 +41,9 @@
-
+
-
@@ -72,6 +71,7 @@
+
@@ -154,9 +154,6 @@ export default {
permission: {
},
rules: {
- device_faultclass_code: [
- { required: true, message: '故障编码不能为空', trigger: 'blur' }
- ],
device_faultclass_name: [
{ required: true, message: '故障名称不能为空', trigger: 'blur' }
],
diff --git a/mes/qd/src/views/wms/basedata/em/devicemaintain/index.vue b/mes/qd/src/views/wms/basedata/em/devicemaintain/index.vue
index 111b33fc..67641de9 100644
--- a/mes/qd/src/views/wms/basedata/em/devicemaintain/index.vue
+++ b/mes/qd/src/views/wms/basedata/em/devicemaintain/index.vue
@@ -58,8 +58,8 @@
-
-
+
+
@@ -83,7 +83,7 @@
-
+
@@ -128,7 +128,7 @@
-
+
@@ -184,9 +184,6 @@ export default {
permission: {
},
rules: {
- maint_item_code: [
- { required: true, message: '保养项目编码不能为空', trigger: 'blur' }
- ],
maint_item_name: [
{ required: true, message: '保养项目名称不能为空', trigger: 'blur' }
],
diff --git a/mes/qd/src/views/wms/basedata/em/devicerepairitems/index.vue b/mes/qd/src/views/wms/basedata/em/devicerepairitems/index.vue
index 1345d37b..0c64d6d3 100644
--- a/mes/qd/src/views/wms/basedata/em/devicerepairitems/index.vue
+++ b/mes/qd/src/views/wms/basedata/em/devicerepairitems/index.vue
@@ -39,8 +39,8 @@
-
-
+
+
@@ -129,9 +129,6 @@ export default {
permission: {
},
rules: {
- repair_item_code: [
- { required: true, message: '设备维修项目编码不能为空', trigger: 'blur' }
- ],
repair_item_name: [
{ required: true, message: '设备维修项目名称不能为空', trigger: 'blur' }
],