| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.dto.ApplyDetailPageDTO; |
| | | import com.doumee.dao.business.model.ApplyDetail; |
| | | import com.doumee.service.business.ApplyDetailService; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applydetail:query") |
| | | public ApiResponse<PageData<ApplyDetail>> findPage (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) { |
| | | return ApiResponse.success(applyDetailService.findPageForCompany(pageWrap)); |
| | | PageData<ApplyDetail> pageData = applyDetailService.findPageForCompany(pageWrap); |
| | | pageData.getRecords().forEach(i->{ |
| | | if(i.getSolutionType().equals(Constants.ONE)&&!i.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){ |
| | | i.setFee(null); |
| | | } |
| | | }); |
| | | return ApiResponse.success(pageData); |
| | | } |
| | | |
| | | @ApiOperation("列表查询") |
| | |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applydetail:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap, HttpServletResponse response) { |
| | | //List<T> data, String fileName,String first,String end, HttpServletResponse response |
| | | ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(applyDetailService.findPageForCompany(pageWrap).getRecords(), pageWrap.getModel().getSolutionName()+".xlsx","在保人员名单",null, response); |
| | | PageData<ApplyDetail> pageData = applyDetailService.findPageForCompany(pageWrap); |
| | | pageData.getRecords().forEach(i->{ |
| | | if(i.getSolutionType().equals(Constants.ONE)&&!i.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){ |
| | | i.setFee(BigDecimal.ZERO); |
| | | } |
| | | }); |
| | | ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(pageData.getRecords(), pageWrap.getModel().getSolutionName()+".xlsx","在保人员名单",null, response); |
| | | } |
| | | |
| | | @ApiOperation("根据ID查询") |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.dto.CountCyclePriceDTO; |
| | | import com.doumee.dao.business.dto.InsuranceApplyOptDTO; |
| | | import com.doumee.dao.business.dto.InsuranceApplyQueryDTO; |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:insuranceapply:query") |
| | | public ApiResponse<PageData<InsuranceApply>> findPage (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap) { |
| | | return ApiResponse.success(insuranceApplyService.findPage(pageWrap)); |
| | | PageData<InsuranceApply> pageData = insuranceApplyService.findPage(pageWrap); |
| | | pageData.getRecords().forEach(i->{ |
| | | if(i.getSolutionType().equals(Constants.ONE)&&!i.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){ |
| | | i.setFee(null); |
| | | } |
| | | }); |
| | | return ApiResponse.success(pageData); |
| | | } |
| | | |
| | | @ApiOperation("列表") |
| | |
| | | @PostMapping("/exportDetailExcel") |
| | | @RequiresPermissions("business:insuranceapply:exportExcel") |
| | | public void exportDetailExcel (@RequestBody InsuranceApply model, HttpServletResponse response) { |
| | | ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApplyService.findDetailForExport(model), response); |
| | | InsuranceApply insuranceApply = insuranceApplyService.findDetailForExport(model); |
| | | if(Objects.nonNull(insuranceApply)&&insuranceApply.getSolutionType().equals(Constants.ONE) |
| | | &&!insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){ |
| | | insuranceApply.setFee(null); |
| | | } |
| | | ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApply, response); |
| | | } |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:insuranceapply:query") |
| | | public ApiResponse<InsuranceApply> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(insuranceApplyService.findDetail(id)); |
| | | InsuranceApply insuranceApply = insuranceApplyService.findDetail(id); |
| | | if(Objects.nonNull(insuranceApply)&&insuranceApply.getSolutionType().equals(Constants.ONE)&&!insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_DONE.getKey())){ |
| | | insuranceApply.setFee(null); |
| | | } |
| | | return ApiResponse.success(insuranceApply); |
| | | } |
| | | @ApiOperation("企业签署保单") |
| | | @GetMapping("/getSignLink/{id}") |
| | |
| | | @ExcelColumn(name="保险方案",index =2,width = 10) |
| | | private String solutionName; |
| | | |
| | | @ApiModelProperty(value = "方案类型 0直保 1委托投保") |
| | | @TableField(exist = false) |
| | | private Integer solutionType; |
| | | |
| | | @ApiModelProperty(value = "方案主键") |
| | | @TableField(exist = false) |
| | | private Integer solutionId; |
| | |
| | | @TableField(exist = false) |
| | | private Integer applyStatus; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "保单状态") |
| | | @TableField(exist = false) |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "派遣单位名称") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="派遣单位",index = 6,width = 10) |
| | |
| | | queryWrapper.selectAs(Member::getIdcardNo,ApplyDetail::getIdcardNo); |
| | | queryWrapper.selectAs(Member::getName,ApplyDetail::getMemberName); |
| | | queryWrapper.selectAs(Solutions::getName,ApplyDetail::getSolutionName); |
| | | queryWrapper.selectAs(Solutions::getType,ApplyDetail::getSolutionType); |
| | | queryWrapper.selectAs(Company::getName,ApplyDetail::getCompanyName); |
| | | queryWrapper.selectAs(InsuranceApply::getStatus,ApplyDetail::getSolutionName); |
| | | queryWrapper.selectAs(InsuranceApply::getStatus,ApplyDetail::getStatus); |
| | | queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId); |
| | | queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,ApplyDetail::getMemberId); |
| | |
| | | MPJLambdaWrapper wrapper= new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | .selectAs(Solutions::getType,InsuranceApply::getSolutionType) |
| | | .selectAs(Company::getName,InsuranceApply::getCompanyName) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.dto.ApplyDetailPageDTO; |
| | | import com.doumee.dao.business.model.ApplyDetail; |
| | | import com.doumee.service.business.ApplyDetailService; |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applydetail:query") |
| | | public ApiResponse<PageData<ApplyDetail>> findPage (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) { |
| | | return ApiResponse.success(applyDetailService.findPageForCompany(pageWrap)); |
| | | PageData<ApplyDetail> pageData = applyDetailService.findPageForCompany(pageWrap); |
| | | return ApiResponse.success(pageData); |
| | | } |
| | | @ApiOperation("查询全部") |
| | | @PostMapping("/list") |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.dto.InsuranceApplyQueryDTO; |
| | | import com.doumee.dao.business.model.InsuranceApply; |
| | | import com.doumee.service.business.InsuranceApplyService; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:insuranceapply:query") |
| | | public ApiResponse<PageData<InsuranceApply>> findPage (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap) { |
| | | return ApiResponse.success(insuranceApplyService.findPage(pageWrap)); |
| | | PageData<InsuranceApply> pageData = insuranceApplyService.findPage(pageWrap); |
| | | return ApiResponse.success(pageData); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | |
| | | @PostMapping("/exportDetailExcel") |
| | | @RequiresPermissions("business:insuranceapply:exportExcel") |
| | | public void exportDetailExcel (@RequestBody InsuranceApply model, HttpServletResponse response) { |
| | | ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApplyService.findDetailForExport(model), response); |
| | | InsuranceApply insuranceApply = insuranceApplyService.findDetailForExport(model); |
| | | ExcelExporter.build(InsuranceApply.class).exportApplyDetail(insuranceApply, response); |
| | | } |
| | | |
| | | @ApiOperation("根据ID查询") |