Commit ccec5f3d authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents c1c812fd d5baee3f
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 { ...@@ -149,8 +149,8 @@ public class TSettleDomainController {
**/ **/
@Inner @Inner
@PostMapping("/getSettleDomainSelectVoById") @PostMapping("/getSettleDomainSelectVoById")
public R<TSettleDomainSelectVo> getInnerSettleDomainSelectVoByUserId(@RequestParam String id) { public TSettleDomainSelectVo getInnerSettleDomainSelectVoByUserId(@RequestParam String id) {
return new R<>(tSettleDomainService.selectSettleDomainSelectVosById(id)); return tSettleDomainService.selectSettleDomainSelectVosById(id);
} }
/** /**
...@@ -161,8 +161,11 @@ public class TSettleDomainController { ...@@ -161,8 +161,11 @@ public class TSettleDomainController {
**/ **/
@Inner @Inner
@PostMapping("/selectAllSettleDomainSelectVos") @PostMapping("/selectAllSettleDomainSelectVos")
public R<List<TSettleDomainSelectVo>> selectAllSettleDomainSelectVos() { public TSettleDomainListVo selectAllSettleDomainSelectVos() {
return new R<>(tSettleDomainService.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; ...@@ -25,10 +25,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage; import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; 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.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.TCustomerInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService; 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.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.archives.vo.TEmpChangeInfoVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
...@@ -57,7 +57,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -57,7 +57,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
private final TCustomerInfoService tCustomerInfoService; private final TCustomerInfoService tCustomerInfoService;
private final TSettleDomainService tSettleDomainService; private final TSettleDomainMapper tSettleDomainMapper;
private final TEmployeeLogServiceImpl tEmployeeLogService; private final TEmployeeLogServiceImpl tEmployeeLogService;
...@@ -89,7 +89,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -89,7 +89,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)); .eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(updateTEmployeeProject)) { 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::getDepartNo, tEmpChangeInfo.getDeptNo()).eq(TSettleDomain::getDepartName, tEmpChangeInfo.getNewSettle())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING).eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)); .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING).eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING));
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeeProject.getId()); TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeeProject.getId());
...@@ -149,7 +149,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -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::getDepartNo, excel.getNewSettleCode())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING) .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)); .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING));
...@@ -217,7 +217,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -217,7 +217,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
*/ */
@Override @Override
public R<List<TSettleDomain>> getAllDept() { 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)); .eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
return R.ok(list); return R.ok(list);
} }
...@@ -243,7 +243,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -243,7 +243,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
@Override @Override
public IPage<TSettleDomain> getAllDeptPage(Page page) { public IPage<TSettleDomain> getAllDeptPage(Page page) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(); LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper();
return tSettleDomainService.page(page,wrapper); return tSettleDomainMapper.selectPage(page,wrapper);
} }
private LambdaQueryWrapper buildQueryWrapper() { private LambdaQueryWrapper buildQueryWrapper() {
......
...@@ -358,6 +358,20 @@ public interface CommonConstants { ...@@ -358,6 +358,20 @@ public interface CommonConstants {
// 是否 // 是否
String IS_CHANGE = "划转"; 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 { ...@@ -378,6 +392,10 @@ public interface CommonConstants {
public static final String NINE_STRING = "9"; public static final String NINE_STRING = "9";
String EIGHT_STRING = "8"; 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 //百分之一 1/100
public static final BigDecimal ONE_OF_PERCENT = new BigDecimal("0.01"); public static final BigDecimal ONE_OF_PERCENT = new BigDecimal("0.01");
...@@ -389,4 +407,8 @@ public interface CommonConstants { ...@@ -389,4 +407,8 @@ public interface CommonConstants {
String SEVEN_STRING = "7"; String SEVEN_STRING = "7";
public static final BigDecimal MONEY_MAX = new BigDecimal("999999.99"); 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 { ...@@ -126,4 +126,10 @@ public class ExcelAttributeConstants {
public static final String DEPARTID_PROVINCE_CITY_TOWN = "departId_province_city_town"; 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 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 { ...@@ -416,4 +416,8 @@ public interface ErrorCodes {
* 派减异常: 本次派增已存在对应身份证号的派减记录 * 派减异常: 本次派增已存在对应身份证号的派减记录
*/ */
String EMP_DISPATCH_REDUCE_EXISTS = "emp.dispatch.reduce.exists"; 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 { ...@@ -399,4 +399,44 @@ public class Common {
map.clear(); 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 ...@@ -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 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 { ...@@ -96,8 +96,8 @@ public class ArchivesDaprUtil {
* @Param * @Param
* @return * @return
**/ **/
public R<List<TSettleDomainSelectVo>> selectAllSettleDomainSelectVos(){ public R<TSettleDomainListVo> selectAllSettleDomainSelectVos(){
R<List<TSettleDomainSelectVo>> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainSelectVoById","", Map.class, SecurityConstants.FROM_IN); R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/selectAllSettleDomainSelectVos","", Map.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){ if (Common.isEmpty(res)){
return R.failed("获取所有客户单位的结算主体信息失败!"); return R.failed("获取所有客户单位的结算主体信息失败!");
} }
......
...@@ -101,7 +101,7 @@ public class TDispatchInfo extends BaseEntity { ...@@ -101,7 +101,7 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("员工类型" ) @ExcelProperty("员工类型" )
private String empType; private String empType;
/** /**
* 员工电话 * 员工电话 (手机号码)
*/ */
@Length(max = 32, message = "员工电话 不能超过32个字符" ) @Length(max = 32, message = "员工电话 不能超过32个字符" )
@ExcelAttribute(name = "员工电话", maxLength = 32) @ExcelAttribute(name = "员工电话", maxLength = 32)
...@@ -520,6 +520,50 @@ public class TDispatchInfo extends BaseEntity { ...@@ -520,6 +520,50 @@ public class TDispatchInfo extends BaseEntity {
private String belongUnitName; private String belongUnitName;
/**
* 学历
*/
@ExcelAttribute(name = "学历", maxLength = 32)
@Schema(description = "学历", name = "contractName")
private String educationName;
/**
* 试用期(单位月)
*/
@Length(max = 2, message = "试用期 不能超过2 个字符" )
@ExcelAttribute(name = "试用期", maxLength = 32)
@Schema(description = "试用期" )
@ExcelProperty("试用期" )
private String tryPeriod;
/**
* 身份证省
*/
@ExcelAttribute(name = "身份证省" ,isArea = true)
@Schema(description = "身份证省" )
@ExcelProperty("身份证省" )
private String idCardProvince;
/**
* 身份证市
*/
@ExcelAttribute(name = "身份证市" ,isArea = true,parentField = "idCardProvince")
@Schema(description = "身份证市" )
@ExcelProperty("身份证市" )
private String idCardCity;
/**
* 身份证县
*/
@ExcelAttribute(name = "身份证县",isArea = true,parentField = "idCardCity")
@Schema(description = "身份证县" )
@ExcelProperty("身份证县" )
private String idCardTown;
/**
* 身份证所在地
*/
@ExcelAttribute(name = "身份证所在地")
@Schema(description = "身份证所在地" )
@ExcelProperty("身份证所在地" )
private String idCardAddress;
} }
...@@ -636,9 +636,9 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -636,9 +636,9 @@ public class TPreDispatchInfo extends BaseEntity {
private String remark; private String remark;
/** /**
* 是否派单:0 是 2 否 * 是否派单:0 是 1 否
*/ */
@Schema(description ="是否派单:0 是 2 否 ") @Schema(description ="是否派单:0 是 1 否 ")
private String dispatchFlag; private String dispatchFlag;
/** /**
......
...@@ -964,18 +964,18 @@ public class TSocialFundInfo extends BaseEntity { ...@@ -964,18 +964,18 @@ public class TSocialFundInfo extends BaseEntity {
private BigDecimal personalFundSum; private BigDecimal personalFundSum;
/** /**
* 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败) * 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败 10 审核不通过
*/ */
@ExcelAttribute(name = "社保状态", maxLength = 1) @ExcelAttribute(name = "社保状态", maxLength = 1)
@Schema(description = "社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败)" ) @Schema(description = "社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败10 审核不通过)" )
@ExcelProperty("社保派增状态" ) @ExcelProperty("社保派增状态" )
private String socialStatus; private String socialStatus;
/** /**
* 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败) * 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败 9 审核不通过
*/ */
@Length(max = 1, message = "公积金状态 不能超过1个字符" ) @Length(max = 1, message = "公积金状态 不能超过1个字符" )
@ExcelAttribute(name = "公积金状态", maxLength = 1) @ExcelAttribute(name = "公积金状态", maxLength = 1)
@Schema(description = "公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败)" ) @Schema(description = "公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败 9 审核不通过)" )
@ExcelProperty("公积金状态" ) @ExcelProperty("公积金状态" )
private String fundStatus; private String fundStatus;
......
...@@ -494,7 +494,7 @@ public class TPreDispatchExportVo implements Serializable { ...@@ -494,7 +494,7 @@ public class TPreDispatchExportVo implements Serializable {
private String remark; private String remark;
/** /**
* 是否派单:0 是 2 * 是否派单:0 是 1
*/ */
@ExcelProperty(value ="是否派单") @ExcelProperty(value ="是否派单")
@ExcelAttribute(name = "是否派单", maxLength = 2, needExport = true, readConverterExp = "0=是,1=否") @ExcelAttribute(name = "是否派单", maxLength = 2, needExport = true, readConverterExp = "0=是,1=否")
......
...@@ -225,7 +225,7 @@ public class TPreDispatchInfoController { ...@@ -225,7 +225,7 @@ public class TPreDispatchInfoController {
@Operation(summary = "预派单批量新增派增", description = "预派单批量新增派增") @Operation(summary = "预派单批量新增派增", description = "预派单批量新增派增")
@SysLog("预派单批量新增派增") @SysLog("预派单批量新增派增")
@PostMapping("/analysisJsonStringImportAdd") @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, public R analysisJsonStringImportAdd(@RequestBody String jsonString, @RequestParam(value = "socialHouse",required = false) String socialHouse,
@RequestParam(value = "fundHouse",required = false) String fundHouse, @RequestParam String departId) { @RequestParam(value = "fundHouse",required = false) String fundHouse, @RequestParam String departId) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
...@@ -265,7 +265,7 @@ public class TPreDispatchInfoController { ...@@ -265,7 +265,7 @@ public class TPreDispatchInfoController {
@Operation(summary = "预派单批量新增派减", description = "预派单批量新增派减") @Operation(summary = "预派单批量新增派减", description = "预派单批量新增派减")
@SysLog("预派单批量新增派减") @SysLog("预派单批量新增派减")
@PostMapping("/analysisJsonStringImportReduce") @PostMapping("/analysisJsonStringImportReduce")
@PreAuthorize("@pms.hasPermission('social:tpredispatchinfo_importReduceList')") @PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_importAddList')")
public R analysisJsonStringImportReduce(@RequestBody String jsonString) { public R analysisJsonStringImportReduce(@RequestBody String jsonString) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) { if (null == user || null == user.getId()) {
......
...@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -24,6 +24,7 @@ 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.admin.api.entity.SysArea; 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.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.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.*; import com.yifu.cloud.plus.v1.yifu.common.core.constant.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
...@@ -323,14 +324,21 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -323,14 +324,21 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (Common.isEmpty(id)) { if (Common.isEmpty(id)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); 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 key:结算主体id value:结算主体名称
Map<String, String> settleDomainNameMap = new HashMap<>(); Map<String, String> settleDomainNameMap = new HashMap<>();
//客户名称map key:客户id value:客户名称 //客户名称map key:客户id value:客户名称
Map<String, String> customerNameMap = new HashMap<>(); Map<String, String> customerNameMap = new HashMap<>();
//结算主体客户关系map key:结算主体id value:客户id //结算主体客户关系map key:结算主体id value:客户id
Map<String, String> settleIdAndCustomerIdMap = new HashMap<>(); 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数据封装 //map数据封装
initSettleDomainMaps(settleDomainR, settleDomainNameMap, customerNameMap, settleIdAndCustomerIdMap); initSettleDomainMaps(settleDomainR, settleDomainNameMap, customerNameMap, settleIdAndCustomerIdMap);
TPreDispatchInfo preInfo = baseMapper.selectById(id); TPreDispatchInfo preInfo = baseMapper.selectById(id);
...@@ -388,14 +396,21 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -388,14 +396,21 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (null == user || null == user.getId()) { if (null == user || null == user.getId()) {
return R.failed(CommonConstants.USER_FAIL); return R.failed(CommonConstants.USER_FAIL);
} }
R<List<TSettleDomainSelectVo>> settleDomainR = null; List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
//结算主体名称map key:结算主体id value:结算主体名称 //结算主体名称map key:结算主体id value:结算主体名称
Map<String, String> settleDomainNameMap = new HashMap<>(); Map<String, String> settleDomainNameMap = new HashMap<>();
//客户名称map key:客户id value:客户名称 //客户名称map key:客户id value:客户名称
Map<String, String> customerNameMap = new HashMap<>(); Map<String, String> customerNameMap = new HashMap<>();
//结算主体客户关系map key:结算主体id value:客户id //结算主体客户关系map key:结算主体id value:客户id
Map<String, String> settleIdAndCustomerIdMap = new HashMap<>(); 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数据封装 //map数据封装
initSettleDomainMaps(settleDomainR, settleDomainNameMap, customerNameMap, settleIdAndCustomerIdMap); initSettleDomainMaps(settleDomainR, settleDomainNameMap, customerNameMap, settleIdAndCustomerIdMap);
// 获取当前创建人 截止到当前时间的 正常未派单 未删除的预派单数据 // 获取当前创建人 截止到当前时间的 正常未派单 未删除的预派单数据
...@@ -480,6 +495,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -480,6 +495,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
@Override @Override
public R update(TPreDispatchInfo tPreDispatchInfo) { public R update(TPreDispatchInfo tPreDispatchInfo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) { if (null == user || null == user.getId()) {
return R.failed(CommonConstants.USER_FAIL); return R.failed(CommonConstants.USER_FAIL);
...@@ -549,7 +565,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -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) { public List<ErrorMessage> batchSavePreDisPatchAdd(List<TPreDispatchInfo> listInfo, YifuUser user, String socialHouse, String fundHouse, String departId) {
List<ErrorMessage> errorList = new ArrayList<>(); List<ErrorMessage> errorList = new ArrayList<>();
R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(departId); R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(departId);
TSettleDomainSelectVo selectVo = domainR.getData();
// 获取区域数据MAP // 获取区域数据MAP
HashMap<String, SysArea> areaHashMap = new HashMap<>(CommonConstants.SIXTEEN_INT); HashMap<String, SysArea> areaHashMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
HashMap<String, SysArea> areaIdMap = new HashMap<>(CommonConstants.SIXTEEN_INT); HashMap<String, SysArea> areaIdMap = new HashMap<>(CommonConstants.SIXTEEN_INT);
...@@ -559,6 +574,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -559,6 +574,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (dataCheckDepart(errorList, domainR)) { if (dataCheckDepart(errorList, domainR)) {
return errorList; return errorList;
} }
TSettleDomainSelectVo selectVo = domainR.getData();
// 获取基数配置信息 // 获取基数配置信息
HashMap<String, SysBaseSetInfo> baseSocialSetMap = new HashMap<>(); HashMap<String, SysBaseSetInfo> baseSocialSetMap = new HashMap<>();
HashMap<String, SysBaseSetInfo> baseFundSetMap = new HashMap<>(); HashMap<String, SysBaseSetInfo> baseFundSetMap = new HashMap<>();
...@@ -653,8 +669,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -653,8 +669,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
initDayLimit(dayConfMap, info); initDayLimit(dayConfMap, info);
// 5.保存 有异常也保存 要做标识 // 5.保存 有异常也保存 要做标识
R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(user.getDeptId().toString()); R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(user.getDeptId().toString());
if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData())) {
TSettleDomainSelectVo selectVo = domainR.getData(); TSettleDomainSelectVo selectVo = domainR.getData();
info.setUserDeptName(selectVo.getDepartName()); info.setUserDeptName(selectVo.getDepartName());
}
info.setPreStatus(CommonConstants.ZERO_STRING); info.setPreStatus(CommonConstants.ZERO_STRING);
// 如果已经存在未派单的派增 这个时候派减 直接标记异常 客服自行判断是否派单 // 如果已经存在未派单的派增 这个时候派减 直接标记异常 客服自行判断是否派单
if (null != preAddMap.get(info.getEmpIdcard())) { if (null != preAddMap.get(info.getEmpIdcard())) {
...@@ -1041,10 +1059,12 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1041,10 +1059,12 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
// 默认社保代理 4 // 默认社保代理 4
info.setEmpTypeAdd(CommonConstants.FOUR_STRING); info.setEmpTypeAdd(CommonConstants.FOUR_STRING);
info.setPositionAdd(PreDispatchConstants.POSITION); info.setPositionAdd(PreDispatchConstants.POSITION);
if (Common.isNotNull(selectVo)) {
info.setDepartIdAdd(selectVo.getId()); info.setDepartIdAdd(selectVo.getId());
info.setDepartNameAdd(selectVo.getDepartName()); info.setDepartNameAdd(selectVo.getDepartName());
info.setUnitIdAdd(selectVo.getCustomerId()); info.setUnitIdAdd(selectVo.getCustomerId());
info.setUnitNameAdd(selectVo.getCustomerName()); info.setUnitNameAdd(selectVo.getCustomerName());
}
// 默认合同名称为代理社保 合同类型为固定期限1 // 默认合同名称为代理社保 合同类型为固定期限1
info.setContractNameAdd(PreDispatchConstants.CONTRACT_NAME); info.setContractNameAdd(PreDispatchConstants.CONTRACT_NAME);
info.setContractTypeAdd(CommonConstants.ONE_STRING); info.setContractTypeAdd(CommonConstants.ONE_STRING);
...@@ -1847,7 +1867,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1847,7 +1867,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
/** /**
* map数据封装 * map数据封装
* *
* @param settleDomainR * @param settleDomainList
* @param settleDomainNameMap * @param settleDomainNameMap
* @param customerNameMap * @param customerNameMap
* @param settleIdAndCustomerIdMap * @param settleIdAndCustomerIdMap
...@@ -1855,13 +1875,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1855,13 +1875,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
* @Author huyc * @Author huyc
* @Date 2022-07-18 * @Date 2022-07-18
**/ **/
private void initSettleDomainMaps(R<List<TSettleDomainSelectVo>> settleDomainR, private void initSettleDomainMaps(List<TSettleDomainSelectVo> settleDomainList,
Map<String, String> settleDomainNameMap, Map<String, String> settleDomainNameMap,
Map<String, String> customerNameMap, Map<String, String> customerNameMap,
Map<String, String> settleIdAndCustomerIdMap) { Map<String, String> settleIdAndCustomerIdMap) {
List<TSettleDomainSelectVo> settleDomainList;
if (null != settleDomainR) {
settleDomainList = settleDomainR.getData();
//map数据封装 //map数据封装
if (Common.isNotNull(settleDomainList)) { if (Common.isNotNull(settleDomainList)) {
for (TSettleDomainSelectVo settleDomainSelectVo : settleDomainList) { for (TSettleDomainSelectVo settleDomainSelectVo : settleDomainList) {
...@@ -1873,7 +1890,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1873,7 +1890,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
} }
} }
} }
}
/** /**
* 初始化派减的相关状态及数据 * 初始化派减的相关状态及数据
......
package com.yifu.cloud.plus.v1.yifu.social.util; 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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
/** /**
* 公用方法提取 * 公用方法提取
...@@ -56,4 +58,40 @@ public class ServiceUtil { ...@@ -56,4 +58,40 @@ public class ServiceUtil {
} }
return null; 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;
}
} }
...@@ -86,6 +86,14 @@ ...@@ -86,6 +86,14 @@
<result property="dispatchCode" column="DISPATCH_CODE"/> <result property="dispatchCode" column="DISPATCH_CODE"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/> <result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="contractId" column="CONTRACT_ID"/> <result property="contractId" column="CONTRACT_ID"/>
<result property="educationName" column="EDUCATION_NAME"/>
<result property="tryPeriod" column="TRY_PERIOD"/>
<result property="idCardProvince" column="ID_CARD_PROVINCE"/>
<result property="idCardCity" column="ID_CARD_CITY"/>
<result property="idCardTown" column="ID_CARD_TOWN"/>
<result property="idCardAddress" column="ID_CARD_ADDRESS"/>
</resultMap> </resultMap>
...@@ -152,7 +160,13 @@ ...@@ -152,7 +160,13 @@
a.DISPATCH_CODE, a.DISPATCH_CODE,
a.SETTLE_DOMAIN_CODE, a.SETTLE_DOMAIN_CODE,
a.CONTRACT_SUB_NAME, a.CONTRACT_SUB_NAME,
a.CONTRACT_ID a.CONTRACT_ID,
a.EDUCATION_NAME,
a.TRY_PERIOD,
a.ID_CARD_PROVINCE,
a.ID_CARD_CITY,
a.ID_CARD_TOWN,
a.ID_CARD_ADDRESS
</sql> </sql>
<sql id="tDispatchInfo_where"> <sql id="tDispatchInfo_where">
<if test="tDispatchInfo != null"> <if test="tDispatchInfo != null">
......
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