我的工资接口修改
This commit is contained in:
parent
cf6b35f6a0
commit
8ad88b1e97
|
|
@ -927,8 +927,10 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
userIdList.add(employeeId.toString());
|
||||
String title = billTitle; // 标题
|
||||
String context = "点击查看详情"; // 内容
|
||||
String linkUrl = weaver.general.GCONST.getContextPath() + "/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=" + id; // PC端链接
|
||||
String linkMobileUrl = weaver.general.GCONST.getContextPath() + "/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?type=phone&id=" + id; // 移动端链接
|
||||
// PC端链接
|
||||
String linkUrl = weaver.general.GCONST.getContextPath() + "/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=" + id + "&recipient=" + employeeId;
|
||||
// 移动端链接
|
||||
String linkMobileUrl = weaver.general.GCONST.getContextPath() + "/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?type=phone&id=" + id + "&recipient=" + employeeId;
|
||||
try {
|
||||
MessageBean messageBean = Util_Message.createMessage(messageType, userIdList, title, context, linkUrl, linkMobileUrl);
|
||||
messageBean.setCreater(user.getUID());// 创建人id
|
||||
|
|
@ -1304,7 +1306,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
Long salarySendId = queryParam.getSalarySendId();
|
||||
// 获取薪资核算ID
|
||||
SalarySendPO salarySendPO = getById(salarySendId);
|
||||
if(Objects.isNull(salarySendPO)){
|
||||
if (Objects.isNull(salarySendPO)) {
|
||||
throw new SalaryRunTimeException("工资发放记录不存在或已被删除");
|
||||
}
|
||||
return getSalaryAcctResultService(user).sumRow(SalaryAcctResultQueryParam.builder().salaryAcctRecordId(salarySendPO.getSalaryAccountingId()).build());
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
|
|
@ -111,7 +112,7 @@ public class SalaryBillController {
|
|||
@Path("/template/getAvailableSalaryGroupSet")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getAvailableSalaryGroupSet(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody SalaryBillSalaryGroupQueryParam param) {
|
||||
@RequestBody SalaryBillSalaryGroupQueryParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryBillSalaryGroupQueryParam, List<SalaryTemplateSalaryItemSetListDTO>>(user)
|
||||
.run(getSalaryTemplateWrapper(user)::getSalaryGroupSet, param);
|
||||
|
|
@ -124,7 +125,7 @@ public class SalaryBillController {
|
|||
@Path("/template/getAvailableSalaryItemSet")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getAvailableSalaryItemSet(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@RequestBody SalaryBillSalaryItemQueryParam param) {
|
||||
@RequestBody SalaryBillSalaryItemQueryParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryBillSalaryItemQueryParam, List<SalaryTemplateSalaryItemListDTO>>(user)
|
||||
.run(getSalaryTemplateWrapper(user)::getSalaryItemSetGrouped, param);
|
||||
|
|
@ -528,14 +529,18 @@ public class SalaryBillController {
|
|||
@Path("/mySalaryBill")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String mySalaryBill(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "salaryInfoId") Long salaryInfoId) {
|
||||
// if (StringUtils.isEmpty(token)) {
|
||||
// throw new SalaryRunTimeException(SalrayCheckSecondAuthConstant.CHECK_SECOND_FAIL_NO_TOKEN);
|
||||
// }
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
String em_auth_userid = request.getParameter("em_auth_userid");
|
||||
if (user == null && StringUtils.isNotBlank(em_auth_userid)) {
|
||||
user = new User(Integer.parseInt(em_auth_userid));
|
||||
log.info("no login em_auth_userid {} user{}", em_auth_userid, user);
|
||||
if (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));
|
||||
}
|
||||
}
|
||||
}
|
||||
return new ResponseResult<Long, Map<String, Object>>(user).run(getSalarySendWrapper(user)::mySalaryBill, salaryInfoId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ public class SalarySendWrapper extends Service {
|
|||
Set<String> backCalcSalarySobs = SalaryEntityUtil.properties(salaryAcctRecordPOS, salaryAcctRecordPO -> salaryAcctRecordPO.getSalarySobId() + "-" + sdf.format(salaryAcctRecordPO.getSalaryMonth()));
|
||||
// 判断是否回算过,haveBackCalc 属性
|
||||
pageList.stream().forEach(salarySendDTO -> {
|
||||
if(backCalcSalarySobs.contains(salarySendDTO.getSalarySobId() + "-" + sdf.format(salarySendDTO.getSalaryYearMonth()))){
|
||||
if (backCalcSalarySobs.contains(salarySendDTO.getSalarySobId() + "-" + sdf.format(salarySendDTO.getSalaryYearMonth()))) {
|
||||
salarySendDTO.setHaveBackCalc(NumberUtils.INTEGER_ONE);
|
||||
}
|
||||
});
|
||||
|
|
@ -624,6 +624,9 @@ public class SalarySendWrapper extends Service {
|
|||
* @return
|
||||
*/
|
||||
public Map<String, Object> mySalaryBill(Long salaryInfoId) {
|
||||
if (user == null) {
|
||||
throw new SalaryRunTimeException("获取人员信息失败!");
|
||||
}
|
||||
return getSalarySendService(user).mySalaryBill(salaryInfoId, (long) user.getUID());
|
||||
}
|
||||
|
||||
|
|
@ -633,7 +636,7 @@ public class SalarySendWrapper extends Service {
|
|||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> sumSendResult(SalarySendInfoQueryParam queryParam) {
|
||||
public Map<String, Object> sumSendResult(SalarySendInfoQueryParam queryParam) {
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
//合计
|
||||
Map<String, Object> sumRow = getSalarySendService(user).sumRow(queryParam);
|
||||
|
|
|
|||
Loading…
Reference in New Issue