Merge branch 'release/2.9.8.2311.02' into release/个税版本
# Conflicts: # src/com/engine/salary/service/impl/TaxDeclarationServiceImpl.java # src/com/engine/salary/util/SalaryDateUtil.java
This commit is contained in:
commit
895da67d46
|
|
@ -0,0 +1,39 @@
|
|||
CREATE TABLE hrsa_insurance_base_history (
|
||||
|
||||
id NUMBER(20,0) NOT NULL,
|
||||
|
||||
employee_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
payment_organization NUMBER(11,0) NOT NULL,
|
||||
|
||||
welfare_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
adjust_before_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_after_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_before_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_after_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_welfare_item_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
operator NUMBER(20,0) NOT NULL,
|
||||
|
||||
operate_time DATE NULL,
|
||||
|
||||
create_time DATE NOT NULL,
|
||||
|
||||
update_time DATE NOT NULL,
|
||||
|
||||
creator NUMBER(20,0) NOT NULL,
|
||||
|
||||
delete_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
tenant_key VARCHAR2(10) NULL,
|
||||
|
||||
PRIMARY KEY (id)
|
||||
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE hrsa_salary_template ADD sms_setting CLOB NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
CREATE TABLE hrsa_insurance_base_history (
|
||||
|
||||
id NUMBER(20,0) NOT NULL,
|
||||
|
||||
employee_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
payment_organization NUMBER(11,0) NOT NULL,
|
||||
|
||||
welfare_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
adjust_before_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_after_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_before_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_after_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_welfare_item_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
operator NUMBER(20,0) NOT NULL,
|
||||
|
||||
operate_time DATE NULL,
|
||||
|
||||
create_time DATE NOT NULL,
|
||||
|
||||
update_time DATE NOT NULL,
|
||||
|
||||
creator NUMBER(20,0) NOT NULL,
|
||||
|
||||
delete_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
tenant_key VARCHAR2(10) NULL,
|
||||
|
||||
PRIMARY KEY (id)
|
||||
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE hrsa_salary_template ADD sms_setting CLOB NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
CREATE TABLE hrsa_insurance_base_history (
|
||||
|
||||
id NUMBER(20,0) NOT NULL,
|
||||
|
||||
employee_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
payment_organization NUMBER(11,0) NOT NULL,
|
||||
|
||||
welfare_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
adjust_before_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_after_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_before_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_after_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_welfare_item_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
operator NUMBER(20,0) NOT NULL,
|
||||
|
||||
operate_time DATE NULL,
|
||||
|
||||
create_time DATE NOT NULL,
|
||||
|
||||
update_time DATE NOT NULL,
|
||||
|
||||
creator NUMBER(20,0) NOT NULL,
|
||||
|
||||
delete_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
tenant_key VARCHAR2(10) NULL,
|
||||
|
||||
PRIMARY KEY (id)
|
||||
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE hrsa_salary_template ADD sms_setting CLOB NULL;
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
CREATE TABLE hrsa_insurance_base_history (
|
||||
|
||||
id bigint NOT NULL,
|
||||
|
||||
employee_id bigint NOT NULL,
|
||||
|
||||
payment_organization int NOT NULL,
|
||||
|
||||
welfare_type int NOT NULL,
|
||||
|
||||
adjust_before_scheme_id int NULL,
|
||||
|
||||
adjust_after_scheme_id int NULL,
|
||||
|
||||
adjust_before_base_value varchar(255) NULL,
|
||||
|
||||
adjust_after_base_value varchar(255) NULL,
|
||||
|
||||
adjust_welfare_item_id bigint NOT NULL,
|
||||
|
||||
operator bigint NOT NULL,
|
||||
|
||||
operate_time datetime NULL,
|
||||
|
||||
create_time datetime NOT NULL,
|
||||
|
||||
update_time datetime NOT NULL,
|
||||
|
||||
creator bigint NOT NULL,
|
||||
|
||||
delete_type int NOT NULL,
|
||||
|
||||
tenant_key varchar(10) NULL,
|
||||
|
||||
PRIMARY KEY (id)
|
||||
|
||||
);
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE hrsa_salary_template ADD COLUMN sms_setting text NULL ;
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
CREATE TABLE hrsa_insurance_base_history (
|
||||
|
||||
id NUMBER(20,0) NOT NULL,
|
||||
|
||||
employee_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
payment_organization NUMBER(11,0) NOT NULL,
|
||||
|
||||
welfare_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
adjust_before_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_after_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_before_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_after_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_welfare_item_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
operator NUMBER(20,0) NOT NULL,
|
||||
|
||||
operate_time DATE NULL,
|
||||
|
||||
create_time DATE NOT NULL,
|
||||
|
||||
update_time DATE NOT NULL,
|
||||
|
||||
creator NUMBER(20,0) NOT NULL,
|
||||
|
||||
delete_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
tenant_key VARCHAR2(10) NULL,
|
||||
|
||||
PRIMARY KEY (id)
|
||||
|
||||
)
|
||||
/
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE hrsa_salary_template ADD sms_setting CLOB NULL
|
||||
/
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
CREATE TABLE hrsa_insurance_base_history (
|
||||
|
||||
id bigint NOT NULL,
|
||||
|
||||
employee_id bigint NOT NULL,
|
||||
|
||||
payment_organization int NOT NULL,
|
||||
|
||||
welfare_type int NOT NULL,
|
||||
|
||||
adjust_before_scheme_id int,
|
||||
|
||||
adjust_after_scheme_id int,
|
||||
|
||||
adjust_before_base_value varchar(255),
|
||||
|
||||
adjust_after_base_value varchar(255),
|
||||
|
||||
adjust_welfare_item_id bigint NOT NULL,
|
||||
|
||||
operator bigint NOT NULL,
|
||||
|
||||
operate_time timestamp(0),
|
||||
|
||||
create_time timestamp(0) NOT NULL,
|
||||
|
||||
update_time timestamp(0) NOT NULL,
|
||||
|
||||
creator bigint NOT NULL,
|
||||
|
||||
delete_type int NOT NULL,
|
||||
|
||||
tenant_key varchar(10),
|
||||
|
||||
PRIMARY KEY (id)
|
||||
|
||||
);
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE hrsa_salary_template ADD COLUMN sms_setting text NULL ;
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
CREATE TABLE [hrsa_insurance_base_history] (
|
||||
|
||||
[id] bigint NOT NULL,
|
||||
|
||||
[employee_id] bigint NOT NULL,
|
||||
|
||||
[payment_organization] int NOT NULL,
|
||||
|
||||
[welfare_type] int NOT NULL,
|
||||
|
||||
[adjust_before_scheme_id] int NULL,
|
||||
|
||||
[adjust_after_scheme_id] int NULL,
|
||||
|
||||
[adjust_before_base_value] varchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
|
||||
[adjust_after_base_value] varchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
|
||||
[adjust_welfare_item_id] bigint NOT NULL,
|
||||
|
||||
[operator] bigint NOT NULL,
|
||||
|
||||
[operate_time] datetime NULL,
|
||||
|
||||
[create_time] datetime NOT NULL,
|
||||
|
||||
[update_time] datetime NOT NULL,
|
||||
|
||||
[creator] bigint NOT NULL,
|
||||
|
||||
[delete_type] int NOT NULL,
|
||||
|
||||
[tenant_key] varchar(10) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
|
||||
PRIMARY KEY ([id])
|
||||
|
||||
)
|
||||
|
||||
GO
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE hrsa_salary_template ADD sms_setting text NULL
|
||||
GO
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
CREATE TABLE hrsa_insurance_base_history (
|
||||
|
||||
id NUMBER(20,0) NOT NULL,
|
||||
|
||||
employee_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
payment_organization NUMBER(11,0) NOT NULL,
|
||||
|
||||
welfare_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
adjust_before_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_after_scheme_id NUMBER(11,0) NULL,
|
||||
|
||||
adjust_before_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_after_base_value VARCHAR2(255) NULL,
|
||||
|
||||
adjust_welfare_item_id NUMBER(20,0) NOT NULL,
|
||||
|
||||
operator NUMBER(20,0) NOT NULL,
|
||||
|
||||
operate_time DATE NULL,
|
||||
|
||||
create_time DATE NOT NULL,
|
||||
|
||||
update_time DATE NOT NULL,
|
||||
|
||||
creator NUMBER(20,0) NOT NULL,
|
||||
|
||||
delete_type NUMBER(11,0) NOT NULL,
|
||||
|
||||
tenant_key VARCHAR2(10) NULL,
|
||||
|
||||
PRIMARY KEY (id)
|
||||
|
||||
);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE hrsa_salary_template ADD sms_setting CLOB NULL;
|
||||
/
|
||||
|
||||
|
|
@ -1958,7 +1958,7 @@ public class SIArchivesBiz {
|
|||
Date now = new Date();
|
||||
List<InsuranceArchivesBaseHistoryPO> toCreateAdjustHistoryList = new ArrayList<>();
|
||||
//旧档案不存在基数信息,则直接遍历新的基数数据,生成调整记录;旧档案存在基数信息,则合并新旧基数数据,遍历合并后的技术数据中的key,生成调整记录。
|
||||
if(adjustInfo.getAdjustAfterBaseJson() != null && adjustInfo.getAdjustBeforeBaseJson() == null) {
|
||||
if(StringUtils.isNotBlank(adjustInfo.getAdjustAfterBaseJson()) && StringUtils.isBlank(adjustInfo.getAdjustBeforeBaseJson())) {
|
||||
Map<String, Object> adjustAfterBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterBaseJson(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
for (String key : adjustAfterBaseMap.keySet()) {
|
||||
|
|
@ -1976,36 +1976,43 @@ public class SIArchivesBiz {
|
|||
adjustItem.setId(IdGenerator.generate());
|
||||
toCreateAdjustHistoryList.add(adjustItem);
|
||||
}
|
||||
} else if (adjustInfo.getAdjustAfterBaseJson() != null && adjustInfo.getAdjustBeforeBaseJson() != null) {
|
||||
} else if (StringUtils.isNotBlank(adjustInfo.getAdjustAfterBaseJson()) && StringUtils.isNotBlank(adjustInfo.getAdjustBeforeBaseJson())) {
|
||||
Map<String, Object> adjustAfterBaseMap = JSON.parseObject(adjustInfo.getAdjustAfterBaseJson(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> adjustBeforeBaseMap = JSON.parseObject(adjustInfo.getAdjustBeforeBaseJson(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> reDealMap = new HashMap<>();
|
||||
reDealMap.putAll(adjustAfterBaseMap);
|
||||
reDealMap.putAll(adjustBeforeBaseMap);
|
||||
for (String key : reDealMap.keySet()) {
|
||||
String beforeValue = (String) adjustBeforeBaseMap.get(key);
|
||||
String afterValue = (String) adjustAfterBaseMap.get(key);
|
||||
if (SalaryEntityUtil.empty2Zero(beforeValue).compareTo(SalaryEntityUtil.empty2Zero(afterValue)) == 0) {
|
||||
continue;
|
||||
}
|
||||
InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO();
|
||||
BeanUtils.copyProperties(adjustInfo, adjustItem);
|
||||
adjustItem.setAdjustWelfareItemId(Long.valueOf(key));
|
||||
adjustItem.setAdjustBeforeBaseValue(beforeValue);
|
||||
adjustItem.setAdjustAfterBaseValue(afterValue);
|
||||
adjustItem.setOperateTime(now);
|
||||
adjustItem.setOperator(creator);
|
||||
adjustItem.setCreator(creator);
|
||||
adjustItem.setCreateTime(now);
|
||||
adjustItem.setUpdateTime(now);
|
||||
adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
adjustItem.setId(IdGenerator.generate());
|
||||
|
||||
toCreateAdjustHistoryList.add(adjustItem);
|
||||
if (adjustAfterBaseMap != null) {
|
||||
reDealMap.putAll(adjustAfterBaseMap);
|
||||
}
|
||||
if (adjustBeforeBaseMap != null) {
|
||||
reDealMap.putAll(adjustBeforeBaseMap);
|
||||
}
|
||||
if (reDealMap.size() >0) {
|
||||
for (String key : reDealMap.keySet()) {
|
||||
String beforeValue = (String) adjustBeforeBaseMap.get(key);
|
||||
String afterValue = (String) adjustAfterBaseMap.get(key);
|
||||
if (SalaryEntityUtil.empty2Zero(beforeValue).compareTo(SalaryEntityUtil.empty2Zero(afterValue)) == 0) {
|
||||
continue;
|
||||
}
|
||||
InsuranceArchivesBaseHistoryPO adjustItem = new InsuranceArchivesBaseHistoryPO();
|
||||
BeanUtils.copyProperties(adjustInfo, adjustItem);
|
||||
adjustItem.setAdjustWelfareItemId(Long.valueOf(key));
|
||||
adjustItem.setAdjustBeforeBaseValue(beforeValue);
|
||||
adjustItem.setAdjustAfterBaseValue(afterValue);
|
||||
adjustItem.setOperateTime(now);
|
||||
adjustItem.setOperator(creator);
|
||||
adjustItem.setCreator(creator);
|
||||
adjustItem.setCreateTime(now);
|
||||
adjustItem.setUpdateTime(now);
|
||||
adjustItem.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
adjustItem.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
adjustItem.setId(IdGenerator.generate());
|
||||
|
||||
toCreateAdjustHistoryList.add(adjustItem);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return toCreateAdjustHistoryList;
|
||||
}
|
||||
|
|
@ -2059,8 +2066,14 @@ public class SIArchivesBiz {
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
InsuranceBaseAdjustHistoryMapper mapper = sqlSession.getMapper(InsuranceBaseAdjustHistoryMapper.class);
|
||||
List<InsuranceArchivesBaseHistoryDTO> list = mapper.listByEmployeeIdAndOperator(operator, employeeId);
|
||||
return list;
|
||||
List<InsuranceArchivesBaseHistoryDTO> empList = mapper.listByEmployeeIdAndOperator(operator, employeeId);
|
||||
List<InsuranceArchivesBaseHistoryDTO> extEmpList = mapper.listByExtEmpIdAndOperator(operator, employeeId);
|
||||
if (extEmpList != null) {
|
||||
empList.addAll(extEmpList);
|
||||
empList = empList.stream().filter(f -> StringUtils.isNotBlank(f.getEmployeeName()))
|
||||
.sorted(Comparator.comparing(InsuranceArchivesBaseHistoryDTO::getOperateTime).reversed()).collect(Collectors.toList());
|
||||
}
|
||||
return empList;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ public class DataCollectionEmployee {
|
|||
|
||||
@SalaryFormulaVar(defaultLabel = "状态编码", labelId = 98624, dataType = "string")
|
||||
private String status;
|
||||
|
||||
@SalaryFormulaVar(defaultLabel = "状态", labelId = 98622, dataType = "string")
|
||||
private String statusName;
|
||||
|
||||
//工号
|
||||
|
|
|
|||
|
|
@ -10,10 +10,7 @@ import com.engine.salary.constant.SalaryArchiveConstant;
|
|||
import com.engine.salary.constant.SalaryBillConstant;
|
||||
import com.engine.salary.constant.SalaryTemplateSalaryItemSetGroupConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryBillSendDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryBillWatermarkDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateSalaryItemListDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateSalaryItemSetListDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.*;
|
||||
import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
|
||||
import com.engine.salary.entity.salaryformula.dto.SalaryFormulaEmployeeDTO;
|
||||
import com.engine.salary.enums.salarybill.MessageChannelEnum;
|
||||
|
|
@ -27,6 +24,7 @@ import com.google.common.collect.Lists;
|
|||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.pdfbox.multipdf.PDFMergerUtility;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
|
|
@ -42,6 +40,7 @@ import java.io.*;
|
|||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -129,21 +128,21 @@ public class SalaryBillBO {
|
|||
if (employeeInformation == null || simpleEmployee == null) {
|
||||
return;
|
||||
}
|
||||
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(employeeInformation.getItems())) {
|
||||
if (CollectionUtils.isNotEmpty(employeeInformation.getItems())) {
|
||||
//获取员工信息的字段名和中文描述的map关系
|
||||
SalaryFormulaEmployeeDTO salaryFormulaEmployeeDTO = SalaryFormulaEmployeeDTO.builder().employeeId(simpleEmployee.getEmployeeId())
|
||||
SalaryFormulaEmployeeDTO salaryFormulaEmployeeDTO = SalaryFormulaEmployeeDTO.builder()
|
||||
.employeeId(simpleEmployee.getEmployeeId())
|
||||
.taxAgentName(salaryBillSendParam.getTaxAgentName())
|
||||
.departmentName(simpleEmployee.getDepartmentName())
|
||||
.email(org.apache.commons.lang3.StringUtils.isEmpty(simpleEmployee.getEmail()) ? "" : simpleEmployee.getEmail())
|
||||
// .gradeName(simpleEmployee.getGrade() == null ? "" : simpleEmployee.getGrade().getName())
|
||||
// .hireDate(SalaryDateUtil.getFormatLocalDate(simpleEmployee.getHiredate()))
|
||||
// .sex(simpleEmployee.getSex() == null ? "" : simpleEmployee.getSex().getDescription())
|
||||
.mobile(org.apache.commons.lang3.StringUtils.isEmpty(simpleEmployee.getMobile()) ? "" : simpleEmployee.getMobile())
|
||||
.jobtitleName(simpleEmployee.getJobtitleName())
|
||||
// .status(StringUtils.isEmpty(simpleEmployee.getPersonnelStatus()) ? "" : simpleEmployee.getPersonnelStatus())
|
||||
.telephone(org.apache.commons.lang3.StringUtils.isEmpty(simpleEmployee.getTelephone()) ? "" : simpleEmployee.getTelephone())
|
||||
.username(org.apache.commons.lang3.StringUtils.isEmpty(simpleEmployee.getUsername()) ? "" : simpleEmployee.getUsername())
|
||||
.email(StringUtils.isEmpty(simpleEmployee.getEmail()) ? "" : simpleEmployee.getEmail())
|
||||
.sex(simpleEmployee.getSex() == null ? "" : simpleEmployee.getSex())
|
||||
.mobile(StringUtils.isEmpty(simpleEmployee.getMobile()) ? "" : simpleEmployee.getMobile()).jobtitleName(simpleEmployee.getJobtitleName())
|
||||
.status(StringUtils.isEmpty(simpleEmployee.getStatus()) ? "" : simpleEmployee.getStatus())
|
||||
.telephone(StringUtils.isEmpty(simpleEmployee.getTelephone()) ? "" : simpleEmployee.getTelephone())
|
||||
.username(StringUtils.isEmpty(simpleEmployee.getUsername()) ? "" : simpleEmployee.getUsername())
|
||||
.workcode(simpleEmployee.getWorkcode())
|
||||
.idNo(simpleEmployee.getIdNo())
|
||||
.statusName(simpleEmployee.getStatusName())
|
||||
.build();
|
||||
List<SalaryTemplateSalaryItemListDTO> items = employeeInformation.getItems();
|
||||
// 1.SalaryAcctResultBO.buildEmployeeFieldName()的取法
|
||||
|
|
@ -152,7 +151,7 @@ public class SalaryBillBO {
|
|||
// Optional<Map.Entry<String, String>> entry = entries.stream().filter(f -> Objects.equals(e.getName(), f.getValue())).findFirst();
|
||||
// if (entry.isPresent()) {
|
||||
// String key = entry.get().getKey();
|
||||
// if (org.apache.commons.lang3.StringUtils.isNotBlank(key)) {
|
||||
// if (StringUtils.isNotBlank(key)) {
|
||||
// String getter = "get" + key.substring(0, 1).toUpperCase() + key.substring(1);
|
||||
// try {
|
||||
// Method method = salaryFormulaEmployeeDTO.getClass().getMethod(getter);
|
||||
|
|
@ -203,9 +202,7 @@ public class SalaryBillBO {
|
|||
}
|
||||
}
|
||||
|
||||
return theme
|
||||
.replace("${companyName}", companyName)
|
||||
.replace("${salaryMonth}", new SimpleDateFormat("yyyy年MM月").format(salaryMonth));
|
||||
return theme.replace("${companyName}", companyName).replace("${salaryMonth}", new SimpleDateFormat("yyyy年MM月").format(salaryMonth));
|
||||
}
|
||||
|
||||
// /**
|
||||
|
|
@ -289,7 +286,7 @@ public class SalaryBillBO {
|
|||
File touch = FileUtil.touch(htmlPath);
|
||||
FileUtil.appendUtf8String(content, touch);
|
||||
|
||||
String pdfPath = HrmSalaryPayrollConf.GEN_PATH + yyyyMM + File.separator+ sendId + File.separator + id + ".pdf";
|
||||
String pdfPath = HrmSalaryPayrollConf.GEN_PATH + yyyyMM + File.separator + sendId + File.separator + id + ".pdf";
|
||||
FileUtil.del(pdfPath);
|
||||
HtmlToPdf.convert(HrmSalaryPayrollConf.TO_PDF_TOOL_PATH, htmlPath, pdfPath);
|
||||
}
|
||||
|
|
@ -364,14 +361,37 @@ public class SalaryBillBO {
|
|||
|
||||
public static void sendSMS(Map<String, Object> e, SalaryBillSendDTO salaryBillSendParam) {
|
||||
|
||||
System.out.println(111);
|
||||
|
||||
// try {
|
||||
// MessageUtil.sendSMS(mobile, content);
|
||||
// } catch (Exception e) {
|
||||
// kqLog.info("SendSMS error.resourceId:" + resourceId + ">>>>>>mobile>>>>>>" + mobile);
|
||||
// log.writeLog(e);
|
||||
// }
|
||||
SalaryTemplateSMSSetDTO smsSetting = salaryBillSendParam.getSmsSetting();
|
||||
String content = smsSetting != null ? smsSetting.getContent() : "";
|
||||
if (StringUtils.isBlank(content)) {
|
||||
return;
|
||||
}
|
||||
|
||||
content = content.replace("{薪资所属月}", SalaryDateUtil.getFormatYearMonth(salaryBillSendParam.getSalaryDate()));
|
||||
|
||||
for (SalaryTemplateSalaryItemListDTO item : salaryBillSendParam.getEmployeeInformation().getItems()) {
|
||||
content = content.replace("{" + item.getName() + "}", item.getSalaryItemValue());
|
||||
}
|
||||
|
||||
for (SalaryTemplateSalaryItemSetListDTO salaryTemplateSalaryItemSetListDTO : salaryBillSendParam.getSalaryItemSetList()) {
|
||||
for (SalaryTemplateSalaryItemListDTO item : salaryTemplateSalaryItemSetListDTO.getItems()) {
|
||||
if (content.contains("{" + item.getName() + "}")) {
|
||||
content = content.replace("{" + item.getName() + "}", e.getOrDefault(item.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX, "").toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
log.info("发送短信内容, {}", content);
|
||||
if (e.get("mobile") != null) {
|
||||
MessageUtil.sendSMS(e.get("mobile").toString(), content);
|
||||
} else {
|
||||
log.error("发送短信失败,{}手机号为空", e.getOrDefault("username", ""));
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("发送短信失败", ex);
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
|
|
@ -563,9 +583,7 @@ public class SalaryBillBO {
|
|||
InputStream imageInputStream = ImageFileManager.getInputStreamById(imagefileid);
|
||||
byte[] data = readInputStream(imageInputStream);
|
||||
String imageBase64 = "data:image/jpeg;base64," + Base64Utils.encodeToString(data);
|
||||
emailContent.append("<div style='width: 100%;margin-top: 16px;text-align: right;line-height: 1.5715;font-family: PingFangSC-Regular;font-size: 12px;color: #111111;'>\n" +
|
||||
" <img style='width: 140px;height: 70px;' src='" + imageBase64 + "'>" +
|
||||
" </div>");
|
||||
emailContent.append("<div style='width: 100%;margin-top: 16px;text-align: right;line-height: 1.5715;font-family: PingFangSC-Regular;font-size: 12px;color: #111111;'>\n" + " <img style='width: 140px;height: 70px;' src='" + imageBase64 + "'>" + " </div>");
|
||||
}
|
||||
}
|
||||
emailContent.append("</div>");
|
||||
|
|
@ -623,15 +641,20 @@ public class SalaryBillBO {
|
|||
} else {
|
||||
for (Object keyName : e.keySet()) {
|
||||
if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) {
|
||||
boolean isHide = (isHideNull && e.get(keyName.toString()) != null) || (isHideZero && "0.00".equals(e.get(keyName.toString())));
|
||||
// 4.2.薪资项目
|
||||
emailContent.append("<th style=\"background-color:#fafafa;padding:16px 24px;color:#000000d9;font-weight:400;font-size:12px;line-height:1.5715;text-align:start;border:1px solid rgba(0,0,0,.06);min-width:100px;max-width:100px\">");
|
||||
emailContent.append(salaryItem.getName());
|
||||
emailContent.append("</th>");
|
||||
boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString()))
|
||||
||
|
||||
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
||||
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString()))==0);
|
||||
if (!isHide) {
|
||||
// 4.2.薪资项目
|
||||
emailContent.append("<th style=\"background-color:#fafafa;padding:16px 24px;color:#000000d9;font-weight:400;font-size:12px;line-height:1.5715;text-align:start;border:1px solid rgba(0,0,0,.06);min-width:100px;max-width:100px\">");
|
||||
emailContent.append(salaryItem.getName());
|
||||
emailContent.append("</th>");
|
||||
|
||||
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
||||
emailContent.append(e.get(keyName.toString()));
|
||||
emailContent.append("</td>");
|
||||
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
||||
emailContent.append(e.get(keyName.toString()));
|
||||
emailContent.append("</td>");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -698,15 +721,20 @@ public class SalaryBillBO {
|
|||
SalaryTemplateSalaryItemListDTO salaryItem = itemPartition.get(i);
|
||||
for (Object keyName : e.keySet()) {
|
||||
if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) {
|
||||
boolean isHide = (isHideNull && e.get(keyName.toString()) != null) || (isHideZero && "0.00".equals(e.get(keyName.toString())));
|
||||
// 4.2.薪资项目
|
||||
emailContent.append("<th style=\"background-color:#fafafa;padding:16px 24px;color:#000000d9;font-weight:400;font-size:12px;line-height:1.5715;text-align:start;border:1px solid rgba(0,0,0,.06);min-width:100px;max-width:100px\">");
|
||||
emailContent.append(salaryItem.getName());
|
||||
emailContent.append("</th>");
|
||||
boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString()))
|
||||
||
|
||||
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
||||
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString()))==0);
|
||||
if (!isHide) {
|
||||
// 4.2.薪资项目
|
||||
emailContent.append("<th style=\"background-color:#fafafa;padding:16px 24px;color:#000000d9;font-weight:400;font-size:12px;line-height:1.5715;text-align:start;border:1px solid rgba(0,0,0,.06);min-width:100px;max-width:100px\">");
|
||||
emailContent.append(salaryItem.getName());
|
||||
emailContent.append("</th>");
|
||||
|
||||
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
||||
emailContent.append(e.get(keyName.toString()));
|
||||
emailContent.append("</td>");
|
||||
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
||||
emailContent.append(e.get(keyName.toString()));
|
||||
emailContent.append("</td>");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ public class SalaryBillSendDTO {
|
|||
//工资单模板-薪资项目设置
|
||||
private List<SalaryTemplateSalaryItemSetListDTO> salaryItemSetList;
|
||||
|
||||
//短信模板
|
||||
private SalaryTemplateSMSSetDTO smsSetting;
|
||||
|
||||
//工资单模板-员工基本信息
|
||||
private SalaryTemplateSalaryItemSetListDTO employeeInformation;
|
||||
|
||||
|
|
@ -74,7 +77,7 @@ public class SalaryBillSendDTO {
|
|||
private String remarkI18n;
|
||||
|
||||
//邮件是否可以发送邮件
|
||||
private boolean isEnableEmail;
|
||||
// private boolean isEnableEmail;
|
||||
|
||||
//工资单发放
|
||||
private SalarySendPO salarySend;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,16 @@ public class SalaryTemplateBaseSetDTO {
|
|||
//消息中心")
|
||||
private Boolean msgStatus;
|
||||
|
||||
/**
|
||||
* 短信开启状态。0:关、1:开,默认关闭
|
||||
*/
|
||||
private Integer smsStatus;
|
||||
|
||||
/**
|
||||
* 短信模板设置
|
||||
*/
|
||||
private String smsSetting;
|
||||
|
||||
// 是否启用工资单定时发送
|
||||
private Boolean autoSendStatus;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
package com.engine.salary.entity.salaryBill.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryTemplateSMSDTO {
|
||||
|
||||
//展示名称
|
||||
private String itemName;
|
||||
|
||||
//薪资项目
|
||||
private String itemKey;
|
||||
|
||||
//来源
|
||||
private String source;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.engine.salary.entity.salaryBill.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 短信模板设置
|
||||
* <p>Copyright: Copyright (c) 2023</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryTemplateSMSSetDTO {
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.salaryBill.param;
|
||||
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateSMSSetDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateSalaryItemSetListDTO;
|
||||
import com.engine.salary.enums.salarybill.SalaryTemplateTextContentPositionEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -45,6 +46,9 @@ public class SalaryTemplateSaveParam {
|
|||
// 消息中心开启状态。false:关、true:开
|
||||
private Boolean msgStatus;
|
||||
|
||||
// 短信开关 false:关、true:开
|
||||
private Boolean smsStatus;
|
||||
|
||||
// 主题
|
||||
private String theme;
|
||||
|
||||
|
|
@ -78,6 +82,9 @@ public class SalaryTemplateSaveParam {
|
|||
// 薪资项目设置
|
||||
private List<SalaryTemplateSalaryItemSetListDTO> salaryItemSetting;
|
||||
|
||||
//短信模板
|
||||
private SalaryTemplateSMSSetDTO smsSetting;
|
||||
|
||||
|
||||
// 补发工资单模板名称
|
||||
private String replenishName;
|
||||
|
|
@ -100,7 +107,6 @@ public class SalaryTemplateSaveParam {
|
|||
|
||||
/**
|
||||
* 反馈流程地址
|
||||
*
|
||||
*/
|
||||
private String feedbackUrl;
|
||||
|
||||
|
|
@ -153,11 +159,11 @@ public class SalaryTemplateSaveParam {
|
|||
}
|
||||
|
||||
if (saveParam.getAutoSendStatus() == Boolean.TRUE) {
|
||||
if(StringUtils.isBlank(saveParam.getAutoSendDayOfMonth()))
|
||||
if (StringUtils.isBlank(saveParam.getAutoSendDayOfMonth()))
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(140509, "自动发放日期不能为空"));
|
||||
if(Objects.isNull(saveParam.getAutoSendCycleType()))
|
||||
if (Objects.isNull(saveParam.getAutoSendCycleType()))
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(140509, "自动发放周期不能为空"));
|
||||
if(StringUtils.isBlank(saveParam.getAutoSendTimeOfDay()))
|
||||
if (StringUtils.isBlank(saveParam.getAutoSendTimeOfDay()))
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(140509, "自动发放时间不能为空"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,11 @@ public class SalaryTemplatePO {
|
|||
*/
|
||||
private Integer smsStatus;
|
||||
|
||||
/**
|
||||
* 短信模板设置
|
||||
*/
|
||||
private String smsSetting;
|
||||
|
||||
/**
|
||||
* 薪酬水印
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public interface SalaryAcctResultMapper {
|
|||
* @param salaryAcctEmpIds
|
||||
* @param salaryItemIds
|
||||
*/
|
||||
void deleteByAcctEmpIdsAndSalaryItemIds(@Param("salaryAcctEmpIds") Collection<Long> salaryAcctEmpIds,
|
||||
void deleteByAcctEmpIdsAndSalaryItemIds(@Param("salaryAcctEmpIds") List<Long> salaryAcctEmpIds,
|
||||
@Param("salaryItemIds") Collection<Long> salaryItemIds);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
<result column="update_time" property="updateTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="sms_setting" property="smsSetting"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
|
|
@ -62,6 +63,7 @@
|
|||
, t.update_time
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.sms_setting
|
||||
</sql>
|
||||
<select id="getById" resultType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO">
|
||||
SELECT id,
|
||||
|
|
@ -94,6 +96,7 @@
|
|||
update_time,
|
||||
creator,
|
||||
delete_type,
|
||||
sms_setting,
|
||||
tenant_key
|
||||
FROM hrsa_salary_template
|
||||
WHERE delete_type = 0
|
||||
|
|
@ -538,7 +541,10 @@
|
|||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator}
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="smsSetting != null">
|
||||
sms_setting=#{smsSetting}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
|
|
@ -645,6 +651,9 @@
|
|||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="smsSetting != null">
|
||||
sms_setting,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
|
@ -740,6 +749,9 @@
|
|||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="smsSetting != null">
|
||||
#{smsSetting},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -845,6 +857,9 @@
|
|||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="smsSetting != null">
|
||||
sms_setting,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
|
@ -940,6 +955,9 @@
|
|||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="smsSetting != null">
|
||||
#{sms_setting},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,4 +26,5 @@ public interface InsuranceBaseAdjustHistoryMapper {
|
|||
* 根据操作人或操作对象获取基数调整记录
|
||||
*/
|
||||
List<InsuranceArchivesBaseHistoryDTO> listByEmployeeIdAndOperator(@Param("operator")Long operator, @Param("employeeId")Long employeeId);
|
||||
List<InsuranceArchivesBaseHistoryDTO> listByExtEmpIdAndOperator(@Param("operator")Long operator, @Param("employeeId")Long employeeId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,4 +196,40 @@
|
|||
</if>
|
||||
ORDER BY t.operate_time DESC, t.adjust_welfare_item_id ASC
|
||||
</select>
|
||||
|
||||
<select id="listByExtEmpIdAndOperator" resultType="com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseHistoryDTO">
|
||||
SELECT
|
||||
t.id
|
||||
, t.employee_id
|
||||
, t.payment_organization
|
||||
, t.welfare_type
|
||||
, t.adjust_before_scheme_id
|
||||
, t.adjust_after_scheme_id
|
||||
, t.adjust_before_base_value
|
||||
, t.adjust_after_base_value
|
||||
, t.adjust_welfare_item_id
|
||||
, t.operator
|
||||
, t.operate_time
|
||||
, ca.insurance_name as welfareItemName
|
||||
, sb.scheme_name as adjustBeforeSchemeName
|
||||
, sa.scheme_name as adjustAfterSchemeName
|
||||
, eo.lastname as operatorName
|
||||
, ee.username as employeeName
|
||||
, p.name as paymentOrganizationName
|
||||
FROM hrsa_insurance_base_history t
|
||||
LEFT JOIN hrmresource eo on eo.id = t.operator
|
||||
LEFT JOIN hrsa_external_employee ee on ee.id = t.employee_id
|
||||
LEFT JOIN hrsa_social_security_scheme sb on sb.id = t.adjust_before_scheme_id
|
||||
LEFT JOIN hrsa_social_security_scheme sa on sa.id = t.adjust_after_scheme_id
|
||||
LEFT JOIN hrsa_insurance_category ca on ca.id = t.adjust_welfare_item_id
|
||||
LEFT JOIN hrsa_tax_agent p on p.id = t.payment_organization
|
||||
WHERE t.delete_type = 0
|
||||
<if test="employeeId != null ">
|
||||
AND t.employee_id = #{employeeId}
|
||||
</if>
|
||||
<if test="operator != null ">
|
||||
AND t.operator = #{operator}
|
||||
</if>
|
||||
ORDER BY t.operate_time DESC, t.adjust_welfare_item_id ASC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -3,6 +3,7 @@ package com.engine.salary.service;
|
|||
import com.engine.salary.entity.report.po.SalaryAcctResultReportPO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 薪资报表
|
||||
|
|
@ -36,6 +37,6 @@ public interface SalaryAcctReportService {
|
|||
* @param salaryAcctEmployeeIds 薪资核算人员id
|
||||
* @param salaryItemIds 薪资项目id
|
||||
*/
|
||||
void deleteByAcctEmployeeIdsAndSalaryItemIds(Collection<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds);
|
||||
void deleteByAcctEmployeeIdsAndSalaryItemIds(List<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ public interface SalaryAcctResultService {
|
|||
* @param salaryAcctEmployeeIds 薪资核算人员id
|
||||
* @param salaryItemIds 薪资项目id
|
||||
*/
|
||||
void deleteByAcctEmployeeIdsAndSalaryItemIds(Collection<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds);
|
||||
void deleteByAcctEmployeeIdsAndSalaryItemIds(List<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds);
|
||||
|
||||
/**
|
||||
* 根据薪资核算记录id删除薪资核算结果
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.engine.salary.service.impl;
|
|||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.api.formmode.page.util.Util;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
|
|
@ -39,8 +38,6 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.company.DepartmentComInfo;
|
||||
import weaver.hrm.company.SubCompanyComInfo;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -625,30 +622,30 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
|
|||
// 获取分部信息
|
||||
List<Long> subCompanyIds = param.getSubCompany();
|
||||
if (CollectionUtils.isNotEmpty(subCompanyIds)) {
|
||||
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
|
||||
List<String> allSubcompanyIds = new ArrayList<>();
|
||||
for (Long subCompanyId : subCompanyIds) {
|
||||
String organizationIds = Util.null2String(subCompanyId);
|
||||
String allChildSubcompanyId = subCompanyComInfo.getAllChildSubcompanyId(subCompanyId.toString(), organizationIds);
|
||||
allSubcompanyIds.addAll(Arrays.asList(allChildSubcompanyId.split(",")));
|
||||
}
|
||||
employeeList = employeeList.stream().filter(emp -> allSubcompanyIds.contains(emp.getSubcompanyid().toString())).collect(Collectors.toList());
|
||||
// SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
|
||||
// List<String> allSubcompanyIds = new ArrayList<>();
|
||||
// for (Long subCompanyId : subCompanyIds) {
|
||||
// String organizationIds = Util.null2String(subCompanyId);
|
||||
// String allChildSubcompanyId = subCompanyComInfo.getAllChildSubcompanyId(subCompanyId.toString(), organizationIds);
|
||||
// allSubcompanyIds.addAll(Arrays.asList(allChildSubcompanyId.split(",")));
|
||||
// }
|
||||
employeeList = employeeList.stream().filter(emp -> subCompanyIds.contains(emp.getSubcompanyid())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
// 部门过滤
|
||||
List<Long> depart = param.getDepart();
|
||||
if (CollectionUtils.isNotEmpty(depart)) {
|
||||
List<String> allDepartIds = new ArrayList<>();
|
||||
for (Long subDepartId : depart) {
|
||||
String ids = Util.null2String(subDepartId);
|
||||
try {
|
||||
String allDepartId = DepartmentComInfo.getAllChildDepartId(subDepartId.toString(), ids);
|
||||
allDepartIds.addAll(Arrays.asList(allDepartId.toString().split(",")));
|
||||
} catch (Exception e) {
|
||||
log.error("获取子部门失败", e);
|
||||
}
|
||||
}
|
||||
employeeList = employeeList.stream().filter(emp -> allDepartIds.contains(emp.getDepartmentId().toString())).collect(Collectors.toList());
|
||||
// List<String> allDepartIds = new ArrayList<>();
|
||||
// for (Long subDepartId : depart) {
|
||||
// String ids = Util.null2String(subDepartId);
|
||||
// try {
|
||||
// String allDepartId = DepartmentComInfo.getAllChildDepartId(subDepartId.toString(), ids);
|
||||
// allDepartIds.addAll(Arrays.asList(allDepartId.toString().split(",")));
|
||||
// } catch (Exception e) {
|
||||
// log.error("获取子部门失败", e);
|
||||
// }
|
||||
// }
|
||||
employeeList = employeeList.stream().filter(emp -> depart.contains(emp.getDepartmentId())).collect(Collectors.toList());
|
||||
}
|
||||
// 职级过滤
|
||||
// if (CollectionUtils.isNotEmpty(param.getGrade())) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.engine.salary.sys.enums.OpenEnum;
|
|||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -82,10 +83,11 @@ public class SalaryAcctReportServiceImpl extends Service implements SalaryAcctRe
|
|||
}
|
||||
|
||||
@Override
|
||||
public void deleteByAcctEmployeeIdsAndSalaryItemIds(Collection<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds) {
|
||||
public void deleteByAcctEmployeeIdsAndSalaryItemIds(List<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds) {
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployeeIds) && CollectionUtils.isNotEmpty(salaryItemIds)) {
|
||||
List<String> salaryAcctEmployeeIdsStr = salaryAcctEmployeeIds.stream().map(e -> AESEncryptUtil.encrypt(e.toString())).collect(Collectors.toList());
|
||||
getSalaryAcctResultReportMapper().deleteByAcctEmpIdsAndSalaryItemIds(salaryAcctEmployeeIdsStr, salaryItemIds);
|
||||
List<List<String>> partition = Lists.partition(salaryAcctEmployeeIdsStr, 300);
|
||||
partition.forEach(part -> getSalaryAcctResultReportMapper().deleteByAcctEmpIdsAndSalaryItemIds(part, salaryItemIds));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -626,7 +626,8 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
// salaryAcctResultPOS.addAll(salarySobBackItemResultPO);
|
||||
// }
|
||||
// 删除原来的薪资核算结果
|
||||
deleteBySalaryAcctEmployeeIds(Collections.singleton(saveParam.getSalaryAcctEmpId()));
|
||||
List<Long> saveItemIds = saveParam.getItems().stream().map(SalaryAcctResultSaveParam.SalaryAcctResultDetailItemParam::getSalaryItemId).collect(Collectors.toList());
|
||||
deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(saveParam.getSalaryAcctEmpId()), saveItemIds);
|
||||
// 保存薪资核算结果
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctResultPOS)) {
|
||||
// 加密
|
||||
|
|
@ -635,7 +636,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
partition.forEach(getSalaryAcctResultMapper()::batchInsert);
|
||||
}
|
||||
//报表 todo
|
||||
getSalaryAcctReportService(user).deleteBySalaryAcctEmpIds(Collections.singleton(saveParam.getSalaryAcctEmpId()));
|
||||
getSalaryAcctReportService(user).deleteByAcctEmployeeIdsAndSalaryItemIds(Collections.singletonList(saveParam.getSalaryAcctEmpId()), saveItemIds);
|
||||
List<SalaryAcctResultReportPO> salaryAcctResultReportPOS = SalaryAcctResultReportBO.convert2PO(saveParam, salaryAcctEmployeePO, (long) user.getUID(), emps);
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctResultReportPOS)) {
|
||||
getSalaryAcctReportService(user).batchSave(salaryAcctResultReportPOS);
|
||||
|
|
@ -708,8 +709,9 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
|
||||
|
||||
@Override
|
||||
public void deleteByAcctEmployeeIdsAndSalaryItemIds(Collection<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds) {
|
||||
getSalaryAcctResultMapper().deleteByAcctEmpIdsAndSalaryItemIds(salaryAcctEmployeeIds, salaryItemIds);
|
||||
public void deleteByAcctEmployeeIdsAndSalaryItemIds(List<Long> salaryAcctEmployeeIds, Collection<Long> salaryItemIds) {
|
||||
List<List<Long>> partition = Lists.partition(salaryAcctEmployeeIds, 300);
|
||||
partition.forEach(part -> getSalaryAcctResultMapper().deleteByAcctEmpIdsAndSalaryItemIds(part, salaryItemIds));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
|
|
@ -12,10 +13,7 @@ import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
|||
import com.engine.salary.entity.progress.ProgressDTO;
|
||||
import com.engine.salary.entity.salaryBill.bo.SalaryBillBO;
|
||||
import com.engine.salary.entity.salaryBill.bo.SalaryTemplateBO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryBillSendDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryBillWatermarkDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalarySendInfoListDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.SalaryTemplateSalaryItemSetListDTO;
|
||||
import com.engine.salary.entity.salaryBill.dto.*;
|
||||
import com.engine.salary.entity.salaryBill.param.SalaryExportPdfParam;
|
||||
import com.engine.salary.entity.salaryBill.param.SalarySendGrantParam;
|
||||
import com.engine.salary.entity.salaryBill.param.SalarySendInfoQueryParam;
|
||||
|
|
@ -324,8 +322,7 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
if (StringUtils.isNotEmpty(salaryTemplate.getTextContent())) {
|
||||
String yearI18n = SalaryI18nUtil.getI18nLabel(100325, "年");
|
||||
String monthI18n = SalaryI18nUtil.getI18nLabel(100326, "月");
|
||||
salaryTemplate
|
||||
.setTextContent(salaryTemplate.getTextContent().replace("${salaryMonth}", salaryMonth.getYear() + yearI18n + salaryMonth.getMonth() + monthI18n));
|
||||
salaryTemplate.setTextContent(salaryTemplate.getTextContent().replace("${salaryMonth}", salaryMonth.getYear() + yearI18n + salaryMonth.getMonth() + monthI18n));
|
||||
}
|
||||
|
||||
// 工资单水印设置
|
||||
|
|
@ -362,6 +359,8 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
.employeeInformation(employeeInformation)
|
||||
// 工资单模板-对应人员字段
|
||||
.employeeField(employeeField)
|
||||
//短信模板
|
||||
.smsSetting(JSON.parseObject(salaryTemplate.getSmsSetting(), SalaryTemplateSMSSetDTO.class))
|
||||
// 工资单模板-发放说明标签国际化
|
||||
.remarkI18n(remarkI18n)
|
||||
// 邮件是否可以发送邮件
|
||||
|
|
@ -447,7 +446,7 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
}
|
||||
} else {
|
||||
/** 注意只有邮件才需要加密的核算数据 */
|
||||
if (isEnableEmail|| isEnableSMS || GEN_PDF) {
|
||||
if (isEnableEmail || isEnableSMS || GEN_PDF) {
|
||||
salaryAcctEmployees = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(salarySend.getSalaryAccountingId());
|
||||
salaryAcctResultValues = getSalaryAcctResultService(user).listBySalaryAcctRecordIds(Collections.singletonList(salarySend.getSalaryAccountingId()));
|
||||
}
|
||||
|
|
@ -573,7 +572,7 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
}
|
||||
|
||||
if (sendChannels.contains(MessageChannelEnum.EMAIL) || sendChannels.contains(MessageChannelEnum.SMS) || GEN_PDF) {
|
||||
// 构建发送消息
|
||||
// 构建人员信息
|
||||
SalaryBillBO.buildEmployeeInfo(salaryBillSendParam, allEmployeeMap.get(e.get("employeeId").toString()));
|
||||
|
||||
//发送邮件
|
||||
|
|
@ -582,8 +581,8 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
}
|
||||
|
||||
//发送短信
|
||||
SalaryBillBO.sendSMS(e, salaryBillSendParam);
|
||||
if (sendChannels.contains(MessageChannelEnum.SMS)) {
|
||||
SalaryBillBO.sendSMS(e, salaryBillSendParam);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.SalarySobBiz;
|
||||
|
|
@ -139,11 +140,13 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
// 保存
|
||||
SalaryTemplatePO salaryTemplate = SalaryTemplateBO.convertToPO(saveParam, (long) user.getUID());
|
||||
// salaryTemplate.setSendEmailId(saveParam.getSendEmail());
|
||||
salaryTemplate.setEmailStatus(saveParam.getEmailStatus()?1:0);
|
||||
salaryTemplate.setMsgStatus(saveParam.getMsgStatus()?1:0);
|
||||
salaryTemplate.setEmailStatus(saveParam.getEmailStatus() ? 1 : 0);
|
||||
salaryTemplate.setMsgStatus(saveParam.getMsgStatus() ? 1 : 0);
|
||||
salaryTemplate.setSmsStatus(saveParam.getSmsStatus() != null && saveParam.getSmsStatus() ? 1 : 0);
|
||||
salaryTemplate.setSmsSetting(saveParam.getSmsSetting() == null ? "" : JSON.toJSONString(saveParam.getSmsSetting()));
|
||||
salaryTemplate.setTextContentPosition(saveParam.getTextContentPosition());
|
||||
salaryTemplate.setSalaryItemNullStatus(saveParam.getSalaryItemNullStatus()?1:0);
|
||||
salaryTemplate.setSalaryItemZeroStatus(saveParam.getSalaryItemZeroStatus()?1:0);
|
||||
salaryTemplate.setSalaryItemNullStatus(saveParam.getSalaryItemNullStatus() ? 1 : 0);
|
||||
salaryTemplate.setSalaryItemZeroStatus(saveParam.getSalaryItemZeroStatus() ? 1 : 0);
|
||||
salaryTemplate.setAutoSendCycleType(saveParam.getAutoSendCycleType());
|
||||
mapper.insert(salaryTemplate);
|
||||
|
||||
|
|
@ -202,14 +205,16 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
BeanUtils.copyProperties(saveParam, salaryTemplateNew);
|
||||
salaryTemplateNew.setUpdateTime(new Date());
|
||||
salaryTemplateNew.setSendEmailId(0L);
|
||||
salaryTemplateNew.setEmailStatus(saveParam.getEmailStatus()?1:0);
|
||||
salaryTemplateNew.setMsgStatus(saveParam.getMsgStatus()?1:0);
|
||||
salaryTemplateNew.setEmailStatus(saveParam.getEmailStatus() ? 1 : 0);
|
||||
salaryTemplateNew.setMsgStatus(saveParam.getMsgStatus() ? 1 : 0);
|
||||
salaryTemplateNew.setSmsStatus(saveParam.getSmsStatus() != null && saveParam.getSmsStatus() ? 1 : 0);
|
||||
salaryTemplateNew.setSmsSetting(saveParam.getSmsSetting() == null ? "" : JSON.toJSONString(saveParam.getSmsSetting()));
|
||||
salaryTemplateNew.setTextContentPosition(saveParam.getTextContentPosition());
|
||||
salaryTemplateNew.setSalaryItemNullStatus(saveParam.getSalaryItemNullStatus()?1:0);
|
||||
salaryTemplateNew.setSalaryItemZeroStatus(saveParam.getSalaryItemZeroStatus()?1:0);
|
||||
salaryTemplateNew.setAutoSendStatus(saveParam.getAutoSendStatus()?1:0);
|
||||
salaryTemplateNew.setSalaryItemNullStatus(saveParam.getSalaryItemNullStatus() ? 1 : 0);
|
||||
salaryTemplateNew.setSalaryItemZeroStatus(saveParam.getSalaryItemZeroStatus() ? 1 : 0);
|
||||
salaryTemplateNew.setAutoSendStatus(saveParam.getAutoSendStatus() ? 1 : 0);
|
||||
salaryTemplateNew.setAutoSendCycleType(saveParam.getAutoSendCycleType());
|
||||
salaryTemplateNew.setAckFeedbackStatus(saveParam.getAckFeedbackStatus()?1:0);
|
||||
salaryTemplateNew.setAckFeedbackStatus(saveParam.getAckFeedbackStatus() ? 1 : 0);
|
||||
salaryTemplateNew.setAutoAckDays(saveParam.getAutoAckDays());
|
||||
salaryTemplateNew.setFeedbackUrl(saveParam.getFeedbackUrl());
|
||||
// todo 薪资项目设置检查校验
|
||||
|
|
@ -271,7 +276,7 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
|
||||
// 复制工资单自定义名称信息
|
||||
List<SalaryBillItemNamePO> billItemNamePOList = getSalaryBillItemNameService(user).ListByTemplateAndType(SalaryBillItemNamePO.builder().salaryTemplateId(copyParam.getId()).build());
|
||||
if(CollectionUtils.isNotEmpty(billItemNamePOList)){
|
||||
if (CollectionUtils.isNotEmpty(billItemNamePOList)) {
|
||||
Date now = new Date();
|
||||
List<SalaryBillItemNamePO> needInsertList = billItemNamePOList.stream().map(po -> {
|
||||
SalaryBillItemNamePO newSalaryBillItemNamePO = new SalaryBillItemNamePO();
|
||||
|
|
@ -321,7 +326,7 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
public List<Map<String, Object>> selectSalarySobList() {
|
||||
List<SalarySobPO> salarySobs = getSalarySobService(user).listByDisable(NumberUtils.INTEGER_ZERO);
|
||||
|
||||
return salarySobs.stream().map(m->{
|
||||
return salarySobs.stream().map(m -> {
|
||||
Map<String, Object> map = new HashMap<>(2);
|
||||
map.put("id", String.valueOf(m.getId()));
|
||||
map.put("content", m.getName());
|
||||
|
|
@ -339,17 +344,17 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
List<SalarySobItemGroupDTO> itemGroupDTOS = salarySobItemAggregate.getItemGroups().stream().filter(group -> !(hideGroupIDs.contains(group.getId()))).collect(Collectors.toList());
|
||||
// 获取关闭显示的薪资项目
|
||||
List<Long> hideItemIDs = getSalarySobItemHideService(user).listHideGroupBysalarySobId(SalarySobItemHidePO.builder().salarySobId(salarySobId).isGroup(0).build());
|
||||
for(SalarySobItemGroupDTO DTO : itemGroupDTOS){
|
||||
for (SalarySobItemGroupDTO DTO : itemGroupDTOS) {
|
||||
List<SalarySobItemDTO> items = DTO.getItems();
|
||||
DTO.setItems( items.stream().filter(item -> !(hideItemIDs.contains(item.getSalaryItemId()))).collect(Collectors.toList()) );
|
||||
DTO.setItems(items.stream().filter(item -> !(hideItemIDs.contains(item.getSalaryItemId()))).collect(Collectors.toList()));
|
||||
}
|
||||
itemGroupDTOS = itemGroupDTOS.stream().filter(DTO -> CollectionUtils.isNotEmpty(DTO.getItems())).collect(Collectors.toList());
|
||||
salarySobItemAggregate.setItemGroups(itemGroupDTOS);
|
||||
if(hideGroupIDs.contains(0L)){
|
||||
if (hideGroupIDs.contains(0L)) {
|
||||
// 隐藏了未分类
|
||||
salarySobItemAggregate.setItems(Collections.emptyList());
|
||||
}else{
|
||||
salarySobItemAggregate.setItems( salarySobItemAggregate.getItems().stream().filter( item -> !(hideItemIDs.contains(item.getSalaryItemId())) ).collect(Collectors.toList()) );
|
||||
} else {
|
||||
salarySobItemAggregate.setItems(salarySobItemAggregate.getItems().stream().filter(item -> !(hideItemIDs.contains(item.getSalaryItemId()))).collect(Collectors.toList()));
|
||||
}
|
||||
return SalaryTemplateBO.convertSalarySobItemAggregateToSalaryItemSet(salarySobItemAggregate, new Long(user.getUID()), isReplenish);
|
||||
}
|
||||
|
|
@ -370,10 +375,10 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
.forEach(data -> {
|
||||
data.getItems().forEach(item -> {
|
||||
Long salaryItemId = Long.valueOf(item.getSalaryItemId());
|
||||
if(itemShowNameMap.containsKey(salaryItemId)){
|
||||
if (itemShowNameMap.containsKey(salaryItemId)) {
|
||||
item.setSalaryItemShowName(itemShowNameMap.get(salaryItemId));
|
||||
item.setName(itemShowNameMap.get(salaryItemId) + "(" + item.getOriginName() +")");
|
||||
}else{
|
||||
item.setName(itemShowNameMap.get(salaryItemId) + "(" + item.getOriginName() + ")");
|
||||
} else {
|
||||
item.setSalaryItemShowName(item.getOriginName());
|
||||
item.setName(item.getOriginName());
|
||||
}
|
||||
|
|
@ -410,7 +415,7 @@ public class SalaryTemplateServiceImpl extends Service implements SalaryTemplate
|
|||
} else {
|
||||
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), salaryTemplateDTOList, SalaryTemplateListDTO.class);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
// 查询
|
||||
salaryTemplateDTOList = mapper.listDTO(SalaryTemplatePO.builder().salarySobId(queryParam.getSalarySobId()).name(queryParam.getName()).build());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
|||
// 无薪资核算结果,不允许生成个税申报表
|
||||
if (CollectionUtils.isEmpty(salaryAcctResultPOS)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(110093, "{0}无可申报数据")
|
||||
.replace("{0}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||
.replace("{0}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||
}
|
||||
|
||||
Set<Long> salaryAcctRecordIds = SalaryEntityUtil.properties(salaryAcctResultPOS, SalaryAcctResultPO::getSalaryAcctRecordId);
|
||||
|
|
@ -214,14 +214,14 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
|||
boolean notArchived = salaryAcctRecordPOS.stream().anyMatch(salaryAcctRecordPO -> Objects.equals(salaryAcctRecordPO.getStatus(), SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue()));
|
||||
if (notArchived) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98875, "{0}有未归档数据,请全部归档后再申报")
|
||||
.replace("{0}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||
.replace("{0}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||
}
|
||||
// 如果当前薪资所属月下存在不同的税款所属期,属于异常业务场景,不允许生成个税申报表
|
||||
Date taxCycle = salaryAcctRecordPOS.get(0).getTaxCycle();
|
||||
boolean differentTaxCycle = salaryAcctRecordPOS.stream().anyMatch(salaryAcctRecordPO -> salaryAcctRecordPO.getTaxCycle().compareTo(taxCycle) != 0);
|
||||
if (differentTaxCycle) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98876, "{0}存在不同的税款所属期,无法正常生成个税申报表,请调整账套设置,重新核算后再生成个税申报表")
|
||||
.replace("{0}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||
.replace("{0}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||
}
|
||||
// 查询薪资账套
|
||||
Set<Long> salarySobIds = SalaryEntityUtil.properties(salaryAcctRecordPOS, SalaryAcctRecordPO::getSalarySobId);
|
||||
|
|
|
|||
|
|
@ -117,6 +117,14 @@ public class SalaryDateUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public static String getFormatYearMonth(YearMonth localDate) {
|
||||
if (localDate == null) {
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
return localDate.format(DateTimeFormatter.ofPattern("yyyy-MM"));
|
||||
|
||||
}
|
||||
|
||||
public static String getFormatLocalDate(LocalDate localDate) {
|
||||
if (localDate == null) {
|
||||
return StringUtils.EMPTY;
|
||||
|
|
@ -238,7 +246,7 @@ public class SalaryDateUtil {
|
|||
Calendar c = Calendar.getInstance();
|
||||
c.setTime(localDate);
|
||||
int year = c.get(Calendar.YEAR);
|
||||
return year;
|
||||
return year ;
|
||||
}
|
||||
|
||||
public static LocalDateRange localDate2Range(Date localDate) {
|
||||
|
|
@ -268,7 +276,6 @@ public class SalaryDateUtil {
|
|||
cal.set(Calendar.DAY_OF_MONTH, last);
|
||||
return cal.getTime();
|
||||
}
|
||||
|
||||
public static Date getFirstDayDateOfMonthWithMinutesAndSeconds(final Date date) {
|
||||
final Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(date);
|
||||
|
|
@ -306,6 +313,8 @@ public class SalaryDateUtil {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static String getMonthBegin(String specifiedDay) {
|
||||
int year;
|
||||
int month;
|
||||
|
|
@ -508,7 +517,7 @@ public class SalaryDateUtil {
|
|||
localDate = format.parse(date);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("日期解析异常,{}", date, e);
|
||||
log.error("日期解析异常,{}", date);
|
||||
localDate = null;
|
||||
}
|
||||
|
||||
|
|
@ -527,7 +536,7 @@ public class SalaryDateUtil {
|
|||
localDate = format.parse(date);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("日期解析异常,{}", date, e);
|
||||
log.error("日期解析异常,{}", date);
|
||||
localDate = null;
|
||||
}
|
||||
|
||||
|
|
@ -545,7 +554,7 @@ public class SalaryDateUtil {
|
|||
localDate = format.parse(date);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("日期解析异常,{}", date, e);
|
||||
log.error("日期解析异常,{}", date);
|
||||
localDate = null;
|
||||
}
|
||||
|
||||
|
|
@ -576,10 +585,9 @@ public class SalaryDateUtil {
|
|||
|
||||
/**
|
||||
* 转换时间对象
|
||||
*
|
||||
* @see SalaryDateUtil#toDate(LocalDateTime, String)
|
||||
* @param dateTime LocalDateTime
|
||||
* @return Date
|
||||
* @see SalaryDateUtil#toDate(LocalDateTime, String)
|
||||
*/
|
||||
public static Date toDate(LocalDateTime dateTime) {
|
||||
return toDate(dateTime, null);
|
||||
|
|
@ -588,9 +596,8 @@ public class SalaryDateUtil {
|
|||
|
||||
/**
|
||||
* 转换时间对象
|
||||
*
|
||||
* @param dateTime LocalDateTime
|
||||
* @param offset 时区,e.g. +8
|
||||
* @param offset 时区,e.g. +8
|
||||
* @return Date
|
||||
*/
|
||||
public static Date toDate(LocalDateTime dateTime, String offset) {
|
||||
|
|
|
|||
|
|
@ -128,6 +128,20 @@ public class SalaryBillController {
|
|||
return new ResponseResult<Long, List<SalaryTemplateSalaryItemSetListDTO>>(user).run(getSalaryTemplateWrapper(user)::getSalaryItemSet, salarySobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取短信薪资项目设置
|
||||
*
|
||||
* @param salarySobId
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/template/getSmsSalaryItemSet")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getSmsSalaryItemSet(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("salarySobId") Long salarySobId) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Long, List<SalaryTemplateSalaryItemSetListDTO>>(user).run(getSalaryTemplateWrapper(user)::getSmsSalaryItemSet, salarySobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可用的薪资项目
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -164,8 +164,8 @@ public class SalaryTemplateWrapper extends Service {
|
|||
salaryTemplateBaseSetDTO.setMsgStatus(po.getMsgStatus().equals(SalaryTemplateWhetherEnum.TRUE.getValue()));
|
||||
salaryTemplateBaseSetDTO.setSalarySob(po.getSalarySobId());
|
||||
salaryTemplateBaseSetDTO.setSendEmail(po.getSendEmailId());
|
||||
salaryTemplateBaseSetDTO.setAutoSendStatus(po.getAutoSendStatus() == null ? false : po.getAutoSendStatus().equals(SalaryTemplateWhetherEnum.TRUE.getValue()));
|
||||
salaryTemplateBaseSetDTO.setAckFeedbackStatus(po.getAckFeedbackStatus() == null ? false : NumberUtils.compare(po.getAckFeedbackStatus(), 1) == 0);
|
||||
salaryTemplateBaseSetDTO.setAutoSendStatus(po.getAutoSendStatus() != null && po.getAutoSendStatus().equals(SalaryTemplateWhetherEnum.TRUE.getValue()));
|
||||
salaryTemplateBaseSetDTO.setAckFeedbackStatus(po.getAckFeedbackStatus() != null && NumberUtils.compare(po.getAckFeedbackStatus(), 1) == 0);
|
||||
salaryTemplateBaseSetDTO.setAutoAckDays(ObjectUtils.isEmpty(po.getAutoAckDays()) ? 7 : po.getAutoAckDays());
|
||||
// 规则赋值 如果为ALL传“” 如果为byRule传薪资项目ID
|
||||
salaryTemplateBaseSetDTO.setReplenishRule(SalaryTemplateReplenishRuleEnum.ALL.getValue().equals(po.getReplenishRule()) ? "" : po.getReplenishRule());
|
||||
|
|
@ -178,14 +178,12 @@ public class SalaryTemplateWrapper extends Service {
|
|||
|
||||
// 查询所有启用的薪资账套
|
||||
List<SalarySobPO> salarySobs = getSalarySobService(user).listByDisable(NumberUtils.INTEGER_ZERO);
|
||||
List<Map<String, Object>> salarySobOptions = salarySobs.stream()
|
||||
.map(salarySobPO -> {
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
item.put("id", salarySobPO.getId());
|
||||
item.put("name", salarySobPO.getName());
|
||||
return item;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
List<Map<String, Object>> salarySobOptions = salarySobs.stream().map(salarySobPO -> {
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
item.put("id", salarySobPO.getId());
|
||||
item.put("name", salarySobPO.getName());
|
||||
return item;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
// 邮箱下拉
|
||||
// List<WeaFormOption> sendEmailOptions = Lists.newArrayList();
|
||||
|
|
@ -195,10 +193,10 @@ public class SalaryTemplateWrapper extends Service {
|
|||
|
||||
// WeaForm salaryTemplateBase = SalaryFormatUtil.<SalaryTemplateBaseSetDTO>getInstance().buildForm(SalaryTemplateBaseSetDTO.class, SalaryTemplateBaseSetDTO.builder().salarySobOptions(salarySobOptions).sendEmailOptions(sendEmailOptions).build());
|
||||
|
||||
if(id == null){
|
||||
if (id == null) {
|
||||
// 新建,获取默认的确认反馈信息
|
||||
SalaryBillAckFeedbackDTO defaultAckFeedback = getSalaryBillBaseSetService(user).getDefaultAckFeedbackSetting();
|
||||
salaryTemplateBaseSetDTO.setAckFeedbackStatus(StringUtils.equals(defaultAckFeedback.getAckStatus(),"1"));
|
||||
salaryTemplateBaseSetDTO.setAckFeedbackStatus(StringUtils.equals(defaultAckFeedback.getAckStatus(), "1"));
|
||||
salaryTemplateBaseSetDTO.setAutoAckDays(defaultAckFeedback.getAutoAckDays());
|
||||
salaryTemplateBaseSetDTO.setFeedbackUrl(defaultAckFeedback.getFeedBackUrl());
|
||||
}
|
||||
|
|
@ -208,11 +206,7 @@ public class SalaryTemplateWrapper extends Service {
|
|||
// 编辑时禁止修改薪资账套 前端实现
|
||||
// 分组 前端实现
|
||||
|
||||
return SalaryTemplateBaseFormDTO.builder()
|
||||
.id(id)
|
||||
.salaryTemplateBaseSet(salaryTemplateBase)
|
||||
.replenishRuleSetOption(replenishRuleSetOptionList)
|
||||
.build();
|
||||
return SalaryTemplateBaseFormDTO.builder().id(id).salaryTemplateBaseSet(salaryTemplateBase).replenishRuleSetOption(replenishRuleSetOptionList).build();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -261,7 +255,7 @@ public class SalaryTemplateWrapper extends Service {
|
|||
// 获取工资单薪资项目展示名信息
|
||||
Map<Long, String> itemShowNameMap;
|
||||
Map<Long, SalaryBillItemNameDTO> salaryBillItemNameDTOMap = Collections.emptyMap();
|
||||
if (id != null){
|
||||
if (id != null) {
|
||||
List<SalaryBillItemNamePO> billItemNameList = getSalaryBillItemNameService(user).ListByTemplateAndType(SalaryBillItemNamePO.builder().salaryTemplateId(id).salaryBillType(0).build());
|
||||
itemShowNameMap = SalaryEntityUtil.convert2Map(billItemNameList, SalaryBillItemNamePO::getSalaryItemId, SalaryBillItemNamePO::getSalaryItemShowName);
|
||||
// 获取薪资项目信息
|
||||
|
|
@ -274,15 +268,14 @@ public class SalaryTemplateWrapper extends Service {
|
|||
if (CollectionUtils.isNotEmpty(salaryTemplateShowSetData)) {
|
||||
salaryTemplateShowSetData.stream()
|
||||
//排除人员消息
|
||||
.filter(data -> !StringUtils.equals(data.getGroupId(), "111111111111111111"))
|
||||
.forEach(data -> {
|
||||
.filter(data -> !StringUtils.equals(data.getGroupId(), "111111111111111111")).forEach(data -> {
|
||||
data.getItems().forEach(item -> {
|
||||
Long salaryItemId = Long.valueOf(item.getSalaryItemId());
|
||||
item.setOriginName(itemIdNameMap.getOrDefault(salaryItemId, item.getName()));
|
||||
if(itemShowNameMap.containsKey(salaryItemId)){
|
||||
if (itemShowNameMap.containsKey(salaryItemId)) {
|
||||
item.setSalaryItemShowName(itemShowNameMap.get(salaryItemId));
|
||||
item.setName(itemShowNameMap.get(salaryItemId) + "(" + itemIdNameMap.getOrDefault(salaryItemId, item.getName()) +")");
|
||||
}else{
|
||||
item.setName(itemShowNameMap.get(salaryItemId) + "(" + itemIdNameMap.getOrDefault(salaryItemId, item.getName()) + ")");
|
||||
} else {
|
||||
item.setSalaryItemShowName(itemIdNameMap.getOrDefault(salaryItemId, item.getName()));
|
||||
item.setName(itemIdNameMap.getOrDefault(salaryItemId, item.getName()));
|
||||
}
|
||||
|
|
@ -291,14 +284,7 @@ public class SalaryTemplateWrapper extends Service {
|
|||
}
|
||||
|
||||
|
||||
return SalaryTemplateShowFormDTO.builder()
|
||||
.id(id)
|
||||
.vars(Arrays.stream(SalaryTemplateVarEnum.values()).map(SalaryTemplateVarEnum::getValue).collect(Collectors.toList()))
|
||||
.salaryTemplateShowSet(salaryTemplateShowSet)
|
||||
.salaryTemplateSalaryItemSet(salaryTemplateShowSetData)
|
||||
.replenishSalaryTemplateSalaryItemSet(replenishSalaryTemplateSalaryItemSet)
|
||||
.salaryBillItemNameSet(salaryBillItemNameDTOMap)
|
||||
.build();
|
||||
return SalaryTemplateShowFormDTO.builder().id(id).vars(Arrays.stream(SalaryTemplateVarEnum.values()).map(SalaryTemplateVarEnum::getValue).collect(Collectors.toList())).salaryTemplateShowSet(salaryTemplateShowSet).salaryTemplateSalaryItemSet(salaryTemplateShowSetData).replenishSalaryTemplateSalaryItemSet(replenishSalaryTemplateSalaryItemSet).salaryBillItemNameSet(salaryBillItemNameDTOMap).build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -311,6 +297,18 @@ public class SalaryTemplateWrapper extends Service {
|
|||
return getSalaryTemplateService(user).getSalaryItemSet(salarySobId, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param salarySobId
|
||||
* @return
|
||||
*/
|
||||
public List<SalaryTemplateSalaryItemSetListDTO> getSmsSalaryItemSet(Long salarySobId) {
|
||||
List<SalaryTemplateSalaryItemSetListDTO> salaryItemSet = getSalaryTemplateService(user).getSalaryItemSet(salarySobId, false);
|
||||
|
||||
salaryItemSet.add(0, SalaryTemplateSalaryItemSetListDTO.builder().groupId("444444444444444444L").groupName("基本信息").items(Collections.singletonList(SalaryTemplateSalaryItemListDTO.builder().name("薪资所属月").build())).build());
|
||||
return salaryItemSet;
|
||||
}
|
||||
|
||||
public List<SalaryTemplateSalaryItemSetListDTO> getReplenishSalaryItemSet(Long salarySobId) {
|
||||
return getSalaryTemplateService(user).getSalaryItemSet(salarySobId, true);
|
||||
}
|
||||
|
|
@ -447,20 +445,19 @@ public class SalaryTemplateWrapper extends Service {
|
|||
if (CollectionUtils.isNotEmpty(replenishSalaryItemSetting)) {
|
||||
replenishSalaryItemSetting.stream()
|
||||
//排除人员消息
|
||||
.filter(data -> !StringUtils.equals(data.getGroupId(), "111111111111111111"))
|
||||
.forEach(data -> {
|
||||
data.getItems().forEach(item -> {
|
||||
Long salaryItemId = Long.valueOf(item.getSalaryItemId());
|
||||
item.setOriginName(itemIdNameMap.getOrDefault(salaryItemId, item.getName()));
|
||||
if(itemShowNameMap.containsKey(salaryItemId)){
|
||||
item.setSalaryItemShowName(itemShowNameMap.get(salaryItemId));
|
||||
item.setName(itemShowNameMap.get(salaryItemId) + "(" + itemIdNameMap.getOrDefault(salaryItemId, item.getName()) + ")");
|
||||
}else{
|
||||
item.setSalaryItemShowName(itemIdNameMap.getOrDefault(salaryItemId, item.getName()));
|
||||
item.setName(itemIdNameMap.getOrDefault(salaryItemId, item.getName()));
|
||||
}
|
||||
});
|
||||
});
|
||||
.filter(data -> !StringUtils.equals(data.getGroupId(), "111111111111111111")).forEach(data -> {
|
||||
data.getItems().forEach(item -> {
|
||||
Long salaryItemId = Long.valueOf(item.getSalaryItemId());
|
||||
item.setOriginName(itemIdNameMap.getOrDefault(salaryItemId, item.getName()));
|
||||
if (itemShowNameMap.containsKey(salaryItemId)) {
|
||||
item.setSalaryItemShowName(itemShowNameMap.get(salaryItemId));
|
||||
item.setName(itemShowNameMap.get(salaryItemId) + "(" + itemIdNameMap.getOrDefault(salaryItemId, item.getName()) + ")");
|
||||
} else {
|
||||
item.setSalaryItemShowName(itemIdNameMap.getOrDefault(salaryItemId, item.getName()));
|
||||
item.setName(itemIdNameMap.getOrDefault(salaryItemId, item.getName()));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
replenishSalaryItemSetting = getReplenishSalaryItemSet(replenishFormQueryParam.getSalarySobId());
|
||||
|
|
@ -469,11 +466,7 @@ public class SalaryTemplateWrapper extends Service {
|
|||
replenishSalaryItemSetting = getReplenishSalaryItemSet(replenishFormQueryParam.getSalarySobId());
|
||||
}
|
||||
|
||||
return SalaryTemplateReplenishFormDTO.builder()
|
||||
.id(id)
|
||||
.replenishSalaryTemplateSalaryItemSet(replenishSalaryItemSetting)
|
||||
.salaryBillItemNameSet(salaryBillItemNameDTOMap)
|
||||
.build();
|
||||
return SalaryTemplateReplenishFormDTO.builder().id(id).replenishSalaryTemplateSalaryItemSet(replenishSalaryItemSetting).salaryBillItemNameSet(salaryBillItemNameDTOMap).build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -483,20 +476,10 @@ public class SalaryTemplateWrapper extends Service {
|
|||
* @return 单个分组下剩余的薪资项目
|
||||
*/
|
||||
public List<SalaryTemplateSalaryItemListDTO> getSalaryItemSetGrouped(SalaryBillSalaryItemQueryParam param) {
|
||||
Boolean isReplenish = Optional.ofNullable(param.getIsReplenish())
|
||||
.orElse(false);
|
||||
List<SalaryTemplateSalaryItemSetListDTO> salaryItemSet
|
||||
= getSalaryTemplateService(user).getSalaryItemSetContainHide(param.getSalarySobId(), param.getSalaryTemplateId(), isReplenish);
|
||||
Boolean isReplenish = Optional.ofNullable(param.getIsReplenish()).orElse(false);
|
||||
List<SalaryTemplateSalaryItemSetListDTO> salaryItemSet = getSalaryTemplateService(user).getSalaryItemSetContainHide(param.getSalarySobId(), param.getSalaryTemplateId(), isReplenish);
|
||||
Long groupId = param.getGroupId();
|
||||
return salaryItemSet.stream()
|
||||
.filter(s -> Objects.equals(s.getGroupId(), groupId + ""))
|
||||
.map(SalaryTemplateSalaryItemSetListDTO::getItems)
|
||||
.findFirst()
|
||||
.orElse(Collections.emptyList())
|
||||
.stream()
|
||||
.filter(item -> !Optional.ofNullable(param.getExistSalaryItemIds()).orElse(Collections.emptyList())
|
||||
.contains(item.getId())
|
||||
).collect(Collectors.toList());
|
||||
return salaryItemSet.stream().filter(s -> Objects.equals(s.getGroupId(), groupId + "")).map(SalaryTemplateSalaryItemSetListDTO::getItems).findFirst().orElse(Collections.emptyList()).stream().filter(item -> !Optional.ofNullable(param.getExistSalaryItemIds()).orElse(Collections.emptyList()).contains(item.getId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -506,17 +489,12 @@ public class SalaryTemplateWrapper extends Service {
|
|||
* @return 分组与下属
|
||||
*/
|
||||
public List<SalaryTemplateSalaryItemSetListDTO> getSalaryGroupSet(SalaryBillSalaryGroupQueryParam param) {
|
||||
Boolean isReplenish = Optional.ofNullable(param.getIsReplenish())
|
||||
.orElse(false);
|
||||
return getSalaryTemplateService(user).getSalaryItemSetContainHide(param.getSalarySobId(), param.getSalaryTemplateId(), isReplenish)
|
||||
.stream()
|
||||
.filter(group -> !Optional.ofNullable(param.getExistSalaryGroupIds()).orElse(Collections.emptyList())
|
||||
.contains(group.getGroupId())
|
||||
)
|
||||
.collect(Collectors.toList());
|
||||
Boolean isReplenish = Optional.ofNullable(param.getIsReplenish()).orElse(false);
|
||||
return getSalaryTemplateService(user).getSalaryItemSetContainHide(param.getSalarySobId(), param.getSalaryTemplateId(), isReplenish).stream().filter(group -> !Optional.ofNullable(param.getExistSalaryGroupIds()).orElse(Collections.emptyList()).contains(group.getGroupId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public void saveItemShowName(List<SalaryBillItemNameSaveParam> saveList) {
|
||||
getSalaryBillItemNameService(user).saveItemShowName(saveList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue