Merge branch 'release/2.14.3.2406.01' into release/个税版本2.14.3.2406.01

# Conflicts:
#	src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml
#	src/com/engine/salary/service/impl/SalaryAcctCalculateServiceImpl.java
This commit is contained in:
钱涛 2024-06-03 11:18:01 +08:00
commit 572b114f28
47 changed files with 255 additions and 522 deletions

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
/

View File

@ -0,0 +1 @@
ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int(0) NULL ;

View File

@ -0,0 +1,2 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0)
/

View File

@ -0,0 +1 @@
ALTER TABLE hrsa_salary_acct_emp ADD COLUMN lock_status int NULL ;

View File

@ -0,0 +1,2 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status int NULL
GO

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_acct_emp ADD lock_status NUMBER(11, 0);
/

View File

@ -1,7 +1,6 @@
select id from hrsa_tax_agent_emp
where tax_agent_id =id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =id and delete_type = 0)
update hrsa_tax_agent_emp set delete_type = 3
where id in(
select id from hrsa_tax_agent_emp
where tax_agent_id =27 and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =27 and delete_type = 0)
)
where tax_agent_id=id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =id and delete_type = 0)

View File

@ -17,5 +17,5 @@ left join hrmresource e on e.id= result.employee_id
left join hrsa_salary_item c on c.id=i.salary_item_id
left join hrsa_tax_agent t on a.tax_agent_id=t.id
where a.delete_type=0 and i.delete_type=0 and t.delete_type=0 and c.delete_type=0
and a.employee_id=$main.ygid$ and t.name='$main.dzqgskjywr$'
and a.employee_id=人员id and t.name=扣缴义务人名称
and effective_time <= now() and c.name='基本工资' order by effective_time desc

View File

@ -1,6 +1,5 @@
package com.engine.salary.biz;
import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO;
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
import com.engine.salary.mapper.salarysob.SalarySobItemMapper;
import com.google.common.collect.Lists;
@ -34,16 +33,6 @@ public class SalarySobItemBiz {
}
}
public List<SalarySobItemPO> listBySalarySobIdWithHideItem(SalarySobItemPO build) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class);
return mapper.listBySalarySobIdWithHideItem(build);
} finally {
sqlSession.close();
}
}
public void batchInsert(Collection<SalarySobItemPO> salarySobItemPOS) {
if (CollectionUtils.isEmpty(salarySobItemPOS)) {
@ -83,19 +72,7 @@ public class SalarySobItemBiz {
}
}
public void InsertItemShow(SalarySobItemHidePO salarySobItemHidePO) {
if (salarySobItemHidePO == null) {
return;
}
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class);
mapper.insertItemShow(salarySobItemHidePO);
sqlSession.commit();
} finally {
sqlSession.close();
}
}
public List<SalarySobItemPO> listBySalarySobIdAndGroupId(Long salarySobId, Collection<Long> salarySobItemGroupIds) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
@ -141,21 +118,6 @@ public class SalarySobItemBiz {
}
public void batchInsertItemShow(List<SalarySobItemHidePO> list) {
if (CollectionUtils.isEmpty(list)) {
return;
}
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class);
List<List<SalarySobItemHidePO>> partition = Lists.partition( list, 100);
partition.forEach(mapper::batchInsertItemShow);
sqlSession.commit();
} finally {
sqlSession.close();
}
}
public void update(SalarySobItemPO salarySobItemPO) {
if (Objects.isNull(salarySobItemPO)) {
return;

View File

@ -53,4 +53,9 @@ public class AttendQuoteDataBaseDTO {
* 工号
*/
private String jobNum;
/**
* 证件号码
*/
private String idNo;
}

View File

@ -172,7 +172,7 @@ public class SalaryBillBO {
try {
Method method = salaryFormulaEmployeeDTO.getClass().getMethod(getter);
Object invoke = method.invoke(salaryFormulaEmployeeDTO);
e.setSalaryItemValue((String) invoke);
e.setSalaryItemValue(Util.null2String(invoke));
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
log.error("no such method", e);
}
@ -386,7 +386,6 @@ public class SalaryBillBO {
}
try {
log.info("发送短信内容, {}", content);
if (e.get("mobile") != null) {
MessageUtil.sendSMS(e.get("mobile").toString(), content);
} else {

View File

@ -181,9 +181,9 @@ public class SalaryAcctResultBO {
List<WeaTableColumnGroup> childrenColumns = Lists.newArrayList();
for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) {
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
} else {
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
}
}
WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemGroupDTO.getName(), 0), salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns);
@ -192,18 +192,18 @@ public class SalaryAcctResultBO {
// 没有分类的薪资项目
for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getItems()) {
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
} else {
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
}
}
// 回算的薪资项目
for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getBackCalcItems()) {
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
} else {
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getDefaultLabel(), salarySobItemDTO.getPattern(), salarySobItemDTO.getDataType()));
}
}
@ -288,6 +288,8 @@ public class SalaryAcctResultBO {
}
// 主键id
map.put("id", e.getId());
//锁定状态
map.put("lockStatus", LockStatusEnum.getByValue(e.getLockStatus()).getDefaultLabel());
//人员id
map.put("employeeId", e.getEmployeeId());
// 个税扣缴义务人
@ -552,7 +554,7 @@ public class SalaryAcctResultBO {
// .canEdit(Objects.equals(Optional.ofNullable(salaryItemPO).map(SalaryItemPO::getUseInEmployeeSalary).orElse(0), 0))
.canEdit(true)
.pattern(salarySobItemPO.getPattern())
.lockStatus(lockItems.contains(salarySobItemPO.getSalaryItemId()) ? LockStatusEnum.LOCK.getValue() : LockStatusEnum.UNLOCK.getValue())
.lockStatus(lockItems.contains(salarySobItemPO.getSalaryItemId()) ? LockStatusEnum.LOCK.getDefaultLabel() : LockStatusEnum.UNLOCK.getDefaultLabel())
.build();
}

View File

@ -21,19 +21,19 @@ import java.util.Set;
@AllArgsConstructor
@NoArgsConstructor
public class SalaryAcctResultUpdateLockStatusParam {
//锁定状态
private LockStatusEnum lockStatus;
//薪资项目的Id")
private Long salaryItemId;
//薪资核算人员的id")
// private Set<String> idStrSet;
//薪资核算记录的id
private Long salaryAcctRecordId;
//薪资项目的Id
private Long salaryItemId;
//薪资项目的IdList
private Set<Long> salaryItemIds;
//薪资核算记录的id")
private Long salaryAcctRecordId;
//薪资核算人员的id
private Set<Long> acctEmpIds;
}

View File

