Pārlūkot izejas kodu

设备类型统计报表

hfxc226 2 gadi atpakaļ
vecāks
revīzija
f1d862c40b

+ 3 - 3
platform-dao/src/main/resources/mapper/sb/SbInfoMapper.xml

@@ -224,7 +224,7 @@ user.real_name as saveUserName,sb.repair_dept_id
             and sb.position_no = #{positionNo}
         </if>
         <if test="ppNo != null and ppNo!=''">
-            and sb.pp_no = #{ppNo}
+            and sb.pp_no like concat('%',#{ppNo},'%')
         </if>
         <if test="likeDeptCode != null and likeDeptCode!=''">
             and sdDept.dept_code like concat(#{likeDeptCode},'%')
@@ -426,7 +426,7 @@ user.real_name as saveUserName,sb.repair_dept_id
             and sb.position_no = #{positionNo}
         </if>
         <if test="ppNo != null and ppNo!=''">
-            and sb.pp_no = #{ppNo}
+            and sb.pp_no like concat('%',#{ppNo},'%')
         </if>
         <if test="measureStatus != null">
             and sb.measure_status = #{measureStatus}
@@ -509,7 +509,7 @@ user.real_name as saveUserName,sb.repair_dept_id
             and sb.position_no = #{positionNo}
         </if>
         <if test="ppNo != null and ppNo!=''">
-            and sb.pp_no = #{ppNo}
+            and sb.pp_no like concat('%',#{ppNo},'%')
         </if>
         <if test="measureStatus != null">
             and sb.measure_status = #{measureStatus}

+ 6 - 3
platform-service/src/main/java/com/platform/service/sb/impl/SbInfoServiceImpl.java

@@ -2110,7 +2110,9 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
                     i++;
                     // 如果有检定周期,就是需要检定
                     SbInfo tempInfo = BeanConverterUtil.copyObjectProperties(vo, SbInfo.class);
-                    tempInfo.setSeatNumber(30);// 默认30天提醒
+                    if (vo.getSeatNumber() == null) {
+                        tempInfo.setSeatNumber(30);// 如果为空默认30天提醒
+                    }
 
                     // 对必填字段进行判断
                     if (StringUtils.isBlank(vo.getPositionNo())) {
@@ -2273,8 +2275,9 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
                     i++;
                     // 如果有检定周期,就是需要检定
                     SbInfo tempInfo = BeanConverterUtil.copyObjectProperties(vo, SbInfo.class);
-                    tempInfo.setSeatNumber(30);// 默认30天提醒
-
+                    if (vo.getSeatNumber() == null) {
+                        tempInfo.setSeatNumber(30);// 如果为空默认30天提醒
+                    }
                     // 对必填字段进行判断
                     if (StringUtils.isBlank(vo.getPositionNo())) {
                         throw new BusinessException("第" + i + "行,位号为空,位号为必填项目,请填写;");// 编号为空,复制位号