Browse Source

opt:数据查询修改

master1
gongbx 6 months ago
parent
commit
ed9642dbf0
  1. 13
      nlsso-server/src/main/java/org/nl/common/base/CommonPage.java
  2. 2
      nlsso-server/src/main/java/org/nl/common/domain/query/BaseQuery.java
  3. 3
      nlsso-server/src/main/java/org/nl/wms/database/eas/controller/AllocationBillController.java
  4. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillDetailController.java
  5. 3
      nlsso-server/src/main/java/org/nl/wms/database/eas/controller/ReceiptBillController.java
  6. 14
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/AllocationBillMapper.java
  7. 3
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/ReceiptBillMapper.java
  8. 100
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/AllocationBillMapper.xml
  9. 6
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/ReceiptBillMapper.xml
  10. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/IallocationBillService.java
  11. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/IreceiptBillService.java
  12. 19
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/AllocationBillServiceImpl.java
  13. 8
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/ReceiptBillServiceImpl.java
  14. 2
      nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java

13
nlsso-server/src/main/java/org/nl/common/base/CommonPage.java

@ -4,6 +4,7 @@ import cn.hutool.core.convert.Convert;
import cn.hutool.http.HttpStatus; import cn.hutool.http.HttpStatus;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data; import lombok.Data;
import org.checkerframework.checker.units.qual.C;
import java.util.List; import java.util.List;
@ -56,6 +57,18 @@ public class CommonPage<T> {
return result; return result;
} }
public static <T> CommonPage<T> getPage(List<T> list,Long total,Integer page,Integer size) {
CommonPage<T> commonPage = new CommonPage<>();
commonPage.setPageNum(page);
commonPage.setPageSize(size);
commonPage.setTotalElements(total);
commonPage.setTotalPage(Convert.toInt(total/ size+1));
commonPage.setResult(list);
commonPage.setCode(1);
commonPage.setDesc("查询成功");
return commonPage;
}
public static <T> CommonPage<T> getPage(Page<T> page) { public static <T> CommonPage<T> getPage(Page<T> page) {
List<T> list = page.getRecords(); List<T> list = page.getRecords();
CommonPage<T> commonPage = new CommonPage<>(); CommonPage<T> commonPage = new CommonPage<>();

2
nlsso-server/src/main/java/org/nl/common/domain/query/BaseQuery.java

@ -30,7 +30,7 @@ public class BaseQuery<T> {
/** /**
* 当前页数 * 当前页数
*/ */
private Integer page=0; private Integer page=1;
/** /**
* 排序列 * 排序列

3
nlsso-server/src/main/java/org/nl/wms/database/eas/controller/AllocationBillController.java

@ -31,6 +31,7 @@ import org.nl.wms.database.eas.service.IallocationBillService;
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/api/allocationBill") @RequestMapping("/api/allocationBill")
@Slf4j @Slf4j
@SaIgnore
public class AllocationBillController { public class AllocationBillController {
@ -57,7 +58,7 @@ public class AllocationBillController {
*/ */
@PostMapping("/page") @PostMapping("/page")
@Log("分页查询") @Log("分页查询")
public ResponseEntity<CommonPage<AllocationBill>> page(@RequestBody AllocationBillQuery params) { public ResponseEntity<CommonPage<AllocationBillQuery>> page(@RequestBody AllocationBillQuery params) {
return new ResponseEntity<>(allocationBillService.page(params), HttpStatus.OK); return new ResponseEntity<>(allocationBillService.page(params), HttpStatus.OK);
} }

2
nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillDetailController.java

@ -3,6 +3,7 @@ package org.nl.wms.database.eas.controller;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import cn.dev33.satoken.annotation.SaIgnore;
import org.nl.common.base.CommonPage; import org.nl.common.base.CommonPage;
import org.nl.common.base.CommonResult; import org.nl.common.base.CommonResult;
import org.nl.common.base.RestBusinessTemplate; import org.nl.common.base.RestBusinessTemplate;
@ -32,6 +33,7 @@ import org.nl.wms.database.eas.service.IeasOutInBillDetailService;
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/api/easOutInBillDetail") @RequestMapping("/api/easOutInBillDetail")
@Slf4j @Slf4j
@SaIgnore
public class EasOutInBillDetailController { public class EasOutInBillDetailController {

3
nlsso-server/src/main/java/org/nl/wms/database/eas/controller/ReceiptBillController.java

@ -32,6 +32,7 @@ import org.nl.wms.database.eas.service.IreceiptBillService;
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/api/receiptBill") @RequestMapping("/api/receiptBill")
@Slf4j @Slf4j
@SaIgnore
public class ReceiptBillController { public class ReceiptBillController {
@ -57,7 +58,7 @@ public class ReceiptBillController {
*/ */
@PostMapping("/page") @PostMapping("/page")
@Log("分页查询") @Log("分页查询")
public ResponseEntity<CommonPage<ReceiptBill>> page(@RequestBody ReceiptBillVO params) { public ResponseEntity<CommonPage<ReceiptBillQuery>> page(@RequestBody ReceiptBillVO params) {
return new ResponseEntity<>(receiptBillService.page(params), HttpStatus.OK); return new ResponseEntity<>(receiptBillService.page(params), HttpStatus.OK);
} }

14
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/AllocationBillMapper.java

@ -6,6 +6,9 @@ import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.nl.wms.database.eas.dao.AllocationBill; import org.nl.wms.database.eas.dao.AllocationBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.wms.database.eas.dto.AllocationBillQuery;
import java.util.List;
/** /**
* {@code @Description:} (AllocationBill)数据持久层 * {@code @Description:} (AllocationBill)数据持久层
@ -15,18 +18,19 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface AllocationBillMapper extends BaseMapper<AllocationBill> { public interface AllocationBillMapper extends BaseMapper<AllocationBill> {
@Select("SELECT COUNT(*) FROM receiptBill")
@DS("oracle_eas") @DS("oracle_eas")
Long getAllocationCount(); Long getAllocationCount(@Param("fuzzy") String fuzzy);
@DS("oracle_eas") @DS("oracle_eas")
Page<AllocationBill> allocationPage(Page<AllocationBill> page, @Param("fuzzy") String fuzzy); List<AllocationBill> allocationPage(@Param("fuzzy") String fuzzy, @Param("page") Integer page, @Param("size") Integer size );
@Select("SELECT COUNT(*) FROM EAS_NOBLE.receiptBill WHERE DJBH = #{djbh}") @Select("SELECT COUNT(*) FROM EAS_NOBLE.V_UC_STOCKTRANSFERBILL WHERE DJBH = #{djbh}")
@DS("oracle_eas") @DS("oracle_eas")
Long getTotalCount(@Param("djbh") String djbh); Long getTotalCount(@Param("djbh") String djbh);
Page<AllocationBill> allocationDetailPage(Page<AllocationBill> page, @Param("djbh") String djbh, @Param("fuzzy") String fuzzy); @DS("oracle_eas")
List<AllocationBillQuery> allocationDetailPage(@Param("page") Integer page, @Param("size") Integer size, @Param("djbh") String djbh, @Param("fuzzy") String fuzzy);
} }

3
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/ReceiptBillMapper.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.lettuce.core.dynamic.annotation.Param; import io.lettuce.core.dynamic.annotation.Param;
import org.nl.wms.database.eas.dao.ReceiptBill; import org.nl.wms.database.eas.dao.ReceiptBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.wms.database.eas.dto.ReceiptBillQuery;
/** /**
* {@code @Description:} (ReceiptBill)数据持久层 * {@code @Description:} (ReceiptBill)数据持久层
@ -17,5 +18,5 @@ public interface ReceiptBillMapper extends BaseMapper<ReceiptBill> {
Page<ReceiptBill> receiptPage(Page<ReceiptBill> page, @Param("fuzzy") String fuzzy); Page<ReceiptBill> receiptPage(Page<ReceiptBill> page, @Param("fuzzy") String fuzzy);
@DS("mysql_srm") @DS("mysql_srm")
Page<ReceiptBill> receiptDetailPage(Page<ReceiptBill> page, @Param("djbh") String djbh, @Param("fuzzy") String fuzzy); Page<ReceiptBillQuery> receiptDetailPage(Page<ReceiptBillQuery> page, @Param("djbh") String djbh, @Param("fuzzy") String fuzzy);
} }

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

@ -1,71 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.nl.wms.database.eas.dao.mapper.AllocationBillMapper"> <mapper namespace="org.nl.wms.database.eas.dao.mapper.AllocationBillMapper">
<select id="allocationPage" resultType="org.nl.wms.database.eas.dto.AllocationBillQuery"> <select id="getAllocationCount" resultType="java.lang.Long">
WITH ranked_data AS ( WITH ranked_data AS ( SELECT t.*, ROW_NUMBER ( ) OVER ( PARTITION BY djbh ORDER BY CJSJ DESC ) AS rn FROM
SELECT EAS_NOBLE.V_UC_STOCKTRANSFERBILL t ),
t.*, grouped_data AS ( SELECT * FROM ranked_data WHERE rn = 1 ) SELECT
ROW_NUMBER() OVER (PARTITION BY djbh ORDER BY jhdrrq DESC) AS rn COUNT( 1 )
FROM
EAS_NOBLE.V_UC_STOCKTRANSFERBILL t
),
grouped_data AS (
SELECT *
FROM FROM
ranked_data ( SELECT temp.*, ROWNUM AS row_num FROM ( SELECT * FROM grouped_data
WHERE <if test="fuzzy != null and fuzzy != ''">
rn = 1 WHERE (wlmc LIKE '%' || #{fuzzy} || '%'
) OR djbh LIKE '%' || #{fuzzy} || '%'
SELECT * OR wlbm LIKE '%' || #{fuzzy} || '%'
FROM ( OR wlmc LIKE '%' || #{fuzzy} || '%'
SELECT OR dckcmc LIKE '%' || #{fuzzy} || '%'
temp.*, OR dcckmc LIKE '%' || #{fuzzy} || '%'
ROWNUM AS row_num OR drkcmc LIKE '%' || #{fuzzy} || '%'
FROM ( )
SELECT * </if>
FROM grouped_data ORDER BY CJSJ DESC ) temp )
WHERE </select>
<select id="allocationPage" resultType="org.nl.wms.database.eas.dto.AllocationBillQuery">
WITH ranked_data AS ( SELECT t.*, ROW_NUMBER ( ) OVER ( PARTITION BY djbh ORDER BY CJSJ DESC ) AS rn FROM
EAS_NOBLE.V_UC_STOCKTRANSFERBILL t ),
grouped_data AS ( SELECT * FROM ranked_data WHERE rn = 1 ) SELECT * FROM
( SELECT temp.*, ROWNUM AS row_num FROM ( SELECT * FROM grouped_data
<if test="fuzzy != null and fuzzy != ''"> <if test="fuzzy != null and fuzzy != ''">
(djbh LIKE '%' || #{fuzzy} || '%' OR WHERE (wlmc LIKE '%' || #{fuzzy} || '%'
wlbm LIKE '%' || #{fuzzy} || '%' OR OR djbh LIKE '%' || #{fuzzy} || '%'
wlmc LIKE '%' || #{fuzzy} || '%' OR OR wlbm LIKE '%' || #{fuzzy} || '%'
ggxh LIKE '%' || #{fuzzy} || '%' OR OR wlmc LIKE '%' || #{fuzzy} || '%'
dckcmc LIKE '%' || #{fuzzy} || '%' OR OR dckcmc LIKE '%' || #{fuzzy} || '%'
dcckmc LIKE '%' || #{fuzzy} || '%' OR OR dcckmc LIKE '%' || #{fuzzy} || '%'
drkcmc LIKE '%' || #{fuzzy} || '%' OR) OR drkcmc LIKE '%' || #{fuzzy} || '%'
)
</if> </if>
ORDER BY jhdrrq DESC ORDER BY CJSJ DESC ) temp WHERE <![CDATA[ ROWNUM <= #{size} * #{page} ]]>) WHERE
) temp <![CDATA[ row_num > #{size} * (#{page} - 1) ]]>
WHERE
<![CDATA[ ROWNUM <= #{size} * #{page} ]]>
)
WHERE <![CDATA[ row_num > #{size} * (#{page} - 1) ]]>
</select> </select>
<select id="allocationDetailPage" resultType="org.nl.wms.database.eas.dto.AllocationBillQuery"> <select id="allocationDetailPage" resultType="org.nl.wms.database.eas.dto.AllocationBillQuery">
SELECT * SELECT * FROM (
FROM EAS_NOBLE.allocation SELECT V.*, ROW_NUMBER() OVER (ORDER BY V.CJSJ DESC) AS RNUM
WHERE DJBH = #{djbh} FROM EAS_NOBLE.V_UC_STOCKTRANSFERBILL V
<!-- <if test="fuzzy != null and fuzzy != ''">--> WHERE V.DJBH = #{djbh}
<!-- AND (--> )
<!-- djbh LIKE CONCAT('%', #{fuzzy}, '%')--> WHERE RNUM BETWEEN (#{page} - 1) * #{size} + 1 AND #{page} * #{size}
<!-- OR wlmc LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR ggxh LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR fzsl LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR jldw LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR sl LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR kclx LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR kczt LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR dcck LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR dccw LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR drck LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR drcw LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR trackno LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR ywrq LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- OR bz LIKE CONCAT('%', #{fuzzy}, '%')-->
<!-- )-->
<!-- </if>-->
ORDER BY djbh ASC
</select> </select>
</mapper> </mapper>

6
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/ReceiptBillMapper.xml

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.nl.wms.database.eas.dao.mapper.ReceiptBillMapper"> <mapper namespace="org.nl.wms.database.eas.dao.mapper.ReceiptBillMapper">
<select id="receiptPage" resultType="org.nl.wms.database.eas.dto.ReceiptBillQuery"> <select id="receiptPage" resultType="org.nl.wms.database.eas.dto.ReceiptBillQuery">
SELECT * SELECT *
FROM EAS_NOBLE.receiptBill FROM v_wms_recbill_third
<if test="fuzzy != null and fuzzy != ''"> <if test="fuzzy != null and fuzzy != ''">
WHERE djbh LIKE CONCAT('%', #{fuzzy}, '%') WHERE djbh LIKE CONCAT('%', #{fuzzy}, '%')
OR wlmc LIKE CONCAT('%', #{fuzzy}, '%') OR wlmc LIKE CONCAT('%', #{fuzzy}, '%')
@ -27,7 +27,7 @@
</select> </select>
<select id="receiptDetailPage" resultType="org.nl.wms.database.eas.dto.ReceiptBillQuery"> <select id="receiptDetailPage" resultType="org.nl.wms.database.eas.dto.ReceiptBillQuery">
SELECT * SELECT *
FROM EAS_NOBLE.receiptBill FROM v_wms_recbill_third
WHERE DJBH = #{djbh} WHERE DJBH = #{djbh}
<!-- <if test="fuzzy != null and fuzzy != ''">--> <!-- <if test="fuzzy != null and fuzzy != ''">-->
<!-- AND (--> <!-- AND (-->

2
nlsso-server/src/main/java/org/nl/wms/database/eas/service/IallocationBillService.java

@ -34,7 +34,7 @@ public interface IallocationBillService extends IService<AllocationBill> {
* @param params 查询条件 * @param params 查询条件
* @return CommonPage<AllocationBill> * @return CommonPage<AllocationBill>
*/ */
CommonPage<AllocationBill> page(AllocationBillQuery params); CommonPage<AllocationBillQuery> page(AllocationBillQuery params);
/** /**
* 条件查询 * 条件查询

2
nlsso-server/src/main/java/org/nl/wms/database/eas/service/IreceiptBillService.java

@ -32,7 +32,7 @@ public interface IreceiptBillService extends IService<ReceiptBill> {
* @param params 查询条件 * @param params 查询条件
* @return CommonPage<ReceiptBill> * @return CommonPage<ReceiptBill>
*/ */
CommonPage<ReceiptBill> page(ReceiptBillVO params); CommonPage<ReceiptBillQuery> page(ReceiptBillVO params);
/** /**
* 条件查询 * 条件查询

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

@ -4,6 +4,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.nl.common.exception.BadRequestException; import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils; import org.nl.common.utils.SecurityUtils;
@ -56,10 +57,9 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
@SaIgnore @SaIgnore
public CommonPage<AllocationBill> allocationPage(AllocationBillQuery params) { public CommonPage<AllocationBill> allocationPage(AllocationBillQuery params) {
// 查询总记录数 // 查询总记录数
long totalCount = allocationBillMapper.getAllocationCount(); long totalCount = allocationBillMapper.getAllocationCount(params.getFuzzy());
Page<AllocationBill> pageObject = new Page<>(params.getPage(), params.getSize()); List<AllocationBill> allocationBills = allocationBillMapper.allocationPage(params.getFuzzy(),params.getPage(),params.getSize());
Page<AllocationBill> allocationBills = allocationBillMapper.allocationPage(pageObject, params.getFuzzy()); return CommonPage.getPage(allocationBills, totalCount,params.getPage(),params.getSize());
return CommonPage.getPage(allocationBills, totalCount);
} }
@ -69,15 +69,13 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
* @param params 查询条件 * @param params 查询条件
*/ */
@Override @Override
public CommonPage<AllocationBill> page(AllocationBillQuery params) { public CommonPage<AllocationBillQuery> page(AllocationBillQuery params) {
if (StringUtils.isBlank(params.getDjbh())) { if (StringUtils.isBlank(params.getDjbh())) {
throw new BadRequestException("单据编号不能为空"); throw new BadRequestException("单据编号不能为空");
} }
// 查询总记录数 // 查询总记录数
long totalCount = allocationBillMapper.getTotalCount(params.getDjbh()); long totalCount = allocationBillMapper.getTotalCount(params.getDjbh());
Page<AllocationBill> pageObject = new Page<>(params.getPage(), params.getSize()); List<AllocationBillQuery> allocationBillList = allocationBillMapper.allocationDetailPage(params.getPage(),params.getSize(), params.getDjbh(), params.getFuzzy());
Page<AllocationBill> allocationBills = allocationBillMapper.allocationDetailPage(pageObject, params.getDjbh(), params.getFuzzy());
List<AllocationBill> allocationBillList = allocationBills.getRecords();
if (!allocationBillList.isEmpty()) { if (!allocationBillList.isEmpty()) {
// 获取更新列表 // 获取更新列表
List<AllocationBill> updateList = allocationBillMapper.selectList( List<AllocationBill> updateList = allocationBillMapper.selectList(
@ -100,15 +98,14 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
allocationBill.setDrkwbm(updatedBill.getDrkwbm()); allocationBill.setDrkwbm(updatedBill.getDrkwbm());
allocationBill.setJhdrrq(updatedBill.getJhdrrq()); allocationBill.setJhdrrq(updatedBill.getJhdrrq());
allocationBill.setJhdcrq(updatedBill.getJhdcrq()); allocationBill.setJhdcrq(updatedBill.getJhdcrq());
allocationBill.setBz(updatedBill.getBz()); allocationBill.setBtbz(updatedBill.getBz());
} }
return allocationBill; return allocationBill;
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
} }
allocationBills.setRecords(allocationBillList); return CommonPage.getPage(allocationBillList, totalCount,params.getPage(), params.getSize());
return CommonPage.getPage(allocationBills, totalCount);
} }

8
nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/ReceiptBillServiceImpl.java

@ -66,13 +66,13 @@ public class ReceiptBillServiceImpl extends ServiceImpl<ReceiptBillMapper, Recei
* @param params 查询条件 * @param params 查询条件
*/ */
@Override @Override
public CommonPage<ReceiptBill> page(ReceiptBillVO params) { public CommonPage<ReceiptBillQuery> page(ReceiptBillVO params) {
if (StringUtils.isBlank(params.getDjbh())) { if (StringUtils.isBlank(params.getDjbh())) {
throw new BadRequestException("单据编号不能为空"); throw new BadRequestException("单据编号不能为空");
} }
Page<ReceiptBill> pageObject = new Page<>(params.getPage(), params.getSize()); Page<ReceiptBillQuery> pageObject = new Page<>(params.getPage(), params.getSize());
Page<ReceiptBill> receiptBills = receiptBillMapper.receiptDetailPage(pageObject, params.getDjbh(), params.getFuzzy()); Page<ReceiptBillQuery> receiptBills = receiptBillMapper.receiptDetailPage(pageObject, params.getDjbh(), params.getFuzzy());
List<ReceiptBill> receiptBillList = receiptBills.getRecords(); List<ReceiptBillQuery> receiptBillList = receiptBills.getRecords();
if (!receiptBillList.isEmpty()) { if (!receiptBillList.isEmpty()) {
List<ReceiptBill> updateList = receiptBillMapper.selectList( List<ReceiptBill> updateList = receiptBillMapper.selectList(
new LambdaQueryWrapper<ReceiptBill>().eq(ReceiptBill::getDjid, receiptBillList.get(0).getDjid())); new LambdaQueryWrapper<ReceiptBill>().eq(ReceiptBill::getDjid, receiptBillList.get(0).getDjid()));

2
nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java

@ -59,7 +59,7 @@ public class EasBillSchedule {
* eas单据数据同步 * eas单据数据同步
*/ */
@Async("taskExecutor") @Async("taskExecutor")
@Scheduled(cron = "0/120 * * * * *") //@Scheduled(cron = "0/120 * * * * *")
public void getEasOutInBills() { public void getEasOutInBills() {
// 获取eas视图查询未提交的单据 // 获取eas视图查询未提交的单据
List<EasOutInBillDetail> easOutInBillDetails = easOutInBillDetailMapper.selectPageWithInventory(); List<EasOutInBillDetail> easOutInBillDetails = easOutInBillDetailMapper.selectPageWithInventory();

Loading…
Cancel
Save