opt:数据查询修改

This commit is contained in:
gongbaoxiong
2024-05-31 17:12:35 +08:00
parent 76f88ef3ce
commit 15c3bb5734
2 changed files with 9 additions and 2 deletions

View File

@@ -42,7 +42,7 @@
<select id="allocationDetailPage" resultType="org.nl.wms.database.eas.dto.AllocationBillQuery">
SELECT * FROM (
SELECT V.*, ROW_NUMBER() OVER (ORDER BY V.CJSJ DESC) AS RNUM
SELECT V.*, ROW_NUMBER() OVER (ORDER BY V.YWRQ DESC) AS RNUM
FROM EAS_NOBLE.V_UC_STOCKTRANSFERBILL V
WHERE V.DJID = #{djid}
)

View File

@@ -86,7 +86,14 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
// 查询总记录数
long totalCount = allocationBillMapper.getTotalCount(params.getDjid());
List<AllocationBillQuery> allocationBillList = allocationBillMapper.allocationDetailPage(params.getPage(), params.getSize(), params.getDjid(), params.getFuzzy());
if (!allocationBillList.isEmpty()) {
if (allocationBillList.isEmpty()) {
allocationBillList = allocationBillList.stream().peek(r -> {
if (r.getJhdrrq().contains("/") || r.getJhdcrq().contains("/")) {
r.setJhdrrq(LocalDateTime.parse(r.getJhdrrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString());
r.setJhdcrq(LocalDateTime.parse(r.getJhdcrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString());
}
}).collect(Collectors.toList());
} else {
// 获取更新列表
List<AllocationBill> updateList = allocationBillMapper.selectList(
new LambdaQueryWrapper<AllocationBill>().eq(AllocationBill::getDjid, allocationBillList.get(0).getDjid()));