Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/yunyibao into 2.0.1
| | |
| | | |
| | | @ApiModelProperty(value = "apiåèµ·æ¾ç¤ºç¡®è®¤ç¾å") |
| | | private Integer apiAffirm; |
| | | @ApiModelProperty(value = "éªç¼ç« ä½ç½®è®¾ç½®å¼ä¸º0-1çå°æ°;") |
| | | private Float qiFengOffset ;//float ? éªç¼ç« ä½ç½®è®¾ç½®å¼ä¸º0-1çå°æ°; |
| | | |
| | | } |
| | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | |
| | | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), |
| | | }) |
| | | @RequiresPermissions("business:worktype:create") |
| | | public ApiResponse<Set<Integer>> importExcelForSolution (@ApiParam(value = "file") MultipartFile file , Integer insuranceId) { |
| | | public ApiResponse<Set<Map<String,Object>>> importExcelForSolution (@ApiParam(value = "file") MultipartFile file , Integer insuranceId) { |
| | | return ApiResponse.success(worktypeService.importBatchForSolutions(file,insuranceId)); |
| | | } |
| | | |
| | |
| | | <swagger.bootstrap-ui.version>1.9.6</swagger.bootstrap-ui.version> |
| | | <fastjson.version>1.2.70</fastjson.version> |
| | | <druid.version>1.2.0</druid.version> |
| | | <!--<mybatis.plus.version>3.5.7</mybatis.plus.version>--> |
| | | <mybatis.plus.version>3.4.2</mybatis.plus.version> |
| | | <apache.shiro.version>1.7.0</apache.shiro.version> |
| | | <oshi.version>5.7.0</oshi.version> |
| | |
| | | public static final String PRIVACY ="PRIVACY"; |
| | | public static final String USE ="USE"; |
| | | |
| | | |
| | | public static final String GOODS_IMG_DIR ="GOODS_IMG_DIR"; |
| | | public static final String CREDIT_CODE_REGEX = "[0-9A-HJ-NPQRTUWXY]{2}\\d{6}[0-9A-HJ-NPQRTUWXY]{10}"; |
| | | |
| | | |
| | | public static final String ROOT_PATH="ROOT_PATH";//æ¬å°æä»¶ä¸ä¼ å°åé
ç½® |
| | | public static final String FILE_DIR="FILE_DIR";//æ¬å°æä»¶è®¿é®å°åé
ç½® |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.Worktype; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | public interface WorktypeMapper extends BaseMapper<Worktype> { |
| | | public interface WorktypeMapper extends MPJBaseMapper<Worktype> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.join; |
| | | |
| | | import com.doumee.dao.business.model.TaxDetial; |
| | | import com.doumee.dao.business.model.Worktype; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | public interface WorktypeJoinMapper extends MPJJoinMapper<Worktype> { |
| | | |
| | | |
| | | void insertBatchSomeColumn(List<Worktype> taxDetialList); |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.SystemUserDetailVO; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface SystemUserMapper extends BaseMapper<SystemUser> { |
| | | public interface SystemUserMapper extends MPJBaseMapper<SystemUser> { |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¨æ·å表 |
| | |
| | | |
| | | @ApiModelProperty(value = "åå¸ç¼ç ", example = "1" ) |
| | | private Integer cityId; |
| | | @ApiModelProperty(value = "é¨é¨ç¼ç ç¼ç ", example = "1" ) |
| | | private Integer departmentId; |
| | | |
| | | @ApiModelProperty(value = "åå¸ç¼ç ", hidden = true) |
| | | private List<Integer> cityIds; |
| | |
| | | |
| | | @ApiModelProperty(value = "微信å°ç¨åºOPENID") |
| | | private String openid; |
| | | @ApiModelProperty(value = "ä¼ä¸åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | @ApiModelProperty(value = "é¨é¨åç§°") |
| | | @TableField(exist = false) |
| | | private String departmentName; |
| | | @ApiModelProperty(value = "ææä¼ä¸æ°") |
| | | @TableField(exist = false) |
| | | private Integer authNum; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦ä¸»ç®¡ 0å¦ 1æ¯", example = "1") |
| | | @TableField(exist = false) |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | |
| | | |
| | | List<String> importBatch(MultipartFile file); |
| | | |
| | | Set<Integer> importBatchForSolutions(MultipartFile file , Integer insuranceId); |
| | | Set<Map<String,Object>> importBatchForSolutions(MultipartFile file , Integer insuranceId); |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.api.R; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | |
| | | .eq(ApplyDetail::getMemberId, detail.getMemberId()) |
| | | .orderByDesc(ApplyDetail::getCreateDate) |
| | | .last("limit 1")); |
| | | if (oldModel == null || oldModel.getStartTime() == null || oldModel.getStartTime().getTime() > update.getApplyStartTime().getTime()) { |
| | | // if (oldModel == null || oldModel.getStartTime() == null || oldModel.getStartTime().getTime() > update.getApplyStartTime().getTime()) { |
| | | // throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼ç¨æ·ã" + detail.getMemberName() + "ãåä¿åä¿¡æ¯æè¯¯ï¼å½åç³è¯·ä¸æ¯æåä¿å¤çï¼"); |
| | | // } |
| | | // if(!(oldModel.getStartTime().getTime()<=update.getDelValidTime().getTime()&& oldModel.getEndTime().getTime()>=update.getDelValidTime().getTime())){ |
| | | // throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼ç¨æ·ã" + detail.getMemberName() + "ãåä¿æ¥ææªå¨ä¿åè®°å½æ¥æä¸ï¼"); |
| | | // } |
| | | if (oldModel == null || oldModel.getEndTime() == null || oldModel.getEndTime().getTime() < update.getDelValidTime().getTime()) { |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼ç¨æ·ã" + detail.getMemberName() + "ãåä¿åä¿¡æ¯æè¯¯ï¼å½åç³è¯·ä¸æ¯æåä¿å¤çï¼"); |
| | | } |
| | | if(!(oldModel.getStartTime().getTime()<=update.getDelValidTime().getTime()&& oldModel.getEndTime().getTime()>=update.getDelValidTime().getTime())){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼ç¨æ·ã" + detail.getMemberName() + "ãåä¿æ¥ææªå¨ä¿åè®°å½æ¥æä¸ï¼"); |
| | | } |
| | | BigDecimal sumFee = Objects.isNull(insuranceApply.getServerCost())? |
| | | solutions.getPrice(): |
| | |
| | | sumFee |
| | | ,insuranceApply.getStartTime(),insuranceApply.getFinalEndTime(),oldModel.getStartTime(),delValidTime |
| | | ) ; |
| | | }else{ |
| | | delValidTime = oldModel.getStartTime(); |
| | | updateFee = BigDecimal.ZERO; |
| | | } |
| | | if (oldModel.getStartTime().getTime() < System.currentTimeMillis()) { |
| | | //// 2024å¹´5æ8æ¥17:37:23 ä¿®æ¹ è®¡ç®äº§çè´¹ç¨ |
| | |
| | | if(!Constants.equalsInteger(applyDetail.getChangeStatus(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"åä¿äººåã" + applyChagneDetail.getMemberName() + "ãä¿åä¿¡æ¯å¼å¸¸,æ°æ®å·²è¢«åä¿æ æ³å次åä¿"); |
| | | } |
| | | applyChagneDetail.setPrice(applyDetail.getPrice()); |
| | | applyChagneDetail.setCreateDate(new Date()); |
| | | applyChagneDetail.setCreator(loginUserInfo.getId()); |
| | | applyChagneDetail.setIsdeleted(Constants.ZERO); |
| | |
| | | applyChagneDetail.setReduceMoney(solutions.getPrice().multiply(new BigDecimal(-1))); |
| | | applyChagneDetail.setFee(BigDecimal.ZERO); |
| | | } |
| | | applyChagneDetail.setId(null); |
| | | applyChagneDetailJoinMapper.insert(applyChagneDetail); |
| | | } |
| | | } |
| | |
| | | notifyUrl = notifyUrl.replace("${type}","0").replace("${id}",model.getId().toString()); |
| | | |
| | | //临æ¶ä½¿ç¨ |
| | | fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241120/1c80f0d7-ab35-4355-b9fe-944464643115.pdf"; |
| | | String applyNo = signService.applySign(company.getName(),fileUrl,company.getName(),company.getCode(),company.getEmail(),"人åååç¾ç« ",company.getSignId(),notifyUrl); |
| | | fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241230/a0d128f2-ba6c-4ad4-b86b-b2610a513d41.pdf"; |
| | | String applyNo = signService.applySignDoByParam(company.getName(),fileUrl,company.getName(),company.getCode(),company.getEmail(),"人åååç¾ç« ",company.getSignId(),notifyUrl,new Float(0.7)); |
| | | |
| | | // String applyNo = signService.applySignLocalFile(company.getName(),company.getName(),fileUrl,company.getCode(),company.getEmail(),"人åååç¾ç« ",company.getSignId(),notifyUrl); |
| | | if(StringUtils.isBlank(applyNo) ){ |
| | |
| | | for (DuSolution s : solutions){ |
| | | DuSolution ns = new DuSolution(); |
| | | BeanUtils.copyProperties(s, ns); |
| | | ns.setId(null); |
| | | ns.setDispatchUnitId(newVersion.getId()); |
| | | ns.setCheckDate(update.getEditDate()); |
| | | ns.setStatus(Constants.ONE); |
| | |
| | | } |
| | | DuWorktype nw = new DuWorktype(); |
| | | BeanUtils.copyProperties(w, nw); |
| | | nw.setId(null); |
| | | nw.setCreateDate(new Date()); |
| | | nw.setCheckDate(update.getEditDate()); |
| | | nw.setStatus(Constants.ONE); |
| | |
| | | DuSolution duSolution = duSolutionMapper.selectOne(new QueryWrapper<DuSolution>().lambda().eq(DuSolution::getDispatchUnitId,saveDispatchUnitDTO.getId()) |
| | | .eq(DuSolution::getIsdeleted,Constants.ZERO) |
| | | .eq(DuSolution::getSolutionId,saveDuSolutionDTO.getSolutionId()).last("limit 1")); |
| | | Integer duSolutionNum = duSolutionMapper.selectCount(new QueryWrapper<DuSolution>().lambda().eq(DuSolution::getDispatchUnitId,saveDuSolutionDTO.getId())); |
| | | Integer duSolutionNum = duSolutionMapper.selectCount(new QueryWrapper<DuSolution>().lambda().eq(DuSolution::getDispatchUnitId,saveDuSolutionDTO.getId())).intValue(); |
| | | if(Objects.isNull(duSolution)){ |
| | | duSolution = new DuSolution(); |
| | | duSolution.setCreateDate(new Date()); |
| | |
| | | .eq(DuWorktype::getWorkTypeId,saveDuWorkTypeDTO.getWorkTypeId()))>0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ã"+saveDuSolutionDTO.getSolutionName()+"ãè¯¥æ¹æ¡ä¸"+saveDuWorkTypeDTO.getWorkTypeName()+"该工ç§å·²åå¨"); |
| | | } |
| | | Integer duWorkTypeNum = duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda().eq(DuWorktype::getDuSolutionId,duSolution.getId())); |
| | | Integer duWorkTypeNum = duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda().eq(DuWorktype::getDuSolutionId,duSolution.getId())).intValue(); |
| | | DuWorktype duWorktype = new DuWorktype(); |
| | | duWorktype.setCreateDate(new Date()); |
| | | duWorktype.setCreator(loginUserInfo.getId()); |
| | |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.api.R; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | |
| | | member.setDuId(applyDetail.getDuId()); |
| | | member.setWorktypeId(applyDetail.getWorktypeId()); |
| | | memberMapper.updateById(member); |
| | | applyDetail.setMemberName(member.getName()); |
| | | } |
| | | }else{ |
| | | member = memberMapper.selectById(applyDetail.getMemberId()); |
| | |
| | | member.setDuId(applyDetail.getDuId()); |
| | | member.setWorktypeId(applyDetail.getWorktypeId()); |
| | | memberMapper.updateById(member); |
| | | applyDetail.setMemberName(member.getName()); |
| | | } |
| | | applyDetail.setMemberId(member.getId()); |
| | | applyDetail.setIdcardNo(member.getIdcardNo()); |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ ä¼åä¿¡æ¯å¨æ¹æ¡ä¸æ¯å¦åå¨å²çªæ°æ® |
| | | * @param solutionId |
| | | * @param startTime |
| | | * @param endTime |
| | | */ |
| | |
| | | if(solutions.getType().equals(Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼éå§æä¿æ¹æ¡ä¿åï¼æ æ³è¿è¡è¯¥æä½!"); |
| | | } |
| | | String fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241120/1c80f0d7-ab35-4355-b9fe-944464643115.pdf";//ExcelExporter.build(InsuranceApply.class).exportApplyExcelToPdf(model,"人ååå"); |
| | | String fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241230/a0d128f2-ba6c-4ad4-b86b-b2610a513d41.pdf";//ExcelExporter.build(InsuranceApply.class).exportApplyExcelToPdf(model,"人ååå"); |
| | | String notifyUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SIGN_DONE_NOTIFY_URL).getCode(); |
| | | notifyUrl = notifyUrl.replace("${type}","0").replace("${id}",model.getId().toString()); |
| | | //String applyNo = signService.applySignLocalFile(company.getName(),company.getName(),fileUrl,company.getCode(),company.getEmail(),"æä¿ååç¾ç« ",company.getSignId(),notifyUrl); |
| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.InsuranceMapper; |
| | | import com.doumee.dao.business.WorktypeMapper; |
| | | import com.doumee.dao.business.join.DuWorkTypeJoinMapper; |
| | | import com.doumee.dao.business.join.WorktypeJoinMapper; |
| | | import com.doumee.dao.business.model.Insurance; |
| | | import com.doumee.dao.business.model.Solutions; |
| | | import com.doumee.dao.business.model.Worktype; |
| | |
| | | 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.sun.corba.se.spi.orbutil.threadpool.Work; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private InsuranceMapper insuranceMapper; |
| | | @Autowired |
| | | private WorktypeMapper worktypeMapper; |
| | | @Autowired |
| | | private WorktypeJoinMapper worktypeJoinMapper; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | |
| | | if(workTypeName.size() != set.size()){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对ä¸èµ·ï¼å·¥ç§å½å
¥æ°æ®åå¨ç¸åæ°æ®ï¼"); |
| | | } |
| | | List<Worktype> saveList = new ArrayList<>(); |
| | | |
| | | for(Worktype w : worktypeList) { |
| | | if(!isNew){ |
| | | //æ¥è¯¢ä¿é©å
¬å¸ä¸æ¯å¦å·²åå¨è¯¥å·¥ç§ |
| | |
| | | w.setInsuranceId(insurance.getId()); |
| | | w.setIsdeleted(Constants.ZERO); |
| | | w.setCreator(newModel.getCreator()); |
| | | w.setCreateDate(insurance.getCreateDate()); |
| | | w.setCreateDate(new Date()); |
| | | w.setDataType(insurance.getDataType()); |
| | | w.setStatus(Constants.ZERO); |
| | | w.setVersion(insurance.getVersion()); |
| | | w.setSortnum(num++); |
| | | worktypeMapper.insert(w); |
| | | saveList.add(w); |
| | | // worktypeMapper.insert(w); |
| | | |
| | | |
| | | //åå²çæ¬çå·¥ç§ä¿¡æ¯ |
| | |
| | | newType.setDataType(Constants.TWO); |
| | | newType.setVersion(newModel.getVersion()); |
| | | w.setSortnum(num++); |
| | | worktypeMapper.insert(newType); |
| | | saveList.add(newType); |
| | | // worktypeMapper.insert(newType); |
| | | } |
| | | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(saveList)){ |
| | | worktypeJoinMapper.insertBatchSomeColumn(saveList); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private void initCreateParam(Insurance insurance) { |
| | |
| | | insuranceMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | /*@Override |
| | | public void updateById(Insurance insurance) { |
| | | Insurance model = findById(insurance.getId()); |
| | | if(model == null || !Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO) |
| | | || !Constants.equalsInteger(model.getDataType(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY ); |
| | | } |
| | | //æ°æ®æææ§æ ¡éª |
| | | initCreateParam(insurance); |
| | | if(insuranceMapper.selectCount(new QueryWrapper<Insurance>().lambda().eq(Insurance::getName,insurance.getName()) |
| | | .eq(Insurance::getIsdeleted,Constants.ZERO) |
| | | .eq(Insurance::getDataType,Constants.ZERO) |
| | | .ne(Insurance::getId,insurance.getId()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¿é©å
¬å¸åç§°å·²åå¨"); |
| | | } |
| | | |
| | | LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | Insurance updateModel = new Insurance(); |
| | | updateModel.setEditor(user.getId()); |
| | | updateModel.setName(insurance.getName()); |
| | | updateModel.setId(model.getId()); |
| | | updateModel.setVersion(UUID.randomUUID().toString()); |
| | | updateModel.setEditDate(new Date()); |
| | | updateModel.setRemark(insurance.getRemark()); |
| | | updateModel.setSortnum(insurance.getSortnum()); |
| | | updateModel.setLogo(insurance.getLogo()); |
| | | updateModel.setEnglishName(insurance.getEnglishName()); |
| | | updateModel.setLinkName(insurance.getLinkName()); |
| | | updateModel.setLinkPhone(insurance.getLinkPhone()); |
| | | updateModel.setPolicy(insurance.getPolicy()); |
| | | updateModel.setAgreement(insurance.getAgreement()); |
| | | updateModel.setClaimsInformation(insurance.getClaimsInformation()); |
| | | insuranceMapper.updateById(updateModel); |
| | | |
| | | //å¦æä¿®æ¹ï¼å产çä¸ä¸ªæ°çåå²çæ¬ ~ |
| | | // Insurance newModel = new Insurance(); |
| | | // BeanUtils.copyProperties(model,newModel); |
| | | // newModel.setId(null); |
| | | // newModel.setVersion(updateModel.getVersion()); |
| | | // newModel.setCreateDate(new Date()); |
| | | // newModel.setName(updateModel.getName()); |
| | | // newModel.setBaseId(insurance.getId()); |
| | | // newModel.setDataType(Constants.TWO); |
| | | // newModel.setLogo(insurance.getLogo()); |
| | | // newModel.setEnglishName(insurance.getEnglishName()); |
| | | // newModel.setLinkName(insurance.getLinkName()); |
| | | // newModel.setLinkPhone(insurance.getLinkPhone()); |
| | | // newModel.setPolicy(insurance.getPolicy()); |
| | | // newModel.setAgreement(insurance.getAgreement()); |
| | | // newModel.setClaimsInformation(insurance.getClaimsInformation()); |
| | | // insuranceMapper.insert(newModel); |
| | | |
| | | Insurance useVersion = insuranceMapper.selectOne(new QueryWrapper<Insurance>().lambda() |
| | | .eq(Insurance::getBaseId,insurance.getId()) |
| | | .eq(Insurance::getDataType,Constants.TWO) |
| | | .last(" limit 1") |
| | | ); |
| | | |
| | | Insurance updateUsrModel = new Insurance(); |
| | | updateUsrModel.setEditor(user.getId()); |
| | | updateUsrModel.setName(insurance.getName()); |
| | | updateUsrModel.setId(useVersion.getId()); |
| | | updateUsrModel.setVersion(UUID.randomUUID().toString()); |
| | | updateUsrModel.setEditDate(new Date()); |
| | | updateUsrModel.setRemark(insurance.getRemark()); |
| | | updateUsrModel.setSortnum(insurance.getSortnum()); |
| | | updateUsrModel.setLogo(insurance.getLogo()); |
| | | updateUsrModel.setEnglishName(insurance.getEnglishName()); |
| | | updateUsrModel.setLinkName(insurance.getLinkName()); |
| | | updateUsrModel.setLinkPhone(insurance.getLinkPhone()); |
| | | updateUsrModel.setPolicy(insurance.getPolicy()); |
| | | updateUsrModel.setAgreement(insurance.getAgreement()); |
| | | updateUsrModel.setClaimsInformation(insurance.getClaimsInformation()); |
| | | |
| | | //å 餿æå·¥ç§æ°æ® |
| | | worktypeMapper.delete(new UpdateWrapper<Worktype>() |
| | | .lambda() |
| | | .in(Worktype::getInsuranceId,insurance.getId()) |
| | | ); |
| | | // insuranceMapper.update(null,new UpdateWrapper<Insurance>() |
| | | // .lambda() |
| | | // .eq(Insurance::getBaseId,insurance.getId()) |
| | | // .eq(Insurance::getDataType,Constants.TWO) |
| | | // .ne(Insurance::getId,newModel.getId()) |
| | | // .set(Insurance::getDataType,Constants.ONE) |
| | | // ); |
| | | worktypeMapper.update(null,new UpdateWrapper<Worktype>() |
| | | .lambda() |
| | | .eq(Worktype::getInsuranceId,useVersion.getId()) |
| | | .eq(Worktype::getDataType,Constants.TWO) |
| | | .set(Worktype::getDataType,Constants.ONE) |
| | | ); |
| | | |
| | | //å¤çå·¥ä½ä¿¡æ¯ï¼æ°å¢ææ°çï¼åæ¶äº§çåå²çæ¬ |
| | | dealWorkTypeData(updateModel,useVersion,insurance.getWorktypeList(),false); |
| | | }*/ |
| | | |
| | | |
| | | @Override |
| | | public void updateById(Insurance insurance) { |
| | | Insurance model = findById(insurance.getId()); |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.api.R; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | |
| | | private InsuranceApplyMapper insuranceApplyMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer create(SolutionsBase solutionsBase) { |
| | | LoginUserInfo user= (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | initCreateParam(solutionsBase); |
| | |
| | | newType.setSolutionId(newModel.getId()); |
| | | solutionWorktypeJoinMapper.insert(newType); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void updateById(SolutionsBase solutionsBase) { |
| | | LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | SolutionsBase model = findById(solutionsBase.getId()); |
| | |
| | | solutionsBase.setAddValidDays(solutionsBase.getDelValidDays()); |
| | | } |
| | | solutionsBaseMapper.updateById(solutionsBase); |
| | | |
| | | SolutionsBase oldVersion = solutionsBaseMapper.selectOne(new QueryWrapper<SolutionsBase>() |
| | | .lambda() |
| | | .eq(SolutionsBase::getBaseId,solutionsBase.getId()) |
| | |
| | | .eq(SolutionWorktype::getType,Constants.ONE) |
| | | ); |
| | | //å é¤ç¶æ¹æ¡ä¸ææåæ¹æ¡çå·¥ç§æ°æ® |
| | | |
| | | solutionWorktypeJoinMapper.delete(new UpdateWrapper<SolutionWorktype>() |
| | | .lambda() |
| | | .eq(SolutionWorktype::getType,Constants.ZERO) |
| | |
| | | ); |
| | | |
| | | dealWorkTypeInsurance(solutionsBase,newModel,solutionsBase.getWorktypeIdList()); |
| | | |
| | | |
| | | solutionsBaseMapper.update(null,new UpdateWrapper<SolutionsBase>() |
| | | .lambda() |
| | |
| | | file.setObjType(Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey()); |
| | | file.setType(Constants.formatIntegerNum(file.getType())); |
| | | multifileMapper.insert(file); |
| | | file.setId(null); |
| | | file.setObjId(newModel.getId()); |
| | | multifileMapper.insert(file); |
| | | return solutions.getId(); |
| | |
| | | String notifyUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SIGN_DONE_NOTIFY_URL).getCode(); |
| | | notifyUrl = notifyUrl.replace("${type}","0").replace("${id}", unionApply.getId().toString()); |
| | | |
| | | String applyNo = signService.applySign(company.getName(),url,company.getName(),company.getCode(),company.getEmail(),null,company.getSignId(),notifyUrl); |
| | | String applyNo = signService.applySignDoByParam(company.getName(),url,company.getName(),company.getCode(),company.getEmail(),null,company.getSignId(),notifyUrl,new Float(0.7)); |
| | | |
| | | if(StringUtils.isBlank(applyNo) ){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼è·åå¨çº¿ç¾ç« å°å失败ï¼è¯·ç¨åéè¯ï¼"); |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.api.R; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°ä¿é©æ¹æ¡"); |
| | | } |
| | | if(saveUnionChangeDTO.getBusinessType().equals(Constants.ZERO)){ |
| | | saveUnionChangeDTO.setApplyDate(unionApply.getStartTime()); |
| | | // saveUnionChangeDTO.setApplyDate(unionApply.getStartTime()); |
| | | |
| | | saveUnionChangeDTO.setAddValidDate(saveUnionChangeDTO.getApplyDate()); |
| | | saveUnionChangeDTO.setDelValidDate(saveUnionChangeDTO.getApplyDate()); |
| | | //æ ¹æ®ç³è¯·æ¥æ å¤çå åä¿ç å®é
çææ¥æ |
| | | // if(Objects.nonNull(solutions.getAddValidDays())){ |
| | | // saveUnionChangeDTO.setAddValidDate( |
| | | // DateUtil.afterDateByType(saveUnionChangeDTO.getApplyDate(),0,solutions.getAddValidDays()) |
| | | // ); |
| | | // }else{ |
| | | // saveUnionChangeDTO.setAddValidDate(saveUnionChangeDTO.getApplyDate()); |
| | | // } |
| | | // if(Objects.nonNull(solutions.getDelValidDays())){ |
| | | // saveUnionChangeDTO.setDelValidDate( |
| | | // DateUtil.afterDateByType(saveUnionChangeDTO.getApplyDate(),0,solutions.getDelValidDays()) |
| | | // ); |
| | | // }else{ |
| | | // saveUnionChangeDTO.setDelValidDate(saveUnionChangeDTO.getApplyDate()); |
| | | // } |
| | | if(Objects.nonNull(solutions.getAddValidDays())){ |
| | | saveUnionChangeDTO.setAddValidDate( |
| | | DateUtil.afterDateByType(saveUnionChangeDTO.getApplyDate(),0,solutions.getAddValidDays()) |
| | | ); |
| | | }else{ |
| | | saveUnionChangeDTO.setAddValidDate(saveUnionChangeDTO.getApplyDate()); |
| | | } |
| | | if(Objects.nonNull(solutions.getDelValidDays())){ |
| | | saveUnionChangeDTO.setDelValidDate( |
| | | DateUtil.afterDateByType(saveUnionChangeDTO.getApplyDate(),0,solutions.getDelValidDays()) |
| | | ); |
| | | }else{ |
| | | saveUnionChangeDTO.setDelValidDate(saveUnionChangeDTO.getApplyDate()); |
| | | } |
| | | //夿æ¹åæ¥æ åå¹¶åçæ¹åçææå¨ä¸º ä¿åèµ·æçæ¬¡æ¥ å°ä¿åæ¢æ |
| | | //è·åå¼å§æ¥ææ¬¡æ¥ |
| | | if(saveUnionChangeDTO.getAddValidDate().getTime()<unionApply.getStartTime().getTime() |
| | |
| | | notifyUrl = notifyUrl.replace("${type}","0").replace("${id}",unionChange.getId().toString()); |
| | | // String applyNo = signService.applySignLocalFile(company.getName(),company.getName(),fileUrl,company.getCode(),company.getEmail(),"åå¹¶åï¼å åä¿/æ¢åï¼ç³è¯·ç¾ç½²",company.getSignId(),notifyUrl); |
| | | //临æ¶ä½¿ç¨ |
| | | fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241120/1c80f0d7-ab35-4355-b9fe-944464643115.pdf"; |
| | | String applyNo = signService.applySign(companyName,fileUrl,companyName,creditCode,email,"人åååç¾ç« ",null,notifyUrl); |
| | | fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241230/a0d128f2-ba6c-4ad4-b86b-b2610a513d41.pdf"; |
| | | String applyNo = signService.applySignWidthQifengSet(companyName,fileUrl,companyName,creditCode,email,"人åååç¾ç« ",null,notifyUrl,new Float(0.7)); |
| | | if(StringUtils.isBlank(applyNo) ){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼è·åå¨çº¿ç¾ç« å°å失败ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public Set<Integer> importBatchForSolutions(MultipartFile file , Integer insuranceId){ |
| | | public Set<Map<String,Object>> importBatchForSolutions(MultipartFile file , Integer insuranceId){ |
| | | ExcelImporter ie = null; |
| | | List<WorktypeImport> dataList =null; |
| | | try { |
| | |
| | | if(dataList == null || dataList.size() ==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼å½å
¥æ°æ®ä¸ºç©ºï¼"); |
| | | } |
| | | List<Integer> result = new ArrayList<>(); |
| | | List<Map<String,Object>> result = new ArrayList<>(); |
| | | List<Worktype> inWorkTypeList = null; |
| | | if(Objects.nonNull(insuranceId)){ |
| | | inWorkTypeList = worktypeMapper.selectList(new QueryWrapper<Worktype>().lambda().eq(Worktype::getIsdeleted,Constants.ZERO) |
| | | .eq(Worktype::getInsuranceId,insuranceId).eq(Worktype::getDataType,Constants.TWO) |
| | | .eq(Worktype::getInsuranceId,insuranceId) |
| | | .eq(Worktype::getDataType,Constants.TWO) |
| | | ); |
| | | } |
| | | for(WorktypeImport model : dataList){ |
| | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(inWorkTypeList)){ |
| | | Integer workTypeId = getHasWorkTypeByName(model.getName(),inWorkTypeList); |
| | | if(Objects.nonNull(workTypeId)){ |
| | | result.add(workTypeId); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("id",workTypeId); |
| | | map.put("name",model.getName()); |
| | | result.add(map); |
| | | } |
| | | } |
| | | } |
| | | Set<Integer> resultSet = new HashSet<>(result); |
| | | Set<Map<String,Object>> resultSet = new HashSet<>(result); |
| | | return resultSet; |
| | | } |
| | | |
| | |
| | | * @param email |
| | | * @param postionJson |
| | | */ |
| | | public String applySignWidthQifengSet(String name,String fileUrl,String fullname,String creditCoe,String email,String postionJson,String singId,String notifyUrl,Float qifengSet){ |
| | | return applySignDoByParam(name,fileUrl,fullname,creditCoe,email,postionJson,singId,notifyUrl,qifengSet); |
| | | } |
| | | /** |
| | | * åèµ·ç¾çº¦ |
| | | * @param name |
| | | * @param fileUrl |
| | | * @param fullname |
| | | * @param creditCoe |
| | | * @param email |
| | | * @param postionJson |
| | | */ |
| | | public String applySign(String name,String fileUrl,String fullname,String creditCoe,String email,String postionJson,String singId,String notifyUrl){ |
| | | return applySignDoByParam(name,fileUrl,fullname,creditCoe,email,postionJson,singId,notifyUrl,null); |
| | | } |
| | | /** |
| | | * åèµ·ç¾çº¦ |
| | | * @param name |
| | | * @param fileUrl |
| | | * @param fullname |
| | | * @param creditCoe |
| | | * @param email |
| | | * @param postionJson |
| | | */ |
| | | public String applySignDoByParam(String name,String fileUrl,String fullname,String creditCoe,String email,String postionJson,String singId,String notifyUrl,Float qifengSet){ |
| | | try { |
| | | initParams(); |
| | | String url=SERVICE_URL+"/v2/sign/applySign"; |
| | |
| | | // sReq.setSearchKey(postionJson);//å
³é®å 对åºpositionType=2 |
| | | sReq.setSignId(singId); |
| | | sReq.setNoNeedVerify(1); |
| | | sReq.setQiFengOffset(qifengSet); |
| | | signatories.add(sReq); |
| | | params.put("signatories",signatories.toJSONString()); |
| | | System.out.println("================"+JSONObject.toJSONString(params)); |
| | |
| | | boolean depart=false; |
| | | boolean departAndLeaf=false; |
| | | boolean custom=false; |
| | | boolean self=false; |
| | | String c = ""; |
| | | for(SystemDataPermissionListVO d : list){ |
| | | if(!all && Constants.equalsInteger(d.getType(),Constants.DATAPERMISSION_TYPE.all)){ |
| | |
| | | custom =true; |
| | | c += StringUtils.defaultString(d.getCustomData(),""); |
| | | } |
| | | if( Constants.equalsInteger(d.getType(),Constants.DATAPERMISSION_TYPE.self)){ |
| | | self =true; |
| | | } |
| | | } |
| | | CompanyDepartment department = new CompanyDepartment(); |
| | | department.setId(user.getDepartmentId()); |
| | |
| | | |
| | | if(all){ |
| | | return null; |
| | | }else if(self){ |
| | | return new ArrayList<>(); |
| | | }else{ |
| | | List<Integer> dList = new ArrayList<>(); |
| | | dList.add(-1);//èæé¨é¨ï¼ææ¥ç©ºéå |
| | |
| | | import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.R; |
| | | import com.doumee.config.shiro.ShiroToken; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.CompanyDepartment; |
| | | import com.doumee.dao.business.CompanyDepartmentMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.CompanyDepartment; |
| | |
| | | @Override |
| | | public PageData<SystemUserListVO> findPageCompany(PageWrap<QuerySystemUserDTO> pageWrap) { |
| | | // æ ¹é¨é¨æ¡ä»¶å¤çï¼éæ¥è¯¢æ ¹é¨é¨ä¸ææé¨é¨çç¨æ·ï¼ |
| | | if (pageWrap.getModel().getRootDeptId() != null) { |
| | | // pageWrap.getModel().setDepartmentIds(getDeptIds(pageWrap.getModel().getRootDeptId())); |
| | | } else { |
| | | // List<SystemDepartment> list = systemDepartmentService.findList(new QueryWrapper<>()); |
| | | // List<Integer> collect = list.stream().map(s -> s.getId()).collect(Collectors.toList()); |
| | | // pageWrap.getModel().setDepartmentIds(collect); |
| | | } |
| | | if (pageWrap.getModel().getCompanyId() == null) { |
| | | pageWrap.getModel().setCompanyId(-1); |
| | | } |
| | | IPage<Company> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | pageWrap.getModel().setType(Constants.UserType.COMPANY.getKey());//æ¥è¯¢ä¼ä¸ç±»å |
| | | // æ§è¡æ¥è¯¢ |
| | | PageHelper.startPage(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | List<SystemUserListVO> userList = systemUserMapper.selectManageList(pageWrap.getModel(), pageWrap.getOrderByClause()); |
| | | String zhuboRoomUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.ZHUBO_ROOM_URL).getCode(); |
| | | |
| | | for (SystemUserListVO user : userList) { |
| | | // æ¥è¯¢ç¨æ·è§è²å表 |
| | | user.setRoles(systemRoleService.findByUserId(user.getId())); |
| | | // æ¥è¯¢ç¨æ·å²ä½å表 |
| | | // user.setPositions(systemPositionService.findByUserId(user.getId())); |
| | | user.setZhuboRoomUrl(zhuboRoomUrl); |
| | | } |
| | | return PageData.from(new PageInfo<>(userList)); |
| | | MPJLambdaWrapper<SystemUser> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper .selectAll(SystemUser.class) |
| | | .select("(select count(distinct(a.company_id) from company_permisson a where a.user_id=t.id and a.ideleted=0 and a.type=1)",SystemUser::getAuthNum) |
| | | .selectAs(Company::getName,SystemUser::getCompanyName) |
| | | .selectAs(CompanyDepartment::getName,SystemUser::getDepartmentName) |
| | | .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId) |
| | | .leftJoin(CompanyDepartment.class,CompanyDepartment::getId,SystemUser::getDepartmentId) |
| | | .eq( pageWrap.getModel().getDepartmentId() !=null,SystemUser::getDepartmentId, pageWrap.getModel().getDepartmentId()) |
| | | .eq( pageWrap.getModel().getStatus() !=null,SystemUser::getStatus, pageWrap.getModel().getStatus()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getMobile()),SystemUser::getMobile, pageWrap.getModel().getMobile()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getRealname()),SystemUser::getRealname, pageWrap.getModel().getRealname()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getUsername()),SystemUser::getUsername, pageWrap.getModel().getUsername()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()),SystemUser::getCompanyName, pageWrap.getModel().getCompanyName()); |
| | | IPage<SystemUserListVO> result = systemUserMapper.selectJoinPage(page,SystemUserListVO.class,wrapper); |
| | | return PageData.from(result); |
| | | } |
| | | |
| | | @Override |
| | |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.selectAll(SystemUser.class); |
| | | queryWrapper.eq(SystemUser::getDeleted, Constants.ZERO); |
| | | queryWrapper.and(StringUtils.isNotBlank(pageWrap.getModel().getUsername()),ms->ms.like(SystemUser::getUsername,pageWrap.getModel().getUsername()) |
| | | queryWrapper.and(StringUtils.isNotBlank(pageWrap.getModel().getUsername()), |
| | | ms->ms.like(SystemUser::getUsername,pageWrap.getModel().getUsername()) |
| | | .or().like(SystemUser::getMobile,pageWrap.getModel().getUsername()) |
| | | .or().like(SystemUser::getRealname,pageWrap.getModel().getUsername()) |
| | | ); |
| | | queryWrapper.orderByDesc(SystemUser::getCreateTime); |
| | | |
| | | |
| | | |
| | | IPage<SystemUser> result = systemUserJoinMapper.selectJoinPage(page, SystemUser.class, queryWrapper); |
| | | |
| | | return PageData.from(result); |