@ -1,7 +1,7 @@
package com.engine.salary.entity.salaryacct.po;
import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -119,6 +119,11 @@ public class SalaryAcctEmployeePO {
@ElogTransform(name = "更新时间")
private Date updateTime;
@ElogTransform(name = "锁定状态")
private Integer lockStatus;
//--------条件----------
//主键id集合
private Collection<Long> ids;

View File

@ -67,8 +67,6 @@ public class SalarySobItemBO {
List<SalaryItemPO> defaultSalaryItemPOS,
Long employeeId, String tenantKey) {
Date now = new Date();
// 需要保存的隐藏项目
List<SalarySobItemHidePO> needInsertItemHides = new ArrayList<>();
// 处理薪资账套默认的薪资项目分类
Map<Long, Long> salarySobItemGroupIdMap = Maps.newHashMapWithExpectedSize(salarySobDefaultItemGroupPOS.size());
List<SalarySobItemGroupPO> salarySobItemGroups = Lists.newArrayListWithExpectedSize(salarySobDefaultItemGroupPOS.size());
@ -87,20 +85,6 @@ public class SalarySobItemBO {
.deleteType(NumberUtils.INTEGER_ZERO)
.build());
salarySobItemGroupIdMap.put(salarySobDefaultItemGroupPO.getId(), salarySobItemGroupId);
// 保存薪资项目分类隐藏信息
needInsertItemHides.add(SalarySobItemHidePO.builder()
.id(IdGenerator.generate())
.salarySobId(salarySobId)
.salaryItemId(salarySobItemGroupId)
.isGroup(1)
.itemHide(0L)
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build());
}
@ -128,20 +112,6 @@ public class SalarySobItemBO {
.tenantKey(tenantKey)
.deleteType(NumberUtils.INTEGER_ZERO)
.build());
// 保存薪资项目隐藏信息
needInsertItemHides.add(SalarySobItemHidePO.builder()
.id(IdGenerator.generate())
.salarySobId(salarySobId)
.salaryItemId(salaryItemPO.getId())
.isGroup(0)
.itemHide(Long.valueOf(salaryItemPO.getHideDefault()== null ? 0 : salaryItemPO.getHideDefault()))
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build());
}
// 处理薪资账套默认的自定义薪资项目开启了"默认使用"
for (int i = 0; i < defaultSalaryItemPOS.size(); i++) {
@ -169,19 +139,6 @@ public class SalarySobItemBO {
.tenantKey(tenantKey)
.deleteType(NumberUtils.INTEGER_ZERO)
.build());
// 保存薪资项目隐藏信息
needInsertItemHides.add(SalarySobItemHidePO.builder()
.id(IdGenerator.generate())
.salarySobId(salarySobId)
.salaryItemId(salaryItemPO.getId())
.isGroup(0)
.itemHide(Long.valueOf(salaryItemPO.getHideDefault() == null ? 0 : salaryItemPO.getHideDefault()))
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build());
}
// 薪资账套默认的回算薪资项目
@ -209,7 +166,7 @@ public class SalarySobItemBO {
}
return new Result().setNeedInsertSalarySobItems(salarySobItems).setNeedInsertSalarySobItemGroups(salarySobItemGroups)
.setNeedInsertSalarySobBackItems(salarySobBackItems).setNeedInsertItemHides(needInsertItemHides);
.setNeedInsertSalarySobBackItems(salarySobBackItems);
}
@Data
@ -230,10 +187,5 @@ public class SalarySobItemBO {
* 需要保存的回算薪资项目
*/
List<SalarySobBackItemPO> needInsertSalarySobBackItems;
/**
* 需要保存的薪资项目隐藏信息
*/
List<SalarySobItemHidePO> needInsertItemHides;
}
}

View File

