Browse Source

盘点增加商品字段,修改盘盈选择商品和保存完成

调试移动端盘盈修改内容完成
盘盈入库模块开发完成
PC端盘盈入库调试完成
采购优化
zhanglei
God 10 months ago
parent
commit
35f38dfbd4
  1. 5
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventorycheckbill/Extra.java
  2. 6
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventorycheckbill/WmsInventoryCheckbillGoodsPyDto.java
  3. 14
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventorycheckbill/WmsInventoryCheckbillService.java
  4. 16
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/basegoodssku/GoodsDeptVo.java
  5. 11
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.xml
  6. 16
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsDeptVo.java
  7. 2
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuVo.java
  8. 4
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillDetailsVo.java
  9. 4
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillService.java
  10. 23
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetail.java
  11. 22
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDetailsVo.java
  12. 22
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDto.java
  13. 5
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBill.java
  14. 7
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDetailsVo.java
  15. 5
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDto.java
  16. 2
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillService.java
  17. 5
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetail.java
  18. 5
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDetailsVo.java
  19. 5
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDto.java
  20. 21
      yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryProfitinRest.java
  21. 10
      yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRest.java
  22. 40
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillUseOrgSidQuery.java
  23. 60
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillUseOrgSidVo.java
  24. 2
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.java
  25. 20
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml
  26. 40
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryService.java
  27. 3
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java
  28. 58
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml
  29. 15
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillService.java
  30. 20
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetail.java
  31. 20
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDetailsVo.java
  32. 20
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDto.java
  33. 7
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java
  34. 27
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml
  35. 13
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java
  36. 6
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/app/WmsInventoryCheckbillGoodsPyDto.java
  37. 12
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitin/WmsInventoryProfitinDetailsVo.java
  38. 8
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitin/WmsInventoryProfitinDto.java
  39. 23
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitin/WmsInventoryProfitinService.java
  40. 22
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetail.java
  41. 46
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailDetailsVo.java
  42. 39
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailDto.java
  43. 1
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailMapper.java
  44. 23
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailMapper.xml
  45. 8
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailService.java
  46. 22
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitoutdetail/WmsInventoryProfitoutDetail.java
  47. 22
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitoutdetail/WmsInventoryProfitoutDetailDetailsVo.java
  48. 22
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitoutdetail/WmsInventoryProfitoutDetailDto.java

5
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventorycheckbill/Extra.java

@ -7,4 +7,9 @@ public class Extra {
private String unit;
private String goodsSkuCode;
private String goodsSkuOwnSpec;
private String goodsSkuSid;
private String goodsSpuName;
private String manufacturerName;
private String manufacturerSid;
}

6
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventorycheckbill/WmsInventoryCheckbillGoodsPyDto.java

@ -61,4 +61,10 @@ public class WmsInventoryCheckbillGoodsPyDto implements Dto {
* 单位
*/
private String unit;
private String goodsSkuSid;
private String goodsSpuName;
private String goodsSkuOwnSpec;
private String manufacturerSid;
private String manufacturerName;
}

14
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventorycheckbill/WmsInventoryCheckbillService.java

@ -104,7 +104,11 @@ public class WmsInventoryCheckbillService {
handleBean.setGoodsName(record.getGoodsSkuTitle());
handleBean.setGoodsSkuCode(record.getGoodsSkuCode());
handleBean.setLockNum(record.getBookCount().toString());
handleBean.setNum(record.getBookCount().toString());
if (record.getRealCount() == null){
handleBean.setNum(record.getBookCount().toString());
}else {
handleBean.setNum(record.getRealCount().toString());
}
handleBean.setRemarks(record.getRemarks());
handleBean.setSid(record.getSid());
handleBean.setUnit(record.getUnit());
@ -133,10 +137,16 @@ public class WmsInventoryCheckbillService {
List<GoodsDeptVo> goodsDeptVos = baseGoodsSkuFeign.selectGoods(name, orgPath).getData();
for (GoodsDeptVo goodsDeptVo : goodsDeptVos) {
AppInventoryCheckbill appInventoryCheckbill = new AppInventoryCheckbill();
appInventoryCheckbill.setDictValue(goodsDeptVo.getGoodsName());
appInventoryCheckbill.setId(goodsDeptVo.getGoodsSpuSid());
appInventoryCheckbill.setDictValue(goodsDeptVo.getGoodsSkuTitle());
Extra extra = new Extra();
extra.setGoodsSkuCode(goodsDeptVo.getGoodsSkuCode());
extra.setUnit(goodsDeptVo.getUnit());
extra.setGoodsSkuOwnSpec(goodsDeptVo.getGoodsSkuOwnSpec());
extra.setGoodsSkuSid(goodsDeptVo.getGoodsSkuSid());
extra.setGoodsSpuName(goodsDeptVo.getGoodsSpuName());
extra.setManufacturerSid(goodsDeptVo.getManufacturerSid());
extra.setManufacturerName(goodsDeptVo.getManufacturerName());
appInventoryCheckbill.setExtra(extra);
appInventoryCheckbills.add(appInventoryCheckbill);
}

16
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/basegoodssku/GoodsDeptVo.java

@ -11,10 +11,22 @@ import lombok.Data;
@Data
public class GoodsDeptVo {
@ApiModelProperty("商品名称")
private String goodsName;
@ApiModelProperty("商品spuSid")
private String goodsSpuSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsSkuTitle;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("图号")
private String goodsSkuCode;
@ApiModelProperty("规格")
private String goodsSkuOwnSpec;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
}

11
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/BaseGoodsSkuMapper.xml

@ -67,6 +67,7 @@
sku.goodsSkuCode,
sku.indexes,
spu.goodsUnitName,
spu.manufacturerSid,
spu.manufacturerName
from base_goods_sku sku
left join base_goods_spu spu on spu.sid = sku.goodsSpuSid
@ -76,9 +77,15 @@
</select>
<select id="selectGoods" resultType="com.yxt.base.biz.base.basegoodssku.GoodsDeptVo">
select sku.title AS goodsName,
select spu.sid AS goodsSpuSid,
spu.goodsName AS goodsSpuName,
sku.sid AS goodsSkuSid,
sku.title AS goodsSkuTitle,
sku.goodsSkuCode,
spu.goodsUnitName AS unit
spu.goodsUnitName AS unit,
sku.indexes AS goodsSkuOwnSpec,
spu.manufacturerSid,
spu.manufacturerName
from base_goods_sku sku
left join base_goods_spu spu on spu.sid = sku.goodsSpuSid
where spu.useOrgSid = #{useOrgSid}

16
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsDeptVo.java

@ -11,10 +11,22 @@ import lombok.Data;
@Data
public class GoodsDeptVo {
@ApiModelProperty("商品名称")
private String goodsName;
@ApiModelProperty("商品spuSid")
private String goodsSpuSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsSkuTitle;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("图号")
private String goodsSkuCode;
@ApiModelProperty("规格")
private String goodsSkuOwnSpec;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
}

2
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodssku/GoodsSkuVo.java

@ -23,6 +23,8 @@ public class GoodsSkuVo {
private String indexes;
@ApiModelProperty("单位")
private String goodsUnitName;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;

4
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillDetailsVo.java

@ -128,8 +128,4 @@ public class PmsPurchasebackBillDetailsVo implements Vo {
@ApiModelProperty("采购退货单明细")
private List<PmsPurchasebackDetailDetailsVo> pmsPurchasebackDetailList;
/*单独查询*/
@ApiModelProperty("初始化采购单信息")
private PmsPurchaseChoiceBillDetailsVo pmsPurchaseChoiceBillDetailsVo;
}

4
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackbill/PmsPurchasebackBillService.java

@ -260,10 +260,6 @@ public class PmsPurchasebackBillService extends MybatisBaseService<PmsPurchaseba
pmsPurchasebackDetailDetailsVo.setAmount(pmsPurchasebackDetailDetailsVo.getCount().multiply(pmsPurchasebackDetailDetailsVo.getTaxPrice()));
}
vo.setPmsPurchasebackDetailList(pmsPurchasebackDetailDetailsVos);
PmsPurchaseBill pmsPurchaseBill = pmsPurchaseBillService.fetchBySid(entity.getSourceBillSid());
PmsPurchaseChoiceBillDetailsVo pmsPurchaseChoiceBillDetailsVo = new PmsPurchaseChoiceBillDetailsVo();
BeanUtil.copyProperties(pmsPurchaseBill,pmsPurchaseChoiceBillDetailsVo);
vo.setPmsPurchaseChoiceBillDetailsVo(pmsPurchaseChoiceBillDetailsVo);
return vo;
}

23
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetail.java

@ -74,6 +74,29 @@ public class PmsPurchasebackDetail extends BaseEntity {
private String warehouseSid; // 仓库sid
@ApiModelProperty("仓库名称")
private String warehouseName; // 仓库名称
@ApiModelProperty("库区sid")
private String warehouseAreaSid;
@ApiModelProperty("库区名称")
private String warehouseArea;
@ApiModelProperty("库位sid")
private String warehouseRackSid;
@ApiModelProperty("库位编码")
private String warehouseRackCode;
@ApiModelProperty("采购订单sid")
private String manufactorBillSid;
@ApiModelProperty("厂家订单号")
private String manufactorBillNo;
@ApiModelProperty("供应商sid")
private String supplierSid;
@ApiModelProperty("供应商名称")
private String supplierName;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("已退数量")
private BigDecimal returnedCount; // 已退数量
@ApiModelProperty("退货数量")

22
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDetailsVo.java

@ -75,6 +75,28 @@ public class PmsPurchasebackDetailDetailsVo implements Vo {
private String warehouseSid; // 仓库sid
@ApiModelProperty("仓库名称")
private String warehouseName; // 仓库名称
@ApiModelProperty("库区sid")
private String warehouseAreaSid;
@ApiModelProperty("库区名称")
private String warehouseArea;
@ApiModelProperty("库位sid")
private String warehouseRackSid;
@ApiModelProperty("库位编码")
private String warehouseRackCode;
@ApiModelProperty("采购订单sid")
private String manufactorBillSid;
@ApiModelProperty("厂家订单号")
private String manufactorBillNo;
@ApiModelProperty("供应商sid")
private String supplierSid;
@ApiModelProperty("供应商名称")
private String supplierName;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("已退数量")
private BigDecimal returnedCount; // 已退数量
@ApiModelProperty("退货数量")

22
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebackdetail/PmsPurchasebackDetailDto.java

@ -75,6 +75,28 @@ public class PmsPurchasebackDetailDto implements Dto {
private String warehouseSid; // 仓库sid
@ApiModelProperty("仓库名称")
private String warehouseName; // 仓库名称
@ApiModelProperty("库区sid")
private String warehouseAreaSid;
@ApiModelProperty("库区名称")
private String warehouseArea;
@ApiModelProperty("库位sid")
private String warehouseRackSid;
@ApiModelProperty("库位编码")
private String warehouseRackCode;
@ApiModelProperty("采购订单sid")
private String manufactorBillSid;
@ApiModelProperty("厂家订单号")
private String manufactorBillNo;
@ApiModelProperty("供应商sid")
private String supplierSid;
@ApiModelProperty("供应商名称")
private String supplierName;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("已退数量")
private BigDecimal returnedCount; // 已退数量
@ApiModelProperty("退货数量")

5
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBill.java

@ -151,4 +151,9 @@ public class PmsPurchaseBill extends BaseEntity {
@ApiModelProperty("创建组织名称")
private String createOrgName;
@ApiModelProperty("采购人")
private String purchasingAgent;
@ApiModelProperty("采购人sid")
private String purchasingAgentSid;
}

7
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDetailsVo.java

@ -167,6 +167,13 @@ public class PmsPurchaseBillDetailsVo implements Vo {
private String createOrgSid;
@ApiModelProperty("创建组织名称")
private String createOrgName;
@ApiModelProperty("组织全路径")
private String orgPath;
@ApiModelProperty("采购人")
private String purchasingAgent;
@ApiModelProperty("采购人sid")
private String purchasingAgentSid;
@ApiModelProperty("付款信息")
private PmsPurchasePayDetailsVo purchasePay;

5
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillDto.java

@ -158,6 +158,11 @@ public class PmsPurchaseBillDto implements Dto {
@ApiModelProperty("创建组织名称")
private String createOrgName;
@ApiModelProperty("采购人")
private String purchasingAgent;
@ApiModelProperty("采购人sid")
private String purchasingAgentSid;
@ApiModelProperty("付款信息")
private PmsPurchasePayDto purchasePay;
@ApiModelProperty("发票信息")

2
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillService.java

@ -345,8 +345,10 @@ public class PmsPurchaseBillService extends MybatisBaseService<PmsPurchaseBillMa
public PmsPurchaseBillDetailsVo fetchDetailsVoBySid(String sid) {
PmsPurchaseBill entity = fetchBySid(sid);
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(entity.getDeptSid()).getData();
PmsPurchaseBillDetailsVo vo = new PmsPurchaseBillDetailsVo();
BeanUtil.copyProperties(entity, vo);
vo.setOrgPath(sysOrganizationVo.getOrgSidPath());
List<PmsPurchaseBillDetailDetailsVo> pmsPurchaseBillDetailDetailsVos = pmsPurchaseBillDetailService.selByMainSid(sid);
vo.setPmsPurchaseBillDetailList(pmsPurchaseBillDetailDetailsVos);
PmsPurchasePayDetailsVo pmsPurchasePayDetailsVo = pmsPurchasePayService.selByMainSid(sid);

5
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetail.java

@ -86,4 +86,9 @@ public class PmsPurchaseBillDetail extends BaseEntity {
private BigDecimal taxPrice; // 含税价
@ApiModelProperty("采购金额")
private BigDecimal amount; // 采购金额
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
}

5
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDetailsVo.java

@ -88,6 +88,11 @@ public class PmsPurchaseBillDetailDetailsVo implements Vo {
@ApiModelProperty("采购金额")
private BigDecimal amount; // 采购金额
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("已退数量")
private BigDecimal returnedCount;
}

5
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebilldetail/PmsPurchaseBillDetailDto.java

@ -85,4 +85,9 @@ public class PmsPurchaseBillDetailDto implements Dto {
private BigDecimal taxPrice; // 含税价
@ApiModelProperty("采购金额")
private BigDecimal amount; // 采购金额
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
}

21
yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryProfitinRest.java

@ -32,6 +32,7 @@ import com.yxt.common.core.vo.PagerVo;
import com.yxt.wms.biz.inventory.wmsinventorycheckbill.flowable.*;
import com.yxt.wms.biz.inventory.wmsinventoryprofitin.*;
import com.yxt.wms.biz.inventory.wmsinventoryprofitin.flowable.*;
import com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailDto;
import com.yxt.wms.feign.flowable.flow.BusinessVariables;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -64,13 +65,13 @@ public class WmsInventoryProfitinRest {
return wmsInventoryProfitinService.saveOrUpdateDto(dto);
}
@ApiOperation("根据sid批量删除")
@ApiOperation("删除盘盈入库")
@DeleteMapping("/delBySids")
public ResultBean delBySids(@RequestBody String[] sids){
return wmsInventoryProfitinService.delAll(sids);
}
@ApiOperation("根据SID获取一条记录")
@ApiOperation("编辑回显盘盈入库")
@GetMapping("/fetchDetailsBySid/{sid}")
public ResultBean<WmsInventoryProfitinDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){
ResultBean rb = ResultBean.fireFail();
@ -78,12 +79,20 @@ public class WmsInventoryProfitinRest {
return rb.success().setData(vo);
}
@ApiOperation("根据部门sid获取盘点单号")
@ApiOperation("根据部门sid获取盘盈盘点单号")
@PostMapping("/getSourceBillNoBySid")
public ResultBean<InventoryBillVo> getSourceBillNoBySid(@RequestParam("deptSid") String deptSid){
public ResultBean<List<InventoryBillVo>> getSourceBillNoBySid(@RequestParam("deptSid") String deptSid){
ResultBean rb = ResultBean.fireFail();
InventoryBillVo vo = wmsInventoryProfitinService.getSourceBillNoBySid(deptSid);
return rb.success().setData(vo);
List<InventoryBillVo> voList = wmsInventoryProfitinService.getSourceBillNoBySid(deptSid);
return rb.success().setData(voList);
}
@ApiOperation("根据盘点单sid获取盘盈商品列表")
@GetMapping("/sourceBillBySid/{sid}")
public ResultBean<List<WmsInventoryProfitinDetailDto>> sourceBillBySid(@PathVariable("sid") String sid){
ResultBean rb = ResultBean.fireFail();
List<WmsInventoryProfitinDetailDto> voList = wmsInventoryProfitinService.sourceBillBySid(sid);
return rb.success().setData(voList);
}
@ApiOperation("提交")

10
yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryRest.java

@ -9,6 +9,8 @@ import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryDto;
import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryQuery;
import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryService;
import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryVo;
import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryBillUseOrgSidQuery;
import com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryBillUseOrgSidVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@ -194,4 +196,12 @@ public class WmsInventoryRest {
return wmsInventoryService.fetchEntityBySid(sid);
}
@ApiOperation("根据部门sid选择库存商品")
@PostMapping("/selInvenGoodsByUseOrgSid")
ResultBean<PagerVo<WmsInventoryBillUseOrgSidVo>> selInvenGoodsByUseOrgSid(@RequestBody PagerQuery<WmsInventoryBillUseOrgSidQuery> pagerQuery) {
ResultBean<PagerVo<WmsInventoryBillUseOrgSidVo>> rb = ResultBean.fireFail();
PagerVo<WmsInventoryBillUseOrgSidVo> pv = wmsInventoryService.selInvenGoodsByUseOrgSid(pagerQuery);
return rb.success().setData(pv);
}
}

40
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillUseOrgSidQuery.java

@ -0,0 +1,40 @@
package com.yxt.wms.biz.inventory.wmsinventory;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.query.Query;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author wangpengfei
* @date 2024/2/26 13:37
*/
@Data
public class WmsInventoryBillUseOrgSidQuery implements Query {
@ApiModelProperty("商品名称")
private String goodsName;
@ApiModelProperty("图号")
private String goodsSkuCode;
@ApiModelProperty("仓库名称")
private String warehouseName;
@ApiModelProperty("库区名称")
private String warehouseArea;
@ApiModelProperty("库位编码")
private String warehouseRackCode;
@ApiModelProperty("供应商名称")
private String supplierName;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("厂家订单号")
private String manufactorBillNo;
@ApiModelProperty("入库开始日期")
private String inDateStart;
@ApiModelProperty("入库结束日期")
private String inDateEnd;
@ApiModelProperty("部门sid")
private String useOrgSid;
}

60
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryBillUseOrgSidVo.java

@ -0,0 +1,60 @@
package com.yxt.wms.biz.inventory.wmsinventory;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author wangpengfei
* @date 2024/2/26 13:37
*/
@Data
public class WmsInventoryBillUseOrgSidVo implements Vo {
@ApiModelProperty("商品ID")
private String goodsID;
@ApiModelProperty("商品基础信息sid")
private String goodSpuSid;
@ApiModelProperty("商品名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品Sku名称")
private String goodsSkuTitle;
@ApiModelProperty("商品编码(图号)")
private String goodsSkuCode;
@ApiModelProperty("规格型号")
private String goodsSkuOwnSpec;
@ApiModelProperty("计量单位")
private String unit;
@ApiModelProperty("现有量")
private BigDecimal count;
@ApiModelProperty("入库单价")
private BigDecimal cost;
@ApiModelProperty("仓库sid")
private String warehouseSid;
@ApiModelProperty("仓库名称")
private String warehouseName;
@ApiModelProperty("库区sid")
private String warehouseAreaSid;
@ApiModelProperty("库区名称")
private String warehouseArea;
@ApiModelProperty("库位sid")
private String warehouseRackSid;
@ApiModelProperty("库位编码")
private String warehouseRackCode;
@ApiModelProperty("厂家订单号")
private String manufactorBillNo;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("供应商sid")
private String supplierSid;
@ApiModelProperty("供应商名称")
private String supplierName;
}

2
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.java

@ -66,4 +66,6 @@ public interface WmsInventoryMapper extends BaseMapper<WmsInventory> {
List<WmsInventory> selByDeptSid(String deptSid);
List<WmsInventory> selByDeptSidAndRackSid(@Param("deptSid") String deptSid,@Param("rackSids") List<String> rackSids);
IPage<WmsInventoryBillUseOrgSidVo> selInvenGoodsByUseOrgSid(IPage<WmsInventory> page,@Param(Constants.WRAPPER) QueryWrapper<WmsInventory> qw);
}

20
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml

@ -366,4 +366,24 @@
#{rackSid}
</foreach>
</select>
<select id="selInvenGoodsByUseOrgSid"
resultType="com.yxt.wms.biz.inventory.wmsinventory.WmsInventoryBillUseOrgSidVo">
SELECT
w.*,
p.supplierSid,
p.supplierName,
wa.sid AS warehouseAreaSid,
wa.`areaName` AS warehouseArea
FROM wms_inventory w
LEFT JOIN yxt_pms.pms_purchase_bill p
ON w.manufactorBillNo = p.manufacturersOrderNumber
LEFT JOIN wms_warehouse_rack wr
ON w.`warehouseRackSid` = wr.`sid`
LEFT JOIN wms_warehouse_area wa
ON wr.`locationSid` = wa.`sid`
<where>
${ew.sqlSegment}
</where>
</select>
</mapper>

40
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryService.java

@ -566,6 +566,44 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
}
public List<WmsInventory> selByDeptSidAndRackSid(String deptSid, List<String> rackSids) {
return baseMapper.selByDeptSidAndRackSid(deptSid,rackSids);
return baseMapper.selByDeptSidAndRackSid(deptSid, rackSids);
}
public PagerVo<WmsInventoryBillUseOrgSidVo> selInvenGoodsByUseOrgSid(PagerQuery<WmsInventoryBillUseOrgSidQuery> pq) {
WmsInventoryBillUseOrgSidQuery query = pq.getParams();
QueryWrapper<WmsInventory> qw = new QueryWrapper<>();
qw.eq("w.useOrgSid", query.getUseOrgSid());
if (StringUtils.isNotBlank(query.getGoodsName())) {
qw.like("w.goodsSkuTitle", query.getGoodsName());
}
if (StringUtils.isNotBlank(query.getGoodsSkuCode())) {
qw.like("w.goodsSkuCode", query.getGoodsSkuCode());
}
if (StringUtils.isNotBlank(query.getWarehouseName())) {
qw.like("w.warehouseName", query.getWarehouseName());
}
if (StringUtils.isNotBlank(query.getWarehouseArea())) {
qw.like("wa.areaName", query.getWarehouseArea());
}
if (StringUtils.isNotBlank(query.getWarehouseRackCode())) {
qw.like("w.warehouseRackCode", query.getWarehouseRackCode());
}
if (StringUtils.isNotBlank(query.getSupplierName())) {
qw.like("p.supplierName", query.getSupplierName());
}
if (StringUtils.isNotBlank(query.getManufacturerName())) {
qw.like("w.manufacturerName", query.getManufacturerName());
}
if (StringUtils.isNotBlank(query.getManufactorBillNo())) {
qw.like("w.manufactorBillNo", query.getManufactorBillNo());
}
qw.apply(StringUtils.isNotBlank(query.getInDateStart()), "date_format (w.firstInDate,'%Y-%m-%d') >= date_format('" + query.getInDateStart() + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(query.getInDateEnd()), "date_format (w.firstInDate,'%Y-%m-%d') <= date_format('" + query.getInDateEnd() + "','%Y-%m-%d')"
);
qw.apply("w.count > 0");
IPage<WmsInventory> page = PagerUtil.queryToPage(pq);
IPage<WmsInventoryBillUseOrgSidVo> pagging = baseMapper.selInvenGoodsByUseOrgSid(page, qw);
PagerVo<WmsInventoryBillUseOrgSidVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
}

3
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java

@ -34,6 +34,7 @@ import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbi
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailRackGoodPageListVo;
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailRackPageListVo;
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.WmsInventoryCheckbillPageVo;
import com.yxt.wms.biz.inventory.wmsinventoryprofitin.InventoryBillVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@ -83,4 +84,6 @@ public interface WmsInventoryCheckbillMapper extends BaseMapper<WmsInventoryChec
int updateFlowFiled(Map<String, Object> beanToMap);
IPage<WmsInventoryCheckbillPageVo> appDetailRackPageList(IPage<WmsInventoryCheckbill> page, @Param(Constants.WRAPPER) QueryWrapper<WmsInventoryCheckbill> qw);
List<InventoryBillVo> selPyByDeptSid(String deptSid);
}

58
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml

@ -86,29 +86,29 @@
realCount * cost AS realAmount,
CASE
state
WHEN 1
THEN '正常'
WHEN 2
THEN '盘盈'
THEN '正常'
WHEN 3
THEN '盘盈'
WHEN 4
THEN '盘亏'
END AS state,
CASE
state
WHEN 1
THEN 0
WHEN 2
THEN profitCount
THEN 0
WHEN 3
THEN profitCount
WHEN 4
THEN loseCount
END AS profitAndLoseCount,
CASE
state
WHEN 1
THEN 0
WHEN 2
THEN profitCount * cost
THEN 0
WHEN 3
THEN profitCount * cost
WHEN 4
THEN loseCount * cost
END AS profitAndLoseAmount,
lossCount,
@ -137,29 +137,29 @@
realCount * cost AS realAmount,
CASE
state
WHEN 0
WHEN 2
THEN '正常'
WHEN 1
WHEN 3
THEN '盘盈'
WHEN 2
WHEN 4
THEN '盘亏'
END AS state,
CASE
state
WHEN 0
WHEN 2
THEN 0
WHEN 1
WHEN 3
THEN profitCount
WHEN 2
WHEN 4
THEN loseCount
END AS profitAndLoseCount,
CASE
state
WHEN 0
WHEN 2
THEN 0
WHEN 1
WHEN 3
THEN profitCount * cost
WHEN 2
WHEN 4
THEN loseCount * cost
END AS profitAndLoseAmount,
lossCount,
@ -191,7 +191,7 @@
<select id="checkState" resultType="java.lang.String">
SELECT
nodeState
checkState
FROM
wms_inventory_checkbill
WHERE deptSid = #{deptSid}
@ -241,4 +241,24 @@
ON d.billSid = c.sid
<where> ${ew.sqlSegment} </where>
</select>
<select id="selPyByDeptSid" resultType="com.yxt.wms.biz.inventory.wmsinventoryprofitin.InventoryBillVo">
SELECT
wc.sid AS billSid,
wc.billNo
FROM
wms_inventory_checkbill wc
JOIN
(SELECT
SUM(profitCount) AS total
FROM
wms_inventory_checkbill wc
LEFT JOIN wms_inventory_checkbill_detail wd
ON wc.sid = wd.billSid
WHERE profitCount > 0) AS total_goods
WHERE wc.deptSid = #{deptSid}
AND total_goods.total > 0
AND wc.checkState = 2
GROUP BY wc.sid
</select>
</mapper>

15
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillService.java

@ -47,6 +47,7 @@ import com.yxt.wms.biz.inventory.wmsinventorycheckbill.flowable.*;
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.*;
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.*;
import com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.*;
import com.yxt.wms.biz.inventory.wmsinventoryprofitin.InventoryBillVo;
import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordService;
import com.yxt.wms.feign.flowable.flow.BusinessVariables;
import com.yxt.wms.feign.flowable.flow.FlowableFeign;
@ -286,8 +287,8 @@ public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventor
public ResultBean<String> saveOrUpdateDto(WmsInventoryCheckbillDto dto) {
ResultBean rb = ResultBean.fireFail();
String nodeState = baseMapper.checkState(dto.getDeptSid());
if (StringUtils.isNotBlank(nodeState) && !"已办结".equals(nodeState)) {
String checkState = baseMapper.checkState(dto.getDeptSid());
if (!"2".equals(checkState)) {
return rb.setMsg("存在盘点中数据,无法生成新的盘点单");
}
SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(dto.getDeptSid()).getData();
@ -323,8 +324,14 @@ public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventor
WmsInventoryCheckbillDetailDto wmsInventoryCheckbillDetailDto = new WmsInventoryCheckbillDetailDto();
wmsInventoryCheckbillDetailDto.setBillSid(sid);
wmsInventoryCheckbillDetailDto.setGoodsID(wmsInventory.getGoodsID());
wmsInventoryCheckbillDetailDto.setGoodsSpuSid(wmsInventory.getGoodSpuSid());
wmsInventoryCheckbillDetailDto.setGoodsSpuName(wmsInventory.getGoodsSpuName());
wmsInventoryCheckbillDetailDto.setGoodsSkuSid(wmsInventory.getGoodsSkuSid());
wmsInventoryCheckbillDetailDto.setGoodsSkuTitle(wmsInventory.getGoodsSkuTitle());
wmsInventoryCheckbillDetailDto.setGoodsSkuCode(wmsInventory.getGoodsSkuCode());
wmsInventoryCheckbillDetailDto.setGoodsSkuOwnSpec(wmsInventory.getGoodsSkuOwnSpec());
wmsInventoryCheckbillDetailDto.setManufacturerSid(wmsInventory.getManufacturerSid());
wmsInventoryCheckbillDetailDto.setManufacturerName(wmsInventory.getManufacturerName());
wmsInventoryCheckbillDetailDto.setCost(wmsInventory.getCost());
wmsInventoryCheckbillDetailDto.setUnit(wmsInventory.getUnit());
wmsInventoryCheckbillDetailDto.setWarehouseSid(wmsInventory.getWarehouseSid());
@ -894,4 +901,8 @@ public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventor
public void saveReport(String billSid, String remarks) {
wmsInventoryCheckbillReportService.saveReport(billSid, remarks);
}
public List<InventoryBillVo> selPyByDeptSid(String deptSid) {
return baseMapper.selPyByDeptSid(deptSid);
}
}

20
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetail.java

@ -55,11 +55,23 @@ public class WmsInventoryCheckbillDetail extends BaseEntity {
@ApiModelProperty("盘点单sid")
private String billSid; // 盘点单sid
@ApiModelProperty("商品ID")
private String goodsID; // 商品ID
@ApiModelProperty("商品名称")
private String goodsSkuTitle; // 商品名称
private String goodsID;
@ApiModelProperty("商品spuSid")
private String goodsSpuSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsSkuTitle;
@ApiModelProperty("图号")
private String goodsSkuCode; // 图号
private String goodsSkuCode;
@ApiModelProperty("规格")
private String goodsSkuOwnSpec;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("成本单价")
private BigDecimal cost; // 成本单价
@ApiModelProperty("单位")

20
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDetailsVo.java

@ -58,11 +58,23 @@ public class WmsInventoryCheckbillDetailDetailsVo implements Vo {
@ApiModelProperty("盘点单sid")
private String billSid; // 盘点单sid
@ApiModelProperty("商品ID")
private String goodsID; // 商品ID
@ApiModelProperty("商品名称")
private String goodsSkuTitle; // 商品名称
private String goodsID;
@ApiModelProperty("商品spuSid")
private String goodsSpuSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsSkuTitle;
@ApiModelProperty("图号")
private String goodsSkuCode; // 图号
private String goodsSkuCode;
@ApiModelProperty("规格")
private String goodsSkuOwnSpec;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("成本单价")
private BigDecimal cost; // 成本单价
@ApiModelProperty("单位")

20
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDto.java

@ -58,11 +58,23 @@ public class WmsInventoryCheckbillDetailDto implements Dto {
@ApiModelProperty("盘点单sid")
private String billSid; // 盘点单sid
@ApiModelProperty("商品ID")
private String goodsID; // 商品ID
@ApiModelProperty("商品名称")
private String goodsSkuTitle; // 商品名称
private String goodsID;
@ApiModelProperty("商品spuSid")
private String goodsSpuSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsSkuTitle;
@ApiModelProperty("图号")
private String goodsSkuCode; // 图号
private String goodsSkuCode;
@ApiModelProperty("规格")
private String goodsSkuOwnSpec;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("成本单价")
private BigDecimal cost; // 成本单价
@ApiModelProperty("单位")

7
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java

@ -25,17 +25,14 @@
*********************************************************/
package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.HandleBean;
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.WmsInventoryCheckbillGoodsDto;
import com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.WmsInventoryCheckbillReportSumVo;
import com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.math.BigDecimal;
import java.util.List;
@ -74,4 +71,6 @@ public interface WmsInventoryCheckbillDetailMapper extends BaseMapper<WmsInvento
void saveInventoryInfoPK(@Param("dto") WmsInventoryCheckbillGoodsDto dto,@Param("pkCount") BigDecimal pkCount);
HandleBean scan(@Param("sid") String sid,@Param("content") String content,@Param("houseSid") String houseSid);
List<WmsInventoryProfitinDetailDto> sourceBillBySid(String sid);
}

27
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml

@ -82,15 +82,15 @@
</select>
<update id="saveInventoryInfoZC">
update wms_inventory_checkbill_detail set lossCount = #{dto.badNum},realCount = #{dto.num},profitCount = 0,loseCount = 0,remarks = #{dto.remarks} where sid = #{dto.sid}
update wms_inventory_checkbill_detail set lossCount = #{dto.badNum},realCount = #{dto.num},profitCount = 0,loseCount = 0,remarks = #{dto.remarks},state = 2 where sid = #{dto.sid}
</update>
<update id="saveInventoryInfoPY">
update wms_inventory_checkbill_detail set lossCount = #{dto.badNum},realCount = #{dto.num},profitCount = #{pyCount},loseCount = 0,remarks = #{dto.remarks} where sid = #{dto.sid}
update wms_inventory_checkbill_detail set lossCount = #{dto.badNum},realCount = #{dto.num},profitCount = #{pyCount},loseCount = 0,remarks = #{dto.remarks},state = 3 where sid = #{dto.sid}
</update>
<update id="saveInventoryInfoPK">
update wms_inventory_checkbill_detail set lossCount = #{dto.badNum},realCount = #{dto.num},profitCount = 0,loseCount = #{pkCount},remarks = #{dto.remarks} where sid = #{dto.sid}
update wms_inventory_checkbill_detail set lossCount = #{dto.badNum},realCount = #{dto.num},profitCount = 0,loseCount = #{pkCount},remarks = #{dto.remarks},state = 4 where sid = #{dto.sid}
</update>
<select id="scan" resultType="com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.HandleBean">
@ -110,4 +110,25 @@
AND goodsID = #{content}
AND warehouseRackSid = #{houseSid}
</select>
<select id="sourceBillBySid" resultType="com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailDto">
SELECT
goodsSpuSid AS goodsSid,
goodsSpuName,
goodsSkuSid,
goodsSkuTitle AS goodsName,
goodsSkuCode AS goodsCode,
goodsSkuOwnSpec AS goodsSpec,
manufacturerSid,
manufacturerName,
unit,
profitCount AS pyNum,
supplierSid,
supplierName,
profitCount AS inStorageNum
FROM
wms_inventory_checkbill_detail
WHERE billSid = #{sid}
AND profitCount > 0
</select>
</mapper>

13
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java

@ -27,7 +27,6 @@ package com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.core.result.ResultBean;
import com.yxt.wms.biz.base.wmswarehousearea.WmsWarehouseArea;
import com.yxt.wms.biz.base.wmswarehousearea.WmsWarehouseAreaService;
import com.yxt.wms.biz.base.wmswarehouseinfo.WmsWarehouseInfo;
@ -43,6 +42,7 @@ import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.WmsInventoryChe
import com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.WmsInventoryCheckbillReportSumVo;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -140,9 +140,16 @@ public class WmsInventoryCheckbillDetailService extends MybatisBaseService<WmsIn
public void saveInventoryInfo2(WmsInventoryCheckbillGoodsPyDto dto) {
WmsInventoryCheckbillDetail wmsInventoryCheckbillDetail = new WmsInventoryCheckbillDetail();
wmsInventoryCheckbillDetail.setState(3);
wmsInventoryCheckbillDetail.setBillSid(dto.getPanDianSid());
wmsInventoryCheckbillDetail.setGoodsSpuSid(dto.getGoodsSid());
wmsInventoryCheckbillDetail.setGoodsSpuName(dto.getGoodsSpuName());
wmsInventoryCheckbillDetail.setGoodsSkuSid(dto.getGoodsSkuSid());
wmsInventoryCheckbillDetail.setGoodsSkuTitle(dto.getGoodsName());
wmsInventoryCheckbillDetail.setGoodsSkuCode(dto.getGoodsSkuCode());
wmsInventoryCheckbillDetail.setGoodsSkuOwnSpec(dto.getGoodsSkuOwnSpec());
wmsInventoryCheckbillDetail.setManufacturerSid(dto.getManufacturerSid());
wmsInventoryCheckbillDetail.setManufacturerName(dto.getManufacturerName());
wmsInventoryCheckbillDetail.setUnit(dto.getUnit());
WmsWarehouseRack wmsWarehouseRack = wmsWarehouseRackService.fetchBySid(dto.getHouseSid());
WmsWarehouseArea wmsWarehouseArea = wmsWarehouseAreaService.fetchBySid(wmsWarehouseRack.getLocationSid());
@ -172,4 +179,8 @@ public class WmsInventoryCheckbillDetailService extends MybatisBaseService<WmsIn
wmsAppendixService.save(wmsAppendix);
}
}
public List<WmsInventoryProfitinDetailDto> sourceBillBySid(String sid) {
return baseMapper.sourceBillBySid(sid);
}
}

6
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/app/WmsInventoryCheckbillGoodsPyDto.java

@ -57,4 +57,10 @@ public class WmsInventoryCheckbillGoodsPyDto implements Dto {
* 单位
*/
private String unit;
private String goodsSkuSid;
private String goodsSpuName;
private String goodsSkuOwnSpec;
private String manufacturerSid;
private String manufacturerName;
}

12
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitin/WmsInventoryProfitinDetailsVo.java

@ -73,11 +73,11 @@ public class WmsInventoryProfitinDetailsVo implements Vo {
@ApiModelProperty("申请部门名称")
private String deptName; // 申请部门名称
@ApiModelProperty("业务类型")
private String busType; // 业务类型
@ApiModelProperty("盘点单sid")
private String checkBillSid; // 盘点单sid
@ApiModelProperty("盘点单号")
private String checkBillNo; // 盘点单号
private String businessVaule; // 业务类型
@ApiModelProperty("盘点单sid")
private String sourceBillSid; // 盘点单sid
@ApiModelProperty("盘点单号")
private String sourceBillNo; // 盘点单号
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@ApiModelProperty("办结时间")
private Date finishTime; // 办结时间
@ -96,5 +96,5 @@ public class WmsInventoryProfitinDetailsVo implements Vo {
@ApiModelProperty("创建组织sid")
private String createOrgSid; // 创建组织sid
@ApiModelProperty
private List<WmsInventoryProfitinDetailDetailsVo> wmsInventoryProfitinDetailList;
private List<WmsInventoryProfitinDetailDetailsVo> goodsList;
}

8
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitin/WmsInventoryProfitinDto.java

@ -69,11 +69,11 @@ public class WmsInventoryProfitinDto implements Dto {
@ApiModelProperty("申请部门名称")
private String deptName; // 申请部门名称
@ApiModelProperty("业务类型")
private String busType; // 业务类型
private String businessVaule; // 业务类型
@ApiModelProperty("盘点单sid")
private String checkBillSid; // 盘点单sid
private String sourceBillSid; // 盘点单sid
@ApiModelProperty("盘点单号")
private String checkBillNo; // 盘点单号
private String sourceBillNo; // 盘点单号
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@ApiModelProperty("办结时间")
private Date finishTime; // 办结时间
@ -92,5 +92,5 @@ public class WmsInventoryProfitinDto implements Dto {
@ApiModelProperty("创建组织sid")
private String createOrgSid; // 创建组织sid
@ApiModelProperty
private List<WmsInventoryProfitinDetailDto> wmsInventoryProfitinDetailList;
private List<WmsInventoryProfitinDetailDto> goodsList;
}

23
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitin/WmsInventoryProfitinService.java

@ -33,7 +33,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.yxt.common.core.result.ResultBean;
import com.yxt.wms.biz.inventory.wmsinventorycheckbill.WmsInventoryCheckbill;
import com.yxt.wms.biz.inventory.wmsinventorycheckbill.WmsInventoryCheckbillService;
import com.yxt.wms.biz.inventory.wmsinventorycheckbill.flowable.*;
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailService;
import com.yxt.wms.biz.inventory.wmsinventoryprofitin.flowable.*;
import com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailDetailsVo;
import com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailDto;
@ -102,6 +104,10 @@ public class WmsInventoryProfitinService extends MybatisBaseService<WmsInventory
private MessageFeign messageFeign;
@Autowired
private WmsInventoryProfitinDetailService wmsInventoryProfitinDetailService;
@Autowired
private WmsInventoryCheckbillService wmsInventoryCheckbillService;
@Autowired
private WmsInventoryCheckbillDetailService wmsInventoryCheckbillDetailService;
public PagerVo<WmsInventoryProfitinVo> listPageVo(PagerQuery<WmsInventoryProfitinQuery> pq) {
WmsInventoryProfitinQuery query = pq.getParams();
@ -176,7 +182,7 @@ public class WmsInventoryProfitinService extends MybatisBaseService<WmsInventory
public ResultBean<String> saveOrUpdateDto(WmsInventoryProfitinDto dto){
ResultBean rb = ResultBean.fireFail();
String dtoSid = dto.getSid();
List<WmsInventoryProfitinDetailDto> wmsInventoryProfitinDetailList = dto.getWmsInventoryProfitinDetailList();
List<WmsInventoryProfitinDetailDto> wmsInventoryProfitinDetailList = dto.getGoodsList();
String deptSid = dto.getDeptSid();
SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(deptSid).getData();
String createOrgSid = sysStaffOrgFeign.getOrgSidByPath(deptVo.getOrgSidPath()).getData();
@ -215,6 +221,9 @@ public class WmsInventoryProfitinService extends MybatisBaseService<WmsInventory
WmsInventoryProfitin entity = new WmsInventoryProfitin();
BeanUtil.copyProperties(dto, entity, "id", "sid");
entity.setNodeState("待提交");
entity.setBusType(dto.getBusinessVaule());
entity.setCheckBillSid(dto.getSourceBillSid());
entity.setCheckBillNo(dto.getSourceBillNo());
baseMapper.insert(entity);
return entity.getSid();
}
@ -233,8 +242,11 @@ public class WmsInventoryProfitinService extends MybatisBaseService<WmsInventory
WmsInventoryProfitin entity = fetchBySid(sid);
WmsInventoryProfitinDetailsVo vo = new WmsInventoryProfitinDetailsVo();
BeanUtil.copyProperties(entity, vo);
vo.setSourceBillSid(entity.getCheckBillSid());
vo.setSourceBillNo(entity.getBillNo());
vo.setBusinessVaule(entity.getBusType());
List<WmsInventoryProfitinDetailDetailsVo> wmsInventoryProfitinDetailDetailsVos = wmsInventoryProfitinDetailService.selByMainSid(sid);
vo.setWmsInventoryProfitinDetailList(wmsInventoryProfitinDetailDetailsVos);
vo.setGoodsList(wmsInventoryProfitinDetailDetailsVos);
return vo;
}
@ -555,8 +567,11 @@ public class WmsInventoryProfitinService extends MybatisBaseService<WmsInventory
return rb.success();
}
public InventoryBillVo getSourceBillNoBySid(String deptSid) {
public List<InventoryBillVo> getSourceBillNoBySid(String deptSid) {
return wmsInventoryCheckbillService.selPyByDeptSid(deptSid);
}
return null;
public List<WmsInventoryProfitinDetailDto> sourceBillBySid(String sid) {
return wmsInventoryCheckbillDetailService.sourceBillBySid(sid);
}
}

22
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetail.java

@ -54,12 +54,22 @@ public class WmsInventoryProfitinDetail extends BaseEntity {
@ApiModelProperty("主表sid")
private String mainSid; // 主表sid
@ApiModelProperty("商品名称")
private String goodsSkuTitle; // 商品名称
@ApiModelProperty("图号")
private String goodsSkuCode; // 图号
@ApiModelProperty("规格")
private String goodsSkuOwnSpec; // 规格
@ApiModelProperty("商品spuSid")
private String goodsSpuSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsSkuTitle;
@ApiModelProperty("图号")
private String goodsSkuCode;
@ApiModelProperty("规格")
private String goodsSkuOwnSpec;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("单位")
private String unit; // 单位
@ApiModelProperty("盘盈数量")

46
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailDetailsVo.java

@ -53,25 +53,37 @@ public class WmsInventoryProfitinDetailDetailsVo implements Vo {
private String sid; // sid
@ApiModelProperty("主表sid")
private String mainSid; // 主表sid
@ApiModelProperty("商品名称")
private String goodsSkuTitle; // 商品名称
@ApiModelProperty("图号")
private String goodsSkuCode; // 图号
@ApiModelProperty("规格")
private String goodsSkuOwnSpec; // 规格
@ApiModelProperty("单位")
@ApiModelProperty("主表sid")
private String mainSid;
@ApiModelProperty("图号")
private String goodsCode;
@ApiModelProperty("商品spuSid")
private String goodsSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsName;
@ApiModelProperty("规格")
private String goodsSpec;
@ApiModelProperty("入库数量(默认盘盈数量)")
private String inStorageNum;
@ApiModelProperty("入库单价")
private String inStoragePrice;
@ApiModelProperty("盘盈数量")
private String pyNum;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("单位")
private String unit; // 单位
@ApiModelProperty("盘盈数量")
private BigDecimal profitCount; // 盘盈数量
@ApiModelProperty("供应商sid")
@ApiModelProperty("供应商sid")
private String supplierSid; // 供应商sid
@ApiModelProperty("供应商名称")
@ApiModelProperty("供应商名称")
private String supplierName; // 供应商名称
@ApiModelProperty("入库单价")
private BigDecimal inCost; // 入库单价
@ApiModelProperty("入库数量")
private BigDecimal inCount; // 入库数量
private String money;
}

39
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailDto.java

@ -53,25 +53,36 @@ public class WmsInventoryProfitinDetailDto implements Dto {
private String sid; // sid
@ApiModelProperty("主表sid")
private String mainSid; // 主表sid
@ApiModelProperty("商品名称")
private String goodsSkuTitle; // 商品名称
@ApiModelProperty("图号")
private String goodsSkuCode; // 图号
@ApiModelProperty("规格")
private String goodsSkuOwnSpec; // 规格
@ApiModelProperty("主表sid")
private String mainSid;
@ApiModelProperty("图号")
private String goodsCode;
@ApiModelProperty("商品spuSid")
private String goodsSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsName;
@ApiModelProperty("规格")
private String goodsSpec;
@ApiModelProperty("入库数量(默认盘盈数量)")
private String inStorageNum;
@ApiModelProperty("入库单价")
private String inStoragePrice;
@ApiModelProperty("盘盈数量")
private String pyNum;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("单位")
private String unit; // 单位
@ApiModelProperty("盘盈数量")
private BigDecimal profitCount; // 盘盈数量
@ApiModelProperty("供应商sid")
private String supplierSid; // 供应商sid
@ApiModelProperty("供应商名称")
private String supplierName; // 供应商名称
@ApiModelProperty("入库单价")
private BigDecimal inCost; // 入库单价
@ApiModelProperty("入库数量")
private BigDecimal inCount; // 入库数量
private String money;
}

1
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailMapper.java

@ -55,6 +55,5 @@ public interface WmsInventoryProfitinDetailMapper extends BaseMapper<WmsInventor
@Delete("delete from wms_inventory_profitin_detail where mainSid = #{mainSid}")
void delByMainSid(String mainSid);
@Select("select * from wms_inventory_profitin_detail where mainSid = #{mainSid}")
List<WmsInventoryProfitinDetailDetailsVo> selByMainSid(String mainSid);
}

23
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailMapper.xml

@ -3,4 +3,27 @@
<mapper namespace="com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selByMainSid"
resultType="com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailDetailsVo">
SELECT
mainSid,
goodsSpuSid AS goodsSid,
goodsSpuName,
goodsSkuSid,
goodsSkuTitle AS goodsName,
goodsSkuCode AS goodsCode,
goodsSkuOwnSpec AS goodsSpec,
unit,
manufacturerSid,
manufacturerName,
profitCount AS pyNum,
supplierSid,
supplierName,
inCost AS inStoragePrice,
inCount AS inStorageNum
FROM
wms_inventory_profitin_detail
WHERE mainSid = #{mainSid}
</select>
</mapper>

8
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitindetail/WmsInventoryProfitinDetailService.java

@ -30,6 +30,7 @@ import com.yxt.common.base.service.MybatisBaseService;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.List;
@Service
@ -38,6 +39,13 @@ public class WmsInventoryProfitinDetailService extends MybatisBaseService<WmsInv
public void insertByDto(WmsInventoryProfitinDetailDto dto){
WmsInventoryProfitinDetail entity = new WmsInventoryProfitinDetail();
BeanUtil.copyProperties(dto, entity, "id", "sid");
entity.setGoodsSpuSid(dto.getGoodsSid());
entity.setGoodsSkuTitle(dto.getGoodsName());
entity.setGoodsSkuCode(dto.getGoodsCode());
entity.setGoodsSkuOwnSpec(dto.getGoodsSpec());
entity.setProfitCount(new BigDecimal(dto.getPyNum()));
entity.setInCost(new BigDecimal(dto.getInStoragePrice()));
entity.setInCount(new BigDecimal(dto.getInStorageNum()));
baseMapper.insert(entity);
}

22
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitoutdetail/WmsInventoryProfitoutDetail.java

@ -56,12 +56,22 @@ public class WmsInventoryProfitoutDetail extends BaseEntity {
private String mainSid; // 主表sid
@ApiModelProperty("商品ID")
private String goodsID; // 商品ID
@ApiModelProperty("商品名称")
private String goodsSkuTitle; // 商品名称
@ApiModelProperty("图号")
private String goodsSkuCode; // 图号
@ApiModelProperty("规格")
private String goodsSkuOwnSpec; // 规格
@ApiModelProperty("商品spuSid")
private String goodsSpuSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsSkuTitle;
@ApiModelProperty("图号")
private String goodsSkuCode;
@ApiModelProperty("规格")
private String goodsSkuOwnSpec;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("单位")
private String unit; // 单位
@ApiModelProperty("仓库sid")

22
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitoutdetail/WmsInventoryProfitoutDetailDetailsVo.java

@ -57,12 +57,22 @@ public class WmsInventoryProfitoutDetailDetailsVo implements Vo {
private String mainSid; // 主表sid
@ApiModelProperty("商品ID")
private String goodsID; // 商品ID
@ApiModelProperty("商品名称")
private String goodsSkuTitle; // 商品名称
@ApiModelProperty("图号")
private String goodsSkuCode; // 图号
@ApiModelProperty("规格")
private String goodsSkuOwnSpec; // 规格
@ApiModelProperty("商品spuSid")
private String goodsSpuSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsSkuTitle;
@ApiModelProperty("图号")
private String goodsSkuCode;
@ApiModelProperty("规格")
private String goodsSkuOwnSpec;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("单位")
private String unit; // 单位
@ApiModelProperty("仓库sid")

22
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryprofitoutdetail/WmsInventoryProfitoutDetailDto.java

@ -57,12 +57,22 @@ public class WmsInventoryProfitoutDetailDto implements Dto {
private String mainSid; // 主表sid
@ApiModelProperty("商品ID")
private String goodsID; // 商品ID
@ApiModelProperty("商品名称")
private String goodsSkuTitle; // 商品名称
@ApiModelProperty("图号")
private String goodsSkuCode; // 图号
@ApiModelProperty("规格")
private String goodsSkuOwnSpec; // 规格
@ApiModelProperty("商品spuSid")
private String goodsSpuSid;
@ApiModelProperty("商品spu名称")
private String goodsSpuName;
@ApiModelProperty("商品Skusid")
private String goodsSkuSid;
@ApiModelProperty("商品sku名称")
private String goodsSkuTitle;
@ApiModelProperty("图号")
private String goodsSkuCode;
@ApiModelProperty("规格")
private String goodsSkuOwnSpec;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("单位")
private String unit; // 单位
@ApiModelProperty("仓库sid")

Loading…
Cancel
Save