diff --git a/lms/nladmin-system/doc/wms.xls b/lms/nladmin-system/doc/wms.xls index 8283c57..1ecfd51 100644 Binary files a/lms/nladmin-system/doc/wms.xls and b/lms/nladmin-system/doc/wms.xls differ diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/secutiry/AuthorizationController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/secutiry/AuthorizationController.java index 321bfa3..183a9f2 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/secutiry/AuthorizationController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/secutiry/AuthorizationController.java @@ -49,11 +49,11 @@ public class AuthorizationController { @ApiOperation("登录授权") @PostMapping(value = "/login") - public ResponseEntity login(@RequestBody Map authMap) throws Exception { + public ResponseEntity login(@RequestBody Map authMap, HttpServletRequest request) throws Exception { if (ObjectUtil.isEmpty(authMap)){ return ResponseEntity.noContent().build(); } - return ResponseEntity.ok(onlineUserService.login(authMap)); + return ResponseEntity.ok(onlineUserService.login(authMap, request)); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/OnlineController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/OnlineController.java index 567898e..f48db8f 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/OnlineController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/user/OnlineController.java @@ -15,10 +15,12 @@ */ package org.nl.system.controller.user; +import com.alibaba.fastjson.JSONArray; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.nl.common.utils.EncryptUtils; import org.nl.system.service.secutiry.impl.OnlineUserService; +import org.nl.system.service.user.dto.OnlineUserDto; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; @@ -27,6 +29,7 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.List; import java.util.Set; /** @@ -57,10 +60,10 @@ public class OnlineController { @ApiOperation("踢出用户") @DeleteMapping // @SaCheckPermission("@el.check()") - public ResponseEntity delete(@RequestBody Set keys) throws Exception { - for (String key : keys) { + public ResponseEntity delete(@RequestBody List keys) throws Exception { + for (OnlineUserDto key : keys) { // 解密Key - key = EncryptUtils.desDecrypt(key); + key.setKey(EncryptUtils.desDecrypt(key.getKey())); onlineUserService.kickOut(key); } return new ResponseEntity<>(HttpStatus.OK); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/ISysDeptService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/ISysDeptService.java index 3e2df59..8d159d8 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/ISysDeptService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/ISysDeptService.java @@ -65,4 +65,6 @@ public interface ISysDeptService extends IService { void createDept(SysDept dept); + List getUserDeptByUserId(String userId); + } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/dao/mapper/SysDeptMapper.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/dao/mapper/SysDeptMapper.java index 97d0e9b..33ce82b 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/dao/mapper/SysDeptMapper.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/dao/mapper/SysDeptMapper.java @@ -41,4 +41,6 @@ public interface SysDeptMapper extends BaseMapper { * @return */ String findAllChild(String pid); + + List getUserDeptByUserId(String userId); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/dao/mapper/SysDeptMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/dao/mapper/SysDeptMapper.xml index b5ec9e8..8f4acca 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/dao/mapper/SysDeptMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/dao/mapper/SysDeptMapper.xml @@ -37,4 +37,17 @@ ) + diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/impl/SysDeptServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/impl/SysDeptServiceImpl.java index 93ea266..dbe47eb 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/impl/SysDeptServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/dept/impl/SysDeptServiceImpl.java @@ -176,4 +176,9 @@ public class SysDeptServiceImpl extends ServiceImpl impl sysDeptMapper.updateSubCount(dept.getPid()); } } + + @Override + public List getUserDeptByUserId(String userId) { + return sysDeptMapper.getUserDeptByUserId(userId); + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/secutiry/impl/OnlineUserService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/secutiry/impl/OnlineUserService.java index b63ef55..24be8e2 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/secutiry/impl/OnlineUserService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/secutiry/impl/OnlineUserService.java @@ -18,9 +18,11 @@ package org.nl.system.service.secutiry.impl; import cn.dev33.satoken.secure.SaSecureUtil; import cn.dev33.satoken.stp.SaLoginModel; import cn.dev33.satoken.stp.StpUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @@ -28,6 +30,8 @@ import org.nl.common.utils.*; import org.nl.config.RsaProperties; import org.nl.common.exception.BadRequestException; import org.nl.common.utils.dto.CurrentUser; +import org.nl.system.service.dept.ISysDeptService; +import org.nl.system.service.dept.dao.SysDept; import org.nl.system.service.secutiry.dto.UserDto; import org.nl.system.service.role.ISysRoleService; import org.nl.system.service.secutiry.dto.AuthUserDto; @@ -55,6 +59,8 @@ public class OnlineUserService { @Autowired private ISysUserService sysUserService; @Autowired + private ISysDeptService deptService; + @Autowired private ISysRoleService roleService; @Autowired private RedisUtils redisUtils; @@ -69,20 +75,27 @@ public class OnlineUserService { * @param token / * @param request / */ - public void save(UserDto userDto, String token, HttpServletRequest request){ -// String dept = userDto.getDept().getName(); - String dept = ""; + public void save(SysUser userDto, String token, HttpServletRequest request){ + // 获取用户部门 + List userDeptByUserId = deptService.getUserDeptByUserId(userDto.getUser_id()); + StringBuilder sb = new StringBuilder(); + for (SysDept dept : userDeptByUserId) { + sb.append(dept.getName()).append("、"); + } + if (sb.length() > 0) { + sb.setLength(sb.length() - 1); + } + String dept = sb.toString(); String ip = StringUtils.getIp(request); String browser = StringUtils.getBrowser(request); - // String address = StringUtils.getCityInfo(ip); - String address = "局域网"; + String address = StringUtils.getCityInfo(ip); OnlineUserDto onlineUserDto = null; try { -// onlineUserDto = new OnlineUserDto(userDto.getUsername(), userDto.getNickName(), dept, browser , ip, address, EncryptUtils.desEncrypt(token), new Date()); + onlineUserDto = new OnlineUserDto(userDto.getUsername(), userDto.getPerson_name(), dept, browser , ip, address, EncryptUtils.desEncrypt(token), new Date()); } catch (Exception e) { log.error(e.getMessage(),e); } - redisUtils.set(token, onlineUserDto, StpUtil.getTokenTimeout()); + redisUtils.set("oline-" + userDto.getUsername(), onlineUserDto, StpUtil.getTokenTimeout()); } /** @@ -109,7 +122,7 @@ public class OnlineUserService { Collections.reverse(keys); List onlineUserDtos = new ArrayList<>(); for (String key : keys) { - if (key.length() == 1511) { + if (key.startsWith("oline-")) { OnlineUserDto onlineUserDto = (OnlineUserDto) redisUtils.get(key); if(StrUtil.isNotEmpty(filter)){ if(onlineUserDto.toString().contains(filter)){ @@ -127,10 +140,26 @@ public class OnlineUserService { /** * 踢出用户 - * @param key / + * @param key: OnlineUserDto / + */ + public void kickOut(OnlineUserDto key) { + // 获取用户 + SysUser one = sysUserService.getOne(new LambdaQueryWrapper().eq(SysUser::getUsername, key.getUserName())); + if (ObjectUtil.isNotEmpty(one)) { + redisUtils.del("oline-" + one.getUsername()); + } + // 下线 + StpUtil.logoutByTokenValue(key.getKey()); // 通过token强退 + } + + /** + * 踢出用户 + * @param key:token / */ - public void kickOut(String key){ + public void kickOut(String key) { redisUtils.del(key); + // 下线 + StpUtil.logoutByTokenValue(key); // 通过token强退 } /** @@ -211,7 +240,7 @@ public class OnlineUserService { } } @SneakyThrows - public Map login(Map paramMap){ + public Map login(Map paramMap, HttpServletRequest request){ // 密码解密 - 前端的加密规则: encrypt AuthUserDto authUser = JSON.toJavaObject((JSON) JSON.toJSON(paramMap), AuthUserDto.class); String password = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, authUser.getPassword()); @@ -263,7 +292,7 @@ public class OnlineUserService { put("user", user); }}; // 保存在线信息 -// onlineUserService.save(userDto, StpUtil.getTokenValue(), request); + this.save(userInfo, StpUtil.getTokenValue(), request); return authInfo; } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/ISysUserService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/ISysUserService.java index d58d747..26ebead 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/ISysUserService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/ISysUserService.java @@ -1,6 +1,5 @@ package org.nl.system.service.user; -import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.extension.service.IService; import org.nl.common.domain.query.PageQuery; import org.nl.system.service.user.dao.SysUser; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/das/devicecheck/service/IDasDeviceCheckRecordService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/das/devicecheck/service/IDasDeviceCheckRecordService.java index 7cbc002..96e2372 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/das/devicecheck/service/IDasDeviceCheckRecordService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/das/devicecheck/service/IDasDeviceCheckRecordService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import org.nl.common.domain.query.PageQuery; import com.baomidou.mybatisplus.extension.service.IService; import org.nl.wms.das.devicecheck.service.dao.DasDeviceCheckRecord; +import org.nl.wms.pda.service.dao.vo.PdaResponseVo; import java.util.Map; import java.util.Set; @@ -27,7 +28,7 @@ public interface IDasDeviceCheckRecordService extends IService() .eq(SysUser::getUsername, entity.getUsername())); String now = DateUtil.now(); @@ -54,6 +55,7 @@ public class DasDeviceCheckRecordServiceImpl extends ServiceImpl { /** * - * @param code + * @param name * @param request * @param response * @param direction */ - void saveRecord(String code, Object request, T response, String direction); + void saveRecord(String name, K request, V response, String direction); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/record/service/dao/SysInteractRecord.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/record/service/dao/SysInteractRecord.java index 9bcb4f7..f5ef9a9 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/record/service/dao/SysInteractRecord.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/record/service/dao/SysInteractRecord.java @@ -25,8 +25,8 @@ public class SysInteractRecord implements Serializable { @ApiModelProperty(value = "对接标识") private String interact_id; - @ApiModelProperty(value = "对接编码") - private String interact_code; + @ApiModelProperty(value = "对接名称") + private String interact_name; @ApiModelProperty(value = "响应编码") private int code; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/record/service/impl/SysInteractRecordServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/record/service/impl/SysInteractRecordServiceImpl.java index 59f8dab..4f89a4f 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/record/service/impl/SysInteractRecordServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/record/service/impl/SysInteractRecordServiceImpl.java @@ -16,7 +16,6 @@ import org.nl.wms.ext.acs.service.dto.to.BaseResponse; import org.nl.wms.ext.record.service.ISysInteractRecordService; import org.nl.wms.ext.record.service.dao.mapper.SysInteractRecordMapper; import org.nl.wms.ext.record.service.dao.SysInteractRecord; -import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder; import org.nl.wms.pdm.workorder.service.dao.vo.AcsWorkOrderVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -70,7 +69,7 @@ public class SysInteractRecordServiceImpl extends ServiceImpl void saveRecord(String code, Object request, T response, String direction) { + public void saveRecord(String name, K request, V response, String direction) { SysInteractRecord entity = new SysInteractRecord(); entity.setInteract_id(IdUtil.getSnowflake(1, 1).nextIdStr()); - entity.setRecord_time(DateUtil.now()); + entity.setRecord_time(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss.SSS")); + entity.setInteract_name(name); entity.setDirection(direction); entity.setRequest_param(JSONObject.toJSONString(request)); entity.setResponse_param(JSONObject.toJSONString(response)); if (response instanceof BaseResponse) { BaseResponse re = (BaseResponse) response; - entity.setInteract_code(re.getRequestNo()); entity.setCode(re.getCode()); entity.setMessage(re.getMessage()); entity.setIs_success(re.getCode() == HttpStatus.HTTP_OK); } if (response instanceof ResultForAcs) { ResultForAcs re = (ResultForAcs) response; - entity.setInteract_code(IdUtil.simpleUUID()); // todo: 暂定 entity.setCode(re.getStatus()); entity.setMessage(re.getMessage()); entity.setIs_success(re.getStatus() == HttpStatus.HTTP_OK); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java index a96648a..0d730b0 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java @@ -37,8 +37,7 @@ public class PdaController { @ApiOperation("设备点检") @SaIgnore public ResponseEntity deviceCheck(@Validated @RequestBody DasDeviceCheckRecord entity){ - deviceCheckRecordService.create(entity); - return new ResponseEntity<>(HttpStatus.OK); + return new ResponseEntity<>(deviceCheckRecordService.create(entity), HttpStatus.OK); } @PostMapping("/deviceCheck/deviceInfo") diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml index c85c4ce..af79ffd 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml @@ -5,7 +5,7 @@ SELECT `value`, - label + label AS text FROM `sys_dict` WHERE `code` = #{code} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/DropdownListVo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/DropdownListVo.java index b3fb6c5..89093a8 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/DropdownListVo.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/DropdownListVo.java @@ -12,5 +12,5 @@ import java.io.Serializable; @Data public class DropdownListVo implements Serializable { private String value; - private String label; + private String text; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/PdaResponseVo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/PdaResponseVo.java new file mode 100644 index 0000000..c2757e9 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/PdaResponseVo.java @@ -0,0 +1,20 @@ +package org.nl.wms.pda.service.dao.vo; + +import lombok.Data; + +/** + * @Author: lyd + * @Description: 手持返回 + * @Date: 2023/8/3 + */ +@Data +public class PdaResponseVo { + // 先提供一个message + private String message; + + public static PdaResponseVo pdaResultOk(String message) { + PdaResponseVo vo = new PdaResponseVo(); + vo.setMessage(message); + return vo; + } +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml index 62a51a9..8e2f782 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml @@ -40,9 +40,15 @@ 0 AS b, 0 AS h, 0 AS w, - 0 AS `size`, + 0 AS size_error, 0 AS single_weight, - 0 AS drawing_address + 0 AS drawing_address, + 0 AS standard_size1, + 0 AS standard_size2, + 0 AS standard_size3, + 0 AS standard_size4, + 0 AS standard_weight, + 0 AS detection_error FROM `pdm_bd_workorder` w LEFT JOIN md_base_material m ON m.material_id = w.material_id diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/vo/AcsWorkOrderVo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/vo/AcsWorkOrderVo.java index fe92e16..065a08a 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/vo/AcsWorkOrderVo.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/vo/AcsWorkOrderVo.java @@ -17,7 +17,13 @@ public class AcsWorkOrderVo { private String b; private String h; private String w; - private String size; // 尺寸允许误差 + private String size_error; // 尺寸允许误差 private String single_weight; // 单重允许误差 private String drawing_address; // 图纸地址 + private String standard_size_height1; // 标准尺寸1 + private String standard_size_height2; // 标准尺寸2 + private String standard_size_height3; // 标准尺寸3 + private String standard_size_height4; // 标准尺寸4 + private String standard_weight; // 标准重量 + private String detection_error; // 检测误差值 } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java index e1dd81c..133025d 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java @@ -4,10 +4,13 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.http.HttpStatus; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.extern.slf4j.Slf4j; import org.nl.common.exception.BadRequestException; import org.nl.wms.ext.acs.service.dto.ResultForAcs; +import org.nl.wms.ext.record.service.ISysInteractRecordService; import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService; import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder; import org.nl.wms.sch.point.service.ISchBasePointService; @@ -33,6 +36,7 @@ import java.util.List; * @date 2023年05月16日 16:42 * @desc desc */ +@Slf4j @Component public abstract class AbstractTask { @Autowired @@ -43,7 +47,8 @@ public abstract class AbstractTask { private ISchBasePointService pointService; @Autowired private IPdmBdWorkorderService workorderService; - + @Autowired + private ISysInteractRecordService interactRecordService; /** * 任务创建 @@ -72,6 +77,7 @@ public abstract class AbstractTask { * @created 2020年6月12日 下午5:52:28 */ protected ResultForAcs renotifyAcs(List taskList) { + ResultForAcs resultForAcs = ResultForAcs.requestOk(); //1、获取任务 //2、根据任务配置补全任务 //3、下发 @@ -97,8 +103,17 @@ public abstract class AbstractTask { this.setTask(task.getConfig_code(), taskDto); list.add(taskDto); } - - return AcsUtil.notifyAcs("api/wms/task", list); + try { + resultForAcs = AcsUtil.notifyAcs("api/wms/task", list); + } catch (Exception e) { + log.error("任务下发异常: {}", e.getMessage()); + resultForAcs.setTimestamp(DateUtil.now()); + resultForAcs.setStatus(HttpStatus.HTTP_BAD_REQUEST); + resultForAcs.setMessage(e.getMessage()); + } + // 记录日志 + interactRecordService.saveRecord("下发任务", list, resultForAcs, GeneralDefinition.LMS_ACS); + return resultForAcs; } private AcsTaskDto setTask(String config_code, AcsTaskDto taskDto) { diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/dtk/CTQKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/dtk/CTQKTask.java index bc3ce4c..6347f33 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/dtk/CTQKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/dtk/CTQKTask.java @@ -13,6 +13,7 @@ import org.nl.wms.sch.task.service.ISchBaseTaskconfigService; import org.nl.wms.sch.task.service.dao.SchBaseTask; import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig; import org.nl.wms.sch.task_manage.AbstractTask; +import org.nl.wms.sch.task_manage.GeneralDefinition; import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum; import org.nl.wms.sch.task_manage.enums.PointStatusEnum; import org.nl.wms.sch.task_manage.enums.TaskFinishedTypeEnum; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQLTask.java index 5f4688c..cbe3076 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQLTask.java @@ -20,6 +20,7 @@ import org.nl.wms.sch.task.service.ISchBaseTaskconfigService; import org.nl.wms.sch.task.service.dao.SchBaseTask; import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig; import org.nl.wms.sch.task_manage.AbstractTask; +import org.nl.wms.sch.task_manage.GeneralDefinition; import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum; import org.nl.wms.sch.task_manage.enums.PointStatusEnum; import org.nl.wms.sch.task_manage.enums.TaskFinishedTypeEnum; diff --git a/lms/nladmin-ui/src/views/monitor/online/index.vue b/lms/nladmin-ui/src/views/monitor/online/index.vue index 3a104a5..0b3ec34 100644 --- a/lms/nladmin-ui/src/views/monitor/online/index.vue +++ b/lms/nladmin-ui/src/views/monitor/online/index.vue @@ -45,7 +45,7 @@

确定强制退出该用户吗?

取消 - 确定 + 确定
强退 @@ -101,7 +101,7 @@ export default { const ids = [] if (key instanceof Array) { key.forEach(val => { - ids.push(val.key) + ids.push(val) }) } else ids.push(key) this.delLoading = true diff --git a/lms/nladmin-ui/src/views/system/dept/index.vue b/lms/nladmin-ui/src/views/system/dept/index.vue index eedd374..633a7a9 100644 --- a/lms/nladmin-ui/src/views/system/dept/index.vue +++ b/lms/nladmin-ui/src/views/system/dept/index.vue @@ -90,6 +90,7 @@ +
+ +
+ + + + + + + + + + + + + + + + + + +
+
+ + + + + diff --git a/lms/nladmin-ui/src/views/wms/ext/record/index.vue b/lms/nladmin-ui/src/views/wms/ext/record/index.vue index 320cdb1..eb2cdbc 100644 --- a/lms/nladmin-ui/src/views/wms/ext/record/index.vue +++ b/lms/nladmin-ui/src/views/wms/ext/record/index.vue @@ -10,11 +10,11 @@ :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" - width="500px" + width="550px" > - - - + + + @@ -23,10 +23,10 @@ - + - + @@ -66,9 +66,9 @@ > @@ -124,7 +124,7 @@ import pagination from '@crud/Pagination' const defaultForm = { interact_id: null, - interact_code: null, + interact_name: null, code: null, message: null, request_param: null, @@ -144,7 +144,13 @@ export default { url: 'api/sysInteractRecord', idField: 'interact_id', sort: 'interact_id,desc', - crudMethod: { ...crudSysInteractRecord } + crudMethod: { ...crudSysInteractRecord }, + optShow: { + add: false, + edit: false, + del: true, + download: false + } }) }, data() { @@ -154,21 +160,32 @@ export default { } }, computed: { - formattedRequestParam() { - try { - const jsonObject = JSON.parse(this.form.request_param) // 解析 JSON 字符串为 JavaScript 对象 - return JSON.stringify(jsonObject, null, 2) // 使用 null 和 2 来进行格式化 - } catch (error) { - // 错误处理,如果 JSON 解析失败则返回原始字符串 - return this.form.request_param + formattedRequestParam: { + get() { + try { + const jsonObject = JSON.parse(this.form.request_param) // 解析 JSON 字符串为 JavaScript 对象 + return JSON.stringify(jsonObject, null, 2) // 使用 null 和 2 来进行格式化 + } catch (error) { + // 错误处理,如果 JSON 解析失败则返回原始字符串 + return this.form.request_param + } + }, + set(value) { + this.form.request_param = value // 可以编辑响应结果并保存到数据属性中 } - }, formattedResponseParam() { - try { - const jsonObject = JSON.parse(this.form.response_param) // 解析 JSON 字符串为 JavaScript 对象 - return JSON.stringify(jsonObject, null, 2) // 使用 null 和 2 来进行格式化 - } catch (error) { - // 错误处理,如果 JSON 解析失败则返回原始字符串 - return this.form.response_param + }, + formattedResponseParam: { + get() { + try { + const jsonObject = JSON.parse(this.form.response_param) // 解析 JSON 字符串为 JavaScript 对象 + return JSON.stringify(jsonObject, null, 2) // 使用 null 和 2 来进行格式化 + } catch (error) { + // 错误处理,如果 JSON 解析失败则返回原始字符串 + return this.form.response_param + } + }, + set(value) { + this.form.response_param = value // 可以编辑响应结果并保存到数据属性中 } } }, diff --git a/lms/nladmin-ui/src/views/wms/pdm/residue/index.vue b/lms/nladmin-ui/src/views/wms/pdm/residue/index.vue index c22a6c7..e127004 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/residue/index.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/residue/index.vue @@ -33,7 +33,7 @@ - +