From dee6de0402fcd3b4ef861f9a9bb6a369d61d59a6 Mon Sep 17 00:00:00 2001 From: xs Date: Thu, 5 Dec 2024 17:24:57 +0800 Subject: [PATCH] =?UTF-8?q?3.5.11=20=E7=9C=8B=E6=9D=BF=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=92=8C=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hw/auth/controller/TokenController.java | 1 + .../main/java/com/hw/auth/form/LoginBody.java | 13 +++++++ .../com/hw/gateway/filter/AuthFilter.java | 2 ++ .../src/main/java/com/hw/job/task/RyTask.java | 6 ++++ .../controller/ThirdWmsBorderController.java | 7 ++-- .../impl/FifthWmsBoardServiceImpl.java | 11 +++++- .../impl/ThirdWmsBorderServiceImpl.java | 8 ++--- .../com/hw/wms/domain/WmsBaseLocation.java | 10 ++++++ .../hw/wms/domain/WmsRawOutstockDetail.java | 2 +- .../mapper/wms/WmsBaseLocationMapper.xml | 2 +- .../mapper/wms/WmsRawOutstockMapper.xml | 8 ++--- .../src/views/board/warehouse/fifthFloor.vue | 4 +-- .../src/views/board/warehouse/thirdFloor.vue | 36 ++++++++----------- 13 files changed, 72 insertions(+), 38 deletions(-) diff --git a/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java b/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java index 7397ece4..95adb62d 100644 --- a/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java +++ b/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java @@ -46,6 +46,7 @@ public class TokenController LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword()); userInfo.setProcessId(form.getProcessId()); userInfo.setProcessFloor(form.getProcessFloor()); + userInfo.setNickname(userInfo.getSysUser().getNickName()); // 获取登录token return R.ok(tokenService.createToken(userInfo)); } diff --git a/hw-auth/src/main/java/com/hw/auth/form/LoginBody.java b/hw-auth/src/main/java/com/hw/auth/form/LoginBody.java index e24f7b59..b32b3492 100644 --- a/hw-auth/src/main/java/com/hw/auth/form/LoginBody.java +++ b/hw-auth/src/main/java/com/hw/auth/form/LoginBody.java @@ -28,6 +28,11 @@ public class LoginBody */ private Integer processFloor; + /** + * 用户昵称 + */ + private String nickname; + public String getUsername() { return username; @@ -64,4 +69,12 @@ public class LoginBody public void setProcessFloor(Integer processFloor) { this.processFloor = processFloor; } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } } diff --git a/hw-gateway/src/main/java/com/hw/gateway/filter/AuthFilter.java b/hw-gateway/src/main/java/com/hw/gateway/filter/AuthFilter.java index 19813389..38192d3c 100644 --- a/hw-gateway/src/main/java/com/hw/gateway/filter/AuthFilter.java +++ b/hw-gateway/src/main/java/com/hw/gateway/filter/AuthFilter.java @@ -71,6 +71,7 @@ public class AuthFilter implements GlobalFilter, Ordered String username = JwtUtils.getUserName(claims); String processId = JwtUtils.getProcessId(claims); String processFloor = JwtUtils.getProcessFloor(claims); + String nickname = JwtUtils.getNickName(claims); if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(username)) { return unauthorizedResponse(exchange, "令牌验证失败"); @@ -82,6 +83,7 @@ public class AuthFilter implements GlobalFilter, Ordered addHeader(mutate, SecurityConstants.DETAILS_USERNAME, username); addHeader(mutate, SecurityConstants.DETAILS_PROCESS_ID, processId); addHeader(mutate, SecurityConstants.DETAILS_PROCESS_FLOOR, processFloor); + addHeader(mutate, SecurityConstants.DETAILS_NICKNAME, nickname); // 内部请求来源参数清除 removeHeader(mutate, SecurityConstants.FROM_SOURCE); return chain.filter(exchange.mutate().request(mutate.build()).build()); diff --git a/hw-modules/hw-job/src/main/java/com/hw/job/task/RyTask.java b/hw-modules/hw-job/src/main/java/com/hw/job/task/RyTask.java index 4f47270a..9554af02 100644 --- a/hw-modules/hw-job/src/main/java/com/hw/job/task/RyTask.java +++ b/hw-modules/hw-job/src/main/java/com/hw/job/task/RyTask.java @@ -136,6 +136,12 @@ public class RyTask remoteWmsService.synchronizeRawMaterialDeliveryInformationToERP(SecurityConstants.INNER); } + public void synchronizeRawReturnInformationToERP(){ + System.out.println("++定时同步原材料退库信息给ERP++syncRawMaterialDeliveryInformationToERP"); + remoteWmsService.synchronizeRawReturnInformationToERP(SecurityConstants.INNER); + } + + public void synchronizeProductInstockInformationToERP(Integer days){ System.out.println("++定时同步成品入库信息给ERP++synchronizeProductInstockInformationToERP"); remoteWmsService.synchronizeProductInstockInformationToERP(days, SecurityConstants.INNER); diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/ThirdWmsBorderController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/ThirdWmsBorderController.java index d1ad3def..7b9dc3f3 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/ThirdWmsBorderController.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/controller/ThirdWmsBorderController.java @@ -17,21 +17,22 @@ public class ThirdWmsBorderController { private ThirdWmsBorderService thirdWmsBorderService; /** - * 单月原材料出入库统计 + * 单月原材料出入库统计(看板右上角) */ @GetMapping("/monthRawAmount") public AjaxResult monthRawAmount(){ return AjaxResult.success(thirdWmsBorderService.monthRawAmount()); } /** - * 三楼仓库库位状态 + * 三楼仓库库位状态(看板右下整个部分) */ @GetMapping("/locationStatus") public AjaxResult locationStatus(){ return AjaxResult.success(thirdWmsBorderService.locationStatus()); } + /** - * 生产计划 + * 原材料出库信息(看板左上) */ @GetMapping("/productPlan") public AjaxResult productPlan(){ diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/FifthWmsBoardServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/FifthWmsBoardServiceImpl.java index 9513e568..1586762b 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/FifthWmsBoardServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/FifthWmsBoardServiceImpl.java @@ -79,8 +79,17 @@ public class FifthWmsBoardServiceImpl implements FifthWmsBorderService { List productStocks = wmsProductStockMapper.selectProductStockPercentage(); Integer emptyLocationCount = wmsBaseLocationMapper.selectEmptyLocation();// Integer allLocation = wmsBaseLocationMapper.selectAllLocation(); + + WmsBaseLocation queryLocation = new WmsBaseLocation(); + queryLocation.setWarehouseId(512L); + List wmsBaseLocationList = wmsBaseLocationMapper.selectWmsBaseLocationList(queryLocation); + + //过滤出料箱在库内的库位信息 + List containerInLocationList = wmsBaseLocationList.stream().filter(wbl -> wbl.getContainerStatus()!=null && wbl.getContainerStatus().equals("1")).collect(Collectors.toList()); + BigDecimal emptyLocationPercentage = new BigDecimal(emptyLocationCount).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP); - Integer oppylLocation = allLocation - emptyLocationCount; + + Integer oppylLocation = containerInLocationList.size();//料箱在库内的数量 BigDecimal opplyLocationPercentage = new BigDecimal(oppylLocation).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP); HashMap map = new HashMap<>(); map.put("wmsRawStocks",wmsRawStocks); diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/ThirdWmsBorderServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/ThirdWmsBorderServiceImpl.java index 8fa1999a..3f19eea2 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/ThirdWmsBorderServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/board/service/impl/ThirdWmsBorderServiceImpl.java @@ -25,10 +25,10 @@ public class ThirdWmsBorderServiceImpl implements ThirdWmsBorderService { @Override public Map monthRawAmount() { - BigDecimal monthRawInAmount = wmsRawInstockMapper.monthRawInAmount(); - BigDecimal monthRawOutAmount = wmsRawOutstockMapper.monthRawOutAmount(); - BigDecimal dayRawInAmount = wmsRawInstockMapper.dayRawInAmount(); - BigDecimal dayRawOutAmount = wmsRawOutstockMapper.dayRawOutAmount(); + BigDecimal monthRawInAmount = wmsRawInstockMapper.monthRawInAmount();//前一个月入库量 + BigDecimal monthRawOutAmount = wmsRawOutstockMapper.monthRawOutAmount();//前一个月出库两 + BigDecimal dayRawInAmount = wmsRawInstockMapper.dayRawInAmount();//当日入库量 + BigDecimal dayRawOutAmount = wmsRawOutstockMapper.dayRawOutAmount();//当日出库量 HashMap hashMap = new HashMap(); hashMap.put("monthRawInAmount",monthRawInAmount); hashMap.put("monthRawOutAmount",monthRawOutAmount); diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsBaseLocation.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsBaseLocation.java index 13d5be49..70fbf22c 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsBaseLocation.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsBaseLocation.java @@ -145,6 +145,8 @@ public class WmsBaseLocation extends BaseEntity @Excel(name = "允许混放产品 1是 0否;预留,允许混放不同的产品") private String productMix; + private String containerStatus;//料箱状态(1:在库内,2在库外) + public void setLocationId(Long locationId) { this.locationId = locationId; @@ -459,6 +461,14 @@ public class WmsBaseLocation extends BaseEntity return productMix; } + public String getContainerStatus() { + return containerStatus; + } + + public void setContainerStatus(String containerStatus) { + this.containerStatus = containerStatus; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsRawOutstockDetail.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsRawOutstockDetail.java index 0f829392..4a90e23a 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsRawOutstockDetail.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsRawOutstockDetail.java @@ -99,7 +99,7 @@ public class WmsRawOutstockDetail extends BaseEntity { /** * 出库时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd") private Date outstockTime; diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml index c1dac69d..30644b45 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml @@ -45,7 +45,7 @@ - select location_id, warehouse_id, location_code,container_code,agv_position_code, warehouse_floor,loc_row, layer_num, loc_column, active_flag, manual_flag, qty_limit, instock_flag, outstock_flag, location_status,loc_deep, batch_mix, create_by, create_time, update_by, update_time, remark, del_flag, shelf_order, check_order, pick_order, pick_flag, is_open_kn_flag, location_scrap_type, volume_limit, weight_limit, length, width, height from wms_base_location + select location_id, warehouse_id, location_code,container_code,container_status,agv_position_code, warehouse_floor,loc_row, layer_num, loc_column, active_flag, manual_flag, qty_limit, instock_flag, outstock_flag, location_status,loc_deep, batch_mix, create_by, create_time, update_by, update_time, remark, del_flag, shelf_order, check_order, pick_order, pick_flag, is_open_kn_flag, location_scrap_type, volume_limit, weight_limit, length, width, height from wms_base_location - select - a.*,b.material_name + a.*,b.material_name,b.material_code,b.material_spec from - wms_raw_outstock a left join mes_base_material_info b on a.material_id = b.material_id + wms_raw_outstock_detail a left join mes_base_material_info b on a.material_id = b.material_id where a.warehouse_id = 311 order by - a.apply_date desc + a.outstock_time desc limit 100