forked from gzzfw/backEnd/gz-dyh

liyj
2024-09-29 b311ca2f01e9602c1bf8caab04b4d641b314e341
Merge remote-tracking branch 'origin/gzdyh_test' into gzdyh_test
3 files modified
57 ■■■■ changed files
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoWebController.java 16 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseRegisterInfoWebController.java 15 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml 26 ●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoWebController.java
@@ -96,11 +96,27 @@
        if (StringUtils.isNotBlank(assistUnitId)){
            terms.put("assistUnitId", assistUnitId);
        }
        // 实际调解组织编号
        String mediateUnitName = request.getParameter("mediateUnitName");
        if (StringUtils.isNotBlank(mediateUnitName)){
            terms.put("mediateUnitName", mediateUnitName);
        }
        // 配合组织,多个用,隔开
        String assistUnitName = request.getParameter("assistUnitName");
        if (StringUtils.isNotBlank(assistUnitName)){
            terms.put("assistUnitName", assistUnitName);
        }
        // 配合组织,多个用,隔开
        String evaluateGrade = request.getParameter("evaluateGrade");
        if (StringUtils.isNotBlank(evaluateGrade)){
            terms.put("evaluateGrade", evaluateGrade);
        }
        // 配合组织,多个用,隔开
        String mediResult = request.getParameter("mediResult");
        if (StringUtils.isNotBlank(mediResult)){
            terms.put("mediResult", mediResult);
        }
        String peopleNum = request.getParameter("peopleNum");
        if (StringUtils.isNotBlank(peopleNum)){
            String[] split = peopleNum.split("-");
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseRegisterInfoWebController.java
@@ -3,9 +3,12 @@
import cn.huge.base.common.utils.ObjectUtils;
import cn.huge.base.common.utils.ReturnFailUtils;
import cn.huge.base.common.utils.ReturnSucUtils;
import cn.huge.base.config.CurrentUser;
import cn.huge.module.cases.domain.dto.CaseRegisterDTO;
import cn.huge.module.cases.domain.po.CaseInfo;
import cn.huge.module.cases.service.CaseInfoService;
import cn.huge.module.client.api.impl.CustClientImpl;
import cn.huge.module.cust.dto.CtUserDTO;
import com.google.common.collect.Maps;
import dm.jdbc.util.StringUtil;
import lombok.extern.slf4j.Slf4j;
@@ -106,6 +109,11 @@
        if (org.apache.commons.lang3.StringUtils.isNotBlank(mediResultName)) {
            terms.put("mediResultName", mediResultName);
        }
        // 事项状态名称
        String mediResult = request.getParameter("mediResult");
        if (org.apache.commons.lang3.StringUtils.isNotBlank(mediResult)) {
            terms.put("mediResult", mediResult);
        }
        // 登记时间区间
        String createStart = request.getParameter("createStart");
        String createEnd = request.getParameter("createEnd");
@@ -118,10 +126,12 @@
    @Autowired
    private CaseInfoService service;
    @Autowired
    private CustClientImpl custClient;
    @GetMapping("/pageQuery")
    public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size
    ) {
            , @CurrentUser String userId) {
        try {
            Map<String, Object> terms = getParameter();
            // 排序
@@ -161,6 +171,9 @@
            }
            PageRequest pageRequest = PageRequest.of(page - 1, size, sort);
            CtUserDTO loginUser = custClient.clientGetUserAll(userId);
            log.info("xsd:user{}",loginUser.getUnitId());
            terms.put("inputUnitId", loginUser.getUnitId());
            Page<CaseRegisterDTO> caseInfoPage = service.pageQueryRegister(pageRequest, terms);
            return ReturnSucUtils.getRepInfo("处理成功", caseInfoPage);
        } catch (Exception e) {
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml
@@ -319,7 +319,7 @@
                    and a.input_unit_id = #{terms.inputUnitId}
                </if>
                <if test="terms.inputUnitName != null and terms.inputUnitName !=''">
                    and a.input_unit_name = #{terms.inputUnitName}
                    and a.input_unit_name like CONCAT('%', #{terms.inputUnitName}, '%')
                </if>
                <if test="terms.visitTimeStart != null and terms.visitTimeStart !='' and terms.visitTimeEnd != null and terms.visitTimeEnd !=''">
                    and (DATE_FORMAT(a.visit_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{terms.visitTimeStart}
@@ -356,10 +356,10 @@
                    and a.case_ref = #{terms.caseRef}
                </if>
                <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
                    and a.plaintiffs = #{terms.plaintiffs}
                    and a.plaintiffs like CONCAT('%', #{terms.plaintiffs}, '%')
                </if>
                <if test="terms.defendants != null and terms.defendants !=''">
                    and a.defendants = #{terms.defendants}
                    and a.defendants like CONCAT('%', #{terms.defendants}, '%')
                </if>
                <if test="terms.peopleNumStart != null and terms.peopleNumStart !=''">
                    and a.people_num  <![CDATA[ >= ]]> #{terms.peopleNumStart}
@@ -381,6 +381,15 @@
                </if>
                <if test="terms.assistUnitId != null and terms.assistUnitId !=''">
                    and b.assist_unit_id = #{terms.assistUnitId}
                </if>
                <if test="terms.mediateUnitName != null and terms.mediateUnitName !=''">
                    and b.mediate_unit_name like CONCAT('%', #{terms.mediateUnitName}, '%')
                </if>
                <if test="terms.assistUnitName != null and terms.assistUnitName !=''">
                    and b.assist_unit_name like CONCAT('%', #{terms.assistUnitName}, '%')
                </if>
                <if test="terms.mediResult != null and terms.mediResult !=''">
                    and b.medi_result = #{terms.mediResult}
                </if>
            </where>
        </if>
@@ -706,8 +715,8 @@
    <sql id="where-register-part">
        <if test="terms != null">
            <where>
                <if test="terms.inputUnitName != null and terms.inputUnitName !=''">
                    and t1.input_unit_mame = #{inputUnitName}
                <if test="terms.inputUnitId != null and terms.inputUnitId !=''">
                    and t1.input_unit_id = #{terms.inputUnitId}
                </if>
                <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
                    and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
@@ -729,10 +738,10 @@
                    and t1.canal_name = #{terms.canalName}
                </if>
                <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
                    and t1.plaintiffs = #{terms.plaintiffs}
                    and t1.plaintiffs like CONCAT('%', #{terms.plaintiffs}, '%')
                </if>
                <if test="terms.defendants != null and terms.defendants !=''">
                    and t1.defendants = #{terms.defendants}
                    and t1.defendants like CONCAT('%', #{terms.defendants}, '%')
                </if>
                <if test="terms.statusName != null and terms.statusName !=''">
                    and t1.status_name = #{terms.statusName}
@@ -740,6 +749,9 @@
                <if test="terms.mediResultName != null and terms.mediResultName !=''">
                    and t2.medi_result_name = #{terms.mediResultName}
                </if>
                <if test="terms.mediResult != null and terms.mediResult !=''">
                    and t2.medi_result = #{terms.mediResult}
                </if>
            </where>
        </if>
    </sql>