Commit 0033cdaa authored by fangxinjiang's avatar fangxinjiang

商险自动化限制:新增、批增、替换-fxj

parent 9e2286d6
......@@ -155,14 +155,5 @@ public class TAutoInsurRuleInfoController {
tAutoInsurRuleInfoService.listExport(response,searchVo);
}
/**
* @Author fxj
* @Description 远程接口获取项目对应商险的自动化配置信息,有商险自动化且配置为启用的
* @Date 11:20 2025/9/17
**/
@Inner
@PostMapping("/inner/getInsuranceAutoSetMap")
public Map<String,String> getInsuranceAutoSetMap(@RequestBody List<String> departNos) {
return tAutoInsurRuleInfoService.getInsuranceAutoSetMap(departNos);
}
}
......@@ -31,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -42,6 +43,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
......@@ -183,4 +185,15 @@ public class TAutoMainRelController {
menuUtil.setAuthSql(user, tAutoMainRel);
tAutoMainRelService.listExport(response,tAutoMainRel);
}
/**
* @Author fxj
* @Description 远程接口获取项目对应商险的自动化配置信息,有商险自动化且配置为启用的
* @Date 11:20 2025/9/17
**/
@Inner
@PostMapping("/inner/getProjectAutoSetMap")
public Map<String,String> getProjectAutoSetMap(@RequestBody List<String> departNos) {
return tAutoMainRelService.getProjectAutoSetMap(departNos);
}
}
......@@ -50,5 +50,4 @@ public interface TAutoInsurRuleInfoService extends IService<TAutoInsurRuleInfo>
List<TAutoInsurRuleInfo> noPageDiy(TAutoInsurRuleInfoSearchVo searchVo);
Map<String, String> getInsuranceAutoSetMap(List<String> departNos);
}
......@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
/**
* 项目配置表主表
......@@ -62,4 +63,6 @@ public interface TAutoMainRelService extends IService<TAutoMainRel> {
R<TAutoMainRelDetailVo> getProjectRule(String deptId, String deptNo);
IPage<TAutoContractScheme> getContractSchemePage(Page<TAutoContractScheme> page, TAutoContractScheme search);
Map<String, String> getProjectAutoSetMap(List<String> departNos);
}
......@@ -249,21 +249,5 @@ public class TAutoInsurRuleInfoServiceImpl extends ServiceImpl<TAutoInsurRuleInf
this.save(insert);
}
/**
* @Author fxj
* @Description 远程接口获取项目对应商险的自动化配置信息,有商险自动化且配置为启用的
* @Date 11:26 2025/9/17
**/
@Override
public Map<String, String> getInsuranceAutoSetMap(List<String> departNos) {
Map<String,String> map = new HashMap<>();
List<TAutoInsurRuleInfo> list = baseMapper.selectList(Wrappers.<TAutoInsurRuleInfo>query().lambda()
.eq(TAutoInsurRuleInfo::getAutoFlag,CommonConstants.ZERO_STRING));
if(Common.isNotNull(list)){
for(TAutoInsurRuleInfo vo :list){
map.put(vo.getDeptNo(),vo.getDeptNo());
}
}
return map;
}
}
......@@ -1112,4 +1112,21 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
}
return wrapper;
}
/**
* @Author fxj
* @Description 远程接口获取项目对应商险的自动化配置信息,有商险自动化且配置为启用的
* @Date 11:26 2025/9/17
**/
@Override
public Map<String, String> getProjectAutoSetMap(List<String> departNos) {
Map<String,String> map = new HashMap<>();
//和产品确认了只要有配置的,则限制商险派单,不看配置是否可用,不看是否配置了商险自动化
List<TAutoMainRel> list = baseMapper.selectList(Wrappers.<TAutoMainRel>query().lambda());
if(Common.isNotNull(list)){
for(TAutoMainRel vo :list){
map.put(vo.getDeptNo(),vo.getDeptNo());
}
}
return map;
}
}
......@@ -41,8 +41,8 @@ public class ArchivesDaprUtil {
* @Description 获取项目自动化设置信息,只返回配置了自动化且商险自动化为是的信息
* @Date 11:16 2025/9/17
**/
public R<Map<String,String>> getInsuranceAutoSetMap(List<String> departNos){
R<Map> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tautoinsurruleinfo/inner/getInsuranceAutoSetMap" , JSON.toJSONString(departNos), Map.class, SecurityConstants.FROM_IN);
public R<Map<String,String>> getProjectAutoSetMap(List<String> departNos){
R<Map> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tautomainrel/inner/getProjectAutoSetMap" , JSON.toJSONString(departNos), Map.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取项目商险自动化信息失败!");
}
......
......@@ -3081,7 +3081,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
departNos = paramList.stream().map(InsuranceAddParam::getDeptNo).collect(Collectors.toList());
}
if (Common.isNotNull(departNos)){
R<Map<String, String>> resR = archivesDaprUtil.getInsuranceAutoSetMap(departNos);
R<Map<String, String>> resR = archivesDaprUtil.getProjectAutoSetMap(departNos);
if (Common.isNotNull(resR) && Common.isNotNull(resR.getData())){
insurAutoMap = resR.getData();
}else {
......@@ -3098,7 +3098,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
departNos = paramList.stream().map(InsuranceBatchParam::getDeptNo).collect(Collectors.toList());
}
if (Common.isNotNull(departNos)){
R<Map<String, String>> resR = archivesDaprUtil.getInsuranceAutoSetMap(departNos);
R<Map<String, String>> resR = archivesDaprUtil.getProjectAutoSetMap(departNos);
if (Common.isNotNull(resR) && Common.isNotNull(resR.getData())){
insurAutoMap = resR.getData();
}else {
......@@ -3114,7 +3114,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
departNos = paramList.stream().map(InsuranceReplaceParam::getReplaceDeptNo).collect(Collectors.toList());
}
if (Common.isNotNull(departNos)){
R<Map<String, String>> resR = archivesDaprUtil.getInsuranceAutoSetMap(departNos);
R<Map<String, String>> resR = archivesDaprUtil.getProjectAutoSetMap(departNos);
if (Common.isNotNull(resR) && Common.isNotNull(resR.getData())){
insurAutoMap = resR.getData();
}else {
......
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