Commit 1e37156d authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.5.3' into MVP1.5.3

parents 4f712cbf 3f31b808
......@@ -247,6 +247,28 @@ public class TEmpContractAlert extends BaseEntity {
@ExcelIgnore
private String contractId;
/**
* 客户id
*/
@Schema(description = "客户id")
private String unitId;
/**
* 客户名称
*/
@Schema(description = "客户名称")
private String unitName;
/**
* 客户编码
*/
@Schema(description = "客户编码")
private String unitNo;
/**
* 手机号码
*/
@Schema(description = "手机号码")
private String empPhone;
/**
* 合同截止日期
*/
......
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
......@@ -151,7 +152,15 @@ public class EmployeeContractExportAuditVO implements Serializable {
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
@ExcelProperty("工时制")
private String workingHours;
/**
* 合同编码
*/
@NotBlank(message = "合同编码不能为空")
@Length(max = 50, message = "合同编码不能超过50个字符")
@ExcelAttribute(name = "合同编码", maxLength = 50)
@ExcelProperty("合同编码")
@Schema(description = "合同编码", name = "contractNo")
private String contractNo;
/**
* 离职日期
*/
......
......@@ -209,6 +209,32 @@ public class EmployeeContractExportVO implements Serializable {
@Schema(description = "归档状态", name = "isFile")
private String isFile;
/**
* 合同岗位
*/
@Length(max = 32, message = "合同岗位不能超过32个字符")
@ExcelAttribute(name = "合同岗位", maxLength = 32, needExport = true)
@ExcelProperty("合同岗位")
@Schema(description = "合同岗位", name = "post")
private String post;
/**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@ExcelAttribute(name = "工时制")
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
@ExcelProperty("工时制")
private String workingHours;
/**
* 合同编码
*/
@NotBlank(message = "合同编码不能为空")
@Length(max = 50, message = "合同编码不能超过50个字符")
@ExcelAttribute(name = "合同编码", maxLength = 50)
@ExcelProperty("合同编码")
@Schema(description = "合同编码", name = "contractNo")
private String contractNo;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建人")
private String createName;
......
......@@ -237,6 +237,15 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
if (Common.isNotNull(entity.getDaysDue())){
wrapper.eq(TEmpContractAlert::getDaysDue,entity.getDaysDue());
}
if (Common.isNotNull(entity.getUnitId())) {
wrapper.eq(TEmpContractAlert::getUnitId, entity.getUnitId());
}
if (Common.isNotNull(entity.getEmpPhone())) {
wrapper.eq(TEmpContractAlert::getEmpPhone, entity.getEmpPhone());
}
if (Common.isNotNull(entity.getUnitNo())) {
wrapper.eq(TEmpContractAlert::getUnitNo, entity.getUnitNo());
}
return wrapper;
}
/**
......@@ -348,6 +357,12 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
}else {
alert.setFirstAlertTime(new Date());
}
// 2023-4-3 09:38:21 hgw 添加
alert.setUnitId(contract.getCustomerId());
alert.setUnitName(contract.getSubjectUnit());
alert.setUnitNo(contract.getUnitNo());
alert.setEmpPhone(employeeInfo.getEmpPhone());
alert.setCreateBy(contract.getCreateBy());
alert.setCreateName(contract.getCreateName());
alert.setContractId(contract.getId());
......
......@@ -676,6 +676,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
tEmployeeContractInfo.setAuditUserName(user.getNickname());
tEmployeeContractInfo.setContractNo(contractInfo.getContractNo());
// 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo);
this.updateById(tEmployeeContractInfo);
......@@ -1352,6 +1353,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo = new TEmployeeContractInfo();
tEmployeeContractInfo.setAuditRemark(contractAuditVo.getAuditRemark());
tEmployeeContractInfo.setAuditStatus(contractAuditVo.getAuditStatus());
tEmployeeContractInfo.setContractNo(contract.getContractNo());
tEmployeeContractInfo.setAuditUserName(user.getNickname());
tEmployeeContractInfo.setId(contract.getId());
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) {
......
......@@ -100,7 +100,7 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="reason" column="REASON"/>
<result property="contractNo" column="CONTRACT_NO"/>
<result property="type" column="TYPE"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
......@@ -136,7 +136,9 @@
<result property="endDate" column="END_DATE"/>
<result property="history" column="HISTORY"/>
<result property="type" column="TYPE"/>
<result property="contractNo" column="CONTRACT_NO"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -489,6 +491,12 @@
if(a.IS_FILE = 0,'有附件','无附件') FILES,
if(a.IS_FILE = 0,'已归档','未归档') IS_FILE,
a.CREATE_NAME,
a.CONTRACT_NO,
a.POST,
CASE WHEN a.WORKING_HOURS=1 THEN "标准工时"
WHEN a.WORKING_HOURS =2 THEN "综合工时"
WHEN a.WORKING_HOURS =3 THEN "不定时工时制"
ELSE a.WORKING_HOURS END as "WORKING_HOURS",
CASE WHEN a.type=0 THEN "派增-社保派单"
WHEN a.type =1 THEN "派增-无社保新签"
WHEN a.type =2 THEN "派增-续签"
......@@ -555,6 +563,12 @@
if(a.IN_USE = 0,'可用','不可用') IN_USE,
if(a.IS_FILE = 0,'有附件','无附件') FILES,
if(a.IS_FILE = 0,'已归档','未归档') IS_FILE,
max(a.CONTRACT_NO) CONTRACT_NO,
max(a.POST) POST,
CASE WHEN max(a.WORKING_HOURS)=1 THEN "标准工时"
WHEN max(a.WORKING_HOURS) =2 THEN "综合工时"
WHEN max(a.WORKING_HOURS) =3 THEN "不定时工时制"
ELSE max(a.WORKING_HOURS) END as "WORKING_HOURS",
a.CREATE_NAME,
CASE WHEN a.type=0 THEN "派增-社保派单"
WHEN a.type =1 THEN "派增-无社保新签"
......@@ -629,6 +643,7 @@
a.REASON,
a.TYPE,
a.LEAVE_DATE,
a.CONTRACT_NO,
a.REDUCE_REASON
FROM t_employee_contract_info a
<where>
......
......@@ -230,7 +230,7 @@
WHERE 1=1
<if test="idNameNoVo != null">
<if test="idNameNoVo.name != null and idNameNoVo.name.trim() != ''">
and a.CUSTOMER_NAME like concat('%', #{idNameNoVo.name} ,'%')
and (a.CUSTOMER_NAME like concat('%', #{idNameNoVo.name} ,'%') or a.CUSTOMER_NO like concat('%', #{idNameNoVo.name} ,'%'))
</if>
<if test="idNameNoVo.no != null and idNameNoVo.no.trim() != ''">
and a.CUSTOMER_NO = #{idNameNoVo.no}
......
......@@ -151,4 +151,7 @@ public interface CacheConstants {
String PAYMENT_DISPATCH_BATCH_REDUCE_IMPORT = "payment_dispatch_batch_reduce_import";
String PAYMENT_PRE_DISPATCH_BATCH_ADD_IMPORT = "payment_pre_dispatch_batch_add_import";
//社保公积金派单
String PAYMENT_DISPATCH_BATCH_IMPORT = "payment_dispatch_batch_import";
}
insurance.insuranceUrl=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#insurance.insuranceUrl=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
#insurance.insuranceUrl=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
insurance.insuranceUrl=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e
insurance.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a
insurance.insuranceDocStatus=20
......
ekp.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#ekp.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
#ekp.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekp.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
ekp.fdModelId=181d7633ff8bc797276d0d3a54e80ad6
ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183
ekp.docStatus=20
......
......@@ -317,9 +317,9 @@ public class InsurancesConstants {
*/
public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间";
/**
* 保单起止时间不能超过365天
* 保单起止时间不能超过一年
*/
public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过365天";
public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过一年";
/**
* 保单结束时间不能为空
*/
......@@ -413,9 +413,9 @@ public class InsurancesConstants {
*/
public static final String POLICY_NO_MORE_THAN_50 = "保单号长度超过50字符限制";
/**
* 发票号不能为空
* 保单号和发票号不可都为空
*/
public static final String INVOICE_NO_EMPTY = "发票号不能为空";
public static final String INVOICE_NO_EMPTY = "保单号和发票号不可都为空";
/**
* 变更原因不能为空
*/
......
......@@ -33,6 +33,11 @@ public class EkpUpdateParam implements Serializable {
*/
private String fd_3b5bf030ab1a56;
/**
* 保单号
*/
private String fd_3bb431933ee968;
/**
* 购买标准
*/
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author huyc
* @description 导出办理VO
* @date 2023-04-06 14:21:39
*/
@Data
@Schema(description = "导出办理VO")
public class InsuranceExportListOneVO implements Serializable {
private static final long serialVersionUID = -8159190612104775933L;
/**
* 主键
*/
private String id;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@JsonIgnore
private Integer buyHandleStatus;
/**
* 购买月数
*/
@Schema(description = "购买月数")
private Long buyMonth;
/**
* 购买天数
*/
@Schema(description = "购买天数")
private Long buyDay;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保单生效时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonIgnore
private LocalDate policyEffect;
/**
* 保险公司名称(冗余字段)
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 结算类型 (0、预估 1、实缴)
*/
@Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
}
......@@ -76,6 +76,12 @@ public class InsuranceRegisterInvoiceNoParam implements Serializable {
@Schema(description = "错误信息")
private String errorMessage;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
/**
* 数据传递对象
*/
......
......@@ -227,6 +227,21 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.getInsuranceExportList(param,mId);
}
/**
* 导出办理(新)
*
* @author huyc
* @param param
* @return {@link R<List<InsuranceExportListOneVO>>}
*/
@Operation(summary = "导出办理(新)", description = "导出办理(新)")
@PostMapping("/getInsuranceExportOneList")
@PreAuthorize("@pms.hasPermission('handle_insure_export')")
public R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(@RequestBody InsuranceExportListParam param,
@RequestParam(required = false) String mId) {
return tInsuranceDetailService.getInsuranceExportOneList(param,mId);
}
/**
* 投保退回
*
......
......@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import org.apache.ibatis.annotations.Mapper;
......@@ -77,6 +76,24 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
List<InsuranceExportListVO> getInsuranceExportList(@Param("param") InsuranceExportListParam param);
/**
* 导出办理勾选查询结果
*
* @author licancan
* @param idList
* @return {@link List<InsuranceExportListVO>}
*/
List<InsuranceExportListOneVO> getInsuranceExportOneListBySelect(@Param("idList") List<String> idList);
/**
* 导出办理非勾选查询结果
*
* @author licancan
* @param param
* @return {@link List< InsuranceExportListVO>}
*/
List<InsuranceExportListOneVO> getInsuranceExportOnetList(@Param("param") InsuranceExportListParam param);
/**
* 批量更新保单号
*
......
......@@ -143,6 +143,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param, String mId);
/**
* 导出办理(新)
*
* @author huyc
* @param param
* @return {@link R<List<InsuranceExportListVO>>}
*/
R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(InsuranceExportListParam param, String mId);
/**
* 投保退回
*
......
......@@ -959,6 +959,169 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return list;
}
/**
* 导出办理(新)
*
* @param param
* @return {@link List<InsuranceExportListOneVO>}
* @author huyc
*/
@Override
public R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(InsuranceExportListParam param, String mId) {
YifuUser user = SecurityUtils.getUser();
if (Common.isNotNull(mId)) {
param.setMId(mId);
}
param.setCreateBy(user.getId());
//设置updateBy字段是给导出使用的
param.setUpdateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<InsuranceExportListOneVO> insuranceExportList;
//如果是待投保状态,sql中HANDLED_BY过滤条件不需要,这里强制变为null
if(param.getBuyHandleStatus() == CommonConstants.ONE_INT){
param.setUpdateBy(null);
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){
insuranceExportList = baseMapper.getInsuranceExportOneListBySelect(param.getIdList());
}else {
insuranceExportList = baseMapper.getInsuranceExportOnetList(param);
}
if (CollectionUtils.isNotEmpty(insuranceExportList)){
List<TInsuranceDetail> detailList = new ArrayList<>();
//根据项目编码获取项目名称
List<String> collect = insuranceExportList.stream().map(InsuranceExportListOneVO::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
ProjectSetInfoVo jsonObject;
for (InsuranceExportListOneVO record : insuranceExportList) {
jsonObject = null;
if (data != null) {
jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//购买天数
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if (CommonConstants.THREE_INT == record.getBuyType()){
if (Objects.isNull(record.getPolicyEffect())){
record.setBuyMonth(null);
record.setBuyDay(null);
}else {
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyEffect().toString(),record.getPolicyEnd().toString()));
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyEffect().toString(),record.getPolicyEnd().toString()));
}
}
//如果是待投保,需要处理相关逻辑,投保中、投保成功只是单纯的导出
if(param.getBuyHandleStatus() == CommonConstants.ONE_INT){
TInsuranceDetail detail = new TInsuranceDetail();
detail.setId(record.getId());
//update状态由「待投保」置为「投保中」
detail.setBuyHandleStatus(CommonConstants.TWO_INT);
if (record.getBuyType() == CommonConstants.ONE_INT){
// if 投保类型 == 新增,then 更新保单生效日期为:T+1,无需考虑节假日
detail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
}
detail.setHandledBy(user.getId());
detail.setHandledTime(LocalDateTime.now());
detail.setUpdateBy(user.getId());
detail.setUpdateTime(LocalDateTime.now());
if (Common.isNotNull(jsonObject)){
detail.setDeptId(jsonObject.getId());
detail.setDeptName(jsonObject.getDepartName());
detail.setUnitId(jsonObject.getCustomerId());
detail.setUnitName(jsonObject.getCustomerName());
detail.setUnitNo(jsonObject.getCustomerCode());
}
detailList.add(detail);
}
}
}
//批量更新
if (CollectionUtils.isNotEmpty(detailList)){
this.saveOrUpdateBatch(detailList);
}
//操作记录
addOperate(detailList,user,InsurancesConstants.EXPORT,null,CommonConstants.ONE_INT);
//针对是替换类型的做处理,每一条替换数据对应一条被替换数据
List<InsuranceExportListOneVO> listVOS = insuranceExportList.stream().filter(e -> e.getBuyType() == CommonConstants.FOUR_INT).collect(Collectors.toList());
List<InsuranceExportListOneVO> list = new ArrayList<>();
if(CollectionUtils.isNotEmpty(listVOS)){
for (InsuranceExportListOneVO listVO : listVOS) {
listVO.setRemark(InsurancesConstants.INSERT);
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, listVO.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()){
TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId());
if (Optional.ofNullable(byId).isPresent()){
InsuranceExportListOneVO vo = new InsuranceExportListOneVO();
BeanCopyUtils.copyProperties(byId,vo);
if (StringUtils.isNotBlank(byId.getPolicyNo())){
listVO.setPolicyNo(byId.getPolicyNo());
}
//购买月数
vo.setBuyMonth(LocalDateUtil.betweenMonth(vo.getPolicyStart().toString(),vo.getPolicyEnd().toString()));
//购买天数
vo.setBuyDay(LocalDateUtil.betweenDay(vo.getPolicyStart().toString(),vo.getPolicyEnd().toString()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if (CommonConstants.THREE_INT == vo.getBuyType()){
if (Objects.isNull(vo.getPolicyEffect())){
vo.setBuyMonth(null);
vo.setBuyDay(null);
}else {
vo.setBuyMonth(LocalDateUtil.betweenMonth(vo.getPolicyEffect().toString(),vo.getPolicyEnd().toString()));
vo.setBuyDay(LocalDateUtil.betweenDay(vo.getPolicyEffect().toString(),vo.getPolicyEnd().toString()));
}
}
vo.setRemark(InsurancesConstants.QUIT);
vo.setBuyType(CommonConstants.FOUR_INT);
vo.setProjectName(byId.getDeptName());
list.add(vo);
}
}
}
if (CollectionUtils.isNotEmpty(list)){
//根据项目编码获取项目名称
List<String> collectList = list.stream().map(InsuranceExportListOneVO::getDeptNo).distinct().collect(Collectors.toList());
try{
R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList);
if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodesList.getData().getProjectSetInfoVoMap();
if (data != null) {
for (InsuranceExportListOneVO record : list) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
}
}
}catch (Exception e){
for (InsuranceExportListOneVO record : list) {
record.setProjectName(CommonConstants.EMPTY_STRING);
record.setInvoiceTitle(CommonConstants.EMPTY_STRING);
}
log.error(InsurancesConstants.GET_DEPT_DETAIL_ERROR+e);
}
insuranceExportList.removeAll(listVOS);
insuranceExportList.addAll(crossMergerOne(list,listVOS));
}
}
}
return R.ok(insuranceExportList);
}
/**
* 导出办理
*
......@@ -991,12 +1154,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceExportList = baseMapper.getInsuranceExportList(param);
}
if (CollectionUtils.isNotEmpty(insuranceExportList)){
/*if(insuranceExportList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}*/
List<TInsuranceDetail> detailList = new ArrayList<>();
//根据项目编码获取项目名称
List<String> collect = insuranceExportList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
List<String> collect = insuranceExportList.stream().map(InsuranceExportListVO::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
......@@ -1095,7 +1255,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
if (CollectionUtils.isNotEmpty(list)){
//根据项目编码获取项目名称
List<String> collectList = list.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
List<String> collectList = list.stream().map(InsuranceExportListVO::getDeptNo).distinct().collect(Collectors.toList());
try{
R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList);
if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) {
......@@ -2096,32 +2256,52 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceRegisterInvoiceNoParam> listSuccess = operateList.stream().filter(e-> e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS)).collect(Collectors.toList());
List<TInsuranceDetail> detailList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(listSuccess)){
boolean invoiceNoFlag = false;
boolean policeNoFlag = false;
String invoiceNoInfo = "";
String policeNoInfo = "";
for (InsuranceRegisterInvoiceNoParam success : listSuccess) {
TInsuranceDetail detail = success.getDetail();
if (Optional.ofNullable(detail).isPresent()){
//当两次发票号不一致时才更新
if (!success.getInvoiceNo().equals(detail.getInvoiceNo())){
//只有当结算id存在的时候修改数据才会推给ekp
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
try {
//推送修改信息
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStart());
ekpUpdateParam.setFd_3b5bf02e1d47cc(success.getPolicyEnd());
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(detail.getBuyType()));
//判断本地更新了保单号还是发票号还是两个都更新了
//当两次发票号不一致时
if (Common.isNotNull(success.getInvoiceNo()) && !success.getInvoiceNo().equals(detail.getInvoiceNo())){
invoiceNoFlag = true;
invoiceNoInfo = ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo();
detail.setInvoiceNo(success.getInvoiceNo());
}
//当两次保单号不一致时
if (Common.isNotNull(success.getPolicyNo()) && !success.getPolicyNo().equals(detail.getPolicyNo())){
policeNoFlag = true;
policeNoInfo = ";变更前保单号:" + detail.getPolicyNo() + ";变更后保单号:" + success.getPolicyNo();
detail.setPolicyNo(success.getPolicyNo());
}
detailList.add(detail);
//当两次发票号或发票号不一致时才更新
if ((policeNoFlag || invoiceNoFlag) && StringUtils.isNotBlank(detail.getDefaultSettleId())){
try {
//推送修改信息
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStart());
ekpUpdateParam.setFd_3b5bf02e1d47cc(success.getPolicyEnd());
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(detail.getBuyType()));
if (invoiceNoFlag) {
ekpUpdateParam.setFd_3b5bf030ab1a56(success.getInvoiceNo());
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId());
ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:"+user.getNickname() + ";操作时间:"+LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error registeredInvoiceNo:",e.getMessage());
} else {
ekpUpdateParam.setFd_3b5bf030ab1a56(detail.getInvoiceNo());
}
if (policeNoFlag) {
ekpUpdateParam.setFd_3bb431933ee968(success.getPolicyNo());
} else {
ekpUpdateParam.setFd_3bb431933ee968(detail.getPolicyNo());
}
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId());
ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:" + user.getNickname() + ";操作时间:" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + invoiceNoInfo + policeNoInfo);
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
} catch (Exception e) {
log.error("pushEkp error registeredInvoiceNo:", e.getMessage());
}
//设置发票号
detail.setInvoiceNo(success.getInvoiceNo());
detailList.add(detail);
}
}
}
......@@ -2520,7 +2700,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
if (LocalDateUtil.betweenDay(param.getPolicyStart(),param.getPolicyEnd()) > CommonConstants.ONE_YEAR){
if (DateUtil.getDateStr(DateUtil.stringToDate(param.getPolicyStart()),1).compareTo(param.getPolicyEnd().replaceAll("-","")) < CommonConstants.ZERO_INT) {
param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365);
listResult.add(param);
continue;
......@@ -3245,7 +3425,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
if (LocalDateUtil.betweenDay(param.getPolicyStart(),param.getPolicyEnd()) > CommonConstants.ONE_YEAR){
//日期比较
if (DateUtil.getDateStr(DateUtil.stringToDate(param.getPolicyStart()),1).compareTo(param.getPolicyEnd().replaceAll("-","")) < CommonConstants.ZERO_INT){
param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365);
listResult.add(param);
continue;
......@@ -3760,7 +3941,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EMPTY);
continue;
}
if (StringUtils.isBlank(param.getInvoiceNo())){
if (StringUtils.isBlank(param.getInvoiceNo()) || StringUtils.isBlank(param.getPolicyNo())){
param.setErrorMessage(InsurancesConstants.INVOICE_NO_EMPTY);
continue;
}
......@@ -4092,6 +4273,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return list;
}
/**
* 将集合交叉合并,list1 是第一个顺序 list2 是第二个顺序
*
* @author huyc
* @param list1
* @param list2
* @return {@link List<InsuranceExportListOneVO>}
*/
private List<InsuranceExportListOneVO> crossMergerOne (List<InsuranceExportListOneVO> list1, List<InsuranceExportListOneVO> list2){
//将list放入到链表队列
LinkedList<InsuranceExportListOneVO> st1 = new LinkedList<>(list1);
LinkedList<InsuranceExportListOneVO> st2 = new LinkedList<>(list2);
//计算较大的数组长度
int max = list1.size() > list2.size() ? list1.size() : list2.size();
//新建一个最终结果的list
List<InsuranceExportListOneVO> list = new ArrayList<>(list1.size() + list2.size());
for ( int i = 0; i < max;i++){
//如果队列没取完,继续取
if (!st1.isEmpty()){
list.add(st1.poll());
}
//如果队列没取完,继续取
if (!st2.isEmpty()){
list.add(st2.poll());
}
}
return list;
}
/***********************减员办理********************************/
/**
......
......@@ -461,6 +461,101 @@
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<!--导出办理勾选查询结果-->
<select id="getInsuranceExportOneListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListOneVO">
select a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.BUY_HANDLE_STATUS as buyHandleStatus,
a.POST as post,
a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a.INSURANCE_CITY_NAME as insuranceCityName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.ACTUAL_PREMIUM as actualPremium,
a.SETTLE_MONTH as settleMonth,
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
ORDER BY a.CREATE_TIME DESC
</select>
<!--出办理非勾选查询结果-->
<select id="getInsuranceExportOnetList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListOneVO">
select a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.POST as post,
a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a.INSURANCE_CITY_NAME as insuranceCityName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.ACTUAL_PREMIUM as actualPremium,
a.SETTLE_MONTH as settleMonth,
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and a.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyType != null">
and a.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.updateBy != null and param.updateBy.trim() != ''">
and a.HANDLED_BY = #{param.updateBy}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
<if test="param.buyStandardMin != null">
AND a.BUY_STANDARD <![CDATA[ >= ]]> #{param.buyStandardMin}
</if>
<if test="param.buyStandardMax != null">
AND a.BUY_STANDARD <![CDATA[ <= ]]> #{param.buyStandardMax}
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<!--批量更新保单号-->
<update id="updatePolicyNoBatch">
<foreach collection="details" index="index" item="item" separator=";">
......
......@@ -67,10 +67,9 @@ public class TSalaryStandardIssueRes implements Serializable {
@Schema(description = "薪资主表id")
private String salaryId;
/**
* money
* money 2023-4-4 11:11:56 hgw 去掉了金额限制,mvp1.5.3版本
*/
@ExcelAttribute(name = "money", isNotEmpty = true, errorInfo = "money不能为空")
@NotBlank(message = "money不能为空")
@ExcelAttribute(name = "money")
@ExcelProperty("money")
@Schema(description = "money")
private BigDecimal money;
......
......@@ -106,4 +106,15 @@ public class TSalaryAccountExportVo {
private BigDecimal costReduction;
@ExcelProperty("表单上传人")
private String createName;
@ExcelProperty("个人代扣明细")
private String pdeductionDetail;
@ExcelProperty("个人代扣金额")
private String pdeductionMoney;
/**
* 支出信息结算状态 0 已结算 1 结算中 2 未结算
*/
@Schema(description = "支出信息结算状态")
private String paySettleFlag;
}
......@@ -396,5 +396,20 @@ public class TSalaryAccountController {
wp.setSalary(salary.divide(new BigDecimal(realMonthCount), SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP));
return wp;
}
/**
* 报账跨年查询导出
* @author hgw
* @date 2023-3-30 15:36:00
**/
@Operation(description = "报账跨年查询导出 hasPermission('account_all_year_export')")
@PostMapping("/allYearExport")
@PreAuthorize("@pms.hasPermission('account_all_year_export')")
public R<List<TSalaryAccount>> allYearExport(@RequestBody TSalaryAccountSearchVo tSalaryAccount) {
if (Common.isEmpty(tSalaryAccount.getEmpIdcard())) {
return R.failed("身份证不可为空!");
}
return R.ok(tSalaryAccountService.allYearExport(tSalaryAccount));
}
}
......@@ -184,4 +184,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
, @Param("emIdCard") String emIdCard, @Param("settleDepartId") String settleDepartId);
TSalaryAccountSumVo getAccountSumBySalaryId(@Param("salaryId") String salaryId);
/**
* @param tSalaryAccount
* @Description: 报账按身份证导出,可以导出2个报账年份表
* @Author: hgw
* @Date: 2023/3/31 15:14
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List<TSalaryAccount> allYearExport(@Param("tSalaryAccount") TSalaryAccountSearchVo tSalaryAccount);
}
......@@ -205,4 +205,6 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSumVo
**/
TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId);
List<TSalaryAccount> allYearExport(TSalaryAccountSearchVo tSalaryAccount);
}
......@@ -199,9 +199,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (Common.isEmpty(res.getIssueId())) {
return R.failed("代发户配置id不可为空");
}
if (Common.isEmpty(res.getMoney())) {
return R.failed("代发户金额不可为空");
}
if (Common.isEmpty(res.getBankName())) {
return R.failed("代发户开户行不可为空");
}
......
......@@ -379,4 +379,9 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
public TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId) {
return baseMapper.getAccountSumBySalaryId(salaryId);
}
@Override
public List<TSalaryAccount> allYearExport(TSalaryAccountSearchVo tSalaryAccount) {
return baseMapper.allYearExport(tSalaryAccount);
}
}
......@@ -541,7 +541,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
fd3b71f20933e0d2.add("");
}
fd3b745c35ff27a8.add(res.getBankName());
fd3b73a736cc9cc8.add(String.valueOf(res.getMoney()));
if (Common.isNotNull(res.getMoney())) {
fd3b73a736cc9cc8.add(String.valueOf(res.getMoney()));
} else {
fd3b73a736cc9cc8.add("");
}
}
sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f207c0cfd0", fd3b71f207c0cfd0);
sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f20883301a", fd3b71f20883301a);
......
......@@ -802,16 +802,20 @@
a.SUM_PRIVATE_PENSION as sumPrivatePension,
a.SUM_SUPPORT_ELDERLY_MONEY as sumSupportElderlyMoney,
a.COST_REDUCTION as costReduction,
a.CREATE_NAME as createName
a.CREATE_NAME as createName,
GROUP_CONCAT(pdeduction.CN_NAME,':',pdeduction.SALARY_MONEY,';') pdeductionDetail,
sum(ifnull(pdeduction.SALARY_MONEY,0)) pdeductionMoney,
if(a.PAY_SETTLE_FLAG = '0','已结算',if(a.PAY_SETTLE_FLAG = '1','结算中',if(a.PAY_SETTLE_FLAG = '2','未结算','-'))) paySettleFlag
from
t_salary_account a
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
left join t_salary_account_item pdeduction on pdeduction.SALARY_ACCOUNT_ID = a.id and pdeduction.JAVA_FIED_NAME='pdeduction'
<where>
a.DELETE_FLAG = 0
<include refid="where_export"/>
ORDER BY a.CREATE_TIME desc
GROUP BY a.EMP_IDCARD ORDER BY a.CREATE_TIME desc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
......@@ -1180,4 +1184,34 @@
left join t_salary_account_item enterpriseAnnuityUnit on enterpriseAnnuityUnit.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuityUnit.JAVA_FIED_NAME='enterpriseAnnuityUnit'
where a.DELETE_FLAG='0' and a.SALARY_FORM_ID = #{salaryId}
</select>
<!-- 根据idList获取报账信息 -->
<select id="allYearExport" resultMap="tSalaryAccountMap">
select * from (
select
a.id,a.DEPT_NAME,a.DEPT_NO,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.BANK_NO
,a.BANK_NAME,a.BANK_PROVINCE,a.BANK_CITY,a.BANK_SUB_NAME,a.FORM_TYPE
,a.SALARY_MONTH,a.SETTLEMENT_MONTH,a.RELAY_SALARY,a.ACTUAL_SALARY,a.SALARY_TAX
FROM
t_salary_account a
where a.DELETE_FLAG = 0 AND a.EMP_IDCARD = #{tSalaryAccount.empIdcard}
union all
select
a.id,a.DEPT_NAME,a.DEPT_NO,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.BANK_NO
,a.BANK_NAME,a.BANK_PROVINCE,a.BANK_CITY,a.BANK_SUB_NAME,a.FORM_TYPE
,a.SALARY_MONTH,a.SETTLEMENT_MONTH,relaySalary.SALARY_MONEY RELAY_SALARY
,actualSalarySum.SALARY_MONEY ACTUAL_SALARY,salaryTax.SALARY_MONEY SALARY_TAX
FROM
t_salary_account_hro_2021 a
left join t_salary_account_item_hro_2021 relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
left join t_salary_account_item_hro_2021 actualSalarySum on actualSalarySum.SALARY_ACCOUNT_ID = a.id and actualSalarySum.JAVA_FIED_NAME='actualSalarySum'
left join t_salary_account_item_hro_2021 salaryTax on salaryTax.SALARY_ACCOUNT_ID = a.id and salaryTax.JAVA_FIED_NAME='salaryTax'
where a.DELETE_FLAG = 0 AND a.EMP_IDCARD = #{tSalaryAccount.empIdcard}
) a
where 1=1
<include refid="tSalaryAccount_where"/>
</select>
</mapper>
......@@ -4,12 +4,15 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* @Author fxj
......@@ -171,6 +174,27 @@ public class FundHandleExportVo implements Serializable {
@ExcelProperty("委托备注" )
private String fundTrustRemark;
/**
* 离职日期
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "离职日期", isDate = true)
@Schema(description = "离职日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职日期" )
private Date leaveDate;
/**
* 离职原因
*/
@Length(max = 32, message = "离职原因 不能超过32个字符" )
@ExcelAttribute(name = "离职原因", maxLength = 32,isNotEmpty = true, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "离职原因" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职原因" )
private String reduceReason;
/*******************************导出字段结束*************************************************/
}
......@@ -40,7 +40,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
......@@ -3364,34 +3366,49 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override
public R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus,
String handleRemark, String socialType, String remark) {
YifuUser user = SecurityUtils.getUser();
if (null == user) {
return R.failed(CommonConstants.USER_FAIL);
}
if (Common.isEmpty(ids)) {
return R.failed(DispatchConstants.DISPATCH_ID_NOT_EMPTY);
}
int flag;
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
//办理成功
flag = CommonConstants.ZERO_INT;
} else if (CommonConstants.TWO_STRING.equals(handleStatus)) {
//办理失败
flag = CommonConstants.ONE_INT;
} else {
return R.failed("派单办理状态参数异常:0待办理 1办理通过 2办理不通过");
}
String key = CacheConstants.PAYMENT_DISPATCH_BATCH_IMPORT + CommonConstants.DOWN_LINE_STRING +user.getId() ;
// 获取redis分布式事务锁
String requestId;
try {
YifuUser user = SecurityUtils.getUser();
if (null == user) {
return R.failed(CommonConstants.USER_FAIL);
}
if (Common.isEmpty(ids)) {
return R.failed(DispatchConstants.DISPATCH_ID_NOT_EMPTY);
}
int flag;
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
//办理成功
flag = CommonConstants.ZERO_INT;
} else if (CommonConstants.TWO_STRING.equals(handleStatus)) {
//办理失败
flag = CommonConstants.ONE_INT;
} else {
return R.failed("派单办理状态参数异常:0待办理 1办理通过 2办理不通过");
}
List<ErrorMessage> errorInfo = addBatchApplyHandle(ids, typeSub, user, flag, handleStatus,
Common.isNullToString(handleRemark), socialType,remark);
if (errorInfo == null || errorInfo.isEmpty()) {
return R.ok(null,"办理成功!");
} else {
return R.ok(errorInfo,"派单办理结果:");
}
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
log.error(DispatchConstants.DISPATCH_EXCEPTION + e.getMessage());
return R.failed("数据异常,办理失败!");
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
if (Common.isNotNull(requestId)) {
try {
List<ErrorMessage> errorInfo = addBatchApplyHandle(ids, typeSub, user, flag, handleStatus,
Common.isNullToString(handleRemark), socialType, remark);
if (errorInfo == null || errorInfo.isEmpty()) {
return R.ok(null, "办理成功!");
} else {
return R.ok(errorInfo, "派单办理结果:");
}
} catch (Exception e) {
log.error(DispatchConstants.DISPATCH_EXCEPTION + e.getMessage());
return R.failed("数据异常,办理失败!");
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}
......
......@@ -564,7 +564,7 @@
AND a.CREATE_NAME = #{tDispatchInfo.createName}
</if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME like CONCAT(#{tDispatchInfo.settleDomainName}, '%')
AND a.SOCIAL_HOUSEHOLD_NAME like CONCAT(#{tDispatchInfo.socialHouseholdName}, '%')
</if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME like CONCAT(#{tDispatchInfo.providentHouseholdName}, '%')
......@@ -949,6 +949,8 @@
<result property="fundTown" column="FUND_TOWN"/>
<result property="belongUnit" column="BELONG_UNIT_NAME"/>
<result property="fundTrustRemark" column="TRUST_REMARK"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
</resultMap>
<!--tDispatchInfo 社保花名册数据查询-->
......@@ -1065,7 +1067,9 @@
f.FUND_PROVINCE,
f.FUND_CITY,
f.FUND_TOWN,
a.TRUST_REMARK
a.TRUST_REMARK,
a.LEAVE_DATE,
a.REDUCE_REASON
<include refid="where_getFundRecord"/>
</select>
......
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