Commit 1bf7b87d authored by zhaji's avatar zhaji

Merge branch 'develop' into feature-zhaji

# Conflicts:
#	yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
#	yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
parents 3418b5b4 fd61bf08
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.util.List;
@Data
public class TSettleDomainListVo {
/**
* 合同主体对应的单位名称
*/
private List<TSettleDomainSelectVo> listSelectVO;
}
......@@ -149,8 +149,8 @@ public class TSettleDomainController {
**/
@Inner
@PostMapping("/getSettleDomainSelectVoById")
public R<TSettleDomainSelectVo> getInnerSettleDomainSelectVoByUserId(@RequestParam String id) {
return new R<>(tSettleDomainService.selectSettleDomainSelectVosById(id));
public TSettleDomainSelectVo getInnerSettleDomainSelectVoByUserId(@RequestParam String id) {
return tSettleDomainService.selectSettleDomainSelectVosById(id);
}
/**
......@@ -161,8 +161,11 @@ public class TSettleDomainController {
**/
@Inner
@PostMapping("/selectAllSettleDomainSelectVos")
public R<List<TSettleDomainSelectVo>> selectAllSettleDomainSelectVos() {
return new R<>(tSettleDomainService.selectAllSettleDomainSelectVos());
public TSettleDomainListVo selectAllSettleDomainSelectVos() {
List<TSettleDomainSelectVo> list = tSettleDomainService.selectAllSettleDomainSelectVos();
TSettleDomainListVo listVo = new TSettleDomainListVo();
listVo.setListSelectVO(list);
return listVo;
}
/**
......
......@@ -25,10 +25,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
......@@ -57,7 +57,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
private final TCustomerInfoService tCustomerInfoService;
private final TSettleDomainService tSettleDomainService;
private final TSettleDomainMapper tSettleDomainMapper;
private final TEmployeeLogServiceImpl tEmployeeLogService;
......@@ -89,7 +89,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(updateTEmployeeProject)) {
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmpChangeInfo.getDeptNo()).eq(TSettleDomain::getDepartName, tEmpChangeInfo.getNewSettle())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING).eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING));
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeeProject.getId());
......@@ -149,7 +149,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
//项目编码校验
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, excel.getNewSettleCode())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING));
......@@ -217,7 +217,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
*/
@Override
public R<List<TSettleDomain>> getAllDept() {
List<TSettleDomain> list = tSettleDomainService.list(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
List<TSettleDomain> list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
return R.ok(list);
}
......@@ -243,7 +243,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
@Override
public IPage<TSettleDomain> getAllDeptPage(Page page) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper();
return tSettleDomainService.page(page,wrapper);
return tSettleDomainMapper.selectPage(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper() {
......
......@@ -358,6 +358,20 @@ public interface CommonConstants {
// 是否
String IS_CHANGE = "划转";
/**
* 省市
* @Author fxj
* @Date 2020-08-25
**/
public static final String HEFEISTRING="安徽省-合肥市";
/**
* 省
* @Author fxj
* @Date 2020-08-25
**/
public static final String ANHUISTRING="安徽省";
/**
*是所有者
**/
......@@ -378,6 +392,10 @@ public interface CommonConstants {
public static final String NINE_STRING = "9";
String EIGHT_STRING = "8";
public static final String PAYMENT_SOCIAL_IMPORT = "payment_social_import";
public static final String PAYMENT_SOCIAL_WAIT_EXPORT = "payment_social_wait_export";
//百分之一 1/100
public static final BigDecimal ONE_OF_PERCENT = new BigDecimal("0.01");
......@@ -399,4 +417,9 @@ public interface CommonConstants {
public static final String MONEY_MIN = "0";
public static final int TWENTY_INT = 20;
public static final BigDecimal MONEY_MAX = new BigDecimal("999999.99");
public static final String ERROR_MSG_PRFIX = "error=";
public static final String SUCCESS_MSG_PREFIX = "success=";
}
......@@ -126,4 +126,10 @@ public class ExcelAttributeConstants {
public static final String DEPARTID_PROVINCE_CITY_TOWN = "departId_province_city_town";
//派减离职原因
public static final String REDUCE_PROJECT_REASON = "reduce_project_reason";
//社保缴纳月份
public static final String SOCIAL_PAY_MONTH = "socialPayMonth";
//身份证
public static final String EMPIDCARD = "empIdcard";
}
......@@ -416,4 +416,8 @@ public interface ErrorCodes {
* 派减异常: 本次派增已存在对应身份证号的派减记录
*/
String EMP_DISPATCH_REDUCE_EXISTS = "emp.dispatch.reduce.exists";
/**
* 当前社保导入队列不足或者数据量过大,请稍后重试!
*/
String SOCIALINFO_LIST_NUM_LARGE = "socialinfo.list.num.large";
}
......@@ -399,4 +399,44 @@ public class Common {
map.clear();
}
}
/**
* 按字段返回字符串
*
* @param list
* @param filedName
* @param <T>
* @return
*/
public static <T> List<String> listObjectToStrList(List<T> list, String filedName) {
List<String> idsStr = new ArrayList<String>();
Object temp = null;
if (null != list && list.size() > 0) {
for (T t : list) {
temp = getFieldValueByName(filedName, t);
if (null != temp) {
idsStr.add(temp.toString());
}
}
}
return idsStr;
}
/**
* 默认空 置为零
* @param obj
* @return
*/
public static BigDecimal isBlankToBigDecimalZero(BigDecimal obj) {
if(obj == null) {
return BigDecimal.ZERO;
}
if(String.valueOf(obj).trim().length() == 0) {
return BigDecimal.ZERO;
}
if(String.valueOf(obj).trim().equals("null")) {
return BigDecimal.ZERO;
}
return obj;
}
}
......@@ -151,6 +151,8 @@ emp.dispatch.reduce.fund.status.error=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672A\u627
emp.dispatch.reduce.exists=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672C\u6B21\u6D3E\u589E\u5DF2\u5B58\u5728\u5BF9\u5E94\u8EAB\u4EFD\u8BC1\u53F7\u7684\u6D3E\u51CF\u8BB0\u5F55
socialinfo.list.num.large=\u5F53\u524D\u793E\u4FDD\u5BFC\u5165\u961F\u5217\u4E0D\u8DB3\u6216\u8005\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01
......
......@@ -96,8 +96,8 @@ public class ArchivesDaprUtil {
* @Param
* @return
**/
public R<List<TSettleDomainSelectVo>> selectAllSettleDomainSelectVos(){
R<List<TSettleDomainSelectVo>> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainSelectVoById","", Map.class, SecurityConstants.FROM_IN);
public R<TSettleDomainListVo> selectAllSettleDomainSelectVos(){
R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/selectAllSettleDomainSelectVos","", Map.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取所有客户单位的结算主体信息失败!");
}
......
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil
......@@ -65,11 +65,6 @@
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-check-api</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>
......
......@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Sets;
import com.yifu.cloud.plus.v1.check.entity.TCheckIdCard;
import com.yifu.cloud.plus.v1.check.utils.ChecksUtil;
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.common.core.constant.CacheConstants;
......@@ -18,6 +17,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
......@@ -71,6 +71,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private TInsuranceSettleService tInsuranceSettleService;
@Resource
private TInsuranceOperateService tInsuranceOperateService;
@Resource
private CheckDaprUtil checkDaprUtil;
/***********************商险办理********************************/
......@@ -715,11 +717,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo());
ChecksUtil.checkIdCard(checkIdCard,true);
if (CommonConstants.ONE_INT != checkIdCard.getIsTrue()){
param.setErrorMessage(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param);
continue;
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
if (null != tCheckIdCardR && tCheckIdCardR.getCode() == CommonConstants.SUCCESS){
TCheckIdCard data = tCheckIdCardR.getData();
if (CommonConstants.ONE_INT != data.getIsTrue()){
param.setErrorMessage(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param);
continue;
}
}
//根据项目编码查询项目是否存在
......@@ -964,11 +969,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo());
ChecksUtil.checkIdCard(checkIdCard,true);
if (CommonConstants.ONE_INT != checkIdCard.getIsTrue()){
param.setErrorMessage(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param);
continue;
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
if (null != tCheckIdCardR && tCheckIdCardR.getCode() == CommonConstants.SUCCESS){
TCheckIdCard data = tCheckIdCardR.getData();
if (CommonConstants.ONE_INT != data.getIsTrue()){
param.setErrorMessage(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param);
continue;
}
}
//根据项目编码查询项目是否存在
......@@ -1202,12 +1210,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getReplaceEmpName());
checkIdCard.setIdCard(param.getReplaceEmpIdcardNo());
ChecksUtil.checkIdCard(checkIdCard,true);
if (CommonConstants.ONE_INT != checkIdCard.getIsTrue()){
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param);
continue;
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
if (null != tCheckIdCardR && tCheckIdCardR.getCode() == CommonConstants.SUCCESS){
TCheckIdCard data = tCheckIdCardR.getData();
if (CommonConstants.ONE_INT != data.getIsTrue()){
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param);
continue;
}
}
if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_START_PARSE_ERROR);
listResult.add(param);
......
......@@ -636,9 +636,9 @@ public class TPreDispatchInfo extends BaseEntity {
private String remark;
/**
* 是否派单:0 是 2 否
* 是否派单:0 是 1 否
*/
@Schema(description ="是否派单:0 是 2 否 ")
@Schema(description ="是否派单:0 是 1 否 ")
private String dispatchFlag;
/**
......
......@@ -494,7 +494,7 @@ public class TPreDispatchExportVo implements Serializable {
private String remark;
/**
* 是否派单:0 是 2
* 是否派单:0 是 1
*/
@ExcelProperty(value ="是否派单")
@ExcelAttribute(name = "是否派单", maxLength = 2, needExport = true, readConverterExp = "0=是,1=否")
......
......@@ -225,7 +225,7 @@ public class TPreDispatchInfoController {
@Operation(summary = "预派单批量新增派增", description = "预派单批量新增派增")
@SysLog("预派单批量新增派增")
@PostMapping("/analysisJsonStringImportAdd")
@PreAuthorize("@pms.hasPermission('social:tpredispatchinfo_importAddList')")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_importAddList')")
public R analysisJsonStringImportAdd(@RequestBody String jsonString, @RequestParam(value = "socialHouse",required = false) String socialHouse,
@RequestParam(value = "fundHouse",required = false) String fundHouse, @RequestParam String departId) {
YifuUser user = SecurityUtils.getUser();
......@@ -265,7 +265,7 @@ public class TPreDispatchInfoController {
@Operation(summary = "预派单批量新增派减", description = "预派单批量新增派减")
@SysLog("预派单批量新增派减")
@PostMapping("/analysisJsonStringImportReduce")
@PreAuthorize("@pms.hasPermission('social:tpredispatchinfo_importReduceList')")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_importAddList')")
public R analysisJsonStringImportReduce(@RequestBody String jsonString) {
YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) {
......
......@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
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.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
......@@ -323,14 +324,21 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (Common.isEmpty(id)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
R<List<TSettleDomainSelectVo>> settleDomainR = null;
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
//结算主体名称map key:结算主体id value:结算主体名称
Map<String, String> settleDomainNameMap = new HashMap<>();
//客户名称map key:客户id value:客户名称
Map<String, String> customerNameMap = new HashMap<>();
//结算主体客户关系map key:结算主体id value:客户id
Map<String, String> settleIdAndCustomerIdMap = new HashMap<>();
settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
listVo = archivesDaprUtil.selectAllSettleDomainSelectVos();
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
}
}
//map数据封装
initSettleDomainMaps(settleDomainR, settleDomainNameMap, customerNameMap, settleIdAndCustomerIdMap);
TPreDispatchInfo preInfo = baseMapper.selectById(id);
......@@ -388,14 +396,21 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (null == user || null == user.getId()) {
return R.failed(CommonConstants.USER_FAIL);
}
R<List<TSettleDomainSelectVo>> settleDomainR = null;
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
//结算主体名称map key:结算主体id value:结算主体名称
Map<String, String> settleDomainNameMap = new HashMap<>();
//客户名称map key:客户id value:客户名称
Map<String, String> customerNameMap = new HashMap<>();
//结算主体客户关系map key:结算主体id value:客户id
Map<String, String> settleIdAndCustomerIdMap = new HashMap<>();
settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
listVo = archivesDaprUtil.selectAllSettleDomainSelectVos();
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
}
}
//map数据封装
initSettleDomainMaps(settleDomainR, settleDomainNameMap, customerNameMap, settleIdAndCustomerIdMap);
// 获取当前创建人 截止到当前时间的 正常未派单 未删除的预派单数据
......@@ -480,6 +495,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
@Override
public R update(TPreDispatchInfo tPreDispatchInfo) {
YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) {
return R.failed(CommonConstants.USER_FAIL);
......@@ -549,7 +565,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
public List<ErrorMessage> batchSavePreDisPatchAdd(List<TPreDispatchInfo> listInfo, YifuUser user, String socialHouse, String fundHouse, String departId) {
List<ErrorMessage> errorList = new ArrayList<>();
R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(departId);
TSettleDomainSelectVo selectVo = domainR.getData();
// 获取区域数据MAP
HashMap<String, SysArea> areaHashMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
HashMap<String, SysArea> areaIdMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
......@@ -559,6 +574,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (dataCheckDepart(errorList, domainR)) {
return errorList;
}
TSettleDomainSelectVo selectVo = domainR.getData();
// 获取基数配置信息
HashMap<String, SysBaseSetInfo> baseSocialSetMap = new HashMap<>();
HashMap<String, SysBaseSetInfo> baseFundSetMap = new HashMap<>();
......@@ -653,8 +669,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
initDayLimit(dayConfMap, info);
// 5.保存 有异常也保存 要做标识
R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(user.getDeptId().toString());
TSettleDomainSelectVo selectVo = domainR.getData();
info.setUserDeptName(selectVo.getDepartName());
if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData())) {
TSettleDomainSelectVo selectVo = domainR.getData();
info.setUserDeptName(selectVo.getDepartName());
}
info.setPreStatus(CommonConstants.ZERO_STRING);
// 如果已经存在未派单的派增 这个时候派减 直接标记异常 客服自行判断是否派单
if (null != preAddMap.get(info.getEmpIdcard())) {
......@@ -1041,10 +1059,12 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
// 默认社保代理 4
info.setEmpTypeAdd(CommonConstants.FOUR_STRING);
info.setPositionAdd(PreDispatchConstants.POSITION);
info.setDepartIdAdd(selectVo.getId());
info.setDepartNameAdd(selectVo.getDepartName());
info.setUnitIdAdd(selectVo.getCustomerId());
info.setUnitNameAdd(selectVo.getCustomerName());
if (Common.isNotNull(selectVo)) {
info.setDepartIdAdd(selectVo.getId());
info.setDepartNameAdd(selectVo.getDepartName());
info.setUnitIdAdd(selectVo.getCustomerId());
info.setUnitNameAdd(selectVo.getCustomerName());
}
// 默认合同名称为代理社保 合同类型为固定期限1
info.setContractNameAdd(PreDispatchConstants.CONTRACT_NAME);
info.setContractTypeAdd(CommonConstants.ONE_STRING);
......@@ -1847,7 +1867,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
/**
* map数据封装
*
* @param settleDomainR
* @param settleDomainList
* @param settleDomainNameMap
* @param customerNameMap
* @param settleIdAndCustomerIdMap
......@@ -1855,13 +1875,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
* @Author huyc
* @Date 2022-07-18
**/
private void initSettleDomainMaps(R<List<TSettleDomainSelectVo>> settleDomainR,
private void initSettleDomainMaps(List<TSettleDomainSelectVo> settleDomainList,
Map<String, String> settleDomainNameMap,
Map<String, String> customerNameMap,
Map<String, String> settleIdAndCustomerIdMap) {
List<TSettleDomainSelectVo> settleDomainList;
if (null != settleDomainR) {
settleDomainList = settleDomainR.getData();
//map数据封装
if (Common.isNotNull(settleDomainList)) {
for (TSettleDomainSelectVo settleDomainSelectVo : settleDomainList) {
......@@ -1872,7 +1889,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
}
}
}
}
/**
......
package com.yifu.cloud.plus.v1.yifu.social.util;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import lombok.extern.slf4j.Slf4j;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 公用方法提取
......@@ -56,4 +58,40 @@ public class ServiceUtil {
}
return null;
}
/**
* 抛个异常先
* @Author fxj
* @Date 2020-09-09
* @param errorInfo
* @return
**/
public static void runTimeExceptionDiy(String errorInfo) {
throw new CheckedException(errorInfo);
}
/**
* 参数2的是否大于等于参数1的
* @Author fxj
* @Date 20200403
* @param socialStartDate
* @param socialPayMonth
* @param reduceDate
* @return
**/
public static boolean checkMothForPaymentImport(Date socialStartDate, String socialPayMonth, Date reduceDate) {
if(socialStartDate != null) {
if (null == reduceDate){
if(Integer.parseInt(socialPayMonth) >= Integer.parseInt(DateUtil.dateToString(socialStartDate))){
return true;
}
}else {
if(Integer.parseInt(socialPayMonth) >= Integer.parseInt(DateUtil.dateToString(socialStartDate))
&& Integer.parseInt(socialPayMonth) < Integer.parseInt(DateUtil.dateToString(reduceDate))){
return true;
}
}
}
return false;
}
}
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