Просмотр исходного кода

实现组庭审核时仲裁员待办案件数据显示

qitz 2 лет назад
Родитель
Сommit
5eb7b070fd

+ 17
- 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java Просмотреть файл

@@ -10,6 +10,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
10 10
 import com.ruoyi.common.core.domain.entity.SysDept;
11 11
 import com.ruoyi.system.mapper.*;
12 12
 import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
13
+import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
13 14
 import org.slf4j.Logger;
14 15
 import org.slf4j.LoggerFactory;
15 16
 import org.springframework.beans.factory.annotation.Autowired;
@@ -61,6 +62,9 @@ public class SysUserServiceImpl implements ISysUserService {
61 62
     @Autowired
62 63
     private ISysConfigService configService;
63 64
 
65
+    @Autowired
66
+    private CaseApplicationMapper caseApplicationMapper;
67
+
64 68
     @Autowired
65 69
     protected Validator validator;
66 70
 
@@ -78,7 +82,19 @@ public class SysUserServiceImpl implements ISysUserService {
78 82
 
79 83
     @Override
80 84
     public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
81
-        return userMapper.selectUserListByAdRole(arbitrator);
85
+        List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
86
+        if(sysUsers!=null&&sysUsers.size()>0){
87
+            for(SysUser sysUser: sysUsers){
88
+                Long userId = sysUser.getUserId();
89
+                int casenum = caseApplicationMapper.selectCasenum(userId.toString());
90
+                String nickName = sysUser.getNickName();
91
+                String nickNamenew = nickName + "(待办案件数量" + casenum + "个)";
92
+                sysUser.setNickName(nickNamenew);
93
+            }
94
+
95
+        }
96
+
97
+        return sysUsers;
82 98
     }
83 99
 
84 100
     /**

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java Просмотреть файл

@@ -131,4 +131,6 @@ public interface CaseApplicationMapper {
131 131
      * @return
132 132
      */
133 133
     int batchSave(@Param("list")List<CaseApplication> caseApplications);
134
+
135
+    int selectCasenum(@Param("userId") String userId);
134 136
 }

+ 38
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Просмотреть файл

@@ -1936,12 +1936,48 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
1936 1936
                     arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordnew);
1937 1937
                 }else {
1938 1938
                     arbitrateRecordsel.setCaseCheckReject(caseCheckReject);
1939
-
1940
-
1941 1939
                     arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordsel);
1942 1940
                 }
1941
+                //发短信给申请人
1942
+                SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
1943
+                CaseAffiliate caseAffiliate = new CaseAffiliate();
1944
+                caseAffiliate.setCaseAppliId(caseApplication.getId());
1945
+                List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
1946
+                if (caseAffiliates != null && caseAffiliates.size() > 0) {
1947
+                    for (CaseAffiliate affiliate : caseAffiliates) {
1948
+                        //获取身份类型
1949
+                        int identityType = affiliate.getIdentityType();
1950
+                        //查询案件详细信息
1951
+                        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
1952
+                        String caseName = "仲裁";
1953
+                        String caseNum = caseApplication1.getCaseNum();
1954
+
1955
+                        if (identityType == 1) {
1956
+                            request.setPhone(affiliate.getContactTelphone());
1957
+                            request.setTemplateId("2018697");
1958
+                            String name = affiliate.getName();
1959
+                            request.setTemplateParamSet(new String[]{name, caseName, caseNum,caseCheckReject});
1960
+                            Boolean aBoolean = SmsUtils.sendSms(request);
1961
+                            //保存短信发送记录
1962
+                            SmsSendRecord smsSendRecord = new SmsSendRecord();
1963
+                            smsSendRecord.setCaseId(caseApplication.getId());
1964
+                            smsSendRecord.setCaseNum(caseNum);
1965
+                            smsSendRecord.setPhone(request.getPhone());
1966
+                            smsSendRecord.setSendTime(new Date());
1967
+                            String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已拒绝,拒接原因:" + caseCheckReject;
1968
+                            smsSendRecord.setSendContent(content);
1969
+                            smsSendRecord.setCreateBy(getUsername());
1970
+                            if (aBoolean) {
1971
+                                smsSendRecord.setSendStatus(1);
1972
+                            } else {
1973
+                                smsSendRecord.setSendStatus(0);
1974
+                            }
1975
+                            smsRecordMapper.saveSmsSendRecord(smsSendRecord);
1943 1976
 
1977
+                        }
1944 1978
 
1979
+                    }
1980
+                }
1945 1981
             }
1946 1982
             // 新增日志
1947 1983
             insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, notes);

+ 8
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Просмотреть файл

@@ -1254,6 +1254,14 @@
1254 1254
     <select id="selectArbitratorList" resultType="java.lang.String">
1255 1255
         select a.arbitrator_id  id from case_application a where a.id=#{id}
1256 1256
     </select>
1257
+
1258
+    <select id="selectCasenum" resultType="java.lang.Integer">
1259
+        SELECT count(1)
1260
+        from case_application c
1261
+        where c.arbitrator_id = #{userId}
1262
+        and c.case_status in(8,9)
1263
+    </select>
1264
+
1257 1265
     <select id="selectCaseIdByRoomId" resultType="java.lang.Long">
1258 1266
         select id
1259 1267
         from case_application where room_id=#{roomId} limit 1