Merge branch 'release/3.0.2.2504.01' into custom/五院杭州中心
This commit is contained in:
commit
4357fc7e54
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
|||
log=false
|
||||
defaultCloseNonStandard149=true
|
||||
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
|
||||
version=3.0.2.2504.03
|
||||
version=3.0.2.2510.01
|
||||
openFormulaForcedEditing=false
|
||||
|
|
@ -630,7 +630,8 @@ public class SalaryBillBO {
|
|||
} else {
|
||||
for (Object keyName : e.keySet()) {
|
||||
if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) {
|
||||
boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString()))
|
||||
String itemValue = Util.null2String(e.get(keyName.toString()));
|
||||
boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue))
|
||||
||
|
||||
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
||||
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0);
|
||||
|
|
@ -641,7 +642,7 @@ public class SalaryBillBO {
|
|||
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(itemValue.replaceAll("null", ""));
|
||||
emailContent.append("</td>");
|
||||
}
|
||||
break;
|
||||
|
|
@ -710,7 +711,8 @@ 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 && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString()))
|
||||
String itemValue = Util.null2String(e.get(keyName.toString()));
|
||||
boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue))
|
||||
||
|
||||
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
||||
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0);
|
||||
|
|
@ -721,7 +723,7 @@ public class SalaryBillBO {
|
|||
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(itemValue.replaceAll("null", ""));
|
||||
emailContent.append("</td>");
|
||||
}
|
||||
break;
|
||||
|
|
@ -848,7 +850,7 @@ public class SalaryBillBO {
|
|||
if ("text".equals(wmClassify)) {
|
||||
wmTextFieldIds = (List<String>) salaryBillWatermark.getWmSetting().getOrDefault("wmSelectedFieldIds", Collections.emptyList());
|
||||
|
||||
List<String> empFields = Arrays.asList(HRM_Name, HRM_Num, HRM_Mobile, HRM_Email, HRM_CurrentOperatorId, HRM_Department);
|
||||
List<String> empFields = Arrays.asList(HRM_Name, HRM_Num, HRM_Mobile, HRM_Email, HRM_CurrentOperatorId, HRM_Department, HRM_SecondDepartment);
|
||||
if (wmTextFieldIds.contains(HRM_SecondDepartment)) {
|
||||
// 需要查分部
|
||||
salaryBillWatermark.getWmSetting().put("needQuerySubDepart", true);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package com.engine.salary.entity.salaryBill.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工资单批量操作参数
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalarySendBatParam {
|
||||
|
||||
// 工资单发放Id
|
||||
private List<Long> salarySendIds;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.engine.salary.entity.salaryacct.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量操作参数
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryAcctBatParam {
|
||||
|
||||
//薪资所属月
|
||||
private Date salaryMonth;
|
||||
//薪资账套id
|
||||
private List<Long> salarySobIds;
|
||||
//备注
|
||||
private String description;
|
||||
|
||||
|
||||
private List<Long> salaryAcctRecordIds;
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ public class SalarySobItemAggregateBO {
|
|||
.canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1))
|
||||
.canDelete(openFormulaForcedEditing || salaryItemPO.getCanDelete() == null || Objects.equals(salaryItemPO.getCanDelete(), 1))
|
||||
.width(salaryItemPO.getWidth())
|
||||
.defaultValue(salaryItemPO.getDefaultValue())
|
||||
.defaultValue(salarySobItemPO.getDefaultValue())
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,4 +28,6 @@ public class SalarySobQueryParam extends BaseQueryParam {
|
|||
* 数据过滤级别
|
||||
*/
|
||||
private AuthFilterTypeEnum filterType;
|
||||
|
||||
private boolean isShare;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package com.engine.salary.entity.siaccount.param;
|
||||
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AccountBatParam {
|
||||
|
||||
//账单月份")
|
||||
//@NotNull
|
||||
@DataCheck(require = true,message = "账单月份不能为空")
|
||||
private String billMonth;
|
||||
|
||||
//备注")
|
||||
//@Length(max = 60)
|
||||
@DataCheck(max = 60,message = "备注长度不能超过60个字符")
|
||||
private String remarks;
|
||||
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id
|
||||
*/
|
||||
@DataCheck(require = true,message = "个税扣缴义务人不能为空")
|
||||
private List<Long> paymentOrganizations;
|
||||
|
||||
|
||||
|
||||
private List<Long> ids;
|
||||
|
||||
}
|
||||
|
|
@ -26,4 +26,6 @@ public class TaxAgentQueryParam extends BaseQueryParam {
|
|||
|
||||
//个税扣缴义务人名称
|
||||
private String name;
|
||||
|
||||
private boolean isShare;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
package com.engine.salary.entity.taxdeclaration.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.YearMonth;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生成个税申报表参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxDeclarationBatParam {
|
||||
|
||||
/**
|
||||
* 个税申报id
|
||||
*/
|
||||
private Long taxDeclarationId;
|
||||
|
||||
/**
|
||||
* 薪资所属月
|
||||
*/
|
||||
private YearMonth salaryMonth;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人
|
||||
*/
|
||||
private List<Long> taxAgentIds;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
|
||||
private String salaryMonthStr;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date taxCycle;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date salaryDate;
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
e.workcode,
|
||||
e.certificatenum as idNo,
|
||||
e.accounttype as accountType,
|
||||
e.sex as sex,
|
||||
'false' as extEmp
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
<select id="getEmployeeByIds" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.sex as sex,
|
||||
e.certificatenum as idNo,
|
||||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
|
|
@ -42,6 +44,7 @@
|
|||
resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.sex as sex,
|
||||
e.certificatenum as idNo,
|
||||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
|
|
@ -123,6 +126,7 @@
|
|||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.sex as sex,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode as workcode,
|
||||
d.departmentname as departmentName,
|
||||
|
|
@ -229,6 +233,7 @@
|
|||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.sex as sex,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode as workcode,
|
||||
d.departmentname as departmentName,
|
||||
|
|
@ -283,6 +288,7 @@
|
|||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
e.sex as sex,
|
||||
e.certificatenum as idNo,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
|
|
@ -304,6 +310,7 @@
|
|||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
e.certificatenum as idNo,
|
||||
e.sex as sex,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.accounttype as accountType,
|
||||
|
|
@ -324,6 +331,7 @@
|
|||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
e.certificatenum as idNo,
|
||||
e.sex as sex,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.departmentid as departmentId,
|
||||
|
|
@ -487,6 +495,7 @@
|
|||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.certificatenum as idNo,
|
||||
e.sex as sex,
|
||||
e.workcode as workcode,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
|
|
@ -562,6 +571,7 @@
|
|||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.certificatenum as idNo,
|
||||
e.sex as sex,
|
||||
e.workcode as workcode,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ public class SalaryStatisticsDataPerspectiveQueryParam extends BaseQueryParam {
|
|||
//个税扣缴义务人配置
|
||||
private List<Long> taxAgent;
|
||||
|
||||
@JsonIgnore
|
||||
private List<Long> salarySob;
|
||||
|
||||
@JsonIgnore
|
||||
//收入所得项目配置
|
||||
private List<Integer> incomeCategory;
|
||||
|
|
|
|||
|
|
@ -464,12 +464,21 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
if (reportPO.getTaxAgentSetting() != null) {
|
||||
param.setTaxAgent(((List<Map>) JSON.parseArray(reportPO.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getSalarySobSetting() != null) {
|
||||
param.setSalarySob(((List<Map>) JSON.parseArray(reportPO.getSalarySobSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getSubCompanySetting() != null) {
|
||||
param.setSubCompany(((List<Map>) JSON.parseArray(reportPO.getSubCompanySetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getDepartSetting() != null) {
|
||||
param.setDepart(((List<Map>) JSON.parseArray(reportPO.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getPositionSetting() != null) {
|
||||
param.setPosition(((List<Map>) JSON.parseArray(reportPO.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getStatusSetting() != null) {
|
||||
param.setStatus(((List<Map>) JSON.parseArray(reportPO.getStatusSetting(), Map.class)).stream().map(m -> m.get(key).toString()).collect(Collectors.toList()));
|
||||
}
|
||||
if (reportPO.getEmployeeSetting() != null) {
|
||||
param.setEmployee(((List<Map>) JSON.parseArray(reportPO.getEmployeeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
|
|
@ -499,7 +508,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
List<Long> finalSalaryAcctEmpIds = getSalaryAcctResultService(user).listAcctEmpIdByAcctEmpId(salaryAcctEmployeeIds);
|
||||
Map<Long, List<SalaryAcctResultPO>> salaryAcctEmpResultMap = SalaryEntityUtil.group2Map(salaryAcctResultValues, SalaryAcctResultPO::getSalaryAcctEmpId);
|
||||
salaryAcctEmpResultMap.forEach((k, v) -> {
|
||||
Map<String, String> collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), SalaryAcctResultPO::getResultValue, (key1, key2) -> key2));
|
||||
Map<String, String> collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), p -> Util.null2String(p.getResultValue()), (key1, key2) -> key2));
|
||||
resultMap.put(k, collect);
|
||||
});
|
||||
salaryAcctEmployeeIds.stream().forEach(id -> {
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
sumRow.add(Util.null2String(countResult.get(weaTableColumnGroup.getColumn())));
|
||||
}
|
||||
} else {
|
||||
sumRow.add(Util.null2String(countResult.get(weaTableColumnGroup.getColumn())));
|
||||
sumRow.add("");
|
||||
}
|
||||
}
|
||||
rowList.add(sumRow);
|
||||
|
|
|
|||
|
|
@ -303,6 +303,7 @@ public class SalaryStatisticsReportWrapper extends Service {
|
|||
// 如果是被分享的报表,校验分享权限,通过后将user赋值为报表创建人
|
||||
User creator = new User();
|
||||
creator.setUid(po.getCreator().intValue());
|
||||
creator.setLogintype("1");
|
||||
user = creator;
|
||||
} else {
|
||||
// 判断报表是否是登陆人创建的,或薪酬总管理员
|
||||
|
|
|
|||
|
|
@ -324,5 +324,13 @@ public interface SIAccountService {
|
|||
void deleteSocialAcctEmp(SaveCommonAccountParam param);
|
||||
|
||||
String addSocialAcctEmp(SaveCommonAccountParam param);
|
||||
|
||||
void batSave(AccountBatParam param);
|
||||
|
||||
void batDelete(AccountBatParam param);
|
||||
|
||||
void batFile(AccountBatParam param);
|
||||
|
||||
void batSocialSecurityBenefitsRecalculate(AccountBatParam batParam);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.common.LocalDateRange;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctBatParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||
|
|
@ -212,4 +213,11 @@ public interface SalaryAcctRecordService {
|
|||
List<SalaryAcctRecordPO> listSome(SalaryAcctRecordPO po);
|
||||
|
||||
void updateDate(Long id, Date updateTime);
|
||||
|
||||
void batSave(SalaryAcctBatParam saveParam);
|
||||
|
||||
void batFile(SalaryAcctBatParam param);
|
||||
|
||||
void batReCalculate(SalaryAcctBatParam param);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import com.engine.salary.mapper.auth.AuthRoleMapper;
|
|||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
|
|
@ -156,7 +157,7 @@ public class AuthDataServiceImpl extends Service implements AuthDataService {
|
|||
public List<AuthRoleDataDTO> listRoleData( AuthDataQueryParam param) {
|
||||
List<AuthRoleDataDTO> authRoleDataDTOS = getAuthRoleDataMapper().listRoleData(param.getRoleId());
|
||||
if (StrUtil.isNotEmpty(param.getUsername())){
|
||||
authRoleDataDTOS = authRoleDataDTOS.stream().filter(authRoleDataDTO -> authRoleDataDTO.getUsername().contains(param.getUsername())).collect(Collectors.toList());
|
||||
authRoleDataDTOS = authRoleDataDTOS.stream().filter(authRoleDataDTO -> StringUtils.isNotBlank(authRoleDataDTO.getUsername()) && authRoleDataDTO.getUsername().contains(param.getUsername())).collect(Collectors.toList());
|
||||
}
|
||||
return authRoleDataDTOS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import com.engine.salary.util.SalaryI18nUtil;
|
|||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -196,7 +197,7 @@ public class AuthMemberServiceImpl extends Service implements AuthMemberService
|
|||
public List<AuthRoleEmpDTO> listRoleEmp(AuthMemberQueryParam param) {
|
||||
List<AuthRoleEmpDTO> empDTOS = getAuthRoleEmpMapper().getByRoleId(param.getRoleId());
|
||||
if(StrUtil.isNotEmpty(param.getUsername())){
|
||||
empDTOS = empDTOS.stream().filter(item -> item.getUsername().contains(param.getUsername())).collect(Collectors.toList());
|
||||
empDTOS = empDTOS.stream().filter(item -> StringUtils.isNotBlank(item.getUsername()) && item.getUsername().contains(param.getUsername())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
return empDTOS;
|
||||
|
|
|
|||
|
|
@ -193,7 +193,11 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
String imageId = Util.null2String(importParam.getImageId());
|
||||
Validate.notBlank(imageId, "imageId为空");
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// 获取所有个税扣缴义务人
|
||||
TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
|
||||
param.setFilterType(AuthFilterTypeEnum.ADMIN_DATA);
|
||||
Collection<TaxAgentPO> taxAgentList = getTaxAgentService(user).listAuth(param);
|
||||
// Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
//个税扣缴义务人
|
||||
String taxAgentId = Util.null2String(importParam.getTaxAgentId());
|
||||
// 获取租户下所有的人员
|
||||
|
|
@ -295,17 +299,17 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
} else {
|
||||
Optional<TaxAgentManageRangeEmployeeDTO> optionalTemp = taxAgentList.stream().filter(m -> m.getTaxAgentName().equals(taxAgentName)).findFirst();
|
||||
Optional<TaxAgentPO> optionalTemp = taxAgentList.stream().filter(m -> m.getName().equals(taxAgentName)).findFirst();
|
||||
if (optionalTemp.isPresent()) {
|
||||
if (StringUtils.isNotEmpty(taxAgentId) && !optionalTemp.get().getTaxAgentId().equals(Long.valueOf(taxAgentId))) {
|
||||
if (StringUtils.isNotEmpty(taxAgentId) && !optionalTemp.get().getId().equals(Long.valueOf(taxAgentId))) {
|
||||
//个税扣缴义务人与导入时选择的不一致
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + "个税扣缴义务人与导入时选择的不一致");
|
||||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
} else {
|
||||
addUpDeduction.setTaxAgentId(optionalTemp.get().getTaxAgentId());
|
||||
taxAgentEmployees = optionalTemp.get().getEmployeeList();
|
||||
addUpDeduction.setTaxAgentId(optionalTemp.get().getId());
|
||||
// taxAgentEmployees = optionalTemp.get().getEmployeeList();
|
||||
}
|
||||
} else {
|
||||
//个税扣缴义务人不存在
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
.collect(Collectors.toList());
|
||||
|
||||
effectiveFields.forEach(attendQuoteField -> {
|
||||
header.add(attendQuoteField.getFieldName());
|
||||
header.add(Util.formatMultiLang(attendQuoteField.getFieldName(), String.valueOf(user.getLanguage())));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -606,7 +606,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
header.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
|
||||
// 动态列
|
||||
for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) {
|
||||
header.add(attendQuoteField.getFieldName());
|
||||
header.add(Util.formatMultiLang(attendQuoteField.getFieldName(), String.valueOf(user.getLanguage())));
|
||||
}
|
||||
List<List<Object>> rows = new ArrayList<>();
|
||||
rows.add(header);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import com.google.common.collect.Lists;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -292,7 +293,7 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
|
|||
Map<String, String> column = columnsOptional.get();
|
||||
updates.add(AttendQuoteFieldPO.builder()
|
||||
.code(column.get("code"))
|
||||
.fieldName(column.get("name"))
|
||||
.fieldName(Util.formatMultiLang(column.get("name"), String.valueOf(user.getLanguage())))
|
||||
.updateTime(now)
|
||||
.build());
|
||||
}
|
||||
|
|
@ -312,7 +313,7 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
|
|||
Optional<Map<String, String>> columnsOptional = columns.stream().filter(column -> code.equals(column.get("code"))).findFirst();
|
||||
if (columnsOptional.isPresent()) {
|
||||
Map<String, String> column = columnsOptional.get();
|
||||
saves.add(buildAttendQuoteField(column.get("code"), column.get("name")));
|
||||
saves.add(buildAttendQuoteField(column.get("code"), Util.formatMultiLang(column.get("name"), String.valueOf(user.getLanguage()))));
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(saves)) {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import org.apache.commons.collections4.MapUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
|
@ -483,7 +484,7 @@ public class RemoteExcelServiceImpl extends Service implements RemoteExcelServic
|
|||
List<FormulaVar> formulaVars = fields.stream().map(e -> {
|
||||
FormulaVar formulaVar = new FormulaVar();
|
||||
formulaVar.setFieldId(referenceEnum.getValue() + SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR + e.getId());
|
||||
formulaVar.setName(e.getFieldName());
|
||||
formulaVar.setName(Util.formatMultiLang(e.getFieldName(), String.valueOf(user.getLanguage())));
|
||||
formulaVar.setSource("" + referenceEnum.getValue());
|
||||
formulaVar.setFieldType(DataType.NUMBER);
|
||||
return formulaVar;
|
||||
|
|
|
|||
|
|
@ -6719,6 +6719,55 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
Util_DataCache.setObjVal(cacheKey, JsonUtil.toJsonString(welfareNames));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batSave(AccountBatParam accountBatParam) {
|
||||
List<Long> paymentOrganizations = accountBatParam.getPaymentOrganizations();
|
||||
for (Long paymentOrganization : paymentOrganizations) {
|
||||
AccountParam param = AccountParam.builder()
|
||||
.billMonth(accountBatParam.getBillMonth())
|
||||
.paymentOrganization(paymentOrganization)
|
||||
.flag(true)
|
||||
.remarks(accountBatParam.getRemarks())
|
||||
.build();
|
||||
save(param);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batDelete(AccountBatParam batParam) {
|
||||
List<Long> ids = batParam.getIds();
|
||||
for (Long id : ids) {
|
||||
InsuranceAccountBatchPO po = getInsuranceAccountBatchMapper().getById(id);
|
||||
AccountParam param = AccountParam.builder()
|
||||
.billMonth(po.getBillMonth())
|
||||
.paymentOrganization(po.getPaymentOrganization())
|
||||
.build();
|
||||
delete(param);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batFile(AccountBatParam batParam) {
|
||||
List<Long> ids = batParam.getIds();
|
||||
for (Long id : ids) {
|
||||
InsuranceAccountBatchPO po = getInsuranceAccountBatchMapper().getById(id);
|
||||
AccountParam param = AccountParam.builder()
|
||||
.billMonth(po.getBillMonth())
|
||||
.paymentOrganization(po.getPaymentOrganization())
|
||||
.build();
|
||||
file(param);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batSocialSecurityBenefitsRecalculate(AccountBatParam batParam) {
|
||||
List<Long> ids = batParam.getIds();
|
||||
for (Long id : ids) {
|
||||
InsuranceAccountBatchPO param = InsuranceAccountBatchPO.builder().id(id).build();
|
||||
socialSecurityBenefitsRecalculate(param);
|
||||
}
|
||||
}
|
||||
|
||||
public void accountOtherView(InsuranceAccountViewListDTO dto, List<InsuranceAccountDetailPO> pos) {
|
||||
int otherNum = 0;
|
||||
BigDecimal otherPaySum = new BigDecimal("0");
|
||||
|
|
|
|||
|
|
@ -2770,12 +2770,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
if (otherPaymentBaseString != null) {
|
||||
updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
||||
}
|
||||
if (!welBaseDiffSign) {
|
||||
otherPaymentBaseString = adaptWelBaseLimit(updateOtherInfo.getOtherSchemeId(), updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
if (otherPaymentBaseString != null) {
|
||||
updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
StringBuilder errorMsg = new StringBuilder("");
|
||||
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "其他福利个人: " + errorMsg;
|
||||
}
|
||||
if ( (!welBaseDiffSign) && (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "其他福利公司: " + errorMsg;
|
||||
}
|
||||
}
|
||||
//需要拆分个人和公司福利基数时
|
||||
if (welBaseDiffSign) {
|
||||
|
|
@ -2841,12 +2851,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
if (otherPaymentBaseString != null) {
|
||||
insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
||||
}
|
||||
if (!welBaseDiffSign) {
|
||||
otherPaymentBaseString = adaptWelBaseLimit(insertOtherInfo.getOtherSchemeId(), insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
if (otherPaymentBaseString != null) {
|
||||
insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
StringBuilder errorMsg = new StringBuilder("");
|
||||
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "其他福利个人:" + errorMsg;
|
||||
}
|
||||
if ( (!welBaseDiffSign) && (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "其他福利公司:" + errorMsg;
|
||||
}
|
||||
}
|
||||
//需要拆分个人和公司福利基数时
|
||||
if (welBaseDiffSign) {
|
||||
|
|
@ -2981,12 +3001,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
if (fundPaymentBaseString != null) {
|
||||
updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
||||
}
|
||||
if (!welBaseDiffSign) {
|
||||
fundPaymentBaseString = adaptWelBaseLimit(updateFundInfo.getFundSchemeId(), updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
if (fundPaymentBaseString != null) {
|
||||
updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
StringBuilder errorMsg = new StringBuilder("");
|
||||
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "公积金个人" + errorMsg;
|
||||
}
|
||||
if ( (!welBaseDiffSign) && (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "公积金公司" + errorMsg;
|
||||
}
|
||||
}
|
||||
|
||||
//需要拆分个人和公司福利基数时
|
||||
|
|
@ -3057,12 +3087,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
if (fundPaymentBaseString != null) {
|
||||
insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
||||
}
|
||||
if (!welBaseDiffSign) {
|
||||
fundPaymentBaseString = adaptWelBaseLimit(insertFundInfo.getFundSchemeId(), insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
if (fundPaymentBaseString != null) {
|
||||
insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
StringBuilder errorMsg = new StringBuilder("");
|
||||
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "公积金个人:" + errorMsg;
|
||||
}
|
||||
if ((!welBaseDiffSign) && (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "公积金公司:" + errorMsg;
|
||||
}
|
||||
}
|
||||
|
||||
//需要拆分个人和公司福利基数时
|
||||
|
|
@ -3204,12 +3244,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
if (socialPaymentBaseString != null) {
|
||||
updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
||||
}
|
||||
if (!welBaseDiffSign) {
|
||||
socialPaymentBaseString = adaptWelBaseLimit(updateSocialInfo.getSocialSchemeId(), updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
if (socialPaymentBaseString != null) {
|
||||
updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
StringBuilder errorMsg = new StringBuilder("");
|
||||
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "社保个人:" + errorMsg;
|
||||
}
|
||||
if ((!welBaseDiffSign) && (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "社保公司:" + errorMsg;
|
||||
}
|
||||
}
|
||||
|
||||
//需要拆分个人和公司福利基数时
|
||||
|
|
@ -3279,12 +3329,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
if (socialPaymentBaseString != null) {
|
||||
insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
||||
}
|
||||
if (!welBaseDiffSign) {
|
||||
socialPaymentBaseString = adaptWelBaseLimit(insertSocialInfo.getSocialSchemeId(), insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
if (socialPaymentBaseString != null) {
|
||||
insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
StringBuilder errorMsg = new StringBuilder("");
|
||||
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "社保个人:" + errorMsg;
|
||||
}
|
||||
if ((!welBaseDiffSign) && (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||
combineErrorMsg = "社保公司:" + errorMsg;
|
||||
}
|
||||
}
|
||||
//需要拆分个人和公司福利基数时
|
||||
if (welBaseDiffSign) {
|
||||
|
|
@ -4028,7 +4088,12 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
if (org.apache.commons.collections.CollectionUtils.isEmpty(employeeIds)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return getInsuranceBaseInfoMapper().listEndDateIsNull(employeeIds);
|
||||
List<InsuranceArchivesBaseInfoPO> resultList = new ArrayList<>();
|
||||
List<List<Long>> partition = Lists.partition(employeeIds, 500);
|
||||
partition.forEach(part -> {
|
||||
resultList.addAll(getInsuranceBaseInfoMapper().listEndDateIsNull(part));
|
||||
});
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alipay.oceanbase.jdbc.StringUtils;
|
||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
|
|
@ -41,6 +40,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
|||
import com.engine.salary.util.page.Column;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
|
|||
|
|
@ -1409,6 +1409,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
|
||||
Boolean otherCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg);
|
||||
|
||||
Boolean socialCheckBase2 = true;
|
||||
Boolean fundCheckBase2 = true;
|
||||
Boolean otherCheckBase2 = true;
|
||||
if (!welBaseDiffSign) {
|
||||
socialCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||
fundCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||
otherCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||
}
|
||||
Boolean socialCheckComBase = true;
|
||||
Boolean fundCheckComBase = true;
|
||||
Boolean otherCheckComBase = true;
|
||||
|
|
@ -1417,17 +1425,17 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
fundCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||
otherCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||
}
|
||||
if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckComBase && fundCheckComBase && otherCheckComBase) {
|
||||
if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckBase2 && fundCheckBase2 && otherCheckBase2 && socialCheckComBase && fundCheckComBase && otherCheckComBase) {
|
||||
insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO);
|
||||
} else {
|
||||
String checkMessage = "该条数据中";
|
||||
if (!socialCheckBase || !socialCheckComBase) {
|
||||
if (!socialCheckBase || !socialCheckBase2 || !socialCheckComBase) {
|
||||
checkMessage = checkMessage + "社保福利基数、";
|
||||
}
|
||||
if (!fundCheckBase || !fundCheckComBase) {
|
||||
if (!fundCheckBase || !fundCheckBase2 || !fundCheckComBase) {
|
||||
checkMessage = checkMessage + "公积金福利基数、";
|
||||
}
|
||||
if (!otherCheckBase || !otherCheckComBase) {
|
||||
if (!otherCheckBase || !otherCheckBase2 || !otherCheckComBase) {
|
||||
checkMessage = checkMessage + "其他福利基数、";
|
||||
}
|
||||
checkMessage = checkMessage.substring(0, checkMessage.length() - 1);
|
||||
|
|
@ -1447,6 +1455,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString);
|
||||
insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString);
|
||||
insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString);
|
||||
if (!welBaseDiffSign) {
|
||||
newSocialPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
newFundPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
newOtherPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString);
|
||||
insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString);
|
||||
insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString);
|
||||
}
|
||||
|
||||
if (welBaseDiffSign) {
|
||||
String newSocialPaymentComBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
|
|
|
|||
|
|
@ -405,11 +405,13 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
if (openSum != null && StringUtils.isNotBlank(openSum.getConfValue()) && OpenEnum.parseByValue(openSum.getConfValue()) == OpenEnum.OPEN) {
|
||||
total = true;
|
||||
Map<String, Object> sumRow = getSalaryAcctResultService(user).sumRow(queryParam);
|
||||
sumRow.forEach((k, v) -> {
|
||||
if (NumberUtils.isCreatable(v.toString())) {
|
||||
sumRow.put(k, new BigDecimal(v.toString()));
|
||||
}
|
||||
});
|
||||
if (sumRow != null) {
|
||||
sumRow.forEach((k, v) -> {
|
||||
if (NumberUtils.isCreatable(v.toString())) {
|
||||
sumRow.put(k, new BigDecimal(v.toString()));
|
||||
}
|
||||
});
|
||||
}
|
||||
if (sumRow != null) {
|
||||
sumRow.put("taxAgentName", "总计");
|
||||
resultMapList.add(sumRow);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.engine.salary.common.LocalDateRange;
|
|||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.entity.salaryBill.po.SalarySendPO;
|
||||
import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctBatParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||
|
|
@ -43,6 +44,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.time.YearMonth;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -833,4 +835,38 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
|||
public void updateDate(Long id, Date updateTime) {
|
||||
getSalaryAcctRecordMapper().updateDate(id, updateTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batSave(SalaryAcctBatParam saveParam) {
|
||||
|
||||
List<Long> salarySobIds = saveParam.getSalarySobIds();
|
||||
YearMonth salaryMonth = SalaryDateUtil.localDate2YearMonth(saveParam.getSalaryMonth());
|
||||
for (int i = 0; i < salarySobIds.size(); i++) {
|
||||
Long salarySobId = salarySobIds.get(i);
|
||||
SalaryAcctRecordSaveParam param = SalaryAcctRecordSaveParam.builder()
|
||||
.salarySobId(salarySobId)
|
||||
.salaryMonth(salaryMonth)
|
||||
.description(saveParam.getDescription())
|
||||
.build();
|
||||
save(param);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batFile(SalaryAcctBatParam param) {
|
||||
List<Long> salaryAcctRecordIds = param.getSalaryAcctRecordIds();
|
||||
for (int i = 0; i < salaryAcctRecordIds.size(); i++) {
|
||||
Long recordId = salaryAcctRecordIds.get(i);
|
||||
file(recordId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batReCalculate(SalaryAcctBatParam param) {
|
||||
List<Long> salaryAcctRecordIds = param.getSalaryAcctRecordIds();
|
||||
for (int i = 0; i < salaryAcctRecordIds.size(); i++) {
|
||||
Long recordId = salaryAcctRecordIds.get(i);
|
||||
reCalculate(recordId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1151,7 +1151,14 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
|
||||
@Override
|
||||
public void updateLockStatusByParam(SalaryAcctResultUpdateLockStatusParam updateParam) {
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(updateParam.getSalaryAcctRecordId());
|
||||
Set<Long> acctEmpIds = updateParam.getAcctEmpIds();
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees;
|
||||
if (CollUtil.isNotEmpty(acctEmpIds)) {
|
||||
salaryAcctEmployees = getSalaryAcctEmployeeService(user).listByIds(acctEmpIds);
|
||||
} else {
|
||||
salaryAcctEmployees = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(updateParam.getSalaryAcctRecordId());
|
||||
}
|
||||
|
||||
if (CollectionUtils.isEmpty(salaryAcctEmployees)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -662,8 +662,6 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
public XSSFWorkbook exportAdjustRecordList(SalaryItemAdjustRecordQueryParam queryParam) {
|
||||
// 1.工作簿名称
|
||||
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资项目调整记录");
|
||||
// 获取所有可被引用的薪资项目
|
||||
List<SalaryItemPO> salaryItems = salaryItemMapper.getCanAdjustSalaryItems();
|
||||
String[] header = {
|
||||
SalaryI18nUtil.getI18nLabel(85429, "姓名"),
|
||||
SalaryI18nUtil.getI18nLabel(86187, "员工状态"),
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
// 1.工作簿名称
|
||||
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资档案");
|
||||
// 获取所有可被引用的薪资项目
|
||||
List<SalaryItemPO> salaryItems = salaryItemMapper.getCanAdjustSalaryItems();
|
||||
List<SalaryItemPO> salaryItems = getSalaryArchiveItemService(user).getCanAdjustSalaryItems();
|
||||
Object[] header = {
|
||||
new WeaTableColumnGroup("150px", SalaryI18nUtil.getI18nLabel(85429, "姓名"), "", "", 0),
|
||||
new WeaTableColumnGroup("150px", SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "", "", 0),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Validator;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
|
|
@ -1752,9 +1751,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
}
|
||||
|
||||
String mobile = employee.getMobile();
|
||||
if (Validator.isMobile(mobile)) {
|
||||
throw new SalaryRunTimeException("手机号信息有误");
|
||||
}
|
||||
|
||||
boolean checkSendSMS = MessageUtil.checkSendSMS();
|
||||
if (!checkSendSMS) {
|
||||
|
|
@ -1782,6 +1778,9 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
|
||||
//取出验证码
|
||||
String cacheValue = getSalaryCacheService(user).get(SALARY_CACHE_SMS_CODE + "_" + id);
|
||||
if (cacheValue == null) {
|
||||
throw new SalaryRunTimeException("未获取到验证码,请重新发送");
|
||||
}
|
||||
String[] cache = cacheValue.split("_");
|
||||
String code = cache[0];
|
||||
//失效时间
|
||||
|
|
|
|||
|
|
@ -238,6 +238,9 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
}
|
||||
|
||||
List<SalarySobPO> list = getSalarySobMapper().listSome(build);
|
||||
if (param.isShare() == true) {
|
||||
return list;
|
||||
}
|
||||
return getAuthService(user).auth(list, param.getFilterType(), SalarySobPO.class);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -471,15 +471,20 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
||||
Long currentEmployeeId = (long) user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList =
|
||||
getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList =
|
||||
// getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
|
||||
TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
|
||||
param.setFilterType(AuthFilterTypeEnum.ADMIN_DATA);
|
||||
Collection<TaxAgentPO> taxAgentList = getTaxAgentService(user).listAuth(param);
|
||||
|
||||
SpecialAddDeductionPO byId = SpecialAddDeductionBiz.getById(specialAddDeductionParam.getId());
|
||||
if (byId == null) {
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
//管理员可以编辑该扣缴义务人数据,其他人可以编辑本人数据
|
||||
boolean canEdit = byId.getEmployeeId().equals((long) user.getUID())
|
||||
|| taxAgentList.stream().anyMatch(t -> Objects.equals(t.getTaxAgentId(), byId.getTaxAgentId()));
|
||||
|| taxAgentList.stream().anyMatch(t -> Objects.equals(t.getId(), byId.getTaxAgentId()));
|
||||
if (!canEdit) {
|
||||
//没有编辑权限
|
||||
throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");
|
||||
|
|
|
|||
|
|
@ -291,6 +291,9 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
public List<TaxAgentPO> listAuth(TaxAgentQueryParam queryParam) {
|
||||
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listBySome(queryParam);
|
||||
AuthFilterTypeEnum filterType = queryParam.getFilterType();
|
||||
if (queryParam.isShare()) {
|
||||
return taxAgents;
|
||||
}
|
||||
return getAuthService(user).auth(taxAgents, filterType, TaxAgentPO.class);
|
||||
}
|
||||
|
||||
|
|
@ -586,7 +589,7 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
public List<Map<String, Object>> selectList(boolean needAuth) {
|
||||
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listAll();
|
||||
if (needAuth) {
|
||||
taxAgents = handleForDevolution(taxAgents, (long) user.getUID(), true);
|
||||
taxAgents = getAuthService(user).auth(taxAgents, AuthFilterTypeEnum.QUERY_DATA, TaxAgentPO.class);
|
||||
}
|
||||
return taxAgents.stream().map(m -> {
|
||||
Map<String, Object> map = new HashMap<>(2);
|
||||
|
|
|
|||
|
|
@ -210,7 +210,14 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
|||
.replace("{1}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||
}
|
||||
// 查询薪资所属月的薪资核算记录
|
||||
salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).taxAgentId(taxAgentId).build());
|
||||
salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).build());
|
||||
List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByTaxAgentId(saveParam.getTaxAgentId());
|
||||
if (CollectionUtils.isEmpty(salarySobPOS)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98874, "{0}该义务人下无账套数据").replace("{0}", saveParam.getSalaryMonth().toString()));
|
||||
}
|
||||
List<Long> salarySobIds = salarySobPOS.stream().map(SalarySobPO::getId).collect(Collectors.toList());
|
||||
|
||||
salaryAcctRecordPOS.stream().filter(record -> salarySobIds.contains(record.getSalarySobId())).collect(Collectors.toList());
|
||||
|
||||
// 无薪资核算记录,不允许生成个税申报表
|
||||
if (CollectionUtils.isEmpty(salaryAcctRecordPOS)) {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.common.SalaryContext;
|
|||
import com.engine.salary.exception.ExceptionUtil;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import weaver.general.BaseBean;
|
||||
|
|
@ -15,6 +16,7 @@ import weaver.hrm.User;
|
|||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
|
@ -52,6 +54,17 @@ public class ResponseResult<T, R> {
|
|||
SalaryContext.get().setValue("response", response);
|
||||
}
|
||||
|
||||
public T parseParams(HttpServletRequest request, Class<T> clazz) {
|
||||
T t = null;
|
||||
try {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
t = mapper.readValue(request.getInputStream(), clazz);
|
||||
} catch (IOException e) {
|
||||
log.error("salary api parseParams fail , param {}", t, e);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统一返回方法
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.util.excel;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
|
@ -139,8 +140,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
|
|
@ -235,8 +238,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
|
|
@ -311,8 +316,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
|
|
@ -377,8 +384,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -458,8 +467,10 @@ public class ExcelUtil {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.util.excel;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.engine.salary.component.WeaTableColumnGroup;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -191,8 +192,10 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
if (lastRowRed && rowIndex == rowList.size() - 1) {
|
||||
cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex)));
|
||||
|
|
@ -200,8 +203,7 @@ public class ExcelUtilPlus {
|
|||
cell.setCellStyle(numberCellStyleMap.get(patternList.get(cellIndex)));
|
||||
}
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
double value = o == null ? 0 : ((BigDecimal) o).doubleValue();
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
cell.setCellValue(((BigDecimal) o).doubleValue());
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -221,6 +223,7 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
return workbook;
|
||||
}
|
||||
|
||||
public static XSSFWorkbook genWorkbookV2(List<List<Object>> rowList, String sheetName) {
|
||||
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||
|
||||
|
|
@ -281,11 +284,13 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
cell.setCellValue(((BigDecimal) o).doubleValue());
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -368,8 +373,10 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -477,11 +484,13 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
cell.setCellValue(((BigDecimal) o).doubleValue());
|
||||
} else if (o instanceof Boolean) {
|
||||
cell.setCellType(CellType.BOOLEAN);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
|
|
@ -675,8 +684,10 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
if (lastRowRed && rowIndex == rowList.size() - 1) {
|
||||
cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex)));
|
||||
|
|
@ -840,8 +851,10 @@ public class ExcelUtilPlus {
|
|||
}
|
||||
Object o = infoList.get(cellIndex);
|
||||
if (o instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue(String.valueOf(o));
|
||||
}
|
||||
} else if (o instanceof BigDecimal) {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||
|
|
|
|||
|
|
@ -217,6 +217,38 @@ public class SIAccountController {
|
|||
return new ResponseResult<AccountParam, String>(user).run(getService(user)::save, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/batSave")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AccountBatParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batSave, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/batDelete")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batDelete(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AccountBatParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batDelete, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/batFile")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batFile(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AccountBatParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batFile, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/batSocialSecurityBenefitsRecalculate")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batSocialSecurityBenefitsRecalculate(@Context HttpServletRequest request, @Context HttpServletResponse response,@RequestBody AccountBatParam batParam ){
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batSocialSecurityBenefitsRecalculate,batParam);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 正常缴纳页核算
|
||||
|
|
|
|||
|
|
@ -141,6 +141,43 @@ public class SalaryAcctController {
|
|||
return new ResponseResult<Long, Long>(user).run(getSalaryAcctRecordWrapper(user)::reCalculate, param.getSalaryAcctRecordId());
|
||||
}
|
||||
|
||||
//薪资核算
|
||||
@POST
|
||||
@Path("/batAccounting")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batAccounting(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryAcctBatParam, String>(user).run(getSalaryAcctRecordWrapper(user)::batCalculate, param);
|
||||
}
|
||||
|
||||
//保存薪资核算的基本信息
|
||||
@POST
|
||||
@Path("/basic/batSave")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryAcctBatParam, Long>(user).run(getSalaryAcctRecordWrapper(user)::batSave, param);
|
||||
}
|
||||
|
||||
|
||||
//归档薪资核算记录
|
||||
@POST
|
||||
@Path("/batFile")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batFile(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryAcctBatParam, Long>(user).run(getSalaryAcctRecordWrapper(user)::batFile, param);
|
||||
}
|
||||
|
||||
//重新核算
|
||||
@POST
|
||||
@Path("/batReAccounting")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batReAccounting(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryAcctBatParam, Long>(user).run(getSalaryAcctRecordWrapper(user)::batReCalculate, param);
|
||||
}
|
||||
|
||||
//判断是否存在合并计税
|
||||
@GET
|
||||
@Path("/hasConsolidatedTax")
|
||||
|
|
|
|||
|
|
@ -480,6 +480,29 @@ public class SalaryBillController {
|
|||
return new ResponseResult<SalarySendWithdrawParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::withdraw, queryParam);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/send/batGrant")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batGrant(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalarySendBatParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::batGrant, queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工资单撤回
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/send/batWithdraw")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batWithdraw(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalarySendBatParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::batWithdraw, queryParam);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 工资单发放详情列表的高级搜索
|
||||
*
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationFormDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationInfoDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationBatParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
|
||||
|
|
@ -99,6 +100,15 @@ public class TaxDeclarationController {
|
|||
return new ResponseResult<TaxDeclarationSaveParam, Long>(user).run(getTaxDeclarationWrapper(user)::save, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/batSave")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String batSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationBatParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
param.setSalaryMonth(SalaryDateUtil.String2YearMonth(param.getSalaryMonthStr()));
|
||||
return new ResponseResult<TaxDeclarationBatParam, Long>(user).run(getTaxDeclarationWrapper(user)::batSave, param);
|
||||
}
|
||||
|
||||
//个税申报表详情列表
|
||||
@POST
|
||||
@Path("/detail/list")
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class AttendQuoteDataWrapper extends Service {
|
|||
attendQuoteFields.stream()
|
||||
.filter(attendQuoteField->effectiveColumns.contains(Util.null2String(attendQuoteField.getId())))
|
||||
.forEach(attendQuoteField -> {
|
||||
columns.add(Column.builder().title(attendQuoteField.getFieldName())
|
||||
columns.add(Column.builder().title(Util.formatMultiLang(attendQuoteField.getFieldName(), String.valueOf(user.getLanguage())))
|
||||
.dataIndex(attendQuoteField.getId() + "_attendQuoteData")
|
||||
.key(attendQuoteField.getId() + "_attendQuoteData").display(Boolean.TRUE).build());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,13 @@ import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO;
|
|||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordFormDTO;
|
||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordListDTO;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctBatParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctCalculateParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
||||
import com.engine.salary.entity.salarysob.po.SalaryApprovalRulePO;
|
||||
import com.engine.salary.entity.salarysob.po.*;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||
|
|
@ -55,6 +56,9 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
|||
private SalaryAcctRecordService getSalaryAcctRecordService(User user) {
|
||||
return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
|
||||
}
|
||||
private SalaryAcctResultWrapper getSalaryAcctResultWrapper(User user) {
|
||||
return ServiceUtil.getService(SalaryAcctResultWrapper.class, user);
|
||||
}
|
||||
|
||||
private SalarySobService getSalarySobService(User user) {
|
||||
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||
|
|
@ -380,4 +384,28 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
|||
public void updateSobConfig(Long id) {
|
||||
getSalaryAcctSobConfigService(user).updateBySalaryAcctRecordId(id);
|
||||
}
|
||||
|
||||
|
||||
public void batSave(SalaryAcctBatParam param) {
|
||||
getSalaryAcctRecordService(user).batSave(param);
|
||||
}
|
||||
|
||||
|
||||
public void batFile(SalaryAcctBatParam param) {
|
||||
getSalaryAcctRecordService(user).batFile(param);
|
||||
}
|
||||
|
||||
public void batReCalculate(SalaryAcctBatParam param) {
|
||||
getSalaryAcctRecordService(user).batReCalculate(param);
|
||||
|
||||
}
|
||||
|
||||
public void batCalculate(SalaryAcctBatParam param) {
|
||||
List<Long> salaryAcctRecordIds = param.getSalaryAcctRecordIds();
|
||||
for (int i = 0; i < salaryAcctRecordIds.size(); i++) {
|
||||
Long recordId = salaryAcctRecordIds.get(i);
|
||||
SalaryAcctCalculateParam calculateParam = SalaryAcctCalculateParam.builder().salaryAcctRecordId(recordId).build();
|
||||
getSalaryAcctResultWrapper(user).calculate(calculateParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -535,9 +535,6 @@ public class SalaryArchiveWrapper extends Service {
|
|||
return map;
|
||||
}
|
||||
|
||||
public Map<String, Object> selectSalaryArchiveColumns(String importType) {
|
||||
return getSalaryArchiveService(user).selectSalaryArchiveColumns(SalaryArchiveImportTypeEnum.parseByValue(importType));
|
||||
}
|
||||
|
||||
|
||||
public Map<String, Object> checkSalaryArchiveInit(SalaryArchiveImportActionParam importData) {
|
||||
|
|
|
|||
|
|
@ -738,4 +738,28 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
public String genPdfBeforeExport(SalaryExportPdfParam salaryExportPdfParam) {
|
||||
return getSalaryBillService(user).genPdfBeforeExport(salaryExportPdfParam);
|
||||
}
|
||||
|
||||
|
||||
public void batGrant(SalarySendBatParam param) {
|
||||
List<Long> salarySendIds = param.getSalarySendIds();
|
||||
|
||||
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||
Long sendId = salarySendIds.get(i);
|
||||
SalarySendGrantParam grantParam = SalarySendGrantParam.builder()
|
||||
.salarySendId(sendId)
|
||||
.build();
|
||||
grant(grantParam);
|
||||
}
|
||||
}
|
||||
public void batWithdraw(SalarySendBatParam param) {
|
||||
List<Long> salarySendIds = param.getSalarySendIds();
|
||||
|
||||
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||
Long sendId = salarySendIds.get(i);
|
||||
SalarySendWithdrawParam grantParam = SalarySendWithdrawParam.builder()
|
||||
.salarySendId(sendId)
|
||||
.build();
|
||||
withdraw(grantParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.engine.salary.entity.taxdeclaration.bo.TaxDeclarationBO;
|
|||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationFormDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationInfoDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationListDTO;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationBatParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam;
|
||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
|
||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
|
||||
|
|
@ -158,4 +159,20 @@ public class TaxDeclarationWrapper extends Service {
|
|||
public void withDrawTaxDeclaration(Long taxDeclarationId) {
|
||||
getTaxDeclarationService(user).withDrawTaxDeclaration(taxDeclarationId);
|
||||
}
|
||||
|
||||
public void batSave(TaxDeclarationBatParam param) {
|
||||
List<Long> taxAgentIds = param.getTaxAgentIds();
|
||||
for (int i = 0; i < taxAgentIds.size(); i++) {
|
||||
Long taxAgentId = taxAgentIds.get(i);
|
||||
TaxDeclarationSaveParam saveParam = TaxDeclarationSaveParam.builder()
|
||||
.salaryMonth(param.getSalaryMonth())
|
||||
.taxAgentId(taxAgentId)
|
||||
.description(param.getDescription())
|
||||
.taxCycle(param.getTaxCycle())
|
||||
.salaryDate(param.getSalaryDate())
|
||||
.build();
|
||||
save(saveParam);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue