Commit a268cfa0 authored by fangxinjiang's avatar fangxinjiang

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

parents 959f9289 e3ebc638
......@@ -159,7 +159,7 @@
and a.EMP_NAME = #{completeMonitorInfoVo.empName}
</if>
<if test="completeMonitorInfoVo.phone != null and completeMonitorInfoVo.phone.trim() != ''">
and a.EMP_PHONE = #{completeMonitorInfoVo.phone}
and b.EMP_PHONE = #{completeMonitorInfoVo.phone}
</if>
<if test="completeMonitorInfoVo.isComplete != null and completeMonitorInfoVo.isComplete.trim() != ''">
and a.IS_COMPLETE = #{completeMonitorInfoVo.isComplete}
......
......@@ -17,6 +17,9 @@
package com.yifu.cloud.plus.v1.yifu.common.core.constant;
import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @author lengleng
......@@ -622,4 +625,8 @@ public interface CommonConstants {
Integer TEN_INTEGER = 10;
Integer ELEVEN_INTEGER =11;
List<String> socialStatus = Stream.of("3","4","6","7","9","11","12").collect(Collectors.toList());
List<String> socialInfoStatus = Stream.of("1","5","7").collect(Collectors.toList());
}
......@@ -14,7 +14,6 @@ import com.icbc.api.response.JftApiB2bpayTransqueryResponseV1;
import com.icbc.api.response.JftApiPayB2bpayGenpreorderResponseV1;
import com.icbc.api.response.MybankEnterpriseAccountQuerybankinfoResponseV1;
import com.icbc.api.response.MybankEnterpriseTradeQhisdResponseV1;
import com.icbc.api.utils.IcbcSignature;
import com.yifu.cloud.plus.v1.ekp.config.EkpEntryProperties;
import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
......@@ -118,6 +117,10 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
public R getIcbcTransactionFlowNew() throws IcbcApiException {
//从9月12号开始执行定时任务
if (DateUtil.getCurrentDateString().compareTo("2024-09-12") < 0 ) {
return R.ok();
}
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
......@@ -177,6 +180,10 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
public R getIcbcTransactionFlowYesterdayInner() throws IcbcApiException {
//从9月13号开始执行定时任务
if (DateUtil.getCurrentDateString().compareTo("2024-09-13") <0 ) {
return R.ok();
}
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
......@@ -273,12 +280,6 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
public R querybankinfo() {
String ca_sm_path = "D:/icbcFile/ahwx_y_1302.cer";
String ca_sm_icbc_path = "D:/icbcFile/API_GATEWAY_ICBC_SM_REAL.cer";
String ca_sm = IcbcSignature.getCAInfoStr(ca_sm_path);
String ca_sm_icbc = IcbcSignature.getCAInfoStr(ca_sm_icbc_path);
String privateKey = "4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44";
......@@ -287,8 +288,8 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
// DefaultIcbcClient client = new DefaultIcbcClient("11000000000000019038", IcbcConstants.SIGN_TYPE_CA_SM_ICBC,privateKey, APIGW_PUBLIC_KEY);
DefaultIcbcClient client = new DefaultIcbcClient("11000000000000019038", IcbcConstants.SIGN_TYPE_CA_SM_ICBC, privateKey,
IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, ca_sm, null);
client.setIcbc_ca(ca_sm_icbc);
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
try {
MybankEnterpriseAccountQuerybankinfoRequestV1.MybankEnterpriseAccountQuerybankinfoRequestBizV1 bizContent =
new MybankEnterpriseAccountQuerybankinfoRequestV1.MybankEnterpriseAccountQuerybankinfoRequestBizV1();
......@@ -299,7 +300,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
bizContent.setTranTime("103231001");
bizContent.setLanguage("zh_CN");
bizContent.setfSeqNo("AHWX"+ System.currentTimeMillis());
bizContent.setCardNo("6222620250010165293");
bizContent.setCardNo("6217752510002149161");
request.setServiceUrl("https://gw.open.icbc.com.cn/api/mybank/enterprise/account/querybankinfo/V1");
request.setBizContent(bizContent);
MybankEnterpriseAccountQuerybankinfoResponseV1 response = client.execute(request);
......@@ -433,7 +434,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
pushParam.setFd_recipName(entry.getRecipName());
pushParam.setFd_recipAccountNo(entry.getRecipAccountNo());
pushParam.setFd_recipBkName(entry.getRecipBkName());
pushParam.setFd_date(entry.getBusiDate() + " " + entry.getBusiTime());
pushParam.setFd_date(entry.getBusiDate() + " " + entry.getBusiTime().replace(".",":"));
pushParam.setFd_receiveBkName(bankName);
pushParam.setFd_receiveBkNo(bankNo);
pushParam.setFd_remark(entry.getSummary());
......
......@@ -7932,6 +7932,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(idstr)){
searchVo.setIdList(Common.getList(idstr));
}
YifuUser user = SecurityUtils.getUser();
if ("许瑞玲".equals(user.getNickname()) || "1".equals(user.getId())) {
searchVo.setCreateBy(null);
} else {
searchVo.setCreateBy(user.getId());
}
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
......@@ -8040,7 +8046,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public R<Integer> getUserInsuranceMessageWarnCount(String userName) {
InsuranceSearchVo searchVo = new InsuranceSearchVo();
searchVo.setCreateName(userName);
searchVo.setCreateBy(SecurityUtils.getUser().getId());
searchVo.setExpireIgnoreFlag(CommonConstants.ONE_STRING);
return R.ok(baseMapper.noPageCountDiy(searchVo));
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceWarnMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert">
......@@ -77,7 +77,7 @@
a.DIE_DISABLE_QUOTA,
a.DEPT_ID,
a.POLICY_NO,
if(a.POLICY_END >= curdate(),0,1) IS_OVERDUE,
IF( a.POLICY_END >= curdate(), 0, 1 ) IS_OVERDUE,
a.REMARK,
a.CREATE_BY,
a.DELETE_FLAG,
......@@ -89,10 +89,11 @@
a.CREATE_USER_DEPT_NAME
FROM
t_insurance_detail a
WHERE
a.id IN (
INNER JOIN (
SELECT
l.id
h.endTime,
max( l.POLICY_START ) POLICY_START,
l.EMP_IDCARD_NO
FROM
(
SELECT
......@@ -101,8 +102,10 @@
FROM
t_insurance_detail b
WHERE
b.POLICY_START >= date_sub( date_add( curdate(), INTERVAL 1 DAY ), INTERVAL 1 YEAR )
b.POLICY_START BETWEEN date_sub( date_add( curdate(), INTERVAL 1 DAY ), INTERVAL 1 YEAR )
AND curdate()
AND b.IS_EFFECT = 0
AND b.DELETE_FLAG = '0'
AND NOT EXISTS (
SELECT
1
......@@ -111,8 +114,11 @@
WHERE
ea.POLICY_START >= date_sub( date_add( curdate(), INTERVAL 1 DAY ), INTERVAL 1 YEAR )
AND ea.IS_EFFECT = 0
AND ea.DELETE_FLAG = '0'
AND ea.POLICY_END >= date_add( curdate(), INTERVAL 1 MONTH )
AND ea.EMP_IDCARD_NO = b.EMP_IDCARD_NO
AND ea.INSURANCE_COMPANY_NAME = b.INSURANCE_COMPANY_NAME
AND ea.INSURANCE_TYPE_NAME = b.INSURANCE_TYPE_NAME
)
GROUP BY
b.EMP_IDCARD_NO,
......@@ -120,9 +126,20 @@
b.INSURANCE_TYPE_NAME
) h
INNER JOIN t_insurance_detail l ON h.EMP_IDCARD_NO = l.EMP_IDCARD_NO
AND l.DELETE_FLAG = '0'
AND h.endTime = l.POLICY_END
AND l.POLICY_START BETWEEN date_sub( date_add( curdate(), INTERVAL 1 DAY ), INTERVAL 1 YEAR )
AND curdate()
WHERE
l.EXPIRE_IGNORE_FLAG = '1'
)
GROUP BY
l.EMP_IDCARD_NO,
l.INSURANCE_COMPANY_NAME,
l.INSURANCE_TYPE_NAME,
l.POLICY_END
) ll ON ll.EMP_IDCARD_NO = a.EMP_IDCARD_NO
AND ll.POLICY_START = a.POLICY_START
AND ll.endTime = a.POLICY_END
where a.DELETE_FLAG = '0'
</select>
</mapper>
......@@ -68,4 +68,8 @@ public class TSalaryAccountSumVo {
private BigDecimal pdeduction;
@ExcelProperty("免个税个人代扣合计")
private BigDecimal exemptionPersionTax;
@ExcelProperty("工资月份")
private String salaryMonth;
@ExcelProperty("发薪人数")
private Integer num;
}
......@@ -71,7 +71,6 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
implements TSalaryStandardOriginalService {
private final SalaryUploadService salaryUploadService;
private final TSalaryStandardOriginalService tSalaryStandardOriginalService;
private final TSalaryStandardOriginalDetailService tSalaryStandardOriginalDetailService;
/**
......@@ -177,7 +176,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.ExcelVo
**/
private R<ExcelSheetVo> readXls(InputStream inputStream, List<String> specialIdCardList, boolean titleFlag
, String sheetName, int idCardNum, Integer maxColumn) throws IOException {
, String sheetName, Integer idCardNum, Integer maxColumn) throws IOException {
HSSFWorkbook sheets = null;
ExcelSheetVo sheetVo = new ExcelSheetVo();
try {
......@@ -201,7 +200,10 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
// 内容行
int dataRow;
// 身份证所在列
int idCardColumn = idCardNum;
int idCardColumn = -1;
if (Common.isNotNull(idCardNum)) {
idCardColumn = idCardNum;
}
// 空白列起始号
int nullColumn = -1;
// 上一个空白行
......@@ -450,7 +452,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.ExcelVo
**/
private R<ExcelSheetVo> readXlsx(InputStream inputStream, List<String> specialIdCardList, boolean titleFlag
, String sheetName, int idCardNum, Integer maxColumn) throws IOException {
, String sheetName, Integer idCardNum, Integer maxColumn) throws IOException {
ExcelSheetVo sheetVo = new ExcelSheetVo();
Workbook sheets = null;
try {
......@@ -479,7 +481,10 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
// 内容行
int dataRow;
// 身份证所在列
int idCardColumn = idCardNum;
int idCardColumn = -1;
if (Common.isNotNull(idCardNum)) {
idCardColumn = idCardNum;
}
// 空白列起始号
int nullColumn = -1;
// 上一个空白行
......@@ -801,32 +806,66 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
if (Common.isEmpty(originalId)) {
return R.failed("识别配置为空,请选择识别配置!");
}
TSalaryStandardOriginal original = tSalaryStandardOriginalService.getById(originalId);
TSalaryStandardOriginal original = this.getById(originalId);
if (original == null || Common.isEmpty(original.getId())) {
return R.failed("请检查表头配置!");
}
List<TSalaryStandardOriginalDetail> detailList = tSalaryStandardOriginalDetailService.getTSalaryStandardOriginalDetailByOrgId(originalId);
Map<String, TSalaryStandardOriginalDetail> detailMap = new HashMap<>();
int idCardNum = -1;
if (detailList == null || detailList.isEmpty() || detailList.size() < 4) {
Integer idCardNum = -1;
if (detailList == null || detailList.isEmpty() || detailList.size() < 3) {
return R.failed("请检查表头配置!!");
}
int maxColumn = detailList.size() + 10;
// 忽略配置的表头,额外的表头
Map<String, Integer> ignoreMap = new HashMap<>();
ignoreMap.put("是否新员工(默认否)", 1);
ignoreMap.put("开户行总行", 1);
ignoreMap.put("开户行省", 1);
ignoreMap.put("开户行市", 1);
ignoreMap.put("开户行支行", 1);
ignoreMap.put("银行卡号", 1);
ignoreMap.put("手机号码", 1);
ignoreMap.put("计税月份", 1);
ignoreMap.put("工资发放时间(立即发、暂停发)", 1);
Integer maxColumn = detailList.size() + 10;
// 是否固定列,true是,原逻辑,false否,忽略没配置的表头
boolean isFixedColumn = true;
if (Common.isNotNull(original.getIsFixedColumn()) && CommonConstants.ZERO_INT == original.getIsFixedColumn()) {
isFixedColumn = false;
maxColumn = null;
}
// 不固定表头配置
Map<String, TSalaryStandardOriginalDetail> notFixedTitleMap = new HashMap<>();
// 用来检测 不固定表头配置的表头,有没有都在
Map<String, Integer> notFixedKeyMap = new HashMap<>();
// 判断是否已重复存在
Map<String, Integer> curMap = new HashMap<>();
for (TSalaryStandardOriginalDetail detail : detailList) {
if (Common.isEmpty(detail.getModelName())
&& ("是否新员工(默认否)".equals(detail.getExcelName())
|| "开户行总行".equals(detail.getExcelName())
|| "开户行省".equals(detail.getExcelName())
|| "开户行市".equals(detail.getExcelName())
|| "开户行支行".equals(detail.getExcelName())
|| "银行卡号".equals(detail.getExcelName())
|| "手机号码".equals(detail.getExcelName())
|| "计税月份".equals(detail.getExcelName()))) {
&& (ignoreMap.get(detail.getExcelName()) != null)) {
detail.setModelName(detail.getExcelName());
} else if (SalaryConstants.ID_NUMBER.equals(detail.getModelName())) {
idCardNum = detail.getColumnNo();
if (!isFixedColumn) {
idCardNum = null;
}
}
if (isFixedColumn) {
detailMap.put(String.valueOf(detail.getColumnNo()), detail);
} else {
if (Common.isNotNull(detail.getModelName()) || ignoreMap.get(detail.getExcelName()) != null) {
if (Common.isNotNull(detail.getExcelKey())) {
notFixedTitleMap.put(detail.getExcelKey(), detail);
notFixedKeyMap.put(detail.getExcelKey(), CommonConstants.ONE_INT);
} else {
notFixedTitleMap.put(detail.getExcelName(), detail);
notFixedKeyMap.put(detail.getExcelName(), CommonConstants.ONE_INT);
}
}
}
detailMap.put(String.valueOf(detail.getColumnNo()), detail);
}
//对前端传递的文件进行校验
if (Common.isEmpty(sheetName)) {
......@@ -859,57 +898,111 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
} else {
return R.failed(voR == null ? "识别表格异常!" : voR.getMsg());
}
// 验证表头:
if (vo.getTitleList() != null && !vo.getTitleList().isEmpty()) {
ExcelColumnVo title;
TSalaryStandardOriginalDetail detail;
// 标题行的内容
String titleStr;
TSalaryStandardOriginalDetail detailSet;
// 匹配的表头关键字
String key;
// 匹配规则
String rule;
boolean isFixError;
boolean isError;
boolean isOther;
// 重复存在的表头值
Integer curValue;
StringBuilder repetitiveKey = new StringBuilder();
for (int i = 0; i < vo.getTitleList().size(); i++) {
rule = "等于";
title = vo.getTitleList().get(i);
if (Common.isNotNull(title.getContent())) {
if (detailMap.get(String.valueOf(title.getLineNum())) == null) {
if (!"是否新员工(默认否)".equals(title.getContent())
&& !"开户行总行".equals(title.getContent())
&& !"开户行省".equals(title.getContent())
&& !"开户行市".equals(title.getContent())
&& !"开户行支行".equals(title.getContent())
&& !"银行卡号".equals(title.getContent())
&& !"手机号码".equals(title.getContent())
&& !"计税月份".equals(title.getContent()) && title.getLineNum() <detailList.size()) {
titleStr = title.getContent();
isOther = ignoreMap.get(titleStr) == null;
if (Common.isNotNull(titleStr)) {
// 固定表头
if (isFixedColumn) {
detailSet = detailMap.get(String.valueOf(title.getLineNum()));
if (detailSet == null) {
if (ignoreMap.get(titleStr) == null && title.getLineNum() < detailList.size()) {
return R.failed("未找到对应配置的表头,请核实导入的原表信息后,重新尝试!");
//return R.failed("表头与导入的不一致,第" + title.getLineNum() + "列表头【" + title.getContent() + "】未找到配置,请先配置表头!");
} else if ("是否新员工(默认否)".equals(title.getContent())
|| "开户行总行".equals(title.getContent())
|| "开户行省".equals(title.getContent())
|| "开户行市".equals(title.getContent())
|| "开户行支行".equals(title.getContent())
|| "银行卡号".equals(title.getContent())
|| "手机号码".equals(title.getContent())
|| "计税月份".equals(title.getContent())) {
return R.failed("未找到对应配置的表头,请核实导入的原表信息后,重新尝试!");
//return R.failed("表头与导入的不一致,第" + title.getLineNum() + "列表头【" + title.getContent() + "】未找到配置,请先配置表头!");
} else if (ignoreMap.get(titleStr) != null) {
detail = new TSalaryStandardOriginalDetail();
detail.setModelName(titleStr);
detailMap.put(String.valueOf(title.getLineNum()), detail);
}
} else {
if (Common.isNotNull(detailSet.getExcelKey())) {
key = detailSet.getExcelKey();
} else {
key = detailSet.getExcelName();
}
if (Common.isNotNull(detailSet.getExcelRule())) {
rule = detailSet.getExcelRule();
}
if (Common.isEmpty(rule)) {
rule = "等于";
}
isError = this.judgeRule(titleStr, key, rule);
if (isError && isOther) {
return R.failed("未找到对应配置的表头,请核实导入的原表信息后,重新尝试!!");
}
//return R.failed("表头与导入的不一致,第" + (i + 1) + "列应为【" + detailMap.get(String.valueOf(title.getLineNum())).getExcelName() + "】,实际为【" + title.getContent() + "】")
}
} else {
// 循环匹配不固定表头
for (Map.Entry<String, TSalaryStandardOriginalDetail> entry : notFixedTitleMap.entrySet()) {
key = entry.getKey();
rule = entry.getValue().getExcelRule();
if (Common.isEmpty(rule)) {
rule = "等于";
}
isFixError = this.judgeRule(titleStr, key, rule);
// 表示匹配到了
if (!isFixError) {
curValue = curMap.get(key);
if (Common.isNotNull(curValue)) {
repetitiveKey.append(key).append(";");
} else {
notFixedKeyMap.remove(key);
curMap.put(key, 1);
}
// 存储适配map,以做识别内容
detailMap.put(String.valueOf(title.getLineNum()), entry.getValue());
// 这里加上截断,就有可能关注不到重复的配置过的表头了:
// break
}
}
detailSet = detailMap.get(String.valueOf(title.getLineNum()));
if (detailSet == null && !isOther) {
detail = new TSalaryStandardOriginalDetail();
detail.setModelName(title.getContent());
detail.setModelName(titleStr);
detailMap.put(String.valueOf(title.getLineNum()), detail);
}
} else if (!title.getContent().equals(detailMap.get(String.valueOf(title.getLineNum())).getExcelName())
&& (!"是否新员工(默认否)".equals(title.getContent())
|| !"开户行总行".equals(title.getContent())
|| !"开户行省".equals(title.getContent())
|| !"开户行市".equals(title.getContent())
|| !"开户行支行".equals(title.getContent())
|| !"银行卡号".equals(title.getContent())
|| !"手机号码".equals(title.getContent())
|| !"计税月份".equals(title.getContent()))
) {
return R.failed("未找到对应配置的表头,请核实导入的原表信息后,重新尝试!!");
//return R.failed("表头与导入的不一致,第" + (i + 1) + "列应为【" + detailMap.get(String.valueOf(title.getLineNum())).getExcelName() + "】,实际为【" + title.getContent() + "】")
}
} else if (detailMap.get(String.valueOf(title.getLineNum())) != null && Common.isNotNull(detailMap.get(String.valueOf(title.getLineNum())).getExcelName())) {
} else if (isFixedColumn && detailMap.get(String.valueOf(title.getLineNum())) != null && Common.isNotNull(detailMap.get(String.valueOf(title.getLineNum())).getExcelName())) {
return R.failed("未找到对应配置的表头,请核实导入的原表信息后,重新尝试!!!");
//return R.failed("表头与导入的不一致,第" + (i + 1) + "列应为【" + detailMap.get(String.valueOf(title.getLineNum())).getExcelName() + "】,实际为空!")
}
}
if (repetitiveKey.length() > 0) {
return R.failed("检测到关键字重复:" + repetitiveKey + " 请检查调整后再次提交");
}
if (notFixedKeyMap.size() > 0) {
StringBuilder titles = new StringBuilder();
for (String keyStr : notFixedKeyMap.keySet()) {
titles.append(keyStr).append(";");
}
return R.failed("配置的表头未找到:" + titles);
}
} else {
return R.failed("表格没有表头,请检查表格数据!");
}
if (vo.getContentList() != null && !vo.getContentList().isEmpty()) {
// 智能识别表头
TSalaryStandardOriginalDetail detail;
......@@ -996,6 +1089,25 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
return R.failed("无法识别数据!请联系管理员!");
}
/**
* @param titleStr Excel表头
* @param key 关键字
* @param rule 规则,汉字:等于、包含
* @Description: 判断关键字是否正确
* @Author: hgw
* @Date: 2024/9/13 17:35
* @return: boolean
**/
private boolean judgeRule(String titleStr, String key, String rule) {
boolean isFixError;
switch (rule) {
case "等于" : isFixError = !titleStr.equals(key); break;
case "包含" : isFixError = !titleStr.contains(key); break;
default: isFixError = !titleStr.equals(key); break;
}
return isFixError;
}
/**
* @Description: 薪资原表配置导出
* @Author: hgw
......
......@@ -1373,6 +1373,8 @@
,sum(ifnull(enterpriseAnnuityUnit.SALARY_MONEY,0)) enterprise_Annuity_Unit
,sum(ifnull(pdeduction.SALARY_MONEY,0)) pdeduction
,sum(ifnull(exemptionPersionTax.SALARY_MONEY,0)) exemptionPersionTax
,a.SALARY_MONTH salaryMonth
,count(1) num
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 enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
......
......@@ -227,6 +227,7 @@ public class TSocialFundInfo extends BaseEntity {
@Schema(description = "缴纳地-县" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("缴纳地-县" )
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String socialTown;
/**
* 公积金户
......
......@@ -138,6 +138,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private final TDispatchSocialFundInfoService infoService;
private final SysHouseHoldInfoMapper houseHoldInfoMapper;
/**
* 派单信息记录表简单分页查询
*
......@@ -3940,6 +3942,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
boolean auditFlag = true;
boolean partSuccess = false;
TDispatchSocialFundInfo socialFundInfo;
SysHouseHoldInfo info;
for (TDispatchInfo dis : disList) {
auditFlag = true;
if (CommonConstants.ZERO_STRING.equals(typeSub)) {
......@@ -4022,6 +4025,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 社保办理状态补充判断:
this.setSocialHandleStatus(handleStatus, socialType, flag, socialInfo, dis,sf, isAutoHandle);
info = houseHoldInfoMapper.selectOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,CommonConstants.ZERO_STRING)
.eq(SysHouseHoldInfo::getName,dis.getSocialHouseholdName())
.last(CommonConstants.LAST_ONE_SQL));
sf.setSocialHouseholdName(dis.getSocialHouseholdName());
sf.setSocialHousehold(info == null ? "" : info.getId());
sf.setSocialProvince(dis.getSocialProvince());
sf.setSocialCity(dis.getSocialCity());
sf.setSocialTown(dis.getSocialTown());
socialMapper.updateById(socialInfo);
dis.setSocialHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
......@@ -4116,6 +4128,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialInfo) && Common.isNotNull(socialInfo.getId())) {
// 社保办理状态补充判断:
this.setSocialHandleStatus(handleStatus, socialType, flag, socialInfo, dis,sf, isAutoHandle);
info = houseHoldInfoMapper.selectOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,CommonConstants.ZERO_STRING)
.eq(SysHouseHoldInfo::getName,dis.getSocialHouseholdName())
.last(CommonConstants.LAST_ONE_SQL));
sf.setSocialHouseholdName(dis.getSocialHouseholdName());
sf.setSocialHousehold(info == null ? "" : info.getId());
sf.setSocialProvince(dis.getSocialProvince());
sf.setSocialCity(dis.getSocialCity());
sf.setSocialTown(dis.getSocialTown());
socialInfo.setReduceHandleUser(user.getId());
socialInfo.setReduceHandleTime(now);
//社保派减办理成功才变更社保的办理状态
......@@ -4249,6 +4271,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
auditInfoMapper.insert(auditInfo);
}
baseMapper.updateById(dis);
//v1.8.9更新社保公积金缴纳地和户数据
socialFundMapper.updateById(sf);
//派减的申请审核完更新社保公积金查询快照表
if (CommonConstants.ONE_STRING.equals(dis.getType())) {
......
......@@ -1154,8 +1154,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<TSocialInfo> socialist;
TSettleDomain domain;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))
.in(TSocialFundInfo::getSocialStatus,CommonConstants.socialStatus));
//已存在的社保数据
HashMap<String, TSocialFundInfo> socialMap = new HashMap<>();
......@@ -1213,7 +1215,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
socialist = socialInfoMapper.selectList(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard())
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity()));
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity())
.in(TSocialInfo::getHandleStatus,CommonConstants.socialInfoStatus)
);
if (CollectionUtils.isNotEmpty(socialist)) {
for (TSocialInfo socialInfo1 : socialist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
......@@ -1485,6 +1489,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isEmpty(tSocialInfo)) {
tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.in(TSocialInfo::getHandleStatus,CommonConstants.socialInfoStatus)
.last(CommonConstants.LAST_ONE_SQL));
}
......@@ -2820,7 +2825,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSettleDomain domain;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))
.in(TSocialFundInfo::getSocialStatus,CommonConstants.socialStatus));
//已存在的社保数据
HashMap<String, TSocialFundInfo> socialMap = new HashMap<>();
......@@ -2874,7 +2880,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
socialist = socialInfoMapper.selectList(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard())
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString()));
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString())
.in(TSocialInfo::getHandleStatus,CommonConstants.socialInfoStatus)
);
if (CollectionUtils.isNotEmpty(socialist)) {
for (TSocialInfo socialInfo1 : socialist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
......@@ -3093,6 +3101,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isEmpty(tSocialInfo)) {
tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.in(TSocialInfo::getHandleStatus,CommonConstants.socialInfoStatus)
.last(CommonConstants.LAST_ONE_SQL));
}
......@@ -3286,7 +3295,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
TSettleDomain domain;
List<TSocialFundInfo> socialInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD)));
.in(TSocialFundInfo::getEmpIdcard, Common.listObjectToStrList(list, ExcelAttributeConstants.EMPIDCARD))
.in(TSocialFundInfo::getSocialStatus, CommonConstants.socialStatus));
//已存在的社保数据
HashMap<String, TSocialFundInfo> socialMap = new HashMap<>();
......@@ -3342,7 +3352,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
socialist = socialInfoMapper.selectList(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard())
.eq(TSocialInfo::getSocialProvince, infoVo.getSocialProvince().toString())
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString()));
.eq(TSocialInfo::getSocialCity, infoVo.getSocialCity().toString())
.in(TSocialInfo::getHandleStatus, CommonConstants.socialInfoStatus));
if (CollectionUtils.isNotEmpty(socialist)) {
for (TSocialInfo socialInfo1 : socialist) {
if ((Common.isEmpty(infoVo.getSocialTown()) || (Common.isNotNull(infoVo.getSocialTown()) &&
......@@ -3369,6 +3380,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (Common.isEmpty(tSocialInfo)) {
tSocialInfo = socialInfoMapper.selectOne(Wrappers.<TSocialInfo>query().lambda()
.eq(TSocialInfo::getEmpIdcard, infoVo.getEmpIdcard()).groupBy(TSocialInfo::getCreateTime)
.in(TSocialInfo::getHandleStatus, CommonConstants.socialInfoStatus)
.last(CommonConstants.LAST_ONE_SQL));
}
......
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