组织架构申请执行后加一个状态

This commit is contained in:
fl 2024-12-09 13:09:12 +08:00
parent 6bdeea141a
commit 3ab20a42e5
6 changed files with 19 additions and 2 deletions

View File

@ -68,4 +68,6 @@ public interface OrgChangeDao {
void updateOrgByUserId(OrgChangeBean item);
void updateAttGroupByUserId(OrgChangeBean item);
void updateOrgChangeIsApply(OrgChangeBean item);
}

View File

@ -142,5 +142,9 @@ public class OrgChangeBean {
*/
private String exportType;
/**
* 是否已经应用
*/
private String isApply;
}

View File

@ -61,4 +61,6 @@ public interface OrgChangeService {
void updateOrgByUserId(OrgChangeBean item);
void updateAttGroupByUserId(OrgChangeBean item);
void updateOrgChangeIsApply(OrgChangeBean item);
}

View File

@ -111,5 +111,10 @@ public class OrgChangeServiceImpl implements OrgChangeService {
orgChangeDao.updateAttGroupByUserId(item);
}
@Override
public void updateOrgChangeIsApply(OrgChangeBean item) {
orgChangeDao.updateOrgChangeIsApply(item);
}
}

View File

@ -79,7 +79,7 @@ public class HolidayTasks {
bean.setIsCheck("1");
//查询审核通过的
List<OrgChangeBean> list = orgChangeService.selectOrgChangeList(bean);
list.forEach(item -> {
list.stream().filter(item -> "0".equals(item.getIsApply())).forEach(item -> {
Date changeEffectiveDate = item.getChangeEffectiveDate();
// Date 转换为 Instant
Instant changeEffectiveInstant = changeEffectiveDate.toInstant();
@ -91,6 +91,8 @@ public class HolidayTasks {
if ("1".equals(item.getIsChangeAttGroup())){
orgChangeService.updateAttGroupByUserId(item);
}
item.setIsApply("1");
orgChangeService.updateOrgChangeIsApply(item);
}
});
}

View File

@ -124,5 +124,7 @@
<update id="updateAttGroupByUserId">
update att_group_person_relation set group_id = #{newAttGroup},org_id = #{newOrgId} where user_id = #{userId} and group_id = #{oldAttGroup}
</update>
<update id="updateOrgChangeIsApply">
update org_change set is_apply = #{isApply} where id = #{id}
</update>
</mapper>