Commit 0614c32d authored by zhaji's avatar zhaji

"feature-zhaJi:新增项目列表接口"

parent 472245d2
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaji
* @description 项目
* @date 2022-07-29 09:35:31
*/
@Data
@Tag(name = "项目类")
public class Dept implements Serializable {
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
}
......@@ -82,13 +82,13 @@ public class DeptChangeCheckParam implements Serializable {
/**
* 新项目结算方式
*/
@Schema(description = "结算方式")
@Schema(description = "新项目结算方式")
private Integer newSettleType;
/**
* 旧项目结算方式
*/
@Schema(description = "结算方式")
@Schema(description = "旧项目结算方式")
private Integer oldSettleType;
/**
......
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.Dept;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import io.swagger.v3.oas.annotations.Operation;
......@@ -373,9 +374,20 @@ public class TInsuranceDetailController {
@Operation(summary = "更新减员退费", description = "更新减员退费")
@PostMapping("/updateRefundMoney")
public R updateRefundMoney(@RequestBody @Valid @Size(min = 1,message = "更新减员退费不能为空") List<RefundMoneyParam> paramList) {
return tInsuranceDetailService.updateRefundMoney(paramList);
return R.failed("该功能暂未开放");
//return tInsuranceDetailService.updateRefundMoney(paramList);
}
/**
* 查询项目列表
*
* @author zhaji
* @return {@link R<List<Dept>>}
*/
@Operation(summary = "查询项目列表", description = "查询项目列表")
@GetMapping("/deptList")
public R getDeptList() {
return tInsuranceDetailService.getDeptList();
}
}
......@@ -257,4 +257,13 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R updateRefundMoney(List<RefundMoneyParam> paramList);
/**
* 查询项目列表
*
* @author zhaji
* @param
* @return {@link R}
*/
R getDeptList();
}
......@@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Sets;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
......@@ -2428,7 +2430,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper);
}
updateDept2EKP(successList);
}
List<DeptChangeCheckParam> errorList = stringListMap.get("errorList");
return R.ok(errorList,"导入成功");
......@@ -3176,9 +3177,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 预估保费 = 费率 * 购买标准
BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard()).multiply(new BigDecimal(typeRate.getRate())).setScale(2,BigDecimal.ROUND_HALF_UP);
insuranceDetail.setEstimatePremium(estimatePremium);
if (insuranceDetail.getBuyType() == CommonConstants.THREE_INT){
insuranceDetail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
}
}
}else {
//按天
......@@ -3187,15 +3185,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//预估保费 = (购买标准 / 365) * 天数
BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard()).divide(new BigDecimal("365")).multiply(new BigDecimal(day)).setScale(2,BigDecimal.ROUND_HALF_UP);
insuranceDetail.setEstimatePremium(estimatePremium);
if (insuranceDetail.getBuyType() == CommonConstants.THREE_INT){
insuranceDetail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
}
//保费存储
TInsuranceSettle settle = new TInsuranceSettle();
settle.setInsDetailId(insuranceDetail.getId());
settle.setSettleType(insuranceDetail.getSettleType());
settle.setSettleHandleStatus(CommonConstants.ONE_STRING);
settle.setEstimatePremium(estimatePremium);
}
}
}
......@@ -3209,4 +3198,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return map;
}
@Override
public R getDeptList(){
R<TSettleDomainListVo> tSettleDomainListVoR = archivesDaprUtil.selectAllSettleDomainSelectVos();
TSettleDomainListVo data = tSettleDomainListVoR.getData();
List<TSettleDomainSelectVo> listSelectVO = data.getListSelectVO();
List<Dept> deptList = new ArrayList<>();
if(CollectionUtils.isNotEmpty(listSelectVO)){
for (TSettleDomainSelectVo tSettleDomainSelectVo : listSelectVO) {
Dept dept = new Dept();
dept.setDeptNo(tSettleDomainSelectVo.getDepartNo());
dept.setProjectName(tSettleDomainSelectVo.getDepartName());
deptList.add(dept);
}
}
return R.ok(deptList);
};
}
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