Commit 2f0f63f5 authored by huyuchen's avatar huyuchen

预派单 代码修改

parent cc6dab0f
...@@ -121,7 +121,8 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -121,7 +121,8 @@ public class TPreDispatchInfo extends BaseEntity {
* 入职日期 * 入职日期
*/ */
@Schema(description ="入职日期") @Schema(description ="入职日期")
private Date entryDate; @Size(max = 20, message = "入职日期不可超过20位")
private String entryDate;
/** /**
* 正式工资 * 正式工资
...@@ -345,6 +346,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -345,6 +346,7 @@ public class TPreDispatchInfo extends BaseEntity {
* 派单客服 * 派单客服
*/ */
@Schema(description ="派单客服") @Schema(description ="派单客服")
@Size(max = 20, message = "派单客服不可超过20位")
private String customerService; private String customerService;
/** /**
...@@ -357,6 +359,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -357,6 +359,7 @@ public class TPreDispatchInfo extends BaseEntity {
* 唯一号 * 唯一号
*/ */
@Schema(description ="唯一号") @Schema(description ="唯一号")
@Size(max = 20, message = "唯一号不可超过20位")
private String uniqueNumber; private String uniqueNumber;
/** /**
...@@ -369,6 +372,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -369,6 +372,7 @@ public class TPreDispatchInfo extends BaseEntity {
* 服务类别 * 服务类别
*/ */
@Schema(description ="服务类别") @Schema(description ="服务类别")
@Size(max = 20, message = "服务类别不可超过20位")
private String serviceType; private String serviceType;
/** /**
......
...@@ -75,7 +75,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo { ...@@ -75,7 +75,7 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
* 入职日期 * 入职日期
*/ */
@ExcelAttribute(name = "入职日期") @ExcelAttribute(name = "入职日期")
private Date entryDate; private String entryDate;
/** /**
* 正式工资 * 正式工资
*/ */
......
...@@ -45,5 +45,6 @@ public class PreDispatchConstants { ...@@ -45,5 +45,6 @@ public class PreDispatchConstants {
public static final String NO_SOCIAL_FUND_ADDRESS_REDUCE = "派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!"; public static final String NO_SOCIAL_FUND_ADDRESS_REDUCE = "派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!";
public static final String TEL_NOT_EMPTY = "联系电话1不可为空!"; public static final String TEL_NOT_EMPTY = "联系电话1不可为空!";
public static final String TEL_INVALID = "联系电话1无效!"; public static final String TEL_INVALID = "联系电话1无效!";
public static final String TEL_INVALID2 = "联系电话2无效!";
public static final String GET_AREA_INFO = "获取区域数据失败!"; public static final String GET_AREA_INFO = "获取区域数据失败!";
} }
...@@ -91,8 +91,8 @@ public class TAgentConfigController { ...@@ -91,8 +91,8 @@ public class TAgentConfigController {
@SysLog("新增预估临时政策配置表" ) @SysLog("新增预估临时政策配置表" )
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('social_tagentconfig_add')" ) @PreAuthorize("@pms.hasPermission('social_tagentconfig_add')" )
public R<Boolean> save(@RequestBody TAgentConfig tAgentConfig) { public R save(@RequestBody TAgentConfig tAgentConfig) {
return R.ok(tAgentConfigService.save(tAgentConfig)); return tAgentConfigService.saveInfo(tAgentConfig);
} }
/** /**
......
...@@ -44,4 +44,11 @@ public interface TAgentConfigService extends IService<TAgentConfig> { ...@@ -44,4 +44,11 @@ public interface TAgentConfigService extends IService<TAgentConfig> {
* @return * @return
*/ */
R updateFlagById(String id); R updateFlagById(String id);
/**
* 修改开启关闭状态
* @param tAgentConfig 预估临时政策配置表id
* @return
*/
R saveInfo(TAgentConfig tAgentConfig);
} }
...@@ -16,7 +16,10 @@ ...@@ -16,7 +16,10 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.social.service.impl; package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...@@ -69,4 +72,22 @@ public class TAgentConfigServiceImpl extends ServiceImpl<TAgentConfigMapper, TAg ...@@ -69,4 +72,22 @@ public class TAgentConfigServiceImpl extends ServiceImpl<TAgentConfigMapper, TAg
return R.failed("更新失败!"); return R.failed("更新失败!");
} }
} }
@Override
public R saveInfo(TAgentConfig tAgentConfig) {
LambdaQueryWrapper<TAgentConfig> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TAgentConfig::getYear, tAgentConfig.getYear());
wrapper.eq(TAgentConfig::getTarget, tAgentConfig.getTarget());
if (Common.isNotNull(tAgentConfig.getCity())){
wrapper.eq(TAgentConfig::getCity,tAgentConfig.getCity());
} else {
wrapper.eq(TAgentConfig::getProvince,tAgentConfig.getProvince());
}
wrapper.last(CommonConstants.LAST_ONE_SQL);
TAgentConfig count = baseMapper.selectOne(wrapper);
if (Common.isNotNull(count)) {
return R.failed("同一城市,年度的政策不能重复新增");
}
return R.ok();
}
} }
...@@ -558,6 +558,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -558,6 +558,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (ValidityUtil.checkInvalidEmpPhone(tPreDispatchInfo.getTelOne())) { if (ValidityUtil.checkInvalidEmpPhone(tPreDispatchInfo.getTelOne())) {
return R.failed(PreDispatchConstants.TEL_INVALID); return R.failed(PreDispatchConstants.TEL_INVALID);
} }
if (ValidityUtil.checkInvalidEmpPhone(tPreDispatchInfo.getTelTwo())) {
return R.failed(PreDispatchConstants.TEL_INVALID2);
}
} }
if (CommonConstants.ONE_STRING.equals(tPreDispatchInfo.getType())) { if (CommonConstants.ONE_STRING.equals(tPreDispatchInfo.getType())) {
initLeaveReason(tPreDispatchInfo); initLeaveReason(tPreDispatchInfo);
...@@ -1145,10 +1149,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1145,10 +1149,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
private String checkAddPreDispatch(TPreDispatchInfo tPreDispatchInfo) { private String checkAddPreDispatch(TPreDispatchInfo tPreDispatchInfo) {
if (CommonConstants.ZERO_STRING.equals(tPreDispatchInfo.getType())) { if (CommonConstants.ZERO_STRING.equals(tPreDispatchInfo.getType())) {
// 拍增的合同开始和结束时间必填 2021-08-13
if (Common.isEmpty(tPreDispatchInfo.getContractStart()) || Common.isEmpty(tPreDispatchInfo.getContractEnd())) {
return "派增的合同开始日期和合同终止日期不可为空!";
}
if (Common.isEmpty(tPreDispatchInfo.getTelOne())) { if (Common.isEmpty(tPreDispatchInfo.getTelOne())) {
return PreDispatchConstants.TEL_NOT_EMPTY; return PreDispatchConstants.TEL_NOT_EMPTY;
} }
......
...@@ -130,5 +130,6 @@ ...@@ -130,5 +130,6 @@
1=1 1=1
<include refid="tAgentConfig_where"/> <include refid="tAgentConfig_where"/>
</where> </where>
ORDER BY a.CREATE_TIME desc
</select> </select>
</mapper> </mapper>
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