工资单反馈

This commit is contained in:
Harryxzy 2023-07-17 15:01:14 +08:00
parent 88892f1aac
commit 1ea80b8fe9
6 changed files with 50 additions and 2 deletions

View File

@ -14,7 +14,7 @@ public enum BillConfimStatusEnum implements BaseEnum<Integer> {
UNCONFIRMED(0, "未确认", 93286),
CONFIRMED(1, "已确认", 93212),
AUTOCONFIRMED(2, "自动确认", 93212);
FEEDBACK(2, "已反馈", 0);
private final int value;

View File

@ -788,7 +788,7 @@
<update id="autoConfirmSalaryBill">
UPDATE hrsa_salary_send_info
set
bill_confirm_status = 2
bill_confirm_status = 1
where
delete_type = 0
<if test="ids != null and ids.size() > 0">

View File

@ -36,6 +36,12 @@ public interface SalaryBillService {
*/
void confirmSalaryBill(Long salaryInfoId);
/**
* 工资单反馈
* @param salaryInfoId
*/
void feedBackSalaryBill(Long salaryInfoId);
/**
* 工资单撤回
*

View File

@ -436,6 +436,17 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
getSalarySendInfoMapper().updateIgnoreNull(sendInfoPO);
}
@Override
public void feedBackSalaryBill(Long salaryInfoId) {
SalarySendInfoPO sendInfoPO = getSalarySendInfoMapper().getById(salaryInfoId);
if(ObjectUtils.isEmpty(sendInfoPO)){
throw new SalaryRunTimeException("工资单不存在或已被删除!");
}
sendInfoPO.setBillConfirmStatus(BillConfimStatusEnum.FEEDBACK.getValue());
sendInfoPO.setUpdateTime(new Date());
getSalarySendInfoMapper().updateIgnoreNull(sendInfoPO);
}
public List<Map<String, Object>> getSendInfoList(Long sendId, List<Long> ids) {
SalarySendPO salarySend = getSalarySendMapper().getById(sendId);

View File

@ -569,6 +569,30 @@ public class SalaryBillController {
}
return new ResponseResult<Long, Map<String, Object>>(user).run(getSalarySendWrapper(user)::confirmSalaryBill, salaryInfoId);
}
/**
* 工资单反馈
*
* @param salaryInfoId
* @return
*/
@GET
@Path("/feedBackSalaryBill")
@Produces(MediaType.APPLICATION_JSON)
public String feedBackSalaryBill(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "salaryInfoId") Long salaryInfoId) {
User user = null;
String recipient = request.getParameter("recipient");
String em_auth_userid = request.getParameter("em_auth_userid");
log.info("salary recipient: {} em_auth_userid: {}", recipient, em_auth_userid);
if (StringUtils.isNotBlank(recipient) && NumberUtils.isCreatable(recipient)) {
user = new User(Integer.parseInt(recipient));
} else if (StringUtils.isNotBlank(em_auth_userid) && NumberUtils.isCreatable(em_auth_userid)) {
user = new User(Integer.parseInt(em_auth_userid));
} else {
user = HrmUserVarify.getUser(request, response);
}
return new ResponseResult<Long, Map<String, Object>>(user).run(getSalarySendWrapper(user)::feedBackSalaryBill, salaryInfoId);
}
/******** 工资单发放 end ***********************************************************************************************/
/**

View File

@ -686,6 +686,13 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
}
getSalaryBillService(user).confirmSalaryBill(salaryInfoId);
}
public void feedBackSalaryBill(Long salaryInfoId) {
if(ObjectUtil.isNull(salaryInfoId)){
throw new SalaryRunTimeException("工资单id不能为空");
}
getSalaryBillService(user).feedBackSalaryBill(salaryInfoId);
}
}