k94314517
2024-04-01 5652bd7f2e7c850dbf8403e7bb85224d3727ba41
git ch
已添加1个文件
已修改6个文件
122 ■■■■ 文件已修改
server/service/src/main/java/com/doumee/core/utils/Constants.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/dto/CloseDTO.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/ApplyLog.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/UnionApplyService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/shop/src/main/java/com/doumee/api/business/UnionApplyController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -784,18 +784,26 @@
        CA_CHANGUNIT_APPLY_SIGN(24, "换厂申请企业签章","",1),
        CA_UPLOAD_AGAIN(25, "再次投保","",1),
        WTB_FINISH_FAQRS(26, "委托保 - ä¼ä¸šå®Œæˆç­¾ç½²æ–¹æ¡ˆç¡®è®¤ä¹¦","",0),
        WTB_FINISH_MEMBER_LIST(27, "委托保 - ä¼ä¸šå®Œæˆç­¾ç½²äººå‘˜åå•","",0),
        CA_WTB_FINISH_MEMBER_LIST(28, "委托保 - åŠ å‡ä¿ç­¾ç½²äººå‘˜åå•","",1),
        UPLOAD_AGAIN(29, "再次投保","",0),
        PALTFORM_EDIT_BD(30, "修改保单","修改原因:${param}",0),
        SHOP_CLOSE_WTB_APPLY(31, "关闭申请","原因:${param}",0),
        /**
         * å§”托保合并单
         */
        IA_HBD_UPLOAD(32, "提交申请","",3),
        IA_HBD_UPLOAD_TBD(33, "上传投保单","",3),
        IA_HBD_SIGNATURE_TBD(34, "签署投保单","",3),
        IA_HBD_UPLOAD_INSURANCE(35, "上传保险单","保险生效起期:${param1}变更为${param2}",3),
        IA_HBD_CLOSE(36, "退回申请","原因:${param}",3),
server/service/src/main/java/com/doumee/dao/business/dto/CloseDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.doumee.dao.business.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2024/4/1 14:57
 */
@Data
public class CloseDTO {
    @ApiModelProperty(value = "业务主键")
    private Integer id;
    @ApiModelProperty(value = "退回原因")
    private String reason;
}
server/service/src/main/java/com/doumee/dao/business/model/ApplyLog.java
@@ -36,6 +36,7 @@
        this.beforeContent=before;
        this.afterContent=after;
    }
    public ApplyLog(ApplyChange apply,String title,String content,Integer objId,Integer objType, String before,String after){
        this.title =title;
        this.content=content;
@@ -49,6 +50,20 @@
        this.afterContent=after;
    }
    public ApplyLog(UnionApply apply,String title,String content,Integer objId,Integer objType, String before,String after){
        this.title =title;
        this.content=content;
        this.applyId = apply.getId();
        this.createDate =apply.getEditDate();
        this.creator =apply.getEditor();
        this.status = apply.getStatus();
        this.objId=objId;
        this.objType = objType;
        this.beforeContent=before;
        this.afterContent=after;
    }
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键", example = "1")
    @ExcelColumn(name="主键")
