51 changed files with 2016 additions and 283 deletions
@ -0,0 +1,40 @@ |
|||
package com.yxt.warehouse.apiadmin; |
|||
|
|||
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.warehouseinvoice.WarehouseInvoiceQuery; |
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutDto; |
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutQuery; |
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutService; |
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutVo; |
|||
import com.yxt.warehouse.biz.warehouseoutbill.*; |
|||
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/14 14:56 |
|||
*/ |
|||
|
|||
@Api(tags = "发票和出库单关联表") |
|||
@RestController |
|||
@RequestMapping("/apiadmin/warehouseinvoiceout") |
|||
public class WarehouseInvoiceOutRest { |
|||
@Autowired |
|||
private WarehouseInvoiceOutService warehouseInvoiceOutService; |
|||
|
|||
|
|||
|
|||
@ApiOperation("详情") |
|||
@GetMapping("/details") |
|||
ResultBean<List<WarehouseInvoiceOutVo>> details(@RequestParam("sid") String sid) { |
|||
return warehouseInvoiceOutService.detailsByInvoiceSid(sid); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.warehouse.apiadmin; |
|||
|
|||
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.warehouseinvoice.WarehouseInvoiceDto; |
|||
import com.yxt.warehouse.biz.warehouseinvoice.WarehouseInvoiceService; |
|||
import com.yxt.warehouse.biz.warehouseinvoice.WarehouseInvoiceVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/8/14 14:55 |
|||
*/ |
|||
@Api(tags = "发票信息") |
|||
@RestController |
|||
@RequestMapping("/apiadmin/warehouseinvoice") |
|||
public class WarehouseInvoiceRest { |
|||
@Autowired |
|||
private WarehouseInvoiceService warehouseInvoiceService; |
|||
|
|||
|
|||
|
|||
@ApiOperation("保存修改") |
|||
@PostMapping("/saveOrUpdate") |
|||
ResultBean saveOrUpdate(@RequestBody WarehouseInvoiceDto dto) { |
|||
return warehouseInvoiceService.saveOrUpdate(dto); |
|||
} |
|||
|
|||
@ApiOperation("详情") |
|||
@GetMapping("/details") |
|||
ResultBean<WarehouseInvoiceVo> details(@RequestParam("sid") String sid) { |
|||
return warehouseInvoiceService.details(sid); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.warehouse.apiadmin; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.warehouse.biz.warehouseinvoice.WarehouseInvoiceDto; |
|||
import com.yxt.warehouse.biz.warehouseinvoice.WarehouseInvoiceVo; |
|||
import com.yxt.warehouse.biz.warehouseoutlocation.WarehouseOutLocationDto; |
|||
import com.yxt.warehouse.biz.warehouseoutlocation.WarehouseOutLocationService; |
|||
import com.yxt.warehouse.biz.warehouseoutlocation.WarehouseOutLocationVo; |
|||
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/15 10:09 |
|||
*/ |
|||
@Api(tags = "出库库位分配") |
|||
@RestController |
|||
@RequestMapping("/apiadmin/warehouseoutlocation") |
|||
public class WarehouseOutLocationRest { |
|||
|
|||
@Autowired |
|||
WarehouseOutLocationService warehouseOutLocationService; |
|||
|
|||
@ApiOperation("保存修改") |
|||
@PostMapping("/save") |
|||
ResultBean saveOrUpdate(@RequestBody List<WarehouseOutLocationDto> dtos) { |
|||
return warehouseOutLocationService.save(dtos); |
|||
} |
|||
|
|||
@ApiOperation("详情") |
|||
@GetMapping("/details") |
|||
ResultBean<List<WarehouseOutLocationVo>> details(@RequestParam("sid") String sid) { |
|||
return warehouseOutLocationService.details(sid); |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.yxt.warehouse.biz.warehouseinventory; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/8/15 11:23 |
|||
*/ |
|||
@Data |
|||
public class AvailableCountVo { |
|||
private String sid; |
|||
private String locationSid;//分配明细sid
|
|||
private String goodsSkuSid; |
|||
private String goodsSpuName; |
|||
private String warehouseName; |
|||
private String areaName; |
|||
private String rackSid; |
|||
private String rackName; |
|||
private String rackCode; |
|||
private BigDecimal useCount; |
|||
private BigDecimal initialCount=new BigDecimal(0);//原分配数
|
|||
private BigDecimal count=new BigDecimal(0);//分配数
|
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoice; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseInvoice extends BaseEntity { |
|||
|
|||
|
|||
@ApiModelProperty("单据sid") |
|||
private String billSid; |
|||
@ApiModelProperty("发票类型 1 普通发票") |
|||
private String invoiceType; |
|||
|
|||
@ApiModelProperty("开票方") |
|||
private String invoicingParty; |
|||
@ApiModelProperty("抬头") |
|||
private String rise; |
|||
@ApiModelProperty("总金额") |
|||
private BigDecimal totalAmount; |
|||
@ApiModelProperty("税号") |
|||
private String dutyParagraph; |
|||
@ApiModelProperty("内容类型 1 发票商品 2自定义明细") |
|||
private String contentType; |
|||
|
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoice; |
|||
|
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutDto; |
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutVo; |
|||
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailDto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseInvoiceDto { |
|||
private String sid; |
|||
@ApiModelProperty("单据sid") |
|||
private String billSid; |
|||
@ApiModelProperty("发票类型 1 普通发票") |
|||
private String invoiceType; |
|||
|
|||
@ApiModelProperty("开票方") |
|||
private String invoicingParty; |
|||
@ApiModelProperty("抬头") |
|||
private String rise; |
|||
@ApiModelProperty("总金额") |
|||
private String totalAmount; |
|||
@ApiModelProperty("税号") |
|||
private String dutyParagraph; |
|||
@ApiModelProperty("内容类型 1 发票商品 2自定义明细") |
|||
private String contentType; |
|||
private String remarks; |
|||
|
|||
|
|||
private List<WarehouseInvoiceOutDto> detailsList = new ArrayList<>(); |
|||
|
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoice; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Mapper |
|||
public interface WarehouseInvoiceMapper extends BaseMapper<WarehouseInvoice> { |
|||
|
|||
WarehouseInvoiceVo details(@Param("sid") String sid); |
|||
|
|||
} |
|||
|
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.warehouse.biz.warehouseinvoice.WarehouseInvoiceMapper"> |
|||
|
|||
|
|||
|
|||
<select id="details" resultType="com.yxt.warehouse.biz.warehouseinvoice.WarehouseInvoiceVo"> |
|||
select a.*, |
|||
case a.invoiceType when 1 then '普通发票' end as invoiceTypeValue, |
|||
case a.contentType when 1 then '发票商品' when 2 then '2自定义明细' end as contentTypeValue |
|||
from warehouse_invoice a |
|||
<where> |
|||
a.billSid=#{sid} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,49 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoice; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseInvoiceQuery implements Query { |
|||
|
|||
@ApiModelProperty("单据编号") |
|||
private String billNo; |
|||
private String billState; |
|||
@ApiModelProperty("外部单号") |
|||
private String externalOrderNumber; |
|||
@ApiModelProperty("线上单号") |
|||
private String onlineOrderNumber; |
|||
@ApiModelProperty("买家") |
|||
private String buyer; |
|||
@ApiModelProperty("运单号") |
|||
private String waybillNumber; |
|||
@ApiModelProperty("平台") |
|||
private String platform; |
|||
@ApiModelProperty("承运商") |
|||
private String carrier; |
|||
@ApiModelProperty("手机") |
|||
private String mobile; |
|||
@ApiModelProperty("出库类型") |
|||
private String outboundType; |
|||
@ApiModelProperty("地址") |
|||
private String address; |
|||
@ApiModelProperty("下单日期开始时间") |
|||
private String orderTimeStart; |
|||
@ApiModelProperty("下单日期结束时间") |
|||
private String orderTimeEnd; |
|||
|
|||
private String orgLevelKey;//权限等级
|
|||
@ApiModelProperty("菜单路由") |
|||
private String menuUrl; |
|||
@ApiModelProperty("组织全路径sid") |
|||
private String orgPath; |
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
private int index; |
|||
} |
@ -0,0 +1,116 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoice; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.StringUtils; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutDto; |
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutService; |
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutVo; |
|||
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetail; |
|||
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Service |
|||
public class WarehouseInvoiceService extends MybatisBaseService<WarehouseInvoiceMapper, WarehouseInvoice> { |
|||
|
|||
@Autowired |
|||
WarehouseInvoiceOutService warehouseInvoiceOutService; |
|||
@Autowired |
|||
WarehouseOutBillDetailService warehouseOutBillDetailService; |
|||
public ResultBean<String> saveOrUpdate(WarehouseInvoiceDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
BigDecimal total=new BigDecimal(0); |
|||
if (StringUtils.isBlank(sid)) { |
|||
WarehouseInvoice warehouseInvoice = new WarehouseInvoice(); |
|||
BeanUtil.copyProperties(dto, warehouseInvoice, "sid"); |
|||
sid = warehouseInvoice.getSid(); |
|||
List<WarehouseInvoiceOutDto> detailsList=new ArrayList<>(); |
|||
if(dto.getContentType().equals("1")){ |
|||
List<WarehouseOutBillDetail> s=warehouseOutBillDetailService.list(new QueryWrapper<WarehouseOutBillDetail>().eq("sid",dto.getBillSid())); |
|||
for (WarehouseOutBillDetail warehouseOutBillDetail : s) { |
|||
WarehouseInvoiceOutDto d=new WarehouseInvoiceOutDto(); |
|||
d.setPrice(warehouseOutBillDetail.getPrice()); |
|||
d.setOrderCount(warehouseOutBillDetail.getOrderCount()); |
|||
d.setUnit(warehouseOutBillDetail.getUnit()); |
|||
d.setGoodsSkuSid(warehouseOutBillDetail.getGoodsSkuSid()); |
|||
d.setGoodsSpuName(warehouseOutBillDetail.getGoodsSpuName()); |
|||
detailsList.add(d); |
|||
} |
|||
}else{ |
|||
detailsList= dto.getDetailsList(); |
|||
} |
|||
detailsList.stream().forEach(s->s.setInvoiceSid(warehouseInvoice.getSid())); |
|||
detailsList.removeAll(Collections.singleton(null)); |
|||
if (detailsList.size() > 0) { |
|||
total=warehouseInvoiceOutService.saveOrUpdate(detailsList).getData(); |
|||
|
|||
} |
|||
warehouseInvoice.setTotalAmount(total); |
|||
baseMapper.insert(warehouseInvoice); |
|||
} else { |
|||
WarehouseInvoice warehouseInvoice = fetchBySid(sid); |
|||
if (warehouseInvoice == null) { |
|||
return rb.setMsg("该单据不存在"); |
|||
} |
|||
List<WarehouseInvoiceOutDto> detailsList=new ArrayList<>(); |
|||
if(dto.getContentType().equals("1")){ |
|||
List<WarehouseOutBillDetail> s=warehouseOutBillDetailService.list(new QueryWrapper<WarehouseOutBillDetail>().eq("sid",dto.getBillSid())); |
|||
for (WarehouseOutBillDetail warehouseOutBillDetail : s) { |
|||
WarehouseInvoiceOutDto d=new WarehouseInvoiceOutDto(); |
|||
d.setPrice(warehouseOutBillDetail.getPrice()); |
|||
d.setOrderCount(warehouseOutBillDetail.getOrderCount()); |
|||
d.setUnit(warehouseOutBillDetail.getUnit()); |
|||
d.setGoodsSkuSid(warehouseOutBillDetail.getGoodsSkuSid()); |
|||
d.setGoodsSpuName(warehouseOutBillDetail.getGoodsSpuName()); |
|||
detailsList.add(d); |
|||
} |
|||
}else{ |
|||
detailsList= dto.getDetailsList(); |
|||
} |
|||
BeanUtil.copyProperties(dto, warehouseInvoice, "sid"); |
|||
detailsList.stream().forEach(s->s.setInvoiceSid(warehouseInvoice.getSid())); |
|||
detailsList.removeAll(Collections.singleton(null)); |
|||
if (detailsList.size() > 0) { |
|||
total=warehouseInvoiceOutService.saveOrUpdate(detailsList).getData(); |
|||
} |
|||
warehouseInvoice.setTotalAmount(total); |
|||
baseMapper.updateById(warehouseInvoice); |
|||
} |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
public ResultBean<WarehouseInvoiceVo> details(String sid) { |
|||
ResultBean<WarehouseInvoiceVo> rb = ResultBean.fireFail(); |
|||
WarehouseInvoiceVo warehouseInvoiceDetailsVo = baseMapper.details(sid); |
|||
if (warehouseInvoiceDetailsVo == null) { |
|||
return rb.setMsg("该单据不存在"); |
|||
} |
|||
//ToDo:需补充仓库等信息
|
|||
List<WarehouseInvoiceOutVo> detailsList = warehouseInvoiceOutService.detailsByInvoiceSid(warehouseInvoiceDetailsVo.getSid()).getData(); |
|||
detailsList.removeAll(Collections.singleton(null)); |
|||
if (!detailsList.isEmpty()) { |
|||
warehouseInvoiceDetailsVo.setDetailsList(detailsList); |
|||
} |
|||
return rb.success().setData(warehouseInvoiceDetailsVo); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoice; |
|||
|
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutDto; |
|||
import com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutVo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseInvoiceVo { |
|||
private String sid; |
|||
@ApiModelProperty("单据sid") |
|||
private String billSid; |
|||
@ApiModelProperty("发票类型 1 普通发票") |
|||
private String invoiceType; |
|||
private String invoiceTypeValue; |
|||
|
|||
@ApiModelProperty("开票方") |
|||
private String invoicingParty; |
|||
@ApiModelProperty("抬头") |
|||
private String rise; |
|||
@ApiModelProperty("总金额") |
|||
private String totalAmount; |
|||
@ApiModelProperty("税号") |
|||
private String dutyParagraph; |
|||
@ApiModelProperty("内容类型 1 发票商品 2自定义明细") |
|||
private String contentType; |
|||
private String contentTypeValue; |
|||
private String remarks; |
|||
|
|||
|
|||
private List<WarehouseInvoiceOutVo> detailsList = new ArrayList<>(); |
|||
|
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoiceout; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseInvoiceOut extends BaseEntity { |
|||
|
|||
|
|||
@ApiModelProperty("发票sid") |
|||
private String invoiceSid; |
|||
@ApiModelProperty("商品skusid") |
|||
private String goodsSkuSid; |
|||
|
|||
@ApiModelProperty("商品名") |
|||
private String goodsSpuName; |
|||
@ApiModelProperty("单位") |
|||
private String unit; |
|||
@ApiModelProperty("单价") |
|||
private BigDecimal price; |
|||
@ApiModelProperty("数量") |
|||
private BigDecimal orderCount; |
|||
@ApiModelProperty("总金额") |
|||
private BigDecimal salesAmount; |
|||
|
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoiceout; |
|||
|
|||
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailDto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseInvoiceOutDto { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("发票sid") |
|||
private String invoiceSid; |
|||
@ApiModelProperty("商品skusid") |
|||
private String goodsSkuSid; |
|||
|
|||
@ApiModelProperty("商品名") |
|||
private String goodsSpuName; |
|||
@ApiModelProperty("单位") |
|||
private String unit; |
|||
@ApiModelProperty("单价") |
|||
private BigDecimal price; |
|||
@ApiModelProperty("数量") |
|||
private BigDecimal orderCount; |
|||
@ApiModelProperty("总金额") |
|||
private BigDecimal salesAmount; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoiceout; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.warehouse.biz.warehouseoutbill.WarehouseOutBillDetailsVo; |
|||
import com.yxt.warehouse.biz.warehouseoutbill.WarehouseOutBillInventoryVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Mapper |
|||
public interface WarehouseInvoiceOutMapper extends BaseMapper<WarehouseInvoiceOut> { |
|||
IPage<WarehouseInvoiceOutVo> listPage(IPage<WarehouseInvoiceOut> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseInvoiceOut> qw); |
|||
|
|||
List<WarehouseInvoiceOutVo> detailsByInvoiceSid(@Param("sid") String sid); |
|||
|
|||
} |
|||
|
@ -0,0 +1,18 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutMapper"> |
|||
|
|||
|
|||
<select id="listPage" resultType="com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutVo"> |
|||
select a.* from warehouse_invoice_out a |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="detailsByInvoiceSid" resultType="com.yxt.warehouse.biz.warehouseinvoiceout.WarehouseInvoiceOutVo"> |
|||
select a.* from warehouse_invoice_out a |
|||
<where> |
|||
a.invoiceSid=#{sid} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,49 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoiceout; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseInvoiceOutQuery implements Query { |
|||
|
|||
@ApiModelProperty("单据编号") |
|||
private String billNo; |
|||
private String billState; |
|||
@ApiModelProperty("外部单号") |
|||
private String externalOrderNumber; |
|||
@ApiModelProperty("线上单号") |
|||
private String onlineOrderNumber; |
|||
@ApiModelProperty("买家") |
|||
private String buyer; |
|||
@ApiModelProperty("运单号") |
|||
private String waybillNumber; |
|||
@ApiModelProperty("平台") |
|||
private String platform; |
|||
@ApiModelProperty("承运商") |
|||
private String carrier; |
|||
@ApiModelProperty("手机") |
|||
private String mobile; |
|||
@ApiModelProperty("出库类型") |
|||
private String outboundType; |
|||
@ApiModelProperty("地址") |
|||
private String address; |
|||
@ApiModelProperty("下单日期开始时间") |
|||
private String orderTimeStart; |
|||
@ApiModelProperty("下单日期结束时间") |
|||
private String orderTimeEnd; |
|||
|
|||
private String orgLevelKey;//权限等级
|
|||
@ApiModelProperty("菜单路由") |
|||
private String menuUrl; |
|||
@ApiModelProperty("组织全路径sid") |
|||
private String orgPath; |
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
private int index; |
|||
} |
@ -0,0 +1,60 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoiceout; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.warehouse.biz.warehouseinventory.WarehouseInventoryService; |
|||
import com.yxt.warehouse.biz.warehouseinventoryrecord.WarehouseInventoryRecordService; |
|||
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Service |
|||
public class WarehouseInvoiceOutService extends MybatisBaseService<WarehouseInvoiceOutMapper, WarehouseInvoiceOut> { |
|||
@Autowired |
|||
private WarehouseOutBillDetailService warehouseOutBillDetailService; |
|||
@Autowired |
|||
private WarehouseInventoryService warehouseInventoryService; |
|||
@Autowired |
|||
private WarehouseInventoryRecordService warehouseInventoryRecordService; |
|||
|
|||
|
|||
|
|||
public ResultBean<BigDecimal> saveOrUpdate(List<WarehouseInvoiceOutDto> dtos) { |
|||
ResultBean<BigDecimal> rb = ResultBean.fireFail(); |
|||
if(dtos.size()!=0){ |
|||
baseMapper.delete(new QueryWrapper<WarehouseInvoiceOut>().eq("invoiceSid",dtos.get(0).getInvoiceSid())); |
|||
} |
|||
BigDecimal total=new BigDecimal(0); |
|||
for (WarehouseInvoiceOutDto dto : dtos) { |
|||
WarehouseInvoiceOut warehouseInvoiceOut = new WarehouseInvoiceOut(); |
|||
BeanUtil.copyProperties(dto, warehouseInvoiceOut, "sid"); |
|||
warehouseInvoiceOut.setSalesAmount(warehouseInvoiceOut.getOrderCount().multiply(warehouseInvoiceOut.getPrice())); |
|||
total=total.add(warehouseInvoiceOut.getSalesAmount()); |
|||
baseMapper.insert(warehouseInvoiceOut); |
|||
} |
|||
return rb.success().setData(total); |
|||
} |
|||
|
|||
public ResultBean<List<WarehouseInvoiceOutVo>> detailsByInvoiceSid(String sid) { |
|||
ResultBean<List<WarehouseInvoiceOutVo>> rb = ResultBean.fireFail(); |
|||
List<WarehouseInvoiceOutVo> warehouseInvoiceOutVo = baseMapper.detailsByInvoiceSid(sid); |
|||
if (warehouseInvoiceOutVo.size()==0) { |
|||
return rb.setMsg("该单据不存在"); |
|||
} |
|||
|
|||
return rb.success().setData(warehouseInvoiceOutVo); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.warehouse.biz.warehouseinvoiceout; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseInvoiceOutVo { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("发票sid") |
|||
private String invoiceSid; |
|||
@ApiModelProperty("商品skusid") |
|||
private String goodsSkuSid; |
|||
|
|||
@ApiModelProperty("商品名") |
|||
private String goodsSpuName; |
|||
@ApiModelProperty("单位") |
|||
private String unit; |
|||
@ApiModelProperty("单价") |
|||
private BigDecimal price; |
|||
@ApiModelProperty("数量") |
|||
private BigDecimal orderCount; |
|||
@ApiModelProperty("总金额") |
|||
private BigDecimal salesAmount; |
|||
|
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.warehouse.biz.warehouseoutbill; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/26 |
|||
**/ |
|||
@Data |
|||
public class WarehouseOutBillGoodsQuery implements Query { |
|||
private String sourceBillSid; |
|||
//商品编码
|
|||
private String goodsSkuCode; |
|||
//商品名称
|
|||
private String goodsSpuName; |
|||
//规格
|
|||
private String goodsSkuOwnSpec; |
|||
|
|||
} |
@ -1,35 +0,0 @@ |
|||
package com.yxt.warehouse.biz.warehouseoutbill; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/26 |
|||
**/ |
|||
@Data |
|||
public class WarehouseOutBillInventoryQuery implements Query { |
|||
|
|||
//商品名称
|
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; |
|||
|
|||
//商品编码
|
|||
private String goodsSkuCode; |
|||
|
|||
//仓库
|
|||
private String warehouseName; |
|||
|
|||
//库位
|
|||
private String warehouseRackCode; |
|||
|
|||
//供应商
|
|||
private String supplierName; |
|||
|
|||
private String orgPath; |
|||
|
|||
private String busrepairBillsid;//维修工单sid
|
|||
private String name; |
|||
} |
@ -1,4 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.warehouse.biz.warehouseoutbill.WarehouseOutBillMapper"> |
|||
|
|||
|
|||
<select id="listPage" resultType="com.yxt.warehouse.biz.warehouseoutbill.WarehouseOutBillVo"> |
|||
select a.* from warehouse_out_bill a |
|||
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="details" resultType="com.yxt.warehouse.biz.warehouseoutbill.WarehouseOutBillDetailsVo"> |
|||
select a.* from warehouse_out_bill a |
|||
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid |
|||
<where> |
|||
a.sid=#{sid} |
|||
</where> |
|||
</select> |
|||
<select id="getInventoryList" resultType="com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailVo"> |
|||
select a.* from warehouse_out_bill_detail a |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectNum" resultType="java.lang.String"> |
|||
select RIGHT (billNo, 4) |
|||
from warehouse_out_bill |
|||
where billNo LIKE concat(#{billNo}, '%') |
|||
order by billNo desc |
|||
limit 1 |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,15 @@ |
|||
package com.yxt.warehouse.biz.warehouseoutbill; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2024/8/15 16:19 |
|||
*/ |
|||
@Data |
|||
public class WarehouseOutStateQuery { |
|||
private String billState;//0 待分配 1 零拣 2待出库 3已出库
|
|||
private String sid; |
|||
private String userSid; |
|||
private String userName; |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.yxt.warehouse.biz.warehouseoutlocation; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseOutLocation extends BaseEntity { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("来源单") |
|||
private String sourceBillSid; |
|||
@ApiModelProperty("sku") |
|||
private String goodsSkuSid; |
|||
|
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; |
|||
@ApiModelProperty("商品title") |
|||
private String goodsSkuTitle; |
|||
@ApiModelProperty("商品规格编码") |
|||
private String goodsSkuCode; |
|||
@ApiModelProperty("数量") |
|||
private BigDecimal count; |
|||
@ApiModelProperty("库位sid") |
|||
private String rackSid; |
|||
@ApiModelProperty("库位编码") |
|||
private String rackCode; |
|||
private String inventorySid; |
|||
private String spec; |
|||
|
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.yxt.warehouse.biz.warehouseoutlocation; |
|||
|
|||
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailDto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseOutLocationDto { |
|||
private String sid; |
|||
@ApiModelProperty("来源单") |
|||
private String sourceBillSid; |
|||
@ApiModelProperty("sku") |
|||
private String goodsSkuSid; |
|||
|
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; |
|||
@ApiModelProperty("商品title") |
|||
private String goodsSpuTitle; |
|||
@ApiModelProperty("商品规格编码") |
|||
private String goodsSkuCode; |
|||
@ApiModelProperty("数量") |
|||
private BigDecimal count; |
|||
@ApiModelProperty("库位sid") |
|||
private String rackSid; |
|||
@ApiModelProperty("库位编码") |
|||
private String rackCode; |
|||
private String inventorySid; |
|||
private BigDecimal initialCount; |
|||
private String locationSid; |
|||
private String spec; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.warehouse.biz.warehouseoutlocation; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Mapper |
|||
public interface WarehouseOutLocationMapper extends BaseMapper<WarehouseOutLocation> { |
|||
|
|||
List<WarehouseOutLocationVo> details(@Param("sid") String sid); |
|||
WarehouseOutLocationVo totalCountBySkuSid(@Param("sid") String sid,@Param("skuSid") String skuSid); |
|||
|
|||
} |
|||
|
@ -0,0 +1,26 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.warehouse.biz.warehouseoutlocation.WarehouseOutLocationMapper"> |
|||
|
|||
|
|||
<select id="listPage" resultType="com.yxt.warehouse.biz.warehouseoutbill.WarehouseOutBillVo"> |
|||
select a.* from warehouse_out_bill a |
|||
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="details" resultType="com.yxt.warehouse.biz.warehouseoutlocation.WarehouseOutLocationVo"> |
|||
select a.* from warehouse_out_location a |
|||
<where> |
|||
a.sourceBillSid=#{sid} |
|||
</where> |
|||
</select> |
|||
<select id="totalCountBySkuSid" resultType="com.yxt.warehouse.biz.warehouseoutlocation.WarehouseOutLocationVo"> |
|||
select sum(count) as totalCount from warehouse_out_location a |
|||
<where> |
|||
a.sourceBillSid=#{sid} and a.goodsSkuSid=#{skuSid} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,49 @@ |
|||
package com.yxt.warehouse.biz.warehouseoutlocation; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseOutLocationQuery implements Query { |
|||
|
|||
@ApiModelProperty("单据编号") |
|||
private String billNo; |
|||
private String billState; |
|||
@ApiModelProperty("外部单号") |
|||
private String externalOrderNumber; |
|||
@ApiModelProperty("线上单号") |
|||
private String onlineOrderNumber; |
|||
@ApiModelProperty("买家") |
|||
private String buyer; |
|||
@ApiModelProperty("运单号") |
|||
private String waybillNumber; |
|||
@ApiModelProperty("平台") |
|||
private String platform; |
|||
@ApiModelProperty("承运商") |
|||
private String carrier; |
|||
@ApiModelProperty("手机") |
|||
private String mobile; |
|||
@ApiModelProperty("出库类型") |
|||
private String outboundType; |
|||
@ApiModelProperty("地址") |
|||
private String address; |
|||
@ApiModelProperty("下单日期开始时间") |
|||
private String orderTimeStart; |
|||
@ApiModelProperty("下单日期结束时间") |
|||
private String orderTimeEnd; |
|||
|
|||
private String orgLevelKey;//权限等级
|
|||
@ApiModelProperty("菜单路由") |
|||
private String menuUrl; |
|||
@ApiModelProperty("组织全路径sid") |
|||
private String orgPath; |
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
private int index; |
|||
} |
@ -0,0 +1,99 @@ |
|||
package com.yxt.warehouse.biz.warehouseoutlocation; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
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.warehouseinventory.WarehouseInventory; |
|||
import com.yxt.warehouse.biz.warehouseinventory.WarehouseInventoryService; |
|||
import com.yxt.warehouse.biz.warehouseinventoryrecord.WarehouseInventoryRecordDto; |
|||
import com.yxt.warehouse.biz.warehouseinventoryrecord.WarehouseInventoryRecordService; |
|||
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetail; |
|||
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailDto; |
|||
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Service |
|||
public class WarehouseOutLocationService extends MybatisBaseService<WarehouseOutLocationMapper, WarehouseOutLocation> { |
|||
@Autowired |
|||
WarehouseInventoryService warehouseInventoryService; |
|||
@Autowired |
|||
WarehouseOutBillDetailService warehouseOutBillDetailService; |
|||
|
|||
public ResultBean<String> save(List<WarehouseOutLocationDto> dtos) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
if (dtos.size() == 0) { |
|||
return rb.setMsg("参数不正确"); |
|||
} |
|||
//分配
|
|||
WarehouseOutLocationVo warehouseOutLocationVo = baseMapper.totalCountBySkuSid(dtos.get(0).getSourceBillSid(), dtos.get(0).getGoodsSkuSid()); |
|||
//总得
|
|||
WarehouseOutBillDetail warehouseOutBillDetail = warehouseOutBillDetailService.getOne(new QueryWrapper<WarehouseOutBillDetail>() |
|||
.eq("sourceBillSid", dtos.get(0).getSourceBillSid()) |
|||
.eq("goodsSkuSid", dtos.get(0).getGoodsSkuSid())); |
|||
BigDecimal t = new BigDecimal(0); |
|||
for (WarehouseOutLocationDto dto : dtos) { |
|||
WarehouseInventory warehouseInventory = warehouseInventoryService.getOne(new QueryWrapper<WarehouseInventory>().eq("sid", dto.getInventorySid())); |
|||
warehouseInventory.setAllocateCount(warehouseInventory.getAllocateCount().add(dto.getCount().multiply(dto.getInitialCount()))); |
|||
warehouseInventoryService.saveOrUpdate(warehouseInventory); |
|||
t.add(dto.getCount()); |
|||
} |
|||
int result = t.add(warehouseOutLocationVo.getTotalCount()).compareTo(warehouseOutBillDetail.getOrderCount()); |
|||
if (result > 0) { |
|||
return rb.setMsg("分配数量超过订单数量"); |
|||
} |
|||
for (WarehouseOutLocationDto dto : dtos) { |
|||
int i = dto.getInitialCount().compareTo(new BigDecimal(0)); |
|||
if (i == 0) { |
|||
WarehouseOutLocation warehouseOutLocation = new WarehouseOutLocation(); |
|||
BeanUtil.copyProperties(dto, warehouseOutLocation, "sid"); |
|||
warehouseOutLocation.setGoodsSkuCode(warehouseOutBillDetail.getGoodsSkuCode()); |
|||
baseMapper.insert(warehouseOutLocation); |
|||
} else { |
|||
WarehouseOutLocation warehouseOutLocation = new WarehouseOutLocation(); |
|||
BeanUtil.copyProperties(dto, warehouseOutLocation); |
|||
warehouseOutLocation.setSid(dto.getLocationSid()); |
|||
warehouseOutLocation.setGoodsSkuCode(warehouseOutBillDetail.getGoodsSkuCode()); |
|||
baseMapper.updateById(warehouseOutLocation); |
|||
} |
|||
} |
|||
if (warehouseOutBillDetail.getOrderCount() == warehouseOutLocationVo.getTotalCount()) { |
|||
warehouseOutBillDetail.setRackState("2"); |
|||
} else if (warehouseOutBillDetail.getOrderCount() != warehouseOutLocationVo.getTotalCount()) { |
|||
warehouseOutBillDetail.setRackState("1"); |
|||
} |
|||
return rb.success().setData(""); |
|||
} |
|||
|
|||
|
|||
public ResultBean<List<WarehouseOutLocationVo>> details(String sid) { |
|||
ResultBean<List<WarehouseOutLocationVo>> rb = ResultBean.fireFail(); |
|||
List<WarehouseOutLocationVo> warehouseOutLocationVo = baseMapper.details(sid); |
|||
if (warehouseOutLocationVo == null) { |
|||
return rb.setMsg("该单据不存在"); |
|||
} |
|||
return rb.success().setData(warehouseOutLocationVo); |
|||
} |
|||
|
|||
public ResultBean<WarehouseOutLocationVo> totalCountBySkuSid(String sid, String skuSid) { |
|||
ResultBean<WarehouseOutLocationVo> rb = ResultBean.fireFail(); |
|||
WarehouseOutLocationVo warehouseOutLocationVo = baseMapper.totalCountBySkuSid(sid, skuSid); |
|||
return rb.success().setData(warehouseOutLocationVo); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.warehouse.biz.warehouseoutlocation; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/24 |
|||
**/ |
|||
@Data |
|||
public class WarehouseOutLocationVo { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("来源单") |
|||
private String sourceBillSid; |
|||
@ApiModelProperty("sku") |
|||
private String goodsSkuSid; |
|||
|
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; |
|||
@ApiModelProperty("商品title") |
|||
private String goodsSpuTitle; |
|||
@ApiModelProperty("商品规格编码") |
|||
private String goodsSkuCode; |
|||
@ApiModelProperty("数量") |
|||
private BigDecimal count; |
|||
@ApiModelProperty("库位sid") |
|||
private String rackSid; |
|||
@ApiModelProperty("库位编码") |
|||
private String rackCode; |
|||
private String inventorySid; |
|||
private BigDecimal totalCount; |
|||
private String spec; |
|||
|
|||
} |
Loading…
Reference in new issue