Browse Source

opt:区域人员表相关代码替换

master
zds 4 weeks ago
parent
commit
5f2e8454ed
  1. 8
      lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/ivt/service/impl/StPointIvtServiceImpl.java
  2. 4
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/IUserAreaPermissionService.java
  3. 38
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/impl/UserAreaPermissionServiceImpl.java
  4. 45
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/rest/UserAreaController.java
  5. 33
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/UserAreaService.java
  6. 100
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/UserAreaServiceImpl.java
  7. 15
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java
  8. 7
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/CasingServiceImpl.java
  9. 13
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/FeedingServiceImpl.java
  10. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/InServiceImpl.java
  11. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/OutServiceImpl.java
  12. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/PaperTubeServiceImpl.java
  13. 12
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java
  14. 7
      lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/ShippingServiceImpl.java
  15. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolInServiceImpl.java
  16. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/CoolOutServiceImpl.java
  17. 12
      lms/nladmin-system/src/main/java/org/nl/wms/pda/task/service/impl/PdaTaskServiceImpl.java
  18. 8
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CoolPointIvtServiceImpl.java
  19. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/CutPointIvtServiceImpl.java
  20. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/DeliveryPointIvtServiceImpl.java
  21. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/HotPointIvtServiceImpl.java
  22. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/PackagePointIvtServiceImpl.java
  23. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/service/impl/SbPointIvtServiceImpl.java
  24. 9
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/RawfoilworkorderServiceImpl.java
  25. 7
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/SlittingproductionplanServiceImpl.java
  26. 8
      lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/TaskServiceImpl.java

8
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil; 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.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -39,12 +39,12 @@ public class StPointIvtServiceImpl implements StPointIvtService {
@Autowired @Autowired
private SurfaceTask surfaceTask; private SurfaceTask surfaceTask;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("flag", "1"); map.put("flag", "1");
if (!ObjectUtil.isNull(whereJson.get("point_code"))) { if (!ObjectUtil.isNull(whereJson.get("point_code"))) {

4
lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/areapermissions/service/IUserAreaPermissionService.java

@ -40,4 +40,8 @@ public interface IUserAreaPermissionService extends IService<UserAreaPermission>
* @param whereJson / * @param whereJson /
*/ */
void save(JSONObject whereJson); void save(JSONObject whereJson);
String getInArea();
} }

38
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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.nl.common.domain.query.PageQuery; import org.nl.common.domain.query.PageQuery;
import org.nl.common.utils.SecurityUtils;
import org.nl.modules.common.exception.BadRequestException; 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.IUserAreaPermissionService;
import org.nl.wms.basedata.st.areapermissions.service.dao.UserAreaPermission; import org.nl.wms.basedata.st.areapermissions.service.dao.UserAreaPermission;
import org.nl.wms.basedata.st.areapermissions.service.dao.mapper.UserAreaPermissionMapper; import org.nl.wms.basedata.st.areapermissions.service.dao.mapper.UserAreaPermissionMapper;
@ -66,4 +68,40 @@ public class UserAreaPermissionServiceImpl extends ServiceImpl<UserAreaPermissio
} }
this.saveBatch(list); this.saveBatch(list);
} }
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;
}
} }

45
lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/rest/UserAreaController.java

@ -1,45 +0,0 @@
package org.nl.wms.basedata.st.rest;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.logging.annotation.Log;
import org.nl.wms.basedata.st.service.UserAreaService;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/userArea2")
@Slf4j
public class UserAreaController {
private final UserAreaService userAreaService;
@GetMapping
@Log("查询用户信息")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(userAreaService.pageQuery(whereJson, page), HttpStatus.OK);
}
@PostMapping("/queryUserArea")
@Log("查询用户对应区域")
public ResponseEntity<Object> queryUserArea(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(userAreaService.queryUserArea(whereJson), HttpStatus.OK);
}
@PostMapping("/save")
@Log("保存用户仓库信息")
public ResponseEntity<Object> save(@RequestBody JSONObject whereJson) {
userAreaService.save(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
}

33
lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/UserAreaService.java

@ -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<String, Object>
*/
Map<String, Object> pageQuery(Map whereJson, Pageable page);
/**
* 查询用户对应仓库
*
* @param whereJson /
*/
JSONArray queryUserArea(JSONObject whereJson);
/**
* 保存
*
* @param whereJson /
*/
void save(JSONObject whereJson);
}