@ -36,6 +36,8 @@ public class InsuranceArchivesEmployeePO {
private String telephone;
private String idNo;
@I18n
private String departmentName;

View File

@ -2,6 +2,7 @@ package com.engine.salary.entity.siexport.po;
import com.engine.salary.annotation.I18n;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
import lombok.Data;
/**
* @Author weaver_cl
@ -9,6 +10,7 @@ import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
* @Date 2022/3/7
* @Version V1.0
**/
@Data
public class AccountExportPO extends InsuranceAccountDetailPO {
@I18n
@ -16,58 +18,12 @@ public class AccountExportPO extends InsuranceAccountDetailPO {
private String telephone;
private String idNo;
@I18n
private String departmentName;
private Integer userStatus;
private String workcode;
public void setWorkcode(String workcode) {
this.workcode = workcode;
}
public String getWorkcode() {
return workcode;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public Integer getUserStatus() {
return userStatus;
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
// public UserStatusEnum getUserStatus() {
// return userStatus;
// }
//
// public void setUserStatus(UserStatusEnum userStatus) {
// this.userStatus = userStatus;
// }
}

View File

@ -3,25 +3,25 @@ package com.engine.salary.enums.salaryaccounting;
import com.engine.salary.enums.BaseEnum;
public enum LockStatusEnum implements BaseEnum<String> {
DEFAULT("DEFAULT", "默认", 0),
LOCK("LOCK", "锁定", 0),
UNLOCK("UNLOCK", "未锁定", 0);
public enum LockStatusEnum implements BaseEnum<Integer> {
LOCK(1, "LOCK", 0),
UNLOCK(0, "UNLOCK", 0);
private String value;
private Integer value;
private String defaultLabel;
private int labelId;
LockStatusEnum(String value, String defaultLabel, int labelId) {
LockStatusEnum(Integer value, String defaultLabel, int labelId) {
this.value = value;
this.defaultLabel = defaultLabel;
this.labelId = labelId;
}
@Override
public String getValue() {
public Integer getValue() {
return value;
}
@ -34,4 +34,13 @@ public enum LockStatusEnum implements BaseEnum<String> {
public String getDefaultLabel() {
return defaultLabel;
}
public static LockStatusEnum getByValue(Integer value) {
for (LockStatusEnum lockStatusEnum : LockStatusEnum.values()) {
if (lockStatusEnum.getValue().equals(value)) {
return lockStatusEnum;
}
}
return UNLOCK;
}
}

View File

@ -7,6 +7,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -32,6 +33,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -57,6 +59,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -121,6 +124,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -147,6 +151,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *
@ -173,6 +178,7 @@
e.MOBILE AS telephone,
d.departmentname AS departmentName,
e.STATUS AS userStatus,
e.certificatenum as idNo,
e.workcode AS workcode
FROM (
SELECT *

View File

@ -163,7 +163,8 @@
e.lastname as username,
d.departmentname AS departmentName,
e.mobile,
e.workcode as job_num
e.workcode as job_num,
e.certificatenum as idNo
</sql>
<sql id="paramSql">

View File

@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
import java.util.Set;
/**
* 薪资核算人员
@ -16,7 +17,7 @@ import java.util.List;
* @author qiantao
* @version 1.0
**/
public interface SalaryAcctEmployeeMapper {
public interface SalaryAcctEmployeeMapper {
/**
* 批量插入
@ -117,4 +118,8 @@ public interface SalaryAcctEmployeeMapper {
* @return 返回记录没有返回null
*/
SalaryAcctEmployeePO getById(Long id);
void lockByAcctEmpIds(@Param("lockStatus") Integer lockStatus, @Param("acctEmpIds") Set<Long> acctEmpIds);
void lockByRecordId(@Param("lockStatus") Integer lockStatus, @Param("recordId") Long recordId);
}

View File

@ -15,6 +15,7 @@
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
<result column="employee_type" property="employeeType"/>
<result column="lock_status" property="lockStatus"/>
</resultMap>
<resultMap id="SalaryAccEmployeeCountMap"
@ -38,7 +39,8 @@
t.update_time,
t.delete_type,
t.tenant_key,
t.employee_type
t.employee_type,
t.lock_status
</sql>
<sql id="emp1Column">
@ -52,7 +54,7 @@
<insert id="batchInsert">
INSERT INTO hrsa_salary_acct_emp(
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key,employee_type)
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status)
VALUES
<foreach collection="collection" item="emp" separator=",">
(
@ -66,14 +68,15 @@
#{emp.updateTime},
#{emp.deleteType},
#{emp.tenantKey},
#{emp.employeeType}
#{emp.employeeType},
#{emp.lockStatus}
)
</foreach>
</insert>
<insert id="batchInsert" databaseId="oracle">
INSERT INTO hrsa_salary_acct_emp(
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key,employee_type)
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status)
<foreach collection="collection" item="emp" separator="union all">
select
@ -87,7 +90,8 @@
#{emp.updateTime,jdbcType=DATE},
#{emp.deleteType,jdbcType=INTEGER},
#{emp.tenantKey,jdbcType=VARCHAR},
#{emp.employeeType,jdbcType=INTEGER}
#{emp.employeeType,jdbcType=INTEGER},
#{emp.lockStatus,jdbcType=INTEGER}
from dual
</foreach>
</insert>
@ -95,7 +99,7 @@
<foreach collection="collection" item="emp" separator=";">
INSERT INTO hrsa_salary_acct_emp(
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key,employee_type)
creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status)
VALUES
(
#{emp.salaryAcctRecordId},
@ -108,7 +112,8 @@
#{emp.updateTime},
#{emp.deleteType},
#{emp.tenantKey},
#{emp.employeeType}
#{emp.employeeType},
#{emp.lockStatus}
)
</foreach>
</insert>
@ -1145,6 +1150,7 @@
<result column="update_time" property="updateTime"/>
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
<result column="lock_status" property="lockStatus"/>
</resultMap>
<!-- 表字段 -->
@ -1163,6 +1169,7 @@
, t.delete_type
, t.tenant_key
, t.employee_type
, t.lock_status
</sql>
@ -1259,4 +1266,22 @@
FROM hrsa_salary_acct_emp t
WHERE id = #{id} AND delete_type = 0
</select>
<update id="lockByAcctEmpIds">
UPDATE hrsa_salary_acct_emp
SET lock_status = #{lockStatus}
WHERE delete_type = 0
AND id IN
<foreach collection="acctEmpIds" open="(" item="acctEmpId" separator="," close=")">
#{acctEmpId}
</foreach>
</update>
<update id="lockByRecordId">
UPDATE hrsa_salary_acct_emp
SET lock_status = #{lockStatus}
WHERE delete_type = 0
AND salary_acct_record_id =#{recordId}
</update>
</mapper>

View File

@ -1,6 +1,5 @@
package com.engine.salary.mapper.salarysob;
import com.engine.salary.entity.salarysob.po.SalarySobItemHidePO;
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
import org.apache.ibatis.annotations.Param;
@ -24,7 +23,6 @@ public interface SalarySobItemMapper {
*/
List<SalarySobItemPO> listSome(SalarySobItemPO salarySobItemPO);
List<SalarySobItemPO> listBySalarySobIdWithHideItem(SalarySobItemPO salarySobItemPO);
/**
@ -35,14 +33,7 @@ public interface SalarySobItemMapper {
*/
SalarySobItemPO getById(Long id);
/**
* 新增忽略null字段
*
* @param salarySobItemPO 新增的记录
* @return 返回影响行数
*/
int insertIgnoreNull(SalarySobItemPO salarySobItemPO);
/**
* 修改修改所有字段
*
@ -50,7 +41,7 @@ public interface SalarySobItemMapper {
* @return 返回影响行数
*/
int update(SalarySobItemPO salarySobItemPO);
/**
* 修改忽略null字段
*
@ -97,12 +88,6 @@ public interface SalarySobItemMapper {
*/
void deleteItemShowBySalarySobId(@Param("salarySobIds")Collection<Long> salarySobIds);
/**
* 插入薪资项目分组是否显示
* @param salarySobItemHidePO
*/
void insertItemShow(SalarySobItemHidePO salarySobItemHidePO);
/**
* 根据账套id以及薪资项目分组获取
* @param
@ -112,9 +97,4 @@ public interface SalarySobItemMapper {
void deleteByGroupIds(@Param("groupIds") List<Long> needDeleteGroupIds);
/**
* 批量插入薪资项目分组是否显示
* @param list
*/
void batchInsertItemShow(@Param("collection")List<SalarySobItemHidePO> list);
}

View File

@ -151,129 +151,6 @@
</select>
<select id="listBySalarySobIdWithHideItem"
resultType="com.engine.salary.entity.salarysob.po.SalarySobItemPO">
SELECT
t.create_time
, t.creator
, t.delete_type
, t.description
, t.formula_id
, t.id
, t.salary_item_id
, t.salary_sob_id
, t.salary_sob_item_group_id
, t.sorted_index
, t.tenant_key
, t.update_time
, t.rounding_mode
, t.pattern
, t.value_type
,t.can_delete
,t.salary_item_code
,h.item_hide
FROM hrsa_salary_sob_item t
LEFT JOIN hrsa_salary_item_hide h ON t.salary_item_id=h.salary_item_id and t.salary_sob_id = h.salary_sob_id
WHERE t.delete_type = 0
and t.salary_sob_id=#{salarySobId}
ORDER BY id DESC
</select>
<!-- 插入不为NULL的字段 -->
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salarysob.po.SalarySobItemPO">
INSERT INTO hrsa_salary_sob_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="description != null">
description,
</if>
<if test="formulaId != null">
formula_id,
</if>
<if test="id != null">
id,
</if>
<if test="salaryItemId != null">
salary_item_id,
</if>
<if test="salarySobId != null">
salary_sob_id,
</if>
<if test="salarySobItemGroupId != null">
salary_sob_item_group_id,
</if>
<if test="sortedIndex != null">
sorted_index,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="canDelete != null">
can_delete,
</if>
<if test="itemHide != null">
item_hide,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="createTime != null">
#{createTime},
</if>
<if test="creator != null">
#{creator},
</if>
<if test="deleteType != null">
#{deleteType},
</if>
<if test="description != null">
#{description},
</if>
<if test="formulaId != null">
#{formulaId},
</if>
<if test="id != null">
#{id},
</if>
<if test="salaryItemId != null">
#{salaryItemId},
</if>
<if test="salarySobId != null">
#{salarySobId},
</if>
<if test="salarySobItemGroupId != null">
#{salarySobItemGroupId},
</if>
<if test="sortedIndex != null">
#{sortedIndex},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="canDelete != null">
#{canDelete},
</if>
<if test="itemHide != null">
#{itemHide},
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.salarysob.po.SalarySobItemPO">
UPDATE hrsa_salary_sob_item
@ -474,72 +351,6 @@
</foreach>
</insert>
<insert id="insertItemShow">
insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide,
creator,tenant_key,create_time,update_time,delete_type)
VALUES (#{id},#{salarySobId},#{salaryItemId},
#{isGroup},#{itemHide},#{creator},
#{tenantKey},#{createTime},#{updateTime},0)
</insert>
<insert id="batchInsertItemShow">
insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide,
creator,tenant_key,create_time,update_time,delete_type)
VALUES
<foreach collection="collection" item="item" separator=",">
(
#{item.id},
#{item.salarySobId},
#{item.salaryItemId},
#{item.isGroup},
#{item.itemHide},
#{item.creator},
#{item.tenantKey},
#{item.createTime},
#{item.updateTime},
0
)
</foreach>
</insert>
<insert id="batchInsertItemShow" databaseId="oracle">
insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide,
creator,tenant_key,create_time,update_time,delete_type)
<foreach collection="collection" item="item" separator="union all">
select
#{item.id,jdbcType=DOUBLE},
#{item.salarySobId,jdbcType=DOUBLE},
#{item.salaryItemId,jdbcType=DOUBLE},
#{item.isGroup,jdbcType=INTEGER},
#{item.itemHide,jdbcType=INTEGER},
#{item.creator,jdbcType=DOUBLE},
#{item.tenantKey,jdbcType=VARCHAR},
#{item.createTime,jdbcType=DATE},
#{item.updateTime,jdbcType=DATE},
0
from dual
</foreach>
</insert>
<insert id="batchInsertItemShow" databaseId="sqlserver">
<foreach collection="collection" item="item" separator=";">
insert into hrsa_salary_item_hide (id,salary_sob_id,salary_item_id,is_group,item_hide,
creator,tenant_key,create_time,update_time,delete_type)
VALUES
(
#{item.id},
#{item.salarySobId},
#{item.salaryItemId},
#{item.isGroup},
#{item.itemHide},
#{item.creator},
#{item.tenantKey},
#{item.createTime},
#{item.updateTime},
0
)
</foreach>
</insert>
<update id="deleteByGroupIds">
UPDATE hrsa_salary_sob_item
SET delete_type = 1

View File

@ -355,7 +355,7 @@
<select id="queryEmployeeList" resultType="com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO">
SELECT base.id AS baseInfoId, e.ID AS employeeId, e.lastname AS userName, e.departmentid AS departmentId, e.workcode AS jobNum, e.MOBILE AS telephone,
d.departmentname AS departmentName, e.jobtitle AS position, e.STATUS AS userStatus,e.companystartdate AS hiredate,
d.departmentname AS departmentName, e.jobtitle AS position, e.STATUS AS userStatus,e.companystartdate AS hiredate,e.certificatenum as idNo,
e.enddate as dimissionDate,
social.siSchemeId,
base.payment_organization AS paymentOrganization,

View File

@ -258,4 +258,10 @@ public interface SalaryAcctEmployeeService {
*/
List<SalaryAcctEmployeePO> listByTaxAgentAndSalaryMonth(List<Long> taxAgentIds, Set<Date> salaryMonths);
/**
* 锁定人员
* @param updateParam
*/
void lockEmp(SalaryAcctResultUpdateLockStatusParam updateParam);
}

View File

@ -158,7 +158,7 @@ public interface SalaryAcctResultService {
List<SalaryAcctResultPO> listBySalaryAcctRecordIdsAndTaxAgentIds(Collection<Long> salaryAcctRecordIds, Collection<Long> taxAgentIds);
/**
* 更新锁定状态
* 锁定项目
*
* @param updateParam
*/

View File

@ -178,6 +178,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
map.put("departmentName", m.getDepartmentName());
map.put("mobile", m.getMobile());
map.put("jobNum", m.getJobNum());
map.put("idNo", m.getIdNo());
// 考勤数据
attendQuoteDataValues.stream().filter(a -> a.getAttendQuoteDataId().equals(m.getId())).collect(Collectors.toList()).forEach(e -> {
map.put(e.getAttendQuoteFieldId() + "_attendQuoteData", e.getDataValue());

View File

@ -64,6 +64,7 @@ public class ColumnBuildServiceImpl extends Service implements ColumnBuildServic
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86186, "手机号"), "mobile"));
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 1933, "工号"), "workcode"));
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), "employeeStatus"));
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100377, "数据来源"), "sourceFrom"));
if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) {
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "补缴月份"), "supplementaryMonth"));