server/service/src/main/java/com/doumee/service/business/UnionApplyService.java
@@ -2,10 +2,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.dto.SaveUnionApplyDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.dto.UnionApplyBXDDTO;
import com.doumee.dao.business.dto.UploadMultifileDTO;
import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.model.UnionApply;
import java.util.List;
@@ -107,9 +104,9 @@
    /**
     * å–消合并单
     * @param id
     * @param closeDTO
     */
    void cancelMerge(Integer id);
    void cancelMerge(CloseDTO closeDTO);
    /**
     * ä¸Šä¼ æŠ•保单
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -777,6 +777,13 @@
//        applyLogMapper.insert(log);
//
//        startSendEmail(f, model.getCompanyName(),model.getSolutionsName(),model.getSolutionEmail());
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.IA_HBD_SIGNATURE_TBD;
        ApplyLog log = new ApplyLog(model,applyLogType.getName(), null
                ,model.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(model));
        applyLogMapper.insert(log);
        return  f;
    }
@@ -1932,10 +1939,10 @@
                .selectAs(Solutions::getTimeUnit,InsuranceApply::getTimeUnit)
                .selectAs(Solutions::getType,InsuranceApply::getSolutionType)
                .selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
                .selectAs(Solutions::getName,InsuranceApply::getShopName)
                .selectAs(Company::getName,InsuranceApply::getCompanyName)
                .select(" ( select max(ac.APPLY_START_TIME) from apply_change ac  where ac.apply_id = t.id and ac.status = 2 ) as lastChangeDate")
                .select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad  where ad.apply_id = t.id ) as insureNum")
                .select(" t3.name as shopName")
                .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
                .leftJoin(Company.class,Company::getId,Solutions::getShopId)
server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java
@@ -10,10 +10,7 @@
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.CompanyMapper;
import com.doumee.dao.business.MultifileMapper;
import com.doumee.dao.business.SolutionsMapper;
import com.doumee.dao.business.UnionApplyMapper;
import com.doumee.dao.business.*;
import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.join.ApplyDetailJoinMapper;
import com.doumee.dao.business.join.InsuranceApplyJoinMapper;
@@ -80,6 +77,8 @@
    @Autowired
    private SmsEmailService smsEmailService;
    @Autowired
    private ApplyLogMapper applyLogMapper;
    @Value("${debug_model}")
    private boolean debugModel;
@@ -359,6 +358,13 @@
                .set(ApplyDetail::getUnionApplyId,unionApply.getId())
                .in(ApplyDetail::getApplyId,saveUnionApplyDTO.getApplyIds()));
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.IA_HBD_UPLOAD;
        ApplyLog log = new ApplyLog(unionApply,applyLogType.getName(), null
                ,unionApply.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionApply));
        applyLogMapper.insert(log);
        return unionApply.getId();
    }
@@ -366,16 +372,19 @@
    /**
     * å–消保单合并
     * @param id
     * @param closeDTO
     */
    @Override
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public void cancelMerge(Integer id){
    public void cancelMerge(CloseDTO closeDTO){
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(!user.getType().equals(Constants.TWO)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!");
        }
        UnionApply unionApply = unionApplyMapper.selectById(id);
        if(Objects.isNull(closeDTO)||Objects.isNull(closeDTO.getId())){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        UnionApply unionApply = unionApplyMapper.selectById(closeDTO.getId());
        if(Objects.isNull(unionApply)||!Constants.equalsInteger(unionApply.getIsdeleted(),Constants.ZERO)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
@@ -411,6 +420,16 @@
                .set(UnionApply::getStatus,Constants.UnionApplyStatus.CLOSE.getKey())
                .eq(UnionApply::getId,unionApply.getId())
        );
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.IA_HBD_CLOSE;
        String info =applyLogType.getInfo();
        info = info.replace("${param}", closeDTO.getReason());
        ApplyLog log = new ApplyLog(unionApply,applyLogType.getName(), info
                ,unionApply.getId(),applyLogType.getKey(),null, null);
        applyLogMapper.insert(log);
        applyLogMapper.insert(log);
    }
@@ -705,8 +724,10 @@
        }
    }
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.IA_HBD_UPLOAD_TBD;
        ApplyLog log = new ApplyLog(unionApply,applyLogType.getName(), null
                ,unionApply.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionApply));
        applyLogMapper.insert(log);
}
server/shop/src/main/java/com/doumee/api/business/UnionApplyController.java
@@ -6,10 +6,7 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.dto.SaveUnionApplyDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.dto.UnionApplyBXDDTO;
import com.doumee.dao.business.dto.UploadMultifileDTO;
import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.model.UnionApply;
import com.doumee.service.business.UnionApplyService;
import io.swagger.annotations.Api;
@@ -103,10 +100,10 @@
    }
    @ApiOperation("关闭合并单")
    @GetMapping("/close")
    @PostMapping("/close")
    @RequiresPermissions("business:unionapply:close")
    public ApiResponse close(@RequestParam Integer id) {
        unionApplyService.cancelMerge(id);
    public ApiResponse close(@RequestBody CloseDTO closeDTO) {
        unionApplyService.cancelMerge(closeDTO);
        return ApiResponse.success(null);
    }