8/7
This commit is contained in:
@@ -41,8 +41,8 @@ public class PurchaseInventoryBillRest {
|
||||
|
||||
|
||||
@ApiOperation("采购入库单据编辑初始化/详情")
|
||||
@GetMapping("/selectByBillSid")
|
||||
ResultBean<PurchaseInventoryBillInitVo> selectByBillSid(@RequestParam("sid") String sid) {
|
||||
@GetMapping("/selectByBillSid/{sid}")
|
||||
ResultBean<PurchaseInventoryBillInitVo> selectByBillSid(@PathVariable("sid") String sid) {
|
||||
return purchaseInventoryBillService.selectByBillSid(sid);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ public class PurchaseInventoryBillDto2 {
|
||||
private String remarks;
|
||||
@ApiModelProperty("商品列表")
|
||||
private List<PurchaseInventoryBillDetailDto2> list = new ArrayList<>();
|
||||
private String userSid;
|
||||
// @ApiModelProperty("批次列表")
|
||||
// private List<PurchaseInventoryBillDetailBatchDto2> pcList = new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ public class PurchaseInventoryBillQuery implements Query {
|
||||
private String waybillNumber;
|
||||
@ApiModelProperty("商品sid")
|
||||
private String goodsSkuSid;
|
||||
@ApiModelProperty("货主")
|
||||
private String shipper;
|
||||
@ApiModelProperty("供应商")
|
||||
private String supplierName;
|
||||
@ApiModelProperty("菜单路由")
|
||||
private String menuUrl;
|
||||
@ApiModelProperty("组织全路径sid")
|
||||
|
||||
@@ -11,6 +11,8 @@ import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.warehouse.biz.operationrecord.OperationRecordDto;
|
||||
import com.yxt.warehouse.biz.operationrecord.OperationRecordService;
|
||||
import com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetailDto2;
|
||||
import com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetailService;
|
||||
import com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetailVo;
|
||||
@@ -46,7 +48,7 @@ public class PurchaseInventoryBillService extends MybatisBaseService<PurchaseInv
|
||||
@Autowired
|
||||
private WarehouseAnsBillDetailService wmsAnsBillDetailService;
|
||||
@Autowired
|
||||
private WarehouseReceiptBillDetailBatchService wmsReceiptBillDetailBatchService;
|
||||
OperationRecordService operationRecordService;;
|
||||
@Autowired
|
||||
private WarehouseReceiptBillDetailMapper wmsReceiptBillDetailMapper;
|
||||
@Autowired
|
||||
@@ -84,8 +86,8 @@ public class PurchaseInventoryBillService extends MybatisBaseService<PurchaseInv
|
||||
if (StringUtils.isNotBlank(query.getGoodsSkuSid())) {
|
||||
qw.like("wrb.goodsSkuSid", query.getGoodsSkuSid());
|
||||
}
|
||||
if (StringUtils.isNotBlank(query.getShipper())) {
|
||||
qw.like("wrb.shipper", query.getShipper());
|
||||
if (StringUtils.isNotBlank(query.getSupplierName())) {
|
||||
qw.like("wrb.supplierName", query.getSupplierName());
|
||||
}
|
||||
|
||||
IPage<PurchaseInventoryBill> page = PagerUtil.queryToPage(pq);
|
||||
@@ -109,6 +111,12 @@ public class PurchaseInventoryBillService extends MybatisBaseService<PurchaseInv
|
||||
// purchaseInventoryBillDetailService.saveOrUpdateDetailsList2(sid, list, pcList);
|
||||
purchaseInventoryBillDetailService.saveOrUpdateDetailsList2(sid, list);
|
||||
}
|
||||
OperationRecordDto dto1=new OperationRecordDto();
|
||||
dto1.setBillSid(sid);
|
||||
dto1.setUserSid(dto.getUserSid());
|
||||
dto1.setCreateTime(new Date());
|
||||
dto1.setContent("生成入库单");
|
||||
operationRecordService.save(dto1);
|
||||
baseMapper.insert(wmsReceiptBill);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -36,17 +36,17 @@ public class PurchaseInventoryBillDetail extends BaseEntity {
|
||||
@ApiModelProperty("单位sid")
|
||||
private String unitSid;
|
||||
@ApiModelProperty("单位名称")
|
||||
private BigDecimal unitName;
|
||||
private String unitName;
|
||||
@ApiModelProperty("成本单价")
|
||||
private BigDecimal price;
|
||||
private double price;
|
||||
@ApiModelProperty("总价")
|
||||
private String totalPrice;
|
||||
private double totalPrice;
|
||||
@ApiModelProperty("数量")
|
||||
private Date count;
|
||||
private double count;
|
||||
@ApiModelProperty("辅助单位")
|
||||
private Integer auxiliaryUnits;
|
||||
private String auxiliaryUnits;
|
||||
@ApiModelProperty("序列号")
|
||||
private Integer serialNumber;
|
||||
private String serialNumber;
|
||||
@ApiModelProperty("生产批次号")
|
||||
private String batchNumber;
|
||||
|
||||
|
||||
@@ -36,17 +36,17 @@ public class PurchaseInventoryBillDetailDto2 {
|
||||
@ApiModelProperty("单位sid")
|
||||
private String unitSid;
|
||||
@ApiModelProperty("单位名称")
|
||||
private BigDecimal unitName;
|
||||
private String unitName;
|
||||
@ApiModelProperty("成本单价")
|
||||
private BigDecimal price;
|
||||
private double price;
|
||||
@ApiModelProperty("总价")
|
||||
private String totalPrice;
|
||||
private double totalPrice;
|
||||
@ApiModelProperty("数量")
|
||||
private Date count;
|
||||
private double count;
|
||||
@ApiModelProperty("辅助单位")
|
||||
private Integer auxiliaryUnits;
|
||||
private String auxiliaryUnits;
|
||||
@ApiModelProperty("序列号")
|
||||
private Integer serialNumber;
|
||||
private String serialNumber;
|
||||
@ApiModelProperty("生产批次号")
|
||||
private String batchNumber;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<mapper namespace="com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetailMapper">
|
||||
<delete id="deleteByBillSid">
|
||||
delete
|
||||
from pruchase_inventory_bill_detail
|
||||
where billSid = #{sid}
|
||||
from purchase_inventory_bill_detail
|
||||
where sourceBillSid = #{sid}
|
||||
</delete>
|
||||
|
||||
<select id="getDetailsInit" resultType="com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetailVo">
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<select id="selectByBillSid" resultType="com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetail">
|
||||
select *
|
||||
from pruchase_inventory_bill_detail where billSid = #{sid}
|
||||
from purchase_inventory_bill_detail where billSid = #{sid}
|
||||
<if test="sidList != null and sidList.size() != 0">
|
||||
and sid not in
|
||||
<foreach collection="sidList" item="item" open="(" close=")" separator=",">
|
||||
@@ -26,7 +26,7 @@
|
||||
<select id="listPage" resultType="com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetailVo">
|
||||
select
|
||||
a.*
|
||||
from pruchase_inventory_bill_detail a
|
||||
from purchase_inventory_bill_detail a
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
@@ -34,7 +34,7 @@
|
||||
<select id="initialization" resultType="com.yxt.warehouse.biz.purchaseinventorybilldetail.PurchaseInventoryBillDetailVo">
|
||||
select
|
||||
a.*
|
||||
from pruchase_inventory_bill_detail a
|
||||
from purchase_inventory_bill_detail a
|
||||
where a.sid =#{sid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -10,13 +10,16 @@ import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.warehouse.biz.operationrecord.OperationRecordDto;
|
||||
import com.yxt.warehouse.biz.warehousereceiptbilldetailbatch.WarehouseReceiptBillDetailBatchDto2;
|
||||
import com.yxt.warehouse.biz.warehousereceiptbilldetailbatch.WarehouseReceiptBillDetailBatchService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -36,7 +39,8 @@ public class PurchaseInventoryBillDetailService extends MybatisBaseService<Purch
|
||||
list.forEach(v -> {
|
||||
PurchaseInventoryBillDetail wmsReceiptBillDetail = new PurchaseInventoryBillDetail();
|
||||
BeanUtil.copyProperties(v, wmsReceiptBillDetail, "sid");
|
||||
// wmsReceiptBillDetail.setBillSid(sid);
|
||||
wmsReceiptBillDetail.setSourceBillSid(sid);
|
||||
wmsReceiptBillDetail.setSid(UUID.randomUUID().toString());
|
||||
baseMapper.insert(wmsReceiptBillDetail);
|
||||
// wmsReceiptBillDetailBatchService.deleteByDetails(sid);
|
||||
// pcList.removeAll(Collections.singleton(null));
|
||||
@@ -47,8 +51,6 @@ public class PurchaseInventoryBillDetailService extends MybatisBaseService<Purch
|
||||
// wmsReceiptBillDetailBatchService.saveBatchs2(sid, wmsReceiptBillDetail.getSid(), pcList2);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -62,5 +62,6 @@ public class WarehouseAndBillDetailVo {
|
||||
private String carrier;
|
||||
@ApiModelProperty("运单号")
|
||||
private String waybillNumber;
|
||||
private boolean check=false;
|
||||
List<WarehouseAnsBillDetail> warehouseAnsBillDetails =new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
|
||||
<select id="listPages" resultType="com.yxt.warehouse.biz.warehouseansbill.WarehouseAnsBillVo">
|
||||
select distinct wab.*,
|
||||
CASE
|
||||
wab.billState
|
||||
CASE wab.billState
|
||||
WHEN 0 THEN
|
||||
'在途'
|
||||
WHEN 1 THEN
|
||||
|
||||
@@ -27,6 +27,7 @@ public class WarehouseAnsBillQuery implements Query {
|
||||
private String billState;
|
||||
@ApiModelProperty("供应商")
|
||||
private String supplierName;
|
||||
private String supplierSid;
|
||||
@ApiModelProperty("运单号")
|
||||
private String waybillNumber;
|
||||
@ApiModelProperty("承运商")
|
||||
|
||||
@@ -161,31 +161,31 @@ public class WarehouseAnsBillService extends MybatisBaseService<WarehouseAnsBill
|
||||
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);
|
||||
// }
|
||||
|
||||
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')").
|
||||
@@ -193,8 +193,8 @@ public class WarehouseAnsBillService extends MybatisBaseService<WarehouseAnsBill
|
||||
);
|
||||
|
||||
//供应商
|
||||
if (StringUtils.isNotBlank(query.getSupplierName())) {
|
||||
qw.like("wab.supplierName", query.getSupplierName());
|
||||
if (StringUtils.isNotBlank(query.getSupplierSid())) {
|
||||
qw.eq("wab.supplierSid", query.getSupplierSid());
|
||||
}
|
||||
//单据状态
|
||||
if (StringUtils.isNotBlank(query.getBillState())) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.yxt.warehouse.biz.warehouseansbilldetail;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -34,4 +35,6 @@ public class WarehouseAnsBillDetail extends BaseEntity {
|
||||
private Integer waitInCount;
|
||||
@ApiModelProperty("实际入库数量-根据收货单计算")
|
||||
private Integer actualInCount;
|
||||
@TableField(exist = false)
|
||||
private boolean check=false;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<select id="selectByBillSid" resultType="com.yxt.warehouse.biz.warehouseansbilldetail.WarehouseAnsListDetailsVo">
|
||||
select wd.*
|
||||
from warehouse_ans_bill_detail wd
|
||||
where billSid = #{sid}
|
||||
where sourceBillSid = #{sid}
|
||||
</select>
|
||||
|
||||
<select id="listPage" resultType="com.yxt.warehouse.biz.warehouseansbilldetail.WarehouseAnsBillDetailVo">
|
||||
|
||||
@@ -97,6 +97,10 @@ public class WarehouseAreaService extends MybatisBaseService<WarehouseAreaMapper
|
||||
wmsWarehouseArea.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsWarehouseArea);
|
||||
} else {
|
||||
List<WarehouseArea> warehouseAreas= baseMapper.selectList(new QueryWrapper<WarehouseArea>().eq("areaCode",dto.getAreaCode()));
|
||||
if(warehouseAreas.size()>0){
|
||||
return rb.setMsg("库区编码重复");
|
||||
}
|
||||
WarehouseArea wmsWarehouseArea = new WarehouseArea();
|
||||
sid = wmsWarehouseArea.getSid();
|
||||
BeanUtil.copyProperties(dto, wmsWarehouseArea, "id", "sid");
|
||||
|
||||
Reference in New Issue
Block a user