广州市综治平台后端
xusd
2025-06-16 4ad498e34ed020b3c1ce0d972dd0512cfe01bf82
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseAssistApplyService.java
@@ -26,6 +26,7 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
@@ -40,12 +41,12 @@
import java.util.Map;
/**
 * @author wangwh
 * @version 1.0.0
 * @title: 联合处置申请信息表业务逻辑处理
 * @Description 联合处置申请信息表业务逻辑处理
 * @company hugeinfo
 * @author wangwh
 * @Time 2024-09-05 17:25:04
 * @version 1.0.0
 */
@Slf4j
@Service
@@ -76,6 +77,7 @@
    /**
    * 更新对象
     *
    * @param entity 对象
    */
    public void updateCaseAssistApply(CaseAssistApply entity){
@@ -89,6 +91,7 @@
    /**
    * 条件更新对象
     *
    * @param entity 对象
    * @param terms 条件
    */
@@ -103,6 +106,7 @@
    /**
    * 根据编号物理删除
     *
    * @param id 查询条件集合
    */
    public void deleteCaseAssistApply(String id){
@@ -116,6 +120,7 @@
    /**
    * 按条件查询
     *
    * @param terms 条件
    * @return List
    */
@@ -125,6 +130,7 @@
    /**
    * 按条件统计
     *
    * @param terms 条件
    * @return long
    */
@@ -134,6 +140,7 @@
    /**
    * 按条件分页查询
     *
    * @param page 分页对象
    * @param terms 条件
    * @return Page
@@ -146,6 +153,7 @@
    /**
    * 新增或更新对象
     *
    * @param caseAssistApply 实体对象
    */
    public void saveCaseAssistApply(CaseAssistApply caseAssistApply){
@@ -166,6 +174,7 @@
    /**
     * 添加联合处置申请
     *
     * @param caseAssistApply 实体对象
     */
    public void addCaseAssistApply(CaseAssistApply caseAssistApply, String userId){
@@ -183,8 +192,25 @@
            caseAssistApply.setApplyTime(now);
            caseAssistApply.setCreateTime(now);
            caseAssistApply.setUpdateTime(now);
            //如果申请联合处置的机构是区级机构,由区综治中心审核
            boolean isQu = false;
            String quUnitId = "";
            if (StringUtils.isNotEmpty(caseAssistApply.getApplyAssistUnitId())) {
                String[] unitIdList = caseAssistApply.getApplyAssistUnitId().split(BaseConsts.COMMA);
                for (String unitId : unitIdList) {
                    CtUnitDTO unitById = custClient.getUnitById(unitId);
                    if (unitById.getUnitGrade() == 2) {
                        isQu = true;
                        quUnitId = unitById.getId();
                        break;
                    }
                }
            }
            // 上级综治中心审核
            CtUnitDTO ctUnitDTO = custClient.getParentZzzxUnit(loginUser.getUnitId());
            if (isQu) {
                ctUnitDTO=custClient.getParentZzzxUnit(quUnitId);
            }
            caseAssistApply.setAuditUnitId(ctUnitDTO.getId());
            caseAssistApply.setAuditUnitName(ctUnitDTO.getUnitName());
            mapper.insert(caseAssistApply);
@@ -202,6 +228,7 @@
    /**
     * 审核联合处置审核
     *
     * @param caseAssistApply 实体对象
     */
    public void reviewCaseAssistApply(CaseAssistApply caseAssistApply, String userId){
@@ -333,6 +360,7 @@
    /**
     * 根据案件编号查询联合处置申请
     *
     * @param id 主键编号
     * @return long
     */
@@ -359,6 +387,7 @@
    /**
     * 首页查询
     *
     * @param auditUnitId 审核组织编号
     * @return long
     */
@@ -368,6 +397,7 @@
    /**
     * 首页-待审核条件统计
     *
     * @param terms 条件
     * @return long
     */
@@ -377,6 +407,7 @@
    /**
     * 按条件查询
     *
     * @param page 分页对象
     * @param terms 条件
     * @return List