View File

@ -30,6 +30,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.general.Util;
import weaver.hrm.User;
import java.text.ParseException;
@ -104,6 +105,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
record.put("employeeStatus", simpleEmployee.getStatus() != null ? UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(simpleEmployee.getStatus())) : "");
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
record.put("workcode", StringUtils.isBlank(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode());
record.put("idNo", Util.null2String(simpleEmployee.getIdNo()));
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel()));
record.put("socialPayOrg", paymentMap.get(item.getSocialPayOrg()) == null ? "" : paymentMap.get(item.getSocialPayOrg()).getName());
record.put("socialAccount", item.getSocialAccount());

View File

@ -1592,10 +1592,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
"部门",
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
SalaryI18nUtil.getI18nLabel(86317, "工号"),
SalaryI18nUtil.getI18nLabel(86317, "证件号码"),
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"),
"账单月份");
// List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName", "billMonth");
List<String> dataIndexList = Lists.newArrayList("userName", "department", "mobile", "workcode", "socialPayOrg", "billMonth");
List<String> dataIndexList = Lists.newArrayList("userName", "department", "mobile", "workcode","idNo", "socialPayOrg", "billMonth");
// 查询福利核算项目
List<String> welfareNames = (List<String>) param.getWelfareNames();
headerList.addAll(welfareNames);
@ -1986,10 +1987,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
"部门",
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
SalaryI18nUtil.getI18nLabel(86317, "工号"),
SalaryI18nUtil.getI18nLabel(86317, "证件号码"),
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"),
"账单月份",
"补缴月份");
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName", "billMonth", "supplementaryMonth");
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode","idNo", "taxAgentName", "billMonth", "supplementaryMonth");
// 查询福利核算项目
List<String> welfareNames = (List<String>) param.getWelfareNames();
headerList.addAll(welfareNames);
@ -2044,6 +2046,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
resultMap.put("departmentName", employee.getDepartmentName());
resultMap.put("mobile", employee.getMobile());
resultMap.put("workcode", employee.getWorkcode());
resultMap.put("idNo", employee.getIdNo());
resultMap.put("taxAgentName", taxAgentPO.getName());
resultMap.put("billMonth", billMonth);
resultMap.put("supplementaryMonth", po.getSupplementaryMonth());
@ -3761,28 +3764,26 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
"部门",
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
SalaryI18nUtil.getI18nLabel(86317, "工号"),
SalaryI18nUtil.getI18nLabel(86317, "证件号码"),
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人")
);
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode", "taxAgentName");
List<String> dataIndexList = Lists.newArrayList("username", "departmentName", "mobile", "workcode","idNo", "taxAgentName");
// 查询福利核算项目
List<String> welfareNames = (List<String>) param.getWelfareNames();
headerList.addAll(welfareNames);
// //查询当前已有的补缴数据
// List<Map<String, Object>> resultMapList = getSupplyDataByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
// // excel导出的数据
// List<List<Object>> rows = Lists.newArrayListWithExpectedSize(resultMapList.size());
// rows.add(headerList);
// for (Map<String, Object> map : resultMapList) {
// List<Object> row = Lists.newArrayListWithExpectedSize(headerList.size());
// for (String dataIndex : dataIndexList) {
// row.add(map.getOrDefault(dataIndex, StringUtils.EMPTY));
// }
// rows.add(row);
// }
List<List<Object>> rows = new ArrayList<>();
//查询当前已有的补差数据
List<Map<String, Object>> resultMapList = getSupplyDataByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
// excel导出的数据
rows.add(headerList);
for (Map<String, Object> map : resultMapList) {
List<Object> row = Lists.newArrayListWithExpectedSize(headerList.size());
for (String dataIndex : dataIndexList) {
row.add(map.getOrDefault(dataIndex, StringUtils.EMPTY));
}
rows.add(row);
}
String sheetName = "福利核算-补差导入模板";
return ExcelUtil.genWorkbookV2(rows, sheetName);

