Browse Source

opt:数据查询修改

master1
gongbaoxiong 6 months ago
parent
commit
15c3bb5734
  1. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/AllocationBillMapper.xml
  2. 9
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/AllocationBillServiceImpl.java

2
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/AllocationBillMapper.xml

@ -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}
)

9
nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/AllocationBillServiceImpl.java

@ -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()));

Loading…
Cancel
Save