před 1 rokem
rodič
revize
4e67a0ccd7

+ 5 - 4
platform-dao/src/main/java/com/platform/dao/vo/NoticeNumberVO2.java

@@ -26,7 +26,7 @@ public class NoticeNumberVO2 implements Serializable {
                 =this.unreadNum=this.myRepairNum=this.myCheckRepairNum
                 =this.notDealNum=this.yesDealNum=this.notAcceptancedNum
                 =this.returnNum=this.finishNum
-                =this.verifyOneNum = this.verifyTwoNum
+                =this.verifyNum = this.allUnusedNum
                 =this.finishXZNum = this.refuseNum=
                 new BigDecimal(0);
     }
@@ -35,10 +35,11 @@ public class NoticeNumberVO2 implements Serializable {
      * 设备闲置
      */
     //一审中数量
-    private BigDecimal verifyOneNum;
+    private BigDecimal verifyNum;
+
+    private BigDecimal allUnusedNum;
+
 
-    //二审中数量
-    private BigDecimal verifyTwoNum;
 
     //被拒数量
     private BigDecimal refuseNum;

+ 1 - 1
platform-dao/src/main/resources/mapper/sbUnuseddetail/SbUnusedDetailMapper.xml

@@ -56,7 +56,7 @@
         select unusedDetails.*,sbInfo.name as sbName,sbInfo.position_no,sbinfo.no as sbNo,position.name as positionName
         from t_sb_unused_detail as unusedDetails left join t_sb_info sbInfo
         on sbInfo.id = unusedDetails.sb_id
-        left join t_sb_position position
+        left join t_sb_position position on position.id=sbInfo.position_id
                                                                                                                                                             <where>
             <include refid="List_Condition" />
         </where>

+ 22 - 5
platform-service/src/main/java/com/platform/service/repair/impl/RepairApplicationFormServiceImpl.java

@@ -588,6 +588,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
     }
     @Override
     public NoticeNumberVO getNoticeNumberVO() {
+//        SbUnusedDTO sbUnusedDTO = new SbUnusedDTO();
         NoticeNumberVO noticeNumberVO=new NoticeNumberVO();
         UserInfo userInfo=SecurityUtils.getUserInfo();
         InStoreFormDTO inStoreFormDTO=new InStoreFormDTO();
@@ -619,6 +620,9 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             noticeNumberVO=addRepairNums(noticeNumberVO,repairApplicationFormVOS);
             noticeNumberVO=addCheckJobNums(noticeNumberVO,checkJobVOS);
             noticeNumberVO=addStoreNums(noticeNumberVO,inStoreFormDTO,outStoreFormDTO,storeCheckJobDTO);
+
+//            List<SbUnusedCount> sbUnusedCounts = sbUnusedMapper.getSbUnusedCount(sbUnusedDTO);
+
         }else {
             sysUserRoleVOS= sysUserRoleMapper.selectRoleListByUserId(userInfo.getUserId());
             for(SysUserRoleVO vo:sysUserRoleVOS){
@@ -736,22 +740,35 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             }
         }
     }
-    private void addSbUnusedNums(List<SbUnusedCount> list,NoticeNumberVO2 noticeNumberVO2){
+    private void addSbUnusedNums(List<SbUnusedCount> list,NoticeNumberVO2 noticeNumberVO2,UserInfo userInfo){
+        BigDecimal verifyNum = new BigDecimal(0);
+        BigDecimal all = new BigDecimal(0);
         for (SbUnusedCount count:list){
             if (count.getStatus()==SbUnusedStatusEnum.verifying_one.getValue()){
-                noticeNumberVO2.setVerifyOneNum(count.getNum());
+                noticeNumberVO2.setVerifyNum(count.getNum());
+                verifyNum = verifyNum.add(count.getNum());
+                all = verifyNum.add(count.getNum());
             }else if (count.getStatus()==SbUnusedStatusEnum.verifying_two.getValue()){
                 //待结单
-                noticeNumberVO2.setVerifyTwoNum(count.getNum());
+                noticeNumberVO2.setVerifyNum(count.getNum());
+                verifyNum = verifyNum.add(count.getNum());
+                all = verifyNum.add(count.getNum());
             }else if (count.getStatus()==SbUnusedStatusEnum.success.getValue()){
                 //报修待审
                 noticeNumberVO2.setFinishXZNum(count.getNum());
+                all = verifyNum.add(count.getNum());
             }
             else if (count.getStatus()==SbUnusedStatusEnum.refused.getValue()){
                 //报修待审
                 noticeNumberVO2.setRefuseNum(count.getNum());
+                all = verifyNum.add(count.getNum());
             }
         }
+        noticeNumberVO2.setAllUnusedNum(all);
+        if (userInfo.getSuperAdmin()==1){
+            noticeNumberVO2.setVerifyNum(verifyNum);
+        }
+
     }
 
     @Override
@@ -779,7 +796,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             List<RepairCount> repairCounts = mapper.getrepairCount2(null);
 
             List<SbUnusedCount> unusedCounts = sbUnusedMapper.getSbUnusedCount(null);
-            addSbUnusedNums(unusedCounts,noticeNumberVO2);
+            addSbUnusedNums(unusedCounts,noticeNumberVO2,userInfo);
 
             checkJobVOS=checkJobMapper.getCheckJobCount1(checkJobDTO);
             checkJobDTO.setReceiveOvertime(true);
@@ -791,7 +808,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
         }else {
             unusedDTO.setAllUserId(userInfo.getUserId());
             List<SbUnusedCount> unusedCounts = sbUnusedMapper.getSbUnusedCount(unusedDTO);
-            addSbUnusedNums(unusedCounts,noticeNumberVO2);
+            addSbUnusedNums(unusedCounts,noticeNumberVO2,userInfo);
             repairApplicationFormDTO.setAllUserId(userInfo.getUserId());
             List<RepairCount> repairCounts = mapper.getrepairCount2(repairApplicationFormDTO);
             addRepairNums2(repairCounts,noticeNumberVO2);