Bläddra i källkod

气瓶借还接口调整

hanzhiwei 2 år sedan
förälder
incheckning
c68ce59630

+ 3 - 0
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/domain/dto/QpUseRecordDto.java

@@ -62,4 +62,7 @@ public class QpUseRecordDto {
 
     @ApiModelProperty(value = "余量不符(0:正常,1:余量不符 默认为0)")
     private Integer isSurplus;
+
+    @ApiModelProperty(value = "实验室id")
+    private Long subjectId;
 }

+ 1 - 1
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/service/impl/AlarmRecordServiceImpl.java

@@ -491,7 +491,7 @@ public class AlarmRecordServiceImpl implements IAlarmRecordService {
             QpUsegasApplyVO qpUsegasApplyVO = new QpUsegasApplyVO();
             qpUsegasApplyVO.setUserId(QpUseRecord.getUserId());
             qpUsegasApplyVO.setSubjectId(QpUseRecord.getSubjectId());
-            qpUsegasApplyVO.setUseGasId(qpAirBottle.getId());
+            qpUsegasApplyVO.setUseGasId(qpAirBottle.getConfigId());
             List<QpUsegasApplyVO> qpUsegasApplyVOS = qpUsegasApplyService.selectQpUsegasApplyList(qpUsegasApplyVO);
             List<QpUsegasApplyVO> collect = qpUsegasApplyVOS.stream().filter(qa -> "1".equals(qa.getRemark())).sorted(Comparator.comparing(QpUsegasApplyVO::getEndTime).reversed()).limit(1).collect(Collectors.toList());
             QpUsegasApplyVO qpUsegasApplyVO1 = collect.get(0);

+ 1 - 0
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/service/impl/QpUseRecordServiceImpl.java

@@ -187,6 +187,7 @@ public class QpUseRecordServiceImpl implements IQpUseRecordService {
     @Override
     public int updateQpUseRecord(QpUseRecord qpUseRecord) {
         Long storageId = qpUseRecord.getStorageId();
+        qpUseRecord.setUserStatus(2);
         List<QpUseRecord> qpUseRecords = qpUseRecordMapper.selectQpUseRecordList(new QpUseRecord().setStorageId(storageId));
         qpUseRecords = qpUseRecords.stream().filter(ur -> ur.getAfterUse() == null).collect(Collectors.toList());
         if (qpUseRecords.size() != 1) {

+ 3 - 0
zd-modules/zd-airbottle/src/main/resources/mapper/airbottle/QpUseRecordMapper.xml

@@ -194,6 +194,7 @@
             <if test="updateTime != null">update_time,</if>
             <if test="subjectId != null">subject_id,</if>
             <if test="userId != null">user_id,</if>
+            <if test="userStatus != null">user_status,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="contacts != null">#{contacts},</if>
@@ -213,6 +214,7 @@
             <if test="updateTime != null">#{updateTime},</if>
             <if test="subjectId != null">#{subjectId},</if>
             <if test="userId != null">#{userId},</if>
+            <if test="userStatus != null">#{userStatus},</if>
         </trim>
     </insert>
 
@@ -236,6 +238,7 @@
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="subjectId != null">subject_id = #{subjectId},</if>
             <if test="userId != null">user_id = #{userId},</if>
+            <if test="userStatus != null">#{userStatus},</if>
         </trim>
         where id = #{id}
     </update>