From 48431be244aa01181ae724125e563b20409cd0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Thu, 24 Aug 2023 17:31:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E9=A2=86=E7=94=A8=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/glxp/api/entity/inv/DeptDeviceDetailEntity.java | 3 +++ .../glxp/api/req/inv/FilterDeviceReceiveOrderRequest.java | 4 ++++ .../api/service/inv/impl/DeptDeviceDetailServiceImpl.java | 5 ++--- .../resources/mybatis/mapper/inv/DeviceReceiveOrderDao.xml | 6 ++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/glxp/api/entity/inv/DeptDeviceDetailEntity.java b/src/main/java/com/glxp/api/entity/inv/DeptDeviceDetailEntity.java index 79b1c3b0..6bb860e8 100644 --- a/src/main/java/com/glxp/api/entity/inv/DeptDeviceDetailEntity.java +++ b/src/main/java/com/glxp/api/entity/inv/DeptDeviceDetailEntity.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; @@ -147,12 +148,14 @@ public class DeptDeviceDetailEntity { /** * 添加时间 */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @TableField(value = "createTime") private Date createTime; /** * 更新时间 */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @TableField(value = "updateTime") private Date updateTime; diff --git a/src/main/java/com/glxp/api/req/inv/FilterDeviceReceiveOrderRequest.java b/src/main/java/com/glxp/api/req/inv/FilterDeviceReceiveOrderRequest.java index 908da82a..59236fab 100644 --- a/src/main/java/com/glxp/api/req/inv/FilterDeviceReceiveOrderRequest.java +++ b/src/main/java/com/glxp/api/req/inv/FilterDeviceReceiveOrderRequest.java @@ -4,6 +4,8 @@ package com.glxp.api.req.inv; import com.glxp.api.util.page.ListPageRequest; import lombok.Data; +import java.util.List; + /** * 设备领用记录相关参数 */ @@ -54,5 +56,7 @@ public class FilterDeviceReceiveOrderRequest extends ListPageRequest { private String receiveUserName; + private List statusList; + } diff --git a/src/main/java/com/glxp/api/service/inv/impl/DeptDeviceDetailServiceImpl.java b/src/main/java/com/glxp/api/service/inv/impl/DeptDeviceDetailServiceImpl.java index 460900c4..1af7c99b 100644 --- a/src/main/java/com/glxp/api/service/inv/impl/DeptDeviceDetailServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inv/impl/DeptDeviceDetailServiceImpl.java @@ -59,7 +59,6 @@ public class DeptDeviceDetailServiceImpl implements DeptDeviceDetailService { for (DeviceReceiveOrderDetailResponse receiveOrderDetailResponse : deviceReceiveOrderDetailResponses) { //查询此编码的产品是否已经在科室设备明细中 Long count = deptDeviceDetailDao.selectCount(new QueryWrapper().eq("deptCode", receiveOrderEntity.getFromDeptCode()) - .eq("invCode", receiveOrderEntity.getInvCode()) .eq("code", receiveOrderDetailResponse.getCode()) ); if (count == 0) { @@ -84,8 +83,8 @@ public class DeptDeviceDetailServiceImpl implements DeptDeviceDetailService { deviceDetail.setStatus(1); deviceDetail.setAddType(1); deviceDetail.setCreateUser(receiveOrderEntity.getAuditUser()); - deviceDetail.setCreateTime(date); - deviceDetail.setUpdateTime(date); +// deviceDetail.setCreateTime(date); +// deviceDetail.setUpdateTime(date); deptDeviceDetailDao.insert(deviceDetail); } } diff --git a/src/main/resources/mybatis/mapper/inv/DeviceReceiveOrderDao.xml b/src/main/resources/mybatis/mapper/inv/DeviceReceiveOrderDao.xml index 7c0c0ac6..49bf188e 100644 --- a/src/main/resources/mybatis/mapper/inv/DeviceReceiveOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inv/DeviceReceiveOrderDao.xml @@ -41,6 +41,12 @@ AND au.employeeName like concat('%', #{receiveUserName}, '%') + + AND dro.status in + + #{item,jdbcType=INTEGER} + + AND date_format(dro.createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d')