Browse Source

修改订单查询条件

training
caoyizhong 1 year ago
parent
commit
cab8098c30
  1. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java
  2. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java

@ -87,10 +87,14 @@ public class BasicdataClientController extends BladeController {
basicdataClient.put("contractStartTime",null);
basicdataClient.put("contractEntTime",null);
QueryWrapper<BasicdataClientEntity> queryWrapper = Condition.getQueryWrapper(basicdataClient, BasicdataClientEntity.class);
queryWrapper.apply(o != null,
/* queryWrapper.apply(o != null,
"date_format (contract_start_time,'%Y-%m-%d') >= date_format ({0},'%Y-%m-%d')", o)
.apply(o1 != null,
"date_format (contract_ent_time,'%Y-%m-%d') <= date_format ({0},'%Y-%m-%d')", o1);
"date_format (contract_ent_time,'%Y-%m-%d') <= date_format ({0},'%Y-%m-%d')", o1);*/
if(ObjectUtils.isNotNull(o)){
queryWrapper.between("contract_start_time",o,o1);
}
if(ObjectUtils.isNotNull(o2)){
queryWrapper.eq("pid",o2);
}else{

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

@ -86,8 +86,12 @@ public class DistributionStockArticleController extends BladeController {
public R<IPage<DistributionStockArticleVO>> list(@ApiIgnore @RequestParam Map<String, Object> distributionStockArticle, Query query) {
Object o = distributionStockArticle.get("orderSelfNumbering");
distributionStockArticle.remove("orderSelfNumbering");
Object o2 = distributionStockArticle.get("startDate");
Object o1 = distributionStockArticle.get("entDate");
Object d = distributionStockArticle.get("id");
distributionStockArticle.remove("id");
distributionStockArticle.remove("startDate");
distributionStockArticle.remove("entDate");
QueryWrapper<DistributionStockArticleEntity> queryWrapper = Condition.getQueryWrapper(distributionStockArticle, DistributionStockArticleEntity.class);
if(Func.isNotEmpty(o)){
queryWrapper.in("order_self_numbering",String.valueOf(o).split(","));
@ -95,6 +99,9 @@ public class DistributionStockArticleController extends BladeController {
if(ObjectUtil.isNotEmpty(d)){
queryWrapper.in("id",String.valueOf(d).split(","));
}
if(ObjectUtil.isNotEmpty(o2)){
queryWrapper.between("warehouse_entry_time",o2,o1);
}
IPage<DistributionStockArticleEntity> pages = distributionStockArticleService.page(Condition.getPage(query), queryWrapper);
return R.data(DistributionStockArticleWrapper.build().pageVO(pages));

Loading…
Cancel
Save