Merge branch 'release/2.13.1.2404.02' into feature/工资单审批

This commit is contained in:
Harryxzy 2024-04-30 10:26:58 +08:00
commit 8ae76f9b65
9 changed files with 67 additions and 23 deletions

View File

@ -19,3 +19,16 @@ update hrsa_salary_archive set delete_type=3 where tax_agent_id=扣缴义务人
二、删除停薪员工档案
update hrsa_salary_archive set delete_type=3 where run_status in ('STOP_FROM_PENDING','STOP_FROM_SUSPEND')
三、删除指定人员档案
--删除社保福利档案
update hrsa_insurance_base_info set delete_type=3 WHERE employee_id = ? and payment_organization =?
update hrsa_social_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
update hrsa_fund_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
update hrsa_other_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
-- 删除薪资档案
update hrsa_salary_archive set delete_type=3 where employee_id = ? and tax_agent_id=?

View File

@ -0,0 +1,10 @@
# 工资数据报表
````
select e.lastname,sob.name as 账套名, record.salary_month as 薪资月, item.name as 薪资项 ,result.result_value as 值
from hrsa_salary_acct_record record
left join hrsa_salary_sob sob on record.salary_sob_id = sob.id and sob.delete_type = 0 and record.delete_type = 0
left join hrsa_salary_acct_result result on record.id = result.salary_acct_record_id and result.delete_type = 0 and record.delete_type = 0
left join hrsa_salary_item item on result.salary_item_id = item.id and item.delete_type = 0
left join hrsa_tax_agent agent on agent.id=sob.tax_agent_id and agent.delete_type=0
left join hrmresource e on e.id= result.employee_id

View File