100
lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/service/impl/UserAreaServiceImpl.java

@ -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<String, Object> pageQuery(Map whereJson, Pageable page) {
HashMap<String, String> 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;
}
}

15
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.SpringContextHolder; import org.nl.modules.wql.util.SpringContextHolder;
import org.nl.system.service.param.impl.SysParamServiceImpl; import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService;
import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl;
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl; import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
import org.nl.wms.pda.mps.eum.RegionTypeEnum; import org.nl.wms.pda.mps.eum.RegionTypeEnum;
import org.nl.wms.pda.mps.service.BakingService; import org.nl.wms.pda.mps.service.BakingService;
@ -38,7 +37,8 @@ public class BakingServiceImpl implements BakingService {
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
/* /*
* 业务流程 * 业务流程
* 入烤箱 * 入烤箱
@ -75,8 +75,7 @@ public class BakingServiceImpl implements BakingService {
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase"); WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
// 入箱 // 入箱
if (StrUtil.equals(option, "1")) { if (StrUtil.equals(option, "1")) {
// 母卷号 // 母卷号
@ -622,8 +621,7 @@ public class BakingServiceImpl implements BakingService {
String container_name = whereJson.getString("container_name"); String container_name = whereJson.getString("container_name");
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isEmpty(point_code1)) { if (ObjectUtil.isEmpty(point_code1)) {
throw new BadRequestException("点位不能为空"); throw new BadRequestException("点位不能为空");
@ -814,8 +812,7 @@ public class BakingServiceImpl implements BakingService {
} }
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
JSONObject jsonCool = coolIvtTab.query("full_point_code = '" + point_code + "'").uniqueResult(0); JSONObject jsonCool = coolIvtTab.query("full_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonCool)) { if (ObjectUtil.isEmpty(jsonCool)) {

7
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.interfaceback.service.dao.mapper.InterfaceBackMapper;
import org.nl.wms.basedata.master.storagevehicleinfo.service.StoragevehicleinfoService; import org.nl.wms.basedata.master.storagevehicleinfo.service.StoragevehicleinfoService;
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleinfo; 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.acs.service.impl.WmsToAcsServiceImpl;
import org.nl.wms.ext.mes.service.LmsToMesService; import org.nl.wms.ext.mes.service.LmsToMesService;
import org.nl.wms.pda.mps.service.CasingService; import org.nl.wms.pda.mps.service.CasingService;
@ -36,6 +36,8 @@ public class CasingServiceImpl implements CasingService {
StoragevehicleinfoService storagevehicleinfoService; StoragevehicleinfoService storagevehicleinfoService;
@Autowired @Autowired
private InterfaceBackMapper interfaceBackMapper; private InterfaceBackMapper interfaceBackMapper;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) { public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) {
String product_area = whereJson.getString("product_area"); String product_area = whereJson.getString("product_area");
@ -58,8 +60,7 @@ public class CasingServiceImpl implements CasingService {
map.put("container_name", container_name); map.put("container_name", container_name);
} }
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }

13
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.modules.wql.util.SpringContextHolder;
import org.nl.wms.basedata.master.unit.service.dao.Unit; 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.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.ext.acs.service.WmsToAcsService;
import org.nl.wms.pda.mps.eum.RegionTypeEnum; import org.nl.wms.pda.mps.eum.RegionTypeEnum;
import org.nl.wms.pda.mps.service.FeedingService; import org.nl.wms.pda.mps.service.FeedingService;
@ -39,6 +39,8 @@ public class FeedingServiceImpl implements FeedingService {
private final CheckOutBillService checkOutBillService; private final CheckOutBillService checkOutBillService;
@Autowired @Autowired
private UnitMapper unitMapper; private UnitMapper unitMapper;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) { public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) {
String product_area = whereJson.getString("product_area"); String product_area = whereJson.getString("product_area");
@ -57,8 +59,7 @@ public class FeedingServiceImpl implements FeedingService {
map.put("source_container_name", source_container_name); map.put("source_container_name", source_container_name);
} }
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }
@ -244,8 +245,7 @@ public class FeedingServiceImpl implements FeedingService {
throw new BadRequestException("请输入或者扫描冷却区满轴位的点位!"); throw new BadRequestException("请输入或者扫描冷却区满轴位的点位!");
} else { } else {
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (!in_area_id.contains(cool_jo.getString("product_area"))) { if (!in_area_id.contains(cool_jo.getString("product_area"))) {
throw new BadRequestException("当前登录人员暂无【" + 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("请输入或者扫描冷却区满轴位的点位做为起点!"); throw new BadRequestException("请输入或者扫描冷却区满轴位的点位做为起点!");
} else { } else {
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (!in_area_id.contains(cool_jo.getString("product_area"))) { if (!in_area_id.contains(cool_jo.getString("product_area"))) {
throw new BadRequestException("当前登录人员暂无【" + cool_jo.getString("product_area") + "】操作权限"); throw new BadRequestException("当前登录人员暂无【" + cool_jo.getString("product_area") + "】操作权限");
} }

9
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.common.exception.BadRequestException;
import org.nl.modules.wql.WQL; import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject; 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.pda.mps.service.InService;
import org.nl.wms.sch.manage.TaskStatusEnum; import org.nl.wms.sch.manage.TaskStatusEnum;
import org.nl.wms.sch.tasks.CutConveyorTask; import org.nl.wms.sch.tasks.CutConveyorTask;
import org.nl.wms.sch.tasks.CutTrussTask; import org.nl.wms.sch.tasks.CutTrussTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -25,7 +26,8 @@ import java.util.HashMap;
public class InServiceImpl implements InService { public class InServiceImpl implements InService {
private final CutTrussTask cutTrussTask; private final CutTrussTask cutTrussTask;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject queryMaterialInfo(JSONObject whereJson) { public JSONObject queryMaterialInfo(JSONObject whereJson) {
String product_area = whereJson.getString("product_area"); String product_area = whereJson.getString("product_area");
@ -40,8 +42,7 @@ public class InServiceImpl implements InService {
map.put("device_code", device_code); map.put("device_code", device_code);
} }
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }

9
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.common.exception.BadRequestException;
import org.nl.modules.wql.WQL; import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject; 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.pda.mps.service.OutService;
import org.nl.wms.sch.manage.TaskStatusEnum; import org.nl.wms.sch.manage.TaskStatusEnum;
import org.nl.wms.sch.tasks.CutConveyorTask; import org.nl.wms.sch.tasks.CutConveyorTask;
import org.nl.wms.sch.tasks.CutTrussTask; import org.nl.wms.sch.tasks.CutTrussTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -25,7 +26,8 @@ import java.util.HashMap;
public class OutServiceImpl implements OutService { public class OutServiceImpl implements OutService {
private final CutTrussTask cutTrussTask; private final CutTrussTask cutTrussTask;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject queryMaterialInfo(JSONObject whereJson) { public JSONObject queryMaterialInfo(JSONObject whereJson) {
String product_area = whereJson.getString("product_area"); String product_area = whereJson.getString("product_area");
@ -40,8 +42,7 @@ public class OutServiceImpl implements OutService {
map.put("device_code", device_code); map.put("device_code", device_code);
} }
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }

9
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.common.exception.BadRequestException;
import org.nl.modules.wql.WQL; import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject; 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.ext.acs.service.WmsToAcsService;
import org.nl.wms.pda.mps.service.PaperTubeService; import org.nl.wms.pda.mps.service.PaperTubeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap; import java.util.HashMap;
@ -22,7 +23,8 @@ import java.util.HashMap;
public class PaperTubeServiceImpl implements PaperTubeService { public class PaperTubeServiceImpl implements PaperTubeService {
private final WmsToAcsService wmsToAcsService; private final WmsToAcsService wmsToAcsService;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject queryDeviceList(JSONObject whereJson) { public JSONObject queryDeviceList(JSONObject whereJson) {
String product_area = whereJson.getString("product_area"); String product_area = whereJson.getString("product_area");
@ -42,8 +44,7 @@ public class PaperTubeServiceImpl implements PaperTubeService {
public JSONObject PaperDeviceOperate(JSONObject whereJson) { public JSONObject PaperDeviceOperate(JSONObject whereJson) {
String option = whereJson.getString("option"); String option = whereJson.getString("option");
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if ("1".equals(option)) { if ("1".equals(option)) {
String device_code = whereJson.getString("device_code"); String device_code = whereJson.getString("device_code");
String material_code = whereJson.getString("material_code"); String material_code = whereJson.getString("material_code");

12
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.core.content.HttpContext; 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.AcsToWmsService;
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl; import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
import org.nl.wms.pda.mps.eum.RegionTypeEnum; import org.nl.wms.pda.mps.eum.RegionTypeEnum;
import org.nl.wms.pda.mps.service.RawFoilService; import org.nl.wms.pda.mps.service.RawFoilService;
import org.nl.wms.sch.service.PointService; import org.nl.wms.sch.service.PointService;
import org.nl.wms.sch.tasks.CallEmpReelTask; import org.nl.wms.sch.tasks.CallEmpReelTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -32,7 +33,8 @@ import java.util.Date;
public class RawFoilServiceImpl implements RawFoilService { public class RawFoilServiceImpl implements RawFoilService {
private final AcsToWmsService acsToWmsService; private final AcsToWmsService acsToWmsService;
private final PointService pointService; private final PointService pointService;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject queryProductArea() { public JSONObject queryProductArea() {
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
@ -51,8 +53,7 @@ public class RawFoilServiceImpl implements RawFoilService {
String product_area = whereJson.getString("product_area"); String product_area = whereJson.getString("product_area");
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
JSONArray resultArr = new JSONArray(); JSONArray resultArr = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
@ -124,8 +125,7 @@ public class RawFoilServiceImpl implements RawFoilService {
map.put("point_code", whereJson.getString("point_code")); map.put("point_code", whereJson.getString("point_code"));
map.put("container_name", whereJson.getString("container_name")); map.put("container_name", whereJson.getString("container_name"));
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }

7
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.modules.wql.core.bean.WQLObject;
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; 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.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.pda.mps.service.ShippingService;
import org.nl.wms.sch.tasks.CutConveyorTask; import org.nl.wms.sch.tasks.CutConveyorTask;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -29,6 +29,8 @@ public class ShippingServiceImpl implements ShippingService {
private final CutConveyorTask cutConveyorTask; private final CutConveyorTask cutConveyorTask;
@Autowired @Autowired
private InterfaceBackMapper interfaceBackMapper; private InterfaceBackMapper interfaceBackMapper;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject queryMaterialInfo(JSONObject whereJson) { public JSONObject queryMaterialInfo(JSONObject whereJson) {
String product_area = whereJson.getString("product_area"); String product_area = whereJson.getString("product_area");
@ -47,8 +49,7 @@ public class ShippingServiceImpl implements ShippingService {
map.put("device_code", device_code); map.put("device_code", device_code);
} }
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }

9
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.core.content.HttpContext; 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.nl.wms.pda.st.service.CoolInService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -26,7 +27,8 @@ import org.springframework.transaction.annotation.Transactional;
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
public class CoolInServiceImpl implements CoolInService { public class CoolInServiceImpl implements CoolInService {
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject coolIOQuery(JSONObject whereJson, HttpContext ctx) { public JSONObject coolIOQuery(JSONObject whereJson, HttpContext ctx) {
String container_name = whereJson.getString("container_name"); String container_name = whereJson.getString("container_name");
@ -38,8 +40,7 @@ public class CoolInServiceImpl implements CoolInService {
} }
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }

9
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.common.exception.BadRequestException;
import org.nl.modules.wql.WQL; import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject; 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.nl.wms.pda.st.service.CoolOutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -24,7 +25,8 @@ import org.springframework.transaction.annotation.Transactional;
@Slf4j @Slf4j
public class CoolOutServiceImpl public class CoolOutServiceImpl
implements CoolOutService { implements CoolOutService {
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject coolIOQuery(JSONObject whereJson) { public JSONObject coolIOQuery(JSONObject whereJson) {
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
@ -33,8 +35,7 @@ public class CoolOutServiceImpl
map.put("product_area", whereJson.getString("product_area")); map.put("product_area", whereJson.getString("product_area"));
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }

12
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.SpringContextHolder; 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.ext.acs.service.WmsToAcsService;
import org.nl.wms.pda.task.service.PdaTaskService; import org.nl.wms.pda.task.service.PdaTaskService;
import org.nl.wms.sch.service.TaskService; import org.nl.wms.sch.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -27,8 +28,10 @@ import org.springframework.transaction.annotation.Transactional;
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
public class PdaTaskServiceImpl implements PdaTaskService { public class PdaTaskServiceImpl implements PdaTaskService {
private final WmsToAcsService wmsToAcsService; @Autowired
private WmsToAcsService wmsToAcsService;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public JSONObject taskQuery(JSONObject whereJson) { public JSONObject taskQuery(JSONObject whereJson) {
String search = whereJson.getString("search"); String search = whereJson.getString("search");
@ -39,8 +42,7 @@ public class PdaTaskServiceImpl implements PdaTaskService {
map.put("search", "%" + search + "%"); map.put("search", "%" + search + "%");
} }
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }

8
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.system.service.param.impl.SysParamServiceImpl;
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; 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.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.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.CoolPointIvtService;
import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto; import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -46,12 +45,13 @@ import java.util.Map;
public class CoolPointIvtServiceImpl implements CoolPointIvtService { public class CoolPointIvtServiceImpl implements CoolPointIvtService {
@Autowired @Autowired
private InterfaceBackMapper interfaceBackMapper; private InterfaceBackMapper interfaceBackMapper;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
HashMap map = new HashMap(); HashMap map = new HashMap();
map.put("flag", "1"); map.put("flag", "1");
if (whereJson.get("point_code") != null) { if (whereJson.get("point_code") != null) {

9
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil; 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.CutPointIvtService;
import org.nl.wms.pdm.ivt.service.dto.CutPointIvtDto; 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.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -34,12 +35,12 @@ import java.util.Map;
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
public class CutPointIvtServiceImpl implements CutPointIvtService { public class CutPointIvtServiceImpl implements CutPointIvtService {
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
HashMap map = new HashMap(); HashMap map = new HashMap();
map.put("flag", "1"); map.put("flag", "1");
if (whereJson.get("point_code") != null) { if (whereJson.get("point_code") != null) {

9
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil; 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.DeliveryPointIvtService;
import org.nl.wms.pdm.ivt.service.dto.DeliveryPointIvtDto; 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.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -33,12 +34,12 @@ import java.util.Map;
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
public class DeliveryPointIvtServiceImpl implements DeliveryPointIvtService { public class DeliveryPointIvtServiceImpl implements DeliveryPointIvtService {
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("flag", "1"); map.put("flag", "1");
if (!ObjectUtil.isNull(whereJson.get("point_code"))) { if (!ObjectUtil.isNull(whereJson.get("point_code"))) {

9
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.system.service.param.impl.SysParamServiceImpl;
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; 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.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.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.HotPointIvtService;
import org.nl.wms.pdm.ivt.service.dto.HotPointIvtDto; import org.nl.wms.pdm.ivt.service.dto.HotPointIvtDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -48,12 +47,12 @@ public class HotPointIvtServiceImpl implements HotPointIvtService {
private InterfaceBackMapper interfaceBackMapper; private InterfaceBackMapper interfaceBackMapper;
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
HashMap map = new HashMap(); HashMap map = new HashMap();
map.put("flag", "1"); map.put("flag", "1");
if (whereJson.get("point_code") != null) { if (whereJson.get("point_code") != null) {

9
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil; 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.PackagePointIvtService;
import org.nl.wms.pdm.ivt.service.dto.PackagePointIvtDto; 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.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -33,12 +34,12 @@ import java.util.Map;
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
public class PackagePointIvtServiceImpl implements PackagePointIvtService { public class PackagePointIvtServiceImpl implements PackagePointIvtService {
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("flag", "1"); map.put("flag", "1");
if (!ObjectUtil.isNull(whereJson.get("point_code"))) { if (!ObjectUtil.isNull(whereJson.get("point_code"))) {

9
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil; 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.SbPointIvtService;
import org.nl.wms.pdm.ivt.service.dto.SbPointIvtDto; 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.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -33,12 +34,12 @@ import java.util.Map;
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
public class SbPointIvtServiceImpl implements SbPointIvtService { public class SbPointIvtServiceImpl implements SbPointIvtService {
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("flag", "1"); map.put("flag", "1");
if (!ObjectUtil.isNull(whereJson.get("point_code"))) { if (!ObjectUtil.isNull(whereJson.get("point_code"))) {

9
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.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil; 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.RawfoilworkorderService;
import org.nl.wms.pdm.service.dto.RawfoilworkorderDto; import org.nl.wms.pdm.service.dto.RawfoilworkorderDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -34,7 +35,8 @@ import java.util.Map;
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
public class RawfoilworkorderServiceImpl implements RawfoilworkorderService { public class RawfoilworkorderServiceImpl implements RawfoilworkorderService {
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
String product_area = MapUtil.getStr(whereJson, "product_area"); 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"); String end_time = MapUtil.getStr(whereJson, "end_time");
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("flag", "1"); map.put("flag", "1");

7
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.modules.wql.util.WqlUtil;
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; 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.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.LmsToMesService;
import org.nl.wms.pdm.service.SlittingproductionplanService; import org.nl.wms.pdm.service.SlittingproductionplanService;
import org.nl.wms.pdm.service.dto.SlittingproductionplanDto; import org.nl.wms.pdm.service.dto.SlittingproductionplanDto;
@ -45,6 +45,8 @@ public class SlittingproductionplanServiceImpl implements Slittingproductionplan
private final LmsToMesService lmsToMesService; private final LmsToMesService lmsToMesService;
@Autowired @Autowired
private InterfaceBackMapper interfaceBackMapper; private InterfaceBackMapper interfaceBackMapper;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
String order_type = MapUtil.getStr(whereJson, "order_type"); 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"); String end_time = MapUtil.getStr(whereJson, "end_time");
//获取人员对应的区域 //获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("flag", "1"); map.put("flag", "1");

8
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.modules.wql.util.WqlUtil;
import org.nl.wms.basedata.master.classstandard.service.dao.ClassStandard; 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.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.manage.TaskStatusEnum;
import org.nl.wms.sch.service.TaskService; import org.nl.wms.sch.service.TaskService;
import org.redisson.api.RLock; import org.redisson.api.RLock;
@ -48,7 +48,8 @@ public class TaskServiceImpl implements TaskService {
private final RedissonClient redissonClient; private final RedissonClient redissonClient;
@Autowired @Autowired
private ClassStandardMapper classStandardMapper; private ClassStandardMapper classStandardMapper;
@Autowired
IUserAreaPermissionService userAreaPermissionService;
@Override @Override
public Map<String, Object> queryAll(Map form, Pageable page) { public Map<String, Object> queryAll(Map form, Pageable page) {
@ -98,8 +99,7 @@ public class TaskServiceImpl implements TaskService {
map.put("is_delete", whereJson.getString("is_delete")); map.put("is_delete", whereJson.getString("is_delete"));
} }
// 获取人员对应的区域 // 获取人员对应的区域
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); String in_area_id = userAreaPermissionService.getInArea();
String in_area_id = userAreaService.getInArea();
if (ObjectUtil.isNotEmpty(in_area_id)) { if (ObjectUtil.isNotEmpty(in_area_id)) {
map.put("in_area_id", in_area_id); map.put("in_area_id", in_area_id);
} }

Loading…
Cancel
Save