操作接口
This commit is contained in:
parent
68076fc724
commit
0e05185599
|
|
@ -1057,8 +1057,8 @@
|
|||
</if>
|
||||
<if test="param.salaryArchivesIds != null and param.salaryArchivesIds.size()>0">
|
||||
AND t.salary_archive_id IN
|
||||
<foreach collection="param.salaryArchivesId" open="(" item="salaryArchivesId" separator="," close=")">
|
||||
#{salaryItemId}
|
||||
<foreach collection="param.salaryArchivesIds" open="(" item="salaryArchivesId" separator="," close=")">
|
||||
#{salaryArchivesId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.salaryArchiveId != null">
|
||||
|
|
|
|||
|
|
@ -10,105 +10,112 @@ import java.util.List;
|
|||
|
||||
public interface SalaryArchiveMapper {
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询所有记录
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<SalaryArchivePO> listAll();
|
||||
List<SalaryArchivePO> listAll();
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
* @param salaryArchive 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int update(SalaryArchivePO salaryArchive);
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
* @param salaryArchive 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int update(SalaryArchivePO salaryArchive);
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 返回记录,没有返回null
|
||||
*/
|
||||
SalaryArchivePO getById(Long id);
|
||||
|
||||
/**
|
||||
SalaryArchivePO getById(Long id);
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
* @param salaryArchive 待删除的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int delete(SalaryArchivePO salaryArchive);
|
||||
int delete(SalaryArchivePO salaryArchive);
|
||||
|
||||
|
||||
/**
|
||||
* 查询薪资档案列表
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SalaryArchiveListDTO> list(@Param("param") SalaryArchiveQueryParam param);
|
||||
/**
|
||||
* 查询薪资档案列表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SalaryArchiveListDTO> list(@Param("param") SalaryArchiveQueryParam param);
|
||||
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
* @param salaryArchiveSaves
|
||||
*/
|
||||
void batchInsert(@Param("collection") List<SalaryArchivePO> salaryArchiveSaves);
|
||||
/**
|
||||
* 批量插入
|
||||
*
|
||||
* @param salaryArchiveSaves
|
||||
*/
|
||||
void batchInsert(@Param("collection") List<SalaryArchivePO> salaryArchiveSaves);
|
||||
|
||||
/**
|
||||
* 批量更新
|
||||
*
|
||||
* @param salaryArchiveUpdates
|
||||
*/
|
||||
void batchUpdate(@Param("collection") List<SalaryArchivePO> salaryArchiveUpdates);
|
||||
/**
|
||||
* 批量更新
|
||||
*
|
||||
* @param salaryArchiveUpdates
|
||||
*/
|
||||
void batchUpdate(@Param("collection") List<SalaryArchivePO> salaryArchiveUpdates);
|
||||
|
||||
/**
|
||||
* 获取历史数据
|
||||
* @return
|
||||
*/
|
||||
List<SalaryArchivePO> getHistoryData();
|
||||
/**
|
||||
* 获取历史数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SalaryArchivePO> getHistoryData();
|
||||
|
||||
/**
|
||||
* 删除历史数据
|
||||
* @param build
|
||||
* @return
|
||||
*/
|
||||
void batchDeleteHistoryData(SalaryArchivePO build);
|
||||
/**
|
||||
* 删除历史数据
|
||||
*
|
||||
* @param build
|
||||
* @return
|
||||
*/
|
||||
void batchDeleteHistoryData(SalaryArchivePO build);
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SalaryArchivePO> listSome(@Param("param") SalaryArchivePO param);
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SalaryArchivePO> listSome(@Param("param") SalaryArchivePO param);
|
||||
|
||||
|
||||
/**
|
||||
* 获取人员状态为空的数据
|
||||
* @return
|
||||
*/
|
||||
List<SalaryArchivePO> getStatusIsNullData();
|
||||
/**
|
||||
* 获取人员状态为空的数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SalaryArchivePO> getStatusIsNullData();
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param build
|
||||
*/
|
||||
void updateStatus(SalaryArchivePO build);
|
||||
/**
|
||||
* 更新状态
|
||||
*
|
||||
* @param build
|
||||
*/
|
||||
void updateStatus(SalaryArchivePO build);
|
||||
|
||||
|
||||
void updateRunStatusByIdsAndPayEndDate(SalaryArchivePO po);
|
||||
void updateRunStatusByIdsAndPayEndDate(SalaryArchivePO po);
|
||||
|
||||
void updateFixed(SalaryArchivePO build);
|
||||
void updateFixed(SalaryArchivePO build);
|
||||
|
||||
void updateSuspend(SalaryArchivePO build);
|
||||
void updateSuspend(SalaryArchivePO build);
|
||||
|
||||
void gotoFixed(Collection<Long> ids);
|
||||
void gotoFixed(@Param("ids") Collection<Long> ids);
|
||||
|
||||
void gotoStop(Collection<Long> ids);
|
||||
void gotoStop(@Param("ids") Collection<Long> ids);
|
||||
|
||||
void gotoPendingFromStop(Collection<Long> ids);
|
||||
void gotoPendingFromStop(@Param("ids") Collection<Long> ids);
|
||||
|
||||
void gotoFixedFromStop(Collection<Long> ids);
|
||||
void gotoFixedFromStop(@Param("ids") Collection<Long> ids);
|
||||
}
|
||||
|
|
@ -473,12 +473,18 @@
|
|||
</if>
|
||||
<!-- 档案状态 -->
|
||||
<if test="param.runStatus != null">
|
||||
AND t.run_status = #{runStatus}
|
||||
AND t.run_status = #{param.runStatus}
|
||||
</if>
|
||||
<!-- 档案状态 -->
|
||||
<if test="param.runStatusList != null and param.runStatusList.size()>0">
|
||||
AND t.run_status IN
|
||||
<foreach collection="param.runStatusList" open="(" item="id" separator="," close=")">
|
||||
<foreach collection="param.runStatusList" open="(" item="runStatus" separator="," close=")">
|
||||
#{runStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.ids != null and param.ids.size()>0">
|
||||
AND t.id IN
|
||||
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -418,7 +418,6 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
.salaryArchivesIds(finalSalaryItemIds)
|
||||
.salaryItemIds(finalSalaryItemIds)
|
||||
.effectiveTime(new Date()).build())));
|
||||
// 解密
|
||||
return salaryArchiveItems;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1901,6 +1901,9 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
}
|
||||
|
||||
List<SalaryArchivePO> salaryArchiveList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).runStatus(SalaryArchiveStatusEnum.PENDING.getValue()).build());
|
||||
if (CollectionUtils.isEmpty(salaryArchiveList)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(145969, "档案不存在!"));
|
||||
}
|
||||
|
||||
List<SalaryArchivePO> unableList = salaryArchiveList.stream().filter(f -> f.getPayStartDate() == null).collect(Collectors.toList());
|
||||
|
||||
|
|
@ -1996,6 +1999,10 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
.runStatus(SalaryArchiveStatusEnum.SUSPEND.getValue())
|
||||
.build());
|
||||
|
||||
if (CollectionUtils.isEmpty(oldList)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(145969, "档案不存在!"));
|
||||
}
|
||||
|
||||
List<SalaryArchivePO> unableList = oldList.stream().filter(f -> f.getPayEndDate() == null).collect(Collectors.toList());
|
||||
int total = ids.size();
|
||||
int errorCount = unableList.size();
|
||||
|
|
@ -2075,6 +2082,12 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
|||
.runStatusList(Arrays.asList(SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue(), SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue()))
|
||||
.build());
|
||||
|
||||
|
||||
if (CollectionUtils.isEmpty(oldList)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(145969, "档案不存在!"));
|
||||
}
|
||||
|
||||
|
||||
List<TaxAgentEmployeeDTO> taxAgentManageRangeEmployees = getTaxAgentService(user).listTaxAgentAndEmployee((long) user.getUID());
|
||||
List<SalaryArchivePO> oldPendingList = oldList.stream().filter(f -> f.getRunStatus().equals(SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue())).collect(Collectors.toList());
|
||||
boolean isNotExist = oldPendingList.stream().anyMatch(te -> taxAgentManageRangeEmployees.stream().noneMatch(p -> p.getEmployeeId() != null && p.getEmployeeId().equals(te.getEmployeeId()) && p.getTaxAgentId().equals(te.getTaxAgentId())));
|
||||
|
|
|
|||
|
|
@ -29,10 +29,7 @@ import javax.ws.rs.core.StreamingOutput;
|
|||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -97,33 +94,30 @@ public class SalaryArchiveController {
|
|||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
// @POST
|
||||
// @Path("/pendingList")
|
||||
// @Produces(MediaType.APPLICATION_JSON)
|
||||
// public String pendingList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
// User user = HrmUserVarify.getUser(request, response);
|
||||
// return new ResponseResult<SalaryArchiveQueryParam, Map<String, Object>>(user).run(getSalaryArchiveWrapper(user)::pendingList, queryParam);
|
||||
// }
|
||||
// @PostMapping("/gotoFixed")
|
||||
// @ApiOperation("设为定薪员工")
|
||||
// @WeaPermission
|
||||
// public WeaResult<Map<String, Object>> gotoFixed(@RequestBody Collection<Long> ids) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.gotoFixed(ids, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
@POST
|
||||
@Path("/gotoFixed")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String gotoFixed(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Collection<Long> ids) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Collection<Long>, Map<String, Object>>(user).run(getSalaryArchiveWrapper(user)::gotoFixed, ids);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 一键全部设为定薪员工
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/allGotoFixed")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String allGotoFixed(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryArchiveQueryParam, Map<String, Object>>(user).run(getSalaryArchiveWrapper(user)::allGotoFixed, queryParam);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 一键全部设为定薪员工
|
||||
// *
|
||||
// * @param queryParam
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/allGotoFixed")
|
||||
// @ApiOperation("一键全部设为定薪员工")
|
||||
// @WeaPermission
|
||||
// public WeaResult<Map<String, Object>> allGotoFixed(@RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.allGotoFixed(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除待定薪待办
|
||||
// *
|
||||
|
|
@ -166,32 +160,36 @@ public class SalaryArchiveController {
|
|||
return new ResponseResult<SalaryArchiveQueryParam, Map<String, Object>>(user).run(getSalaryArchiveWrapper(user)::suspendList, queryParam);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 停薪
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/gotoStop")
|
||||
// @ApiOperation("停薪")
|
||||
// @WeaPermission
|
||||
// public WeaResult<Map<String, Object>> gotoStop(@RequestBody Collection<Long> ids) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.gotoStop(ids, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 一键全部停薪
|
||||
// *
|
||||
// * @param queryParam
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/allGotoStop")
|
||||
// @ApiOperation("一键全部停薪")
|
||||
// @WeaPermission
|
||||
// public WeaResult<Map<String, Object>> allGotoStop(@RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.allGotoStop(queryParam, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
/**
|
||||
* 停薪
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/gotoStop")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String gotoStop(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Collection<Long> ids) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Collection<Long>, Map<String, Object>>(user).run(getSalaryArchiveWrapper(user)::gotoStop, ids);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 一键全部停薪
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/allGotoStop")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String allGotoStop(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryArchiveQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryArchiveQueryParam, Map<String, Object>>(user).run(getSalaryArchiveWrapper(user)::allGotoStop, queryParam);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 删除待停薪待办
|
||||
// *
|
||||
|
|
@ -220,21 +218,19 @@ public class SalaryArchiveController {
|
|||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 取消停薪
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @PostMapping("/cancelStop")
|
||||
// @ApiOperation("取消停薪")
|
||||
// @WeaPermission
|
||||
// public WeaResult<String> cancelStop(@RequestBody Collection<Long> ids) {
|
||||
// return WeaResult.success(salaryArchiveWrapper.cancelStop(ids, UserContext.getCurrentEmployeeId(), TenantContext.getCurrentTenantKey()));
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
/**
|
||||
* 取消停薪
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/cancelStop")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String cancelStop(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Collection<Long> ids) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Collection<Long>, Map<String, Object>>(user).run(getSalaryArchiveWrapper(user)::cancelStop, ids);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -251,34 +251,30 @@ public class SalaryArchiveWrapper extends Service {
|
|||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public String deletePendingTodo(Collection<Long> ids, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).deletePendingTodo(ids, currentEmployeeId, currentTenantKey);
|
||||
// public String deletePendingTodo(Collection<Long> ids) {
|
||||
// return getSalaryArchiveService(user).deletePendingTodo(ids);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 停薪
|
||||
// *
|
||||
// * @param ids
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public Map<String, Object> gotoStop(Collection<Long> ids, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).gotoStop(ids, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 一键全部停薪
|
||||
// *
|
||||
// * @param queryParam
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public Map<String, Object> allGotoStop(SalaryArchiveQueryParam queryParam, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).allGotoStop(queryParam, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
//
|
||||
|
||||
/**
|
||||
* 停薪
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> gotoStop(Collection<Long> ids) {
|
||||
return getSalaryArchiveService(user).gotoStop(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 一键全部停薪
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> allGotoStop(SalaryArchiveQueryParam queryParam) {
|
||||
return getSalaryArchiveService(user).allGotoStop(queryParam);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 删除待停薪待办
|
||||
// *
|
||||
|
|
@ -287,22 +283,20 @@ public class SalaryArchiveWrapper extends Service {
|
|||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public String deleteSuspendTodo(Collection<Long> ids, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).deleteSuspendTodo(ids, currentEmployeeId, currentTenantKey);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 取消停薪
|
||||
// *
|
||||
// * @param ids
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// public String cancelStop(Collection<Long> ids, Long currentEmployeeId, String currentTenantKey) {
|
||||
// return getSalaryArchiveService(user).cancelStop(ids, currentEmployeeId, currentTenantKey);
|
||||
// public String deleteSuspendTodo(Collection<Long> ids) {
|
||||
// return getSalaryArchiveService(user).deleteSuspendTodo(ids);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 取消停薪
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public String cancelStop(Collection<Long> ids) {
|
||||
return getSalaryArchiveService(user).cancelStop(ids);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取薪资档案详情表单
|
||||
|
|
|
|||
Loading…
Reference in New Issue