采购入库
This commit is contained in:
@@ -6,11 +6,14 @@ import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.warehouse.biz.purchaseinventorybill.PurchaseInventoryBillQuery;
|
||||
import com.yxt.warehouse.biz.purchaseinventorybill.PurchaseInventoryBillService;
|
||||
import com.yxt.warehouse.biz.purchaseinventorybill.*;
|
||||
import com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetailVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/8/1 17:46
|
||||
@@ -35,13 +38,9 @@ public class PurchaseInventoryBillRest {
|
||||
return purchaseInventoryBillService.saveOrUpdateBill2(dto);
|
||||
}
|
||||
|
||||
@ApiOperation("通知单收货单初始化")
|
||||
@GetMapping("/getInitDetails")
|
||||
ResultBean<PurchaseInventoryBillVo> getInitDetails(@RequestParam("sourceSid") String sourceSid) {
|
||||
return purchaseInventoryBillService.getInitDetails(sourceSid);
|
||||
}
|
||||
|
||||
@ApiOperation("收货单据编辑初始化/详情")
|
||||
|
||||
@ApiOperation("采购入库单据编辑初始化/详情")
|
||||
@GetMapping("/selectByBillSid")
|
||||
ResultBean<PurchaseInventoryBillInitVo> selectByBillSid(@RequestParam("sid") String sid) {
|
||||
return purchaseInventoryBillService.selectByBillSid(sid);
|
||||
|
||||
@@ -45,7 +45,11 @@ public class WarehouseAnsBillRest {
|
||||
ResultBean<PagerVo<WarehouseAnsBillVo>> rb = ResultBean.fireFail();
|
||||
return wmsAnsBillService.listPages(pagerQuery);
|
||||
}
|
||||
|
||||
@PostMapping("listPageAns")
|
||||
@ApiOperation("选择预约单分页列表")
|
||||
ResultBean<PagerVo<WarehouseAndBillDetailVo>> listPageAns(@RequestBody PagerQuery<WarehouseAnsBillQuery> pagerQuery) {
|
||||
return wmsAnsBillService.listPageAns(pagerQuery);
|
||||
}
|
||||
@GetMapping("details")
|
||||
@ApiOperation("详情")
|
||||
ResultBean<WarehouseAnsDetailsVo> details(@RequestParam("sid") String sid) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yxt.warehouse.biz.purchaseinventorybill;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetailDto2;
|
||||
import com.yxt.warehouse.biz.warehousereceiptbilldetail.WarehouseReceiptBillDetailDto2;
|
||||
import com.yxt.warehouse.biz.warehousereceiptbilldetailbatch.WarehouseReceiptBillDetailBatchDto2;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -63,7 +64,7 @@ public class PurchaseInventoryBillDto2 {
|
||||
@ApiModelProperty("备注")
|
||||
private String remarks;
|
||||
@ApiModelProperty("商品列表")
|
||||
private List<WarehouseReceiptBillDetailDto2> list = new ArrayList<>();
|
||||
@ApiModelProperty("批次列表")
|
||||
private List<WarehouseReceiptBillDetailBatchDto2> pcList = new ArrayList<>();
|
||||
private List<PurchaseInventoryBillDetailDto2> list = new ArrayList<>();
|
||||
// @ApiModelProperty("批次列表")
|
||||
// private List<PurchaseInventoryBillDetailBatchDto2> pcList = new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -101,12 +101,13 @@ public class PurchaseInventoryBillService extends MybatisBaseService<PurchaseInv
|
||||
PurchaseInventoryBill wmsReceiptBill = new PurchaseInventoryBill();
|
||||
sid = wmsReceiptBill.getSid();
|
||||
BeanUtil.copyProperties(dto, wmsReceiptBill, "sid");
|
||||
List<WarehouseReceiptBillDetailDto2> list = dto.getList();
|
||||
List<PurchaseInventoryBillDetailDto2> list = dto.getList();
|
||||
list.removeAll(Collections.singleton(null));
|
||||
List<WarehouseReceiptBillDetailBatchDto2> pcList = dto.getPcList();
|
||||
pcList.removeAll(Collections.singleton(null));
|
||||
// List<WarehouseReceiptBillDetailBatchDto2> pcList = dto.getPcList();
|
||||
// pcList.removeAll(Collections.singleton(null));
|
||||
if (!list.isEmpty()) {
|
||||
// purchaseInventoryBillDetailService.saveOrUpdateDetailsList2(sid, list, pcList);
|
||||
purchaseInventoryBillDetailService.saveOrUpdateDetailsList2(sid, list);
|
||||
}
|
||||
baseMapper.insert(wmsReceiptBill);
|
||||
|
||||
@@ -116,12 +117,13 @@ public class PurchaseInventoryBillService extends MybatisBaseService<PurchaseInv
|
||||
return rb.setMsg("该单据不存在");
|
||||
}
|
||||
BeanUtil.copyProperties(dto, wmsReceiptBill, "sid");
|
||||
List<WarehouseReceiptBillDetailDto2> list = dto.getList();
|
||||
List<PurchaseInventoryBillDetailDto2> list = dto.getList();
|
||||
list.removeAll(Collections.singleton(null));
|
||||
List<WarehouseReceiptBillDetailBatchDto2> pcList = dto.getPcList();
|
||||
pcList.removeAll(Collections.singleton(null));
|
||||
// List<WarehouseReceiptBillDetailBatchDto2> pcList = dto.getPcList();
|
||||
// pcList.removeAll(Collections.singleton(null));
|
||||
if (!list.isEmpty()) {
|
||||
// purchaseInventoryBillDetailService.saveOrUpdateDetailsList2(sid, list, pcList);
|
||||
purchaseInventoryBillDetailService.saveOrUpdateDetailsList2(sid, list);
|
||||
}
|
||||
baseMapper.updateById(wmsReceiptBill);
|
||||
}
|
||||
@@ -196,12 +198,12 @@ public class PurchaseInventoryBillService extends MybatisBaseService<PurchaseInv
|
||||
public ResultBean<String> confirm(PurchaseInventoryBillDto2 dto) {
|
||||
ResultBean<String> rb = ResultBean.fireFail();
|
||||
// dto.setBillState("1");
|
||||
List<WarehouseReceiptBillDetailDto2> list = dto.getList();
|
||||
List<PurchaseInventoryBillDetailDto2> list = dto.getList();
|
||||
list.removeAll(Collections.singleton(null));
|
||||
if (!list.isEmpty()) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
WarehouseReceiptBillDetailDto2 wmsReceiptBillDetailDto2 = list.get(i);
|
||||
wmsReceiptBillDetailDto2.setState(1);
|
||||
PurchaseInventoryBillDetailDto2 wmsReceiptBillDetailDto2 = list.get(i);
|
||||
// wmsReceiptBillDetailDto2.setState(1);
|
||||
}
|
||||
}
|
||||
dto.setList(list);
|
||||
|
||||
@@ -4,6 +4,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: dimengzhe
|
||||
@@ -12,58 +15,48 @@ import lombok.Data;
|
||||
@Data
|
||||
public class PurchaseInventoryBillDetailDto2 {
|
||||
|
||||
@ApiModelProperty("商品Skusid")
|
||||
@ApiModelProperty("来源单sid")
|
||||
private String sourceBillSid;
|
||||
@ApiModelProperty("图示")
|
||||
private String illustration;
|
||||
@ApiModelProperty("商品skusid")
|
||||
private String goodsSkuSid;
|
||||
@ApiModelProperty("商品Sku名称")
|
||||
private String goodsSkuTitle;
|
||||
@ApiModelProperty("商品sku编码")
|
||||
private String goodsSkuCode;
|
||||
@ApiModelProperty("规格型号")
|
||||
private String goodsSkuOwnSpec;
|
||||
@ApiModelProperty("计量单位")
|
||||
private String unit;
|
||||
@ApiModelProperty("仓库sid")
|
||||
private String warehouseSid;
|
||||
@ApiModelProperty("仓库名称")
|
||||
private String warehouseName;
|
||||
@ApiModelProperty("库位sid")
|
||||
@ApiModelProperty("商品名称")
|
||||
private String goodsName;
|
||||
@ApiModelProperty("商品编码")
|
||||
private String goodsCode;
|
||||
@ApiModelProperty("商品条码")
|
||||
private String goodsBarCode;
|
||||
@ApiModelProperty("规格值")
|
||||
private String specValue;
|
||||
@ApiModelProperty("箱条码")
|
||||
private String boxBarCode;
|
||||
@ApiModelProperty("箱规格")
|
||||
private String boxSpec;
|
||||
@ApiModelProperty("单位sid")
|
||||
private String unitSid;
|
||||
@ApiModelProperty("单位名称")
|
||||
private BigDecimal unitName;
|
||||
@ApiModelProperty("成本单价")
|
||||
private BigDecimal price;
|
||||
@ApiModelProperty("总价")
|
||||
private String totalPrice;
|
||||
@ApiModelProperty("数量")
|
||||
private Date count;
|
||||
@ApiModelProperty("辅助单位")
|
||||
private Integer auxiliaryUnits;
|
||||
@ApiModelProperty("序列号")
|
||||
private Integer serialNumber;
|
||||
@ApiModelProperty("生产批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("入库库位sid")
|
||||
private String warehouseRackSid;
|
||||
@ApiModelProperty("库位名称")
|
||||
@ApiModelProperty("入库库位名")
|
||||
private String warehouseRackName;
|
||||
@ApiModelProperty("实收数量")
|
||||
private String actualInCount;
|
||||
@ApiModelProperty("拒收数量")
|
||||
private String rejectCount;
|
||||
@ApiModelProperty("拒收原因")
|
||||
private String rejectReason;
|
||||
@ApiModelProperty("是否需要质检(不需要0,需要1)")
|
||||
private Integer isQuality;
|
||||
@ApiModelProperty("质检状态(合格0,不合格1)")
|
||||
private Integer qualityState;
|
||||
@ApiModelProperty("载具说明")
|
||||
private String packageRemark;
|
||||
@ApiModelProperty("单据明细状态:0新建,1已完成")
|
||||
private Integer state;
|
||||
@ApiModelProperty("序号")
|
||||
private String xh;
|
||||
@JsonIgnore
|
||||
private String detailsSid;
|
||||
|
||||
@ApiModelProperty("预约数量(采购订单数量)")
|
||||
private String orderCount;
|
||||
|
||||
|
||||
//入库价
|
||||
@ApiModelProperty("单位成本(采购价)")
|
||||
private String cost;
|
||||
@ApiModelProperty("税额")
|
||||
private String taxAmount;
|
||||
@ApiModelProperty("含税价")
|
||||
private String taxPrice;
|
||||
//采购金额
|
||||
@ApiModelProperty("金额")
|
||||
private String amount;
|
||||
|
||||
@ApiModelProperty("有效天数")
|
||||
private String shelfLife;
|
||||
@ApiModelProperty("使用组织sid")
|
||||
private String useOrgSid;
|
||||
@ApiModelProperty("创建组织sid")
|
||||
private String createOrgSid;
|
||||
private String remarks;
|
||||
}
|
||||
|
||||
@@ -30,22 +30,23 @@ public class PurchaseInventoryBillDetailService extends MybatisBaseService<Purch
|
||||
@Autowired
|
||||
private WarehouseReceiptBillDetailBatchService wmsReceiptBillDetailBatchService;
|
||||
|
||||
public void saveOrUpdateDetailsList2(String sid, List<PurchaseInventoryBillDetailDto2> list, List<WarehouseReceiptBillDetailBatchDto2> pcList) {
|
||||
// public void saveOrUpdateDetailsList2(String sid, List<PurchaseInventoryBillDetailDto2> list, List<WarehouseReceiptBillDetailBatchDto2> pcList) {
|
||||
public void saveOrUpdateDetailsList2(String sid, List<PurchaseInventoryBillDetailDto2> list) {
|
||||
baseMapper.deleteByBillSid(sid);
|
||||
list.forEach(v -> {
|
||||
PurchaseInventoryBillDetail wmsReceiptBillDetail = new PurchaseInventoryBillDetail();
|
||||
BeanUtil.copyProperties(v, wmsReceiptBillDetail, "sid");
|
||||
// wmsReceiptBillDetail.setBillSid(sid);
|
||||
baseMapper.insert(wmsReceiptBillDetail);
|
||||
wmsReceiptBillDetailBatchService.deleteByDetails(sid);
|
||||
pcList.removeAll(Collections.singleton(null));
|
||||
if (!pcList.isEmpty()) {
|
||||
List<WarehouseReceiptBillDetailBatchDto2> pcList2 = pcList.stream().filter(c -> c.getXh().equals(v.getXh())).collect(Collectors.toList());
|
||||
pcList2.removeAll(Collections.singleton(null));
|
||||
if (!pcList2.isEmpty()) {
|
||||
wmsReceiptBillDetailBatchService.saveBatchs2(sid, wmsReceiptBillDetail.getSid(), pcList2);
|
||||
}
|
||||
}
|
||||
// wmsReceiptBillDetailBatchService.deleteByDetails(sid);
|
||||
// pcList.removeAll(Collections.singleton(null));
|
||||
// if (!pcList.isEmpty()) {
|
||||
// List<WarehouseReceiptBillDetailBatchDto2> pcList2 = pcList.stream().filter(c -> c.getXh().equals(v.getXh())).collect(Collectors.toList());
|
||||
// pcList2.removeAll(Collections.singleton(null));
|
||||
// if (!pcList2.isEmpty()) {
|
||||
// wmsReceiptBillDetailBatchService.saveBatchs2(sid, wmsReceiptBillDetail.getSid(), pcList2);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.yxt.warehouse.biz.warehouseansbill;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.warehouse.biz.warehouseansbilldetail.WarehouseAnsBillDetail;
|
||||
import com.yxt.warehouse.biz.warehouseansbilldetail.WarehouseAnsBillDetailVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/8/5 9:43
|
||||
*/
|
||||
@Data
|
||||
public class WarehouseAndBillDetailVo {
|
||||
private String sid;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@ApiModelProperty("申请时间")
|
||||
private Date applicationTime;
|
||||
@ApiModelProperty("单据编号")
|
||||
private String billNo;
|
||||
@ApiModelProperty("业务类型key(采购入库、收货入库、其他入库)")
|
||||
private String busTypeKey;
|
||||
@ApiModelProperty("业务类型value(采购入库、收货入库、其他入库)")
|
||||
private String busTypeKeyValue;
|
||||
|
||||
@ApiModelProperty("货物状态(在途、部分收货、已收货、已取消)")
|
||||
private Integer billState;
|
||||
private String billStateValue;
|
||||
@ApiModelProperty("仓库sid")
|
||||
private String warehouseSid;
|
||||
@ApiModelProperty("仓库名")
|
||||
private String warehouseName;
|
||||
@ApiModelProperty("库区sid")
|
||||
private String warehouseRackSid;
|
||||
@ApiModelProperty("库区名")
|
||||
private String warehouseRackName;
|
||||
@ApiModelProperty("申请人")
|
||||
private String applicant;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@ApiModelProperty("预约时间")
|
||||
private Date reservationTime;
|
||||
@ApiModelProperty("供应商sid")
|
||||
private String supplierSid;
|
||||
@ApiModelProperty("供应商")
|
||||
private String supplierName;
|
||||
@ApiModelProperty("外部单号")
|
||||
private String sourceBillNo;
|
||||
@ApiModelProperty("联系人")
|
||||
private String contact;
|
||||
@ApiModelProperty("联系电话")
|
||||
private String mobile;
|
||||
@ApiModelProperty("使用组织sid")
|
||||
private String useOrgSid;
|
||||
@ApiModelProperty("创建组织sid")
|
||||
private String createOrgSid;
|
||||
private String remarks;
|
||||
@ApiModelProperty("承运商")
|
||||
private String carrier;
|
||||
@ApiModelProperty("运单号")
|
||||
private String waybillNumber;
|
||||
List<WarehouseAnsBillDetail> warehouseAnsBillDetails =new ArrayList<>();
|
||||
}
|
||||
@@ -21,6 +21,7 @@ public interface WarehouseAnsBillMapper extends BaseMapper<WarehouseAnsBill> {
|
||||
IPage<WarehouseAnsBillDetailVo> listPage(IPage<WarehouseAnsBillDetail> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseAnsBillDetail> qw);
|
||||
|
||||
IPage<WarehouseAnsBillVo> listPages(IPage<WarehouseAnsBill> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseAnsBill> qw);
|
||||
IPage<WarehouseAndBillDetailVo> listPages1(IPage<WarehouseAnsBill> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseAnsBill> qw);
|
||||
List<WarehouseAnsBillExcelVo> listExcel(@Param(Constants.WRAPPER) QueryWrapper<WarehouseAnsBill> qw);
|
||||
List<WarehouseAnsBillExcelVo> listExcel1(@Param(Constants.WRAPPER) QueryWrapper<WarehouseAnsBill> qw);
|
||||
List<WarehouseAnsBillExcelVo> listExcel2(@Param("sids")String[]sids);
|
||||
|
||||
@@ -33,7 +33,37 @@
|
||||
end as busTypeKeyValue
|
||||
from warehouse_ans_bill wab
|
||||
LEFT JOIN ss_user.sys_organization as s ON wab.useOrgSid = s.sid
|
||||
left join warehouse_ans_bill_detail wabd on wab.sid =wabd.billSid
|
||||
left join warehouse_ans_bill_detail wabd on wab.sid =wabd.sourceBillSid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
order by wab.id desc
|
||||
</select>
|
||||
<select id="listPages1" resultType="com.yxt.warehouse.biz.warehouseansbill.WarehouseAndBillDetailVo">
|
||||
select distinct wab.*,
|
||||
CASE
|
||||
wab.billState
|
||||
WHEN 0 THEN
|
||||
'在途'
|
||||
WHEN 1 THEN
|
||||
'部分收货'
|
||||
WHEN 2 THEN
|
||||
'收货完成'
|
||||
WHEN 3 THEN
|
||||
'关闭'
|
||||
END AS billStateValue,
|
||||
CASE wab.handoverStatus
|
||||
WHEN 1 THEN '未交接'
|
||||
WHEN 2 THEN '已交接'
|
||||
END AS handoverStatusValue,
|
||||
case wab.busTypeKey
|
||||
when 0 then '采购入库'
|
||||
when 1 then '验货入库'
|
||||
when 2 then '其他入库'
|
||||
end as busTypeKeyValue
|
||||
from warehouse_ans_bill wab
|
||||
LEFT JOIN ss_user.sys_organization as s ON wab.useOrgSid = s.sid
|
||||
left join warehouse_ans_bill_detail wabd on wab.sid =wabd.sourceBillSid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
|
||||
@@ -15,6 +15,8 @@ import com.yxt.warehouse.biz.operationrecord.OperationRecordDto;
|
||||
import com.yxt.warehouse.biz.operationrecord.OperationRecordService;
|
||||
import com.yxt.warehouse.biz.warehouseansbilldetail.*;
|
||||
import com.yxt.warehouse.biz.warehouseinfo.WarehouseInfoVo;
|
||||
import com.yxt.warehouse.biz.warehouseinventoryrecord.WarehouseInventoryRecord;
|
||||
import com.yxt.warehouse.biz.warehouseinventoryrecord.WarehouseInventoryRecordQuery;
|
||||
import com.yxt.warehouse.biz.warehouserack.WarehouseRack;
|
||||
import com.yxt.warehouse.biz.warehouserack.WarehouseRackService;
|
||||
import com.yxt.warehouse.utils.Rule;
|
||||
@@ -78,7 +80,6 @@ public class WarehouseAnsBillService extends MybatisBaseService<WarehouseAnsBill
|
||||
}
|
||||
return rb.success().setData(sid);
|
||||
}
|
||||
|
||||
public ResultBean<PagerVo<WarehouseAnsBillVo>> listPages(PagerQuery<WarehouseAnsBillQuery> pagerQuery) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
WarehouseAnsBillQuery query = pagerQuery.getParams();
|
||||
@@ -154,7 +155,69 @@ public class WarehouseAnsBillService extends MybatisBaseService<WarehouseAnsBill
|
||||
PagerVo<WarehouseAnsBillVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
public ResultBean<PagerVo<WarehouseAndBillDetailVo>> listPageAns(PagerQuery<WarehouseAnsBillQuery> pagerQuery) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
WarehouseAnsBillQuery query = pagerQuery.getParams();
|
||||
QueryWrapper<WarehouseAnsBill> qw = new QueryWrapper<>();
|
||||
//ToDo:添加查询条件
|
||||
if (query != null) {
|
||||
//
|
||||
// if (StringUtils.isNotBlank(query.getOrgLevelKey())) {
|
||||
// //数据权限ID(1全部、2本部门及子部门、3本部门、4个人)
|
||||
// String orgLevelKey=query.getOrgLevelKey();
|
||||
// String orgSidPath=query.getOrgPath();
|
||||
// int index=query.getIndex();
|
||||
// if ("1".equals(orgLevelKey)) {
|
||||
// orgSidPath = orgSidPath.substring(0, index);
|
||||
// qw.like("s.orgSidPath", orgSidPath);
|
||||
// } else if ("2".equals(orgLevelKey)) {
|
||||
// orgSidPath = orgSidPath.substring(0, index);
|
||||
// qw.like("s.orgSidPath", orgSidPath);
|
||||
// } else if ("3".equals(orgLevelKey)) {
|
||||
// orgSidPath = orgSidPath.substring(0, index);
|
||||
// qw.apply("s.orgSidPath like('"+orgSidPath+"')");
|
||||
// } else if ("4".equals(orgLevelKey)) {
|
||||
// qw.eq("wab.createBySid", query.getUserSid());
|
||||
// } else {
|
||||
// PagerVo<WarehouseAnsBillVo> p = new PagerVo<>();
|
||||
// return rb.success().setData(p);
|
||||
// }
|
||||
// } else {
|
||||
// PagerVo<WarehouseAnsBillVo> p = new PagerVo<>();
|
||||
// return rb.success().setData(p);
|
||||
// }
|
||||
|
||||
//申请日期开始时间-申请日期结束时间
|
||||
qw.apply(StringUtils.isNotBlank(query.getApplicationTimeStart()), "date_format (wab.createTime,'%Y-%m-%d') >= date_format('" + query.getApplicationTimeStart() + "','%Y-%m-%d')").
|
||||
apply(StringUtils.isNotBlank(query.getApplicationTimeEnd()), "date_format (wab.createTime,'%Y-%m-%d') <= date_format('" + query.getApplicationTimeEnd() + "','%Y-%m-%d')"
|
||||
);
|
||||
|
||||
//供应商
|
||||
if (StringUtils.isNotBlank(query.getSupplierName())) {
|
||||
qw.like("wab.supplierName", query.getSupplierName());
|
||||
}
|
||||
//单据状态
|
||||
if (StringUtils.isNotBlank(query.getBillState())) {
|
||||
qw.like("wab.billState", query.getBillState());
|
||||
}
|
||||
//外部编号
|
||||
if (StringUtils.isNotBlank(query.getSourceBillNo())) {
|
||||
qw.like("wab.sourceBillNo", query.getSourceBillNo());
|
||||
}
|
||||
if (StringUtils.isNotBlank(query.getGoodsSkuSid())) {
|
||||
qw.eq("wabd.goodsSkuSid", query.getGoodsSkuSid());
|
||||
}
|
||||
}
|
||||
IPage<WarehouseAnsBill> page = PagerUtil.queryToPage(pagerQuery);
|
||||
IPage<WarehouseAndBillDetailVo> pagging = baseMapper.listPages1(page, qw);
|
||||
for (WarehouseAndBillDetailVo record : pagging.getRecords()) {
|
||||
List<WarehouseAnsBillDetail> warehouseAnsBillDetails=WarehouseAnsBillDetailService.list(new QueryWrapper<WarehouseAnsBillDetail>().eq("sourceBillSid",record.getSid()));
|
||||
record.setWarehouseAnsBillDetails(warehouseAnsBillDetails);
|
||||
}
|
||||
PagerVo<WarehouseAnsBillVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
public ResultBean<WarehouseAnsDetailsVo> details(String sid) {
|
||||
ResultBean<WarehouseAnsDetailsVo> rb = ResultBean.fireFail();
|
||||
WarehouseAnsDetailsVo WarehouseAnsDetailsVo = baseMapper.details(sid);
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.math.BigDecimal;
|
||||
public class WarehouseAnsBillDetail extends BaseEntity {
|
||||
|
||||
@ApiModelProperty("来源单sid")
|
||||
private String billSid;
|
||||
private String sourceBillSid;
|
||||
@ApiModelProperty("图示")
|
||||
private String illustration;
|
||||
@ApiModelProperty("商品Skusid")
|
||||
|
||||
@@ -27,7 +27,7 @@ public class WarehouseAnsBillDetailService extends MybatisBaseService<WarehouseA
|
||||
StorageAnsBillDetailList.forEach(v->{
|
||||
WarehouseAnsBillDetail WarehouseAnsBillDetail = new WarehouseAnsBillDetail();
|
||||
BeanUtil.copyProperties(v, WarehouseAnsBillDetail,"sid");
|
||||
WarehouseAnsBillDetail.setBillSid(sid);
|
||||
WarehouseAnsBillDetail.setSourceBillSid(sid);
|
||||
baseMapper.insert(WarehouseAnsBillDetail);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -70,6 +70,9 @@ public class WarehouseAreaService extends MybatisBaseService<WarehouseAreaMapper
|
||||
qw.eq("c.sid", query.getAreaTypeSid());
|
||||
}
|
||||
qw.ne("a.isDelete", "1");
|
||||
qw.orderByAsc("warehouseName");
|
||||
qw.orderByAsc("areaTypeName");
|
||||
qw.orderByAsc("areaCode");
|
||||
IPage<WarehouseArea> page = PagerUtil.queryToPage(pq);
|
||||
IPage<WarehouseAreaVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<WarehouseAreaVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
|
||||
@@ -70,6 +70,9 @@ public class WarehouseRackService extends MybatisBaseService<WarehouseRackMapper
|
||||
qw.eq("c.sid", query.getWarehouseSid());
|
||||
}
|
||||
qw.ne("a.isDelete", "1");
|
||||
qw.orderByAsc("warehouseName");
|
||||
qw.orderByAsc("locationName");
|
||||
qw.orderByAsc("rackCode");
|
||||
IPage<WarehouseRack> page = PagerUtil.queryToPage(pq);
|
||||
IPage<WarehouseRackVo> pagging = baseMapper.listPage(page,qw);
|
||||
PagerVo<WarehouseRackVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
|
||||
Reference in New Issue
Block a user