| | |
| | | return ApiResponse.success(applyChagneDetailService.findPageForCompany(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å表æ¥è¯¢") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:applychagnedetail:query") |
| | | public ApiResponse<List<ApplyChagneDetail>> findList (@RequestBody ApplyDetailPageDTO applyDetailPageDTO) { |
| | | return ApiResponse.success(applyChagneDetailService.findListForCompany(applyDetailPageDTO)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applychagnedetail:exportExcel") |
| | |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ·»å å·¥ç§") |
| | | @ApiOperation("æ·»å æ¹æ¡å·¥ç§") |
| | | @PostMapping("/createSolution") |
| | | @RequiresPermissions("business:dispatchunit:create") |
| | | public ApiResponse createSolution(@RequestBody SaveDispatchUnitDTO saveDispatchUnitDTO) { |
| | |
| | | public ApiResponse<InsuranceApply> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(insuranceApplyService.findDetail(id)); |
| | | } |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @ApiOperation("ä¼ä¸ç¾ç½²ä¿å") |
| | | @GetMapping("/getSignLink/{id}") |
| | | @RequiresPermissions("business:insuranceapply:query") |
| | | public ApiResponse<String> getSignLink(@PathVariable Integer id) { |
| | |
| | | insuranceApplyService.applyOpt(insuranceApplyOptDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("è·åä¿åæ¢æä¸åå§éé¢") |
| | | @PostMapping("/getCountCyclePriceVO") |
| | |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.doumee.service.business.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:notices:query") |
| | | public ApiResponse<PageData<Notices>> findPage (@RequestBody PageWrap<Notices> pageWrap) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | pageWrap.getModel().setCompanyId(loginUserInfo.getCompanyId()); |
| | | pageWrap.getModel().setPalt(Constants.ONE); |
| | | return ApiResponse.success(noticesService.findPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.doumee.service.business.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:notices:query") |
| | | public ApiResponse<PageData<Notices>> findPage (@RequestBody PageWrap<Notices> pageWrap) { |
| | | pageWrap.getModel().setPalt(Constants.ZERO); |
| | | return ApiResponse.success(noticesService.findPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public enum NoticeObjectType { |
| | | INSURANCE_APPLY(0, "æä¿ç³è¯·","ä¿é©æ¹æ¡"), |
| | | APPLY_CHANGE(1, "å åä¿ç³è¯·","ä¿é©æ¹æ¡"), |
| | | CHANGE_FACTORY(2, "åå·¥æ¢åç³è¯·","ä¿é©æ¹æ¡"), |
| | | DISPATCH_UNIT(3, "æ´¾é£åä½ç³è¯·","æ´¾é£åä½"), |
| | | TAXES(4, "å¼ç¥¨ç³è¯·","å¼ç¥¨éé¢"), |
| | | SETTLE_CLAIMS(5, "æ¥æ¡çèµ","æ¥æ¡äºº") |
| | | ; |
| | | // æååé |
| | | private int key; |
| | | private String name; |
| | | private String info; |
| | | |
| | | // æé æ¹æ³ |
| | | NoticeObjectType(int key, String name,String info) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.info = info; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getName(int index) { |
| | | for (NoticeObjectType c : NoticeObjectType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | // get set æ¹æ³ |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getInfo() { |
| | | return info; |
| | | } |
| | | |
| | | public void setInfo(String info) { |
| | | this.info = info; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public enum NoticeType { |
| | | |
| | | ZERO(0, "å¾
审æ¹","","","å¾
å®¡æ ¸","å·²ç³è¯·","å¾
åç"), |
| | | ONE(1, "ä¼ä¸å¾
ç¾ç½²","","","å·¥ç§å¾
å®¡æ ¸","","宿åç"), |
| | | TWO(2, "å¾
åºå","å¾
审æ¹","å¾
审æ¹","","",""), |
| | | THREE(3, "ç³è¯·éå","ç³è¯·éå","ç³è¯·éå","","",""), |
| | | FOUR(4, "å·²éå","å·²éå","å·²éå","","",""), |
| | | FIVE(5, "ç³è¯·é©³å","ç³è¯·é©³å","ç³è¯·é©³å","","","") |
| | | ; |
| | | |
| | | // æååé |
| | | private int status; |
| | | private String insuranceApplyDetail; |
| | | private String applyChangeDetail; |
| | | private String changeFactoryDetail; |
| | | private String dispatchUnitDetail; |
| | | private String taxesDetail; |
| | | private String settleClaimsDetail; |
| | | |
| | | // æé æ¹æ³ |
| | | NoticeType(int status, String insuranceApplyDetail,String applyChangeDetail |
| | | , String changeFactoryDetail,String dispatchUnitDetail |
| | | , String taxesDetail,String settleClaimsDetail) { |
| | | this.status = status; |
| | | this.insuranceApplyDetail = insuranceApplyDetail; |
| | | this.applyChangeDetail = applyChangeDetail; |
| | | this.changeFactoryDetail = changeFactoryDetail; |
| | | this.dispatchUnitDetail = dispatchUnitDetail; |
| | | this.taxesDetail = taxesDetail; |
| | | this.settleClaimsDetail = settleClaimsDetail; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getDetail(int status,int type) { |
| | | for (NoticeType c : NoticeType.values()) { |
| | | if (c.getStatus() == status) { |
| | | if(type==NoticeObjectType.INSURANCE_APPLY.getKey() ){ |
| | | return c.getInsuranceApplyDetail(); |
| | | }else if(type == NoticeObjectType.APPLY_CHANGE.getKey()){ |
| | | return c.getApplyChangeDetail(); |
| | | }else if(type == NoticeObjectType.CHANGE_FACTORY.getKey()){ |
| | | return c.getChangeFactoryDetail(); |
| | | }else if(type == NoticeObjectType.DISPATCH_UNIT.getKey()){ |
| | | return c.getDispatchUnitDetail(); |
| | | }else if(type == NoticeObjectType.TAXES.getKey()){ |
| | | return c.getTaxesDetail(); |
| | | }else if(type == NoticeObjectType.SETTLE_CLAIMS.getKey()){ |
| | | return c.getSettleClaimsDetail(); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // get set æ¹æ³ |
| | | public int getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(int status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getInsuranceApplyDetail() { |
| | | return insuranceApplyDetail; |
| | | } |
| | | |
| | | public void setInsuranceApplyDetail(String name) { |
| | | this.insuranceApplyDetail = insuranceApplyDetail; |
| | | } |
| | | |
| | | public String getApplyChangeDetail() { |
| | | return applyChangeDetail; |
| | | } |
| | | |
| | | public void setApplyChangeDetail(String info) { |
| | | this.applyChangeDetail = applyChangeDetail; |
| | | } |
| | | |
| | | public String getChangeFactoryDetail() { |
| | | return changeFactoryDetail; |
| | | } |
| | | |
| | | public void setChangeFactoryDetail(String info) { |
| | | this.changeFactoryDetail = changeFactoryDetail; |
| | | } |
| | | |
| | | public String getDispatchUnitDetail() { |
| | | return dispatchUnitDetail; |
| | | } |
| | | |
| | | public void setDispatchUnitDetail(String info) { |
| | | this.dispatchUnitDetail = dispatchUnitDetail; |
| | | } |
| | | |
| | | public String getTaxesDetail() { |
| | | return taxesDetail; |
| | | } |
| | | |
| | | public void setTaxesDetail(String info) { |
| | | this.taxesDetail = taxesDetail; |
| | | } |
| | | |
| | | public String getSettleClaimsDetail() { |
| | | return settleClaimsDetail; |
| | | } |
| | | |
| | | public void setSettleClaimsDetail(String info) { |
| | | this.settleClaimsDetail = settleClaimsDetail; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public static BigDecimal countDetailFee(Solutions solutions,Date startDate, Date endDate){ |
| | | //æ¥è¯¢ä¿é©å®é
卿 |
| | | Integer cycle = DateUtil.calculateBetween(endDate,startDate,solutions.getTimeUnit()); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.join; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | public interface NoticesJoinMapper extends MPJJoinMapper<Notices> { |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | |
| | | @ApiModelProperty(value = "å
³è对象类å") |
| | | @ExcelColumn(name="å
³è对象类å") |
| | | private String objType; |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "å
³è对象åç§°") |
| | | @ExcelColumn(name="å
³è对象åç§°") |
| | | private String objName; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯") |
| | | @ExcelColumn(name="ç±»å 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯") |
| | | private String type; |
| | | @ApiModelProperty(value = "ç±»å") |
| | | @ExcelColumn(name="ç±»å") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "ç±»åæè¿°") |
| | | @TableField(exist = false) |
| | | private String typeDetail; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å
³èåæ°1") |
| | | @ExcelColumn(name="å
³èåæ°1") |
| | |
| | | @ExcelColumn(name="å
³èä¼ä¸ç¼ç (å
³ècompanyï¼") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "å
³èä¼ä¸åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "å¹³å° 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯", example = "1") |
| | | @ExcelColumn(name="å¹³å° 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯") |
| | | private Integer palt; |
| | |
| | | @ExcelColumn(name="æ¯å¦å·²è¯» 0æªè¯» 1已读") |
| | | private Integer readed; |
| | | |
| | | public Notices(){ |
| | | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param noticeType æ¶æ¯ç±»å |
| | | * @param palt æ°æ®å¹³å° 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯ |
| | | * @param objId å
³èå¯¹è±¡ä¸»é® |
| | | * @param content æ¹æ¡åç§°/åä½åç§°/å¼ç¥¨éé¢/æ¥æ¡äºº |
| | | * @param companyId ä¼ä¸ä¸»é® |
| | | */ |
| | | public Notices(Constants.NoticeObjectType noticeObjectType,Integer palt, Integer objId, String content, Integer companyId,Constants.NoticeType noticeType){ |
| | | this.createDate = new Date(); |
| | | this.creator = userId ; |
| | | this.isdeleted = Constants.ZERO ; |
| | | this.title = noticeObjectType.getName(); |
| | | this.objType = noticeObjectType.getKey(); |
| | | this.objId = objId; |
| | | this.info = noticeObjectType.getInfo(); |
| | | this.content = content; |
| | | this.status = Constants.ZERO; |
| | | this.readed = Constants.ZERO; |
| | | this.type = noticeType.getStatus(); |
| | | this.companyId = companyId; |
| | | this.palt = palt ; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | PageData<ApplyChagneDetail> findPageForCompany(PageWrap<ApplyDetailPageDTO> pageWrap); |
| | | |
| | | |
| | | List<ApplyChagneDetail> findListForCompany(ApplyDetailPageDTO applyDetailPageDTO); |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | |
| | | return pageData; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<ApplyChagneDetail> findListForCompany(ApplyDetailPageDTO applyDetailPageDTO) { |
| | | MPJLambdaWrapper<ApplyChagneDetail> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(ApplyChagneDetail.class); |
| | | queryWrapper.select("t2.name",ApplyChagneDetail::getWorkTypeName); |
| | | queryWrapper.select("t3.name",ApplyChagneDetail::getDuName); |
| | | queryWrapper.select("t4.name",ApplyChagneDetail::getOldWorkTypeName); |
| | | queryWrapper.select("t5.name",ApplyChagneDetail::getOldDuName); |
| | | queryWrapper.selectAs(Member::getName,ApplyChagneDetail::getMemberName); |
| | | queryWrapper.selectAs(Member::getSex,ApplyChagneDetail::getSex); |
| | | queryWrapper.selectAs(Member::getIdcardNo,ApplyChagneDetail::getMemberIdcardNo); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,ApplyChagneDetail::getMemberId); |
| | | queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyChagneDetail::getWorktypeId); |
| | | queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getDuId); |
| | | queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyChagneDetail::getOldWorktypeId); |
| | | queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getOldDuId); |
| | | queryWrapper.in(CollectionUtils.isNotEmpty(applyDetailPageDTO.getTypes()),ApplyChagneDetail::getType,applyDetailPageDTO.getTypes()); |
| | | queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getApplyChangId()),ApplyChagneDetail::getApplyChangeId,applyDetailPageDTO.getApplyChangId()); |
| | | return applyChangeDetailJoinMapper.selectJoinList(ApplyChagneDetail.class, queryWrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public long count(ApplyChagneDetail applyChagneDetail) { |
| | | QueryWrapper<ApplyChagneDetail> wrapper = new QueryWrapper<>(applyChagneDetail); |
| | |
| | | @Autowired |
| | | private SolutionsMapper solutionsMapper; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | /** |
| | | * å¹³å°éåæä¿ |
| | | * @param param |
| | |
| | | ApplyChange update = new ApplyChange(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(user.getId()); |
| | | update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS_NO.getKey()); |
| | | update.setStatus(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey()); |
| | | update.setCheckDate(update.getEditDate()); |
| | | update.setCheckInfo(param.getCheckInfo()); |
| | | update.setCheckUserId(user.getId()); |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | InsuranceApply insuranceApply = insuranceApplyMapper.selectById(model.getApplyId()); |
| | | if(Objects.isNull(insuranceApply)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(insuranceApply.getIsdeleted().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"æ°æ®å·²å é¤,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | Constants.ApplyLogType applyLogType = null; |
| | | String info = ""; |
| | | ApplyChange update = new ApplyChange(); |
| | | Constants.NoticeType noticeType = Constants.NoticeType.FOUR; |
| | | if(param.getDealBackApply() ==1){ |
| | | //妿æ¯é©³å,åªè½å¯é©³åå·²ç¾ç« ç¶æä¸çéåç³è¯·ç¶æè¿è¡æä½ |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){ |
| | |
| | | applyLogType = Constants.ApplyLogType.CA_PALTFORM_REFUSE_APPLY; |
| | | info = applyLogType.getInfo(); |
| | | info = info.replace("${param}", param.getCheckInfo()); |
| | | // |
| | | if( Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){ |
| | | update.setStatus(Constants.ApplyChangeStatus.SIGNATURE.getKey()); |
| | | }else if( Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey())){ |
| | | update.setStatus(Constants.ApplyChangeStatus.UPLOAD.getKey()); |
| | | } |
| | | noticeType = Constants.NoticeType.FIVE; |
| | | }else{ |
| | | //妿æ¯åæ,两ç§ç³è¯·éåç¶æé½å¯æä½ |
| | | if(!(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey()) |
| | |
| | | update.setStatus(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey()); |
| | | applyLogType = Constants.ApplyLogType.CA_PLATFORM_AGREE_BACK_APPLY; |
| | | } |
| | | |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(user.getId()); |
| | | //åæéåï¼ç´æ¥åå°æåç¶æï¼å¦æé©³åéåç³è¯·ï¼åä¿åç¶æåå°å¾
ä¸ä¼ ä¿é©å |
| | |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | applyChangeMapper.updateById(update); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.APPLY_CHANGE; |
| | | if(model.getType().equals(Constants.ONE)){ |
| | | noticeObjectType = Constants.NoticeObjectType.CHANGE_FACTORY; |
| | | } |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),solutions.getName(), |
| | | model.getCompanyId(), noticeType); |
| | | noticesMapper.insert(notices); |
| | | |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | |
| | | if (!loginUserInfo.getType().equals(Constants.ONE)) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ç¨æ·ç±»åé误ï¼éä¼ä¸ç¨æ·æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | BigDecimal fee = BigDecimal.ZERO; |
| | | |
| | | InsuranceApply insuranceApply = insuranceApplyMapper.selectById(applyChange.getApplyId()); |
| | | if (Objects.isNull(insuranceApply)) { |
| | |
| | | applyChange.setStatus(Constants.ZERO); |
| | | applyChangeMapper.insert(applyChange); |
| | | |
| | | this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,fee); |
| | | BigDecimal fee = this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,BigDecimal.ZERO); |
| | | |
| | | ApplyChange applyChangeFee = new ApplyChange(); |
| | | applyChangeFee.setId(applyChange.getId()); |
| | | applyChangeFee.setFee(fee); |
| | | applyChangeMapper.updateById(applyChangeFee); |
| | | |
| | | |
| | | this.saveApplyLog(applyChange,Constants.ApplyChangeLogStatus.UPLOAD,null); |
| | | return applyChange.getId(); |
| | |
| | | if(Objects.isNull(dbApplyChange)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!dbApplyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey())){ |
| | | if(! (dbApplyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey()) |
| | | || dbApplyChange.getStatus().equals(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS_NO.getKey()) ) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(), "ä¸å¡ä¿ç³è¯·åç¶æé误"); |
| | | } |
| | | |
| | |
| | | |
| | | applyChange.setEditDate(new Date()); |
| | | applyChange.setEditor(loginUserInfo.getId()); |
| | | applyChange.setApplyStartTime(applyChange.getValidTime()); |
| | | applyChange.setStatus(Constants.ZERO); |
| | | BigDecimal fee = BigDecimal.ZERO; |
| | | //å é¤å岿°æ® |
| | | applyChagneDetailJoinMapper.delete(new QueryWrapper<ApplyChagneDetail>().lambda().eq(ApplyChagneDetail::getApplyChangeId,applyChange.getId())); |
| | | |
| | | this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,fee); |
| | | BigDecimal fee = this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,BigDecimal.ZERO); |
| | | applyChange.setFee(fee); |
| | | applyChangeMapper.updateById(applyChange); |
| | | this.saveApplyLog(applyChange,Constants.ApplyChangeLogStatus.UPLOAD,null); |
| | |
| | | } |
| | | |
| | | |
| | | public void dealApplyChangeData(ApplyChange applyChange,InsuranceApply insuranceApply,CompanySolution companySolution,Solutions solutions,LoginUserInfo loginUserInfo,BigDecimal fee){ |
| | | public BigDecimal dealApplyChangeData(ApplyChange applyChange,InsuranceApply insuranceApply,CompanySolution companySolution,Solutions solutions,LoginUserInfo loginUserInfo,BigDecimal fee){ |
| | | |
| | | |
| | | //æ¥è¯¢ä¿é©æ¹æ¡ä¸çæææ´¾é£åä½ |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "该ä¼ä¸åé
ä¿é©æ¹æ¡æ æ³è¿è¡å ä¿"); |
| | | } |
| | | //å ä¿æç»æ°æ® 计ç®éé¢ æ ¹æ®æ¹åæ¶é´ è®¡ç® |
| | | applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(insuranceApply.getStartTime(),1)); |
| | | applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(applyChange.getValidTime(),1)); |
| | | CountCyclePriceVO countCyclePriceVO = this.getChangeCountCyclePriceVO(applyChangeCyclePriceDTO); |
| | | BigDecimal detailFee = countCyclePriceVO.getCyclePrice(); |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "该ä¼ä¸åé
ä¿é©æ¹æ¡æ æ³è¿è¡åä¿"); |
| | | } |
| | | //åä¿æç»æ°æ® 计ç®éé¢ æ ¹æ®æ¹åæ¶é´ åä¸å¤© è®¡ç® |
| | | applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(insuranceApply.getStartTime(),3)); |
| | | applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(applyChange.getValidTime(),3)); |
| | | CountCyclePriceVO countCyclePriceVO = this.getChangeCountCyclePriceVO(applyChangeCyclePriceDTO); |
| | | BigDecimal detailFee = countCyclePriceVO.getCyclePrice(); |
| | | this.delChangeDetail(applyChange,delDetailList,insuranceApply,solutions,loginUserInfo,detailFee); |
| | |
| | | if (CollectionUtils.isNotEmpty(changeDetailList)) { |
| | | this.changeDetail(applyChange,changeDetailList,duWorktypeList,duSolutionList,loginUserInfo); |
| | | } |
| | | return fee; |
| | | } |
| | | |
| | | |
| | |
| | | if (applyChagneDetailJoinMapper.selectJoinCount( |
| | | new MPJLambdaWrapper<ApplyChagneDetail>() |
| | | .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId) |
| | | .eq(ApplyChange::getApplyId,applyChange.getApplyId()) |
| | | .eq(ApplyChagneDetail::getMemberId, applyChagneDetail.getMemberId()) |
| | | .in(ApplyChange::getStatus, Constants.ZERO, Constants.ONE) |
| | | ) > Constants.ZERO) { |
| | |
| | | applyChagneDetail.setType(Constants.ONE); |
| | | |
| | | applyChagneDetail.setStartTime(DateUtil.getMontageDate(applyDetail.getStartTime(),1)); |
| | | applyChagneDetail.setEndTime(DateUtil.getMontageDate(applyChange.getStartTime(),3)); |
| | | applyChagneDetail.setEndTime(DateUtil.getMontageDate(applyChange.getApplyStartTime(),3)); |
| | | |
| | | applyChagneDetail.setFee( detailFee.multiply(new BigDecimal(-1))); |
| | | applyChagneDetailJoinMapper.insert(applyChagneDetail); |
| | |
| | | new MPJLambdaWrapper<ApplyChagneDetail>() |
| | | .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId) |
| | | .eq(ApplyChagneDetail::getMemberId, applyChagneDetail.getMemberId()) |
| | | .eq(ApplyChange::getApplyId,applyChange.getApplyId()) |
| | | .in(ApplyChange::getStatus, Constants.ZERO, Constants.ONE) |
| | | ) > Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "å ä¿äººåã" + applyChagneDetail.getMemberName() + "ãåå¨ç³è¯·ä¸çå åä¿/æ¢ååæ®"); |
| | |
| | | List<ApplyDetail> applyDetailList = applyDetailJoinMapper.selectList(new QueryWrapper<ApplyDetail>().lambda() |
| | | .eq(ApplyDetail::getApplyId, applyChange.getApplyId()) |
| | | .eq(ApplyDetail::getMemberId, applyChagneDetail.getMemberId()) |
| | | .le(ApplyDetail::getStartTime, DateUtil.getDate(new Date(),"yyyy-MM-dd HH:mm:ss")) |
| | | .ge(ApplyDetail::getEndTime, DateUtil.getDate(new Date(),"yyyy-MM-dd HH:mm:ss"))); |
| | | .ge(ApplyDetail::getEndTime, new Date())); |
| | | if(applyDetailList.size()>Constants.ONE){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãä¿åä¿¡æ¯å¼å¸¸ï¼åå¨å¤æ¡æ°æ®"); |
| | | }else if(applyDetailList.size()==Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãæªæ¥è¯¢å°æä¿è®°å½"); |
| | | } |
| | | ApplyDetail applyDetail = applyDetailList.get(Constants.ZERO); |
| | | if(applyChange.getValidTime().compareTo( applyDetail.getEndTime())>0){ |
| | |
| | | public void changeOpt(ApplyChangeOptDTO applyChangeOptDTO){ |
| | | if(Objects.isNull(applyChangeOptDTO) |
| | | ||Objects.isNull(applyChangeOptDTO.getApplyId()) |
| | | ||StringUtils.isBlank(applyChangeOptDTO.getOptIllustration())){ |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | |
| | | if(applyChange.getIsdeleted().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"æ°æ®å·²å é¤,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | Constants.ApplyChangeLogStatus applyChangeLogStatus = Constants.ApplyChangeLogStatus.RETURN_APPLY; |
| | | |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.APPLY_CHANGE; |
| | | if(applyChange.getType().equals(Constants.ONE)){ |
| | | noticeObjectType = Constants.NoticeObjectType.CHANGE_FACTORY; |
| | | } |
| | | if(applyChangeOptDTO.getOptType().equals(3)){ |
| | | //åèµ·éåç³è¯· |
| | | if(loginUserInfo.getType().equals(Constants.ONE)){ |
| | | if(!loginUserInfo.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"éä¼ä¸ç«¯ç¨æ·æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if(!(applyChange.getStatus().equals(Constants.ApplyChangeStatus.UPLOAD.getKey()) |
| | |
| | | }else{ |
| | | applyChange.setStatus(Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey()); |
| | | } |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,applyChange.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,applyChange.getId(),solutions.getName(), |
| | | applyChange.getCompanyId(), Constants.NoticeType.THREE); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | }else if(applyChangeOptDTO.getOptType().equals(4)){ |
| | | applyChangeLogStatus = Constants.ApplyChangeLogStatus.PLATFORM_AGREE; |
| | |
| | | }else if(applyChangeOptDTO.getOptType().equals(6)){ |
| | | //ä¼ä¸å
³é |
| | | applyChangeLogStatus = Constants.ApplyChangeLogStatus.CLOSE; |
| | | if(loginUserInfo.getType().equals(Constants.ONE)){ |
| | | if(!loginUserInfo.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"éä¼ä¸ç«¯ç¨æ·æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if(!applyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æ°æ®ç¶æéè¯¯æ æ³è¿è¡è¯¥æä½!"); |
| | | } |
| | | applyChange.setStatus(Constants.ApplyChangeStatus.CLOSE.getKey()); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,applyChange.getId())); |
| | | |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST ); |
| | | } |
| | |
| | | if(company== null || StringUtils.isBlank( company.getEmail()) || !Constants.equalsInteger(company.getSignStatus(),Constants.THREE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼ä¼ä¸å°æªå
·å¤å¨çº¿ç¾ç« æ¡ä»¶ï¼è¯·è系平å°ç®¡çå确认~"); |
| | | } |
| | | InsuranceApply insuranceApply = insuranceApplyMapper.selectById(model.getApplyId()); |
| | | if(Objects.isNull(insuranceApply)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢ä¿åä¿¡æ¯"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | String fileUrl = null; |
| | | if(Constants.equalsObject(model.getType(), Constants.ONE)){ |
| | | fileUrl = ExcelExporter.build(ApplyChange.class).exportChangeUnitExcelToPdf(model,"æ¢åç³è¯·è¡¨"); |
| | |
| | | update.setSignApplyNo(applyNo); |
| | | applyChangeMapper.updateById(update); |
| | | |
| | | |
| | | |
| | | return link; |
| | | } |
| | | |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DispatchUnitMapper; |
| | | import com.doumee.dao.business.DuLogMapper; |
| | | import com.doumee.dao.business.DuSolutionMapper; |
| | | import com.doumee.dao.business.DuWorktypeMapper; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.*; |
| | | import com.doumee.dao.business.join.DispatchUnitJoinMapper; |
| | | import com.doumee.dao.business.join.DuLogJoinMapper; |
| | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer checkWorktype(DispatchUnit param) { |
| | |
| | | //å卿ä½åå² |
| | | this.saveDuLog(update,Constants.DispatchUnitLogType.WORK_TYPE_AUDIT_UN_PASS,update.getCheckInfo()); |
| | | } |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | |
| | | //å卿ä½åå² |
| | | this.saveDuLog(dispatchUnit,Constants.DispatchUnitLogType.AUDIT_UN_PASS,update.getCheckInfo()); |
| | | } |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,dispatchUnit.getId())); |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | @Override |
| | |
| | | duWorktypeMapper.insert(duWorktype); |
| | | } |
| | | } |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,dispatchUnit.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,dispatchUnit.getId(),dispatchUnit.getName(), |
| | | dispatchUnit.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return dispatchUnit.getId(); |
| | | } |
| | | |
| | |
| | | |
| | | // this.dealDuData(saveDispatchUnitDTO,loginUserInfo); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,dispatchUnit.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,dispatchUnit.getId(),dispatchUnit.getName(), |
| | | dispatchUnit.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return dispatchUnit.getId(); |
| | | } |
| | | |
| | |
| | | //å卿ä½åå² |
| | | this.saveDuLog(dispatchUnit,Constants.DispatchUnitLogType.ADD_WORK_TYPE,null); |
| | | this.dealDuData(saveDispatchUnitDTO,loginUserInfo); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,dispatchUnit.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,dispatchUnit.getId(),dispatchUnit.getName(), |
| | | dispatchUnit.getCompanyId(), Constants.NoticeType.ONE); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return dispatchUnit.getId(); |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | private DuWorktypeMapper duWorktypeMapper; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer back(InsuranceApply insuranceApply) { |
| | |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥ç³è¯·ç¶æå·²æµè½¬ï¼å½å䏿¯æè¯¥æä½~"); |
| | | } |
| | | |
| | | Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | InsuranceApply update = new InsuranceApply(); |
| | | update.setEditDate(new Date()); |
| | |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,insuranceApply.getId(),solutions.getName(), |
| | | model.getCompanyId(), Constants.NoticeType.FOUR); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PLATFORM_RETURN; |
| | | String info =applyLogType.getInfo(); |
| | |
| | | if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | Constants.ApplyLogType applyLogType = null; |
| | | String info = ""; |
| | |
| | | update.setEditDate(new Date()); |
| | | update.setSignApplyNo(applyNo); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | return link; |
| | | } |
| | | public String uploadSignFile(String link){ |
| | |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),model.getSolutionsName(),model.getCompanyId(),Constants.NoticeType.TWO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | Multifile f = new Multifile(); |
| | | f.setIsdeleted(Constants.ZERO); |
| | | f.setCreator(model.getCreator()); |
| | |
| | | update.setCheckUserId(model.getCreator()); |
| | | update.setId(model.getId()); |
| | | applyChangeMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.APPLY_CHANGE; |
| | | if(model.getType().equals(Constants.ONE)){ |
| | | noticeObjectType = Constants.NoticeObjectType.CHANGE_FACTORY; |
| | | } |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),model.getSolutionsName(), |
| | | model.getCompanyId(), Constants.NoticeType.TWO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | Multifile f = new Multifile(); |
| | | f.setIsdeleted(Constants.ZERO); |
| | |
| | | // info = info.replace("${param}", update.getCheckInfo()); |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(),StringUtils.isNotBlank(update.getCheckInfo())?info:"",update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | | |
| | | //å é¤å
¶ä»å¾
å |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | |
| | | return 1; |
| | | |
| | | } |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥ç³è¯·ç¶æå·²æµè½¬ï¼å½å䏿¯æè¯¥æä½~"); |
| | | } |
| | | |
| | | Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | Constants.ApplyLogType applyLogType = null; |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | InsuranceApply update = new InsuranceApply(); |
| | |
| | | update.setCheckInfo(insuranceApply.getCheckInfo()); |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | Constants.NoticeType noticeType = Constants.NoticeType.ONE; |
| | | if(insuranceApply.getDealBackApply() ==1){ |
| | | //妿æ¯ä¸éè¿ |
| | | applyLogType = Constants.ApplyLogType.PLATFORM_RETURN ; |
| | | update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey()); |
| | | |
| | | noticeType = Constants.NoticeType.FOUR; |
| | | }else{ |
| | | applyLogType = Constants.ApplyLogType.PLATFORM_CHECK_PASS; |
| | | update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()); |
| | | } |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),model.getCompanyId(),noticeType); |
| | | noticesMapper.insert(notices); |
| | | |
| | | String info =applyLogType.getInfo(); |
| | | info = info.replace("${param}", update.getCheckInfo()); |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!loginUserInfo.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·ç±»åé误ï¼éä¼ä¸ç¨æ·æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | List<ApplyDetail> applyDetailList = insuranceApply.getApplyDetailList(); |
| | | //夿æ¯å¦åå¨éå¤ä¿¡æ¯ |
| | |
| | | |
| | | |
| | | //å¤çä¸çº§æ°æ® |
| | | this.dealApplyDetailData(insuranceApply,applyDetailList,loginUserInfo,countCyclePriceVO); |
| | | this.dealApplyDetailData(insuranceApply,solutions,applyDetailList,loginUserInfo,countCyclePriceVO); |
| | | InsuranceApply updBean = new InsuranceApply(); |
| | | updBean.setId(insuranceApply.getId()); |
| | | updBean.setFee(applyDetailList.stream().map(ApplyDetail::getFee).reduce(BigDecimal.ZERO,BigDecimal::add)); |
| | | insuranceApplyMapper.updateById(updBean); |
| | | //å卿¥å¿æ°æ® |
| | | this.saveApplyLog(insuranceApply,insuranceApplyStatus,null); |
| | | //åéå¾
åä¸å¡ |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),insuranceApply.getCompanyId(),Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return insuranceApply.getId(); |
| | | } |
| | | |
| | |
| | | insuranceApply.setEndTime(countCyclePriceVO.getEndDate()); |
| | | |
| | | applyDetailMapper.delete(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getApplyId,insuranceApply.getId())); |
| | | |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | //å¤çä¸çº§æ°æ® |
| | | this.dealApplyDetailData(insuranceApply,applyDetailList,loginUserInfo,countCyclePriceVO); |
| | | this.dealApplyDetailData(insuranceApply,solutions,applyDetailList,loginUserInfo,countCyclePriceVO); |
| | | insuranceApply.setFee(applyDetailList.stream().map(ApplyDetail::getFee).reduce(BigDecimal.ZERO,BigDecimal::add)); |
| | | insuranceApplyMapper.updateById(insuranceApply); |
| | | //å卿¥å¿æ°æ® |
| | | this.saveApplyLog(insuranceApply,insuranceApplyStatus,null); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),insuranceApply.getCompanyId(),Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return insuranceApply.getId(); |
| | | } |
| | | |
| | | |
| | | |
| | | public void dealApplyDetailData(InsuranceApply insuranceApply,List<ApplyDetail> applyDetailList,LoginUserInfo loginUserInfo,CountCyclePriceVO countCyclePriceVO){ |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | public void dealApplyDetailData(InsuranceApply insuranceApply,Solutions solutions,List<ApplyDetail> applyDetailList,LoginUserInfo loginUserInfo,CountCyclePriceVO countCyclePriceVO){ |
| | | //æ¥è¯¢ä¿é©æ¹æ¡ä¸çæææ´¾é£åä½ |
| | | List<DuSolution> duSolutionList = duSolutionJoinMapper.selectJoinList(DuSolution.class,new MPJLambdaWrapper<DuSolution>() |
| | | .selectAll(DuSolution.class) |
| | |
| | | if(insuranceApply.getIsdeleted().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"æ°æ®å·²å é¤,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | //-----TODU-------RJ-------å®åéåç¶æå弿 è®°------------------ |
| | | Constants.InsuranceApplyStatus insuranceApplyStatus = Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE; |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | if(insuranceApplyOptDTO.getOptType().equals(Constants.ONE)){ |
| | | if(!(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD.getKey()) |
| | | ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey()) |
| | |
| | | }else if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey())){ |
| | | insuranceApplyStatus = Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE; |
| | | } |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,insuranceApply.getId(),solutions.getName(), |
| | | insuranceApply.getCompanyId(), Constants.NoticeType.THREE); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | }else if(insuranceApplyOptDTO.getOptType().equals(Constants.TWO)){ |
| | | insuranceApplyStatus = Constants.InsuranceApplyStatus.CLOSE; |
| | | if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.CLOSE.getKey())){ |
| | |
| | | ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æ°æ®ç¶æéå¯ç³è¯·éå!"); |
| | | } |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | } |
| | | insuranceApply.setStatus(insuranceApplyStatus.getKey()); |
| | | insuranceApply.setCheckDate(new Date()); |
| | |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.NoticesMapper; |
| | | import com.doumee.dao.business.join.NoticesJoinMapper; |
| | | import com.doumee.dao.business.model.ApplyChagneDetail; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.InsuranceApply; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.doumee.service.business.NoticesService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class NoticesServiceImpl implements NoticesService { |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | private NoticesJoinMapper noticesMapper; |
| | | |
| | | @Override |
| | | public Integer create(Notices notices) { |
| | |
| | | @Override |
| | | public PageData<Notices> findPage(PageWrap<Notices> pageWrap) { |
| | | IPage<Notices> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<Notices> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<Notices> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(Notices::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(Notices::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(Notices::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(Notices::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(Notices::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(Notices::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(Notices::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | queryWrapper.selectAll(Notices.class); |
| | | queryWrapper.selectAs(Company::getName,Notices::getCompanyName); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Notices::getCompanyId); |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(Notices::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(Notices::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getTitle() != null) { |
| | | queryWrapper.lambda().eq(Notices::getTitle, pageWrap.getModel().getTitle()); |
| | | } |
| | | if (pageWrap.getModel().getInfo() != null) { |
| | | queryWrapper.lambda().eq(Notices::getInfo, pageWrap.getModel().getInfo()); |
| | | } |
| | | if (pageWrap.getModel().getContent() != null) { |
| | | queryWrapper.lambda().eq(Notices::getContent, pageWrap.getModel().getContent()); |
| | | } |
| | | if (pageWrap.getModel().getObjId() != null) { |
| | | queryWrapper.lambda().eq(Notices::getObjId, pageWrap.getModel().getObjId()); |
| | | queryWrapper.eq(Notices::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getObjType() != null) { |
| | | queryWrapper.lambda().eq(Notices::getObjType, pageWrap.getModel().getObjType()); |
| | | } |
| | | if (pageWrap.getModel().getObjName() != null) { |
| | | queryWrapper.lambda().eq(Notices::getObjName, pageWrap.getModel().getObjName()); |
| | | queryWrapper.eq(Notices::getObjType, pageWrap.getModel().getObjType()); |
| | | } |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.lambda().eq(Notices::getType, pageWrap.getModel().getType()); |
| | | } |
| | | if (pageWrap.getModel().getParam1() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam1, pageWrap.getModel().getParam1()); |
| | | } |
| | | if (pageWrap.getModel().getParam2() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam2, pageWrap.getModel().getParam2()); |
| | | } |
| | | if (pageWrap.getModel().getParam3() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam3, pageWrap.getModel().getParam3()); |
| | | } |
| | | if (pageWrap.getModel().getParam4() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam4, pageWrap.getModel().getParam4()); |
| | | } |
| | | if (pageWrap.getModel().getParam5() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam5, pageWrap.getModel().getParam5()); |
| | | } |
| | | if (pageWrap.getModel().getUserId() != null) { |
| | | queryWrapper.lambda().eq(Notices::getUserId, pageWrap.getModel().getUserId()); |
| | | queryWrapper.eq(Notices::getType, pageWrap.getModel().getType()); |
| | | } |
| | | if (pageWrap.getModel().getCompanyId() != null) { |
| | | queryWrapper.lambda().eq(Notices::getCompanyId, pageWrap.getModel().getCompanyId()); |
| | | queryWrapper.eq(Notices::getCompanyId, pageWrap.getModel().getCompanyId()); |
| | | } |
| | | if (pageWrap.getModel().getPalt() != null) { |
| | | queryWrapper.lambda().eq(Notices::getPalt, pageWrap.getModel().getPalt()); |
| | | queryWrapper.eq(Notices::getPalt, pageWrap.getModel().getPalt()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(Notices::getStatus, pageWrap.getModel().getStatus()); |
| | | queryWrapper.eq(Notices::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getReaded() != null) { |
| | | queryWrapper.lambda().eq(Notices::getReaded, pageWrap.getModel().getReaded()); |
| | | queryWrapper.eq(Notices::getReaded, pageWrap.getModel().getReaded()); |
| | | } |
| | | if(CollectionUtils.isNotEmpty(pageWrap.getSorts())){ |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(noticesMapper.selectPage(page, queryWrapper)); |
| | | }else{ |
| | | queryWrapper.orderByDesc(Notices::getCreateDate); |
| | | } |
| | | |
| | | PageData<Notices> pageData = PageData.from(noticesMapper.selectJoinPage(page,Notices.class, queryWrapper)); |
| | | pageData.getRecords().forEach(i->{ |
| | | i.setTypeDetail( |
| | | Constants.NoticeType.getDetail(i.getObjType(),i.getType()) |
| | | ); |
| | | }); |
| | | return pageData; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.NoticesMapper; |
| | | import com.doumee.dao.business.SettleClaimsLogMapper; |
| | | import com.doumee.dao.business.SettleClaimsMapper; |
| | | import com.doumee.dao.business.dto.SCSupplementDTO; |
| | |
| | | @Autowired |
| | | private SettleClaimsLogJoinMapper settleClaimsLogJoinMapper; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | /** |
| | | * å é¤éä»¶ |
| | | * @return |
| | |
| | | update.setStatus(Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()); |
| | | settleClaimsMapper.updateById(update); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.SETTLE_CLAIMS; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | |
| | | Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_RETURN; |
| | | String info =applyLogType.getInfo(); |
| | | info = info.replace("${param}", update.getCheckInfo()); |
| | |
| | | update.setId(model.getId()); |
| | | update.setStatus(Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()); |
| | | settleClaimsMapper.updateById(update); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.SETTLE_CLAIMS; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | |
| | | Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_CONFIRM_INFORMATION; |
| | | String info =applyLogType.getInfo(); |
| | |
| | | update.setScClaimAccount(Constants.formatBigdecimal(param.getScClaimAccount())); |
| | | update.setClaimAccount(update.getYlClaimAccount().add(update.getSwClaimAccount()).add(update.getScClaimAccount()).add(update.getWgClaimAccount())); |
| | | settleClaimsMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.SETTLE_CLAIMS; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),model.getInformantName(), |
| | | model.getCompanyId(), Constants.NoticeType.ONE); |
| | | noticesMapper.insert(notices); |
| | | |
| | | Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_FINISH; |
| | | String info =applyLogType.getInfo(); |
| | |
| | | } |
| | | //è®°å½æ¥å¿ |
| | | this.saveSettleClaimsLog(settleClaims,Constants.SettleClaimsLogType.UPLOAD,null); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.SETTLE_CLAIMS; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,settleClaims.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,settleClaims.getId(),settleClaims.getInformantName(), |
| | | settleClaims.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | return settleClaims.getId(); |
| | | } |
| | | |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CompanyMapper; |
| | | import com.doumee.dao.business.SolutionsMapper; |
| | | import com.doumee.dao.business.TaxDetialMapper; |
| | | import com.doumee.dao.business.TaxesMapper; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.DirectInvoicingDTO; |
| | | import com.doumee.dao.business.dto.DirectInvoicingDetailDTO; |
| | | import com.doumee.dao.business.dto.EntrustInvoicingDTO; |
| | |
| | | private ApplyChangeJoinMapper applyChangeJoinMapper; |
| | | @Autowired |
| | | private SolutionsMapper solutionsMapper; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | @Override |
| | | public Integer create(Taxes taxes) { |
| | | taxesMapper.insert(taxes); |
| | |
| | | } |
| | | } |
| | | } |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | } |
| | | |
| | | private List<TaxDetial> getDetailListById(Integer id) { |
| | |
| | | queryWrapper.leftJoin(ApplyChange.class,ApplyChange::getId,TaxDetial::getApplyChangeId); |
| | | queryWrapper.leftJoin(Taxes.class,Taxes::getId,TaxDetial::getDelTaxId); |
| | | List<TaxDetial> detialList = taxDetailJoinMapper.selectJoinList(TaxDetial.class,queryWrapper.orderByAsc(TaxDetial::getType)); |
| | | |
| | | |
| | | return detialList; |
| | | } |
| | | |
| | |
| | | update.setDoneDate(update.getEditDate()); |
| | | update.setImgurl(taxes.getImgurl()); |
| | | taxesMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,taxes.getId())); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | taxDetial.setType(Constants.ZERO); |
| | | } |
| | | taxDetailJoinMapper.insertBatchSomeColumn(taxDetialList); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,taxes.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,taxes.getId(),taxes.getPrice().toString(), |
| | | taxes.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æ å¯å¼ç¥¨æ°æ®ï¼æä½å¤±è´¥"); |
| | | } |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,taxes.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,taxes.getId(),taxes.getPrice().toString(), |
| | | taxes.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | // List<DirectInvoicingDetailDTO> directInvoicingDetailDTOList = directInvoicingDTO.getDirectInvoicingDetailDTOList(); |
| | | // for (DirectInvoicingDetailDTO directInvoicingDetailDTO:directInvoicingDetailDTOList) { |
| | | // if(Objects.isNull(directInvoicingDetailDTO) |
| | | // || Objects.isNull(directInvoicingDetailDTO.getId()) |
| | | // || Objects.isNull(directInvoicingDetailDTO.getType()) |
| | | // || Objects.isNull(directInvoicingDetailDTO.getFee()) |
| | | // ){ |
| | | // throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | // } |
| | | // |
| | | // if(directInvoicingDetailDTO.getType().equals(Constants.ZERO)){ |
| | | // //ä¿å |
| | | // InsuranceApply insuranceApply = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class, |
| | | // new MPJLambdaWrapper<InsuranceApply>() |
| | | // .selectAll(InsuranceApply.class) |
| | | // .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | // .select(" ( select count(1) from apply_detail ad where ad.apply_id = t.id ) as insureNum") |
| | | // .notExists(" select 1 from taxes t1 inner join tax_detial t2 on t1.id = t2.tax_id where t2.type = 0 and t1.status != 2 and t.id = t2.INSURANCE_APPLY_ID ") |
| | | // .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | // .eq(InsuranceApply::getId,directInvoicingDetailDTO.getId()) |
| | | // ); |
| | | // if(Objects.isNull(insuranceApply)){ |
| | | // throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"ä¿åå·ã"+insuranceApply.getCode()+"ãæªæ¥è¯¢å°ä¿åä¿¡æ¯"); |
| | | // } |
| | | // |
| | | // |
| | | // |
| | | // }else if(directInvoicingDetailDTO.getType().equals(Constants.ZERO)){ |
| | | // //å åä¿ |
| | | // }else{ |
| | | // //å²çº¢å |
| | | // } |
| | | // |
| | | // |
| | | // } |
| | | // taxDetailJoinMapper.insertBatchSomeColumn(taxDetialList); |
| | | } |
| | | |
| | | |