111
k94314517
2024-01-29 c9df4cfec262ca54af52715af60a1276c37d08c5
111
已添加3个文件
已修改25个文件
736 ■■■■ 文件已修改
server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/DispatchUnitController.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/MemberController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/SolutionsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/DispatchUnitController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/biz/system/impl/SystemMenuBizImpl.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/DateUtil.java 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/dto/CountCyclePriceDTO.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/dto/DispatchUnitQueryDTO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/dto/MemberImport.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/join/DispatchUnitJoinMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/DispatchUnit.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/DuWorktype.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/Solutions.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/vo/CountCyclePriceVO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/ApplyDetailService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/InsuranceApplyService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/SolutionsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java 152 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/DuWorktypeServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 195 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java
@@ -75,6 +75,13 @@
        return ApiResponse.success(applyDetailService.findPageForCompany(pageWrap));
    }
    @ApiOperation("列表查询")
    @PostMapping("/findList")
    @RequiresPermissions("business:applydetail:query")
    public ApiResponse<List<ApplyDetail>> findList (@RequestBody ApplyDetailPageDTO applyDetailPageDTO) {
        return ApiResponse.success(applyDetailService.findListForCompany(applyDetailPageDTO));
    }
    @ApiOperation("导出在保人员详单Excel")
    @PostMapping("/exportExcel")
    @RequiresPermissions("business:applydetail:exportExcel")
server/company/src/main/java/com/doumee/api/business/DispatchUnitController.java
@@ -4,6 +4,7 @@
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.dao.business.dto.DispatchUnitQueryDTO;
@@ -12,6 +13,7 @@
import com.doumee.service.business.DispatchUnitService;
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.*;
@@ -91,6 +93,8 @@
    @PostMapping("/page")
    @RequiresPermissions("business:dispatchunit:query")
    public ApiResponse<PageData<DispatchUnit>> findPage (@RequestBody PageWrap<DispatchUnit> pageWrap) {
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        pageWrap.getModel().setCompanyId(user.getCompanyId());
        return ApiResponse.success(dispatchUnitService.findPage(pageWrap));
    }
