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

Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev

wangqiong123 2 лет назад
Родитель
Сommit
e4537963e8

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java Просмотреть файл

76
      * 是否在线开庭,空-书面
76
      * 是否在线开庭,空-书面
77
      */
77
      */
78
     private Integer hearDateFlag ;
78
     private Integer hearDateFlag ;
79
+    /**
80
+     * 是否小程序,1-是
81
+     */
82
+    private Integer miniProgressFlag ;
79
 
83
 
80
 }
84
 }

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

95
             "    AND a1.application_organ_id = #{req.applicationOrganId} " +
95
             "    AND a1.application_organ_id = #{req.applicationOrganId} " +
96
             "</if> "
96
             "</if> "
97
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
97
             + "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
98
-            "    AND a.respondent_identity_num = #{req.respondentIdentityNum} AND c1.case_flow_id=#{req.caseFlowId}" +
98
+            "    AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
99
             "</if> "
99
             "</if> "
100
             +
100
             +
101
             "<if test=\"req.hearDateFlag != null \">" +
101
             "<if test=\"req.hearDateFlag != null \">" +

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

1
 package com.ruoyi.wisdomarbitrate.mapper.mscase;
1
 package com.ruoyi.wisdomarbitrate.mapper.mscase;
2
 
2
 
3
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseMediator;
3
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseMediator;
4
+import org.apache.ibatis.annotations.Param;
5
+import org.apache.ibatis.annotations.Select;
4
 import tk.mybatis.mapper.common.Mapper;
6
 import tk.mybatis.mapper.common.Mapper;
5
 
7
 
6
 /**
8
 /**
7
  * 案件预约表
9
  * 案件预约表
8
  */
10
  */
9
 public interface MsCaseMediatorMapper extends Mapper<MsCaseMediator> {
11
 public interface MsCaseMediatorMapper extends Mapper<MsCaseMediator> {
12
+    /**
13
+     * 查询最新一条申请人的预约信息
14
+     * @param id
15
+     * @return
16
+     */
17
+    @Select("SELECT id,case_appli_id caseAppliId,mediator_id mediatorId, mediator_name mediatorName,hear_date hearDate from ms_case_mediator where case_appli_id=#{id} and type is null order by id desc limit 1")
18
+    MsCaseMediator selectLastApplicant(@Param("id") Long id);
10
 }
19
 }

+ 27
- 31
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Просмотреть файл

143
      */
143
      */
144
     @Override
144
     @Override
145
     public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
145
     public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
146
+        // admin查询所有案件
147
+        if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
148
+
149
+            if(req.getHearDateFlag()!=null){
150
+                // todo 暂时写死
151
+                req.setCaseFlowId(9);
152
+            }
153
+            startPage();
146
 
154
 
155
+            return msCaseApplicationMapper.list(req, null);
156
+        }
147
         // 根据用户查询角色
157
         // 根据用户查询角色
148
         LoginUser loginUser = SecurityUtils.getLoginUser();
158
         LoginUser loginUser = SecurityUtils.getLoginUser();
149
         // 根据id查询用户
159
         // 根据id查询用户
168
             throw new ServiceException("该角色为绑定案件流程");
178
             throw new ServiceException("该角色为绑定案件流程");
169
         }
179
         }
170
         Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
180
         Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
