Commit 59616944 authored by hongguangwu's avatar hongguangwu

Merge branch 'develop'

# Conflicts:
#	yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TCompleteMonitorVo.java
parents 0447abe9 1805cdb5
......@@ -455,6 +455,7 @@ public class TEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankName;
/**
* 开户行省
......@@ -462,6 +463,7 @@ public class TEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankProvince;
/**
* 开户行市
......@@ -469,6 +471,7 @@ public class TEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankCity;
/**
* 开户行支行
......@@ -477,6 +480,7 @@ public class TEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankSubName;
/**
* 银行卡号
......@@ -485,6 +489,7 @@ public class TEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankNo;
/**
* 计税月份
......@@ -493,6 +498,7 @@ public class TEmployeeInfo extends BaseEntity {
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String taxMonth;
/**
* 通信地址省
......
......@@ -420,6 +420,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankName;
/**
* 开户行省
......@@ -427,6 +428,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankProvince;
/**
* 开户行市
......@@ -434,6 +436,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankCity;
/**
* 开户行支行
......@@ -442,6 +445,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankSubName;
/**
* 银行卡号
......@@ -450,6 +454,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankNo;
/**
* 计税月份
......
......@@ -220,6 +220,17 @@ public class EmpContractDispatchVo implements Serializable {
@Schema(description = "客户名称", name = "subjectUnit")
private String subjectUnit;
/**
* 试用期(单位月)
*/
@Length(max = 4, message = "试用期 不能超过4 个字符" )
@ExcelAttribute(name = "试用期", maxLength = 32)
@Schema(description = "试用期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("试用期" )
@ExcelIgnore
private String tryPeriod;
/**
* 合同年限
*/
......
......@@ -100,28 +100,28 @@ public class TCompleteMonitorVo implements Serializable {
private String completePer;
/**
* 6月及后入职人数
* 10月及后入职人数
*/
@ExcelAttribute(name = "8月及后入职人数")
@Schema(description = "8月及后入职人数")
@ExcelProperty("8月及后入职人数")
@ExcelAttribute(name = "10月及后入职人数")
@Schema(description = "10月及后入职人数")
@ExcelProperty("10月及后入职人数")
private Integer afterEmployment;
/**
* 6月及后入职信息是否完整
* 10月及后入职信息是否完整
*/
@Length(max = 1, message = "8月及后入职信息是否完整 不能超过1 个字符")
@ExcelAttribute(name = "8月及后入职信息是否完整", maxLength = 1, readConverterExp = "0=是,1=否")
@Schema(description = "8月及后入职信息是否完整")
@ExcelProperty("8月及后入职信息是否完整")
@Length(max = 1, message = "10月及后入职信息是否完整 不能超过1 个字符")
@ExcelAttribute(name = "10月及后入职信息是否完整", maxLength = 1, readConverterExp = "0=是,1=否")
@Schema(description = "10月及后入职信息是否完整")
@ExcelProperty("10月及后入职信息是否完整")
private String afterIsComplete;
/**
* 6月及后入职信息不完整人数
* 10月及后入职信息不完整人数
*/
@ExcelAttribute(name = "8月及后入职信息不完整人数")
@Schema(description = "8月及后入职信息不完整人数")
@ExcelProperty("8月及后入职信息不完整人数")
@ExcelAttribute(name = "10月及后入职信息不完整人数")
@Schema(description = "10月及后入职信息不完整人数")
@ExcelProperty("10月及后入职信息不完整人数")
private Integer afterIncompleteNum;
/**
......
......@@ -441,7 +441,7 @@ public class TEmployeeInfoController {
@Operation(summary = "通过EMP_ID查询人员档案变更日志", description = "通过EMP_ID查询人员档案变更日志")
@Inner
@PostMapping("/inner/updateEmpInfo")
public Boolean updateEmpInfo(@RequestBody UpdateEmpVo vo) {
public Boolean updateEmpInfo(@RequestBody UpdateEmpVo vo) throws IllegalAccessException {
return tEmployeeInfoService.updateEmpInfo(vo);
}
......
......@@ -195,7 +195,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
EmpDispatchAddVo addDispatchInfo(EmpDispatchAddVo addVo);
Boolean updateEmpInfo(UpdateEmpVo vo);
Boolean updateEmpInfo(UpdateEmpVo vo) throws IllegalAccessException;
Boolean checkMobile(String mobile);
......
......@@ -10,10 +10,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.vo.AreaMap;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TArchivesExportLimitMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TArchivesLimitMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.*;
import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.utils.ExcelStyle;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
......@@ -69,7 +66,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
// 员工家庭信息表
private final TEmpFamilyService tEmpFamilyService;
// 人员档案表
private final TEmployeeInfoService tEmployeeInfoService;
private final TEmployeeInfoMapper tEmployeeInfoMapper;
// 项目档案表
private final TEmployeeProjectService tEmployeeProjectService;
// 员工职业资格信息表
......@@ -756,7 +753,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
List<TEmpFamily> tEmpFamily = tEmpFamilyService.getListByEmpId(id);
vo.setTEmpFamilyList(tEmpFamily);
// 人员档案表
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(id);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(id);
vo.setTEmployeeInfo(tEmployeeInfo);
// 项目档案表
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getByEmpIdAndDeptId(id,deptId);
......
......@@ -85,6 +85,7 @@ import java.lang.reflect.Field;
import java.net.URL;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
......@@ -129,9 +130,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private final TArchivesLimitMapper tArchivesLimitMapper;
private final AtomicInteger updateAtomicInteger = new AtomicInteger(0);
private final TCompleteMonitorService completeMonitorService;
@Autowired
private OSSUtil ossUtil;
ExcelUtil<Object> excelUtil = new ExcelUtil<>(Object.class);
@Override
public IPage<TEmployeeInfo> getPage(Page<TEmployeeInfo> page, TEmployeeInfo employeeInfo) {
return baseMapper.getPage(page, employeeInfo);
......@@ -2517,7 +2522,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
* @Param
**/
@Override
public Boolean updateEmpInfo(UpdateEmpVo vo) {
public Boolean updateEmpInfo(UpdateEmpVo vo) throws IllegalAccessException {
if (Common.isNotNull(vo)) {
TEmployeeInfo employeeInfo = null;
TEmployeeProject p = null;
......@@ -2544,7 +2549,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(p)) {
p.setStatus(CommonConstants.ONE_INT);
tEmployeeProjectService.updateById(p);
}
}
}
......@@ -2583,9 +2587,31 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
contractAuditMapper.insert(contractAudit);
contractServicer.updateById(c);
if (Common.isNotNull(p)) {
//审核通过更新项目档案合同信息
if (Common.isEmpty(p.getContractType())) {
p.setContractType(excelUtil.getDicValueByDataType(c.getContractName(), ExcelAttributeConstants.PERSONNEL_TYPE));
}
if (Common.isEmpty(p.getPost())) {
p.setPost(c.getPost());
}
if (Common.isEmpty(p.getWorkingHours())) {
p.setWorkingHours(c.getWorkingHours());
}
if (Common.isEmpty(p.getTryPeriod())) {
p.setTryPeriod(null == c.getTryPeriod() ? "无" : c.getTryPeriod());
}
if (Common.isEmpty(p.getEnjoinDate())) {
p.setEnjoinDate(null != c.getContractStart() ? c.getContractStart().toInstant().atZone(ZoneId.systemDefault()).toLocalDate() : null);
}
}
}
}
if (Common.isNotNull(p)) {
tEmployeeProjectService.updateById(p);
}
}
}
return true;
......
......@@ -203,9 +203,9 @@
if(sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) > 0,1,0) as IS_COMPLETE,
sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) as INCOMPLETE_NUM,
concat(ROUND((sum(if(PROJECT_STATUS = 0,1,0)) - sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)))*100/sum(if(PROJECT_STATUS = 0,1,0)),2),'%') as COMPLETE_PER,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-10-01',1,0)) as AFTER_EMPLOYMENT,
if(sum(if((PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-10-01' and IS_COMPLETE = '0') or '2024-10-01' > DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') or PROJECT_STATUS = 1,0,1)) > 0,1,0) AFTER_IS_COMPLETE,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-10-01' and IS_COMPLETE = '1',1,0)) as AFTER_INCOMPLETE_NUM
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-07-01',1,0)) as AFTER_EMPLOYMENT,
if(sum(if((PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-07-01' and IS_COMPLETE = '0') or '2024-07-01' > DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') or PROJECT_STATUS = 1,0,1)) > 0,1,0) AFTER_IS_COMPLETE,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-07-01' and IS_COMPLETE = '1',1,0)) as AFTER_INCOMPLETE_NUM
from t_employee_project where DELETE_FLAG = '0' and PROJECT_STATUS = 0 group by DEPT_NO) a on a.DEPT_NO = b.DEPART_NO
where b.DELETE_FLAG = '0'
<if test="deptNo != null and deptNo.trim() != ''">
......
package com.yifu.cloud.plus.v1.ekp.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
/**
* @auther huyc
* @date 2024/5/24
* 聚富通基本配置
*/
@RefreshScope
@ConfigurationProperties(prefix = "icbcissue")
@Data
public class IcbcIssueConfigProperties {
/**
* @Description: 聚富通分配的接入id
**/
private String appId;
/**
* @Description: 聚富通分配的应用方私钥
**/
private String appPrivateKey;
/**
* @Description: 网关公钥
**/
private String apigwPublicKey;
/**
* @Description: 企业编号
**/
private String companyNo;
/**
* @Description: 应用方加密串
**/
private String aesKey;
private String caSm;
private String caSmIcbc;
}
......@@ -52,28 +52,28 @@ public class IcbcTransactionFlowIssueController {
}
/**
* 企业会员用户绑定管家卡
* 代发工资发放成功异步通知功能
*
* @param
* @param
* @return
*/
@Operation(summary = "企业会员用户绑定管家卡", description = "企业会员用户绑定管家卡")
@PostMapping("/business")
public R businessOpen() {
return icbcTransactionFlowIssueService.businessOpen();
@Operation(summary = "代发工资发放成功异步通知功能", description = "代发工资发放成功异步通知功能")
@PostMapping("/notifyUrl")
public R asyncNotice(HttpServletRequest request) throws Exception {
return icbcTransactionFlowIssueService.asyncNotice(request);
}
/**
* 代发工资发放成功异步通知功能
* 行名行号查询接口
*
* @param
* @param
* @return
*/
@Operation(summary = "代发工资发放成功异步通知功能", description = "代发工资发放成功异步通知功能")
@PostMapping("/notifyUrl")
public R asyncNotice(HttpServletRequest request) throws Exception {
return icbcTransactionFlowIssueService.asyncNotice(request);
@Operation(summary = "行名行号查询接口", description = "行名行号查询接口")
@PostMapping("/querybankinfo")
public R querybankinfo() {
return icbcTransactionFlowIssueService.querybankinfo();
}
}
......@@ -90,7 +90,6 @@ public class IcbcTransactionFlowQueryController {
return icbcTransactionFlowQueryService.saveIcbcManagerCard();
}
/**
* 行名行号查询接口
*
......
......@@ -14,12 +14,30 @@ import javax.servlet.http.HttpServletRequest;
*/
public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> {
/**
* @Description: 代发任务确认提交
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
R submitIcbcTransactionFlow();
/**
* @Description: 代发任务批次明细查询
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
R selectIcbcTransactionFlowInfo();
R businessOpen();
R asyncNotice(HttpServletRequest request) throws Exception;
/**
* @Description: 根据银行卡号查询银行信息
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
R querybankinfo();
}
......@@ -21,6 +21,12 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo>
R saveIcbcManagerCard();
/**
* @Description: 根据银行卡号查询银行信息
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
R querybankinfo();
}
......@@ -40,7 +40,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 聚富通到账通知交易流水查询
......@@ -327,6 +326,12 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
}
/**
* @Description: 根据银行卡号查询银行信息
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
@Override
public R querybankinfo() {
......@@ -345,7 +350,9 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
MybankEnterpriseAccountQuerybankinfoRequestV1 request = new MybankEnterpriseAccountQuerybankinfoRequestV1();
// 请对照接口文档用bizContent.setxxx()方法对业务上送数据进行赋值
bizContent.setTransCode("QBKNC");
bizContent.setTranDate("20240821");
// 当天
String nowDate = DateUtil.getThisDay();
bizContent.setTranDate(nowDate);
bizContent.setTranTime("103231001");
bizContent.setLanguage("zh_CN");
bizContent.setfSeqNo("AHWX"+ System.currentTimeMillis());
......
......@@ -397,5 +397,11 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description = "消息提醒备注")
private String expireRemark;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -79,4 +79,10 @@ public class TInsuranceType extends BaseEntity {
@Schema(description = "是否删除 0否/1是")
private Integer deleteFlag;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
\ No newline at end of file
......@@ -196,4 +196,10 @@ public class InsuranceAddParam implements Serializable {
@Schema(description ="客户编码")
private String unitNo;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -203,4 +203,10 @@ public class InsuranceBatchParam implements Serializable {
@Schema(description ="客户编码")
private String unitNo;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -406,4 +406,10 @@ public class InsuranceDetailVO implements Serializable {
*/
@Schema(description = "消息提醒备注")
private String expireRemark;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -176,4 +176,9 @@ public class InsuranceExportListOneVO implements Serializable {
@Schema(description = "封面抬头")
private String invoiceTitle;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -92,4 +92,10 @@ public class InsuranceExportListParam extends BaseEntity implements Serializable
*/
@Schema(description = "购买标准结束")
private Integer buyStandardMax;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -188,4 +188,10 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = "封面抬头")
private String invoiceTitle;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -120,4 +118,10 @@ public class InsuranceListParam extends BaseEntity {
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -2,8 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -171,4 +169,10 @@ public class InsuranceListVO implements Serializable {
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -120,4 +120,10 @@ public class InsuranceRefundHandlingParam extends BaseEntity implements Serializ
@Schema(description = "购买标准区间最大值")
private String buyStandardMax;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -215,4 +215,10 @@ public class InsuranceRefundListVo implements Serializable {
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -103,4 +103,10 @@ public class InsuranceRefundParam extends BaseEntity implements Serializable {
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -133,4 +133,10 @@ public class InsuranceReplaceParam implements Serializable {
@Schema(description ="客户编码")
private String unitNo;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author huych
* @description 险种信息返回类
* @date 2024-10-30 10:26:33
*/
@Data
public class InsuranceTypeExportVo {
private static final long serialVersionUID = 1L;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String name;
/**
* 所属保险公司名称
*/
@Schema(description = "所属保险公司名称")
private String insuranceCompanyName;
/**
* 收款银行名称
*/
@Schema(description = "收款银行名称")
private String bankName;
/**
* 收款银行账号
*/
@Schema(description = "收款银行账号")
private String bankNo;
/**
* 收款单位名称
*/
@Schema(description = "收款单位名称")
private String receiptUnitName;
/**
* 购买年龄限制 0 限制 1 不限制
*/
@Schema(description = "购买年龄限制")
private String ageLimit;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -15,6 +15,8 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* @author zhaji
* @description 已投保查询返回类
......@@ -400,4 +402,12 @@ public class InsuredListVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "替换人封面抬头")
private String replaceInvoiceTitle;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "是否地市自购")
private String isAdress;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -148,4 +150,10 @@ public class InsuredParam extends BaseEntity implements Serializable {
@Schema(description ="客户编码")
private String unitNo;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -75,4 +75,10 @@ public class RefundExportListParam extends BaseEntity implements Serializable {
@Schema(description = "购买标准结束")
private String buyStandardMax;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -222,4 +222,10 @@ public class RefundExportListVo implements Serializable {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "派单日期")
private LocalDateTime createTime;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -8,6 +8,7 @@ import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author zhangyun
* @description 退保成功列表
......@@ -107,4 +108,10 @@ public class RefundListVo implements Serializable {
*/
@Schema(description = "退至员工身份证号")
private String returnEmpIdcardNo;
/**
* 是否地市自购0是 1 否
*/
@Schema(description = "是否地市自购")
private String isAdress;
}
......@@ -43,6 +43,17 @@ public class TInsuranceTypeController {
return R.ok(insuranceTypeService.pageDiy(page, insuranceType));
}
/**
* 导出查询
* @param insuranceType 险种
* @return
*/
@Operation(summary = "导出查询", description = "导出查询")
@PostMapping("/export" )
public R exportInsuranceType(@RequestBody InsuranceTypeVo insuranceType) {
return insuranceTypeService.selectInsuranceType(insuranceType);
}
/**
* 新增险种
* @param insuranceType 险种明细
......
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeExportVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -48,6 +49,8 @@ public interface TInsuranceTypeMapper extends BaseMapper<TInsuranceType> {
*/
IPage<InsuranceTypeVo> selectInsuranceTypePage(Page page, @Param("insuranceType") InsuranceTypeVo insuranceType);
List<InsuranceTypeExportVo> selectInsuranceType(@Param("insuranceType") InsuranceTypeVo insuranceType);
InsuranceTypeVo getInsuranceTypeDetailById(String id);
}
......@@ -26,6 +26,13 @@ public interface TInsuranceTypeService extends IService<TInsuranceType> {
*/
IPage<InsuranceTypeVo> pageDiy(Page<InsuranceTypeVo> page,InsuranceTypeVo insuranceType);
/**
* 险种批量导出
* @author huych
* @param insuranceType 查询参数
*/
R selectInsuranceType(InsuranceTypeVo insuranceType);
/**
* 新增险种信息
*
......
......@@ -469,6 +469,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//保存到数据库中的结果
List<InsuranceReplaceParam> listSuccess = map.get("listSuccess");
List<TInsuranceDetail> detailList = new ArrayList<>();
TInsuranceType insuranceType;
TInsuranceCompany insuranceCompany;
if (CollectionUtils.isNotEmpty(listSuccess)){
for (InsuranceReplaceParam success : listSuccess) {
//替换
......@@ -480,6 +482,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setIsOverdue(null);
detail.setUpdateTime(LocalDateTime.now());
this.updateById(detail);
// 保险公司-险种-购买标准 是否存在
insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda()
.eq(TInsuranceCompany::getCompanyName, detail.getInsuranceCompanyName())
.eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceCompany).isPresent()) {
insuranceType = tInsuranceTypeService.getOne(Wrappers.<TInsuranceType>query().lambda()
.eq(TInsuranceType::getName, detail.getInsuranceTypeName())
.eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId())
.eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceType).isPresent()) {
newDetail.setIsAdress(insuranceType.getIsAdress());
}
}
//新数据置为待办理
newDetail.setId(null);
newDetail.setOrderNo(orderNo);
......@@ -1393,7 +1412,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceSettle settle;
SettleVo settleVo;
R<TIncomeDetailReturnVo> incomeDetailList;
// TInsuranceCompany insuranceCompany;
// TInsuranceType insuranceType;
for (TInsuranceDetail detail : successList) {
// // 是否地市自购
// insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda()
// .eq(TInsuranceCompany::getCompanyName, detail.getInsuranceCompanyName())
// .eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT)
// .last(CommonConstants.LAST_ONE_SQL));
// if (Optional.ofNullable(insuranceCompany).isPresent()) {
// insuranceType = tInsuranceTypeService.getOne(Wrappers.<TInsuranceType>query().lambda()
// .eq(TInsuranceType::getName, detail.getInsuranceTypeName())
// .eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId())
// .eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
// .last(CommonConstants.LAST_ONE_SQL)
// );
// detail.setIsAdress(insuranceType.getIsAdress());
// }
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()){
......@@ -2846,6 +2882,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
param.setIsAdress(insuranceType.getIsAdress());
//购买标准
TInsuranceTypeStandard typeStandard = tInsuranceTypeStandardService.getOne(Wrappers.<TInsuranceTypeStandard>query().lambda()
.eq(TInsuranceTypeStandard::getBuyStandard, param.getBuyStandard())
......@@ -3216,6 +3253,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
param.setIsAdress(insuranceType.getIsAdress());
//购买标准
TInsuranceTypeStandard typeStandard = tInsuranceTypeStandardService.getOne(Wrappers.<TInsuranceTypeStandard>query().lambda()
.eq(TInsuranceTypeStandard::getBuyStandard, param.getBuyStandard())
......@@ -3420,13 +3458,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceType).isPresent() && CommonConstants.ZERO_STRING.equals(
insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo())
< CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo())
> CommonConstants.SEVENTY)) {
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
if (Optional.ofNullable(insuranceType).isPresent()) {
// param.setIsAdress(insuranceType.getIsAdress());
if (CommonConstants.ZERO_STRING.equals(
insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo())
< CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo())
> CommonConstants.SEVENTY)) {
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
}
}
......
......@@ -53,6 +53,16 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
return this.baseMapper.selectInsuranceTypePage(page,insuranceType);
}
/**
* 险种批量导出
* @author huych
* @param insuranceType 查询参数
*/
@Override
public R selectInsuranceType(InsuranceTypeVo insuranceType) {
return R.ok(baseMapper.selectInsuranceType(insuranceType));
}
/**
* 新增险种信息
*
......
......@@ -17,13 +17,14 @@
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
<result property="isAdress" column="IS_ADRESS" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID,NAME,INSURANCE_COMPANY_ID,
RECEIPT_UNIT_NAME,BANK_NAME,BANK_NO,
DELETE_FLAG,CREATE_BY,CREATE_NAME,
CREATE_TIME,UPDATE_BY,UPDATE_TIME
CREATE_TIME,UPDATE_BY,UPDATE_TIME,IS_ADRESS
</sql>
<select id="selectInsuranceTypeRateList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate">
select
......@@ -64,7 +65,8 @@
a.RECEIPT_UNIT_NAME as receiptUnitName,
a.BANK_NAME as bankName,
a.BANK_NO as bankNo,
a.AGE_LIMIT as ageLimit
a.AGE_LIMIT as ageLimit,
a.IS_ADRESS as isAdress
from
t_insurance_type a,
t_insurance_company b
......@@ -78,8 +80,41 @@
<if test="insuranceType.name != null and insuranceType.name.trim() != ''">
and a.NAME like concat('%',replace(replace(#{insuranceType.name},'_','\_'),'%','\%'),'%')
</if>
<if test="insuranceType.isAdress != null and insuranceType.isAdress.trim() != ''">
and a.IS_ADRESS = #{insuranceType.isAdress}
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<select id="selectInsuranceType" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeExportVo">
select
a.NAME as name ,
b.COMPANY_NAME as insuranceCompanyName,
a.BANK_NAME as bankName,
a.BANK_NO as bankNo,
a.RECEIPT_UNIT_NAME as receiptUnitName,
if(a.AGE_LIMIT = '0','限制(16-70岁)','无') as ageLimit,
if(a.IS_ADRESS = '0','是',if(ifnull(a.IS_ADRESS,3) = 3,'','否')) as isAdress
from
t_insurance_type a,
t_insurance_company b
where
a.INSURANCE_COMPANY_ID = b.ID
and
a.DELETE_FLAG = 0
<if test="insuranceType.insuranceCompanyName != null and insuranceType.insuranceCompanyName.trim() != ''">
and b.COMPANY_NAME = #{insuranceType.insuranceCompanyName}
</if>
<if test="insuranceType.name != null and insuranceType.name.trim() != ''">
and a.NAME like concat('%',replace(replace(#{insuranceType.name},'_','\_'),'%','\%'),'%')
</if>
<if test="insuranceType.isAdress != null and insuranceType.isAdress.trim() != ''">
and a.IS_ADRESS = #{insuranceType.isAdress}
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<select id="getInsuranceTypeDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo">
select
a.ID as id,
......@@ -89,7 +124,8 @@
a.RECEIPT_UNIT_NAME as receiptUnitName,
a.BANK_NAME as bankName,
a.BANK_NO as bankNo,
a.AGE_LIMIT as ageLimit
a.AGE_LIMIT as ageLimit,
a.IS_ADRESS as isAdress
from
t_insurance_type a,
t_insurance_company b
......
......@@ -20,10 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -138,6 +135,7 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankName;
/**
* 开户行省
......@@ -145,6 +143,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankProvince;
/**
* 开户行市
......@@ -152,6 +151,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankCity;
/**
* 开户行支行
......@@ -160,6 +160,7 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankSubName;
/**
* 银行卡号
......@@ -168,6 +169,7 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankNo;
/**
* 手机号码
......@@ -184,6 +186,7 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String taxMonth;
/**
* 在职状态(0在职;1离职)
......
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author fxj
* @Date 2024/10/31
* @Description 员工报账查询审核导出明细项2
* @Version 1.0
*/
@Schema(description = " 员工报账查询审核导出明细项2")
@Data
public class TAuditExportItemVo {
private String salaryAccountId;
@ExcelProperty("通讯补贴(不计税)")
private BigDecimal phoneSubsidy;
@ExcelProperty("年终奖")
private BigDecimal annualBonus;
@ExcelProperty("免个税个人代扣")
private BigDecimal exemptionPersionTax;
@ExcelProperty("企业(职业)年金")
private BigDecimal enterpriseAnnuity;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @Author fxj
* @Date 2024/10/31
* @Description 员工报账查询审核导出明细项1
* @Version 1.0
*/
@Schema(description = " 员工报账查询审核导出明细项1")
@Data
@HeadFontStyle(fontHeightInPoints = 11)
public class TAuditExportStandardVo {
//关键关联字段
private String salaryFormId;
@ExcelProperty("薪酬状态")
private String status;
private String businessPrimaryTyp;
private String businessSecondType;
private String businessThirdType;
}
......@@ -35,6 +35,8 @@ import java.math.BigDecimal;
@HeadFontStyle(fontHeightInPoints = 11)
public class TSalaryAccountExportVo {
private String id;
private String salaryFormId;
// 是否劳务费 手机号 计税月份 发放时间 结算月份 工资月份 出账单位 结算单位 结算单位编码
// 结算部门 部门编码 人员类型 在职状态 员工姓名 身份证号 工资应发 实发工资合计
// 年终奖 薪资个税 年终奖扣税 代扣个人社保 代扣个人公积金 个人社保 个人公积金
......
......@@ -120,6 +120,17 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List<TSalaryAccountItemExportVo> auditExportSelectItems(@Param("idList") List<String> idList);
List<TAuditExportStandardVo> auditExportStandard(@Param("idList") List<String> idList);
List<TAuditExportItemVo> auditExportAnnualBonus(@Param("idList") List<String> idList);
List<TAuditExportItemVo> auditExportExemptionPersionTax(@Param("idList") List<String> idList);
List<TAuditExportItemVo> auditExportEnterpriseAnnuity(@Param("idList") List<String> idList);
List<TAuditExportItemVo> auditExportPhoneSubsidy(@Param("idList") List<String> idList);
List<TSalaryAccount> getAccountListBySalaryId(@Param("searchVo") TSalaryAccountSearchVo searchVo);
// 导出报账专用hgw
......
......@@ -39,6 +39,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -207,23 +208,65 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
if (count > CommonConstants.ZERO_INT) {
Map<String,TSalaryAccountItemExportVo> itemExportVoMap = new HashMap<>();
List<String> idList = null;
List<String> idStandardList = null;
List<TAuditExportStandardVo> standardItems = null;
Map<String,TAuditExportStandardVo> itemStandardMap = new HashMap<>();
Map<String,TAuditExportItemVo> itemAnnualBonusMap = new HashMap<>();
Map<String,TAuditExportItemVo> itemPersionTaxMap = new HashMap<>();
Map<String,TAuditExportItemVo> itemAnnuityMap = new HashMap<>();
Map<String,TAuditExportItemVo> itemSubsidyMap = new HashMap<>();
List<TSalaryAccountItemExportVo> items = null;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_2) {
List<TAuditExportItemVo> annualBonusItems;
List<TAuditExportItemVo> exemptionPersionTaxItems;
List<TAuditExportItemVo> enterpriseAnnuityItems;
List<TAuditExportItemVo> phoneSubsidyItems;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_1) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_2);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_1);
list = baseMapper.auditExportDiy(searchVo, searchVo.getIdList());
if (Common.isNotNull(list)) {
//先把数据封装完成
idList = list.stream().map(TSalaryAccountExportVo::getId).collect(Collectors.toList());
idStandardList = list.stream().map(TSalaryAccountExportVo::getSalaryFormId).collect(Collectors.toList());
//初始化明细数据MAP
if (Common.isNotNull(idList)){
items = baseMapper.auditExportSelectItems(idList);
if (Common.isNotNull(items)){
itemExportVoMap = items.stream().collect(Collectors.toMap(TSalaryAccountItemExportVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
items.clear();
annualBonusItems = baseMapper.auditExportAnnualBonus(idList);
if (Common.isNotNull(annualBonusItems)){
itemAnnualBonusMap = annualBonusItems.stream().collect(Collectors.toMap(TAuditExportItemVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
annualBonusItems.clear();
exemptionPersionTaxItems = baseMapper.auditExportExemptionPersionTax(idList);
if (Common.isNotNull(exemptionPersionTaxItems)){
itemPersionTaxMap = exemptionPersionTaxItems.stream().collect(Collectors.toMap(TAuditExportItemVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
exemptionPersionTaxItems.clear();
enterpriseAnnuityItems = baseMapper.auditExportEnterpriseAnnuity(idList);
if (Common.isNotNull(enterpriseAnnuityItems)){
itemAnnuityMap = enterpriseAnnuityItems.stream().collect(Collectors.toMap(TAuditExportItemVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
enterpriseAnnuityItems.clear();
phoneSubsidyItems = baseMapper.auditExportPhoneSubsidy(idList);
if (Common.isNotNull(phoneSubsidyItems)){
itemSubsidyMap = phoneSubsidyItems.stream().collect(Collectors.toMap(TAuditExportItemVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
phoneSubsidyItems.clear();
}
if (Common.isNotNull(items)){
itemExportVoMap = items.stream().collect(Collectors.toMap(TSalaryAccountItemExportVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
if (Common.isNotNull(idStandardList)){
standardItems = baseMapper.auditExportStandard(idStandardList);
if (Common.isNotNull(standardItems)){
itemStandardMap = standardItems.stream().collect(Collectors.toMap(TAuditExportStandardVo::getSalaryFormId,vo -> vo,(k1,k2) -> k1));
standardItems.clear();
}
}
//封装信息
initResult(list, itemExportVoMap);
initResult(list, itemExportVoMap,itemStandardMap,itemAnnualBonusMap,itemPersionTaxMap,itemAnnuityMap,itemSubsidyMap);
if (i%CommonConstants.EXCEL_EXPORT_LIMIT==0){
writeSheet = EasyExcelFactory.writerSheet("工资报账" + index).build();
index++;
......@@ -231,12 +274,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
excelWriter.write(list, writeSheet);
list.clear();
}
if (Common.isNotNull(idList)){
idList.clear();
}
if (Common.isNotNull(itemExportVoMap)){
itemExportVoMap.clear();
}
clearMap(itemExportVoMap, idList, idStandardList, itemStandardMap, itemAnnualBonusMap, itemPersionTaxMap, itemAnnuityMap, itemSubsidyMap);
}
} else {
writeSheet = EasyExcelFactory.writerSheet("工资报账" + index).build();
......@@ -261,14 +299,72 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
}
private void initResult(List<TSalaryAccountExportVo> list, Map<String, TSalaryAccountItemExportVo> itemExportVoMap) {
private void clearMap(Map<String, TSalaryAccountItemExportVo> itemExportVoMap, List<String> idList, List<String> idStandardList, Map<String, TAuditExportStandardVo> itemStandardMap, Map<String, TAuditExportItemVo> itemAnnualBonusMap, Map<String, TAuditExportItemVo> itemPersionTaxMap, Map<String, TAuditExportItemVo> itemAnnuityMap, Map<String, TAuditExportItemVo> itemSubsidyMap) {
if (Common.isNotNull(idList)){
idList.clear();
}
if (Common.isNotNull(idStandardList)){
idStandardList.clear();
}
if (Common.isNotNull(itemExportVoMap)){
itemExportVoMap.clear();
}
if (Common.isNotNull(itemStandardMap)){
itemStandardMap.clear();
}
if (Common.isNotNull(itemAnnualBonusMap)){
itemAnnualBonusMap.clear();
}
if (Common.isNotNull(itemPersionTaxMap)){
itemPersionTaxMap.clear();
}
if (Common.isNotNull(itemAnnuityMap)){
itemAnnuityMap.clear();
}
if (Common.isNotNull(itemSubsidyMap)){
itemSubsidyMap.clear();
}
}
private void initResult(List<TSalaryAccountExportVo> list,
Map<String, TSalaryAccountItemExportVo> itemExportVoMap,
Map<String,TAuditExportStandardVo> itemStandardMap,
Map<String,TAuditExportItemVo> itemAnnualBonusMap,
Map<String,TAuditExportItemVo> itemPersionTaxMap,
Map<String,TAuditExportItemVo> itemAnnuityMap,
Map<String,TAuditExportItemVo> itemSubsidyMap) {
TSalaryAccountItemExportVo voTemp;
TAuditExportStandardVo standardVo;
TAuditExportItemVo itemVo;
for (TSalaryAccountExportVo vo: list){
voTemp = itemExportVoMap.get(vo.getId());
if (Common.isNotNull(voTemp)){
vo.setPdeductionMoney(voTemp.getPdeductionMoney());
vo.setPdeductionDetail(voTemp.getPdeductionDetail());
}
standardVo = itemStandardMap.get(vo.getSalaryFormId());
if (Common.isNotNull(standardVo)){
vo.setStatus(standardVo.getStatus());
vo.setBusinessPrimaryType(standardVo.getBusinessPrimaryTyp());
vo.setBusinessSecondType(standardVo.getBusinessSecondType());
vo.setBusinessThirdType(standardVo.getBusinessThirdType());
}
itemVo = itemAnnualBonusMap.get(vo.getId());
if (Common.isNotNull(itemVo)){
vo.setAnnualBonus(itemVo.getAnnualBonus());
}
itemVo = itemPersionTaxMap.get(vo.getId());
if (Common.isNotNull(itemVo)){
vo.setExemptionPersionTax(itemVo.getExemptionPersionTax());
}
itemVo = itemAnnuityMap.get(vo.getId());
if (Common.isNotNull(itemVo)){
vo.setEnterpriseAnnuity(itemVo.getEnterpriseAnnuity());
}
itemVo = itemSubsidyMap.get(vo.getId());
if (Common.isNotNull(itemVo)){
vo.setPhoneSubsidy(itemVo.getPhoneSubsidy());
}
}
}
......
......@@ -1583,6 +1583,7 @@
<select id="auditExportDiy" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountExportVo"
parameterType="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount">
select
a.SALARY_FORM_ID as salaryFormId,
a.id,
case a.FORM_TYPE when '0' then '薪资' when '1' then '绩效' when '3' then '劳务费' when '4' then '稿酬' else '其他' end as formType,
a.EMP_PHONE as empPhone,
......@@ -1598,13 +1599,10 @@
a.EMP_IDCARD as empIdcard,
if(a.RELAY_SALARY_UNIT is not null and a.RELAY_SALARY_UNIT != 0, a.RELAY_SALARY_UNIT, ifnull(a.RELAY_SALARY,0)) as relaySalary,
a.ACTUAL_SALARY as actualSalary,
annualBonus.SALARY_MONEY as annualBonus,
ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) as salaryTax,
a.ANNUAL_BONUS_TAX as annualBonusTax,
a.PERSON_SOCIAL as personSocial,
a.PERSON_FUND as personFund,
exemptionPersionTax.SALARY_MONEY as exemptionPersionTax,
enterpriseAnnuity.SALARY_MONEY as enterpriseAnnuity,
a.UNIT_SOCIAL as unitSocial,
a.UNIT_FUND as unitFund,
a.SUM_BABY_MONEY as sumBabyMoney,
......@@ -1616,22 +1614,21 @@
a.SUM_SUPPORT_ELDERLY_MONEY as sumSupportElderlyMoney,
a.COST_REDUCTION as costReduction,
a.CREATE_NAME as createName,
/*GROUP_CONCAT(pdeduction.CN_NAME,':',pdeduction.SALARY_MONEY SEPARATOR ';') 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,
case s.STATUS when 0 then '待提交' when 1 then '待审核' when 2 then '待推送明细' when 3 then '已推送待发放' when 4 then '已发放' when 5 then '审核不通过' when 6 then '确认不通过' when 7 then '财务退回' when 10 then '推送失败' when 11 then '已审核生成收入中' when 12 then '已审核生成收入失败' else '-' end as status
if(a.PAY_SETTLE_FLAG = '0','已结算',if(a.PAY_SETTLE_FLAG = '1','结算中',if(a.PAY_SETTLE_FLAG = '2','未结算','-'))) paySettleFlag
/*
,phoneSubsidy.SALARY_MONEY as phoneSubsidy
,s.BUSINESS_PRIMARY_TYPE as businessPrimaryType
,s.BUSINESS_SECOND_TYPE as businessSecondType
,s.BUSINESS_THIRD_TYPE as businessThirdType
annualBonus.SALARY_MONEY as annualBonus,
exemptionPersionTax.SALARY_MONEY as exemptionPersionTax,
enterpriseAnnuity.SALARY_MONEY as enterpriseAnnuity,
*/
from
t_salary_account a
left join t_salary_standard s on a.SALARY_FORM_ID = s.id
/*left join t_salary_standard s on a.SALARY_FORM_ID = s.id
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'*/
left join t_salary_account_item phoneSubsidy on phoneSubsidy.SALARY_ACCOUNT_ID = a.id and phoneSubsidy.JAVA_FIED_NAME='phoneSubsidy'
left join t_salary_account_item pdeduction on pdeduction.SALARY_ACCOUNT_ID = a.id and pdeduction.JAVA_FIED_NAME='pdeduction'
left join t_salary_account_item phoneSubsidy on phoneSubsidy.SALARY_ACCOUNT_ID = a.id and phoneSubsidy.JAVA_FIED_NAME='phoneSubsidy'*/
<where>
a.DELETE_FLAG = 0
<include refid="where_export"/>
......@@ -1645,7 +1642,84 @@
</where>
</select>
<select id="auditExportPhoneSubsidy" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TAuditExportItemVo">
select
phoneSubsidy.SALARY_ACCOUNT_ID as salaryAccountId,
phoneSubsidy.SALARY_MONEY as phoneSubsidy
FROM
t_salary_account_item phoneSubsidy
where
phoneSubsidy.JAVA_FIED_NAME='phoneSubsidy'
<if test="idList != null and idList.size>0">
AND phoneSubsidy.SALARY_ACCOUNT_ID in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
</select>
<select id="auditExportEnterpriseAnnuity" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TAuditExportItemVo">
select
enterpriseAnnuity.SALARY_ACCOUNT_ID as salaryAccountId,
enterpriseAnnuity.SALARY_MONEY as enterpriseAnnuity
FROM
t_salary_account_item enterpriseAnnuity
where
enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
<if test="idList != null and idList.size>0">
AND enterpriseAnnuity.SALARY_ACCOUNT_ID in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
</select>
<select id="auditExportExemptionPersionTax" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TAuditExportItemVo">
select
exemptionPersionTax.SALARY_ACCOUNT_ID as salaryAccountId,
exemptionPersionTax.SALARY_MONEY as exemptionPersionTax
FROM
t_salary_account_item exemptionPersionTax
where
exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
<if test="idList != null and idList.size>0">
AND exemptionPersionTax.SALARY_ACCOUNT_ID in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
</select>
<select id="auditExportAnnualBonus" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TAuditExportItemVo">
select
annualBonus.SALARY_ACCOUNT_ID as salaryAccountId,
annualBonus.SALARY_MONEY as annualBonus
FROM
t_salary_account_item annualBonus
where
annualBonus.JAVA_FIED_NAME = 'annualBonus'
<if test="idList != null and idList.size>0">
AND annualBonus.SALARY_ACCOUNT_ID in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
</select>
<select id="auditExportStandard" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TAuditExportStandardVo">
select
s.id as salaryFormId
,case s.STATUS when 0 then '待提交' when 1 then '待审核' when 2 then '待推送明细' when 3 then '已推送待发放' when 4 then '已发放' when 5 then '审核不通过' when 6 then '确认不通过' when 7 then '财务退回' when 10 then '推送失败' when 11 then '已审核生成收入中' when 12 then '已审核生成收入失败' else '-' end as status
,s.BUSINESS_PRIMARY_TYPE as businessPrimaryType
,s.BUSINESS_SECOND_TYPE as businessSecondType
,s.BUSINESS_THIRD_TYPE as businessThirdType
FROM
t_salary_standard s
where
<if test="idList != null and idList.size>0">
s.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
</select>
<select id="auditExportSelectItems" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountItemExportVo">
select
GROUP_CONCAT(pdeduction.CN_NAME,':',pdeduction.SALARY_MONEY SEPARATOR ';') pdeductionDetail,
......
......@@ -77,7 +77,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
*/
@Override
public R<Boolean> saveInfo(SysHouseHoldInfo sysHouseHoldInfo) {
//户名称去空格
sysHouseHoldInfo.setName(sysHouseHoldInfo.getName().replace(" ",""));
SysHouseHoldInfo info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,sysHouseHoldInfo.getType())
.eq(SysHouseHoldInfo::getName,sysHouseHoldInfo.getName())
......@@ -131,6 +132,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
**/
@Override
public R<Boolean> updateByIdAsso(SysHouseHoldInfo hold) {
//户名称去空格
hold.setName(hold.getName().replace(" ",""));
if (Common.isEmpty(hold.getId())){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
......
......@@ -2073,6 +2073,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
contract.setEmpName(excel.getEmpName());
contract.setWorkingHours(excel.getWorkingHours());
contract.setContractTerm(excel.getContractTerm());
contract.setTryPeriod(excel.getTryPeriod());
if (Common.isNotNull(excel.getSocialHousehold())){
contract.setContractParty(excel.getSocialHousehold());
}
......@@ -3249,6 +3250,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_REDUCE_SOCIAL_STATUS_ERROR)));
return true;
}
//派减部分办理失败需要额外判断是否有办理成功的项可供派减;明细项办理状态:0待办理1办理成功2办理失败3已派减4派减失败5派减待办理
if (!CommonConstants.ONE_STRING.equals(socialFund.getPensionHandle())
&&!CommonConstants.FOUR_STRING.equals(socialFund.getPensionHandle())
&&!CommonConstants.ONE_STRING.equals(socialFund.getMedicalHandle())
&&!CommonConstants.FOUR_STRING.equals(socialFund.getMedicalHandle())
&&!CommonConstants.ONE_STRING.equals(socialFund.getWorkInjuryHandle())
&&!CommonConstants.FOUR_STRING.equals(socialFund.getWorkInjuryHandle())
&&!CommonConstants.ONE_STRING.equals(socialFund.getBirthHandle())
&&!CommonConstants.FOUR_STRING.equals(socialFund.getBirthHandle())
&&!CommonConstants.ONE_STRING.equals(socialFund.getBigailmentHandle())
&&!CommonConstants.FOUR_STRING.equals(socialFund.getBigailmentHandle())
&&!CommonConstants.ONE_STRING.equals(socialFund.getUnemployHandle())
&&!CommonConstants.FOUR_STRING.equals(socialFund.getUnemployHandle())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_REDUCE_SOCIAL_STATUS_ERROR)));
return true;
}
if (!excel.getDepartNo().equals(socialFund.getSettleDomainCode())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_REDUCE_SOCIAL_DEPARTNO_ERROR)));
return true;
......
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