|
|
|
@ -124,91 +124,98 @@ public class DistributionStockArticleController extends BladeController {
|
|
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
|
@ApiOperation(value = "分页", notes = "传入distributionStockArticle") |
|
|
|
|
public R<IPage<DistributionStockArticleVO>> selectStockArticleInfoList(@ApiIgnore @RequestParam Map<String, Object> distributionStockArticle, Query query) { |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if (Func.isEmpty(myCurrentWarehouse)){ |
|
|
|
|
return R.fail("无仓库信息!!!"); |
|
|
|
|
} |
|
|
|
|
Object orderCodeNum = distributionStockArticle.get("orderCodeNum"); |
|
|
|
|
distributionStockArticle.remove("orderCodeNum"); |
|
|
|
|
Object waybillNum = distributionStockArticle.get("waybillNum"); |
|
|
|
|
Object o = distributionStockArticle.get("orderCode"); |
|
|
|
|
distributionStockArticle.remove("orderCode"); |
|
|
|
|
Object o2 = distributionStockArticle.get("startDate"); |
|
|
|
|
Object o1 = distributionStockArticle.get("entDate"); |
|
|
|
|
String orderIds = (String) distributionStockArticle.get("orderIds"); |
|
|
|
|
String customerName = (String) distributionStockArticle.get("customerName"); |
|
|
|
|
String reservationStatus = (String) distributionStockArticle.get("reservationStatus"); |
|
|
|
|
String warehouseEntryTime = (String) distributionStockArticle.get("warehouseEntryTime"); |
|
|
|
|
String customerTelephone = (String) distributionStockArticle.get("customerTelephone"); |
|
|
|
|
String completeSet = (String) distributionStockArticle.get("completeSet"); |
|
|
|
|
String freezeStatus = (String) distributionStockArticle.get("freezeStatus"); |
|
|
|
|
Object d = distributionStockArticle.get("id"); |
|
|
|
|
distributionStockArticle.remove("id"); |
|
|
|
|
distributionStockArticle.remove("startDate"); |
|
|
|
|
distributionStockArticle.remove("entDate"); |
|
|
|
|
distributionStockArticle.remove("orderIds"); |
|
|
|
|
// distributionStockArticle.remove("pageSize");
|
|
|
|
|
// distributionStockArticle.remove("currentPage");
|
|
|
|
|
// distributionStockArticle.remove("total");
|
|
|
|
|
QueryWrapper<DistributionStockArticleEntity> queryWrapper = Condition.getQueryWrapper(distributionStockArticle, DistributionStockArticleEntity.class); |
|
|
|
|
LambdaQueryWrapper<DistributionStockArticleEntity> lambda = Wrappers.<DistributionStockArticleEntity>query().lambda(); |
|
|
|
|
queryWrapper.ne("reservation_status","30"); |
|
|
|
|
queryWrapper.lambda().eq(DistributionStockArticleEntity::getWarehouseId,myCurrentWarehouse.getId()); |
|
|
|
|
if(Func.isNotEmpty(o)){ |
|
|
|
|
queryWrapper.in("order_code",String.valueOf(o).split(",")); |
|
|
|
|
} |
|
|
|
|
if(Func.isNotEmpty(reservationStatus)){ |
|
|
|
|
queryWrapper.eq("reservation_status",reservationStatus); |
|
|
|
|
} |
|
|
|
|
if(Func.isNotEmpty(warehouseEntryTime)){ |
|
|
|
|
queryWrapper.apply("datediff(warehouse_entry_time,{0} ) = 0",warehouseEntryTime); |
|
|
|
|
} |
|
|
|
|
if(Func.isNotEmpty(freezeStatus)){ |
|
|
|
|
queryWrapper.eq("freeze_status",freezeStatus); |
|
|
|
|
} |
|
|
|
|
if(Func.isNotEmpty(completeSet)){ |
|
|
|
|
queryWrapper.eq("complete_set",completeSet); |
|
|
|
|
} |
|
|
|
|
if(ObjectUtil.isNotEmpty(d)){ |
|
|
|
|
queryWrapper.in("id",String.valueOf(d).split(",")); |
|
|
|
|
} |
|
|
|
|
if(ObjectUtil.isNotEmpty(o2)){ |
|
|
|
|
queryWrapper.between("warehouse_entry_time",o2,o1); |
|
|
|
|
} |
|
|
|
|
if(Func.isNotEmpty(orderIds)){ |
|
|
|
|
queryWrapper.notIn(Func.isNotEmpty(orderIds),"id",Func.toLongList(orderIds)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
R r = distributionStockArticleService.selectStockArticleInfoList(distributionStockArticle,query); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
|
|
|
|
|
// if (Func.isEmpty(myCurrentWarehouse)){
|
|
|
|
|
// return R.fail("无仓库信息!!!");
|
|
|
|
|
// }
|
|
|
|
|
// Object orderCodeNum = distributionStockArticle.get("orderCodeNum");
|
|
|
|
|
// distributionStockArticle.remove("orderCodeNum");
|
|
|
|
|
// Object waybillNum = distributionStockArticle.get("waybillNum");
|
|
|
|
|
// Object o = distributionStockArticle.get("orderCode");
|
|
|
|
|
// distributionStockArticle.remove("orderCode");
|
|
|
|
|
// Object o2 = distributionStockArticle.get("startDate");
|
|
|
|
|
// Object o1 = distributionStockArticle.get("entDate");
|
|
|
|
|
// String orderIds = (String) distributionStockArticle.get("orderIds");
|
|
|
|
|
// String customerName = (String) distributionStockArticle.get("customerName");
|
|
|
|
|
// String reservationStatus = (String) distributionStockArticle.get("reservationStatus");
|
|
|
|
|
// String warehouseEntryTime = (String) distributionStockArticle.get("warehouseEntryTime");
|
|
|
|
|
// String customerTelephone = (String) distributionStockArticle.get("customerTelephone");
|
|
|
|
|
// String completeSet = (String) distributionStockArticle.get("completeSet");
|
|
|
|
|
// String freezeStatus = (String) distributionStockArticle.get("freezeStatus");
|
|
|
|
|
// Object d = distributionStockArticle.get("id");
|
|
|
|
|
// distributionStockArticle.remove("id");
|
|
|
|
|
// distributionStockArticle.remove("startDate");
|
|
|
|
|
// distributionStockArticle.remove("entDate");
|
|
|
|
|
// distributionStockArticle.remove("orderIds");
|
|
|
|
|
//// distributionStockArticle.remove("pageSize");
|
|
|
|
|
//// distributionStockArticle.remove("currentPage");
|
|
|
|
|
//// distributionStockArticle.remove("total");
|
|
|
|
|
// QueryWrapper<DistributionStockArticleEntity> queryWrapper = Condition.getQueryWrapper(distributionStockArticle, DistributionStockArticleEntity.class);
|
|
|
|
|
// LambdaQueryWrapper<DistributionStockArticleEntity> lambda = Wrappers.<DistributionStockArticleEntity>query().lambda();
|
|
|
|
|
// queryWrapper.ne("reservation_status","30");
|
|
|
|
|
// queryWrapper.lambda().eq(DistributionStockArticleEntity::getWarehouseId,myCurrentWarehouse.getId());
|
|
|
|
|
// if(Func.isNotEmpty(o)){
|
|
|
|
|
// queryWrapper.in("order_code",String.valueOf(o).split(","));
|
|
|
|
|
// }
|
|
|
|
|
// if(Func.isNotEmpty(reservationStatus)){
|
|
|
|
|
// queryWrapper.eq("reservation_status",reservationStatus);
|
|
|
|
|
// }
|
|
|
|
|
// if(Func.isNotEmpty(warehouseEntryTime)){
|
|
|
|
|
// queryWrapper.apply("datediff(warehouse_entry_time,{0} ) = 0",warehouseEntryTime);
|
|
|
|
|
// }
|
|
|
|
|
// if(Func.isNotEmpty(freezeStatus)){
|
|
|
|
|
// queryWrapper.eq("freeze_status",freezeStatus);
|
|
|
|
|
// }
|
|
|
|
|
// if(Func.isNotEmpty(completeSet)){
|
|
|
|
|
// queryWrapper.eq("complete_set",completeSet);
|
|
|
|
|
// }
|
|
|
|
|
// if(ObjectUtil.isNotEmpty(d)){
|
|
|
|
|
// queryWrapper.in("id",String.valueOf(d).split(","));
|
|
|
|
|
// }
|
|
|
|
|
// if(ObjectUtil.isNotEmpty(o2)){
|
|
|
|
|
// queryWrapper.between("warehouse_entry_time",o2,o1);
|
|
|
|
|
// }
|
|
|
|
|
// if(Func.isNotEmpty(orderIds)){
|
|
|
|
|
// queryWrapper.notIn("id",Func.toLongList(orderIds));
|
|
|
|
|
// queryWrapper.notIn(Func.isNotEmpty(orderIds),"id",Func.toLongList(orderIds));
|
|
|
|
|
// }
|
|
|
|
|
if(Func.isNotEmpty(customerName)){ |
|
|
|
|
queryWrapper.like("customer_name",customerName); |
|
|
|
|
} |
|
|
|
|
if(Func.isNotEmpty(customerTelephone)){ |
|
|
|
|
queryWrapper.like("customer_telephone",customerTelephone); |
|
|
|
|
} |
|
|
|
|
if(Func.isNotEmpty(orderCodeNum)){ |
|
|
|
|
String anumbering = orderCodeNum.toString(); |
|
|
|
|
List<String> list = CommonUtil.stringNum(anumbering); |
|
|
|
|
if(list.size() > 1){ |
|
|
|
|
queryWrapper.in("order_code",list); |
|
|
|
|
}else{ |
|
|
|
|
queryWrapper.like("order_code",anumbering); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(Func.isNotEmpty(waybillNum)){ |
|
|
|
|
String waybill = waybillNum.toString(); |
|
|
|
|
List<String> list = CommonUtil.stringNum(waybill); |
|
|
|
|
if(list.size() > 1){ |
|
|
|
|
queryWrapper.in("waybill_number",list); |
|
|
|
|
}else{ |
|
|
|
|
queryWrapper.like("waybill_number",waybill); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
queryWrapper.in("order_status",aaa); |
|
|
|
|
IPage<DistributionStockArticleEntity> pages = distributionStockArticleService.page(Condition.getPage(query), queryWrapper); |
|
|
|
|
IPage<DistributionStockArticleVO> distributionStockArticleVOIPage = distributionStockArticleService.handlePackage(DistributionStockArticleWrapper.build().pageVO(pages)); |
|
|
|
|
return R.data(distributionStockArticleVOIPage); |
|
|
|
|
//// if(Func.isNotEmpty(orderIds)){
|
|
|
|
|
//// queryWrapper.notIn("id",Func.toLongList(orderIds));
|
|
|
|
|
//// }
|
|
|
|
|
// if(Func.isNotEmpty(customerName)){
|
|
|
|
|
// queryWrapper.like("customer_name",customerName);
|
|
|
|
|
// }
|
|
|
|
|
// if(Func.isNotEmpty(customerTelephone)){
|
|
|
|
|
// queryWrapper.like("customer_telephone",customerTelephone);
|
|
|
|
|
// }
|
|
|
|
|
// if(Func.isNotEmpty(orderCodeNum)){
|
|
|
|
|
// String anumbering = orderCodeNum.toString();
|
|
|
|
|
// List<String> list = CommonUtil.stringNum(anumbering);
|
|
|
|
|
// if(list.size() > 1){
|
|
|
|
|
// queryWrapper.in("order_code",list);
|
|
|
|
|
// }else{
|
|
|
|
|
// queryWrapper.like("order_code",anumbering);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if(Func.isNotEmpty(waybillNum)){
|
|
|
|
|
// String waybill = waybillNum.toString();
|
|
|
|
|
// List<String> list = CommonUtil.stringNum(waybill);
|
|
|
|
|
// if(list.size() > 1){
|
|
|
|
|
// queryWrapper.in("waybill_number",list);
|
|
|
|
|
// }else{
|
|
|
|
|
// queryWrapper.like("waybill_number",waybill);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// queryWrapper.in("order_status",aaa);
|
|
|
|
|
// IPage<DistributionStockArticleEntity> pages = distributionStockArticleService.page(Condition.getPage(query), queryWrapper);
|
|
|
|
|
// IPage<DistributionStockArticleVO> distributionStockArticleVOIPage = distributionStockArticleService.handlePackage(DistributionStockArticleWrapper.build().pageVO(pages));
|
|
|
|
|
return r; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -220,7 +227,10 @@ public class DistributionStockArticleController extends BladeController {
|
|
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
|
@ApiOperation(value = "分页", notes = "传入distributionStockArticle") |
|
|
|
|
public R<IPage<DistributionStockArticleVO>> clientList(@ApiIgnore DistributionStockArticleVO distributionStockArticle, Query query) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if (Func.isEmpty(myCurrentWarehouse)){ |
|
|
|
|
return R.fail("无仓库信息!!!"); |
|
|
|
|
} |
|
|
|
|
//获取当前登录人仓库
|
|
|
|
|
// List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
|
|
|
|
|
// List<Long> collect = myWatchWarehouse.stream()
|
|
|
|
@ -231,7 +241,7 @@ public class DistributionStockArticleController extends BladeController {
|
|
|
|
|
|
|
|
|
|
DistributionStockArticleWrapper.build().pageVO(pages); |
|
|
|
|
|
|
|
|
|
return R.data( DistributionStockArticleWrapper.build().pageVO(pages)); |
|
|
|
|
return R.data(DistributionStockArticleWrapper.build().pageVO(pages)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|