View File

@ -770,9 +770,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
if (insuranceArchivesEmployeePOS == null) {
insuranceArchivesEmployeePOS = new ArrayList<>();
}
// List<Map<String, Object>> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS);
List<Map<String, Object>> records = buildTableData(insuranceArchivesEmployeePOS);
// List<WeaTableColumn> columns = siArchivesBiz.buildWeaTableColumns(insuranceArchivesEmployeePOS, user.getUID());
List<WeaTableColumn> columns = buildWeaTableColumns(insuranceArchivesEmployeePOS);
//工作簿list
@ -1699,6 +1697,7 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
map.put("subcompanyName", item.getSubcompanyName());
map.put("departmentId", item.getDepartmentId());
map.put("jobNum", item.getJobNum());
map.put("idNo", item.getIdNo());
map.put("companystartdate", item.getCompanystartdate());
map.put("dismissdate", item.getDimissionDate());
map.put("mobile", item.getTelephone());
@ -1926,10 +1925,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "手机号"), "mobile"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "员工状态"), "status"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "工号"), "jobNum"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "入职日期"), "companystartdate"));
// list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "合同到期日期"), "dismissdate"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保方案名称"), "socialName"));
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(0, "社保账号"), "socialAccount"));

View File

@ -289,6 +289,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
record.put("supplementaryMonth", item.getSupplementaryMonth());
record.put("mobile", item.getTelephone());
record.put("workcode", item.getWorkcode());
record.put("idNo", item.getIdNo());
record.put("employeeStatus", item.getUserStatus() == null ? "" : getDefaultLabelByValue(item.getUserStatus()));
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel(from.getLabelId(), from.getDefaultLabel()));
@ -671,6 +672,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86317, "工号"), "workcode"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "employeeStatus"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100377, "数据来源"), "sourceFrom"));
if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) {
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(100379, "补缴月份"), "supplementaryMonth"));

View File

