diff --git a/src/main/java/com/glxp/api/controller/dev/DeviceInfoController.java b/src/main/java/com/glxp/api/controller/dev/DeviceInfoController.java index 4f09217c6..8273fe639 100644 --- a/src/main/java/com/glxp/api/controller/dev/DeviceInfoController.java +++ b/src/main/java/com/glxp/api/controller/dev/DeviceInfoController.java @@ -144,6 +144,24 @@ public class DeviceInfoController extends BaseController { return ResultVOUtils.success(page); } + /** + * 查看当前科室设备详情 + * + * @param query + * @return + */ + @AuthRuleAnnotation("") + @PostMapping("/udi/device/info/detailByDeptCode/page") + public BaseResponse detailByDeptCode(@RequestBody @Valid DeviceInfoDetailQuery query) { + AuthAdmin user = super.getUser(); + List list = deviceInfoService.detail(query); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse page = new PageSimpleResponse(); + page.setTotal(pageInfo.getTotal()); + page.setList(pageInfo.getList()); + return ResultVOUtils.success(page); + } + /** * 查看所有科室设备--设备码级别 * diff --git a/src/main/java/com/glxp/api/enums/dev/DeviceChangeTypeEnum.java b/src/main/java/com/glxp/api/enums/dev/DeviceChangeTypeEnum.java index e7c75e560..c2770787a 100644 --- a/src/main/java/com/glxp/api/enums/dev/DeviceChangeTypeEnum.java +++ b/src/main/java/com/glxp/api/enums/dev/DeviceChangeTypeEnum.java @@ -11,7 +11,7 @@ import lombok.Getter; @AllArgsConstructor public enum DeviceChangeTypeEnum { - ADD("add", "新增入库"), + ADD("add", "设备登记"), CHANGE("change", "变更归属"), DESTROY("destroy", "销毁/报废"), ; diff --git a/src/main/java/com/glxp/api/req/dev/DeviceChangeOrderParam.java b/src/main/java/com/glxp/api/req/dev/DeviceChangeOrderParam.java index c31f19943..587c3e448 100644 --- a/src/main/java/com/glxp/api/req/dev/DeviceChangeOrderParam.java +++ b/src/main/java/com/glxp/api/req/dev/DeviceChangeOrderParam.java @@ -182,6 +182,9 @@ public class DeviceChangeOrderParam { } public void valid(AuthAdmin user) { + if (StrUtil.isBlank(this.deptCode)) { + throw new JsonException("请选择操作部门"); + } if (this.type == DeviceChangeTypeEnum.CHANGE) { if (StrUtil.isBlank(this.toDeptCode)) { throw new JsonException("请选择目标部门"); @@ -216,7 +219,7 @@ public class DeviceChangeOrderParam { .orderId(SnowflakeUtil.getId()) .type(type) .status(DeviceChangeStatusEnum.WAIT_CONFIRM) - .deptCode(user.getLocDeptCode()) + .deptCode(deptCode) .toDeptCode(toDeptCode) .remark(remark) .createUser(user.getId()) diff --git a/src/main/resources/mybatis/mapper/dev/DeviceChangeOrderMapper.xml b/src/main/resources/mybatis/mapper/dev/DeviceChangeOrderMapper.xml index 01ae3f5c2..51bbd055d 100644 --- a/src/main/resources/mybatis/mapper/dev/DeviceChangeOrderMapper.xml +++ b/src/main/resources/mybatis/mapper/dev/DeviceChangeOrderMapper.xml @@ -36,7 +36,7 @@ and (o.deptCode = #{user.locDeptCode} or o.toDeptCode = #{user.locDeptCode}) - and o.orderId = #{changeOrderId} + and o.orderId like concat('%', #{param.changeOrderId},'%') and o.type = #{param.type}