shudonghui 1 gadu atpakaļ
vecāks
revīzija
3a8dfd9ce7

+ 2 - 2
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingServiceImpl.java

@@ -217,14 +217,14 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
         SopCrmInfo sopCrmInfo = tbCrmService.findSopCrmInfoBySop(sopNo);
         Long serviceUnitId = sopCrmInfo.getServiceUnitId();
         DingElementResult dingElementResult = this.baseMapper.findDingResultByUserId(userId, serviceUnitId);
-        Integer reissueCardCount = dingElementResult.getReissueCardCount();
+        Integer reissueCardCount = dingElementResult!=null?dingElementResult.getReissueCardCount():0;
         int applyCount = this.baseMapper.findDingExceptionApplyCount(userId, sopNo);
 
         DingStatisticResult dingStatisticResult = new DingStatisticResult();
         dingStatisticResult.setDingFormList(formList);
         dingStatisticResult.setWorkDays(workCount);
         dingStatisticResult.setExceptionCount(exceptionCount);
-        dingStatisticResult.setRemainCount(reissueCardCount - applyCount);
+        dingStatisticResult.setRemainCount(reissueCardCount!=0?reissueCardCount - applyCount:0);
         return dingStatisticResult;
     }
 

+ 2 - 2
sop-business/src/main/resources/mapper/TBSopInfoMapper.xml

@@ -197,14 +197,14 @@
         left join t_b_sop_info_detail tbsid on tbsid.sop_info_id = tbsi.id
         left join t_b_crm tbc on tbc.crm_no = tbsi.crm_no
         left join sys_custom sc on sc.id = tbsi.custom_id
-        <where> 1 = 1
+        <where>
             <if test="userId != null and userId != ''">
                 and (tbsid.engineer_user_id is not null and tbsid.engineer_user_id = #{userId})
             </if>
             <if test="serviceId != null and serviceId != ''">
                 and tbsi.service_id = #{serviceId}
             </if>
-                and tbsi.status = 'START'
+<!--                and tbsi.status = 'START'-->
         </where>
     </select>