@@ -98,13 +102,16 @@
    @PostMapping("/exportExcel")
    @RequiresPermissions("business:dispatchunit:exportExcel")
    public void exportExcel (@RequestBody PageWrap<DispatchUnit> pageWrap, HttpServletResponse response) {
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        pageWrap.getModel().setCompanyId(user.getCompanyId());
        ExcelExporter.build(DispatchUnit.class).export(dispatchUnitService.findPage(pageWrap).getRecords(), "派遣单位信息表", response);
    }
    @ApiOperation("根据ID查询")
    @GetMapping("/{id}")
    @RequiresPermissions("business:dispatchunit:query")
    public ApiResponse findById(@PathVariable Integer id) {
    public ApiResponse<DispatchUnit> findById(@PathVariable Integer id) {
        return ApiResponse.success(dispatchUnitService.detailById(id));
    }
server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java
@@ -6,9 +6,11 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.dto.InsuranceApplyOptDTO;
import com.doumee.dao.business.dto.InsuranceApplyQueryDTO;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.dao.business.vo.CountCyclePriceVO;
import com.doumee.service.business.InsuranceApplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -39,6 +41,14 @@
    @RequiresPermissions("business:insuranceapply:create")
    public ApiResponse create(@RequestBody InsuranceApply insuranceApply) {
        return ApiResponse.success(insuranceApplyService.create(insuranceApply));
    }
    @PreventRepeat
    @ApiOperation("修改")
    @PostMapping("/updateData")
    @RequiresPermissions("business:insuranceapply:create")
    public ApiResponse updateData(@RequestBody InsuranceApply insuranceApply) {
        return ApiResponse.success(insuranceApplyService.updateData(insuranceApply));
    }
    @ApiOperation("根据ID删除")
@@ -118,5 +128,10 @@
    }
    @ApiOperation("获取保单止期与初始金额")
    @PostMapping("/getCountCyclePriceVO")
    public ApiResponse<CountCyclePriceVO> getCountCyclePriceVO (@RequestBody CountCyclePriceDTO countCyclePriceDTO) {
        return ApiResponse.success("操作成功",insuranceApplyService.getCountCyclePriceVO(countCyclePriceDTO));
    }
}
server/company/src/main/java/com/doumee/api/business/MemberController.java
@@ -114,7 +114,7 @@
    }
    @ApiOperation("导入模板")
    @ApiOperation(value = "人员信息导入" ,notes = "保单申请")
    @PostMapping("/importExcel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class),
server/company/src/main/java/com/doumee/api/business/SolutionsController.java
@@ -77,8 +77,8 @@
    @ApiOperation("列表查询")
    @PostMapping("/list")
    @RequiresPermissions("business:solutions:query")
    public ApiResponse<List<Solutions>> findList (@RequestBody Solutions solutions) {
        return ApiResponse.success(solutionsService.findList(solutions));
    public ApiResponse<List<Solutions>> findList () {
        return ApiResponse.success(solutionsService.findListForCompany());
    }
//    @ApiOperation("列表查询")
server/platform/src/main/java/com/doumee/api/business/DispatchUnitController.java
@@ -4,6 +4,7 @@
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.dao.business.dto.SaveDispatchUnitDTO;
@@ -11,6 +12,7 @@
import com.doumee.service.business.DispatchUnitService;
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.*;
server/service/src/main/java/com/doumee/biz/system/impl/SystemMenuBizImpl.java
@@ -3,11 +3,19 @@
import com.doumee.biz.system.SystemMenuBiz;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.CompanyMapper;
import com.doumee.dao.business.model.Company;
import com.doumee.dao.system.dto.UpdateSystemMenuSortDTO;
import com.doumee.dao.system.model.SystemMenu;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.dao.system.vo.SystemMenuListVO;
import com.doumee.dao.system.vo.SystemMenuNodeVO;
import com.doumee.service.business.CompanyService;
import com.doumee.service.system.SystemMenuService;
import com.doumee.service.system.SystemUserService;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -16,12 +24,19 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@Service
public class SystemMenuBizImpl implements SystemMenuBiz {
    @Autowired
    private SystemMenuService systemMenuService;
    @Autowired
    private CompanyService companyService;
    @Autowired
    private SystemUserService systemUserService;
    @Override
    public Integer create(SystemMenu systemMenu) {
@@ -115,8 +130,26 @@
    public List<SystemMenuNodeVO> findTree (Integer userId,Integer type) {
        SystemMenu queryDto = new SystemMenu();
        queryDto.setDeleted(Boolean.FALSE);
        List<SystemMenu> menus = systemMenuService.findByUserId(userId,type);
        List<SystemMenu> menus = new ArrayList<SystemMenu>();
        List<SystemMenuNodeVO> rootNodes = new ArrayList<>();
        menus = systemMenuService.findByUserId(userId,type);
        if(type.equals(Constants.ONE)){
            LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
            Company company = companyService.findById(loginUserInfo.getCompanyId());
            if(Objects.isNull(company)){
                return rootNodes;
            }
            SystemUser systemUser = systemUserService.findById(userId);
            if(Objects.isNull(systemUser)){
                return rootNodes;
            }
            if(company.getUsername().equals(systemUser.getUsername())){
                SystemMenu systemMenu = new SystemMenu();
                systemMenu.setType(type);
                systemMenu.setDeleted(Boolean.FALSE);
                menus = systemMenuService.findList(systemMenu);
            }
        }
        // æ·»åŠ æ ¹èœå•
        for (SystemMenu menu : menus) {
            if (menu.getParentId() == null) {
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -79,6 +79,7 @@
    public static final String TAXES_FILE = "TAXES_FILE";
    public static final String APPLY_FILE ="APPLY_FILE" ;
    public static final String SETTLE_FILE ="SETTLE_FILE" ;
    public static final String DU_FILE ="DU_FILE" ;
    public static final String SIGN_DONE_NOTIFY_URL = "SIGN_DONE_NOTIFY_URL";
    /**
@@ -166,7 +167,6 @@
        Integer sex = 1;
        if (matcher.matches()) {
            int genderCode = Integer.parseInt(idCard.substring(16, 17)); // ä»Žç¬¬17位开始提取性别编码(奇数为男性,偶数为女性)
            if ((genderCode % 2 == 1)) {
                sex = 1;
            } else {
@@ -900,6 +900,7 @@
        }
        return solutions.getPrice().multiply(new BigDecimal(cycle));
    }
    public static BigDecimal countDetailFee(int timeUnit ,BigDecimal price,Date startDate, Date endDate){
        //查询保险实际周期
        Integer cycle = DateUtil.calculateBetween(endDate,startDate,timeUnit);
server/service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -1298,9 +1298,16 @@
        calo.setTime(oldDate);
        caln.setTime(newDate);
        if(type==0||type==1){
            return    calculateDaysBetweenDates(caln, calo) + 1;
            return    calculateDaysBetweenDates(caln, calo) ;
        }else if(type==2){
            int day = caln.get(Calendar.DATE);
            if(day == 1){
            return    calculateMonthsBetweenDates(caln, calo) + 1;
            }else{
                return    calculateMonthsBetweenDates(caln, calo);
            }
        }else if(type==3){
            return    calculateYearsBetweenDates(caln, calo) + 1;
        }
@@ -2794,13 +2801,6 @@
        return sdfLongTimePlus.parse(sdfLongTimePlus.format(date));
    }
    public static void main(String[] args) {
        try {
            System.out.println(RandomStringUtils.randomNumeric(3));
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    /**
     *
@@ -2904,6 +2904,7 @@
        String nowDateString = dateTypeToString(new Date(), fFormatStr);
        return nowDateString;
    }
    /**
     * @ author zhangyong @ èŽ·å–å½“æœˆçš„ç¬¬ä¸€å¤©ï¼Œ2009-05-01
@@ -3056,4 +3057,64 @@
        cal.add(Calendar.MINUTE,minutes);
        return cal.getTime();
    }
    /**
     * è®¡ç®—多少自然年/月/日后的日期
     * @param startDate å¼€å§‹æ—¥æœŸ
     * @param type  0=日;1=月;2=年;
     * @param cycle å‘¨æœŸ  X月
     * @return
     */
    public static Date afterDateByType(Date startDate,Integer type,Integer cycle){
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(startDate);
        if(type==0){
            calendar.add(Calendar.DATE, cycle);
        }else if(type==1){
            calendar.add(Calendar.MONTH, cycle);
        }else if(type == 2) {
            calendar.add(Calendar.YEAR, cycle);
        }
        return calendar.getTime();
    }
    public static Integer monthDays(Date date){
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        // èŽ·å–å½“å‰å¹´ä»½ã€æœˆä»½ï¼ˆæ³¨æ„æœˆä»½ä»Ž0开始计算)
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH) + 1;
        // æ ¹æ®å¹´ä»½å’Œæœˆä»½åˆ¤æ–­é—°å¹´æƒ…况
        boolean isLeapYear = (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
        // æ ¹æ®ä¸åŒæœˆä»½è®¾å®šæ¯ä¸ªæœˆçš„天数
        switch (month) {
            case 2:
                if (isLeapYear) {
                    return 29;
                } else {
                    return 28;
                }
            case 4:
            case 6:
            case 9:
            case 11:
                 return 30;
            default:
                 return 31;
        }
    }
    public static void main(String[] args) {
       System.out.println(DateUtil.DateToStr(DateUtil.afterDateByType(
               DateUtil.stringToDate("2024-02-01","yyyy-MM-dd")
               ,1,1),"yyyy-MM-dd HH:mm:ss"));
    }
}
server/service/src/main/java/com/doumee/dao/business/dto/CountCyclePriceDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package com.doumee.dao.business.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
 * @author RenKang
 */
@Data
public class CountCyclePriceDTO {
    @ApiModelProperty(value = "方案主键", example = "1")
    private Integer solutionsId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "生效起期")
    private Date startDate;
}
server/service/src/main/java/com/doumee/dao/business/dto/DispatchUnitQueryDTO.java
@@ -35,7 +35,7 @@
    @ApiModelProperty(value = "企业编码", example = "1")
    private Integer companyId;
    @ApiModelProperty(value = "记录类型 0基表数据 1历史版本数据", example = "1")
    @ApiModelProperty(value = "记录类型 0基表数据 1历史版本数据 2最新版本", example = "1")
    private Integer dataType;
    @ApiModelProperty(value = "方案主键")
server/service/src/main/java/com/doumee/dao/business/dto/MemberImport.java
@@ -15,27 +15,30 @@
@ApiModel("员工信息导入")
public class MemberImport {
    @ExcelColumn(name="序号",value = "sn")
    private Integer sn;
    @ExcelColumn(name="姓名",value = "name")
    private String name;
    @ExcelColumn(name="身份证号码",value = "idCard")
    @ExcelColumn(name="身份证号",value = "idCard")
    private String idCard;
    @ExcelColumn(name="年龄",value = "age")
    private Integer age;
    @ApiModelProperty(value = "派遣单位主键")
    private Integer duId;
//    @ApiModelProperty(value = "派遣单位主键")
//    private Integer duId;
    @ApiModelProperty(value = "性别")
    private Integer sex;
    @ApiModelProperty(value = "所属工种主键")
    private Integer workTypeId;
    @ApiModelProperty(value = "派遣单位名称")
    private String duName;
    @ApiModelProperty(value = "所属工种名称")
    private String workTypeName;
//    @ApiModelProperty(value = "所属工种主键")
//    private Integer workTypeId;
//
//    @ApiModelProperty(value = "派遣单位名称")
//    private String duName;
//
//    @ApiModelProperty(value = "所属工种名称")
//    private String workTypeName;
}
server/service/src/main/java/com/doumee/dao/business/join/DispatchUnitJoinMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
package com.doumee.dao.business.join;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doumee.dao.business.model.DispatchUnit;
import com.github.yulichang.base.mapper.MPJJoinMapper;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2024/01/16 10:03
 */
public interface DispatchUnitJoinMapper extends MPJJoinMapper<DispatchUnit> {
}
server/service/src/main/java/com/doumee/dao/business/model/DispatchUnit.java
@@ -134,5 +134,9 @@
    private List<DuLog> duLogList;
    @ApiModelProperty(value = "派遣单位方案管关联主键")
    @TableField(exist = false)
    private Integer duSolutionId;
}
server/service/src/main/java/com/doumee/dao/business/model/DuWorktype.java
@@ -92,4 +92,9 @@
    @ApiModelProperty(value = "工种名称")
    @TableField(exist = false)
    private String workTypeName;
    @ApiModelProperty(value = "视频资料地址全路径")
    @TableField(exist = false)
    private String videoUrlFull;
}
server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
@@ -38,7 +38,6 @@
    @ApiModelProperty(value = "创建时间")
    @ExcelColumn(name="创建时间")
    private Date createDate;
    @ApiModelProperty(value = "更新人编码", example = "1")
@@ -72,19 +71,26 @@
    @ApiModelProperty(value = "期望保险生效止期")
    @ExcelColumn(name="期望保险生效止期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(pattern="yyyy-MM-dd")
    private Date applyEndTime;
    @ApiModelProperty(value = "期望保险生效起期")
    @ExcelColumn(name="期望保险生效起期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd")
    private Date applyStartTime;
    @ApiModelProperty(value = "实际保险生效止期")
    @ExcelColumn(name="实际保险生效止期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd")
    private Date endTime;
    @ApiModelProperty(value = "实际保险生效起期")
    @ExcelColumn(name="实际保险生效起期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd")
    private Date startTime;
    @ApiModelProperty(value = "最近操作时间")
@@ -178,7 +184,9 @@
    @TableField(exist = false)
    private String statusInfo;
    public TaxesInvoicingVO getTaxesInvoicingVO(){
    public TaxesInvoicingVO toTaxesInvoicingVO(){
        TaxesInvoicingVO taxesInvoicingVO = new TaxesInvoicingVO();
        taxesInvoicingVO.setId(this.getId());
        taxesInvoicingVO.setSolutionsName(this.getSolutionsName());
@@ -189,6 +197,7 @@
        taxesInvoicingVO.setType(Constants.ZERO);
        return taxesInvoicingVO;
    }
    @ApiModelProperty(value = "在线签章地址")
    @TableField(exist = false)
    private String signLink;
server/service/src/main/java/com/doumee/dao/business/model/Solutions.java
@@ -148,6 +148,10 @@
    @ExcelColumn(name="基表编码(自关联)")
    private Integer baseId;
    @ApiModelProperty(value = "延迟天数生效(VALID_TYPE:0 ä½¿ç”¨ï¼‰", example = "1")
    @ExcelColumn(name="延迟天数生效(VALID_TYPE:0 ä½¿ç”¨ï¼‰")
    private Integer validTypeNum;
    @ApiModelProperty(value = "员工", example = "1")
    @TableField(exist = false)
    private Integer memberId;
@@ -155,12 +159,9 @@
    @TableField(exist = false)
    private String insuranceName;
    @ApiModelProperty(value = "保单主键", example = "1")
    @TableField(exist = false)
    private Integer applyId;
    @ApiModelProperty(value = "工种编码集合", example = "1")
    @TableField(exist = false)
@@ -169,5 +170,8 @@
    @TableField(exist = false)
    private  List<SolutionWorktype> worktypeList;
    @ApiModelProperty(value = "总周期费用", example = "1")
    @TableField(exist = false)
    private BigDecimal cyclePrice;
}
server/service/src/main/java/com/doumee/dao/business/vo/CountCyclePriceVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
package com.doumee.dao.business.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
 * @author RenKang
 */
@Data
public class CountCyclePriceVO {
    @ApiModelProperty(value = "总金额", example = "1")
    private BigDecimal cyclePrice;
    @ApiModelProperty(value = "生效止期")
    private Date endDate;
}
server/service/src/main/java/com/doumee/service/business/ApplyDetailService.java
@@ -90,6 +90,7 @@
    PageData<ApplyDetail> findPageForCompany(PageWrap<ApplyDetailPageDTO> pageWrap);
    List<ApplyDetail> findListForCompany(ApplyDetailPageDTO applyDetailPageDTO);
    /**
server/service/src/main/java/com/doumee/service/business/InsuranceApplyService.java
@@ -2,9 +2,11 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.dto.InsuranceApplyOptDTO;
import com.doumee.dao.business.dto.InsuranceApplyQueryDTO;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.dao.business.vo.CountCyclePriceVO;
import com.jzq.common.bean.sign.NotifyDataReq;
import java.util.List;
@@ -23,6 +25,7 @@
     * @return Integer
     */
    Integer create(InsuranceApply insuranceApply);
    Integer updateData(InsuranceApply insuranceApply);
    /**
     * ä¸»é”®åˆ é™¤
@@ -127,4 +130,6 @@
    void dealSignResult(NotifyDataReq data);
    void dealWaitSignedData();
    CountCyclePriceVO getCountCyclePriceVO(CountCyclePriceDTO countCyclePriceDTO);
}
server/service/src/main/java/com/doumee/service/business/SolutionsService.java
@@ -90,7 +90,7 @@
    PageData<Solutions> findPageCom(PageWrap<Solutions> pageWrap);
    List<Solutions> findListForCompany();
    /**
     * æ¡ä»¶ç»Ÿè®¡
     *
server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
@@ -241,6 +241,44 @@
        return pageData;
    }
    @Override
    public List<ApplyDetail> findListForCompany(ApplyDetailPageDTO applyDetailPageDTO) {
        MPJLambdaWrapper<ApplyDetail> queryWrapper = new MPJLambdaWrapper<>();
        queryWrapper.selectAll(ApplyDetail.class);
        queryWrapper.selectAs(DispatchUnit::getName,ApplyDetail::getDuName);
        queryWrapper.selectAs(Worktype::getName,ApplyDetail::getWorkTypeName);
        queryWrapper.selectAs(Member::getIdcardNo,ApplyDetail::getIdcardNo);
        queryWrapper.selectAs(Member::getName,ApplyDetail::getMemberName);
        queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId);
        queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId);
        queryWrapper.leftJoin(Member.class,Member::getId,ApplyDetail::getMemberId);
        queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getApplyId()),ApplyDetail::getApplyId,applyDetailPageDTO.getApplyId());
        queryWrapper.ge(!Objects.isNull(applyDetailPageDTO.getApplyStatus())
                        &&!applyDetailPageDTO.getApplyStatus().equals(Constants.ZERO),
                ApplyDetail::getStartTime, DateUtil.getDate(new Date(),"yyyy-MM-dd")+" 00:00:00");
        //在保
        queryWrapper.le(!Objects.isNull(applyDetailPageDTO.getApplyStatus())
                        &&applyDetailPageDTO.getApplyStatus().equals(Constants.ONE),
                ApplyDetail::getEndTime, DateUtil.getDate(new Date(),"yyyy-MM-dd")+" 23:59:59");
        //不在保
        queryWrapper.ge(!Objects.isNull(applyDetailPageDTO.getApplyStatus())
                        &&applyDetailPageDTO.getApplyStatus().equals(Constants.TWO),
                ApplyDetail::getEndTime, DateUtil.getDate(new Date(),"yyyy-MM-dd")+" 23:59:59");
        queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getDuId()),ApplyDetail::getDuId,applyDetailPageDTO.getDuId());
        queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getWorkTypeId()),ApplyDetail::getWorktypeId,applyDetailPageDTO.getWorkTypeId());
        queryWrapper.like(StringUtils.isNotBlank(applyDetailPageDTO.getMemberName()),Member::getName,applyDetailPageDTO.getMemberName());
        queryWrapper.ge(StringUtils.isNotBlank(applyDetailPageDTO.getStartTimeS()),ApplyDetail::getStartTime,applyDetailPageDTO.getStartTimeS()+" 00:00:00");
        queryWrapper.le(StringUtils.isNotBlank(applyDetailPageDTO.getStartTimeE()),ApplyDetail::getStartTime,applyDetailPageDTO.getStartTimeE()+" 23:59:59");
        queryWrapper.ge(StringUtils.isNotBlank(applyDetailPageDTO.getEndTimeS()),ApplyDetail::getEndTime,applyDetailPageDTO.getEndTimeS()+" 00:00:00");
        queryWrapper.le(StringUtils.isNotBlank(applyDetailPageDTO.getEndTimeE()),ApplyDetail::getEndTime,applyDetailPageDTO.getEndTimeE()+" 23:59:59");
        return  applyDetailJoinMapper.selectJoinList(ApplyDetail.class,queryWrapper);
    }
    @Override
    public long count(ApplyDetail applyDetail) {
        QueryWrapper<ApplyDetail> wrapper = new QueryWrapper<>(applyDetail);
@@ -255,7 +293,6 @@
                        .selectAll(ApplyDetail.class)
                        .selectAs(DispatchUnit::getName,ApplyDetail::getDuName)
                        .selectAs(Worktype::getName,ApplyDetail::getWorkTypeName)
                        .selectAs(Member::getName,ApplyDetail::getMemberName)
                        .selectAs(Solutions::getName,ApplyDetail::getSolutionName)
                        .selectAs(ApplyChange::getValidCode,ApplyDetail::getValidCode)
                        .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId)
server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java
@@ -1,5 +1,6 @@
package com.doumee.service.business.impl;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.LoginUserInfo;
@@ -12,10 +13,12 @@
import com.doumee.dao.business.DuSolutionMapper;
import com.doumee.dao.business.DuWorktypeMapper;
import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.join.DispatchUnitJoinMapper;
import com.doumee.dao.business.join.DuLogJoinMapper;
import com.doumee.dao.business.join.DuSolutionJoinMapper;
import com.doumee.dao.business.join.DuWorkTypeJoinMapper;
import com.doumee.dao.business.model.*;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.service.business.DispatchUnitService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -31,6 +34,7 @@
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.stream.Collectors;
/**
 * æ´¾é£å•位信息表Service实现
@@ -42,6 +46,9 @@
    @Autowired
    private DispatchUnitMapper dispatchUnitMapper;
    @Autowired
    private DispatchUnitJoinMapper dispatchUnitJoinMapper;
    @Autowired
    private DuSolutionMapper duSolutionMapper;
@@ -60,6 +67,9 @@
    @Autowired
    private DuWorkTypeJoinMapper duWorkTypeJoinMapper;
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @Override
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
@@ -125,7 +135,17 @@
        List<DuWorktype> newWorktypes = new ArrayList<>();
        List<DuSolution> solutions = duSolutionMapper.selectList(new QueryWrapper<DuSolution>().lambda()
                .eq(DuSolution::getIsdeleted,Constants.ZERO)
                .eq(DuSolution::getDispatchUnitId,model.getSolutionId()));
                .eq(DuSolution::getDispatchUnitId,model.getId()));
        duSolutionMapper.update(null,new UpdateWrapper<DuSolution>().lambda()
                        .set(DuSolution::getStatus,Constants.ONE)
                .eq(DuSolution::getIsdeleted,Constants.ZERO)
                .eq(DuSolution::getStatus,Constants.ZERO)
                .eq(DuSolution::getDispatchUnitId,model.getId())
        );
        if(solutions == null || solutions.size() ==0){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该派遣单位未设置方案工种信息,审核通过失败!");
        }
@@ -141,9 +161,18 @@
            List<DuWorktype> worktypes = duWorktypeMapper.selectList(new QueryWrapper<DuWorktype>().lambda()
                    .eq(DuWorktype::getIsdeleted,Constants.ZERO)
                    .eq(DuWorktype::getDuSolutionId,s.getId()));
            duWorktypeMapper.update(null,new UpdateWrapper<DuWorktype>().lambda()
                    .set(DuWorktype::getStatus,Constants.ONE)
                    .eq(DuWorktype::getIsdeleted,Constants.ZERO)
                    .eq(DuWorktype::getStatus,Constants.ZERO)
                    .eq(DuWorktype::getDuSolutionId,s.getId()));
            if(worktypes == null || worktypes.size() ==0){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该派遣单位方案存在方案是未设置工种信息信息,审核通过失败!");
            }
            for (DuWorktype w : worktypes) {
                DuWorktype nw = new DuWorktype();
                BeanUtils.copyProperties(w, nw);
@@ -166,31 +195,34 @@
    public Integer check(DispatchUnit param) {
        if(Objects.isNull(param)
                ||Objects.isNull(param.getId())
                ||param.getStatus() == null
                ||!(param.getStatus() ==Constants.ONE || param.getStatus() == Constants.TWO)){
                ||param.getUnitStatus() == null
                ||!(param.getUnitStatus() ==Constants.ONE || param.getUnitStatus() == Constants.TWO)){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        DispatchUnit model = dispatchUnitMapper.selectById(param.getId());
        if(Objects.isNull(model) || Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO) ||!Constants.equalsInteger(model.getDataType(),Constants.ZERO)){
        if(Objects.isNull(model) || !Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO) ||!Constants.equalsInteger(model.getDataType(),Constants.ZERO)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到派遣单位信息");
        }
        if(Constants.equalsInteger(model.getStatus(),Constants.ZERO)){
        if(!Constants.equalsInteger(model.getUnitStatus(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该派遣单位工种已审核,请勿重复提交~");
        }
        DispatchUnit update = new DispatchUnit();
        update.setEditor(user.getId());
        update.setEditDate(new Date());
        update.setId(model.getId());
        update.setStatus(param.getStatus());
        update.setUnitStatus(param.getUnitStatus());
        update.setWorktypeStatus(param.getWorktypeStatus());
        update.setCheckDate(update.getEditDate());
        update.setCheckUserId(user.getId());
        update.setCheckInfo(param.getCheckInfo());
        dispatchUnitMapper.updateById(update);
        if(Constants.equalsInteger(model.getStatus(),Constants.ONE)){
        DispatchUnit dispatchUnit = dispatchUnitMapper.selectById(param.getId());
        if(Constants.equalsInteger(param.getUnitStatus(),Constants.ONE)){
            //审核通过,修改状态,产生历史版本
            newVersionData(dispatchUnitMapper.selectById(param.getId()),update);
            newVersionData(dispatchUnit,update);
            //存储操作历史
            this.saveDuLog(dispatchUnit,Constants.DispatchUnitLogType.AUDIT_PASS,null);
        }else{
            //更新明细数据为审核失败
            duSolutionMapper.update(null,new UpdateWrapper<DuSolution>().lambda()
@@ -199,6 +231,28 @@
                    .set(DuSolution::getCheckUserId,update.getCheckUserId())
                    .set(DuSolution::getCheckInfo,update.getCheckInfo())
                    .eq(DuSolution::getDispatchUnitId,update.getId()));
            List<DuSolution> solutions = duSolutionMapper.selectList(new QueryWrapper<DuSolution>().lambda()
                    .eq(DuSolution::getIsdeleted,Constants.ZERO)
                    .eq(DuSolution::getDispatchUnitId,model.getId()));
            if(solutions == null || solutions.size() ==0){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该派遣单位未设置方案工种信息,审核通过失败!");
            }
            for (DuSolution s : solutions){
                duWorktypeMapper.update(null,new UpdateWrapper<DuWorktype>().lambda()
                        .set(DuWorktype::getStatus,Constants.TWO)
                        .set(DuWorktype::getCheckUserId,update.getCheckUserId())
                        .set(DuWorktype::getCheckInfo,update.getCheckInfo())
                        .set(DuWorktype::getCheckDate,new Date() )
                        .eq(DuWorktype::getIsdeleted,Constants.ZERO)
                        .eq(DuWorktype::getStatus,Constants.ZERO)
                        .eq(DuWorktype::getDuSolutionId,s.getId()));
            }
            //存储操作历史
            this.saveDuLog(dispatchUnit,Constants.DispatchUnitLogType.AUDIT_UN_PASS,update.getCheckInfo());
        }
        return  1;
    }
@@ -247,11 +301,19 @@
        this.saveDuLog(dispatchUnit,Constants.DispatchUnitLogType.UPLOAD,null);
        List<SaveDuSolutionDTO> saveDuSolutionDTOList = saveDispatchUnitDTO.getSaveDuSolutionDTOList();
        List<Integer> duSolutionIdS = saveDuSolutionDTOList.stream().map(m->m.getSolutionId()).collect(Collectors.toList());
        HashSet<Integer> setDuSolutionIdS=new HashSet<>(duSolutionIdS);
        if(duSolutionIdS.size()!=setDuSolutionIdS.size()){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"方案信息重复");
        }
        for (int i = 0; i < saveDuSolutionDTOList.size(); i++) {
            SaveDuSolutionDTO saveDuSolutionDTO = saveDuSolutionDTOList.get(i);
            DuSolution duSolution = new DuSolution();
            duSolution.setCreateDate(new Date());
            duSolution.setCreator(loginUserInfo.getId());
            duSolution.setStatus(Constants.ZERO);
            duSolution.setIsdeleted(Constants.ZERO);
            duSolution.setDispatchUnitId(dispatchUnit.getId());
            duSolution.setSortnum(i);
@@ -259,6 +321,13 @@
            duSolutionMapper.insert(duSolution);
            List<SaveDuWorkTypeDTO> saveDuWorkTypeDTOList = saveDuSolutionDTO.getSaveDuWorkTypeDTOList();
            List<Integer> duWorkTypeIdS = saveDuWorkTypeDTOList.stream().map(m->m.getWorkTypeId()).collect(Collectors.toList());
            HashSet<Integer> setDuWorkTypeIdS=new HashSet<>(duWorkTypeIdS);
            if(duWorkTypeIdS.size()!=setDuWorkTypeIdS.size()){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"【"+saveDuSolutionDTO.getSolutionName()+"】该方案下存在重复工种!");
            }
            if(!CollectionUtils.isNotEmpty(saveDuSolutionDTOList)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"【"+saveDuSolutionDTO.getSolutionName()+"】该方案下未选择工种!");
            }
@@ -269,6 +338,7 @@
                duWorktype.setCreator(loginUserInfo.getId());
                duWorktype.setIsdeleted(Constants.ZERO);
                duWorktype.setDuSolutionId(duSolution.getId());
                duWorktype.setStatus(Constants.ZERO);
                duWorktype.setSortnum(j);
                duWorktype.setWorkTypeId(saveDuWorkTypeDTO.getWorkTypeId());
                duWorktype.setVideoUrl(saveDuWorkTypeDTO.getVideoUrl());
@@ -285,7 +355,6 @@
    public Integer editDispatchUnit(SaveDispatchUnitDTO saveDispatchUnitDTO) {
        if(Objects.isNull(saveDispatchUnitDTO)
                ||Objects.isNull(saveDispatchUnitDTO.getId())
                || CollectionUtils.isEmpty(saveDispatchUnitDTO.getSaveDuSolutionDTOList())
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
@@ -314,7 +383,6 @@
        dispatchUnit.setContent(saveDispatchUnitDTO.getContent());
        dispatchUnit.setName(saveDispatchUnitDTO.getName());
        dispatchUnit.setUnitStatus(Constants.ZERO);
        dispatchUnit.setWorktypeStatus(Constants.ZERO);
        dispatchUnit.setEditDate(new Date());
        dispatchUnit.setEditor(loginUserInfo.getId());
        dispatchUnitMapper.updateById(dispatchUnit);
@@ -322,7 +390,7 @@
        //存储操作记录
        this.saveDuLog(dispatchUnit,Constants.DispatchUnitLogType.EDIT_UNIT,null);
        this.dealDuData(saveDispatchUnitDTO,loginUserInfo);
//        this.dealDuData(saveDispatchUnitDTO,loginUserInfo);
        return dispatchUnit.getId();
    }
@@ -338,7 +406,7 @@
    public Integer createSolution(SaveDispatchUnitDTO saveDispatchUnitDTO) {
        if(Objects.isNull(saveDispatchUnitDTO)
                ||Objects.isNull(saveDispatchUnitDTO.getId())
                || CollectionUtils.isEmpty(saveDispatchUnitDTO.getSaveDuSolutionDTOList())
                || !CollectionUtils.isNotEmpty(saveDispatchUnitDTO.getSaveDuSolutionDTOList())
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
@@ -363,7 +431,10 @@
        List<SaveDuSolutionDTO> saveDuSolutionDTOList = saveDispatchUnitDTO.getSaveDuSolutionDTOList();
        for (int i = 0; i < saveDuSolutionDTOList.size(); i++) {
            SaveDuSolutionDTO saveDuSolutionDTO = saveDuSolutionDTOList.get(i);
            DuSolution duSolution = duSolutionMapper.selectOne(new QueryWrapper<DuSolution>().lambda().eq(DuSolution::getDispatchUnitId,saveDuSolutionDTO.getId())
            if(Objects.isNull(saveDuSolutionDTO.getSolutionId())){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"【"+saveDuSolutionDTO.getSolutionName()+"】该方案下选择方案信息异常!");
            }
            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()));
@@ -372,6 +443,7 @@
                duSolution.setCreateDate(new Date());
                duSolution.setCreator(loginUserInfo.getId());
                duSolution.setIsdeleted(Constants.ZERO);
                duSolution.setStatus(Constants.ZERO);
                duSolution.setDispatchUnitId(saveDispatchUnitDTO.getId());
                duSolution.setSortnum(duSolutionNum + i);
                duSolution.setSolutionId(saveDuSolutionDTO.getSolutionId());
@@ -383,10 +455,14 @@
            }
            for (int j = 0; j < saveDuWorkTypeDTOList.size(); j++) {
                SaveDuWorkTypeDTO saveDuWorkTypeDTO = saveDuWorkTypeDTOList.get(j);
                if(duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda().eq(DuWorktype::getDuSolutionId,duSolution.getId())
                if(Objects.isNull(saveDuWorkTypeDTO.getWorkTypeId())){
                    throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"【"+saveDuSolutionDTO.getSolutionName()+"】该方案下"+saveDuWorkTypeDTO.getWorkTypeName()+"该工种信息异常");
                }
                if(duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>()
                        .lambda().eq(DuWorktype::getDuSolutionId,duSolution.getId())
                        .eq(DuWorktype::getIsdeleted,Constants.ZERO)
                        .eq(DuWorktype::getWorkTypeId,saveDuWorkTypeDTO.getWorkTypeId()))>0){
                    throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"【"+saveDuSolutionDTO.getSolutionName()+"】该方案下"+saveDuWorkTypeDTO.getWorkTypeName()+"该工种已存在工种已存在");
                    throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"【"+saveDuSolutionDTO.getSolutionName()+"】该方案下"+saveDuWorkTypeDTO.getWorkTypeName()+"该工种已存在");
                }
                Integer duWorkTypeNum = duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda().eq(DuWorktype::getDuSolutionId,duSolution.getId()));
                DuWorktype duWorktype = new DuWorktype();
@@ -394,6 +470,7 @@
                duWorktype.setCreator(loginUserInfo.getId());
                duWorktype.setIsdeleted(Constants.ZERO);
                duWorktype.setDuSolutionId(duSolution.getId());
                duWorktype.setStatus(Constants.ZERO);
                duWorktype.setSortnum(duWorkTypeNum + j);
                duWorktype.setWorkTypeId(saveDuWorkTypeDTO.getWorkTypeId());
                duWorktype.setVideoUrl(saveDuWorkTypeDTO.getVideoUrl());
@@ -588,11 +665,13 @@
        return dispatchUnitMapper.selectList(wrapper);
    }
  
    @Override
    public PageData<DispatchUnit> findPage(PageWrap<DispatchUnit> pageWrap) {
        IPage<DispatchUnit> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
        QueryWrapper<DispatchUnit> queryWrapper = new QueryWrapper<>();
        Utils.MP.blankToNull(pageWrap.getModel());
        queryWrapper.lambda().eq(DispatchUnit::getIsdeleted,Constants.ZERO);
        if (pageWrap.getModel().getId() != null) {
            queryWrapper.lambda().eq(DispatchUnit::getId, pageWrap.getModel().getId());
        }
@@ -666,7 +745,8 @@
                queryWrapper.orderByAsc(sortData.getProperty());
            }
        }
        return PageData.from(dispatchUnitMapper.selectPage(page, queryWrapper));
        PageData<DispatchUnit> dispatchUnitPageData = PageData.from(dispatchUnitMapper.selectPage(page, queryWrapper));
        return dispatchUnitPageData;
    }
    @Override
@@ -685,7 +765,7 @@
                        .selectAll(DuSolution.class)
                        .selectAs(Solutions::getName,DuSolution::getSolutionName)
                        .leftJoin(Solutions.class,Solutions::getId,DuSolution::getSolutionId)
                        .eq(DuSolution::getSolutionId,dispatchUnit.getId())
                        .eq(DuSolution::getDispatchUnitId,dispatchUnit.getId())
                        .orderByAsc(DuSolution::getSortnum)
        );
        if(CollectionUtils.isNotEmpty(duSolutionList)){
@@ -698,6 +778,14 @@
                                .leftJoin(Worktype.class,Worktype::getId,DuWorktype::getWorkTypeId)
                                .eq(DuWorktype::getDuSolutionId,duSolution.getId())
                );
                if(CollectionUtils.isNotEmpty(duWorkTypeList)){
                    String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.OSS,Constants.DU_FILE).getCode();
                    duWorkTypeList.forEach(i->{
                        if(StringUtils.isNotBlank(i.getVideoUrl())){
                            i.setVideoUrlFull(path + i.getVideoUrl());
                        }
                    });
                }
                duSolution.setDuWorktypeList(duWorkTypeList);
            }
            dispatchUnit.setDuSolutionList(duSolutionList);
@@ -706,10 +794,10 @@
        List<DuLog> duLogList = duLogJoinMapper.selectJoinList(DuLog.class,
                new MPJLambdaWrapper<DuLog>()
                        .selectAll(DuLog.class)
                        .selectAs(Member::getName,DuLog::getCreatorName)
                        .selectAs(SystemUser::getRealname,DuLog::getCreatorName)
                        .selectAs(Company::getName,DuLog::getCompanyName)
                        .leftJoin(Member.class,Member::getId,DuLog::getCreator)
                        .leftJoin(Company.class,Company::getId,Member::getCompanyId)
                        .leftJoin(SystemUser.class,SystemUser::getId,DuLog::getCreator)
                        .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId)
                        .eq(DuLog::getDuId,dispatchUnit.getId())
                        .orderByAsc(DuLog::getCreateDate)
        );
@@ -725,17 +813,35 @@
    @Override
    public List<DispatchUnit> findByDTO(DispatchUnitQueryDTO dispatchUnitQueryDTO) {
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        List<DispatchUnit> dispatchUnitList = dispatchUnitMapper.selectList(new QueryWrapper<DispatchUnit>().lambda()
//        List<DispatchUnit> dispatchUnitList = dispatchUnitMapper.selectList(new QueryWrapper<DispatchUnit>().lambda()
//                .eq(DispatchUnit::getIsdeleted,Constants.ZERO)
//                .eq(loginUserInfo.getType().equals(Constants.ONE),DispatchUnit::getCompanyId,loginUserInfo.getCompanyId())
//                .eq(DispatchUnit::getStatus,Constants.ZERO)
//                .eq(DispatchUnit::getDataType,dispatchUnitQueryDTO.getDataType())
//                .apply(!Objects.isNull(dispatchUnitQueryDTO.getSolutionId()), " id in ( select d.dispatch_unit_id from du_solution d where d.solution_id = "+dispatchUnitQueryDTO.getSolutionId()+"  ) " )
//                .exists(!Objects.isNull(dispatchUnitQueryDTO.getApplyId()),
//                        " select 1 from apply_detail ad where ad.isdeleted = 0 and ad.apply_id = "+dispatchUnitQueryDTO.getApplyId()+" " +
//                                " ad.du_id = t.id ")
//                .orderByAsc(DispatchUnit::getSortnum)
//        );
        List<DispatchUnit> dispatchUnitList  = dispatchUnitJoinMapper.selectJoinList(DispatchUnit.class,
                new MPJLambdaWrapper<DispatchUnit>().selectAll(DispatchUnit.class)
                        .selectAs(DuSolution::getId,DispatchUnit::getDuSolutionId)
                        .leftJoin(DuSolution.class,DuSolution::getDispatchUnitId,DispatchUnit::getId)
                .eq(DispatchUnit::getIsdeleted,Constants.ZERO)
                .eq(loginUserInfo.getType().equals(Constants.ONE),DispatchUnit::getCompanyId,loginUserInfo.getCompanyId())
                .eq(DispatchUnit::getStatus,Constants.ZERO)
                .eq(DispatchUnit::getDataType,dispatchUnitQueryDTO.getDataType())
                .apply(!Objects.isNull(dispatchUnitQueryDTO.getSolutionId()), " id in ( select d.dispatch_unit_id from du_solution d where d.solutionId = "+dispatchUnitQueryDTO.getSolutionId()+"  ) " )
                        .eq(!Objects.isNull(dispatchUnitQueryDTO.getSolutionId()),DuSolution::getSolutionId,dispatchUnitQueryDTO.getSolutionId())
                .exists(!Objects.isNull(dispatchUnitQueryDTO.getApplyId()),
                        " select 1 from apply_detail ad where ad.isdeleted = 0 and ad.apply_id = "+dispatchUnitQueryDTO.getApplyId()+" " +
                                " ad.du_id = t.id ")
                .orderByAsc(DispatchUnit::getSortnum)
        );
        return dispatchUnitList;
    }
server/service/src/main/java/com/doumee/service/business/impl/DuWorktypeServiceImpl.java
@@ -1,7 +1,10 @@
package com.doumee.service.business.impl;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
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.DuWorktypeMapper;
import com.doumee.dao.business.model.DuWorktype;
@@ -15,6 +18,7 @@
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.Objects;
/**
 * æ´¾é£å•位方案管工种关联信息表Service实现
@@ -35,7 +39,16 @@
    @Override
    public void deleteById(Integer id) {
        DuWorktype duWorktype = duWorktypeMapper.selectById(id);
        if(Objects.isNull(duWorktype)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        if(duWorktype.getStatus().equals(Constants.TWO)){
        duWorktypeMapper.deleteById(id);
        }else{
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"当前状态无法进行删除");
        }
    }
    @Override
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -12,12 +12,14 @@
import com.doumee.core.utils.Utils;
import com.doumee.core.utils.aliyun.ALiYunUtil;
import com.doumee.dao.business.*;
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.dto.InsuranceApplyOptDTO;
import com.doumee.dao.business.dto.InsuranceApplyQueryDTO;
import com.doumee.dao.business.join.ApplyDetailJoinMapper;
import com.doumee.dao.business.join.ApplyLogJoinMapper;
import com.doumee.dao.business.join.InsuranceApplyJoinMapper;
import com.doumee.dao.business.model.*;
import com.doumee.dao.business.vo.CountCyclePriceVO;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.service.business.InsuranceApplyService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -606,16 +608,11 @@
        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();
        //判断是否存在重复信息
        List<Integer> memberIdList = applyDetailList.stream().map(i->i.getMemberId()).collect(Collectors.toList());
        Set<Integer> set = new HashSet<>(memberIdList);
        if(memberIdList.size() != set.size()){
        List<String> idCardList = applyDetailList.stream().map(i->i.getIdcardNo()).collect(Collectors.toList());
        Set<String> set = new HashSet<>(idCardList);
        if(idCardList.size() != set.size()){
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"员工信息存在重复信息");
        }
        Constants.InsuranceApplyStatus insuranceApplyStatus = Constants.InsuranceApplyStatus.UPLOAD;
@@ -624,10 +621,88 @@
        insuranceApply.setIsdeleted(Constants.ZERO);
        insuranceApply.setCompanyId(loginUserInfo.getCompanyId());
        insuranceApply.setCheckInfo(insuranceApplyStatus.getName());
        insuranceApply.setStartTime(insuranceApply.getApplyStartTime());
        insuranceApply.setEndTime(insuranceApply.getApplyEndTime());
        insuranceApply.setCheckDate(new Date());
        insuranceApply.setCurrentFee(BigDecimal.ZERO);
        insuranceApply.setCheckUserId(loginUserInfo.getId());
        insuranceApply.setStatus(insuranceApplyStatus.getKey());
        insuranceApplyMapper.insert(insuranceApply);
        //处理下级数据
        this.dealApplyDetailData(insuranceApply,applyDetailList,loginUserInfo);
        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);
        return insuranceApply.getId();
    }
    @Override
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public Integer updateData(InsuranceApply insuranceApply) {
        if (Objects.isNull(insuranceApply)
                || Objects.isNull(insuranceApply.getId())
                || Objects.isNull(insuranceApply.getSolutionId())
                || Objects.isNull(insuranceApply.getApplyStartTime())
                || Objects.isNull(insuranceApply.getApplyEndTime())
                || !CollectionUtils.isNotEmpty(insuranceApply.getApplyDetailList())
        ) {
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(!loginUserInfo.getType().equals(Constants.ONE)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"用户类型错误:非企业用户无法进行该操作");
        }
        InsuranceApply dbInsuranceApply = insuranceApplyMapper.selectById(insuranceApply.getId());
        if(Objects.isNull(dbInsuranceApply)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到修改对象信息");
        }
        if(!(dbInsuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey())
                    || dbInsuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.FAIL_RETURN.getKey()))
        ){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"状态错误,当前状态无法进行该操作");
        }
        List<ApplyDetail> applyDetailList = insuranceApply.getApplyDetailList();
        //判断是否存在重复信息
        List<String> idCardList = applyDetailList.stream().map(i->i.getIdcardNo()).collect(Collectors.toList());
        Set<String> set = new HashSet<>(idCardList);
        if(idCardList.size() != set.size()){
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"员工信息存在重复信息");
        }
        Constants.InsuranceApplyStatus insuranceApplyStatus = Constants.InsuranceApplyStatus.UPLOAD;
        insuranceApply.setEditDate(new Date());
        insuranceApply.setEditor(loginUserInfo.getId());
        insuranceApply.setIsdeleted(Constants.ZERO);
        insuranceApply.setCompanyId(loginUserInfo.getCompanyId());
        insuranceApply.setCheckInfo(insuranceApplyStatus.getName());
        insuranceApply.setStartTime(insuranceApply.getApplyStartTime());
        insuranceApply.setEndTime(insuranceApply.getApplyEndTime());
        insuranceApply.setCheckDate(new Date());
        insuranceApply.setCurrentFee(BigDecimal.ZERO);
        insuranceApply.setCheckUserId(loginUserInfo.getId());
        insuranceApply.setStatus(insuranceApplyStatus.getKey());
        applyDetailMapper.delete(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getApplyId,insuranceApply.getId()));
        //处理下级数据
        this.dealApplyDetailData(insuranceApply,applyDetailList,loginUserInfo);
        insuranceApply.setFee(applyDetailList.stream().map(ApplyDetail::getFee).reduce(BigDecimal.ZERO,BigDecimal::add));
        insuranceApplyMapper.updateById(insuranceApply);
        //存储日志数据
        this.saveApplyLog(insuranceApply,insuranceApplyStatus,null);
        return insuranceApply.getId();
    }
    public void dealApplyDetailData(InsuranceApply insuranceApply,List<ApplyDetail> applyDetailList,LoginUserInfo loginUserInfo){
        Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId());
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"未查询到方案信息");
        }
        //查询保险方案下的所有派遣单位
        List<DuSolution> duSolutionList = duSolutionMapper.selectList(new QueryWrapper<DuSolution>().lambda()
                        .eq(DuSolution::getIsdeleted,Constants.ZERO)
@@ -645,11 +720,13 @@
        if(!CollectionUtils.isNotEmpty(duWorktypeList)){
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"数据异常:保险方案下未查询到工种信息");
        }
        if(CollectionUtils.isNotEmpty(applyDetailList)){
            for (int i = 0; i < applyDetailList.size(); i++) {
                ApplyDetail applyDetail = applyDetailList.get(i);
                if(Objects.isNull(applyDetail)
                        ||Objects.isNull(applyDetail.getMemberId())
                        ||StringUtils.isBlank(applyDetail.getIdcardNo())
                        ||StringUtils.isBlank(applyDetail.getMemberName())
                        ||Objects.isNull(applyDetail.getDuId())
                        ||Objects.isNull(applyDetail.getWorktypeId())
                ){
@@ -658,15 +735,49 @@
                applyDetail.setCreateDate(new Date());
                applyDetail.setCreator(loginUserInfo.getId());
                applyDetail.setIsdeleted(Constants.ZERO);
                applyDetail.setStartTime(insuranceApply.getApplyStartTime());
                applyDetail.setEndTime(insuranceApply.getApplyEndTime());
                applyDetail.setSortnum(i);
                applyDetail.setApplyId(insuranceApply.getId());
                Member member = new Member();
                if(Objects.isNull(applyDetail.getMemberId())){
                    throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"【"+applyDetail.getMemberName()+"】员工信息存在异常数据!");
                    //查询是否存在该用户
                    member = memberMapper.selectOne(new QueryWrapper<Member>().lambda()
                            .eq(Member::getCompanyId,insuranceApply.getCompanyId())
                            .eq(Member::getIsdeleted,Constants.ZERO)
                            .eq(Member::getIdcardNo,applyDetail.getIdcardNo())
                            .last(" limit 1")
                    );
                    if(Objects.isNull(member)){
                        member = new Member();
                        member.setCreateDate(new Date());
                        member.setCreator(loginUserInfo.getId());
                        member.setIsdeleted(Constants.ZERO);
                        member.setName(applyDetail.getMemberName());
                        member.setCompanyId(insuranceApply.getCompanyId());
                        member.setSex(Constants.getSexByIdCard(applyDetail.getIdcardNo()));
                        member.setIdcardNo(applyDetail.getIdcardNo());
                        member.setApplyId(insuranceApply.getId());
                        member.setDuId(applyDetail.getDuId());
                        member.setWorktypeId(applyDetail.getWorktypeId());
                        memberMapper.insert(member);
                    }else{
                        member.setApplyId(insuranceApply.getId());
                        member.setDuId(applyDetail.getDuId());
                        member.setWorktypeId(applyDetail.getWorktypeId());
                        memberMapper.updateById(member);
                }
                Member member = memberMapper.selectById(applyDetail.getMemberId());
                }else{
                    member = memberMapper.selectById(applyDetail.getMemberId());
                if(Objects.isNull(member)){
                    throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"【"+applyDetail.getMemberName()+"】员工信息存在异常数据!");
                }
                    member.setApplyId(insuranceApply.getId());
                    member.setDuId(applyDetail.getDuId());
                    member.setWorktypeId(applyDetail.getWorktypeId());
                    memberMapper.updateById(member);
                }
                applyDetail.setMemberId(member.getId());
                applyDetail.setIdcardNo(member.getIdcardNo());
                applyDetail.setSex(member.getSex());
                applyDetail.setFee(Constants.countDetailFee(solutions,insuranceApply.getApplyEndTime(),insuranceApply.getApplyStartTime()));
@@ -674,18 +785,15 @@
                if(duSolutionList.stream().filter(d->d.getDispatchUnitId().equals(applyDetail.getDuId())).collect(Collectors.toList()).size()<=Constants.ZERO){
                    throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"【"+applyDetail.getMemberName()+"】员工派遣单位未查询到!");
                }
                if(duWorktypeList.stream().filter(d->d.getDuSolutionId().equals(applyDetail.getDuId())&&d.getWorkTypeId().equals(applyDetail.getWorktypeId()))
                if(duWorktypeList.stream().filter(d->d.getWorkTypeId().equals(applyDetail.getWorktypeId()))
                        .collect(Collectors.toList()).size()<=Constants.ZERO){
                    throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"【"+applyDetail.getMemberName()+"】员工工种信息未查询到!");
                }
            }
            applyDetailJoinMapper.insertBatchSomeColumn(applyDetailList);
        }
        //存储日志数据
        this.saveApplyLog(insuranceApply,insuranceApplyStatus,null);
        return insuranceApply.getId();
    }
    public void saveApplyLog(InsuranceApply insuranceApply,Constants.InsuranceApplyStatus insuranceApplyStatus,String content){
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
@@ -834,6 +942,7 @@
        if (pageWrap.getModel().getStatus() != null) {
            queryWrapper.eq(InsuranceApply::getStatus, pageWrap.getModel().getStatus());
        }
        if(CollectionUtils.isNotEmpty(pageWrap.getSorts())){
        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
                queryWrapper.orderByDesc(sortData.getProperty());
@@ -841,6 +950,10 @@
                queryWrapper.orderByAsc(sortData.getProperty());
            }
        }
        }else{
            queryWrapper.orderByDesc(InsuranceApply::getCreateDate);
        }
        PageData<InsuranceApply> pageData = PageData.from(insuranceApplyJoinMapper.selectJoinPage(page,InsuranceApply.class, queryWrapper));
        if(pageData.getRecords()!=null){
            for (InsuranceApply apply : pageData.getRecords()){
@@ -952,10 +1065,10 @@
        List<ApplyLog> applyLogList = applyLogJoinMapper.selectJoinList(ApplyLog.class,
                new MPJLambdaWrapper<ApplyLog>()
                        .selectAll(ApplyLog.class)
                        .selectAs(Member::getName,ApplyLog::getCreatorName)
                        .selectAs(SystemUser::getRealname,ApplyLog::getCreatorName)
                        .selectAs(Company::getName,ApplyLog::getCompanyName)
                        .leftJoin(Member.class,Member::getId,ApplyLog::getCreator)
                        .leftJoin(Company.class,Company::getId,Member::getCompanyId)
                        .leftJoin(SystemUser.class,SystemUser::getId,ApplyLog::getCreator)
                        .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId)
                        .eq(ApplyLog::getApplyId,insuranceApply.getId())
                        .orderByAsc(ApplyLog::getCreateDate)
        );
@@ -1003,6 +1116,18 @@
                }else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.BD_DONE_PDF.getKey())){
                    //最終保险单
                    model.setBaoxiandanFile(f);
                }
                if(model.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){
                    //如果当前时间大于结束日期 åˆ™ä½¿ç”¨ç»“束日期对比开始日期
                    if(DateUtil.compareDate(new Date(),model.getEndTime())>=Constants.ZERO){
                        model.setServiceDays(DateUtil.daysBetweenDates(model.getEndTime(),model.getStartTime()));
                    }else if(DateUtil.compareDate(model.getStartTime(),new Date())>=Constants.ZERO){
                        //未开始
                        model.setServiceDays(Constants.ZERO);
                    }else{
                        model.setServiceDays(DateUtil.daysBetweenDates(new Date(),model.getStartTime()));
                    }
                }
            }
        }
@@ -1134,15 +1259,37 @@
            }
        }
    }
    @Override
    public CountCyclePriceVO getCountCyclePriceVO(CountCyclePriceDTO countCyclePriceDTO){
        if(Objects.isNull(countCyclePriceDTO)
            || Objects.isNull(countCyclePriceDTO.getSolutionsId())
            || Objects.isNull(countCyclePriceDTO.getStartDate())
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        Solutions solutions = solutionsMapper.selectById(countCyclePriceDTO.getSolutionsId());
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息");
        }
        CountCyclePriceVO countCyclePriceVO = new CountCyclePriceVO();
        if(solutions.getInsureCycleUnit().equals(Constants.ZERO)){
            countCyclePriceVO.setEndDate(DateUtil.afterDateByType(countCyclePriceDTO.getStartDate(),0,solutions.getInsureCycle()));
        }else if(solutions.getInsureCycleUnit().equals(Constants.TWO)){
            Integer monthDays = DateUtil.monthDays(countCyclePriceDTO.getStartDate());
            Date afterDate = DateUtil.afterDateByType(countCyclePriceDTO.getStartDate(),0,monthDays);
            countCyclePriceVO.setEndDate(DateUtil.afterDateByType(afterDate,0,-1));
        }else if(solutions.getInsureCycleUnit().equals(Constants.THREE)){
            Date afterDate = DateUtil.afterDateByType(countCyclePriceDTO.getStartDate(),2,solutions.getInsureCycle());
            countCyclePriceVO.setEndDate(DateUtil.afterDateByType(afterDate,0,-1));
        }
        countCyclePriceVO.setCyclePrice(Constants.countDetailFee(solutions,countCyclePriceVO.getEndDate(),countCyclePriceDTO.getStartDate()));
        return countCyclePriceVO;
    }
}
server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -55,6 +55,7 @@
        return member.getId();
    }
    @Override
    public void deleteById(Integer id) {
        memberMapper.deleteById(id);
@@ -267,14 +268,17 @@
            if(CollectionUtils.isNotEmpty(list)){
                Member member = list.stream().filter(m->m.getIdcardNo().equals(model.getIdCard())).findAny().get();
                if(!Objects.isNull(member)){
                    model.setWorkTypeId(member.getWorktypeId());
                    model.setWorkTypeName(member.getWorkTypeName());
                    model.setDuId(member.getDuId());
                    model.setDuName(member.getDuName());
//                    model.setWorkTypeId(member.getWorktypeId());
//                    model.setWorkTypeName(member.getWorkTypeName());
                    model.setIdCard(member.getIdcardNo());
//                    model.setDuId(member.getDuId());
//                    model.setDuName(member.getDuName());
                    model.setSex(member.getSex());
                }else{
                    model.setSex(Constants.getSexByIdCard(model.getIdCard()));
                }
            }else{
                model.setSex(Constants.getSexByIdCard(model.getIdCard()));
            }
        }
        return dataList;
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
@@ -14,6 +14,7 @@
import com.doumee.dao.business.join.SolutionWorktypeJoinMapper;
import com.doumee.dao.business.join.SolutionsJoinMapper;
import com.doumee.dao.business.model.*;
import com.doumee.service.business.CompanyService;
import com.doumee.service.business.SolutionsService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -408,6 +409,45 @@
        return PageData.from(solutionsMapper.selectPage(page, queryWrapper));
    }
    @Override
    public List<Solutions> findListForCompany() {
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        List<Solutions> solutionsList = solutionsJoinMapper.selectJoinList(Solutions.class,new MPJLambdaWrapper<Solutions>()
                        .selectAll(Solutions.class)
                .leftJoin(CompanySolution.class,CompanySolution::getSolutionBaseId,Solutions::getId)
                .eq(Solutions::getIsdeleted,Constants.ZERO)
                .eq(Solutions::getDataType,Constants.TWO)
                .eq(CompanySolution::getIsdeleted,Constants.ZERO)
                .eq(CompanySolution::getCompanyId,user.getCompanyId())
                .orderByAsc(Solutions::getSortnum)
        );
//        solutionsList.forEach(i->{
//            //保险时间单位 ä¸Ž æœ€å°æŠ•保周期时间单位 è§„则相同 æˆ–者 æœ€å°æŠ•保周期时间单位 è§„则为 å¤©æ—¶ é»˜è®¤é‡‘额
//            if(i.getTimeUnit().equals(i.getInsureCycleUnit())||i.getInsureCycleUnit().equals(Constants.ZERO)){
//                i.setCyclePrice(i.getPrice());
//            }else{
//                if(i.getInsureCycleUnit().equals(Constants.ONE)){
//                    //最小投保周期时间单位为半月
//                    i.setCyclePrice(i.getPrice().multiply(new BigDecimal(15)));
//                }else if(i.getInsureCycleUnit().equals(Constants.TWO)){
//                    //最小投保周期时间单位为月 åˆ™è®¡ç®—当月多少天
//                    if( ){
//
//                    }
//                }
//            }
//        });
        return solutionsList;
    }
    @Override
    public long count(Solutions solutions) {
        QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions);
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
@@ -503,7 +503,7 @@
            }
        }
        if(!Objects.isNull(insuranceApply)){
            TaxesInvoicingVO taxesInvoicingVO = insuranceApply.getTaxesInvoicingVO();
            TaxesInvoicingVO taxesInvoicingVO = insuranceApply.toTaxesInvoicingVO();
            taxesInvoicingVOList.add(taxesInvoicingVO);
        }
    }