@ -178,8 +178,7 @@ public class SIImportServiceImpl extends Service implements SIImportService {
// 4.注释
List<ExcelComment> excelComments = Lists.newArrayList();
excelComments.add(new ExcelComment(0, 0, 1, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
excelComments.add(new ExcelComment(6, 0, 7, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
excelComments.add(new ExcelComment(7, 0, 8, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空")));
excelComments.add(new ExcelComment(8, 0, 9, 2, SalaryI18nUtil.getI18nLabel(100344, "社保,公积金,其他福利方案名称不可同时为空")));
//工作簿数据
@ -203,6 +202,7 @@ public class SIImportServiceImpl extends Service implements SIImportService {
result.add(SalaryI18nUtil.getI18nLabel( 86186, "手机号"));
result.add(SalaryI18nUtil.getI18nLabel( 86187, "员工状态"));
result.add(SalaryI18nUtil.getI18nLabel(86317, "工号"));
result.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
result.add(SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称"));
// result.add(SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织"));
//社保福利基数

View File

@ -420,6 +420,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
map.put("departmentName", item.getDepartmentName());
map.put("departmentId", item.getDepartmentId());
map.put("jobNum", item.getJobNum());
map.put("idNo", item.getIdNo());
map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : "");
map.put("mobile", item.getTelephone());
map.put("status", item.getUserStatus() == null ? "" : UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()));
@ -700,6 +701,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "status"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "工号"), "jobNum"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(1933, "证件号码"), "idNo"));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91323, "社保方案名称"), "socialName"));
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(91324, "社保账号"), "socialAccount"));
@ -1093,6 +1095,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
Map<String, Object> mobileMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86186, "手机号"));
Map<String, Object> userStatusMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86187, "员工状态"));
Map<String, Object> workcodeMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86317, "工号"));
Map<String, Object> idNoMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
Map<String, Object> employeeIdMap = findElement(singleAccount, SalaryI18nUtil.getI18nLabel(86187, "员工id"));
@ -1101,7 +1104,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
String mobile = (String) mobileMap.get(SalaryI18nUtil.getI18nLabel(86186, "手机号"));
String userStatus = (String) userStatusMap.get(SalaryI18nUtil.getI18nLabel(86187, "员工状态"));
String workcode = (String) workcodeMap.get(SalaryI18nUtil.getI18nLabel(86317, "工号"));
String idNo = (String) workcodeMap.get(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
String idNo = (String) idNoMap.get(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
String toAddEmployeeId;
if (employeeIdMap.isEmpty()) {
toAddEmployeeId = null;

View File

@ -30,7 +30,6 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
@ -167,7 +166,6 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
}
//核算锁定的值
Map<String, SalaryAcctResultPO> salaryAcctLockResultPOS = MapUtils.emptyIfNull(salaryAcctCalculateBO.getSalaryAcctLockResultPOS());
List<Long> lockSalaryItemIds = ListUtils.emptyIfNull(salaryAcctCalculateBO.getLockSalaryItemIds());
sw.stop();
// 9查询相同税款所属期内涉及合并计税的其他薪资核算结果
sw.start("查询相同税款所属期内涉及合并计税的其他薪资核算结果");
@ -257,7 +255,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
// 处理小数点
resultValue = SalaryAcctFormulaBO.roundResultValue(resultValue, salaryItemPO, salarySobBackItems, salarySobBackItemMap, salaryItemIdKeySalarySobItemPOMap);
//是否锁定
if (lockSalaryItemIds.contains(salaryItemId) && salaryAcctLockResultPOS.get(salaryItemId + "_" + salaryAcctEmployeePOId) != null) {
if (salaryAcctLockResultPOS.get(salaryItemId + "_" + salaryAcctEmployeePOId) != null) {
resultValue = salaryAcctLockResultPOS.get(salaryItemId + "_" + salaryAcctEmployeePOId).getResultValue();
}
// 将已经计算过的薪资项目的值转换成公式变量的值添加到集合中

View File

@ -18,6 +18,7 @@ import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO;
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import com.engine.salary.enums.OperateTypeEnum;
import com.engine.salary.enums.salaryaccounting.LockStatusEnum;
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.salaryacct.SalaryAcctEmployeeMapper;
@ -702,19 +703,19 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
// }
// list = list.stream().filter(po -> employeeIdsByPostionFilter.contains(po.getEmployeeId())).collect(Collectors.toList());
// }
// 人事状态过滤
if (CollectionUtils.isNotEmpty(param.getStatus())) {
Set<Long> employeeIdsByStatus = new HashSet<>();
employeeList.forEach(simpleEmployee -> {
if (simpleEmployee.getStatus() != null && param.getStatus().contains(simpleEmployee.getStatus())) {
employeeIdsByStatus.add(simpleEmployee.getEmployeeId());
}
});
if (CollectionUtils.isEmpty(employeeIdsByStatus)) {
return Lists.newArrayList();
}
list = list.stream().filter(po -> employeeIdsByStatus.contains(po.getEmployeeId())).collect(Collectors.toList());
}
// 人事状态过滤
if (CollectionUtils.isNotEmpty(param.getStatus())) {
Set<Long> employeeIdsByStatus = new HashSet<>();
employeeList.forEach(simpleEmployee -> {
if (simpleEmployee.getStatus() != null && param.getStatus().contains(simpleEmployee.getStatus())) {
employeeIdsByStatus.add(simpleEmployee.getEmployeeId());
}
});
if (CollectionUtils.isEmpty(employeeIdsByStatus)) {
return Lists.newArrayList();
}
list = list.stream().filter(po -> employeeIdsByStatus.contains(po.getEmployeeId())).collect(Collectors.toList());
}
// 入职日期
if (CollectionUtils.isNotEmpty(param.getHiredate())) {
Set<Long> employeeIdsByHiredate = new HashSet<>();
@ -759,4 +760,32 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
return getSalaryAcctEmployeeMapper().listSome(SalaryAcctEmployeePO.builder().taxAgentIds(taxAgentIds).salaryMonths(salaryMonths).build());
}
@Override
public void lockEmp(SalaryAcctResultUpdateLockStatusParam updateParam) {
// 查询薪资核算记录
SalaryAcctRecordPO salaryAcctRecord = getSalaryAcctRecordService(user).getById(updateParam.getSalaryAcctRecordId());
if (CollectionUtils.isEmpty(salaryAcctRecord.getLockSalaryItemIds())) {
salaryAcctRecord.setLockSalaryItemIds(new ArrayList<>());
}
List<SalaryAcctEmployeePO> salaryAcctEmployees = listBySalaryAcctRecordId(updateParam.getSalaryAcctRecordId());
if (CollectionUtils.isEmpty(salaryAcctEmployees)) {
return;
}
LockStatusEnum lockStatus = updateParam.getLockStatus();
if (lockStatus == null) {
throw new SalaryRunTimeException("锁定状态异常!");
}
Set<Long> acctEmpIds = updateParam.getAcctEmpIds();
if (CollUtil.isNotEmpty(acctEmpIds)) {
//锁定指定人员
getSalaryAcctEmployeeMapper().lockByAcctEmpIds(lockStatus.getValue(), acctEmpIds);
} else {
//锁定全部
getSalaryAcctEmployeeMapper().lockByRecordId(lockStatus.getValue(), updateParam.getSalaryAcctRecordId());
}
}
}

View File

@ -1382,12 +1382,6 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
loggerContext.setOldValueList(list4log);
SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext);
// 存储薪资核算结果数据来源日志
new Thread() {
public void run() {
handleSalaryAcctResultLog(salaryAcctResults);
}
}.start();
//报表
getSalaryAcctReportService(user).batchSave(salaryAcctReports);
}

View File

