Merge remote-tracking branch 'remotes/origin/develop' into feature/addSiArchivesBaseInfo_sy
This commit is contained in:
commit
6941999a09
|
|
@ -119,6 +119,9 @@ delete from hrsa_tax_rate_detail where 1=1
|
|||
delete from hrsa_salary_acct_result_report where 1=1
|
||||
;
|
||||
|
||||
delete from hrsa_insurance_base_info where 1=1
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO hrsa_insurance_category (id, insurance_name, welfare_type, is_use, payment_scope, data_type, create_time, update_time, creator, delete_type, tenant_key) VALUES (9001, '养老保险', 1, 1, '1,2', 1, '2022-02-22 10:46:02', '2022-02-22 10:46:02', 0, 0, 'all_teams')
|
||||
;
|
||||
|
|
@ -61,7 +61,8 @@ public class AESEncryptUtil {
|
|||
encryptStr = encryptStr.substring(4, encryptStr.length());
|
||||
return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
}
|
||||
//未配置加密设置时需要解密
|
||||
//第一版没有加AES_前缀为加密标识,所以初始解密时,需要根据是否有配置判断是否需要解密
|
||||
//未配置加密设置时,需要解密
|
||||
if (ObjectUtils.isEmpty(sysConfPo)) {
|
||||
return AES.decrypt(encryptStr, aesEncryptScrect);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,4 +118,8 @@ public interface SalaryArchiveMapper {
|
|||
void gotoPendingFromStop(@Param("ids") Collection<Long> ids);
|
||||
|
||||
void gotoFixedFromStop(@Param("ids") Collection<Long> ids);
|
||||
|
||||
void deletePendingTodo(@Param("ids") Collection<Long> ids);
|
||||
|
||||
void deleteSuspendTodo(@Param("ids") Collection<Long> ids);
|
||||
}
|
||||
|
|
@ -586,4 +586,28 @@
|
|||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="deletePendingTodo" parameterType="com.engine.salary.entity.salaryarchive.po.SalaryArchivePO">
|
||||
UPDATE hrsa_salary_archive
|
||||
<set>
|
||||
run_status='STOP_FROM_PENDING'
|
||||
</set>
|
||||
WHERE run_status = 'PENDING'
|
||||
and id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="deleteSuspendTodo" parameterType="com.engine.salary.entity.salaryarchive.po.SalaryArchivePO">
|
||||
UPDATE hrsa_salary_archive
|
||||
<set>
|
||||
run_status='FIXED'
|
||||
</set>
|
||||
WHERE run_status = 'SUSPEND'
|
||||
and id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -180,6 +180,15 @@ public interface SalaryArchiveService {
|
|||
*/
|
||||
Map<String, Long> queryTabTotal();
|
||||
|
||||
|
||||
/**
|
||||
* 删除待定薪待办
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
String deletePendingTodo(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 设为定薪员工
|
||||
*
|
||||
|
|
@ -220,13 +229,13 @@ public interface SalaryArchiveService {
|
|||
*/
|
||||
Map<String, Object> allGotoStop(SalaryArchiveQueryParam queryParam);
|
||||
|
||||
// /**
|
||||
// * 删除待停薪待办
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// String deleteSuspendTodo(Collection<Long> ids);
|
||||
/**
|
||||
* 删除待停薪待办
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
String deleteSuspendTodo(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 取消停薪
|
||||
|
|
@ -236,4 +245,5 @@ public interface SalaryArchiveService {
|
|||
*/
|
||||
String cancelStop(Collection<Long> ids);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1950,12 +1950,12 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
public Map<String, Long> queryTabTotal() {
|
||||
long currentEmployeeId = user.getUID();
|
||||
|
||||
// 1.历史数据处理
|
||||
handleHistory(currentEmployeeId);
|
||||
// 2.待停薪自动处理
|
||||
handleSuspendData(currentEmployeeId);
|
||||
// 3.增量数据处理
|
||||
handleChangeData(currentEmployeeId);
|
||||
// // 1.历史数据处理
|
||||
// handleHistory(currentEmployeeId);
|
||||
// // 2.待停薪自动处理
|
||||
// handleSuspendData(currentEmployeeId);
|
||||
// // 3.增量数据处理
|
||||
// handleChangeData(currentEmployeeId);
|
||||
|
||||
|
||||
// tab页签数量
|
||||
|
|
@ -2012,6 +2012,29 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String deletePendingTodo(Collection<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误"));
|
||||
}
|
||||
|
||||
List<SalaryArchivePO> oldList = getSalaryArchiveMapper()
|
||||
.listSome(SalaryArchivePO.builder()
|
||||
.ids(ids)
|
||||
.runStatus(SalaryArchiveStatusEnum.PENDING.getValue())
|
||||
.build());
|
||||
|
||||
|
||||
if (CollectionUtils.isEmpty(oldList)) {
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
// 从待定薪到停薪
|
||||
getSalaryArchiveMapper().deletePendingTodo(ids);
|
||||
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> gotoFixed(Collection<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
|
|
@ -2155,38 +2178,26 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
return this.gotoStop(salaryArchiveIds);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public String deleteSuspendTodo(Collection<Long> ids) {
|
||||
// if (org.springframework.util.CollectionUtils.isEmpty(ids)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel( 84026, "参数错误"));
|
||||
// }
|
||||
// List<SalaryArchivePO> oldList = new LambdaQueryChainWrapper<>(salaryArchiveMapper)
|
||||
// .eq(SalaryArchivePO::getDeleteType, 0)
|
||||
// .eq(SalaryArchivePO::getTenantKey, currentTenantKey)
|
||||
// .in(SalaryArchivePO::getId, ids)
|
||||
// .eq(SalaryArchivePO::getRunStatus, SalaryArchiveStatusEnum.SUSPEND.getValue())
|
||||
// .list();
|
||||
// List<SalaryArchivePO> unableList = oldList.stream().filter(f->Objects.nonNull(f.getPayEndDate()) && !f.getPayEndDate().isAfter(LocalDate.now())).collect(Collectors.toList());
|
||||
// if (CollectionUtils.isNotEmpty(unableList)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel( 115789, "最后发薪日必须晚于今天"));
|
||||
// }
|
||||
//
|
||||
// // 从待停薪到定薪
|
||||
// new LambdaUpdateChainWrapper<>(salaryArchiveMapper)
|
||||
// .eq(SalaryArchivePO::getDeleteType, 0)
|
||||
// .eq(SalaryArchivePO::getTenantKey, currentTenantKey)
|
||||
// .in(SalaryArchivePO::getId, ids)
|
||||
// .eq(SalaryArchivePO::getRunStatus, SalaryArchiveStatusEnum.SUSPEND.getValue())
|
||||
// .set(SalaryArchivePO::getRunStatus, SalaryArchiveStatusEnum.FIXED.getValue())
|
||||
// .set(SalaryArchivePO::getModifier, currentEmployeeId)
|
||||
// .update();
|
||||
// // 记录日志
|
||||
// List<SalaryArchivePO> newList = this.listByIds(ids);
|
||||
// String operatedesc = SalaryI18nUtil.getI18nLabel( 106839, "删除待办");
|
||||
// recordLog(oldList, newList, operatedesc, currentTenantKey);
|
||||
//
|
||||
// return StringUtils.EMPTY;
|
||||
// }
|
||||
@Override
|
||||
public String deleteSuspendTodo(Collection<Long> ids) {
|
||||
if (org.springframework.util.CollectionUtils.isEmpty(ids)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel( 84026, "参数错误"));
|
||||
}
|
||||
|
||||
List<SalaryArchivePO> oldList = getSalaryArchiveMapper()
|
||||
.listSome(SalaryArchivePO.builder()
|
||||
.ids(ids)
|
||||
.runStatus(SalaryArchiveStatusEnum.SUSPEND.getValue())
|
||||
.build());
|
||||
List<SalaryArchivePO> unableList = oldList.stream().filter(f->Objects.nonNull(f.getPayEndDate()) && !f.getPayEndDate().after(new Date())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(unableList)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel( 115789, "最后发薪日必须晚于今天"));
|
||||
}
|
||||
|
||||
// 从待停薪到定薪
|
||||
getSalaryArchiveMapper().deleteSuspendTodo(ids);
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String cancelStop(Collection<Long> ids) {
|
||||
|
|
|
|||
|
|
@ -118,18 +118,20 @@ public class SalaryArchiveController {
|
|||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 删除待定薪待办
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/deletePendingTodo")
|
||||
// @ApiOperation("删除待定薪待办")
|
||||
// @WeaPermission
|
||||
// public WeaResult<String> deletePendingTodo(@RequestBody Collection<Long> ids) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.deletePendingTodo(ids, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
/**
|
||||
* 删除待定薪待办
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/deletePendingTodo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String deletePendingTodo(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Collection<Long> ids) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Collection<Long>, String>(user).run(getSalaryArchiveWrapper(user)::deletePendingTodo, ids);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发薪列表
|
||||
|
|
@ -190,18 +192,19 @@ public class SalaryArchiveController {
|
|||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 删除待停薪待办
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/deleteSuspendTodo")
|
||||
// @ApiOperation("删除待停薪待办")
|
||||
// @WeaPermission
|
||||
// public WeaResult<String> deleteSuspendTodo(@RequestBody Collection<Long> ids) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.deleteSuspendTodo(ids, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
/**
|
||||
* 删除待停薪待办
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/deleteSuspendTodo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String stopList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Collection<Long> ids) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Collection<Long>, String>(user).run(getSalaryArchiveWrapper(user)::deleteSuspendTodo, ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停薪列表
|
||||
|
|
@ -233,7 +236,6 @@ public class SalaryArchiveController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 薪资档案列表
|
||||
*
|
||||
|
|
@ -303,7 +305,6 @@ public class SalaryArchiveController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 保存发薪设置
|
||||
*
|
||||
|
|
@ -439,6 +440,10 @@ public class SalaryArchiveController {
|
|||
if (StringUtils.isNotBlank(archiveStatus)) {
|
||||
param.setArchiveStatus(archiveStatus);
|
||||
}
|
||||
String runStatusLists = request.getParameter("runStatusList");
|
||||
if (StringUtils.isNotBlank(runStatusLists)) {
|
||||
param.setRunStatusList(Arrays.stream(runStatusLists.split(",")).collect(Collectors.toList()));
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -190,6 +190,16 @@ public class SalaryArchiveWrapper extends Service {
|
|||
return list(queryParam, SalaryArchiveListTypeEnum.PENDING);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除待定薪待办
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public String deletePendingTodo(Collection<Long> ids) {
|
||||
return getSalaryArchiveService(user).deletePendingTodo(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 定薪列表
|
||||
*
|
||||
|
|
@ -243,17 +253,6 @@ public class SalaryArchiveWrapper extends Service {
|
|||
return getSalaryArchiveService(user).allGotoFixed(queryParam);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 删除待定薪待办
|
||||
// *
|
||||
// * @param ids
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public String deletePendingTodo(Collection<Long> ids) {
|
||||
// return getSalaryArchiveService(user).deletePendingTodo(ids);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 停薪
|
||||
|
|
@ -275,17 +274,15 @@ public class SalaryArchiveWrapper extends Service {
|
|||
return getSalaryArchiveService(user).allGotoStop(queryParam);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 删除待停薪待办
|
||||
// *
|
||||
// * @param ids
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public String deleteSuspendTodo(Collection<Long> ids) {
|
||||
// return getSalaryArchiveService(user).deleteSuspendTodo(ids);
|
||||
// }
|
||||
/**
|
||||
* 删除待停薪待办
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public String deleteSuspendTodo(Collection<Long> ids) {
|
||||
return getSalaryArchiveService(user).deleteSuspendTodo(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消停薪
|
||||
|
|
@ -345,8 +342,8 @@ public class SalaryArchiveWrapper extends Service {
|
|||
List<Map<String, Object>> salaryItems = Lists.newArrayList();
|
||||
|
||||
// 2.发薪设置表单
|
||||
Map<String,Object> paySetForm = new HashMap<>();
|
||||
paySetForm.put("data",po);
|
||||
Map<String, Object> paySetForm = new HashMap<>();
|
||||
paySetForm.put("data", po);
|
||||
|
||||
|
||||
// 获取所有可被引用的薪资项目
|
||||
|
|
|
|||
Loading…
Reference in New Issue