| | |
| | | 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> |
| | |
| | | |
| | | 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); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æå±ä¼ä¸ç¼ç ", example = "1", hidden = true ) |
| | | private Integer companyId; |
| | | @ApiModelProperty(value = "ä¼ä¸åç§°", example = "1", hidden = true ) |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "åºåç¼ç ", example = "1" ) |
| | | private Integer areaId; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ ä¼åä¿¡æ¯å¨æ¹æ¡ä¸æ¯å¦åå¨å²çªæ°æ® |
| | | * @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 applySign(String name,String fileUrl,String fullname,String creditCoe,String email,String postionJson,String singId,String notifyUrl,Float qifengSet){ |
| | | 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); |
| | | } |
| | | /** |
| | |
| | | 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; |