@ -1,5 +1,6 @@
package com.engine.salary.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrmelog.entity.dto.LoggerContext;
@ -561,7 +562,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
}
Map<String, SalaryAcctResultListColumnDTO> resultMap = Maps.newHashMap();
// 查询薪资核算使用的薪资账套下的薪资项目
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateByRecordId(salaryAcctRecordId,true);
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateByRecordId(salaryAcctRecordId, true);
for (SalarySobItemIncomeCategoryDTO incomeCategoryDTO : salarySobItemAggregateDTO.getIncomeCategories()) {
for (SalarySobItemGroupDTO salarySobItemGroupDTO : incomeCategoryDTO.getItemGroups()) {
for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) {
@ -647,7 +648,6 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
// 存储薪资核算结果数据来源日志
salaryAcctResultPOS = getSalaryAcctRecordService(user).listBySalaryAcctEmpId(saveParam.getSalaryAcctEmpId());
saveSalaryAcctResultLog(salaryAcctResultPOSOld, salaryAcctResultPOS);
// 查询操作日志的targetName
String targetName = getSalaryAcctRecordService(user).getLogTargetNameById(salaryAcctEmployeePO.getSalaryAcctRecordId());
@ -724,7 +724,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
@Override
public void calculate(SalaryAcctCalculateParam calculateParam, DataCollectionEmployee simpleEmployee) {
StopWatch stopWatch = new StopWatch("总核算耗时id"+calculateParam.getSalaryAcctRecordId());
StopWatch stopWatch = new StopWatch("总核算耗时id" + calculateParam.getSalaryAcctRecordId());
try {
stopWatch.start("数据准备");
// 1查询薪资核算记录
@ -766,15 +766,6 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
// 7查询考勤引用的所有字段
List<AttendQuoteFieldListDTO> attendQuoteFieldListDTOS = getAttendQuoteFieldService(user).listAll();
//核算锁定值
List<Long> lockSalaryItemIds = salaryAcctRecordPO.getLockSalaryItemIds();
Map<String, SalaryAcctResultPO> acctResults = new HashMap<>();
if (CollectionUtils.isNotEmpty(lockSalaryItemIds)) {
List<SalaryAcctResultPO> acctResultPOS = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singleton(calculateParam.getSalaryAcctRecordId()), lockSalaryItemIds);
// List<SalaryAcctResultPO> acctResultPOS = listBySalaryAcctRecordIds(Collections.singleton(calculateParam.getSalaryAcctRecordId()));
acctResults = Optional.ofNullable(acctResultPOS).orElse(new ArrayList<>()).stream().filter(po -> lockSalaryItemIds.contains(po.getSalaryItemId())).collect(Collectors.toMap(po -> po.getSalaryItemId() + "_" + po.getSalaryAcctEmpId(), a -> a, (a, b) -> a));
}
// 8查询公式详情
Set<Long> formulaIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getFormulaId);
formulaIds.addAll(SalaryEntityUtil.properties(salaryItemPOS, SalaryItemPO::getFormulaId));
@ -799,6 +790,20 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(103378, "薪资核算人员不能为空"));
}
//核算锁定值
List<Long> lockSalaryItemIds = salaryAcctRecordPO.getLockSalaryItemIds();
Map<String, SalaryAcctResultPO> acctResults = new HashMap<>();
if (CollUtil.isNotEmpty(lockSalaryItemIds)) {
List<SalaryAcctResultPO> acctResultPOS = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singleton(calculateParam.getSalaryAcctRecordId()), lockSalaryItemIds);
acctResults = Optional.ofNullable(acctResultPOS).orElse(new ArrayList<>()).stream().filter(po -> lockSalaryItemIds.contains(po.getSalaryItemId())).collect(Collectors.toMap(po -> po.getSalaryItemId() + "_" + po.getSalaryAcctEmpId(), a -> a, (a, b) -> a));
}
List<Long> lockEmpIds = salaryAcctEmployeePOS.stream().filter(po -> LockStatusEnum.LOCK.getValue().equals(po.getLockStatus())).map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
if(CollUtil.isNotEmpty(lockEmpIds)){
List<SalaryAcctResultPO> acctResultPOS = listBySalaryAcctEmployeeIds(lockEmpIds);
Map<String, SalaryAcctResultPO> acctResultMaps = Optional.ofNullable(acctResultPOS).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(po -> po.getSalaryItemId() + "_" + po.getSalaryAcctEmpId(), a -> a, (a, b) -> a));
acctResults.putAll(acctResultMaps);
}
stopWatch.stop();
stopWatch.start("核算耗时");
@ -874,16 +879,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
stopWatch.stop();
log.info(stopWatch.prettyPrint());
// 存储薪资核算数据来源日志
new Thread() {
public void run() {
List<Long> exceptItemIds = new ArrayList<>();
List<Long> salaryAcctEmployeeIds = salaryAcctEmployeePOS.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
exceptItemIds.addAll(lockSalaryItemIds);
exceptItemIds.addAll(salaryItemPOS.stream().filter(PO -> Objects.equals(PO.getValueType(), NumberUtils.INTEGER_ONE) && Objects.equals(PO.getUseInEmployeeSalary(), 0)).map(SalaryItemPO::getId).collect(Collectors.toList()));
getSalaryAcctResultLogService(user).deleteBySalaryAcctEmpIdExceptItemIds(salaryAcctEmployeeIds, exceptItemIds);
}
}.start();
// 记录日志
// 查询操作日志的targetName
String targetName = getSalaryAcctRecordService(user).getLogTargetNameById(calculateParam.getSalaryAcctRecordId());

View File

@ -945,6 +945,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
.telephone(StringUtils.isEmpty(simpleEmployee.getTelephone()) ? "" : simpleEmployee.getTelephone())
.username(StringUtils.isEmpty(simpleEmployee.getUsername()) ? "" : simpleEmployee.getUsername())
.workcode(StringUtils.isEmpty(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode())
.idNo(Util.null2String(simpleEmployee.getIdNo()))
.taxAgentName(taxAgentName)
.build();
List<SalaryTemplateSalaryItemListDTO> items = employeeInformation.getItems();

View File

@ -629,7 +629,20 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
String formulaContent = CollectionUtils.isEmpty(expressFormulas) ? "" : expressFormulas.get(0).getFormula();
Integer valueType = salarySobItemPO.getValueType() == null ? salaryItemPO.getValueType() : salarySobItemPO.getValueType();
salarySobItemFormDTO.setId(salarySobItemPO.getId()).setName(salaryItemPO.getName()).setItemHide(Integer.valueOf(salarySobItemPO.getItemHide().toString())).setDataType(salaryItemPO.getDataType()).setRoundingMode(salarySobItemPO.getRoundingMode() == null ? salaryItemPO.getRoundingMode() : salarySobItemPO.getRoundingMode()).setPattern(salarySobItemPO.getPattern() == null ? salaryItemPO.getPattern() : salarySobItemPO.getPattern()).setValueType(valueType).setFormulaId(salarySobItemPO.getFormulaId()).setFormulaContent(CollectionUtils.isNotEmpty(expressFormulas) ? formulaContent : "").setOriginFormulaContent(valueType.equals(SalaryValueTypeEnum.FORMULA.getValue()) ? formulaContent : "").setOriginSqlContent(valueType.equals(SalaryValueTypeEnum.SQL.getValue()) ? formulaContent : "").setUseInEmployeeSalary(salaryItemPO.getUseInEmployeeSalary()).setDescription(salarySobItemPO.getDescription()).setCanEdit((openFormulaForcedEditing || salaryItemPO.getCanEdit().equals(1)) ? 1 : 0);
salarySobItemFormDTO
.setId(salarySobItemPO.getId())
.setName(salaryItemPO.getName())
.setItemHide(salarySobItemPO.getItemHide()==null?0:Integer.parseInt(salarySobItemPO.getItemHide().toString()))
.setDataType(salaryItemPO.getDataType())
.setRoundingMode(salarySobItemPO.getRoundingMode() == null ? salaryItemPO.getRoundingMode() : salarySobItemPO.getRoundingMode())
.setPattern(salarySobItemPO.getPattern() == null ? salaryItemPO.getPattern() : salarySobItemPO.getPattern())
.setValueType(valueType).setFormulaId(salarySobItemPO.getFormulaId())
.setFormulaContent(CollectionUtils.isNotEmpty(expressFormulas) ? formulaContent : "")
.setOriginFormulaContent(valueType.equals(SalaryValueTypeEnum.FORMULA.getValue()) ? formulaContent : "")
.setOriginSqlContent(valueType.equals(SalaryValueTypeEnum.SQL.getValue()) ? formulaContent : "")
.setUseInEmployeeSalary(salaryItemPO.getUseInEmployeeSalary())
.setDescription(salarySobItemPO.getDescription())
.setCanEdit((openFormulaForcedEditing || salaryItemPO.getCanEdit().equals(1)) ? 1 : 0);
}
return salarySobItemFormDTO;
}

View File

