Commit 436a0cb6 authored by fangxinjiang's avatar fangxinjiang

是否仅使用自动化入口配置-fxj

parent 2f3b4d3e
...@@ -98,6 +98,13 @@ public class TAutoMainRel extends BaseEntity { ...@@ -98,6 +98,13 @@ public class TAutoMainRel extends BaseEntity {
@Schema(description = "岗位是否统一 0是 1 否") @Schema(description = "岗位是否统一 0是 1 否")
private String postFlag; private String postFlag;
/**
* 是否仅使用自动化入口 0 是 1否
*/
@ExcelAttribute(name = "是否仅使用自动化入口", maxLength = 1)
@Schema(description = "是否仅使用自动化入口 0 是 1否")
private String autoFlag;
/** /**
* 项目名称 * 项目名称
*/ */
......
...@@ -92,12 +92,12 @@ public class TAutoSocialRuleInfo extends BaseEntity { ...@@ -92,12 +92,12 @@ public class TAutoSocialRuleInfo extends BaseEntity {
@Schema(description = "派单确认时间,字典:0:派单发起当日") @Schema(description = "派单确认时间,字典:0:派单发起当日")
private String confirmPeriod; private String confirmPeriod;
/** /**
* 派单确认具体时间 * 派单确认具体时间字典 0: 09:00
*/ */
@ExcelAttribute(name = "派单确认具体时间", maxLength = 10) @ExcelAttribute(name = "派单确认具体时间", maxLength = 10)
@Length(max = 10, message = "派单确认具体时间不能超过10个字符") @Length(max = 10, message = "派单确认具体时间不能超过10个字符")
@ExcelProperty("派单确认具体时间") @ExcelProperty("派单确认具体时间")
@Schema(description = "派单确认具体时间") @Schema(description = "派单确认具体时间字典 0: 09:00")
private String confirmTime; private String confirmTime;
/** /**
* 项目编码 * 项目编码
......
...@@ -196,4 +196,17 @@ public class TAutoMainRelController { ...@@ -196,4 +196,17 @@ public class TAutoMainRelController {
public Map<String,String> getProjectAutoSetMap(@RequestBody List<String> departNos) { public Map<String,String> getProjectAutoSetMap(@RequestBody List<String> departNos) {
return tAutoMainRelService.getProjectAutoSetMap(departNos); return tAutoMainRelService.getProjectAutoSetMap(departNos);
} }
/**
* 修改项目配置'是否仅使用自动化入口' 0 是 1 否
* @param autoFlag '是否仅使用自动化入口' 0 是 1 否
* @param id 配置ID
* @return R
*/
@Operation(summary = "修改项目配置'是否仅使用自动化入口'", description = "修改项目配置'是否仅使用自动化入口'")
@SysLog("修改项目配置'是否仅使用自动化入口'" )
@PostMapping("/updateAutoFlagById")
public R<Boolean> updateAutoFlagById(@RequestParam(required = true) String id, @RequestParam(required = true) String autoFlag) {
return tAutoMainRelService.updateAutoFlagById(id, autoFlag);
}
} }
...@@ -65,4 +65,6 @@ public interface TAutoMainRelService extends IService<TAutoMainRel> { ...@@ -65,4 +65,6 @@ public interface TAutoMainRelService extends IService<TAutoMainRel> {
IPage<TAutoContractScheme> getContractSchemePage(Page<TAutoContractScheme> page, TAutoContractScheme search); IPage<TAutoContractScheme> getContractSchemePage(Page<TAutoContractScheme> page, TAutoContractScheme search);
Map<String, String> getProjectAutoSetMap(List<String> departNos); Map<String, String> getProjectAutoSetMap(List<String> departNos);
R<Boolean> updateAutoFlagById(String id, String autoFlag);
} }
...@@ -1273,22 +1273,24 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri ...@@ -1273,22 +1273,24 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
} }
/** /**
* @Author fxj * @Author fxj
* @Description 远程接口获取项目对应商险的自动化配置信息,有商险自动化且配置为启用的 * @Description 远程接口获取项目对应商险的自动化配置信息,有商险自动化且配置'是否仅使用自动化入口' 为是的需要强制限制
* @Date 11:26 2025/9/17 * @Date 11:26 2025/9/17
**/ **/
@Override @Override
public Map<String, String> getProjectAutoSetMap(List<String> departNos) { public Map<String, String> getProjectAutoSetMap(List<String> departNos) {
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
//和产品确认了只要有配置的,则限制商险派单,不看配置是否可用,不看是否配置了商险自动化 //如果配置了'是否仅使用自动化入口' 为是的需要强制限制
List<TAutoMainRel> list = baseMapper.selectList(Wrappers.<TAutoMainRel>query().lambda()); List<TAutoMainRel> list = baseMapper.selectList(Wrappers.<TAutoMainRel>query().lambda());
if(Common.isNotNull(list)){ if(Common.isNotNull(list)){
for(TAutoMainRel vo :list){ for(TAutoMainRel vo :list){
map.put(vo.getDeptNo(),vo.getDeptNo()); if(CommonConstants.ZERO_STRING.equals(vo.getAutoFlag())){
map.put(vo.getDeptNo(),vo.getDeptNo());
}
} }
} }
return map; return map;
} }
/** /**
* @Author fxj * @Author fxj
* @Description 校验社保规则 * @Description 校验社保规则
...@@ -1338,4 +1340,23 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri ...@@ -1338,4 +1340,23 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
} }
return false; // 所有数据都在现有集合中,无需额外处理 return false; // 所有数据都在现有集合中,无需额外处理
} }
@Override
public R<Boolean> updateAutoFlagById(String id, String autoFlag) {
if (Common.isEmpty(id)
|| Common.isEmpty(autoFlag)
|| (!CommonConstants.ZERO_STRING.equals(autoFlag)
&& !CommonConstants.ONE_STRING.equals(autoFlag))){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
TAutoMainRel autoMainRel = baseMapper.selectById(id);
if (null == autoMainRel){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
autoMainRel.setAutoFlag(autoFlag);
if (baseMapper.updateById(autoMainRel) >=0){
return R.ok();
}
return R.failed();
}
} }
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="postFlag" column="POST_FLAG"/> <result property="postFlag" column="POST_FLAG"/>
<result property="autoFlag" column="AUTO_FLAG"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -46,13 +47,16 @@ ...@@ -46,13 +47,16 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_BY, a.UPDATE_BY,
a.UPDATE_TIME,a.post_flag a.UPDATE_TIME,a.post_flag,a.AUTO_FLAG
</sql> </sql>
<sql id="tAutoMainRel_where"> <sql id="tAutoMainRel_where">
<if test="tAutoMainRel != null"> <if test="tAutoMainRel != null">
<if test="tAutoMainRel.id != null and tAutoMainRel.id.trim() != ''"> <if test="tAutoMainRel.id != null and tAutoMainRel.id.trim() != ''">
AND a.ID = #{tAutoMainRel.id} AND a.ID = #{tAutoMainRel.id}
</if> </if>
<if test="tAutoMainRel.autoFlag != null and tAutoMainRel.autoFlag.trim() != ''">
AND a.AUTO_FLAG = #{tAutoMainRel.autoFlag}
</if>
<if test="tAutoMainRel.deptNo != null and tAutoMainRel.deptNo.trim() != ''"> <if test="tAutoMainRel.deptNo != null and tAutoMainRel.deptNo.trim() != ''">
AND a.DEPT_NO = #{tAutoMainRel.deptNo} AND a.DEPT_NO = #{tAutoMainRel.deptNo}
</if> </if>
...@@ -98,6 +102,7 @@ ...@@ -98,6 +102,7 @@
a.UPDATE_BY, a.UPDATE_BY,
a.UPDATE_TIME,a.post_flag a.UPDATE_TIME,a.post_flag
,b.DEPART_NAME,IFNULL(b.cs_name,'') csUserName,b.DEPART_NO dept_NO,IF(b.STOP_FLAG='0','是','否') STOP_FLAG ,b.DEPART_NAME,IFNULL(b.cs_name,'') csUserName,b.DEPART_NO dept_NO,IF(b.STOP_FLAG='0','是','否') STOP_FLAG
,a.AUTO_FLAG
FROM t_auto_main_rel a FROM t_auto_main_rel a
left join t_settle_domain b on a.DEPT_ID = b.id left join t_settle_domain b on a.DEPT_ID = b.id
<where> <where>
......
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