修改群众上报逻辑

This commit is contained in:
wans 2021-07-08 15:44:42 +08:00
parent 694472ad09
commit 65a5afa26f
7 changed files with 103 additions and 3 deletions

View File

@ -57,4 +57,28 @@ public class DictAppController extends AbstractController {
return dictService.listDictAll(params); return dictService.listDictAll(params);
} }
@ApiOperation(value = "查找绑定了部门的案件类型父类型", notes = "查找绑定了部门的案件类型父类型")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-case-type-parent-bind")
public List<DictDTO> listCaseTypeParentBind(@RequestHeader("token") String token) throws SearchException {
Map<String, Object> params = getParams();
return dictService.listCaseTypeParentBind(params);
}
@ApiOperation(value = "查找绑定了部门的案件类型列表", notes = "查找绑定了部门的案件类型列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-case-type-bind/{dictParentId}")
public List<DictDTO> listCaseTypeBind(@RequestHeader("token") String token,
@PathVariable("dictParentId") String dictParentId) throws SearchException {
Map<String, Object> params = getParams();
params.put("dictParentId",dictParentId);
return dictService.listCaseTypeBind(params);
}
} }

View File

@ -99,4 +99,10 @@ public interface IDictDao {
*/ */
DictDTO getDictByNameAndParentId(Map<String, Object> params) throws SearchException; DictDTO getDictByNameAndParentId(Map<String, Object> params) throws SearchException;
/**
* 查询案件类型是否绑定了职能部门
* @param params
* @return
*/
List<Map<String, Object>> listBindDept(Map<String, Object> params);
} }

View File

@ -158,7 +158,7 @@ public class ReportCaseVO {
} }
public String getCaseFlowType() { public String getCaseFlowType() {
return caseFlowType == null ? "2" : caseFlowType; return caseFlowType == null ? "1" : caseFlowType;
} }
public void setCaseFlowType(String caseFlowType) { public void setCaseFlowType(String caseFlowType) {

View File

@ -120,4 +120,18 @@ public interface IDictService {
* @throws SearchException * @throws SearchException
*/ */
List<EasyUITreeDTO> listEasyUITreeDict(Map<String, Object> params) throws SearchException; List<EasyUITreeDTO> listEasyUITreeDict(Map<String, Object> params) throws SearchException;
/**
* 查找绑定了部门的案件类型父类
* @param params
* @return
*/
List<DictDTO> listCaseTypeParentBind(Map<String, Object> params);
/**
* 查找绑定了部门的案件类型列表
* @param params
* @return
*/
List<DictDTO> listCaseTypeBind(Map<String, Object> params);
} }

View File

@ -159,4 +159,54 @@ public class DictServiceImpl extends AbstractService implements IDictService {
return dictDao.getDictByNameAndParentId(params); return dictDao.getDictByNameAndParentId(params);
} }
@Override
public List<DictDTO> listCaseTypeParentBind(Map<String, Object> params) {
/**
* wans 2021年7月8日14:40:33
* 这里默认查询字典中案件类型的父ID
*/
params.put("dictParentId", "46d108b2-4ef9-4f6f-b30c-0c700e3ee852");
List<DictDTO> dictDTOS = dictDao.listDict(params);
if(dictDTOS == null || dictDTOS.size() == 0){
return new ArrayList<>(0);
}
// 查询该案件类型下是否绑定了部门
List<DictDTO> bindDictList = new ArrayList<>();
for (DictDTO item : dictDTOS){
List<String> caseTypeIds = new ArrayList<>();
params.put("dictParentId", item.getDictId());
List<DictDTO> subDictDTOs = dictDao.listDict(params);
if(subDictDTOs == null || subDictDTOs.size() == 0){
continue;
}
for(DictDTO subItem : subDictDTOs){
caseTypeIds.add(subItem.getDictId());
}
params.put("caseTypeIds",StringUtils.join(caseTypeIds, ","));
List<Map<String, Object>> deptList = dictDao.listBindDept(params);
if(deptList != null && deptList.size() > 0){
bindDictList.add(item);
}
}
return bindDictList;
}
@Override
public List<DictDTO> listCaseTypeBind(Map<String, Object> params) {
List<DictDTO> dictDTOS = dictDao.listDict(params);
if(dictDTOS == null || dictDTOS.size() == 0){
return new ArrayList<>(0);
}
List<DictDTO> bindDictList = new ArrayList<>();
for(DictDTO item : dictDTOS){
List<String> caseTypeIds = new ArrayList<>();
caseTypeIds.add(item.getDictId());
params.put("caseTypeIds",StringUtils.join(caseTypeIds, ","));
List<Map<String, Object>> deptList = dictDao.listBindDept(params);
if(deptList != null && deptList.size() > 0){
bindDictList.add(item);
}
}
return bindDictList;
}
} }

View File

@ -49,7 +49,7 @@ public class ReportCaseAutoAppServiceImpl extends BaseService implements IReport
//2020-12-22 添加案件分类wans //2020-12-22 添加案件分类wans
// caseFlowType 1 职能部门案件 2 街镇案件 // caseFlowType 1 职能部门案件 2 街镇案件
// caseFlowForward 转发状态 0未转发 1转发 2回退 // caseFlowForward 转发状态 0未转发 1转发 2回退
String caseFlowType = StringUtils.isEmpty(params.get("caseFlowType"))? "" : params.get("caseFlowType").toString(); String caseFlowType = StringUtils.isEmpty(params.get("caseFlowType"))? "1" : params.get("caseFlowType").toString();
params.put("caseFlowType",caseFlowType); params.put("caseFlowType",caseFlowType);
params.put("caseFlowForward","0"); params.put("caseFlowForward","0");
saveReportCaseInfo(params); saveReportCaseInfo(params);
@ -84,7 +84,6 @@ public class ReportCaseAutoAppServiceImpl extends BaseService implements IReport
params.put("caseFlowType","2"); params.put("caseFlowType","2");
break; break;
} }
params.put("caseFlowType","3");
} }
//受理 //受理
params.clear(); params.clear();

View File

@ -216,4 +216,11 @@
dict_name = #{dictName} dict_name = #{dictName}
LIMIT 1; LIMIT 1;
</select> </select>
<!-- 查询案件类型绑定的职能部门ID -->
<select id="listBindDept" parameterType="map" resultType="map">
select * from city_binding_department
where is_delete = '0'
AND FIND_IN_SET(case_type, #{caseTypeIds})
</select>
</mapper> </mapper>