fix: 安全工具获取用户信息失败

This commit is contained in:
2023-04-10 15:02:47 +08:00
parent 060616b740
commit 34257df58c
57 changed files with 780 additions and 318 deletions

View File

@@ -0,0 +1,32 @@
package org.nl.common.utils;
import org.nl.utils.SecurityUtils;
/**
* @Author: lyd
* @Description:
* @Date: 2023/4/10
*/
public class UserInfoUtil {
public static Long getCurrentUserId() {
Long currentUserId = -1L;
try {
currentUserId = SecurityUtils.getCurrentUserId();
} catch (Exception e) {
}
return currentUserId;
}
public static String getNickName() {
String nickName = "默认用户";
try {
nickName = SecurityUtils.getNickName();
} catch (Exception e) {
}
return nickName;
}
}

View File

@@ -19,7 +19,7 @@ import java.util.Map;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -85,8 +85,8 @@ public class CribbinginfoServiceImpl implements CribbinginfoService {
@Override
@Transactional(rollbackFor = Exception.class)
public void create(CribbinginfoDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setInfo_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -112,8 +112,8 @@ public class CribbinginfoServiceImpl implements CribbinginfoService {
CribbinginfoDto entity = this.findById(dto.getInfo_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);

View File

@@ -19,7 +19,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -81,8 +81,8 @@ public class CustomerbaseServiceImpl implements CustomerbaseService {
@Override
@Transactional(rollbackFor = Exception.class)
public void create(CustomerbaseDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setCust_id(IdUtil.getSnowflake(1, 1).nextId());
dto.setCreate_id(currentUserId);
@@ -108,8 +108,8 @@ public class CustomerbaseServiceImpl implements CustomerbaseService {
CustomerbaseDto entity = this.findById(dto.getCust_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -129,8 +129,8 @@ public class CustomerbaseServiceImpl implements CustomerbaseService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("md_cs_customerbase");

View File

@@ -23,7 +23,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -98,8 +98,8 @@ public class MaterialServiceImpl implements MaterialService {
@Override
@Transactional(rollbackFor = Exception.class)
public void create(MaterialDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
if (dto.getVehicle_type().equals("1")) {
dto.setVehicle_type("03");
@@ -137,8 +137,8 @@ public class MaterialServiceImpl implements MaterialService {
MaterialDto entity = this.findById(dto.getMaterial_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_optid(currentUserId);
@@ -170,8 +170,8 @@ public class MaterialServiceImpl implements MaterialService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("md_me_material");

View File

@@ -26,7 +26,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
import lombok.extern.slf4j.Slf4j;
@@ -96,8 +96,8 @@ public class MdPbVehicleServiceImpl implements VehicleService {
if (!ObjectUtil.isEmpty(jsonObject)) {
throw new BadRequestException("此载具已存在");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String vehicle_type = (String) map.get("vehicle_type");
@@ -160,8 +160,8 @@ public class MdPbVehicleServiceImpl implements VehicleService {
VehicleDto entity = this.findById(dto.getVehicle_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_optid(currentUserId);
@@ -182,8 +182,8 @@ public class MdPbVehicleServiceImpl implements VehicleService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("md_pb_vehicle");

View File

@@ -20,7 +20,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -82,8 +82,8 @@ public class MeasureunitServiceImpl implements MeasureunitService {
@Override
@Transactional(rollbackFor = Exception.class)
public void create(MeasureunitDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUnit_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -109,8 +109,8 @@ public class MeasureunitServiceImpl implements MeasureunitService {
MeasureunitDto entity = this.findById(dto.getUnit_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -131,8 +131,8 @@ public class MeasureunitServiceImpl implements MeasureunitService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("md_pb_measureunit");

View File

@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.annotation.Log;
import org.nl.annotation.rest.AnonymousPostMapping;
import org.nl.wms.ext.acs.service.AcsToWmsService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -105,7 +106,7 @@ public class AcsToWmsController {
return new ResponseEntity<>(HttpStatus.OK);
}
@PostMapping("/status")
@AnonymousPostMapping("/status")
@Log("ACS给WMS反馈任务状态")
@ApiOperation("ACS给WMS反馈任务状态")
public ResponseEntity<Object> receiveTaskStatusAcs(@RequestBody String material_code) {

View File

@@ -11,7 +11,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.common.KilnUtil;
@@ -424,8 +424,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
groubObj.put("one_qty", jsonObject.get("one_qty"));
groubObj.put("two_qty", jsonObject.get("two_qty"));
groubObj.put("tool_coordinate", jsonObject.get("tool_coordinate"));
groubObj.put("create_id", SecurityUtils.getCurrentUserId());
groubObj.put("create_name", SecurityUtils.getNickName());
groubObj.put("create_id", UserInfoUtil.getCurrentUserId());
groubObj.put("create_name", UserInfoUtil.getNickName());
groubObj.put("create_time", DateUtil.now());
groubObj.put("is_full", is_full);
//去自动码垛还是人工码垛从物料信息里面去取
@@ -490,8 +490,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
JSONObject groupObj = groupTable.query("task_id='" + task_id + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(groupObj)) {
groupObj.put("vehicle_code", vehicle_code);
groupObj.put("update_optid", SecurityUtils.getCurrentUserId());
groupObj.put("update_optname", SecurityUtils.getNickName());
groupObj.put("update_optid", UserInfoUtil.getCurrentUserId());
groupObj.put("update_optname", UserInfoUtil.getNickName());
groupObj.put("update_time", DateUtil.now());
groupTable.update(groupObj);
} else {
@@ -614,8 +614,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
VehicleDto dto = new VehicleDto();
dto.setVehicle_id(IdUtil.getSnowflake(1, 1).nextId());
String vehicle_code = CodeUtil.getNewCode(code);
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setVehicle_code(vehicle_code);
dto.setCreate_id(currentUserId);

View File

@@ -11,7 +11,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.ext.acs.service.WmsToJnService;
import org.nl.wql.WQL;
import org.nl.wql.core.bean.WQLObject;

View File

@@ -11,7 +11,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.service.UserService;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.database.service.MaterialService;
import org.nl.wms.pda.binding.service.PdaBindingService;
import org.nl.wms.pda.exception.PdaRequestException;

View File

@@ -11,7 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.modules.system.service.UserService;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.database.service.MaterialService;
import org.nl.wms.pda.check.service.PdaCheckService;
import org.nl.wms.pda.exception.PdaRequestException;
@@ -105,8 +105,8 @@ public class PdaCheckServiceImpl implements PdaCheckService {
WQLObject checkTable = WQLObject.getWQLObject("st_buss_checkDtl");
WQLObject wo_ivt = WQLObject.getWQLObject("st_ivt_structivt");
WQLObject wo_point = WQLObject.getWQLObject("SCH_BASE_Point");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
for (int i = 0; i < rows.size(); i++) {
JSONObject dtlMap = rows.getJSONObject(i);

View File

@@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl;
import org.nl.wms.pda.checkout.service.CheckOutService;
@@ -84,8 +84,8 @@ public class CheckOutServiceImpl implements CheckOutService {
iosObj.put("create_mode", "01");
iosObj.put("task_id", "");
iosObj.put("remark", "手持人工出库!");
iosObj.put("create_id", SecurityUtils.getCurrentUserId());
iosObj.put("create_name", SecurityUtils.getNickName());
iosObj.put("create_id", UserInfoUtil.getCurrentUserId());
iosObj.put("create_name", UserInfoUtil.getNickName());
iosObj.put("create_time", DateUtil.now());
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").insert(iosObj);
//清除库存

View File

@@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
import org.nl.wms.pda.group.service.GroupService;

View File

@@ -18,7 +18,7 @@ import org.nl.modules.security.service.dto.JwtUserDto;
import org.nl.modules.system.service.UserService;
import org.nl.modules.system.service.dto.UserDto;
import org.nl.utils.RsaUtils;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.pda.exception.PdaRequestException;
import org.nl.wms.pda.login.service.HandLoginService;
import org.springframework.http.HttpStatus;
@@ -129,7 +129,7 @@ public class HandLoginController {
String RfnewPass = MapUtil.getStr(whereJson, "RfnewPass");
String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, RfoldPass);
String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, RfnewPass);
UserDto user = userService.findByName(SecurityUtils.getCurrentUsername());
UserDto user = userService.findByName(UserInfoUtil.getNickName());
if (!passwordEncoder.matches(oldPass, user.getPassword())) {
throw new PdaRequestException("修改失败,旧密码错误");
}

View File

@@ -14,7 +14,7 @@ import org.nl.modules.security.service.dto.JwtUserDto;
import org.nl.modules.system.service.UserService;
import org.nl.modules.system.service.dto.UserDto;
import org.nl.utils.RsaUtils;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.pda.login.service.HandLoginService;
import org.nl.wql.WQL;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -81,7 +81,7 @@ public class HandLoginServiceImpl implements HandLoginService {
@Override
public Map<String, Object> queryAuthority(Map<String, String> jsonObject) {
String accountId = String.valueOf(SecurityUtils.getCurrentUserId());
String accountId = String.valueOf(UserInfoUtil.getCurrentUserId());
JSONObject returnjo = new JSONObject();
if (StrUtil.isEmpty(accountId)) {
returnjo.put("code", "0");

View File

@@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl;
import org.nl.wms.pda.produceTask.service.ProduceTaskService;

View File

@@ -12,7 +12,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.service.UserService;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.database.service.MaterialService;
import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
@@ -120,8 +120,8 @@ public class SendMaterialServiceImpl implements SendMaterialService {
groubObj.put("producetask_id", producetask_id);
groubObj.put("is_autopackage", "1");
groubObj.put("is_full", is_full);
groubObj.put("create_id", SecurityUtils.getCurrentUserId());
groubObj.put("create_name", SecurityUtils.getNickName());
groubObj.put("create_id", UserInfoUtil.getCurrentUserId());
groubObj.put("create_name", UserInfoUtil.getNickName());
groubObj.put("create_time", DateUtil.now());
WQLObject.getWQLObject("st_buss_vehiclegroup").insert(groubObj);

View File

@@ -9,7 +9,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.pda.vehicleStatus.service.VehicleStatusService;
import org.nl.wms.sch.manage.AreaEnum;

View File

@@ -13,7 +13,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.pdm.service.DeviceService;
import org.nl.wms.pdm.service.dto.DeviceDto;
import org.nl.wql.WQL;
@@ -93,8 +93,8 @@ public class DeviceServiceImpl implements DeviceService {
DeviceDto byCode = this.findByCode(workprocedure_code);
if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setDevice_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -125,8 +125,8 @@ public class DeviceServiceImpl implements DeviceService {
throw new BadRequestException("编码已存在!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_optid(currentUserId);
@@ -139,8 +139,8 @@ public class DeviceServiceImpl implements DeviceService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("pdm_base_device");
@@ -163,8 +163,8 @@ public class DeviceServiceImpl implements DeviceService {
@Override
@Transactional(rollbackFor = Exception.class)
public void changeActive(JSONObject json) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String is_used = "1";

View File

@@ -13,7 +13,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.pdm.service.ProducelineService;
import org.nl.wms.pdm.service.dto.LineprocedureDeviceDto;
import org.nl.wms.pdm.service.dto.ProducelineDto;
@@ -92,8 +92,8 @@ public class ProducelineServiceImpl implements ProducelineService {
ProducelineDto byCode = this.findByCode(workprocedure_code);
if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setProduceline_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -125,8 +125,8 @@ public class ProducelineServiceImpl implements ProducelineService {
throw new BadRequestException("编码已存在!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -139,8 +139,8 @@ public class ProducelineServiceImpl implements ProducelineService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline");
@@ -163,8 +163,8 @@ public class ProducelineServiceImpl implements ProducelineService {
@Override
@Transactional(rollbackFor = Exception.class)
public void changeActive(JSONObject json) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String is_used = "1";
@@ -242,8 +242,8 @@ public class ProducelineServiceImpl implements ProducelineService {
JSONArray device_ids = form.getJSONArray("device_id");
WQLObject lineTab = WQLObject.getWQLObject("PDM_BASE_LineProcedureDevice");
JSONObject existObj = lineTab.query("produceline_id = '" + produceline_id + "' and workprocedure_id = '" + workprocedure_id + "'").uniqueResult(0);
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
if (ObjectUtil.isNotEmpty(existObj)) {
lineTab.delete("produceline_id = '" + produceline_id + "' and workprocedure_id = '" + workprocedure_id + "'").uniqueResult(0);
@@ -272,8 +272,8 @@ public class ProducelineServiceImpl implements ProducelineService {
String produceline_id = form.getString("produceline_id");
JSONArray workprocedure_ids = form.getJSONArray("workprocedure_ids");
WQLObject lineTab = WQLObject.getWQLObject("PDM_BASE_LineProcedureDevice");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
//根据选择的工序,遍历添加到产线工序设备表中
for (Object workprocedureId : workprocedure_ids) {

View File

@@ -38,7 +38,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -130,8 +130,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
ProducetaskDto byCode = this.findByCode(producetask_code);
// if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
@@ -172,8 +172,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
throw new BadRequestException("编码已存在!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -218,8 +218,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
@Override
public void copyAdd(JSONObject param) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONObject map = new JSONObject();
map.put("producetask_id", IdUtil.getSnowflake(1, 1).nextId());
@@ -258,8 +258,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
@Override
@Transactional(rollbackFor = Exception.class)
public void sortUpdate(JSONObject param) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("pdm_mg_producetask");
JSONArray rows = param.getJSONArray("rows");
@@ -279,8 +279,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
@Override
@Transactional(rollbackFor = Exception.class)
public void mandFinish(JSONObject param) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String producetask_id = param.getString("producetask_id");
WQLObject wo = WQLObject.getWQLObject("pdm_mg_producetask");
@@ -296,8 +296,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
@Override
@Transactional(rollbackFor = Exception.class)
public void issued(JSONObject param) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String producetask_id = param.getString("producetask_id");
WQLObject wo = WQLObject.getWQLObject("pdm_mg_producetask");
@@ -374,8 +374,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
if (file.isEmpty()) {
throw new BadRequestException("文件为空,请添加数据后重新导入");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
// 1.获取上传文件输入流
InputStream inputStream = null;

View File

@@ -13,7 +13,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.pdm.service.WorkprocedureService;
import org.nl.wms.pdm.service.dto.WorkprocedureDto;
import org.nl.wql.core.bean.ResultBean;
@@ -89,8 +89,8 @@ public class WorkprocedureServiceImpl implements WorkprocedureService {
WorkprocedureDto byCode = this.findByCode(workprocedure_code);
if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setWorkprocedure_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -118,8 +118,8 @@ public class WorkprocedureServiceImpl implements WorkprocedureService {
if (ObjectUtil.isNotEmpty(jsonObject)) {
throw new BadRequestException("编码已存在!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_optid(currentUserId);
@@ -131,8 +131,8 @@ public class WorkprocedureServiceImpl implements WorkprocedureService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("pdm_base_workprocedure");
for (Long workprocedure_id : ids) {
@@ -154,8 +154,8 @@ public class WorkprocedureServiceImpl implements WorkprocedureService {
@Override
@Transactional(rollbackFor = Exception.class)
public void changeActive(JSONObject json) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String is_used = "1";
if (StrUtil.equals("1", json.getString("is_used"))) {

View File

@@ -9,7 +9,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.common.SortingUtil;
@@ -158,8 +158,8 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
WQLObject.getWQLObject("sch_base_point").update(lock_map, "point_code = '" + start_point_code + "'");
//修改任务状态
taskObj.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
taskObj.put("update_optid", SecurityUtils.getCurrentUserId());
taskObj.put("update_optname", SecurityUtils.getNickName());
taskObj.put("update_optid", UserInfoUtil.getCurrentUserId());
taskObj.put("update_optname", UserInfoUtil.getNickName());
taskObj.put("update_time", DateUtil.now());
return;
@@ -256,11 +256,11 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
VehicleDto dto = new VehicleDto();
dto.setVehicle_id(IdUtil.getSnowflake(1, 1).nextId());
dto.setVehicle_code(vehicle_code);
dto.setCreate_id(SecurityUtils.getCurrentUserId());
dto.setCreate_id(UserInfoUtil.getCurrentUserId());
dto.setVehicle_name(vehicle_code);
dto.setCreate_name(SecurityUtils.getNickName());
dto.setUpdate_optid(SecurityUtils.getCurrentUserId());
dto.setUpdate_optname(SecurityUtils.getNickName());
dto.setCreate_name(UserInfoUtil.getNickName());
dto.setUpdate_optid(UserInfoUtil.getCurrentUserId());
dto.setUpdate_optname(UserInfoUtil.getNickName());
dto.setUpdate_time(DateUtil.now());
dto.setCreate_time(DateUtil.now());
dto.setVehicle_type(vehicle_type);
@@ -296,8 +296,8 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
EmptyVehicleObj.put("end_area", nextPoint.getArea_type());
EmptyVehicleObj.put("vehicle_code", vehicle_code);
EmptyVehicleObj.put("task_uuid", task_id);
EmptyVehicleObj.put("create_id", SecurityUtils.getCurrentUserId());
EmptyVehicleObj.put("create_name", SecurityUtils.getNickName());
EmptyVehicleObj.put("create_id", UserInfoUtil.getCurrentUserId());
EmptyVehicleObj.put("create_name", UserInfoUtil.getNickName());
EmptyVehicleObj.put("create_time", DateUtil.now());
EmptyVehicleObj.put("is_delete", "0");
WQLObject.getWQLObject("st_buss_EmptyVehicleRecord").insert(EmptyVehicleObj);
@@ -316,8 +316,8 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
taskObj.put("vehicle_code", vehicle_code);
taskObj.put("handle_class", THIS_CLASS);
taskObj.put("is_auto_issue", is_auto_issue);
taskObj.put("create_name", SecurityUtils.getCurrentUsername());
taskObj.put("create_id", SecurityUtils.getCurrentUserId());
taskObj.put("create_name", UserInfoUtil.getNickName());
taskObj.put("create_id", UserInfoUtil.getCurrentUserId());
taskObj.put("create_time", DateUtil.now());
taskObj.put("is_delete", "0");
taskTable.insert(taskObj);

View File

@@ -8,7 +8,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.common.PointUpdateUtil;
@@ -51,8 +51,8 @@ public class CallMaterialTask extends AbstractAcsTask {
taskTab.update(jsonTask);
HashMap map = new HashMap();
map.put("bill_status", "40");
map.put("update_optid", SecurityUtils.getCurrentUserId());
map.put("update_optname", SecurityUtils.getNickName());
map.put("update_optid", UserInfoUtil.getCurrentUserId());
map.put("update_optname", UserInfoUtil.getNickName());
map.put("update_time", DateUtil.now());
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").update(map, "task_id='" + jsonTask.getString("task_id") + "'");
@@ -70,8 +70,8 @@ public class CallMaterialTask extends AbstractAcsTask {
//审核 加库存可和用数量
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
mstObj.put("bill_status", "50");
mstObj.put("confirm_optid", SecurityUtils.getCurrentUserId());
mstObj.put("confirm_optname", SecurityUtils.getNickName());
mstObj.put("confirm_optid", UserInfoUtil.getCurrentUserId());
mstObj.put("confirm_optname", UserInfoUtil.getNickName());
mstObj.put("confirm_time", DateUtil.now());
mstTab.update(mstObj);
@@ -186,8 +186,8 @@ public class CallMaterialTask extends AbstractAcsTask {
WQLObject.getWQLObject("sch_base_point").update(lock_map, "point_code = '" + inStructObj.getString("struct_code") + "'");
//修改任务状态
taskObj.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
taskObj.put("update_optid", SecurityUtils.getCurrentUserId());
taskObj.put("update_optname", SecurityUtils.getNickName());
taskObj.put("update_optid", UserInfoUtil.getCurrentUserId());
taskObj.put("update_optname", UserInfoUtil.getNickName());
taskObj.put("update_time", DateUtil.now());
taskTab.update(taskObj);
}

View File

@@ -6,7 +6,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.sch.manage.AbstractAcsTask;
import org.nl.wms.sch.manage.AreaEnum;
import org.nl.wms.sch.manage.TaskStatusEnum;
@@ -86,11 +86,11 @@ public class ConveyorTask extends AbstractAcsTask {
taskObj.put("next_area", next_area);
taskObj.put("next_point_code", next_point_code);
taskObj.put("vehicle_code", vehicle_code);
taskObj.put("create_name", SecurityUtils.getNickName());
taskObj.put("create_id", SecurityUtils.getCurrentUserId());
taskObj.put("create_name", UserInfoUtil.getNickName());
taskObj.put("create_id", UserInfoUtil.getCurrentUserId());
taskObj.put("create_time", DateUtil.now());
taskObj.put("update_optid", SecurityUtils.getCurrentUserId());
taskObj.put("update_name", SecurityUtils.getNickName());
taskObj.put("update_optid", UserInfoUtil.getCurrentUserId());
taskObj.put("update_name", UserInfoUtil.getNickName());
taskObj.put("update_time", DateUtil.now());
taskObj.put("handle_class", THIS_CLASS);
//任务基础表【sch_base_task】

View File

@@ -9,7 +9,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl;
@@ -49,8 +49,8 @@ public class FmjToPackIngTask extends AbstractAcsTask {
jsonTask.put("update_time", DateUtil.now());
taskTab.update(jsonTask);
HashMap map = new HashMap();
map.put("update_optid", SecurityUtils.getCurrentUserId());
map.put("update_optname", SecurityUtils.getNickName());
map.put("update_optid", UserInfoUtil.getCurrentUserId());
map.put("update_optname", UserInfoUtil.getNickName());
map.put("update_time", DateUtil.now());
map.put("bill_status", "40");
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").update(map, "task_id='" + jsonTask.getString("task_id") + "'");
@@ -76,8 +76,8 @@ public class FmjToPackIngTask extends AbstractAcsTask {
//审核 加库存可和用数量
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
mstObj.put("bill_status", "50");
mstObj.put("confirm_optid", SecurityUtils.getCurrentUserId());
mstObj.put("confirm_optname", SecurityUtils.getNickName());
mstObj.put("confirm_optid", UserInfoUtil.getCurrentUserId());
mstObj.put("confirm_optname", UserInfoUtil.getNickName());
mstObj.put("confirm_time", DateUtil.now());
mstTab.update(mstObj);
@@ -213,8 +213,8 @@ public class FmjToPackIngTask extends AbstractAcsTask {
taskObj.put("vehicle_code", vehicle_code);
taskObj.put("handle_class", THIS_CLASS);
taskObj.put("is_auto_issue", "1");
taskObj.put("create_name", SecurityUtils.getCurrentUsername());
taskObj.put("create_id", SecurityUtils.getCurrentUserId());
taskObj.put("create_name", UserInfoUtil.getNickName());
taskObj.put("create_id", UserInfoUtil.getCurrentUserId());
taskObj.put("create_time", DateUtil.now());
taskObj.put("is_delete", "0");
taskTable.insert(taskObj);

View File

@@ -7,7 +7,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.sch.manage.AbstractAcsTask;
import org.nl.wms.sch.manage.AreaEnum;
import org.nl.wms.sch.manage.TaskStatusEnum;
@@ -95,11 +95,11 @@ public class RgvTask extends AbstractAcsTask {
taskObj.put("next_area", next_area);
taskObj.put("next_point_code", next_point_code);
taskObj.put("vehicle_code", vehicle_code);
taskObj.put("create_name", SecurityUtils.getNickName());
taskObj.put("create_id", SecurityUtils.getCurrentUserId());
taskObj.put("create_name", UserInfoUtil.getNickName());
taskObj.put("create_id", UserInfoUtil.getCurrentUserId());
taskObj.put("create_time", DateUtil.now());
taskObj.put("update_optid", SecurityUtils.getCurrentUserId());
taskObj.put("update_name", SecurityUtils.getNickName());
taskObj.put("update_optid", UserInfoUtil.getCurrentUserId());
taskObj.put("update_name", UserInfoUtil.getNickName());
taskObj.put("update_time", DateUtil.now());
taskObj.put("handle_class", THIS_CLASS);
//任务基础表【sch_base_task】

View File

@@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.BussConstant;
import org.nl.wms.WorkProcedureEnum;
@@ -176,8 +176,8 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
EmptyVehicleObj.put("end_area", next_area);
EmptyVehicleObj.put("vehicle_code", vehicle_code);
EmptyVehicleObj.put("task_uuid", task_id);
EmptyVehicleObj.put("create_id", SecurityUtils.getCurrentUserId());
EmptyVehicleObj.put("create_name", SecurityUtils.getNickName());
EmptyVehicleObj.put("create_id", UserInfoUtil.getCurrentUserId());
EmptyVehicleObj.put("create_name", UserInfoUtil.getNickName());
EmptyVehicleObj.put("create_time", DateUtil.now());
EmptyVehicleObj.put("is_delete", "0");
WQLObject.getWQLObject("st_buss_EmptyVehicleRecord").insert(EmptyVehicleObj);
@@ -196,8 +196,8 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
taskObj.put("vehicle_code", vehicle_code);
taskObj.put("handle_class", THIS_CLASS);
taskObj.put("is_auto_issue", "1");
taskObj.put("create_name", SecurityUtils.getCurrentUsername());
taskObj.put("create_id", SecurityUtils.getCurrentUserId());
taskObj.put("create_name", UserInfoUtil.getNickName());
taskObj.put("create_id", UserInfoUtil.getCurrentUserId());
taskObj.put("create_time", DateUtil.now());
taskObj.put("is_delete", "0");
taskTable.insert(taskObj);

View File

@@ -6,16 +6,14 @@ 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.UserInfoUtil;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.BussConstant;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.common.StructFindUtil;
import org.nl.wms.ext.acs.service.WmsToJnService;
import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl;
import org.nl.wms.sch.manage.AbstractAcsTask;
import org.nl.wms.sch.manage.AreaEnum;
@@ -56,8 +54,8 @@ public class SendMaterialTask extends AbstractAcsTask {
taskTab.update(jsonTask);
HashMap map = new HashMap();
map.put("update_optid", SecurityUtils.getCurrentUserId());
map.put("update_optname", SecurityUtils.getNickName());
map.put("update_optid", UserInfoUtil.getCurrentUserId());
map.put("update_optname", UserInfoUtil.getNickName());
map.put("update_time", DateUtil.now());
map.put("bill_status", "40");
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").update(map, "task_id='" + jsonTask.getString("task_id") + "'");
@@ -76,8 +74,8 @@ public class SendMaterialTask extends AbstractAcsTask {
//审核 加库存可和用数量
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
mstObj.put("bill_status", "50");
mstObj.put("confirm_optid", SecurityUtils.getCurrentUserId());
mstObj.put("confirm_optname", SecurityUtils.getNickName());
mstObj.put("confirm_optid", UserInfoUtil.getCurrentUserId());
mstObj.put("confirm_optname", UserInfoUtil.getNickName());
mstObj.put("confirm_time", DateUtil.now());
mstTab.update(mstObj);
@@ -185,8 +183,8 @@ public class SendMaterialTask extends AbstractAcsTask {
WQLObject.getWQLObject("sch_base_point").update(lock_map, "point_code = '" + inStructObj.getString("struct_code") + "'");
//修改任务状态
taskObj.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
taskObj.put("update_optid", SecurityUtils.getCurrentUserId());
taskObj.put("update_optname", SecurityUtils.getNickName());
taskObj.put("update_optid", UserInfoUtil.getCurrentUserId());
taskObj.put("update_optname", UserInfoUtil.getNickName());
taskObj.put("update_time", DateUtil.now());
taskTab.update(taskObj);
@@ -324,8 +322,8 @@ public class SendMaterialTask extends AbstractAcsTask {
iosObj.put("create_mode", create_mode);
iosObj.put("task_id", task_id);
iosObj.put("pcsn", pcsn);
iosObj.put("create_id", SecurityUtils.getCurrentUserId());
iosObj.put("create_name", SecurityUtils.getNickName());
iosObj.put("create_id", UserInfoUtil.getCurrentUserId());
iosObj.put("create_name", UserInfoUtil.getNickName());
iosObj.put("create_time", DateUtil.now());
iosObj.put("is_full", is_full);
iosObj.put("vehicle_code", vehicle_code);
@@ -351,8 +349,8 @@ public class SendMaterialTask extends AbstractAcsTask {
taskObj.put("next_area", nextPoint.getArea_type());
taskObj.put("handle_class", THIS_CLASS);
taskObj.put("is_auto_issue", "1");
taskObj.put("create_name", SecurityUtils.getCurrentUsername());
taskObj.put("create_id", SecurityUtils.getCurrentUserId());
taskObj.put("create_name", UserInfoUtil.getNickName());
taskObj.put("create_id", UserInfoUtil.getCurrentUserId());
taskObj.put("create_time", DateUtil.now());
taskObj.put("vehicle_code", vehicle_code);
taskObj.put("is_delete", "0");

View File

@@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.common.StructFindUtil;
import org.nl.wms.sch.manage.AbstractAcsTask;
@@ -48,8 +48,8 @@ public class StructToConveyorTask extends AbstractAcsTask {
jsonTask.put("update_time", DateUtil.now());
taskTab.update(jsonTask);
HashMap map = new HashMap();
map.put("update_optid", SecurityUtils.getCurrentUserId());
map.put("update_optname", SecurityUtils.getNickName());
map.put("update_optid", UserInfoUtil.getCurrentUserId());
map.put("update_optname", UserInfoUtil.getNickName());
map.put("update_time", DateUtil.now());
map.put("bill_status", "40");
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").update(map, "task_id='" + jsonTask.getString("task_id") + "'");
@@ -67,8 +67,8 @@ public class StructToConveyorTask extends AbstractAcsTask {
//审核 加库存可和用数量
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
mstObj.put("bill_status", "50");
mstObj.put("confirm_optid", SecurityUtils.getCurrentUserId());
mstObj.put("confirm_optname", SecurityUtils.getNickName());
mstObj.put("confirm_optid", UserInfoUtil.getCurrentUserId());
mstObj.put("confirm_optname", UserInfoUtil.getNickName());
mstObj.put("confirm_time", DateUtil.now());
mstTab.update(mstObj);
@@ -148,8 +148,8 @@ public class StructToConveyorTask extends AbstractAcsTask {
WQLObject.getWQLObject("sch_base_point").update(lock_map, "point_code = '" + inStructObj.getString("struct_code") + "'");
//修改任务状态
taskObj.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
taskObj.put("update_optid", SecurityUtils.getCurrentUserId());
taskObj.put("update_optname", SecurityUtils.getNickName());
taskObj.put("update_optid", UserInfoUtil.getCurrentUserId());
taskObj.put("update_optname", UserInfoUtil.getNickName());
taskObj.put("update_time", DateUtil.now());
taskTab.update(taskObj);
}
@@ -200,8 +200,8 @@ public class StructToConveyorTask extends AbstractAcsTask {
jo.put("is_autopackage", is_autopackage);
jo.put("pcsn", pcsn);
jo.put("qty", qty);
jo.put("create_id",SecurityUtils.getCurrentUserId());
jo.put("create_name",SecurityUtils.getNickName());
jo.put("create_id",UserInfoUtil.getCurrentUserId());
jo.put("create_name",UserInfoUtil.getNickName());
jo.put("create_time",DateUtil.now());
jo.put("task_id",task_id);
WQLObject groupTable = WQLObject.getWQLObject("st_buss_vehiclegroup");
@@ -226,8 +226,8 @@ public class StructToConveyorTask extends AbstractAcsTask {
taskObj.put("vehicle_code", vehicle_code);
taskObj.put("handle_class", THIS_CLASS);
taskObj.put("is_auto_issue", "1");
taskObj.put("create_name", SecurityUtils.getCurrentUsername());
taskObj.put("create_id", SecurityUtils.getCurrentUserId());
taskObj.put("create_name", UserInfoUtil.getNickName());
taskObj.put("create_id", UserInfoUtil.getCurrentUserId());
taskObj.put("create_time", DateUtil.now());
taskObj.put("is_delete", "0");
taskTable.insert(taskObj);

View File

@@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.BussConstant;
import org.nl.wms.WorkProcedureEnum;
@@ -57,8 +57,8 @@ public class ToConveyorTask extends AbstractAcsTask {
jsonTask.put("update_time", DateUtil.now());
taskTab.update(jsonTask);
HashMap map = new HashMap();
map.put("update_optid", SecurityUtils.getCurrentUserId());
map.put("update_optname", SecurityUtils.getNickName());
map.put("update_optid", UserInfoUtil.getCurrentUserId());
map.put("update_optname", UserInfoUtil.getNickName());
map.put("update_time", DateUtil.now());
map.put("bill_status", "40");
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").update(map, "task_id='" + jsonTask.getString("task_id") + "'");
@@ -150,8 +150,8 @@ public class ToConveyorTask extends AbstractAcsTask {
taskObj.put("vehicle_code", vehicle_code);
taskObj.put("handle_class", THIS_CLASS);
taskObj.put("is_auto_issue", "1");
taskObj.put("create_name", SecurityUtils.getCurrentUsername());
taskObj.put("create_id", SecurityUtils.getCurrentUserId());
taskObj.put("create_name", UserInfoUtil.getNickName());
taskObj.put("create_id", UserInfoUtil.getCurrentUserId());
taskObj.put("create_time", DateUtil.now());
taskObj.put("is_delete", "0");
taskTable.insert(taskObj);

View File

@@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.common.StructFindUtil;
import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl;
@@ -46,8 +46,8 @@ public class ToPackIngTask extends AbstractAcsTask {
jsonTask.put("update_time", DateUtil.now());
taskTab.update(jsonTask);
HashMap map = new HashMap();
map.put("update_optid", SecurityUtils.getCurrentUserId());
map.put("update_optname", SecurityUtils.getNickName());
map.put("update_optid", UserInfoUtil.getCurrentUserId());
map.put("update_optname", UserInfoUtil.getNickName());
map.put("update_time", DateUtil.now());
map.put("bill_status", "40");
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").update(map, "task_id='" + jsonTask.getString("task_id") + "'");
@@ -146,8 +146,8 @@ public class ToPackIngTask extends AbstractAcsTask {
taskObj.put("vehicle_code", vehicle_code);
taskObj.put("handle_class", THIS_CLASS);
taskObj.put("is_auto_issue", "1");
taskObj.put("create_name", SecurityUtils.getCurrentUsername());
taskObj.put("create_id", SecurityUtils.getCurrentUserId());
taskObj.put("create_name", UserInfoUtil.getNickName());
taskObj.put("create_id", UserInfoUtil.getCurrentUserId());
taskObj.put("create_time", DateUtil.now());
taskObj.put("is_delete", "0");
taskTable.insert(taskObj);

View File

@@ -26,7 +26,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
import lombok.extern.slf4j.Slf4j;
@@ -100,8 +100,8 @@ public class PointServiceImpl implements PointService {
PointDto byCode = this.findByCode(point_code);
if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setPoint_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -131,8 +131,8 @@ public class PointServiceImpl implements PointService {
throw new BadRequestException("编码已存在!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -146,8 +146,8 @@ public class PointServiceImpl implements PointService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("sch_base_point");
@@ -179,8 +179,8 @@ public class PointServiceImpl implements PointService {
}
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String is_used = "1";
if (StrUtil.equals("1", json.getString("is_used"))) {
@@ -206,8 +206,8 @@ public class PointServiceImpl implements PointService {
@Transactional(rollbackFor = Exception.class)
public void syncStruct() {
WQLObject.getWQLObject("sch_base_point").delete(" point_type = '02'");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONObject map = new JSONObject();
map.put("flag", "2");

View File

@@ -25,7 +25,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
import lombok.extern.slf4j.Slf4j;
@@ -116,8 +116,8 @@ public class TaskServiceImpl implements TaskService {
@Override
@Transactional(rollbackFor = Exception.class)
public void create(TaskDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setTask_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -139,8 +139,8 @@ public class TaskServiceImpl implements TaskService {
TaskDto entity = this.findById(String.valueOf(dto.getTask_id()));
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -155,8 +155,8 @@ public class TaskServiceImpl implements TaskService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("sch_base_task");

View File

@@ -13,7 +13,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.st.basedata.service.BsrealstorattrService;
import org.nl.wms.st.basedata.service.dto.BsrealstorattrDto;
import org.nl.wql.WQL;
@@ -88,8 +88,8 @@ public class BsrealstorattrServiceImpl implements BsrealstorattrService {
BsrealstorattrDto byCode = this.findByCode(stor_code);
if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setStor_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -120,8 +120,8 @@ public class BsrealstorattrServiceImpl implements BsrealstorattrService {
throw new BadRequestException("编码已存在!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -135,8 +135,8 @@ public class BsrealstorattrServiceImpl implements BsrealstorattrService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_ivt_bsrealstorattr");
@@ -154,8 +154,8 @@ public class BsrealstorattrServiceImpl implements BsrealstorattrService {
@Override
@Transactional(rollbackFor = Exception.class)
public void changeActive(JSONObject json) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String is_used = "1";

View File

@@ -23,7 +23,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
import lombok.extern.slf4j.Slf4j;
@@ -97,8 +97,8 @@ public class IodisstructServiceImpl implements IodisstructService {
dto.setRow_num(new BigDecimal(json.getString("row_seq")));
dto.setCol_num(new BigDecimal(json.getString("col")));
dto.setLayer_num(new BigDecimal(json.getString("layer")));
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setDisrule_uuid(String.valueOf(IdUtil.getSnowflake(1, 1).nextId()));
@@ -131,10 +131,10 @@ public class IodisstructServiceImpl implements IodisstructService {
dto.setCol_num(new BigDecimal(json.getString("col")));
dto.setLayer_num(new BigDecimal(json.getString("layer")));
Long currentUserId = SecurityUtils.getCurrentUserId();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String now = DateUtil.now();
String nickName = SecurityUtils.getNickName();
String nickName = UserInfoUtil.getNickName();
dto.setUpdate_optid(currentUserId);
dto.setUpdate_optname(nickName);
dto.setUpdate_time(now);
@@ -174,8 +174,8 @@ public class IodisstructServiceImpl implements IodisstructService {
@Override
@Transactional(rollbackFor = Exception.class)
public void changeActive(JSONObject json) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String is_used = "1";

View File

@@ -5,7 +5,7 @@ import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import org.nl.exception.BadRequestException;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.st.basedata.service.KilnService;
import org.nl.wql.WQL;
import org.nl.wql.core.bean.WQLObject;
@@ -42,8 +42,8 @@ public class KilnServiceImpl implements KilnService {
@Transactional(rollbackFor = Exception.class)
public void update(JSONObject jsonObject) {
// 基础信息
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
// 公用信息
String stockrecordId = jsonObject.getString("stockrecord_id");

View File

@@ -23,7 +23,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -93,8 +93,8 @@ public class SectattrServiceImpl implements SectattrService {
SectattrDto byCode = this.findByCode(sect_code);
if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setSect_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -124,8 +124,8 @@ public class SectattrServiceImpl implements SectattrService {
throw new BadRequestException("编码已存在!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -139,8 +139,8 @@ public class SectattrServiceImpl implements SectattrService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_ivt_sectattr");
@@ -165,8 +165,8 @@ public class SectattrServiceImpl implements SectattrService {
throw new BadRequestException("该库区所属的仓库已禁用,请先启用该仓库!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String is_used = "1";

View File

@@ -23,7 +23,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
import lombok.extern.slf4j.Slf4j;
@@ -96,8 +96,8 @@ public class StructattrServiceImpl implements StructattrService {
JSONObject jsonObject = pointTab.query("point_code = '" + struct_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonObject)) throw new BadRequestException("点位编码为[" + struct_code + "]不存在!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setStruct_id(jsonObject.getLong("point_id"));
@@ -126,8 +126,8 @@ public class StructattrServiceImpl implements StructattrService {
if (ObjectUtil.isNotEmpty(jsonObject)) {
throw new BadRequestException("编码已存在!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -141,8 +141,8 @@ public class StructattrServiceImpl implements StructattrService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_ivt_structattr");
@@ -166,8 +166,8 @@ public class StructattrServiceImpl implements StructattrService {
if (ObjectUtil.isEmpty(st_ivt_bsRealStorAttr)){
throw new BadRequestException("该仓位所属的库区已禁用,请先启用该库区!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String struct_id = json.getString("struct_id");
String now = DateUtil.now();

View File

@@ -23,7 +23,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -96,8 +96,8 @@ public class StructrelamaterialServiceImpl implements StructrelamaterialService
if (ObjectUtil.isNotEmpty(resultJSONArray)) {
wo.delete("struct_id = '" + struct_id + "'");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONObject map = new JSONObject();
map.put("relation_id", String.valueOf(IdUtil.getSnowflake(1, 1).nextId()));
@@ -115,8 +115,8 @@ public class StructrelamaterialServiceImpl implements StructrelamaterialService
StructrelamaterialDto entity = this.findById(dto.getRelation_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -198,8 +198,8 @@ public class StructrelamaterialServiceImpl implements StructrelamaterialService
public void addStruct(JSONObject param) {
String struct_id = param.getString("struct_id");
WQLObject wo = WQLObject.getWQLObject("st_ivt_structrelamaterial");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONObject map = new JSONObject();
map.put("relation_id", String.valueOf(IdUtil.getSnowflake(1, 1).nextId()));
@@ -224,8 +224,8 @@ public class StructrelamaterialServiceImpl implements StructrelamaterialService
wo.delete("relation_id = '" + relation_id + "'");
}
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONArray materialIds = param.getJSONArray("material_ids");
for (Object materialId : materialIds) {

View File

@@ -23,7 +23,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -113,8 +113,8 @@ public class StructrelavehicletypeServiceImpl implements StructrelavehicletypeSe
@Transactional(rollbackFor = Exception.class)
public void create(JSONObject param) {
String struct_id = param.getString("struct_id");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_ivt_structrelavehicletype");
JSONArray vehicle_types = param.getJSONArray("vehicle_type");
@@ -137,8 +137,8 @@ public class StructrelavehicletypeServiceImpl implements StructrelavehicletypeSe
@Transactional(rollbackFor = Exception.class)
public void update(JSONObject param) {
String struct_id = param.getString("struct_id");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_ivt_structrelavehicletype");

View File

@@ -18,7 +18,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -74,8 +74,8 @@ public class CheckdtlServiceImpl implements CheckdtlService {
@Override
@Transactional(rollbackFor = Exception.class)
public void create(CheckdtlDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setBilldtl_uuid(String.valueOf(IdUtil.getSnowflake(1, 1).nextId()));
@@ -92,8 +92,8 @@ public class CheckdtlServiceImpl implements CheckdtlService {
CheckdtlDto entity = this.findById(dto.getBilldtl_uuid());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
@@ -106,8 +106,8 @@ public class CheckdtlServiceImpl implements CheckdtlService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(String[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_buss_checkdtl");

View File

@@ -23,7 +23,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -105,8 +105,8 @@ public class CheckmstServiceImpl implements CheckmstService {
@Transactional(rollbackFor = Exception.class)
public void saveCheck(JSONObject param) {
String bill_code = CodeUtil.getNewCode("PD_CODE");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String remark = param.getString("remark");
String buss_date = param.getString("buss_date");
@@ -146,8 +146,8 @@ public class CheckmstServiceImpl implements CheckmstService {
@Override
@Transactional(rollbackFor = Exception.class)
public void updateCheck(JSONObject param) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String remark = param.getString("remark");
String bill_uuid = param.getString("bill_uuid");
@@ -241,8 +241,8 @@ public class CheckmstServiceImpl implements CheckmstService {
String struct_code = param.getString("struct_code");
String is_lock = param.getString("is_lock");
WQLObject wo = WQLObject.getWQLObject("SCH_BASE_Point");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONObject map = new JSONObject();
map.put("update_optid", currentUserId);
@@ -257,8 +257,8 @@ public class CheckmstServiceImpl implements CheckmstService {
public void editcheck(JSONObject param) {
//盘点
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
//主表
WQLObject wo_mst = WQLObject.getWQLObject("st_buss_checkMst");
@@ -332,8 +332,8 @@ public class CheckmstServiceImpl implements CheckmstService {
public void updateBillStatus(JSONObject param) {
//提交
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
String bill_uuid = param.getString("bill_uuid");
//主表
@@ -371,8 +371,8 @@ public class CheckmstServiceImpl implements CheckmstService {
@Override
@Transactional(rollbackFor = Exception.class)
public void process0(JSONObject param) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONObject form = param.getJSONObject("form");
JSONObject row = param.getJSONObject("row");
@@ -415,8 +415,8 @@ public class CheckmstServiceImpl implements CheckmstService {
@Override
@Transactional(rollbackFor = Exception.class)
public void process1(JSONObject param) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONObject form = param.getJSONObject("form");
JSONObject row = param.getJSONObject("row");

View File

@@ -21,7 +21,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -85,8 +85,8 @@ public class EmptyvehiclerecordServiceImpl implements EmptyvehiclerecordService
@Override
@Transactional(rollbackFor = Exception.class)
public void create(EmptyvehiclerecordDto dto) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setRecord_uuid(String.valueOf(IdUtil.getSnowflake(1, 1).nextId()));
@@ -108,8 +108,8 @@ public class EmptyvehiclerecordServiceImpl implements EmptyvehiclerecordService
EmptyvehiclerecordDto entity = this.findById(dto.getRecord_uuid());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
@@ -124,8 +124,8 @@ public class EmptyvehiclerecordServiceImpl implements EmptyvehiclerecordService
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(String[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_buss_emptyvehiclerecord");

View File

@@ -9,7 +9,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.database.service.dto.MaterialDto;
import org.nl.wms.st.buss.service.VehicleGroupService;
import org.nl.wms.st.buss.service.dto.VehicleGrouplDto;
@@ -35,8 +35,8 @@ public class VehicleGroupServiceImpl implements VehicleGroupService {
@Transactional(rollbackFor = Exception.class)
public void create(VehicleGrouplDto dto) {
//获取当前用户信息以及时间
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
//赋值准备参数

View File

@@ -27,7 +27,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
@@ -91,8 +91,8 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
@Transactional(rollbackFor = Exception.class)
public void create(WorkprocedureiosDto dto) {
String bill_code = CodeUtil.getNewCode("IN_STORE_CODE");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setIostorinv_id(IdUtil.getSnowflake(1, 1).nextId());
dto.setBill_code(bill_code);
@@ -140,8 +140,8 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
WorkprocedureiosDto entity = this.findById(dto.getIostorinv_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setBill_status("10");
@@ -176,8 +176,8 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_ivt_workprocedureios");
@@ -268,8 +268,8 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
String task_id = sendMaterialTask.createTask(form);
JSONObject json = new JSONObject();
json.put("task_id", task_id);
json.put("update_optid", SecurityUtils.getCurrentUserId());
json.put("update_optname", SecurityUtils.getNickName());
json.put("update_optid", UserInfoUtil.getCurrentUserId());
json.put("update_optname", UserInfoUtil.getNickName());
json.put("update_time", DateUtil.now());
json.put("bill_status", "20");
wo.update(json, "iostorinv_id = '" + iostorinv_id + "'");

View File

@@ -14,7 +14,7 @@ import com.alibaba.fastjson.JSONObject;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.FileUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.st.ivt.IvtChangeTypeEnum;
import org.nl.wms.st.ivt.StoreIvtServiceImpl;
import org.nl.wms.st.ivt.service.StBussCheckmstService;
@@ -129,7 +129,7 @@ public class StBussCheckmstServiceImpl implements StBussCheckmstService {
}
String currentUsername = SecurityUtils.getCurrentUsername();
String currentUsername = UserInfoUtil.getNickName();
String now = DateUtil.now();
if (isAdd) {
@@ -164,7 +164,7 @@ public class StBussCheckmstServiceImpl implements StBussCheckmstService {
throw new BadRequestException("被删除或无权限,操作失败!");
}
String currentUsername = SecurityUtils.getCurrentUsername();
String currentUsername = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setUpdate_time(now);
dto.setUpdate_by(currentUsername);
@@ -228,7 +228,7 @@ public class StBussCheckmstServiceImpl implements StBussCheckmstService {
@Override
public void audit(JSONObject jo) {
String currentUsername = SecurityUtils.getCurrentUsername();
String currentUsername = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONObject check_mst = WQLObject.getWQLObject("st_buss_checkMst").query("bill_uuid = '" + jo.getString("bill_uuid") + "'").uniqueResult(0);
String bill_status = check_mst.getString("bill_status");
@@ -258,7 +258,7 @@ public class StBussCheckmstServiceImpl implements StBussCheckmstService {
public void check(JSONObject jo) {
final JSONArray dtl_rows = jo.getJSONArray("dtl");
final JSONObject mstObj = jo.getJSONObject("mst");
String currentUsername = SecurityUtils.getCurrentUsername();
String currentUsername = UserInfoUtil.getNickName();
String now = DateUtil.now();
boolean have_error = false;
for (int i = 0; i < dtl_rows.size(); i++) {
@@ -301,7 +301,7 @@ public class StBussCheckmstServiceImpl implements StBussCheckmstService {
public void handle(JSONObject jo) {
final JSONArray dtl_rows = jo.getJSONArray("dtl");
final JSONObject mstObj = jo.getJSONObject("mst");
String currentUsername = SecurityUtils.getCurrentUsername();
String currentUsername = UserInfoUtil.getNickName();
String now = DateUtil.now();
JSONArray less_rows = new JSONArray();

View File

@@ -22,7 +22,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;

View File

@@ -14,7 +14,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wms.BussConstant;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.pdm.service.dto.WorkprocedureDto;
@@ -89,8 +89,8 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
@Transactional(rollbackFor = Exception.class)
public void create(WorkprocedureiosDto dto) {
String bill_code = CodeUtil.getNewCode("OUT_STORE_CODE");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setIostorinv_id(IdUtil.getSnowflake(1, 1).nextId());
@@ -134,8 +134,8 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
WorkprocedureiosDto entity = this.findById(dto.getIostorinv_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
dto.setBill_status("10");
@@ -172,8 +172,8 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
Long currentUserId = UserInfoUtil.getCurrentUserId();
String nickName = UserInfoUtil.getNickName();
String now = DateUtil.now();
WQLObject wo = WQLObject.getWQLObject("st_ivt_workprocedureios");
@@ -265,8 +265,8 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
JSONObject json = new JSONObject();
json.put("task_id", task_id);
json.put("update_optid", SecurityUtils.getCurrentUserId());
json.put("update_optname", SecurityUtils.getNickName());
json.put("update_optid", UserInfoUtil.getCurrentUserId());
json.put("update_optname", UserInfoUtil.getNickName());
json.put("update_time", DateUtil.now());
json.put("bill_status", "20");
wo.update(json, "iostorinv_id = '" + iostorinv_id + "'");