Commit eeab3d50 authored by zhaji's avatar zhaji

Merge branch 'develop' into feature-zhaji

parents 0614c32d 0ddfdc1e
......@@ -54,7 +54,6 @@ public class TCustomerInfoController {
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page")
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_get')")
public R<IPage<TCustomerInfo>> getTCustomerInfoPage(Page<TCustomerInfo> page, TCustomerInfo tCustomerInfo) {
return R.ok(tCustomerInfoService.page(page, Wrappers.query(tCustomerInfo)));
}
......@@ -68,7 +67,6 @@ public class TCustomerInfoController {
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_get')")
public R<TCustomerInfo> getById(@PathVariable("id") String id) {
return R.ok(tCustomerInfoService.getById(id));
}
......@@ -82,7 +80,7 @@ public class TCustomerInfoController {
@Operation(summary = "新增客户信息", description = "新增客户信息")
@SysLog("新增客户信息")
@PostMapping
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_add')")
@PreAuthorize("@pms.hasPermission('tcustomerinfo_add')")
public R<Boolean> save(@RequestBody TCustomerInfo tCustomerInfo) {
return R.ok(tCustomerInfoService.save(tCustomerInfo));
}
......@@ -96,7 +94,7 @@ public class TCustomerInfoController {
@Operation(summary = "修改客户信息", description = "修改客户信息")
@SysLog("修改客户信息")
@PutMapping
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_edit')")
@PreAuthorize("@pms.hasPermission('tcustomerinfo_edit')")
public R<Boolean> updateById(@RequestBody TCustomerInfo tCustomerInfo) {
return R.ok(tCustomerInfoService.updateById(tCustomerInfo));
}
......@@ -110,7 +108,7 @@ public class TCustomerInfoController {
@Operation(summary = "通过id删除客户信息", description = "通过id删除客户信息")
@SysLog("通过id删除客户信息")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_del')")
@PreAuthorize("@pms.hasPermission('tcustomerinfo_del')")
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tCustomerInfoService.removeById(id));
}
......
......@@ -60,7 +60,6 @@ public class TSettleDomainController {
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page")
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_get')")
public R<IPage<TSettleDomain>> getTSettleDomainPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain) {
return R.ok(tSettleDomainService.page(page, Wrappers.query(tSettleDomain)));
}
......@@ -74,7 +73,6 @@ public class TSettleDomainController {
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_get')")
public R<TSettleDomain> getById(@PathVariable("id") String id) {
return R.ok(tSettleDomainService.getById(id));
}
......@@ -88,7 +86,7 @@ public class TSettleDomainController {
@Operation(summary = "新增项目表", description = "新增项目表")
@SysLog("新增项目表")
@PostMapping
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_add')")
@PreAuthorize("@pms.hasPermission('tsettledomain_add')")
public R<Boolean> save(@RequestBody TSettleDomain tSettleDomain) {
return R.ok(tSettleDomainService.save(tSettleDomain));
}
......@@ -102,7 +100,7 @@ public class TSettleDomainController {
@Operation(summary = "修改项目表", description = "修改项目表")
@SysLog("修改项目表")
@PutMapping
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_edit')")
@PreAuthorize("@pms.hasPermission('tsettledomain_edit')")
public R<Boolean> updateById(@RequestBody TSettleDomain tSettleDomain) {
return R.ok(tSettleDomainService.updateById(tSettleDomain));
}
......@@ -116,7 +114,7 @@ public class TSettleDomainController {
@Operation(summary = "通过id删除项目表", description = "通过id删除项目表")
@SysLog("通过id删除项目表")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_del')")
@PreAuthorize("@pms.hasPermission('tsettledomain_del')")
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tSettleDomainService.removeById(id));
}
......
......@@ -125,9 +125,9 @@ public class InsurancesConstants {
*/
public static final String REDUCE_REPLACE_IS_NOT_ALLOW = "当前记录在减员流程中,无法替换";
/**
* 投保状态不是投保中或已投保,无法退回
* 投保状态不是待投保、投保中、已投保,无法退回
*/
public static final String REDUCE_ROLLBACK_IS_NOT_ALLOW = "投保状态不是投保中或已投保,无法退回";
public static final String REDUCE_ROLLBACK_IS_NOT_ALLOW = "投保状态不是待投保、投保中、已投保,无法退回";
/**
* 减员中,无法退回
*/
......
......@@ -579,8 +579,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<TInsuranceDetail> successList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(detailList)){
for (TInsuranceDetail detail : detailList) {
if (detail.getBuyHandleStatus() != CommonConstants.TWO_INT
&& detail.getBuyHandleStatus() != CommonConstants.THREE_INT){
if (detail.getBuyHandleStatus() == CommonConstants.FOUR_INT
|| detail.getBuyHandleStatus() == CommonConstants.FIVE_INT){
InsuranceListVO listVO = new InsuranceListVO();
BeanCopyUtils.copyProperties(detail,listVO);
listVO.setErrorMessage(InsurancesConstants.REDUCE_ROLLBACK_IS_NOT_ALLOW);
......@@ -741,7 +741,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//计算起止时间的天数
long day = LocalDateUtil.betweenDay(detail.getPolicyStart().toString(), detail.getPolicyEnd().toString());
//预估保费 = (购买标准 / 365) * 天数
BigDecimal estimatePremium = new BigDecimal(detail.getBuyStandard()).divide(new BigDecimal("365")).multiply(new BigDecimal(day)).setScale(2,BigDecimal.ROUND_HALF_UP);
BigDecimal estimatePremium = new BigDecimal(detail.getBuyStandard()).divide(new BigDecimal("365"),BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(day)).setScale(2,BigDecimal.ROUND_HALF_UP);
detail.setEstimatePremium(estimatePremium);
if (detail.getBuyType() == CommonConstants.THREE_INT){
detail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
......
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