171
-        // admin查询所有案件
172
-        if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
173
-            MsCaseFlow caseFlow =null;
174
-            if(req.getHearDateFlag()!=null){
175
-                caseFlow = flowMap.get("caseManagement:list:mediate");
176
-            }else {
177
-                // 根据按钮权限标识符查询待选择调解员流程id
178
-                caseFlow = flowMap.get("caseManagement:list:selectmediator");
179
-            }
180
-            if(caseFlow!=null) {
181
-                req.setCaseFlowId(caseFlow.getId());
182
-            }
183
-            startPage();
184
-
185
-            return msCaseApplicationMapper.list(req, null);
186
-        }
181
+        List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList());
187
         for (SysRole role : roles) {
182
         for (SysRole role : roles) {
188
             if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"申请人")){
183
             if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"申请人")){
189
                 if(sysUser.getDeptId()!=null) {
184
                 if(sysUser.getDeptId()!=null) {
194
 
189
 
195
             }
190
             }
196
             if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"被申请人")){
191
             if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"被申请人")){
192
+                caseStatusNames=new ArrayList<>();
197
                 // todo 被申请人案件根据被申请人身份证号查询案件列表
193
                 // todo 被申请人案件根据被申请人身份证号查询案件列表
198
                 req.setRespondentIdentityNum(sysUser.getIdCard());
194
                 req.setRespondentIdentityNum(sysUser.getIdCard());
199
                 MsCaseFlow caseFlow =null;
195
                 MsCaseFlow caseFlow =null;
200
-                // 查询待调解流程id
201
-                if(req.getHearDateFlag()!=null){
202
-                     caseFlow = flowMap.get("caseManagement:list:mediate");
196
+                // todo 查询待调解流程id被申请人暂时写死
197
+                if(req.getMiniProgressFlag()!=null) {
198
+                    if (req.getHearDateFlag() != null) {
199
+//                     caseFlow = flowMap.get("caseManagement:list:mediate");
200
+                        caseStatusNames.add("待调解");
201
+                    } else {
202
+                        // 待选择调解员
203
+                        caseStatusNames.add("待选择调解员");
204
+                    }
203
                 }else {
205
                 }else {
204
-                    // 根据按钮权限标识符查询待选择调解员流程id
205
-                     caseFlow = flowMap.get("caseManagement:list:selectmediator");
206
-                }
207
-                if(caseFlow!=null) {
208
-                    req.setCaseFlowId(caseFlow.getId());
206
+                    // PC端
207
+                    caseStatusNames.add("待被申请人签收");
209
                 }
208
                 }
209
+
210
                 break;
210
                 break;
211
             }
211
             }
212
         }
212
         }
213
         startPage();
213
         startPage();
214
         // 查询案件列表
214
         // 查询案件列表
215
-        List<MsCaseApplicationVO> caseApplicationList = msCaseApplicationMapper.list(req, caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList()));
215
+        List<MsCaseApplicationVO> caseApplicationList = msCaseApplicationMapper.list(req, caseStatusNames);
216
         return caseApplicationList;
216
         return caseApplicationList;
217
     }
217
     }
218
 
218
 
599
         if(templateManage==null||StrUtil.isEmpty(templateManage.getTemOrigPath())){
599
         if(templateManage==null||StrUtil.isEmpty(templateManage.getTemOrigPath())){
600
             throw new ServiceException("未找到模板");
600
             throw new ServiceException("未找到模板");
601
         }
601
         }
602
-        String templatePath = "/home/ruoyi/" + templateManage.getTemOrigPath();
602
+        String templatePath = "/home/ruoyi" + templateManage.getTemOrigPath();
603
         templatePath=templatePath.replace("/profile","/uploadPath");
603
         templatePath=templatePath.replace("/profile","/uploadPath");
604
 
604
 
605
         try {
605
         try {
1057
 
1057
 
1058
       //  MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(id);
1058
       //  MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(id);
1059
         // todo 返回申请人预约信息,预约信息查预约表
1059
         // todo 返回申请人预约信息,预约信息查预约表
1060
-        Example example = new Example(MsCaseMediator.class);
1061
-        Example.Criteria criteria = example.createCriteria();
1062
-        criteria.andIsNull("type");
1063
-        criteria.andEqualTo("caseAppliId", id);
1064
     //    criteria.andEqualTo("mediatorId", SecurityUtils.getUserId());
1060
     //    criteria.andEqualTo("mediatorId", SecurityUtils.getUserId());
1065
-        MsCaseMediator msCaseMediator = msCaseMediatorMapper.selectOneByExample(example);
1061
+        MsCaseMediator msCaseMediator = msCaseMediatorMapper.selectLastApplicant(id);
1066
         if(msCaseMediator==null){
1062
         if(msCaseMediator==null){
1067
             return AjaxResult.success(result);
1063
             return AjaxResult.success(result);
1068
         }
1064
         }