工资单列表问题处理
This commit is contained in:
parent
3c03d7144d
commit
ee9116ae2b
|
|
@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
|
|||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 我的工资单
|
||||
|
|
@ -38,7 +39,7 @@ public class SalaryMySalaryBillListDTO {
|
|||
// tableColumn = @TableColumn(width = "20%")
|
||||
// )
|
||||
// @JsonFormat(pattern = "yyyy-MM")
|
||||
private LocalDate salaryYearMonth;
|
||||
private Date salaryYearMonth;
|
||||
|
||||
// @ApiModelProperty("核算次数")
|
||||
private String acctTimes;
|
||||
|
|
@ -58,7 +59,7 @@ public class SalaryMySalaryBillListDTO {
|
|||
// tableColumn = @TableColumn(width = "40%")
|
||||
// )
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime sendTime;
|
||||
private Date sendTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
|
||||
import java.time.LocalDate;
|
||||
import java.time.YearMonth;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -27,7 +28,7 @@ public class SalaryBillQueryParam extends BaseQueryParam {
|
|||
private List<String> salaryYearMonth;
|
||||
|
||||
// @JsonIgnore
|
||||
private List<String> salaryMonth;
|
||||
private List<Date> salaryMonth;
|
||||
|
||||
// @JsonIgnore
|
||||
private Long employeeId;
|
||||
|
|
|
|||
|
|
@ -623,7 +623,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
int sendTotal = list.size();
|
||||
SalarySendPO salarySendNew = new SalarySendPO();
|
||||
try {
|
||||
BeanUtils.copyProperties(salarySend, salarySendNew);
|
||||
BeanUtils.copyProperties(salarySendNew,salarySend);
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
|
|
@ -799,7 +799,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
|
||||
SalarySendPO salarySendNew = new SalarySendPO();
|
||||
try {
|
||||
BeanUtils.copyProperties(salarySend, salarySendNew);
|
||||
BeanUtils.copyProperties(salarySendNew, salarySend);
|
||||
} catch (Exception e) {
|
||||
throw new SalaryRunTimeException("数据转换异常, " + e.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -564,8 +566,15 @@ public class SalarySendWrapper extends Service {
|
|||
public Map<String, Object> mySalaryBillList(SalaryBillQueryParam queryParam) {
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
queryParam.setEmployeeId((long)user.getUID());
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
queryParam.setSalaryMonth(
|
||||
queryParam.getSalaryYearMonth().stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
queryParam.getSalaryYearMonth().stream().map(e -> {
|
||||
try {
|
||||
return simpleDateFormat.parse(e + "-01");
|
||||
} catch (ParseException parseException) {
|
||||
throw new SalaryRunTimeException("日期转换错误");
|
||||
}
|
||||
}).collect(Collectors.toList()));
|
||||
PageInfo<SalaryMySalaryBillListDTO> pageInfo = getSalarySendService(user).mySalaryBillListPage(queryParam);
|
||||
List<SalaryMySalaryBillListDTO> records = pageInfo.getList();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue