From 5f2e8454edc0381cb09671ca17e0567034dfeed2 Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Mon, 28 Oct 2024 10:12:05 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E5=8C=BA=E5=9F=9F=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E8=A1=A8=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/StPointIvtServiceImpl.java | 8 +- .../service/IUserAreaPermissionService.java | 4 + .../impl/UserAreaPermissionServiceImpl.java | 38 +++++++ .../basedata/st/rest/UserAreaController.java | 45 -------- .../basedata/st/service/UserAreaService.java | 33 ------ .../st/service/impl/UserAreaServiceImpl.java | 100 ------------------ .../mps/service/impl/BakingServiceImpl.java | 15 ++- .../mps/service/impl/CasingServiceImpl.java | 7 +- .../mps/service/impl/FeedingServiceImpl.java | 13 ++- .../pda/mps/service/impl/InServiceImpl.java | 9 +- .../pda/mps/service/impl/OutServiceImpl.java | 9 +- .../service/impl/PaperTubeServiceImpl.java | 9 +- .../mps/service/impl/RawFoilServiceImpl.java | 12 +-- .../mps/service/impl/ShippingServiceImpl.java | 7 +- .../st/service/impl/CoolInServiceImpl.java | 9 +- .../st/service/impl/CoolOutServiceImpl.java | 9 +- .../task/service/impl/PdaTaskServiceImpl.java | 12 ++- .../service/impl/CoolPointIvtServiceImpl.java | 8 +- .../service/impl/CutPointIvtServiceImpl.java | 9 +- .../impl/DeliveryPointIvtServiceImpl.java | 9 +- .../service/impl/HotPointIvtServiceImpl.java | 9 +- .../impl/PackagePointIvtServiceImpl.java | 9 +- .../service/impl/SbPointIvtServiceImpl.java | 9 +- .../impl/RawfoilworkorderServiceImpl.java | 9 +- .../SlittingproductionplanServiceImpl.java | 7 +- .../wms/sch/service/impl/TaskServiceImpl.java | 8 +- 26 files changed, 145 insertions(+), 271 deletions(-) delete mode 100644 lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/rest/UserAreaController.java delete mode 100644 lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/UserAreaService.java delete mode 100644 lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/UserAreaServiceImpl.java diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/ivt/service/impl/StPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/ivt/service/impl/StPointIvtServiceImpl.java index 1361a55..9515976 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/ivt/service/impl/StPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/ivt/service/impl/StPointIvtServiceImpl.java @@ -18,7 +18,7 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.WqlUtil; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; @@ -39,12 +39,12 @@ public class StPointIvtServiceImpl implements StPointIvtService { @Autowired private SurfaceTask surfaceTask; - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map whereJson, Pageable page) { //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); JSONObject map = new JSONObject(); map.put("flag", "1"); if (!ObjectUtil.isNull(whereJson.get("point_code"))) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/IUserAreaPermissionService.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/IUserAreaPermissionService.java index 3c180c8..401e033 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/IUserAreaPermissionService.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/IUserAreaPermissionService.java @@ -40,4 +40,8 @@ public interface IUserAreaPermissionService extends IService * @param whereJson / */ void save(JSONObject whereJson); + + + String getInArea(); + } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/impl/UserAreaPermissionServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/impl/UserAreaPermissionServiceImpl.java index 37df594..2360955 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/impl/UserAreaPermissionServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/impl/UserAreaPermissionServiceImpl.java @@ -8,7 +8,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.nl.common.domain.query.PageQuery; +import org.nl.common.utils.SecurityUtils; import org.nl.modules.common.exception.BadRequestException; +import org.nl.modules.wql.core.bean.WQLObject; import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.basedata.st.areapermissions.service.dao.UserAreaPermission; import org.nl.wms.basedata.st.areapermissions.service.dao.mapper.UserAreaPermissionMapper; @@ -66,4 +68,40 @@ public class UserAreaPermissionServiceImpl extends ServiceImpl query(@RequestParam Map whereJson, Pageable page) { - return new ResponseEntity<>(userAreaService.pageQuery(whereJson, page), HttpStatus.OK); - } - - @PostMapping("/queryUserArea") - @Log("查询用户对应区域") - - public ResponseEntity queryUserArea(@RequestBody JSONObject whereJson) { - return new ResponseEntity<>(userAreaService.queryUserArea(whereJson), HttpStatus.OK); - } - - @PostMapping("/save") - @Log("保存用户仓库信息") - - public ResponseEntity save(@RequestBody JSONObject whereJson) { - userAreaService.save(whereJson); - return new ResponseEntity<>(HttpStatus.OK); - } - -} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/UserAreaService.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/UserAreaService.java deleted file mode 100644 index bcbd36f..0000000 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/UserAreaService.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.nl.wms.basedata.st.service; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.springframework.data.domain.Pageable; - -import java.util.Map; - -public interface UserAreaService { - /** - * 查询数据分页 - * - * @param whereJson 条件 - * @param page 分页参数 - * @return Map - */ - Map pageQuery(Map whereJson, Pageable page); - - /** - * 查询用户对应仓库 - * - * @param whereJson / - */ - JSONArray queryUserArea(JSONObject whereJson); - - /** - * 保存 - * - * @param whereJson / - */ - void save(JSONObject whereJson); - -} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/UserAreaServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/UserAreaServiceImpl.java deleted file mode 100644 index 659553f..0000000 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/UserAreaServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.nl.wms.basedata.st.service.impl; - -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.nl.common.utils.SecurityUtils; -import org.nl.modules.wql.WQL; -import org.nl.modules.wql.core.bean.WQLObject; -import org.nl.modules.wql.util.WqlUtil; -import org.nl.wms.basedata.st.service.UserAreaService; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; - -import java.util.HashMap; -import java.util.Map; - -/** - * PC端出入库新增 - */ -@Service -@RequiredArgsConstructor -@Slf4j -public class UserAreaServiceImpl implements UserAreaService { - - @Override - public Map pageQuery(Map whereJson, Pageable page) { - HashMap map = new HashMap<>(whereJson); - map.put("flag", "3"); - if (StrUtil.isNotEmpty(map.get("blurry"))) { - map.put("blurry", "%" + map.get("blurry") + "%"); - } - JSONObject jo = WQL.getWO("QST_STOR_ATTR").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "username desc"); - return jo; - } - - @Override - public JSONArray queryUserArea(JSONObject whereJson) { - String user_id = whereJson.getString("user_id"); - JSONArray rows = WQLObject.getWQLObject("st_ivt_userarea").query("user_id = '" + user_id + "'").getResultJSONArray(0); - return rows; - } - - @Override - public void save(JSONObject whereJson) { - JSONObject jo = whereJson.getJSONObject("jo"); - JSONArray rows = whereJson.getJSONArray("rows"); - - String user_id = jo.getString("user_id"); - - WQLObject.getWQLObject("st_ivt_userarea").delete("user_id ='" + user_id + "'"); - for (int i = 0; i < rows.size(); i++) { - JSONObject row = rows.getJSONObject(i); - String product_area = row.getString("product_area"); - JSONObject user_stor = new JSONObject(); - user_stor.put("product_area", product_area); - user_stor.put("user_id", user_id); - WQLObject.getWQLObject("st_ivt_userarea").insert(user_stor); - } - } - - public String getInArea() { - String currentUserId = SecurityUtils.getCurrentUserId().toString(); - WQLObject userStorTab = WQLObject.getWQLObject("st_ivt_userarea"); - - JSONArray userStorArr = userStorTab.query("user_id = '" + currentUserId + "'").getResultJSONArray(0); - int size = userStorArr.size(); - // 将仓库id拼成字符串 - String in_stor_id = ""; - - for (int i = 0; i < userStorArr.size(); i++) { - JSONObject json = userStorArr.getJSONObject(i); - - if (size == 1) { - // 如果只有一条记录 - in_stor_id = "('" + json.getString("product_area") + "')"; - } else { - if (i == 0) { - // 第一条记录拼接 - in_stor_id = "('" + json.getString("product_area") + "','"; - } else { - if ((size - 1) == i) { - // 最后一条记录拼接 - in_stor_id += json.getString("product_area") + "')"; - } else { - in_stor_id += json.getString("product_area") + "','"; - } - } - } - } - - if (ObjectUtil.isEmpty(in_stor_id)) { - in_stor_id = "('')"; - } - return in_stor_id; - } - -} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java index cf94498..6d2c79b 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java @@ -17,8 +17,7 @@ import org.nl.common.utils.CodeUtil; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; -import org.nl.system.service.param.impl.SysParamServiceImpl; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl; import org.nl.wms.pda.mps.eum.RegionTypeEnum; import org.nl.wms.pda.mps.service.BakingService; @@ -38,7 +37,8 @@ public class BakingServiceImpl implements BakingService { @Autowired private RedisUtils redisUtils; - + @Autowired + IUserAreaPermissionService userAreaPermissionService; /* * 业务流程: * 入烤箱: @@ -75,8 +75,7 @@ public class BakingServiceImpl implements BakingService { WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase"); //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); // 入箱 if (StrUtil.equals(option, "1")) { // 母卷号 @@ -622,8 +621,7 @@ public class BakingServiceImpl implements BakingService { String container_name = whereJson.getString("container_name"); //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isEmpty(point_code1)) { throw new BadRequestException("点位不能为空"); @@ -814,8 +812,7 @@ public class BakingServiceImpl implements BakingService { } //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); JSONObject jsonCool = coolIvtTab.query("full_point_code = '" + point_code + "'").uniqueResult(0); if (ObjectUtil.isEmpty(jsonCool)) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java index 7fbbb02..62255ff 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java @@ -17,7 +17,7 @@ import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; import org.nl.wms.basedata.master.storagevehicleinfo.service.StoragevehicleinfoService; import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleinfo; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.pda.mps.service.CasingService; @@ -36,6 +36,8 @@ public class CasingServiceImpl implements CasingService { StoragevehicleinfoService storagevehicleinfoService; @Autowired private InterfaceBackMapper interfaceBackMapper; + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) { String product_area = whereJson.getString("product_area"); @@ -58,8 +60,7 @@ public class CasingServiceImpl implements CasingService { map.put("container_name", container_name); } //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/FeedingServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/FeedingServiceImpl.java index f8b39ce..da30f55 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/FeedingServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/FeedingServiceImpl.java @@ -17,7 +17,7 @@ import org.nl.modules.wql.core.content.HttpContext; import org.nl.modules.wql.util.SpringContextHolder; import org.nl.wms.basedata.master.unit.service.dao.Unit; import org.nl.wms.basedata.master.unit.service.dao.mapper.UnitMapper; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.ext.acs.service.WmsToAcsService; import org.nl.wms.pda.mps.eum.RegionTypeEnum; import org.nl.wms.pda.mps.service.FeedingService; @@ -39,6 +39,8 @@ public class FeedingServiceImpl implements FeedingService { private final CheckOutBillService checkOutBillService; @Autowired private UnitMapper unitMapper; + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) { String product_area = whereJson.getString("product_area"); @@ -57,8 +59,7 @@ public class FeedingServiceImpl implements FeedingService { map.put("source_container_name", source_container_name); } //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); } @@ -244,8 +245,7 @@ public class FeedingServiceImpl implements FeedingService { throw new BadRequestException("请输入或者扫描冷却区满轴位的点位!"); } else { //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (!in_area_id.contains(cool_jo.getString("product_area"))) { throw new BadRequestException("当前登录人员暂无【" + cool_jo.getString("product_area") + "】操作权限"); } @@ -279,8 +279,7 @@ public class FeedingServiceImpl implements FeedingService { throw new BadRequestException("请输入或者扫描冷却区满轴位的点位做为起点!"); } else { //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (!in_area_id.contains(cool_jo.getString("product_area"))) { throw new BadRequestException("当前登录人员暂无【" + cool_jo.getString("product_area") + "】操作权限"); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/InServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/InServiceImpl.java index dc9b28f..4f19f19 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/InServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/InServiceImpl.java @@ -9,11 +9,12 @@ import lombok.extern.slf4j.Slf4j; import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pda.mps.service.InService; import org.nl.wms.sch.manage.TaskStatusEnum; import org.nl.wms.sch.tasks.CutConveyorTask; import org.nl.wms.sch.tasks.CutTrussTask; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -25,7 +26,8 @@ import java.util.HashMap; public class InServiceImpl implements InService { private final CutTrussTask cutTrussTask; - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject queryMaterialInfo(JSONObject whereJson) { String product_area = whereJson.getString("product_area"); @@ -40,8 +42,7 @@ public class InServiceImpl implements InService { map.put("device_code", device_code); } //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/OutServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/OutServiceImpl.java index de53cbe..674df6a 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/OutServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/OutServiceImpl.java @@ -9,11 +9,12 @@ import lombok.extern.slf4j.Slf4j; import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pda.mps.service.OutService; import org.nl.wms.sch.manage.TaskStatusEnum; import org.nl.wms.sch.tasks.CutConveyorTask; import org.nl.wms.sch.tasks.CutTrussTask; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -25,7 +26,8 @@ import java.util.HashMap; public class OutServiceImpl implements OutService { private final CutTrussTask cutTrussTask; - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject queryMaterialInfo(JSONObject whereJson) { String product_area = whereJson.getString("product_area"); @@ -40,8 +42,7 @@ public class OutServiceImpl implements OutService { map.put("device_code", device_code); } //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PaperTubeServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PaperTubeServiceImpl.java index 6032ebb..f905635 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PaperTubeServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PaperTubeServiceImpl.java @@ -9,9 +9,10 @@ import lombok.extern.slf4j.Slf4j; import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.ext.acs.service.WmsToAcsService; import org.nl.wms.pda.mps.service.PaperTubeService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.HashMap; @@ -22,7 +23,8 @@ import java.util.HashMap; public class PaperTubeServiceImpl implements PaperTubeService { private final WmsToAcsService wmsToAcsService; - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject queryDeviceList(JSONObject whereJson) { String product_area = whereJson.getString("product_area"); @@ -42,8 +44,7 @@ public class PaperTubeServiceImpl implements PaperTubeService { public JSONObject PaperDeviceOperate(JSONObject whereJson) { String option = whereJson.getString("option"); //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if ("1".equals(option)) { String device_code = whereJson.getString("device_code"); String material_code = whereJson.getString("material_code"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java index 908a55e..ee04fb3 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java @@ -14,13 +14,14 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.content.HttpContext; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.ext.acs.service.AcsToWmsService; import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl; import org.nl.wms.pda.mps.eum.RegionTypeEnum; import org.nl.wms.pda.mps.service.RawFoilService; import org.nl.wms.sch.service.PointService; import org.nl.wms.sch.tasks.CallEmpReelTask; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -32,7 +33,8 @@ import java.util.Date; public class RawFoilServiceImpl implements RawFoilService { private final AcsToWmsService acsToWmsService; private final PointService pointService; - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject queryProductArea() { JSONObject map = new JSONObject(); @@ -51,8 +53,7 @@ public class RawFoilServiceImpl implements RawFoilService { String product_area = whereJson.getString("product_area"); //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); JSONArray resultArr = new JSONArray(); JSONObject map = new JSONObject(); @@ -124,8 +125,7 @@ public class RawFoilServiceImpl implements RawFoilService { map.put("point_code", whereJson.getString("point_code")); map.put("container_name", whereJson.getString("container_name")); //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java index e414839..9a1dc4e 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java @@ -12,7 +12,7 @@ import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pda.mps.service.ShippingService; import org.nl.wms.sch.tasks.CutConveyorTask; import org.springframework.beans.factory.annotation.Autowired; @@ -29,6 +29,8 @@ public class ShippingServiceImpl implements ShippingService { private final CutConveyorTask cutConveyorTask; @Autowired private InterfaceBackMapper interfaceBackMapper; + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject queryMaterialInfo(JSONObject whereJson) { String product_area = whereJson.getString("product_area"); @@ -47,8 +49,7 @@ public class ShippingServiceImpl implements ShippingService { map.put("device_code", device_code); } //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolInServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolInServiceImpl.java index 3a8c5cb..e03b39b 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolInServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolInServiceImpl.java @@ -12,8 +12,9 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.content.HttpContext; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pda.st.service.CoolInService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -26,7 +27,8 @@ import org.springframework.transaction.annotation.Transactional; @RequiredArgsConstructor @Slf4j public class CoolInServiceImpl implements CoolInService { - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject coolIOQuery(JSONObject whereJson, HttpContext ctx) { String container_name = whereJson.getString("container_name"); @@ -38,8 +40,7 @@ public class CoolInServiceImpl implements CoolInService { } //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolOutServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolOutServiceImpl.java index cb48f05..d5548e6 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolOutServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolOutServiceImpl.java @@ -9,8 +9,9 @@ import lombok.extern.slf4j.Slf4j; import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pda.st.service.CoolOutService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -24,7 +25,8 @@ import org.springframework.transaction.annotation.Transactional; @Slf4j public class CoolOutServiceImpl implements CoolOutService { - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject coolIOQuery(JSONObject whereJson) { JSONObject map = new JSONObject(); @@ -33,8 +35,7 @@ public class CoolOutServiceImpl map.put("product_area", whereJson.getString("product_area")); //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/task/service/impl/PdaTaskServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/task/service/impl/PdaTaskServiceImpl.java index 8487fc6..3f0daed 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/task/service/impl/PdaTaskServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/task/service/impl/PdaTaskServiceImpl.java @@ -11,10 +11,11 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.SpringContextHolder; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.ext.acs.service.WmsToAcsService; import org.nl.wms.pda.task.service.PdaTaskService; import org.nl.wms.sch.service.TaskService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -27,8 +28,10 @@ import org.springframework.transaction.annotation.Transactional; @RequiredArgsConstructor @Slf4j public class PdaTaskServiceImpl implements PdaTaskService { - private final WmsToAcsService wmsToAcsService; - + @Autowired + private WmsToAcsService wmsToAcsService; + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public JSONObject taskQuery(JSONObject whereJson) { String search = whereJson.getString("search"); @@ -39,8 +42,7 @@ public class PdaTaskServiceImpl implements PdaTaskService { map.put("search", "%" + search + "%"); } //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java index 38251e9..a2d6164 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java @@ -21,9 +21,8 @@ import org.nl.modules.wql.util.WqlUtil; import org.nl.system.service.param.impl.SysParamServiceImpl; import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.ext.mes.service.LmsToMesService; -import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.pdm.ivt.service.CoolPointIvtService; import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto; import org.springframework.beans.factory.annotation.Autowired; @@ -46,12 +45,13 @@ import java.util.Map; public class CoolPointIvtServiceImpl implements CoolPointIvtService { @Autowired private InterfaceBackMapper interfaceBackMapper; + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map whereJson, Pageable page) { //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); HashMap map = new HashMap(); map.put("flag", "1"); if (whereJson.get("point_code") != null) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CutPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CutPointIvtServiceImpl.java index 526b58f..ffe9584 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CutPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CutPointIvtServiceImpl.java @@ -14,9 +14,10 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.WqlUtil; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pdm.ivt.service.CutPointIvtService; import org.nl.wms.pdm.ivt.service.dto.CutPointIvtDto; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -34,12 +35,12 @@ import java.util.Map; @RequiredArgsConstructor @Slf4j public class CutPointIvtServiceImpl implements CutPointIvtService { - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map whereJson, Pageable page) { //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); HashMap map = new HashMap(); map.put("flag", "1"); if (whereJson.get("point_code") != null) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/DeliveryPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/DeliveryPointIvtServiceImpl.java index 04d1d1b..68ecd36 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/DeliveryPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/DeliveryPointIvtServiceImpl.java @@ -14,9 +14,10 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.WqlUtil; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pdm.ivt.service.DeliveryPointIvtService; import org.nl.wms.pdm.ivt.service.dto.DeliveryPointIvtDto; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -33,12 +34,12 @@ import java.util.Map; @RequiredArgsConstructor @Slf4j public class DeliveryPointIvtServiceImpl implements DeliveryPointIvtService { - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map whereJson, Pageable page) { //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); JSONObject map = new JSONObject(); map.put("flag", "1"); if (!ObjectUtil.isNull(whereJson.get("point_code"))) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java index 30e912b..e07d2be 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java @@ -21,9 +21,8 @@ import org.nl.modules.wql.util.WqlUtil; import org.nl.system.service.param.impl.SysParamServiceImpl; import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.ext.mes.service.LmsToMesService; -import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.pdm.ivt.service.HotPointIvtService; import org.nl.wms.pdm.ivt.service.dto.HotPointIvtDto; import org.springframework.beans.factory.annotation.Autowired; @@ -48,12 +47,12 @@ public class HotPointIvtServiceImpl implements HotPointIvtService { private InterfaceBackMapper interfaceBackMapper; @Autowired private RedisUtils redisUtils; - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map whereJson, Pageable page) { //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); HashMap map = new HashMap(); map.put("flag", "1"); if (whereJson.get("point_code") != null) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/PackagePointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/PackagePointIvtServiceImpl.java index 7fafae9..22a8bfc 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/PackagePointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/PackagePointIvtServiceImpl.java @@ -14,9 +14,10 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.WqlUtil; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pdm.ivt.service.PackagePointIvtService; import org.nl.wms.pdm.ivt.service.dto.PackagePointIvtDto; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -33,12 +34,12 @@ import java.util.Map; @RequiredArgsConstructor @Slf4j public class PackagePointIvtServiceImpl implements PackagePointIvtService { - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map whereJson, Pageable page) { //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); JSONObject map = new JSONObject(); map.put("flag", "1"); if (!ObjectUtil.isNull(whereJson.get("point_code"))) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/SbPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/SbPointIvtServiceImpl.java index edc370d..85932d7 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/SbPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/SbPointIvtServiceImpl.java @@ -14,9 +14,10 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.WqlUtil; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pdm.ivt.service.SbPointIvtService; import org.nl.wms.pdm.ivt.service.dto.SbPointIvtDto; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -33,12 +34,12 @@ import java.util.Map; @RequiredArgsConstructor @Slf4j public class SbPointIvtServiceImpl implements SbPointIvtService { - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map whereJson, Pageable page) { //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); JSONObject map = new JSONObject(); map.put("flag", "1"); if (!ObjectUtil.isNull(whereJson.get("point_code"))) { diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/RawfoilworkorderServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/RawfoilworkorderServiceImpl.java index 668db55..0e5e5a4 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/RawfoilworkorderServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/RawfoilworkorderServiceImpl.java @@ -15,9 +15,10 @@ import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.WqlUtil; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.pdm.service.RawfoilworkorderService; import org.nl.wms.pdm.service.dto.RawfoilworkorderDto; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -34,7 +35,8 @@ import java.util.Map; @RequiredArgsConstructor @Slf4j public class RawfoilworkorderServiceImpl implements RawfoilworkorderService { - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map whereJson, Pageable page) { String product_area = MapUtil.getStr(whereJson, "product_area"); @@ -45,8 +47,7 @@ public class RawfoilworkorderServiceImpl implements RawfoilworkorderService { String end_time = MapUtil.getStr(whereJson, "end_time"); //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); JSONObject map = new JSONObject(); map.put("flag", "1"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java index e39fc17..2cd654d 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java @@ -19,7 +19,7 @@ import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.util.WqlUtil; import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.pdm.service.SlittingproductionplanService; import org.nl.wms.pdm.service.dto.SlittingproductionplanDto; @@ -45,6 +45,8 @@ public class SlittingproductionplanServiceImpl implements Slittingproductionplan private final LmsToMesService lmsToMesService; @Autowired private InterfaceBackMapper interfaceBackMapper; + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map whereJson, Pageable page) { String order_type = MapUtil.getStr(whereJson, "order_type"); @@ -62,8 +64,7 @@ public class SlittingproductionplanServiceImpl implements Slittingproductionplan String end_time = MapUtil.getStr(whereJson, "end_time"); //获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); JSONObject map = new JSONObject(); map.put("flag", "1"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/TaskServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/TaskServiceImpl.java index a7b173e..5bbe3d3 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/TaskServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/TaskServiceImpl.java @@ -19,7 +19,7 @@ import org.nl.modules.wql.util.SpringContextHolder; import org.nl.modules.wql.util.WqlUtil; import org.nl.wms.basedata.master.classstandard.service.dao.ClassStandard; import org.nl.wms.basedata.master.classstandard.service.dao.mapper.ClassStandardMapper; -import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; +import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; import org.nl.wms.sch.manage.TaskStatusEnum; import org.nl.wms.sch.service.TaskService; import org.redisson.api.RLock; @@ -48,7 +48,8 @@ public class TaskServiceImpl implements TaskService { private final RedissonClient redissonClient; @Autowired private ClassStandardMapper classStandardMapper; - + @Autowired + IUserAreaPermissionService userAreaPermissionService; @Override public Map queryAll(Map form, Pageable page) { @@ -98,8 +99,7 @@ public class TaskServiceImpl implements TaskService { map.put("is_delete", whereJson.getString("is_delete")); } // 获取人员对应的区域 - UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); - String in_area_id = userAreaService.getInArea(); + String in_area_id = userAreaPermissionService.getInArea(); if (ObjectUtil.isNotEmpty(in_area_id)) { map.put("in_area_id", in_area_id); }