Commit 2f0f63f5 authored by huyuchen's avatar huyuchen

预派单 代码修改

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