@ -46,6 +46,14 @@ public class AESEncryptUtil {
if (encryptStr.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)) {
encryptStr = encryptStr.substring(4, encryptStr.length());
return AES.decrypt(encryptStr, aesEncryptScrect);
} else if (isNumeric(encryptStr) ||
checkHaveChinese(encryptStr) ||
encryptStr.startsWith("{") ||
encryptStr.contains("-") ||
encryptStr.contains(".") ||
"null".equals(encryptStr) ||
StringUtils.isBlank(encryptStr)) {
return encryptStr;
} else {
return AES.decrypt(encryptStr, aesEncryptScrect);
}
@ -59,7 +67,7 @@ public class AESEncryptUtil {
* @param encryptStr 加密字符串
* @return 解密字符串
*/
public static String closeEncryptSetting(String encryptStr,SalarySysConfPO sysConfPo) {
public static String closeEncryptSetting(String encryptStr, SalarySysConfPO sysConfPo) {
if (encryptStr == null) {
return null;
} else {
@ -67,9 +75,13 @@ public class AESEncryptUtil {
if (encryptStr.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)) {
encryptStr = encryptStr.substring(4, encryptStr.length());
return AES.decrypt(encryptStr, aesEncryptScrect);
} else if (isNumeric(encryptStr) || checkHaveChinese(encryptStr) || encryptStr.startsWith("{") || encryptStr.contains("-") || encryptStr.contains(".")) {
return encryptStr;
} else if ("null".equals(encryptStr) || StringUtils.isBlank(encryptStr)) {
} else if (isNumeric(encryptStr) ||
checkHaveChinese(encryptStr) ||
encryptStr.startsWith("{") ||
encryptStr.contains("-") ||
encryptStr.contains(".") ||
"null".equals(encryptStr) ||
StringUtils.isBlank(encryptStr)) {
return encryptStr;
} else if (sysConfPo == null || sysConfPo.getConfValue().equals(OpenEnum.OFF.getValue())) {
return AES.decrypt(encryptStr, aesEncryptScrect);

View File

@ -421,7 +421,6 @@ public class SalaryArchiveExcelBO extends Service {
Map<String, String> errorMessageMap = Maps.newHashMap();
errorMessageMap.put("message", rowindex + "个税扣缴义务人不存在");
excelComments.add(errorMessageMap);
// SalaryArchiveExcelBO.createExcelComment(excelComments, taxAgentRangeMsg, errorCount + 1, errorCount + 1, 0, 0);
isError = true;
return isError;
}
@ -440,14 +439,15 @@ public class SalaryArchiveExcelBO extends Service {
taxAgentRangeSaveParam.setTargetParams(Collections.singletonList(taxAgentSubAdminRangeTargetParam));
taxAgentRangeSaveParam.setSync(true);
importHandleParam.setTaxAgentRanges(Collections.singletonList(taxAgentRangeSaveParam));
} else {
Map<String, String> errorMessageMap = Maps.newHashMap();
errorMessageMap.put("message", rowindex + taxAgentRangeMsg);
excelComments.add(errorMessageMap);
// SalaryArchiveExcelBO.createExcelComment(excelComments, taxAgentRangeMsg, errorCount + 1, errorCount + 1, 0, 0);
isError = true;
return isError;
}
// else {
// Map<String, String> errorMessageMap = Maps.newHashMap();
// errorMessageMap.put("message", rowindex + taxAgentRangeMsg);
// excelComments.add(errorMessageMap);
//// SalaryArchiveExcelBO.createExcelComment(excelComments, taxAgentRangeMsg, errorCount + 1, errorCount + 1, 0, 0);
// isError = true;
// return isError;
// }
} else {
employeeId = optionalTaxAgentEmp.get().getEmployeeId();
// 除了定薪中的初始化其他导入存在相同的取第一条

View File

@ -125,7 +125,7 @@ public interface EmployMapper {
DeptInfo getDeptInfoById(Long id);
/**
* 获取大于离职日期的人员信息
* 获取大于离职日期的 离职退休解聘人员信息
* @return
*/
List<DataCollectionEmployee> listByDismissDate(String dismissDate);

View File

@ -457,7 +457,7 @@
e.mobile as mobile,
e.enddate as dismissdate
from hrmresource e
where e.status not in (7)
where e.status in (4,5,6)
AND e.enddate >= #{dismissDate}
</select>

View File

@ -478,7 +478,7 @@ public class SalaryStatisticsReportWrapper extends Service {
List<SalaryItemPO> itemList = getSalaryItemService(user).listByIds(salaryItemIds);
// 列表columns
List<WeaTableColumn> weaTableColumns = buildDataPerspectiveTableColumns(itemList);
List<WeaTableColumn> weaTableColumns = buildDataPerspectiveTableColumns(itemList, salaryItemIds);
WeaTable table = new WeaTable();
String pageId = "a4f85an7-9576-4125-adn9-7d06e7sy69f2";
@ -534,7 +534,7 @@ public class SalaryStatisticsReportWrapper extends Service {
List<SalaryItemPO> itemList = getSalaryItemService(user).listByIds(salaryItemIds);
// 表格表头
List<WeaTableColumn> weaTableColumns = buildDataPerspectiveTableColumns(itemList);
List<WeaTableColumn> weaTableColumns = buildDataPerspectiveTableColumns(itemList, salaryItemIds);
List<Object> columns = new ArrayList<>();
for (WeaTableColumn column : weaTableColumns) {
columns.add(column.getText());
@ -593,7 +593,8 @@ public class SalaryStatisticsReportWrapper extends Service {
}
}
private List<WeaTableColumn> buildDataPerspectiveTableColumns(List<SalaryItemPO> salaryItems) {
private List<WeaTableColumn> buildDataPerspectiveTableColumns(List<SalaryItemPO> salaryItems, List<Long> salaryItemIds) {
Map<Long, SalaryItemPO> salaryItemMap = SalaryEntityUtil.convert2Map(salaryItems, SalaryItemPO::getId);
// 表格表头
List<WeaTableColumn> columns = new ArrayList<>();
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(87614, "姓名"), "userName"));
@ -602,10 +603,13 @@ public class SalaryStatisticsReportWrapper extends Service {
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "taxAgent"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "账套"), "salarySob"));
// columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "次数"), "acctTimes").setDisplay(WeaBoolAttr.FALSE));
salaryItems.forEach(item -> {
WeaTableColumn weaTableColumn = new WeaTableColumn("100px", item.getName(), item.getId() + SalaryConstant.DYNAMIC_SUFFIX);
weaTableColumn.setOtherpara(item.getDataType());
columns.add(weaTableColumn);
salaryItemIds.forEach(itemId -> {
SalaryItemPO item = salaryItemMap.get(itemId);
if (item != null) {
WeaTableColumn weaTableColumn = new WeaTableColumn("100px", item.getName(), item.getId() + SalaryConstant.DYNAMIC_SUFFIX);
weaTableColumn.setOtherpara(item.getDataType());
columns.add(weaTableColumn);
}
});
return columns;
}

View File

@ -7,9 +7,9 @@ import com.api.browser.util.ConditionType;
import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.biz.AddUpSituationBiz;
import com.engine.salary.config.SalaryElogConfig;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.AddUpSituation;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
@ -1203,6 +1203,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
@Override
public void batchSave(List<AddUpSituation> list) {
if (CollectionUtils.isNotEmpty(list)) {
encryptUtil.encryptList(list, AddUpSituation.class);
List<List<AddUpSituation>> partition = Lists.partition(list, 50);
partition.forEach(getAddUpSituationMapper()::insertData);
}

View File

@ -91,7 +91,7 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService
String datasourceJson = map.getOrDefault("datasource", "");
if (StringUtils.isNotBlank(datasourceJson)) {
Map<String, String> datasourceIdMap = JsonUtil.parseMap(datasourceJson, String.class);
String datasourceIdNode = datasourceIdMap.getOrDefault("datasourceId","");
String datasourceIdNode = datasourceIdMap.getOrDefault("datasourceId", "");
if (StringUtils.isNotBlank(datasourceIdNode)) {
datasourceId = datasourceIdNode;
}
@ -216,6 +216,10 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService
}
if (DataType.NUMBER.equals(v.getFieldType()) && NumberUtils.isCreatable(v.getContent())) {
context.put(v.getFieldId(), new BigDecimal(v.getContent()));
} else if (v.getContent().startsWith("[") && v.getContent().endsWith("]")) {
String content = v.getContent().substring(1);
content = content.substring(0, content.length() - 1);
context.put(v.getFieldId(), content.split(","));
} else {
context.put(v.getFieldId(), v.getContent());
}