From c0bd28aa43f071420818ddecbe40aeb2c2107411 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com>
Date: Wed, 10 Apr 2024 16:10:05 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?=
=?UTF-8?q?=E7=95=8C=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
hw-ui/src/views/board/fifthFloor/index.vue | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/hw-ui/src/views/board/fifthFloor/index.vue b/hw-ui/src/views/board/fifthFloor/index.vue
index 72675eec..1b82f704 100644
--- a/hw-ui/src/views/board/fifthFloor/index.vue
+++ b/hw-ui/src/views/board/fifthFloor/index.vue
@@ -25,8 +25,8 @@
- 领料
- 完成
+ 领料
+ 完成
{
- this.form1.wmsRawOutstockDetailList = e.data.map(r => {
+ this.$set(this.form1,'wmsRawOutstockDetailList',e.data.map(r => {
return {
materialId: r.materialId,
materialCode: r.materialCode,
@@ -1015,7 +1015,8 @@ export default {
unavailableAmount: r.occupyAmount + r.frozenAmount,
planAmount: r.planAmount
}
- })
+ }))
+ console.log(this.form1)
})
},
@@ -1023,7 +1024,7 @@ export default {
warehouseChange(warehouseId) {
this.form.wmsRawOutstockDetailList = [];
this.form.warehouseId = warehouseId;
- this.getStockTotal();
+ this.searchMaterial('');
},
receiveMaterial() {
From d9b46d7a98fbfb9354f1d53b7871fb1548e12d7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com>
Date: Wed, 10 Apr 2024 17:07:48 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?=
=?UTF-8?q?=E7=95=8C=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
hw-ui/src/store/modules/user.js | 8 +++++---
hw-ui/src/views/login.vue | 3 +++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw-ui/src/store/modules/user.js b/hw-ui/src/store/modules/user.js
index 7cee4166..96dde7d2 100644
--- a/hw-ui/src/store/modules/user.js
+++ b/hw-ui/src/store/modules/user.js
@@ -8,7 +8,7 @@ const user = {
name: '',
avatar: '',
roles: [],
- permissions: []
+ permissions: [],
},
mutations: {
@@ -32,7 +32,7 @@ const user = {
},
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions
- }
+ },
},
actions: {
@@ -100,6 +100,7 @@ const user = {
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
+ sessionStorage.removeItem('FLOORDATA')
removeToken()
resolve()
}).catch(error => {
@@ -115,7 +116,8 @@ const user = {
removeToken()
resolve()
})
- }
+ },
+
}
}
diff --git a/hw-ui/src/views/login.vue b/hw-ui/src/views/login.vue
index 407a1436..f7dbe6d1 100644
--- a/hw-ui/src/views/login.vue
+++ b/hw-ui/src/views/login.vue
@@ -201,6 +201,9 @@ export default {
this.$store.dispatch("Login", this.loginForm).then(() => {
let data = this.options.find(v=>v.stationId === this.loginForm.stationId) || {}
let routeData = this.floorData.find(v=>v.floor === data.floor && v.processId === data.processId) || {}
+ if(routeData.route){
+ sessionStorage.setItem("FLOORDATA", JSON.stringify(routeData))
+ }
// this.$router.push({path: this.redirect || "/"}).catch(() => {
// });
this.$router.push({path: routeData.route || this.redirect || "/"}).catch(() => {
From 545077ea2943711882c25a0e2011f390e84b31cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com>
Date: Wed, 10 Apr 2024 17:08:19 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?=
=?UTF-8?q?=E7=95=8C=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
hw-ui/src/permission.js | 4 ++++
hw-ui/src/store/getters.js | 1 +
hw-ui/src/views/board/fifthFloor/index.vue | 14 +++++++++++++-
hw-ui/src/views/board/firstFloor/index.vue | 14 +++++++++++++-
hw-ui/src/views/board/fourthFloor/assemble.vue | 14 +++++++++++++-
hw-ui/src/views/board/fourthFloor/laserLight.vue | 14 +++++++++++++-
hw-ui/src/views/board/fourthFloor/weld.vue | 14 +++++++++++++-
7 files changed, 70 insertions(+), 5 deletions(-)
diff --git a/hw-ui/src/permission.js b/hw-ui/src/permission.js
index 459ce6d2..91296461 100644
--- a/hw-ui/src/permission.js
+++ b/hw-ui/src/permission.js
@@ -13,6 +13,10 @@ const whiteList = ['/login', '/login2', '/register']
router.beforeEach((to, from, next) => {
NProgress.start()
if (getToken()) {
+ let floorData = JSON.parse(sessionStorage.getItem('FLOORDATA') || '{}')
+ if(floorData?.route && to.fullPath !== floorData?.route){
+ next({ path: floorData?.route })
+ }
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
/* has token*/
if (to.path === '/login') {
diff --git a/hw-ui/src/store/getters.js b/hw-ui/src/store/getters.js
index 8adb1b65..59b3e9b9 100644
--- a/hw-ui/src/store/getters.js
+++ b/hw-ui/src/store/getters.js
@@ -11,6 +11,7 @@ const getters = {
introduction: state => state.user.introduction,
roles: state => state.user.roles,
permissions: state => state.user.permissions,
+ floorData: state => state.user.floorData,
permission_routes: state => state.permission.routes,
topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes,
diff --git a/hw-ui/src/views/board/fifthFloor/index.vue b/hw-ui/src/views/board/fifthFloor/index.vue
index 1b82f704..257c48a0 100644
--- a/hw-ui/src/views/board/fifthFloor/index.vue
+++ b/hw-ui/src/views/board/fifthFloor/index.vue
@@ -188,7 +188,7 @@
首页
SOP预览
- 退出
+ 退出
@@ -578,6 +578,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
diff --git a/hw-ui/src/views/board/firstFloor/index.vue b/hw-ui/src/views/board/firstFloor/index.vue
index 60b48e82..e229a2f3 100644
--- a/hw-ui/src/views/board/firstFloor/index.vue
+++ b/hw-ui/src/views/board/firstFloor/index.vue
@@ -371,7 +371,7 @@
首页
SOP预览
最小化
- 退出
+ 退出
@@ -684,6 +684,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
diff --git a/hw-ui/src/views/board/fourthFloor/assemble.vue b/hw-ui/src/views/board/fourthFloor/assemble.vue
index c86ef2cc..a8975398 100644
--- a/hw-ui/src/views/board/fourthFloor/assemble.vue
+++ b/hw-ui/src/views/board/fourthFloor/assemble.vue
@@ -209,7 +209,7 @@
首页
键盘
最小化
- 退出
+ 退出
@@ -520,6 +520,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
diff --git a/hw-ui/src/views/board/fourthFloor/laserLight.vue b/hw-ui/src/views/board/fourthFloor/laserLight.vue
index 2e6e11be..fcf4aef7 100644
--- a/hw-ui/src/views/board/fourthFloor/laserLight.vue
+++ b/hw-ui/src/views/board/fourthFloor/laserLight.vue
@@ -188,7 +188,7 @@
首页
板材入库
SOP预览
- 退出
+ 退出
@@ -450,6 +450,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
diff --git a/hw-ui/src/views/board/fourthFloor/weld.vue b/hw-ui/src/views/board/fourthFloor/weld.vue
index ab0cd8c4..7dde0e62 100644
--- a/hw-ui/src/views/board/fourthFloor/weld.vue
+++ b/hw-ui/src/views/board/fourthFloor/weld.vue
@@ -158,7 +158,7 @@
首页
SOP预览
- 退出
+ 退出
@@ -372,6 +372,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
From aaadc09d0079ced3379dbc0fb58aa129cba5ad1d Mon Sep 17 00:00:00 2001
From: xins
Date: Wed, 10 Apr 2024 17:59:09 +0800
Subject: [PATCH 4/5] =?UTF-8?q?2.0.2=20=E8=BD=A6=E9=97=B4=EF=BC=9A=201?=
=?UTF-8?q?=E3=80=81=E4=B8=80=E6=A5=BC=E6=89=AB=E6=8F=8F=E7=89=A9=E6=96=99?=
=?UTF-8?q?=E7=A1=AE=E8=AE=A4=E4=BD=BF=E7=94=A8=E3=80=81=E4=B8=80=E6=A5=BC?=
=?UTF-8?q?=E6=88=90=E5=93=81=E5=85=A5=E5=BA=93=202=E3=80=81=E5=9B=9B?=
=?UTF-8?q?=E6=A5=BC=E6=89=AB=E6=8F=8F=E7=89=A9=E6=96=99=E7=A1=AE=E8=AE=A4?=
=?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=92=8C=E5=9B=9B=E6=A5=BC=E6=88=90=E5=93=81?=
=?UTF-8?q?=E5=85=A5=E5=BA=93=203=E3=80=81=E4=BA=94=E6=A5=BC=E7=94=B3?=
=?UTF-8?q?=E8=AF=B7=E9=A2=86=E6=96=99=E3=80=81=E6=9F=9C=E4=BD=93=E7=BB=91?=
=?UTF-8?q?=E5=AE=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/MesProductPlanDetailServiceImpl.java | 8 +-
.../hw/wms/controller/WmsApiController.java | 11 ++
.../wms/controller/WmsMobileController.java | 4 +-
.../service/IWmsInventoryCheckService.java | 4 +-
.../impl/WmsInventoryCheckServiceImpl.java | 4 +-
.../wms/WmsInventoryCheckDetailMapper.xml | 2 +-
.../mapper/wms/WmsInventoryCheckMapper.xml | 2 +-
hw-ui/src/api/board/index.js | 48 +++++
hw-ui/src/views/board/fifthFloor/index.vue | 150 +++++++++++++++-
hw-ui/src/views/board/firstFloor/index.vue | 164 +++++++++++++++++-
.../src/views/board/fourthFloor/assemble.vue | 158 ++++++++++++++++-
.../views/board/fourthFloor/laserLight.vue | 25 +--
hw-ui/src/views/board/fourthFloor/weld.vue | 4 +-
13 files changed, 541 insertions(+), 43 deletions(-)
diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java
index f315d3b1..8537b393 100644
--- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java
+++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java
@@ -3,6 +3,7 @@ package com.hw.mes.service.impl;
import com.hw.common.core.constant.MesConstants;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
+import com.hw.common.core.utils.StringUtils;
import com.hw.common.core.utils.uuid.Seq;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.domain.MesMaterialCheckResult;
@@ -60,6 +61,9 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
*/
@Override
public List selectMesProductPlanDetailList(MesProductPlanDetail mesProductPlanDetail) {
+ if(mesProductPlanDetail.getPlanId()==null){
+ return new ArrayList();
+ }
return mesProductPlanDetailMapper.selectMesProductPlanDetailList(mesProductPlanDetail);
}
@@ -241,8 +245,8 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
Date currentDate = new Date();
String userName = SecurityUtils.getUsername();
BigDecimal planAmount = null;
- if (mesProductPlanDetail.getAttachId() != null) {//如果是按图纸生产的
- String attachId = dbProductPlan.getAttachId();
+ String attachId = dbProductPlan.getAttachId();
+ if (StringUtils.isNotEmpty(attachId)) {//如果是按图纸生产的
String[] attachIdArr = attachId.split(",");
planAmount = new BigDecimal(attachIdArr.length);
} else {
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsApiController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsApiController.java
index 5c123b8c..187883c0 100644
--- a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsApiController.java
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsApiController.java
@@ -49,6 +49,7 @@ public class WmsApiController extends BaseController {
// @RequiresPermissions("wms:rawoutstock:list")
@GetMapping("/getWarehouses")
public AjaxResult getWarehouses(WmsBaseWarehouse queryBaseWarehouse) {
+ queryBaseWarehouse.setWarehouseInstockType(WmsConstants.WMS_WAREHOUSE_INSTOCK_TYPE_RAW);
List list = wmsBaseWarehouseService.selectWmsBaseWarehouseList(queryBaseWarehouse);
return success(list);
}
@@ -130,4 +131,14 @@ public class WmsApiController extends BaseController {
return toAjax(wmsProductInstockService.fourthFloorProduceInstock(wmsProduceInstockVo));
}
+ /**
+ * 申请返库
+ */
+ @Log(title = "原材料返库记录", businessType = BusinessType.APPLY)
+ @PostMapping(("/applyRawBack"))
+ public AjaxResult applyRawBack(@Validated @RequestBody List wmsRawReturns) {
+ return toAjax(wmsRawReturnService.applyRawReturn(wmsRawReturns));
+ }
+
+
}
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsMobileController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsMobileController.java
index 44bd1e16..759c29af 100644
--- a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsMobileController.java
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsMobileController.java
@@ -524,12 +524,12 @@ public class WmsMobileController extends BaseController {
/**
- * 获取待盘点和盘点中的盘点记录明细列表
+ * 获取待盘点和盘点中的盘点记录明细列表(inventoryCheckId=3&checkStatus=1(1是盘点中,2是盘点完成))
*/
// @RequiresPermissions("wms:rawoutstock:query")
@GetMapping(value = "/getInventoryCheckDetails")
public AjaxResult getInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail) {
- List checkDetails = wmsInventoryCheckService.getIncompletedInventoryCheckDetails(wmsInventoryCheckDetail);
+ List checkDetails = wmsInventoryCheckService.getInventoryCheckDetails(wmsInventoryCheckDetail);
return success(checkDetails);
}
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsInventoryCheckService.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsInventoryCheckService.java
index 58f10f2f..63a043da 100644
--- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsInventoryCheckService.java
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/IWmsInventoryCheckService.java
@@ -82,12 +82,12 @@ public interface IWmsInventoryCheckService
// public Map> getIncompletedInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail);
/**
- * 根据判断状态获取数据,按状态返回list数据
+ * 根据状态获取数据,按状态返回list数据
*
* @param wmsInventoryCheckDetail
* @return
*/
- public List getIncompletedInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail);
+ public List getInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail);
/**
* 确认盘点
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsInventoryCheckServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsInventoryCheckServiceImpl.java
index b4e65f46..ee8c0395 100644
--- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsInventoryCheckServiceImpl.java
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsInventoryCheckServiceImpl.java
@@ -89,7 +89,7 @@ public class WmsInventoryCheckServiceImpl implements IWmsInventoryCheckService {
String userName = SecurityUtils.getUsername();
Date currentDate = new Date();
- if (inventoryCheckId == null || inventoryCheckId.equals(0L)) {
+ if (inventoryCheckId == null || inventoryCheckId.equals(0L) || inventoryCheckId.equals(-1L)) {
WmsInventoryCheck queryInventoryCheck = new WmsInventoryCheck();
queryInventoryCheck.setWarehouseId(warehouseId);
queryInventoryCheck.setCheckStatus(WmsConstants.WMS_INVENTORY_CHECK_STATUS_INVENTORYING);
@@ -307,7 +307,7 @@ public class WmsInventoryCheckServiceImpl implements IWmsInventoryCheckService {
* @return
*/
@Override
- public List getIncompletedInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail) {
+ public List getInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail) {
List wmsInventoryCheckDetailList = wmsInventoryCheckDetailMapper.selectWmsInventoryCheckDetailJoinList(wmsInventoryCheckDetail);
return wmsInventoryCheckDetailList;
}
diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckDetailMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckDetailMapper.xml
index dd656d27..17884cde 100644
--- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckDetailMapper.xml
+++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckDetailMapper.xml
@@ -146,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select wicd.inventory_check_detail_id, wicd.inventory_check_id, wicd.material_id, wicd.material_batch,
- wicd.stock_type, wicd.stock_id, wicd.stock_amount, wicd.real_amount, wicd.check_status, wicd.inventory_time,
+ wicd.stock_type, wicd.stock_id, wicd.stock_amount, wicd.real_amount, wicd.check_status, wicd.inventory_time, wicd.location_code,
mbmi.material_code,mbmi.material_name
from wms_inventory_check_detail wicd left join mes_base_material_info mbmi on wicd.material_id = mbmi.material_id
diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckMapper.xml
index 2bfccb55..4fac80bb 100644
--- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckMapper.xml
+++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckMapper.xml
@@ -163,7 +163,7 @@