| | |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | |
| | | import com.doumee.service.business.ApplyDetailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | 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.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | return ApiResponse.success(pageData); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("分页查询") |
| | | @PostMapping("/pageForMini") |
| | | @RequiresPermissions("business:applydetail:query") |
| | | public ApiResponse<PageData<ApplyDetail>> pageForMini (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | pageWrap.getModel().setCompanyId(loginUserInfo.getCompanyId()); |
| | | PageData<ApplyDetail> pageData = applyDetailService.findPageForMini(pageWrap); |
| | | return ApiResponse.success(pageData); |
| | | } |
| | | |
| | | @ApiOperation("列表查询") |
| | | @PostMapping("/findList") |
| | | @RequiresPermissions("business:applydetail:query") |
| | |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applydetail:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap, HttpServletResponse response) { |
| | | pageWrap.getModel().setIsExcel(Constants.ONE); |
| | | 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); |
| | | ExcelExporter.build(ApplyDetail.class).exportWithSheetAndFirstAndEnd(pageData.getRecords(), pageWrap.getModel().getSolutionName()+".xlsx","《"+pageWrap.getModel().getSolutionName()+"》"+"保单人员信息",null, "保单人员",response); |
| | | } |
| | | |
| | | @ApiOperation("根据ID查询") |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation("查询人员可报案数据") |
| | | @GetMapping("/getMemberSettleClaimsList") |
| | | public ApiResponse<List<ApplyDetail>> getMemberSettleClaimsList(@RequestParam Integer memberId) { |
| | | return ApiResponse.success(applyDetailService.getMemberSettleClaimsList(memberId)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |