修复工资单模板显示问题
This commit is contained in:
parent
a8fc666e79
commit
a37e874614
|
|
@ -1,6 +1,8 @@
|
|||
package com.engine.salary.entity.salaryBill.dto;
|
||||
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -30,7 +32,7 @@ public class SalarySendBaseInfoDTO {
|
|||
private String template;
|
||||
|
||||
// @ApiModelProperty("薪资所属月")
|
||||
// @JsonSerialize(using = ToStringSerializer.class)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private YearMonth salaryMonth;
|
||||
|
||||
// @ApiModelProperty("薪资账套的周期")
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.engine.core.exception.ECException;
|
|||
import com.engine.salary.exception.ExceptionUtil;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -113,6 +114,11 @@ public class ResponseResult<T, R> {
|
|||
}
|
||||
|
||||
|
||||
private static String getJsonString(Object apidatas) throws JsonProcessingException {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
return mapper.writeValueAsString(apidatas);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回
|
||||
*/
|
||||
|
|
@ -130,7 +136,7 @@ public class ResponseResult<T, R> {
|
|||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("status", true);
|
||||
apidatas.put("data", r);
|
||||
String success = JSONObject.toJSONString(apidatas, SerializerFeature.WriteMapNullValue, SerializerFeature.DisableCircularReferenceDetect);
|
||||
String success = getJsonString(apidatas);
|
||||
if (isLog) {
|
||||
log.info("run salary api success return {}", success);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue