Commit 4223427c authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

"feature-zhaJi:增加商险按钮权限验证"

See merge request fangxinjiang/yifu!224
parents 0f0adc19 2a8c343f
...@@ -1055,6 +1055,19 @@ public class InsurancesConstants { ...@@ -1055,6 +1055,19 @@ public class InsurancesConstants {
*/ */
public static final String CORRECT_SETTLE_BILL = "红冲结算单信息"; public static final String CORRECT_SETTLE_BILL = "红冲结算单信息";
/**
* 突发事件创建
*/
public static final String URGENT_UPDATE_IS_USE = "突发事件创建";
/**
* 系统触发
*/
public static final String SYSTEM_TRIGGER = "系统触发";
} }
...@@ -175,5 +175,10 @@ public class InsuranceExportListVO implements Serializable { ...@@ -175,5 +175,10 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
} }
...@@ -181,4 +181,10 @@ public class InsuranceRefundListVo implements Serializable { ...@@ -181,4 +181,10 @@ public class InsuranceRefundListVo implements Serializable {
*/ */
@Schema(description = "购买月数") @Schema(description = "购买月数")
private Long buyMonth; private Long buyMonth;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
} }
...@@ -194,4 +194,10 @@ public class RefundExportListVo implements Serializable { ...@@ -194,4 +194,10 @@ public class RefundExportListVo implements Serializable {
*/ */
@Schema(description = "购买天数") @Schema(description = "购买天数")
private long buyDay; private long buyDay;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
} }
...@@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; ...@@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -50,6 +51,7 @@ public class TInsuranceCompanyController { ...@@ -50,6 +51,7 @@ public class TInsuranceCompanyController {
*/ */
@GetMapping("/{id}" ) @GetMapping("/{id}" )
@Operation(summary = "通过id查询保险公司详情", description = "通过id查询保险公司详情") @Operation(summary = "通过id查询保险公司详情", description = "通过id查询保险公司详情")
@PreAuthorize("@pms.hasPermission('insurance:insuranceCompany_getById')")
public R<TInsuranceCompany> getById(@PathVariable("id" ) String id) { public R<TInsuranceCompany> getById(@PathVariable("id" ) String id) {
return R.ok(insuranceCompanyService.getById(id)); return R.ok(insuranceCompanyService.getById(id));
} }
...@@ -60,10 +62,10 @@ public class TInsuranceCompanyController { ...@@ -60,10 +62,10 @@ public class TInsuranceCompanyController {
* @param insuranceCompany 保险公司明细 * @param insuranceCompany 保险公司明细
* @return R * @return R
*/ */
@Operation(summary = "新增保险公司", description = "新增保险公司:hasPermission('demo_insuranceCompany_add')") @Operation(summary = "新增保险公司", description = "新增保险公司:hasPermission('insurance:insuranceCompany_save')")
@SysLog("新增保险公司" ) @SysLog("新增保险公司" )
@PostMapping("/save") @PostMapping("/save")
//@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_add')" ) @PreAuthorize("@pms.hasPermission('insurance_company_ad')")
public R save(@RequestBody TInsuranceCompany insuranceCompany) { public R save(@RequestBody TInsuranceCompany insuranceCompany) {
return insuranceCompanyService.saveInsuranceCompany(insuranceCompany); return insuranceCompanyService.saveInsuranceCompany(insuranceCompany);
} }
...@@ -73,10 +75,9 @@ public class TInsuranceCompanyController { ...@@ -73,10 +75,9 @@ public class TInsuranceCompanyController {
* @param insuranceCompany 修改实体类 * @param insuranceCompany 修改实体类
* @return R * @return R
*/ */
@Operation(summary = "修改保险公司", description = "修改保险公司:hasPermission('demo_insuranceCompany_update')") @Operation(summary = "修改保险公司", description = "修改保险公司:hasPermission('insurance:insuranceCompany_update')")
@SysLog("修改保险公司" ) @SysLog("修改保险公司" )
@PostMapping("/update") @PostMapping("/update")
//@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_update')" )
public R update(@RequestBody TInsuranceCompany insuranceCompany) { public R update(@RequestBody TInsuranceCompany insuranceCompany) {
return insuranceCompanyService.updateInsuranceCompany(insuranceCompany); return insuranceCompanyService.updateInsuranceCompany(insuranceCompany);
} }
...@@ -85,7 +86,7 @@ public class TInsuranceCompanyController { ...@@ -85,7 +86,7 @@ public class TInsuranceCompanyController {
* 查询保险公司列表(不分页) * 查询保险公司列表(不分页)
* @return * @return
*/ */
@Operation(summary = "查询保险公司列表(不分页)", description = "查询保险公司列表(不分页)") @Operation(summary = "查询保险公司列表(不分页)", description = "查询保险公司列表(不分页):insurance:insuranceCompany_list")
@GetMapping("/list") @GetMapping("/list")
public R<List<TInsuranceCompany>> getInsuranceCompanyList() { public R<List<TInsuranceCompany>> getInsuranceCompanyList() {
return R.ok(insuranceCompanyService.getInsuranceCompanyList()); return R.ok(insuranceCompanyService.getInsuranceCompanyList());
......
...@@ -16,6 +16,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; ...@@ -16,6 +16,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -91,6 +92,7 @@ public class TInsuranceDetailController { ...@@ -91,6 +92,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "投保不分页查询", description = "投保不分页查询") @Operation(summary = "投保不分页查询", description = "投保不分页查询")
@PostMapping("/getInsuranceList") @PostMapping("/getInsuranceList")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insure_export')")
public R<List<InsuranceListVO>> getInsuranceList(@RequestBody InsuranceListParam param) { public R<List<InsuranceListVO>> getInsuranceList(@RequestBody InsuranceListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceList(param)); return R.ok(tInsuranceDetailService.getInsuranceList(param));
} }
...@@ -118,6 +120,7 @@ public class TInsuranceDetailController { ...@@ -118,6 +120,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "投保新增", description = "投保新增") @Operation(summary = "投保新增", description = "投保新增")
@PostMapping("/addInsurance") @PostMapping("/addInsurance")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insure_add')")
public R<List<InsuranceAddParam>> addInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceAddParam> paramList){ public R<List<InsuranceAddParam>> addInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceAddParam> paramList){
return tInsuranceDetailService.addInsurance(paramList,null); return tInsuranceDetailService.addInsurance(paramList,null);
} }
...@@ -131,6 +134,7 @@ public class TInsuranceDetailController { ...@@ -131,6 +134,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "投保批增", description = "投保批增") @Operation(summary = "投保批增", description = "投保批增")
@PostMapping("/batchInsurance") @PostMapping("/batchInsurance")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insure_batch_add')")
public R<List<InsuranceBatchParam>> batchInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceBatchParam> paramList){ public R<List<InsuranceBatchParam>> batchInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceBatchParam> paramList){
return tInsuranceDetailService.batchInsurance(paramList,null); return tInsuranceDetailService.batchInsurance(paramList,null);
} }
...@@ -144,6 +148,7 @@ public class TInsuranceDetailController { ...@@ -144,6 +148,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "投保替换", description = "投保替换") @Operation(summary = "投保替换", description = "投保替换")
@PostMapping("/replaceInsurance") @PostMapping("/replaceInsurance")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insure_update')")
public R<List<InsuranceReplaceParam>> replaceInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceReplaceParam> paramList){ public R<List<InsuranceReplaceParam>> replaceInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceReplaceParam> paramList){
return tInsuranceDetailService.replaceInsurance(paramList,null); return tInsuranceDetailService.replaceInsurance(paramList,null);
} }
...@@ -157,7 +162,7 @@ public class TInsuranceDetailController { ...@@ -157,7 +162,7 @@ public class TInsuranceDetailController {
*/ */
@GetMapping("/deleteInsurance") @GetMapping("/deleteInsurance")
@Operation(summary = "通过id删除", description = "通过id删除") @Operation(summary = "通过id删除", description = "通过id删除")
//@PreAuthorize("@pms.hasPermission('insurance_del')") @PreAuthorize("@pms.hasPermission('insurance_custserve_insure_delete')")
public R<String> deleteInsurance(@RequestParam String id) { public R<String> deleteInsurance(@RequestParam String id) {
return tInsuranceDetailService.deleteInsurance(id); return tInsuranceDetailService.deleteInsurance(id);
} }
...@@ -171,7 +176,7 @@ public class TInsuranceDetailController { ...@@ -171,7 +176,7 @@ public class TInsuranceDetailController {
*/ */
@PostMapping("/editInsurance") @PostMapping("/editInsurance")
@Operation(summary = "编辑", description = "编辑") @Operation(summary = "编辑", description = "编辑")
//@PreAuthorize("@pms.hasPermission('insurance_edit')") @PreAuthorize("@pms.hasPermission('insurance_custserve_insure_edit')")
public R<String> editInsurance(@RequestBody @Valid InsuranceEditParam param) { public R<String> editInsurance(@RequestBody @Valid InsuranceEditParam param) {
return tInsuranceDetailService.editInsurance(param); return tInsuranceDetailService.editInsurance(param);
} }
...@@ -185,6 +190,7 @@ public class TInsuranceDetailController { ...@@ -185,6 +190,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "通过id查询", description = "通过id查询") @Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}") @GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insure_detail')")
public R<InsuranceDetailVO> getInsuranceDetailById(@PathVariable("id") String id) { public R<InsuranceDetailVO> getInsuranceDetailById(@PathVariable("id") String id) {
return R.ok(tInsuranceDetailService.getInsuranceDetailById(id)); return R.ok(tInsuranceDetailService.getInsuranceDetailById(id));
} }
...@@ -211,6 +217,7 @@ public class TInsuranceDetailController { ...@@ -211,6 +217,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "导出办理", description = "导出办理") @Operation(summary = "导出办理", description = "导出办理")
@PostMapping("/getInsuranceExportList") @PostMapping("/getInsuranceExportList")
@PreAuthorize("@pms.hasPermission('handle_insure_export')")
public R<List<InsuranceExportListVO>> getInsuranceExportList(@RequestBody InsuranceExportListParam param) { public R<List<InsuranceExportListVO>> getInsuranceExportList(@RequestBody InsuranceExportListParam param) {
return tInsuranceDetailService.getInsuranceExportList(param); return tInsuranceDetailService.getInsuranceExportList(param);
} }
...@@ -224,6 +231,7 @@ public class TInsuranceDetailController { ...@@ -224,6 +231,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "投保退回", description = "投保退回") @Operation(summary = "投保退回", description = "投保退回")
@PostMapping("/rollBackInsurance") @PostMapping("/rollBackInsurance")
@PreAuthorize("@pms.hasPermission('handle_insure_back')")
public R<List<InsuranceListVO>> rollBackInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleParam> paramList){ public R<List<InsuranceListVO>> rollBackInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleParam> paramList){
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) { if (user == null || Common.isEmpty(user.getId())) {
...@@ -241,6 +249,7 @@ public class TInsuranceDetailController { ...@@ -241,6 +249,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "投保成功/退回办理导入", description = "投保成功/退回办理导入") @Operation(summary = "投保成功/退回办理导入", description = "投保成功/退回办理导入")
@PostMapping("/insuranceHandleImport") @PostMapping("/insuranceHandleImport")
@PreAuthorize("@pms.hasPermission('handle_insure_cost')")
public R<List<InsuranceHandleImportParam>> insuranceHandleImport(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleImportParam> param) { public R<List<InsuranceHandleImportParam>> insuranceHandleImport(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleImportParam> param) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) { if (user == null || Common.isEmpty(user.getId())) {
...@@ -258,6 +267,7 @@ public class TInsuranceDetailController { ...@@ -258,6 +267,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "办理成功", description = "办理成功") @Operation(summary = "办理成功", description = "办理成功")
@PostMapping("/successfulInsurance") @PostMapping("/successfulInsurance")
@PreAuthorize("@pms.hasPermission('handle_insure')")
public R<List<InsuranceListVO>> successfulInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleParam> paramList){ public R<List<InsuranceListVO>> successfulInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleParam> paramList){
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) { if (user == null || Common.isEmpty(user.getId())) {
...@@ -275,6 +285,7 @@ public class TInsuranceDetailController { ...@@ -275,6 +285,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "登记保单保费", description = "登记保单保费") @Operation(summary = "登记保单保费", description = "登记保单保费")
@PostMapping("/registeredPolicyPremium") @PostMapping("/registeredPolicyPremium")
@PreAuthorize("@pms.hasPermission('handle_insure_cost')")
public R<List<InsuranceRegisterParam>> registeredPolicyPremium(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceRegisterParam> paramList){ public R<List<InsuranceRegisterParam>> registeredPolicyPremium(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceRegisterParam> paramList){
return tInsuranceDetailService.registeredPolicyPremium(paramList); return tInsuranceDetailService.registeredPolicyPremium(paramList);
} }
...@@ -287,6 +298,7 @@ public class TInsuranceDetailController { ...@@ -287,6 +298,7 @@ public class TInsuranceDetailController {
* @since v1.0 * @since v1.0
*/ */
@PostMapping("/saveInsuranceRefund") @PostMapping("/saveInsuranceRefund")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insured_reduce')")
public R saveInsuranceRefund(@RequestBody @Valid @Size(min = 1,message = "导入减员列表不能为空") List<InsuranceRefundCheck> insuranceRefundCheckList){ public R saveInsuranceRefund(@RequestBody @Valid @Size(min = 1,message = "导入减员列表不能为空") List<InsuranceRefundCheck> insuranceRefundCheckList){
return tInsuranceDetailService.saveInsuranceRefund(insuranceRefundCheckList,null); return tInsuranceDetailService.saveInsuranceRefund(insuranceRefundCheckList,null);
} }
...@@ -300,6 +312,7 @@ public class TInsuranceDetailController { ...@@ -300,6 +312,7 @@ public class TInsuranceDetailController {
*/ */
@PostMapping("/settleMonthChange") @PostMapping("/settleMonthChange")
@Operation(summary = "变更结算月", description = "变更结算月") @Operation(summary = "变更结算月", description = "变更结算月")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insured_change_month')")
public R settleMonthChange(@RequestBody @Valid @Size(min = 1,message = "变更结算月不能为空") List<SettleMonthChangeCheckParam> settleMonthCheckList){ public R settleMonthChange(@RequestBody @Valid @Size(min = 1,message = "变更结算月不能为空") List<SettleMonthChangeCheckParam> settleMonthCheckList){
return tInsuranceDetailService.settleMonthChange(settleMonthCheckList); return tInsuranceDetailService.settleMonthChange(settleMonthCheckList);
} }
...@@ -313,6 +326,7 @@ public class TInsuranceDetailController { ...@@ -313,6 +326,7 @@ public class TInsuranceDetailController {
*/ */
@PostMapping("/deptChange") @PostMapping("/deptChange")
@Operation(summary = "变更所属项目", description = "变更所属项目") @Operation(summary = "变更所属项目", description = "变更所属项目")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insured_change_dept')")
public R deptChange(@RequestBody @Valid @Size(min = 1,message = "变更所属项目不能为空")List<DeptChangeCheckParam> deptChangeCheckList){ public R deptChange(@RequestBody @Valid @Size(min = 1,message = "变更所属项目不能为空")List<DeptChangeCheckParam> deptChangeCheckList){
return tInsuranceDetailService.deptChange(deptChangeCheckList); return tInsuranceDetailService.deptChange(deptChangeCheckList);
} }
...@@ -340,6 +354,7 @@ public class TInsuranceDetailController { ...@@ -340,6 +354,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "已投保列表不分页查询", description = "已投保列表不分页查询") @Operation(summary = "已投保列表不分页查询", description = "已投保列表不分页查询")
@PostMapping("/getInsuredList") @PostMapping("/getInsuredList")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insured_export')")
public R<List<InsuredListVo>> getInsuredList(@RequestBody InsuredParam param) { public R<List<InsuredListVo>> getInsuredList(@RequestBody InsuredParam param) {
return R.ok(tInsuranceDetailService.getInsuredList(param),"查询成功"); return R.ok(tInsuranceDetailService.getInsuredList(param),"查询成功");
} }
...@@ -366,6 +381,7 @@ public class TInsuranceDetailController { ...@@ -366,6 +381,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "已减员列表导出", description = "已减员列表导出") @Operation(summary = "已减员列表导出", description = "已减员列表导出")
@PostMapping("/getInsuranceRefundList") @PostMapping("/getInsuranceRefundList")
@PreAuthorize("@pms.hasPermission('insurance_custserve_reduction_export')")
public R<List<InsuranceRefundListVo>> getInsuranceRefundList(@RequestBody InsuranceRefundParam param) { public R<List<InsuranceRefundListVo>> getInsuranceRefundList(@RequestBody InsuranceRefundParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundList(param)); return R.ok(tInsuranceDetailService.getInsuranceRefundList(param));
} }
...@@ -393,6 +409,7 @@ public class TInsuranceDetailController { ...@@ -393,6 +409,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "导出减员列表", description = "导出减员列表") @Operation(summary = "导出减员列表", description = "导出减员列表")
@PostMapping("/getInsuranceRefundHandlingList") @PostMapping("/getInsuranceRefundHandlingList")
@PreAuthorize("@pms.hasPermission('handle_down_export')")
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) { public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) {
return tInsuranceDetailService.getInsuranceRefundHandlingList(param); return tInsuranceDetailService.getInsuranceRefundHandlingList(param);
} }
...@@ -406,6 +423,7 @@ public class TInsuranceDetailController { ...@@ -406,6 +423,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "减员办理", description = "减员办理") @Operation(summary = "减员办理", description = "减员办理")
@PostMapping("/updateInsuranceRefund") @PostMapping("/updateInsuranceRefund")
@PreAuthorize("@pms.hasPermission('handle_down_sucess')")
public R updateInsuranceRefund(@RequestBody InsuranceRefundListParam insuranceDetail) { public R updateInsuranceRefund(@RequestBody InsuranceRefundListParam insuranceDetail) {
return tInsuranceDetailService.updateInsuranceRefund(insuranceDetail); return tInsuranceDetailService.updateInsuranceRefund(insuranceDetail);
} }
...@@ -419,6 +437,7 @@ public class TInsuranceDetailController { ...@@ -419,6 +437,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "减员办理导入", description = "减员办理导入") @Operation(summary = "减员办理导入", description = "减员办理导入")
@PostMapping("/insuranceRefundImport") @PostMapping("/insuranceRefundImport")
@PreAuthorize("@pms.hasPermission('handle_down_batch')")
public R insuranceRefundImport(@RequestBody List<InsuranceHandleImportParam> insuranceRefundImportList) { public R insuranceRefundImport(@RequestBody List<InsuranceHandleImportParam> insuranceRefundImportList) {
return tInsuranceDetailService.insuranceRefundImport(insuranceRefundImportList); return tInsuranceDetailService.insuranceRefundImport(insuranceRefundImportList);
} }
...@@ -458,6 +477,7 @@ public class TInsuranceDetailController { ...@@ -458,6 +477,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "出险", description = "出险") @Operation(summary = "出险", description = "出险")
@GetMapping("/updateIsUse") @GetMapping("/updateIsUse")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insured_edit')")
public R updateIsUse(String id) { public R updateIsUse(String id) {
return tInsuranceDetailService.updateIsUse(id); return tInsuranceDetailService.updateIsUse(id);
} }
...@@ -534,6 +554,7 @@ public class TInsuranceDetailController { ...@@ -534,6 +554,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "订单商险新增", description = "订单商险新增") @Operation(summary = "订单商险新增", description = "订单商险新增")
@PostMapping("/addOrderInsurance") @PostMapping("/addOrderInsurance")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insure_add')")
public R<List<InsuranceAddParam>> addOrderInsurance(@RequestBody InsuranceListOrderParam paramList ){ public R<List<InsuranceAddParam>> addOrderInsurance(@RequestBody InsuranceListOrderParam paramList ){
return tInsuranceDetailService.addOrderInsurance(paramList); return tInsuranceDetailService.addOrderInsurance(paramList);
} }
...@@ -547,6 +568,7 @@ public class TInsuranceDetailController { ...@@ -547,6 +568,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "订单商险批增", description = "订单商险批增") @Operation(summary = "订单商险批增", description = "订单商险批增")
@PostMapping("/batchOrderInsurance") @PostMapping("/batchOrderInsurance")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insure_batch_add')")
public R<List<InsuranceBatchParam>> batchOrderInsurance(@RequestBody InsuranceOrderBatchParam paramList){ public R<List<InsuranceBatchParam>> batchOrderInsurance(@RequestBody InsuranceOrderBatchParam paramList){
return tInsuranceDetailService.batchOrderInsurance(paramList); return tInsuranceDetailService.batchOrderInsurance(paramList);
} }
...@@ -560,6 +582,7 @@ public class TInsuranceDetailController { ...@@ -560,6 +582,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "订单商险替换", description = "订单商险替换") @Operation(summary = "订单商险替换", description = "订单商险替换")
@PostMapping("/replaceOrderInsurance") @PostMapping("/replaceOrderInsurance")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insure_update')")
public R<List<InsuranceReplaceParam>> replaceOrderInsurance(@RequestBody InsuranceOrderReplaceParam paramList){ public R<List<InsuranceReplaceParam>> replaceOrderInsurance(@RequestBody InsuranceOrderReplaceParam paramList){
return tInsuranceDetailService.replaceOrderInsurance(paramList); return tInsuranceDetailService.replaceOrderInsurance(paramList);
} }
...@@ -572,6 +595,7 @@ public class TInsuranceDetailController { ...@@ -572,6 +595,7 @@ public class TInsuranceDetailController {
* @since v1.0 * @since v1.0
*/ */
@PostMapping("/refundOrderInsurance") @PostMapping("/refundOrderInsurance")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insured_reduce')")
public R refundOrderInsurance(@RequestBody InsuranceOrderRefundParam paramList){ public R refundOrderInsurance(@RequestBody InsuranceOrderRefundParam paramList){
return tInsuranceDetailService.refundOrderInsurance(paramList); return tInsuranceDetailService.refundOrderInsurance(paramList);
} }
......
...@@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; ...@@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -46,6 +47,7 @@ public class TInsuranceEnclosureController { ...@@ -46,6 +47,7 @@ public class TInsuranceEnclosureController {
@SysLog("电子保单上传") @SysLog("电子保单上传")
@Schema(description = "电子保单上传") @Schema(description = "电子保单上传")
@PostMapping(value = "/uploadInsuranceEnclosure") @PostMapping(value = "/uploadInsuranceEnclosure")
@PreAuthorize("@pms.hasPermission('insurance_handle_electronic_import')")
public R uploadInsuranceEnclosure(@RequestBody MultipartFile file, String filePath,String remark) throws IOException { public R uploadInsuranceEnclosure(@RequestBody MultipartFile file, String filePath,String remark) throws IOException {
return tInsuranceEnclosureService.uploadInsuranceEnclosure(file, filePath,remark); return tInsuranceEnclosureService.uploadInsuranceEnclosure(file, filePath,remark);
} }
...@@ -76,6 +78,7 @@ public class TInsuranceEnclosureController { ...@@ -76,6 +78,7 @@ public class TInsuranceEnclosureController {
@Schema(description = "删除电子保单") @Schema(description = "删除电子保单")
@SysLog("删除电子保单") @SysLog("删除电子保单")
@GetMapping("/deleteInsuranceEnclosure/{id}") @GetMapping("/deleteInsuranceEnclosure/{id}")
@PreAuthorize("@pms.hasPermission('insurance_handle_electronic_delete')")
public R deleteInsuranceEnclosure(@PathVariable String id) { public R deleteInsuranceEnclosure(@PathVariable String id) {
return tInsuranceEnclosureService.deleteInsuranceEnclosure(id); return tInsuranceEnclosureService.deleteInsuranceEnclosure(id);
} }
......
...@@ -12,6 +12,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; ...@@ -12,6 +12,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -47,9 +48,10 @@ public class TInsuranceTypeController { ...@@ -47,9 +48,10 @@ public class TInsuranceTypeController {
* @param insuranceType 险种明细 * @param insuranceType 险种明细
* @return R * @return R
*/ */
@Operation(summary = "新增险种", description = "新增险种:hasPermission('demo_insuranceType_add')") @Operation(summary = "新增险种", description = "新增险种:hasPermission('insurance:insuranceType_save')")
@SysLog("新增险种") @SysLog("新增险种")
@PostMapping("/save") @PostMapping("/save")
@PreAuthorize("@pms.hasPermission('insuranceType_add')")
public R save(@RequestBody TInsuranceType insuranceType) { public R save(@RequestBody TInsuranceType insuranceType) {
return insuranceTypeService.saveInsuranceType(insuranceType); return insuranceTypeService.saveInsuranceType(insuranceType);
} }
...@@ -59,8 +61,9 @@ public class TInsuranceTypeController { ...@@ -59,8 +61,9 @@ public class TInsuranceTypeController {
* @param id id * @param id id
* @return R * @return R
*/ */
@Operation(summary = "通过id查询险种详情", description = "通过id查询:hasPermission('demo_insuranceType_get')") @Operation(summary = "通过id查询险种详情", description = "通过id查询:hasPermission('insurance:insuranceType_getInsuranceTypeDetail')")
@GetMapping("/{id}" ) @GetMapping("/{id}" )
//@PreAuthorize("@pms.hasPermission('insurance:insuranceType_getInsuranceTypeDetail')")
public R getInsuranceTypeDetail(@PathVariable("id" ) String id) { public R getInsuranceTypeDetail(@PathVariable("id" ) String id) {
return insuranceTypeService.getInsuranceTypeDetail(id); return insuranceTypeService.getInsuranceTypeDetail(id);
} }
...@@ -71,9 +74,10 @@ public class TInsuranceTypeController { ...@@ -71,9 +74,10 @@ public class TInsuranceTypeController {
* @param insuranceType 险种明细 * @param insuranceType 险种明细
* @return R * @return R
*/ */
@Operation(summary = "修改险种", description = "新增险种:hasPermission('demo_insuranceType_add')") @Operation(summary = "修改险种", description = "新增险种:hasPermission('insurance:insuranceType_update')")
@SysLog("修改险种") @SysLog("修改险种")
@PostMapping("/update") @PostMapping("/update")
//@PreAuthorize("@pms.hasPermission('insurance:insuranceType_update')")
public R update(@RequestBody TInsuranceType insuranceType) { public R update(@RequestBody TInsuranceType insuranceType) {
return insuranceTypeService.updateInsuranceType(insuranceType); return insuranceTypeService.updateInsuranceType(insuranceType);
} }
......
...@@ -789,6 +789,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -789,6 +789,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo setInfoVo = data.get(byId.getDeptNo()); ProjectSetInfoVo setInfoVo = data.get(byId.getDeptNo());
if (null != setInfoVo){ if (null != setInfoVo){
insuranceDetailVO.setCoverProjectName(Optional.ofNullable(setInfoVo.getDepartName()).orElse("")); insuranceDetailVO.setCoverProjectName(Optional.ofNullable(setInfoVo.getDepartName()).orElse(""));
insuranceDetailVO.setCoveInvoiceTitle(Optional.ofNullable(setInfoVo.getInvoiceTitle()).orElse(""));
} }
} }
} }
...@@ -945,6 +946,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -945,6 +946,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){ if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitle()).orElse(""));
} }
} }
} }
...@@ -3088,6 +3090,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3088,6 +3090,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){ if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitle()).orElse(""));
} }
} }
} }
...@@ -3171,6 +3174,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3171,6 +3174,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){ if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse("")); record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitle()).orElse(""));
} }
TInsuranceDetail detail = getById(record.getId()); TInsuranceDetail detail = getById(record.getId());
TInsuranceRefund refund = new TInsuranceRefund(); TInsuranceRefund refund = new TInsuranceRefund();
...@@ -5141,13 +5145,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5141,13 +5145,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CollectionUtils.isEmpty(list)){ if (CollectionUtils.isEmpty(list)){
return R.failed("无可出险的保单"); return R.failed("无可出险的保单");
} }
List<TInsuranceOperate> operateList = new ArrayList<>();
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
for (TInsuranceDetail tInsuranceDetail : list) { for (TInsuranceDetail tInsuranceDetail : list) {
TInsuranceOperate operate = new TInsuranceOperate();
updateWrapper.eq(TInsuranceDetail :: getId,tInsuranceDetail.getId()) updateWrapper.eq(TInsuranceDetail :: getId,tInsuranceDetail.getId())
.set(TInsuranceDetail :: getIsUse,CommonConstants.ONE_INT) .set(TInsuranceDetail :: getIsUse,CommonConstants.ONE_INT)
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now()); .set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper); update(updateWrapper);
operate.setOperateDesc(InsurancesConstants.URGENT_UPDATE_IS_USE);
operate.setCreateName(InsurancesConstants.SYSTEM_TRIGGER);
operate.setInsuranceDetailId(tInsuranceDetail.getId());
operate.setDisplayFlag(CommonConstants.ONE_INT);
operate.setCreateTime(LocalDateTime.now());
operate.setCreateBy(CommonConstants.ZERO_STRING);
operateList.add(operate);
} }
tInsuranceOperateService.saveBatch(operateList);
return R.ok("EKP紧急出险成功"); return R.ok("EKP紧急出险成功");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment