Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 7 months ago
parent
commit
c1ae527b4e
  1. 43
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairinventorybill/AsBusrepairInventorybillService.java
  2. 128
      yxt-as/src/main/java/com/yxt/anrui/as/feign/wms/wmsInventoryrecord/WmsInventoryRecordDto.java
  3. 24
      yxt-as/src/main/java/com/yxt/anrui/as/feign/wms/wmsInventoryrecord/WmsInventoryRecordFeign.java

43
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairinventorybill/AsBusrepairInventorybillService.java

@ -29,6 +29,8 @@ import com.yxt.anrui.as.feign.portal.sysuser.SysUserFeign;
import com.yxt.anrui.as.feign.wms.wmsInventory.WmsInventory;
import com.yxt.anrui.as.feign.wms.wmsInventory.WmsInventoryFeign;
import com.yxt.anrui.as.feign.wms.wmsInventory.WmsUpdateCountQuery;
import com.yxt.anrui.as.feign.wms.wmsInventoryrecord.WmsInventoryRecordDto;
import com.yxt.anrui.as.feign.wms.wmsInventoryrecord.WmsInventoryRecordFeign;
import com.yxt.anrui.as.feign.wms.wmsinventorybill.WmsInventoryBillDetailDto;
import com.yxt.anrui.as.feign.wms.wmsinventorybill.WmsInventoryBillDto;
import com.yxt.anrui.as.feign.wms.wmsinventorybill.WmsInventoryBillFeign;
@ -75,7 +77,8 @@ public class AsBusrepairInventorybillService extends MybatisBaseService<AsBusrep
private SysUserFeign sysUserFeign;
@Autowired
private AsBusrepairBillNodeService asBusrepairBillNodeService;
@Autowired
private WmsInventoryRecordFeign wmsInventoryRecordFeign;
/**
* 维修出/退库分页列表
*
@ -360,9 +363,47 @@ public class AsBusrepairInventorybillService extends MybatisBaseService<AsBusrep
if (busTypeKey.equals("0")) {
//维修出库
countQuery.setAddOrReduce(1);
WmsInventoryRecordDto recordDto = new WmsInventoryRecordDto();
BigDecimal wiCount = inventory.getCount();
BigDecimal subtractCount = wiCount.subtract(new BigDecimal(sDto.getCount()));
recordDto.setInventorySid(inventorySid);
recordDto.setCreateBySid(dto.getCreateBySid());
recordDto.setUseOrgSid(dto.getDeptSid());
recordDto.setCreateOrgSid(dto.getCreateOrgSid());
recordDto.setHandlerSid(dto.getCreateBySid());
recordDto.setHandlerName(dto.getCreateByName());
recordDto.setGoodsID(inventory.getGoodsID());
recordDto.setSourceBillSid(dto.getSourceBillSid());
recordDto.setBillNo(dto.getSourceBillNo());
recordDto.setBillType("0");
recordDto.setBusTypeKey("11");
recordDto.setBusTypeValue("销售出库");
BeanUtil.copyProperties(inventory, recordDto, "sid", "createBySid");
recordDto.setCount(sDto.getCount());
recordDto.setCurrentCount(subtractCount.toString());
wmsInventoryRecordFeign.save(recordDto);
} else if (busTypeKey.equals("1")) {
//维修退库
countQuery.setAddOrReduce(0);
WmsInventoryRecordDto recordDto = new WmsInventoryRecordDto();
BigDecimal wiCount = inventory.getCount();
BigDecimal add = wiCount.add(new BigDecimal(sDto.getCount()));
recordDto.setInventorySid(inventorySid);
recordDto.setCreateBySid(dto.getCreateBySid());
recordDto.setUseOrgSid(dto.getDeptSid());
recordDto.setCreateOrgSid(dto.getCreateOrgSid());
recordDto.setHandlerSid(dto.getCreateBySid());
recordDto.setHandlerName(dto.getCreateByName());
recordDto.setGoodsID(inventory.getGoodsID());
recordDto.setSourceBillSid(dto.getSourceBillSid());
recordDto.setBillNo(dto.getSourceBillNo());
recordDto.setBillType("1");
recordDto.setBusTypeKey("02");
recordDto.setBusTypeValue("退货入库");
BeanUtil.copyProperties(inventory, recordDto, "sid", "createBySid");
recordDto.setCount(sDto.getCount());
recordDto.setCurrentCount(add.toString());
wmsInventoryRecordFeign.save(recordDto);
}
wmsInventoryFeign.updateInventoryCount(countQuery);
}

128
yxt-as/src/main/java/com/yxt/anrui/as/feign/wms/wmsInventoryrecord/WmsInventoryRecordDto.java

@ -0,0 +1,128 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.as.feign.wms.wmsInventoryrecord;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: wms(yxt) <br/>
* File: WmsInventoryRecordDto.java <br/>
* Class: inventroy.api.wmsinventoryrecord.WmsInventoryRecordDto <br/>
* Description: 库存出入库记录 数据传输对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-08 17:27:39 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "库存出入库记录 数据传输对象", description = "库存出入库记录 数据传输对象")
public class WmsInventoryRecordDto implements Dto {
private String sid; // sid
@ApiModelProperty("库存sid")
private String inventorySid; // 库存sid
@ApiModelProperty("创建人sid")
private String createBySid; // 商品ID
@ApiModelProperty("商品ID")
private String goodsID; // 商品ID
@ApiModelProperty("来源单sid(业务单sid)")
private String sourceBillSid; // 来源单sid(业务单sid)
@ApiModelProperty("来源单据编号")
private String billNo; // 来源单据编号
@ApiModelProperty("单据类型(1入库、0出库)")
private String billType; // 单据类型(1入库、0出库)
@ApiModelProperty("业务类型key(采购入库、维修出入库、销售出入库等)")
private String busTypeKey; // 业务类型key(采购入库、维修出入库、销售出入库等)
@ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)")
private String busTypeValue; // 业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)
@ApiModelProperty("批次号")
private String batchNumber; // 批次号
@ApiModelProperty("商品基础信息Sid")
private String goodsSpuSid; // 商品基础信息Sid
@ApiModelProperty("商品名称")
private String goodsSpuName; // 商品名称
@ApiModelProperty("商品Skusid")
private String goodsSkuSid; // 商品Skusid
@ApiModelProperty("商品Sku名称")
private String goodsSkuTitle; // 商品Sku名称
@ApiModelProperty("商品编码(图号)")
private String goodsSkuCode; // 商品编码(图号)
@ApiModelProperty("规格型号")
private String goodsSkuOwnSpec; // 规格型号
@ApiModelProperty("出入库后的库存量")
private String currentCount; // 出入库后的库存量
@ApiModelProperty("计量单位")
private String unit; // 计量单位
@ApiModelProperty("数量")
private String count; // 数量
@ApiModelProperty("仓库sid")
private String warehouseSid; // 仓库sid
@ApiModelProperty("仓库名称")
private String warehouseName; // 仓库名称
@ApiModelProperty("库位sid")
private String warehouseRackSid; // 库位sid
@ApiModelProperty("库位编号")
private String warehouseRackCode; // 库位编号
@ApiModelProperty("入库单价")
private String cost;
@ApiModelProperty("税率")
private String taxRate;
@ApiModelProperty("入库金额")
private String amount;
@ApiModelProperty("经办人sid")
private String handlerSid; // 库位sid
@ApiModelProperty("经办人")
private String handlerName; // 库位编号
@ApiModelProperty("创建组织sid")
private String createOrgSid;
@ApiModelProperty("使用组织sid")
private String useOrgSid;
@ApiModelProperty("厂家订单号")
private String manufactorBillNo;
@ApiModelProperty("销售指导价")
private String guidPrice;
@ApiModelProperty("客户/供应商sid,出库是为客户,入库时为供应商")
private String supplierSid;
@ApiModelProperty("客户/供应商名称")
private String supplierName;
@ApiModelProperty("厂家名称")
private String manufacturerName;
@ApiModelProperty("厂家sid")
private String manufacturerSid;
@ApiModelProperty("前一单据明细sid(溯源使用)")
private String preBillSid;
@ApiModelProperty("前一单编号")
private String preBillNo;
}

24
yxt-as/src/main/java/com/yxt/anrui/as/feign/wms/wmsInventoryrecord/WmsInventoryRecordFeign.java

@ -0,0 +1,24 @@
package com.yxt.anrui.as.feign.wms.wmsInventoryrecord;
import com.yxt.anrui.as.feign.wms.wmsinventorybill.WmsInventoryBillDto;
import com.yxt.anrui.as.feign.wms.wmsinventorybill.WmsInventoryBillFeignFallback;
import com.yxt.common.core.result.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @description: 出入库单据
* @author: dimengzhe
* @date: 2024/3/7
**/
@FeignClient(
contextId = "yxt-wms-WmsInventoryBill",
name = "yxt-wms",
path = "apiadmin/inventory/wmsinventoryrecord")
public interface WmsInventoryRecordFeign {
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody WmsInventoryRecordDto dto);
}
Loading…
Cancel
Save