Browse Source

仓库报表

3254194295 2 years ago
parent
commit
cc1b49f016

+ 1 - 1
platform-dao/src/main/java/com/platform/dao/mapper/check/CheckJobMapper.java

@@ -50,5 +50,5 @@ public interface CheckJobMapper extends MyMapper<CheckJob> {
     int getNotFinishNumByDTO(CheckJobDTO record);
 
     void updateBatch(List<CheckJob> updateList);
-    BigDecimal getCheckJobCount(CheckJobDTO checkJobDTO);
+    List<CheckJobVO> getCheckJobCount(CheckJobDTO checkJobDTO);
 }

+ 2 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/check/CheckJobVO.java

@@ -205,4 +205,6 @@ public class CheckJobVO implements Serializable{
      * 保养标准手册
      */
     private List<SysFile> checkFileList;
+
+
 }

+ 3 - 2
platform-dao/src/main/resources/mapper/check/CheckJobMapper.xml

@@ -288,8 +288,8 @@
     </update>
 
     <select id="getCheckJobCount" parameterType="com.platform.dao.dto.check.CheckJobDTO"
-            resultType="BigDecimal">
-        select count(0) from t_check_job
+            resultType="com.platform.dao.vo.query.check.CheckJobVO">
+        select type,count(0) countNum from t_check_job
         <where>
             <if test="status!=null">
                 and status=#{status}
@@ -297,6 +297,7 @@
             <if test="checkUserId!=null">
                 and check_user_id=#{checkUserId}
             </if>
+            group by type
         </where>
     </select>
 </mapper>

+ 8 - 2
platform-service/src/main/java/com/platform/service/repair/impl/RepairApplicationFormServiceImpl.java

@@ -39,6 +39,7 @@ import com.platform.dao.util.MessageTemplateUtil;
 import com.platform.dao.vo.NoticeNumberVO;
 import com.platform.dao.vo.SysUserRoleVO;
 import com.platform.dao.vo.SysUserVO;
+import com.platform.dao.vo.query.check.CheckJobVO;
 import com.platform.dao.vo.query.repair.RepairFeeVO;
 import com.platform.dao.vo.query.workplace.WorkplaceRepairVO;
 import com.platform.dao.vo.repair.RepairApplicationFormVO;
@@ -155,8 +156,13 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
         checkJobDTO.setCheckUserId(userInfo.getUserId());
         checkJobDTO.setStatus(CheckJobStatusEnum.NOT_EXECUTE.getValue());
         //保养
-        BigDecimal count=checkJobMapper.getCheckJobCount(checkJobDTO);
-        noticeNumberVO.setUnexectuedMaintenanceNum(count);
+        List<CheckJobVO> checkJobVOS=checkJobMapper.getCheckJobCount(checkJobDTO);
+        for(CheckJobVO vo: checkJobVOS){
+            if(vo.getType()==2){
+                noticeNumberVO.setUnexectuedMaintenanceNum(new BigDecimal(vo.getCountNum()));
+                break;
+            }
+        }
         //待办
         //待签收
         MyPage<ActApplyInfo> myPage = (MyPage<ActApplyInfo>)(activitiController.showTaskListClaim(1,10).getData());