@ -2,10 +2,10 @@ package com.engine.salary.service.impl;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.biz.*;
import com.engine.salary.config.SalaryElogConfig;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO;
@ -36,7 +36,6 @@ import com.engine.salary.sys.service.SalarySysConfService;
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
@ -45,7 +44,6 @@ import com.engine.salary.util.valid.ValidUtil;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.beans.BeanUtils;
@ -405,13 +403,6 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
if (CollectionUtils.isNotEmpty(result.getNeedInsertSalarySobBackItems())) {
getSalarySobBackItemService(user).batchInsert(result.getNeedInsertSalarySobBackItems());
}
if (CollectionUtils.isNotEmpty(result.getNeedInsertItemHides())) {
//去重
List<SalarySobItemHidePO> list = new ArrayList<>(result.getNeedInsertItemHides().stream()
.collect(Collectors.toMap(SalarySobItemHidePO::getSalaryItemId, Function.identity(), (oldValue, newValue) -> oldValue))
.values());
salarySobItemService.batchInsertItemShow(list);
}
}
/**
@ -689,7 +680,7 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
// 查询薪资账套的员工信息字段
List<SalarySobEmpFieldPO> salarySobEmpFieldPOS = salarySobEmpFieldService.listSome(SalarySobEmpFieldPO.builder().salarySobId(duplicateParam.getId()).build());
// 查询薪资账套的薪资项目副本
List<SalarySobItemPO> salarySobItemPOS = salarySobItemService.listBySalarySobIdWithHideItem(SalarySobItemPO.builder().salarySobId(duplicateParam.getId()).build());
List<SalarySobItemPO> salarySobItemPOS = salarySobItemService.listSome(SalarySobItemPO.builder().salarySobId(duplicateParam.getId()).build());
// 薪资项目副本去重
salarySobItemPOS = salarySobItemPOS.stream().filter(SalaryEntityUtil.distinctByKey(PO -> PO.getSalarySobId() + "-" + PO.getSalaryItemId())).collect(Collectors.toList());
// 查询薪资账套的薪资项目分类
@ -739,60 +730,12 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
getSalarySobBackItemService(user).batchInsert(result.getSalarySobBackItems());
}
// 复制薪资账套的薪资项目隐藏副本
if (CollectionUtils.isNotEmpty(result.getSalarySobItems())) {
List<SalarySobItemPO> salarySobItems = result.getSalarySobItems();
Date now = new Date();
salarySobItems.stream().forEach(k -> {
Long salarySobItemShowId = IdGenerator.generate();
SalarySobItemHidePO salarySobItemHidePO = SalarySobItemHidePO.builder()
.id(salarySobItemShowId)
.salarySobId(k.getSalarySobId())
.salaryItemId(k.getSalaryItemId())
.isGroup(0)
.itemHide(k.getItemHide())
.creator((long) user.getUID())
.deleteType(NumberUtils.INTEGER_ZERO)
.createTime(now)
.updateTime(now)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build();
if (k.getItemHide() == null) {
salarySobItemHidePO.setItemHide(Long.valueOf(0));
}
salarySobItemService.InsertItemShow(salarySobItemHidePO);
});
}
// 复制薪资账套的薪资项目分类
if (CollectionUtils.isNotEmpty(result.getSalarySobItemGroups())) {
salarySobItemGroupService.batchInsert(result.getSalarySobItemGroups());
}
// 复制薪资账套的薪资项目分类隐藏信息
if (CollectionUtils.isNotEmpty(result.getSalarySobItemGroups())) {
List<SalarySobItemGroupPO> salarySobItemGroups = result.getSalarySobItemGroups();
Date now = new Date();
salarySobItemGroups.stream().forEach(k -> {
Long salarySobItemShowId = IdGenerator.generate();
SalarySobItemHidePO salarySobItemHidePO = SalarySobItemHidePO.builder()
.id(salarySobItemShowId)
.salarySobId(k.getSalarySobId())
.salaryItemId(k.getId())
.isGroup(1)
.itemHide(k.getItemHide())
.creator((long) user.getUID())
.deleteType(NumberUtils.INTEGER_ZERO)
.createTime(now)
.updateTime(now)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build();
if (k.getItemHide() == null) {
salarySobItemHidePO.setItemHide(Long.valueOf(0));
}
salarySobItemService.InsertItemShow(salarySobItemHidePO);
});
}
// 复制薪资账套的调薪计薪规则
if (CollectionUtils.isNotEmpty(result.getSalaryAdjustmentRules())) {

View File

@ -467,7 +467,7 @@ public class SalaryAcctController {
}
//更新薪资核算结果的锁定状态
//更新薪资项目锁定状态
@POST
@Path("/acctresult/updateLockStatus")
@Produces(MediaType.APPLICATION_JSON)
@ -476,6 +476,14 @@ public class SalaryAcctController {
return new ResponseResult<SalaryAcctResultUpdateLockStatusParam, String>(user).run(getSalaryAcctResultWrapper(user)::updateLockStatusByParam, param);
}
@POST
@Path("/acctresult/lockEmp")
@Produces(MediaType.APPLICATION_JSON)
public String lock(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultUpdateLockStatusParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<SalaryAcctResultUpdateLockStatusParam, String>(user).run(getSalaryAcctEmployeeWrapper(user)::lockEmp, param);
}
//批量更新
@POST
@Path("/acctresult/batchUpdate")

View File

@ -87,6 +87,7 @@ public class AttendQuoteDataWrapper extends Service {
columns.add(Column.builder().title("部门").dataIndex("departmentName").key("departmentName").display(Boolean.TRUE).build());
columns.add(Column.builder().title("手机号").dataIndex("mobile").key("mobile").display(Boolean.TRUE).build());
columns.add(Column.builder().title("工号").dataIndex("jobNum").key("jobNum").display(Boolean.TRUE).build());
columns.add(Column.builder().title("证件号码").dataIndex("idNo").key("idNo").display(Boolean.TRUE).build());
if (CollectionUtils.isNotEmpty(listMaps)) {
attendQuoteFields.stream()
.filter(attendQuoteField->effectiveColumns.contains(Util.null2String(attendQuoteField.getId())))

View File

@ -5,10 +5,7 @@ import com.engine.core.impl.Service;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO;
import com.engine.salary.entity.salaryacct.dto.SalaryAccEmployeeListDTO;
import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeAddParam;
import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeDeleteParam;
import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeQueryParam;
import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeSaveParam;
import com.engine.salary.entity.salaryacct.param.*;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.exception.SalaryRunTimeException;
@ -195,4 +192,7 @@ public class SalaryAcctEmployeeWrapper extends Service {
getSalaryAcctEmployeeService(user).refresh(salaryAcctRecordId);
}
public void lockEmp(SalaryAcctResultUpdateLockStatusParam salaryAcctResultUpdateLockStatusParam) {
getSalaryAcctEmployeeService(user).lockEmp(salaryAcctResultUpdateLockStatusParam);
}
}