71 changed files with 2029 additions and 71 deletions
@ -0,0 +1,56 @@ |
|||||
|
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.warehousedistributebill.WarehouseDistributeBillVo; |
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailDto; |
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailQuery; |
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailService; |
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailVo; |
||||
|
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/6/7 14:46 |
||||
|
*/ |
||||
|
@Api(tags = "配货单据") |
||||
|
@RestController |
||||
|
@RequestMapping("/apiadmin/warehousedistributebilldetail") |
||||
|
public class WarehouseDistributeBillDetailRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private WarehouseDistributeBillDetailService warehouseDistributeBillDetailService; |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<WarehouseDistributeBillDetailVo>> listPage(@RequestBody PagerQuery<WarehouseDistributeBillDetailQuery> pq){ |
||||
|
return warehouseDistributeBillDetailService.listPage(pq); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody WarehouseDistributeBillDetailDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseDistributeBillDetailService.saveOrUpdateDto(dto); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据sid批量删除") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
public ResultBean delBySids(@RequestBody String[] sids){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseDistributeBillDetailService.delAll(sids); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据SID获取一条记录") |
||||
|
@GetMapping("/fetchDetailsBySid/{sid}") |
||||
|
public ResultBean<WarehouseDistributeBillVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBillDetailVo vo = warehouseDistributeBillDetailService.fetchDetailsVoBySid(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
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.warehousedistributebill.*; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Api(tags = "配货单据") |
||||
|
@RestController |
||||
|
@RequestMapping("/apiadmin/warehousedistributebill") |
||||
|
public class WarehouseDistributeBillRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private WarehouseDistributeBillService warehouseDistributeBillService; |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<WarehouseDistributeBillVo>> listPage(@RequestBody PagerQuery<WarehouseDistributeBillQuery> pq){ |
||||
|
return warehouseDistributeBillService.listPage(pq); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody WarehouseDistributeBillDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseDistributeBillService.saveOrUpdateDto(dto); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据sid批量删除") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
public ResultBean delBySids(@RequestBody String[] sids){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseDistributeBillService.delAll(sids); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据SID获取一条记录") |
||||
|
@GetMapping("/fetchDetailsBySid/{sid}") |
||||
|
public ResultBean<WarehouseDistributeBillVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBillVo vo = warehouseDistributeBillService.fetchDetailsVoBySid(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
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.warehouselogistics.WarehouseLogisticsDto; |
||||
|
import com.yxt.warehouse.biz.warehouselogistics.WarehouseLogisticsQuery; |
||||
|
import com.yxt.warehouse.biz.warehouselogistics.WarehouseLogisticsService; |
||||
|
import com.yxt.warehouse.biz.warehouselogistics.WarehouseLogisticsVo; |
||||
|
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/6/7 14:11 |
||||
|
*/ |
||||
|
|
||||
|
@Api(tags = "物流信息") |
||||
|
@RestController |
||||
|
@RequestMapping("/apiadmin/warehouselogistics") |
||||
|
public class WarehouseLogisticsRest { |
||||
|
|
||||
|
@Autowired |
||||
|
WarehouseLogisticsService warehouseLogisticsService; |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<WarehouseLogisticsVo>> listPage(@RequestBody PagerQuery<WarehouseLogisticsQuery> pq){ |
||||
|
return warehouseLogisticsService.listPage(pq); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody WarehouseLogisticsDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseLogisticsService.saveOrUpdateDto(dto); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据sid批量删除") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
public ResultBean delBySids(@RequestBody String[] sids){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseLogisticsService.delAll(sids); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据SID获取一条记录") |
||||
|
@GetMapping("/fetchDetailsBySid/{sid}") |
||||
|
public ResultBean<WarehouseLogisticsVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseLogisticsVo vo = warehouseLogisticsService.fetchDetailsVoBySid(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
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.warehouseoutbilldetail.WarehouseOutBillDetailDto; |
||||
|
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailService; |
||||
|
import com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailVo; |
||||
|
import com.yxt.warehouse.biz.warehousereceiptbilldetail.WarehouseReceiptBillDetailQuery; |
||||
|
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/6/7 13:51 |
||||
|
*/ |
||||
|
@Api(tags = "出库单据明细") |
||||
|
@RestController |
||||
|
@RequestMapping("/apiadmin/wmsoutbilldetail") |
||||
|
public class WarehouseOutBillDetailRest { |
||||
|
@Autowired |
||||
|
WarehouseOutBillDetailService warehouseOutBillDetailService; |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<WarehouseOutBillDetailVo>> listPage(@RequestBody PagerQuery<WarehouseReceiptBillDetailQuery> pq){ |
||||
|
return warehouseOutBillDetailService.listPage(pq); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody WarehouseOutBillDetailDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseOutBillDetailService.saveOrUpdateDto(dto); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据sid批量删除") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
public ResultBean delBySids(@RequestBody String[] sids){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseOutBillDetailService.delAll(sids); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据SID获取一条记录") |
||||
|
@GetMapping("/fetchDetailsBySid/{sid}") |
||||
|
public ResultBean<WarehouseOutBillDetailVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseOutBillDetailVo vo = warehouseOutBillDetailService.fetchDetailsVoBySid(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
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.warehouseoutbilllock.WarehouseOutBillLockDto; |
||||
|
import com.yxt.warehouse.biz.warehouseoutbilllock.WarehouseOutBillLockQuery; |
||||
|
import com.yxt.warehouse.biz.warehouseoutbilllock.WarehouseOutBillLockService; |
||||
|
import com.yxt.warehouse.biz.warehouseoutbilllock.WarehouseOutBillLockVo; |
||||
|
import com.yxt.warehouse.biz.warehousereceiptbilldetail.WarehouseReceiptBillDetailQuery; |
||||
|
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/6/7 14:00 |
||||
|
*/ |
||||
|
@Api(tags = "出库单锁定库位库存明细") |
||||
|
@RestController |
||||
|
@RequestMapping("/apiadmin/wmsoutbilllock") |
||||
|
public class WarehouseOutBillLockRest { |
||||
|
@Autowired |
||||
|
WarehouseOutBillLockService warehouseOutBillLockService; |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<WarehouseOutBillLockVo>> listPage(@RequestBody PagerQuery<WarehouseOutBillLockQuery> pq){ |
||||
|
return warehouseOutBillLockService.listPage(pq); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody WarehouseOutBillLockDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseOutBillLockService.saveOrUpdateDto(dto); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据sid批量删除") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
public ResultBean delBySids(@RequestBody String[] sids){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseOutBillLockService.delAll(sids); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据SID获取一条记录") |
||||
|
@GetMapping("/fetchDetailsBySid/{sid}") |
||||
|
public ResultBean<WarehouseOutBillLockVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseOutBillLockVo vo = warehouseOutBillLockService.fetchDetailsVoBySid(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
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.warehousesmsbuyer.WarehouseSmsBuyerDto; |
||||
|
import com.yxt.warehouse.biz.warehousesmsbuyer.WarehouseSmsBuyerQuery; |
||||
|
import com.yxt.warehouse.biz.warehousesmsbuyer.WarehouseSmsBuyerService; |
||||
|
import com.yxt.warehouse.biz.warehousesmsbuyer.WarehouseSmsBuyerVo; |
||||
|
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/6/7 14:19 |
||||
|
*/ |
||||
|
@Api(tags = "收货人信息") |
||||
|
@RestController |
||||
|
@RequestMapping("/apiadmin/warehousesmsbuyer") |
||||
|
public class WarehouseSmsBuyerRest { |
||||
|
|
||||
|
|
||||
|
@Autowired |
||||
|
WarehouseSmsBuyerService warehouseSmsBuyerService; |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<WarehouseSmsBuyerVo>> listPage(@RequestBody PagerQuery<WarehouseSmsBuyerQuery> pq){ |
||||
|
return warehouseSmsBuyerService.listPage(pq); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody WarehouseSmsBuyerDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseSmsBuyerService.saveOrUpdateDto(dto); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据sid批量删除") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
public ResultBean delBySids(@RequestBody String[] sids){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
warehouseSmsBuyerService.delAll(sids); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据SID获取一条记录") |
||||
|
@GetMapping("/fetchDetailsBySid/{sid}") |
||||
|
public ResultBean<WarehouseSmsBuyerVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseSmsBuyerVo vo = warehouseSmsBuyerService.fetchDetailsVoBySid(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebill; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseDistributeBill extends BaseEntity { |
||||
|
|
||||
|
@ApiModelProperty("出库单sid") |
||||
|
private String sourceBillSid; |
||||
|
@ApiModelProperty("来源单号(出库单)") |
||||
|
private String sourceBillNo; |
||||
|
@ApiModelProperty("单据编号") |
||||
|
private String billNo; |
||||
|
@ApiModelProperty("制单人姓名") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("单据状态") |
||||
|
private Integer billState; |
||||
|
@ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)") |
||||
|
private Integer isHandUp; |
||||
|
@ApiModelProperty("优先级") |
||||
|
private Integer priority; |
||||
|
@ApiModelProperty("实际发货时间") |
||||
|
private Date actualDeliveTime; |
||||
|
@ApiModelProperty("创建组织sid") |
||||
|
private String createOrgSid; |
||||
|
@ApiModelProperty("使用组织sid") |
||||
|
private String useOrgSid; |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebill; |
||||
|
|
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailDto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseDistributeBillDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("出库单sid") |
||||
|
private String sourceBillSid; |
||||
|
@ApiModelProperty("来源单号(出库单)") |
||||
|
private String sourceBillNo; |
||||
|
@ApiModelProperty("单据编号") |
||||
|
private String billNo; |
||||
|
@ApiModelProperty("制单人姓名") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("制单人sid") |
||||
|
private String createBySid; |
||||
|
private String createTime; |
||||
|
@ApiModelProperty("单据状态") |
||||
|
private String billState; |
||||
|
@ApiModelProperty("创建组织sid") |
||||
|
private String createOrgSid; |
||||
|
@ApiModelProperty("使用组织sid") |
||||
|
private String useOrgSid; |
||||
|
|
||||
|
private List<WarehouseDistributeBillDetailDto> detailList = new ArrayList<>(); |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebill; |
||||
|
|
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailVo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseDistributeBillInitVo { |
||||
|
|
||||
|
//单据编号
|
||||
|
private String billNo; |
||||
|
|
||||
|
//制单人
|
||||
|
@ApiModelProperty("制单人姓名") |
||||
|
private String createByName; |
||||
|
|
||||
|
//单据日期
|
||||
|
@ApiModelProperty("单据日期") |
||||
|
private String createTime; |
||||
|
|
||||
|
//来源单号
|
||||
|
@ApiModelProperty("来源单号(出库单)") |
||||
|
private String sourceBillNo; |
||||
|
|
||||
|
//单据状态
|
||||
|
@ApiModelProperty("单据状态") |
||||
|
private String billState; |
||||
|
|
||||
|
//备注
|
||||
|
private String remarks; |
||||
|
|
||||
|
private List<WarehouseDistributeBillDetailVo> detailsList = new ArrayList<>(); |
||||
|
|
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebill; |
||||
|
|
||||
|
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.Delete; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface WarehouseDistributeBillMapper extends BaseMapper<WarehouseDistributeBill> { |
||||
|
|
||||
|
IPage<WarehouseDistributeBillVo> listPage(IPage<WarehouseDistributeBill> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseDistributeBill> qw); |
||||
|
WarehouseDistributeBillVo initialization (@Param("sid") String sid); |
||||
|
|
||||
|
@Delete("delete from warehouse_sms_buyer where sid = #{sid}") |
||||
|
void delByMainSid(String billSid); |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
<?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.warehousedistributebill.WarehouseDistributeBillMapper"> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<select id="listPage" resultType="com.yxt.warehouse.biz.warehousedistributebill.WarehouseDistributeBillVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from wms_distribute_bill a |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="initialization" resultType="com.yxt.warehouse.biz.warehousedistributebill.WarehouseDistributeBillVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from wms_distribute_bill a |
||||
|
where a.sid =#{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,38 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebill; |
||||
|
|
||||
|
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 WarehouseDistributeBillQuery implements Query { |
||||
|
|
||||
|
//单据编号
|
||||
|
@ApiModelProperty("单据编号") |
||||
|
private String billNo; |
||||
|
|
||||
|
//单据日期开始时间
|
||||
|
private String createTimeStart; |
||||
|
|
||||
|
//单据日期结束时间
|
||||
|
private String createTimeEnd; |
||||
|
|
||||
|
//业务类型
|
||||
|
@ApiModelProperty("业务类型value((销售出库、采购退货出库等))") |
||||
|
private String busTypeValue; |
||||
|
|
||||
|
//单据状态
|
||||
|
@ApiModelProperty("单据状态") |
||||
|
private String billState; |
||||
|
|
||||
|
@ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)") |
||||
|
private String isHandUp; |
||||
|
@ApiModelProperty("优先级") |
||||
|
private String priority; |
||||
|
private String name; |
||||
|
} |
@ -0,0 +1,102 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebill; |
||||
|
|
||||
|
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 org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class WarehouseDistributeBillService extends MybatisBaseService<WarehouseDistributeBillMapper, WarehouseDistributeBill> { |
||||
|
|
||||
|
|
||||
|
|
||||
|
public ResultBean<PagerVo<WarehouseDistributeBillVo>> listPage(PagerQuery<WarehouseDistributeBillQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBillQuery query = pq.getParams(); |
||||
|
QueryWrapper<WarehouseDistributeBill> qw = new QueryWrapper<>(); |
||||
|
if (StringUtils.isNotBlank(query.getName())) { |
||||
|
qw.like("rackName", query.getName()); |
||||
|
} |
||||
|
|
||||
|
IPage<WarehouseDistributeBill> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<WarehouseDistributeBillVo> pagging = baseMapper.listPage(page, qw); |
||||
|
PagerVo<WarehouseDistributeBillVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
List<WarehouseDistributeBillVo> records = pagging.getRecords(); |
||||
|
return rb.success().setData(p); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean<WarehouseDistributeBillVo> initialization(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBillVo vo = baseMapper.initialization(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
public void delAll(String[] sids) { |
||||
|
delBySids(sids); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delete(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBill wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
baseMapper.deleteById(wmsWarehouseRack.getId()); |
||||
|
} |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
public ResultBean updateIsEnable(String sid, String isEnable) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBill wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); |
||||
|
baseMapper.updateById(wmsWarehouseRack); |
||||
|
} |
||||
|
return rb.success().setMsg("成功"); |
||||
|
} |
||||
|
|
||||
|
public void delByMainSid(String billSid) { |
||||
|
baseMapper.delByMainSid(billSid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public void saveOrUpdateDto(WarehouseDistributeBillDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
this.insertByDto(dto); |
||||
|
return; |
||||
|
} |
||||
|
this.updateByDto(dto); |
||||
|
} |
||||
|
|
||||
|
public void insertByDto(WarehouseDistributeBillDto dto) { |
||||
|
WarehouseDistributeBill entity = new WarehouseDistributeBill(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.insert(entity); |
||||
|
} |
||||
|
|
||||
|
public void updateByDto(WarehouseDistributeBillDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
public WarehouseDistributeBillVo fetchDetailsVoBySid(String sid) { |
||||
|
WarehouseDistributeBill entity = fetchBySid(sid); |
||||
|
WarehouseDistributeBillVo vo = new WarehouseDistributeBillVo(); |
||||
|
BeanUtil.copyProperties(entity, vo); |
||||
|
return vo; |
||||
|
} |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebill; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseDistributeBillVo { |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("单据日期") |
||||
|
private String createTime; |
||||
|
@ApiModelProperty("制单人姓名") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("来源单号(出库单)") |
||||
|
private String sourceBillNo; |
||||
|
@ApiModelProperty("单据编号") |
||||
|
private String billNo; |
||||
|
|
||||
|
@ApiModelProperty("单据状态") |
||||
|
private String billState; |
||||
|
@ApiModelProperty("优先级") |
||||
|
private String priority; |
||||
|
@ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)") |
||||
|
private String isHandUp; |
||||
|
|
||||
|
@ApiModelProperty("实际发货时间") |
||||
|
private String actualDeliveTime; |
||||
|
} |
@ -0,0 +1,50 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebilldetail; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseDistributeBillDetail extends BaseEntity { |
||||
|
@ApiModelProperty("出库单明细sid") |
||||
|
private String outBillDetailSid; |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("商品基础信息Sid") |
||||
|
private String goodSpuSid; |
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String goodsSpuName; |
||||
|
@ApiModelProperty("商品Skusid") |
||||
|
private String goodsSkuSid; |
||||
|
@ApiModelProperty("商品Sku名称") |
||||
|
private String goodsSkuTitle; |
||||
|
@ApiModelProperty("商品sku编码") |
||||
|
private String goodsSkuCode; |
||||
|
@ApiModelProperty("规格型号") |
||||
|
private String goodsSkuOwnSpec; |
||||
|
@ApiModelProperty("计量单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("库存sid") |
||||
|
private String inventorySid; |
||||
|
@ApiModelProperty("仓库sid") |
||||
|
private String warehouseSid; |
||||
|
@ApiModelProperty("仓库名称") |
||||
|
private String warehouseName; |
||||
|
@ApiModelProperty("库位sid") |
||||
|
private String warehouseRackSid; |
||||
|
@ApiModelProperty("库位编号") |
||||
|
private String warehouseRackCode; |
||||
|
@ApiModelProperty("配货数量") |
||||
|
private BigDecimal distributeCount; |
||||
|
@ApiModelProperty("发货数量") |
||||
|
private BigDecimal deliveryCount; |
||||
|
@ApiModelProperty("状态(配货中/已完成)") |
||||
|
private Integer billState; |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebilldetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseDistributeBillDetailDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("出库单明细sid") |
||||
|
private String outBillDetailSid; |
||||
|
@ApiModelProperty("商品基础信息Sid") |
||||
|
private String goodSpuSid; |
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String goodsSpuName; |
||||
|
@ApiModelProperty("商品Skusid") |
||||
|
private String goodsSkuSid; |
||||
|
@ApiModelProperty("商品Sku名称") |
||||
|
private String goodsSkuTitle; |
||||
|
@ApiModelProperty("商品sku编码") |
||||
|
private String goodsSkuCode; |
||||
|
@ApiModelProperty("规格型号") |
||||
|
private String goodsSkuOwnSpec; |
||||
|
@ApiModelProperty("计量单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("库存sid") |
||||
|
private String inventorySid; |
||||
|
@ApiModelProperty("仓库sid") |
||||
|
private String warehouseSid; |
||||
|
@ApiModelProperty("仓库名称") |
||||
|
private String warehouseName; |
||||
|
@ApiModelProperty("库位sid") |
||||
|
private String warehouseRackSid; |
||||
|
@ApiModelProperty("库位编号") |
||||
|
private String warehouseRackCode; |
||||
|
@ApiModelProperty("配货数量") |
||||
|
private String distributeCount; |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebilldetail; |
||||
|
|
||||
|
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.warehousedistributebilldetail.WarehouseDistributeBillDetail; |
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailVo; |
||||
|
import org.apache.ibatis.annotations.Delete; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface WarehouseDistributeBillDetailMapper extends BaseMapper<WarehouseDistributeBillDetail> { |
||||
|
|
||||
|
IPage<WarehouseDistributeBillDetailVo> listPage(IPage<WarehouseDistributeBillDetail> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseDistributeBillDetail> qw); |
||||
|
WarehouseDistributeBillDetailVo initialization (@Param("sid") String sid); |
||||
|
|
||||
|
@Delete("delete from wms_distribute_bill_detail where sid = #{sid}") |
||||
|
void delByMainSid(String billSid); |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
<?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.warehousedistributebilldetail.WarehouseDistributeBillDetailMapper"> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<select id="listPage" resultType="com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from wms_distribute_bill_detail a |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="initialization" resultType="com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from wms_distribute_bill_detail a |
||||
|
where a.sid =#{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,38 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebilldetail; |
||||
|
|
||||
|
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 WarehouseDistributeBillDetailQuery implements Query { |
||||
|
|
||||
|
//单据编号
|
||||
|
@ApiModelProperty("单据编号") |
||||
|
private String billNo; |
||||
|
|
||||
|
//单据日期开始时间
|
||||
|
private String createTimeStart; |
||||
|
|
||||
|
//单据日期结束时间
|
||||
|
private String createTimeEnd; |
||||
|
|
||||
|
//业务类型
|
||||
|
@ApiModelProperty("业务类型value((销售出库、采购退货出库等))") |
||||
|
private String busTypeValue; |
||||
|
|
||||
|
//单据状态
|
||||
|
@ApiModelProperty("单据状态") |
||||
|
private String billState; |
||||
|
|
||||
|
@ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)") |
||||
|
private String isHandUp; |
||||
|
@ApiModelProperty("优先级") |
||||
|
private String priority; |
||||
|
private String name; |
||||
|
} |
@ -0,0 +1,106 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebilldetail; |
||||
|
|
||||
|
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.warehousedistributebilldetail.WarehouseDistributeBillDetail; |
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailDto; |
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailQuery; |
||||
|
import com.yxt.warehouse.biz.warehousedistributebilldetail.WarehouseDistributeBillDetailVo; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class WarehouseDistributeBillDetailService extends MybatisBaseService<WarehouseDistributeBillDetailMapper, WarehouseDistributeBillDetail> { |
||||
|
|
||||
|
|
||||
|
|
||||
|
public ResultBean<PagerVo<WarehouseDistributeBillDetailVo>> listPage(PagerQuery<WarehouseDistributeBillDetailQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBillDetailQuery query = pq.getParams(); |
||||
|
QueryWrapper<WarehouseDistributeBillDetail> qw = new QueryWrapper<>(); |
||||
|
if (StringUtils.isNotBlank(query.getName())) { |
||||
|
qw.like("rackName", query.getName()); |
||||
|
} |
||||
|
|
||||
|
IPage<WarehouseDistributeBillDetail> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<WarehouseDistributeBillDetailVo> pagging = baseMapper.listPage(page, qw); |
||||
|
PagerVo<WarehouseDistributeBillDetailVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
List<WarehouseDistributeBillDetailVo> records = pagging.getRecords(); |
||||
|
return rb.success().setData(p); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean<WarehouseDistributeBillDetailVo> initialization(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBillDetailVo vo = baseMapper.initialization(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
public void delAll(String[] sids) { |
||||
|
delBySids(sids); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delete(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBillDetail wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
baseMapper.deleteById(wmsWarehouseRack.getId()); |
||||
|
} |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
public ResultBean updateIsEnable(String sid, String isEnable) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseDistributeBillDetail wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); |
||||
|
baseMapper.updateById(wmsWarehouseRack); |
||||
|
} |
||||
|
return rb.success().setMsg("成功"); |
||||
|
} |
||||
|
|
||||
|
public void delByMainSid(String billSid) { |
||||
|
baseMapper.delByMainSid(billSid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public void saveOrUpdateDto(WarehouseDistributeBillDetailDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
this.insertByDto(dto); |
||||
|
return; |
||||
|
} |
||||
|
this.updateByDto(dto); |
||||
|
} |
||||
|
|
||||
|
public void insertByDto(WarehouseDistributeBillDetailDto dto) { |
||||
|
WarehouseDistributeBillDetail entity = new WarehouseDistributeBillDetail(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.insert(entity); |
||||
|
} |
||||
|
|
||||
|
public void updateByDto(WarehouseDistributeBillDetailDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
public WarehouseDistributeBillDetailVo fetchDetailsVoBySid(String sid) { |
||||
|
WarehouseDistributeBillDetail entity = fetchBySid(sid); |
||||
|
WarehouseDistributeBillDetailVo vo = new WarehouseDistributeBillDetailVo(); |
||||
|
BeanUtil.copyProperties(entity, vo); |
||||
|
return vo; |
||||
|
} |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousedistributebilldetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseDistributeBillDetailVo { |
||||
|
|
||||
|
@ApiModelProperty("出库单明细sid") |
||||
|
private String outBillDetailSid; |
||||
|
@ApiModelProperty("商品基础信息Sid") |
||||
|
private String goodSpuSid; |
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String goodsSpuName; |
||||
|
@ApiModelProperty("商品Skusid") |
||||
|
private String goodsSkuSid; |
||||
|
@ApiModelProperty("商品Sku名称") |
||||
|
private String goodsSkuTitle; |
||||
|
@ApiModelProperty("商品sku编码") |
||||
|
private String goodsSkuCode; |
||||
|
@ApiModelProperty("规格型号") |
||||
|
private String goodsSkuOwnSpec; |
||||
|
@ApiModelProperty("计量单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("库存sid") |
||||
|
private String inventorySid; |
||||
|
@ApiModelProperty("仓库sid") |
||||
|
private String warehouseSid; |
||||
|
@ApiModelProperty("仓库名称") |
||||
|
private String warehouseName; |
||||
|
@ApiModelProperty("库位sid") |
||||
|
private String warehouseRackSid; |
||||
|
@ApiModelProperty("库位编号") |
||||
|
private String warehouseRackCode; |
||||
|
@ApiModelProperty("配货数量") |
||||
|
private String distributeCount; |
||||
|
} |
@ -1,19 +1,19 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
<?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"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.yxt.warehouse.biz.warehousereceiptbilldetailbatch.WarehouseReceiptBillDetailBatchMapper"> |
<mapper namespace="com.yxt.warehouse.biz.warehousegoodstag.WarehouseGoodsTagMapper"> |
||||
|
|
||||
<select id="listPage" resultType="com.yxt.warehouse.biz.warehousereceiptbilldetail.WarehouseReceiptBillDetailVo"> |
<select id="listPage" resultType="com.yxt.warehouse.biz.warehousegoodstag.WarehouseGoodsTagVo"> |
||||
select |
select |
||||
a.* |
a.* |
||||
from warehouse_receipt_bill_detail_batch a |
from warehouse_goods_tag a |
||||
<where> |
<where> |
||||
${ew.sqlSegment} |
${ew.sqlSegment} |
||||
</where> |
</where> |
||||
</select> |
</select> |
||||
<select id="initialization" resultType="com.yxt.warehouse.biz.warehousereceiptbilldetail.WarehouseReceiptBillDetailVo"> |
<select id="initialization" resultType="com.yxt.warehouse.biz.warehousegoodstag.WarehouseGoodsTagVo"> |
||||
select |
select |
||||
a.* |
a.* |
||||
from warehouse_receipt_bill_detail_batch a |
from warehouse_goods_tag a |
||||
where a.sid =#{sid} |
where a.sid =#{sid} |
||||
</select> |
</select> |
||||
</mapper> |
</mapper> |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouseinfo; |
package com.yxt.warehouse.biz.warehouseinfo; |
||||
|
|
||||
import com.yxt.common.core.domain.BaseEntity; |
import com.yxt.common.core.domain.BaseEntity; |
||||
import lombok.Data; |
import lombok.Data; |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouseinfo; |
package com.yxt.warehouse.biz.warehouseinfo; |
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.yxt.common.core.dto.Dto; |
import com.yxt.common.core.dto.Dto; |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouseinfo; |
package com.yxt.warehouse.biz.warehouseinfo; |
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
@ -1,19 +1,19 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
<?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"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.yxt.warehouse.biz.warehousewarehouseinfo.WarehouseInfoMapper"> |
<mapper namespace="com.yxt.warehouse.biz.warehouseinfo.WarehouseInfoMapper"> |
||||
<!-- <where> ${ew.sqlSegment} </where>--> |
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
<!-- ${ew.customSqlSegment} --> |
<!-- ${ew.customSqlSegment} --> |
||||
|
|
||||
<select id="listPage" resultType="com.yxt.warehouse.biz.warehousewarehouseinfo.WarehouseInfoVo"> |
<select id="listPage" resultType="com.yxt.warehouse.biz.warehouseinfo.WarehouseInfoVo"> |
||||
select |
select |
||||
* |
* |
||||
from warehouse_warehouse_info |
from warehouse_info |
||||
<where> |
<where> |
||||
${ew.sqlSegment} |
${ew.sqlSegment} |
||||
</where> |
</where> |
||||
</select> |
</select> |
||||
<update id="updateBySidIsDelete"> |
<update id="updateBySidIsDelete"> |
||||
UPDATE warehouse_warehouse_info |
UPDATE warehouse_info |
||||
SET isDelete=1 |
SET isDelete=1 |
||||
where sid in |
where sid in |
||||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouseinfo; |
package com.yxt.warehouse.biz.warehouseinfo; |
||||
|
|
||||
import com.yxt.common.core.query.Query; |
import com.yxt.common.core.query.Query; |
||||
import lombok.Data; |
import lombok.Data; |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouseinfo; |
package com.yxt.warehouse.biz.warehouseinfo; |
||||
|
|
||||
import cn.hutool.core.bean.BeanUtil; |
import cn.hutool.core.bean.BeanUtil; |
||||
import cn.hutool.core.date.DateTime; |
import cn.hutool.core.date.DateTime; |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouseinfo; |
package com.yxt.warehouse.biz.warehouseinfo; |
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.yxt.common.core.vo.Vo; |
import com.yxt.common.core.vo.Vo; |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouselogistics; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseLogistics extends BaseEntity { |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("物流公司") |
||||
|
private String logisticsCompany; |
||||
|
@ApiModelProperty("物流单号") |
||||
|
private String logisticsBillNo; |
||||
|
@ApiModelProperty("当前物流状态") |
||||
|
private String LogisticsState; |
||||
|
@ApiModelProperty("当前状态时间") |
||||
|
private String stateTime; |
||||
|
@ApiModelProperty("实际发货时间") |
||||
|
private String actualDeliveTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouselogistics; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseLogisticsDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("物流公司") |
||||
|
private String logisticsCompany; |
||||
|
@ApiModelProperty("物流单号") |
||||
|
private String logisticsBillNo; |
||||
|
@ApiModelProperty("当前物流状态") |
||||
|
private String LogisticsState; |
||||
|
@ApiModelProperty("当前状态时间") |
||||
|
private String stateTime; |
||||
|
@ApiModelProperty("实际发货时间") |
||||
|
private String actualDeliveTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouselogistics; |
||||
|
|
||||
|
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.Delete; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface WarehouseLogisticsMapper extends BaseMapper<WarehouseLogistics> { |
||||
|
|
||||
|
IPage<WarehouseLogisticsVo> listPage(IPage<WarehouseLogistics> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseLogistics> qw); |
||||
|
WarehouseLogisticsVo initialization (@Param("sid") String sid); |
||||
|
|
||||
|
@Delete("delete from warehouse_logistics where sid = #{sid}") |
||||
|
void delByMainSid(String billSid); |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
<?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.warehouselogistics.WarehouseLogisticsMapper"> |
||||
|
|
||||
|
<select id="listPage" resultType="com.yxt.warehouse.biz.warehouselogistics.WarehouseLogisticsVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from warehouse_logistics a |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="initialization" resultType="com.yxt.warehouse.biz.warehouselogistics.WarehouseLogisticsVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from warehouse_logistics a |
||||
|
where a.sid =#{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,13 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouselogistics; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2024/6/6 16:42 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class WarehouseLogisticsQuery implements Query { |
||||
|
private String name; |
||||
|
} |
@ -0,0 +1,101 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouselogistics; |
||||
|
|
||||
|
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 org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class WarehouseLogisticsService extends MybatisBaseService<WarehouseLogisticsMapper, WarehouseLogistics> { |
||||
|
|
||||
|
|
||||
|
public ResultBean<PagerVo<WarehouseLogisticsVo>> listPage(PagerQuery<WarehouseLogisticsQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseLogisticsQuery query = pq.getParams(); |
||||
|
QueryWrapper<WarehouseLogistics> qw = new QueryWrapper<>(); |
||||
|
if (StringUtils.isNotBlank(query.getName())) { |
||||
|
qw.like("rackName", query.getName()); |
||||
|
} |
||||
|
|
||||
|
IPage<WarehouseLogistics> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<WarehouseLogisticsVo> pagging = baseMapper.listPage(page, qw); |
||||
|
PagerVo<WarehouseLogisticsVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
List<WarehouseLogisticsVo> records = pagging.getRecords(); |
||||
|
return rb.success().setData(p); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean<WarehouseLogisticsVo> initialization(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseLogisticsVo vo = baseMapper.initialization(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
public void delAll(String[] sids) { |
||||
|
delBySids(sids); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delete(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseLogistics wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
baseMapper.deleteById(wmsWarehouseRack.getId()); |
||||
|
} |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
public ResultBean updateIsEnable(String sid, String isEnable) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseLogistics wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); |
||||
|
baseMapper.updateById(wmsWarehouseRack); |
||||
|
} |
||||
|
return rb.success().setMsg("成功"); |
||||
|
} |
||||
|
|
||||
|
public void delByMainSid(String billSid) { |
||||
|
baseMapper.delByMainSid(billSid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public void saveOrUpdateDto(WarehouseLogisticsDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
this.insertByDto(dto); |
||||
|
return; |
||||
|
} |
||||
|
this.updateByDto(dto); |
||||
|
} |
||||
|
|
||||
|
public void insertByDto(WarehouseLogisticsDto dto) { |
||||
|
WarehouseLogistics entity = new WarehouseLogistics(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.insert(entity); |
||||
|
} |
||||
|
|
||||
|
public void updateByDto(WarehouseLogisticsDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
public WarehouseLogisticsVo fetchDetailsVoBySid(String sid) { |
||||
|
WarehouseLogistics entity = fetchBySid(sid); |
||||
|
WarehouseLogisticsVo vo = new WarehouseLogisticsVo(); |
||||
|
BeanUtil.copyProperties(entity, vo); |
||||
|
return vo; |
||||
|
} |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouselogistics; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseLogisticsVo { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("物流公司") |
||||
|
private String logisticsCompany; |
||||
|
@ApiModelProperty("物流单号") |
||||
|
private String logisticsBillNo; |
||||
|
@ApiModelProperty("当前物流状态") |
||||
|
private String LogisticsState; |
||||
|
@ApiModelProperty("当前状态时间") |
||||
|
private String stateTime; |
||||
|
@ApiModelProperty("实际发货时间") |
||||
|
private String actualDeliveTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilldetail; |
||||
|
|
||||
|
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.Delete; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface WarehouseOutBillDetailMapper extends BaseMapper<WarehouseOutBillDetail> { |
||||
|
|
||||
|
IPage<WarehouseOutBillDetailVo> listPage(IPage<WarehouseOutBillDetail> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseOutBillDetail> qw); |
||||
|
WarehouseOutBillDetailVo initialization (@Param("sid") String sid); |
||||
|
|
||||
|
@Delete("delete from warehouse_out_bill_detail where sid = #{sid}") |
||||
|
void delByMainSid(String billSid); |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
<?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.warehouseoutbilldetail.WarehouseOutBillDetailMapper"> |
||||
|
|
||||
|
<select id="listPage" resultType="com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from warehouse_out_bill_detail a |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="initialization" resultType="com.yxt.warehouse.biz.warehouseoutbilldetail.WarehouseOutBillDetailVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from warehouse_out_bill_detail a |
||||
|
where a.sid =#{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,13 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilldetail; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2024/6/6 16:42 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class WarehouseOutBillDetailQuery implements Query { |
||||
|
private String name; |
||||
|
} |
@ -0,0 +1,102 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilldetail; |
||||
|
|
||||
|
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.warehousereceiptbilldetail.WarehouseReceiptBillDetailQuery; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class WarehouseOutBillDetailService extends MybatisBaseService<WarehouseOutBillDetailMapper, WarehouseOutBillDetail> { |
||||
|
|
||||
|
|
||||
|
public ResultBean<PagerVo<WarehouseOutBillDetailVo>> listPage(PagerQuery<WarehouseReceiptBillDetailQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseReceiptBillDetailQuery query = pq.getParams(); |
||||
|
QueryWrapper<WarehouseOutBillDetail> qw = new QueryWrapper<>(); |
||||
|
if (StringUtils.isNotBlank(query.getName())) { |
||||
|
qw.like("rackName", query.getName()); |
||||
|
} |
||||
|
|
||||
|
IPage<WarehouseOutBillDetail> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<WarehouseOutBillDetailVo> pagging = baseMapper.listPage(page, qw); |
||||
|
PagerVo<WarehouseOutBillDetailVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
List<WarehouseOutBillDetailVo> records = pagging.getRecords(); |
||||
|
return rb.success().setData(p); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean<WarehouseOutBillDetailVo> initialization(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseOutBillDetailVo vo = baseMapper.initialization(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
public void delAll(String[] sids) { |
||||
|
delBySids(sids); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delete(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseOutBillDetail wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
baseMapper.deleteById(wmsWarehouseRack.getId()); |
||||
|
} |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
public ResultBean updateIsEnable(String sid, String isEnable) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseOutBillDetail wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); |
||||
|
baseMapper.updateById(wmsWarehouseRack); |
||||
|
} |
||||
|
return rb.success().setMsg("成功"); |
||||
|
} |
||||
|
|
||||
|
public void delByMainSid(String billSid) { |
||||
|
baseMapper.delByMainSid(billSid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public void saveOrUpdateDto(WarehouseOutBillDetailDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
this.insertByDto(dto); |
||||
|
return; |
||||
|
} |
||||
|
this.updateByDto(dto); |
||||
|
} |
||||
|
|
||||
|
public void insertByDto(WarehouseOutBillDetailDto dto) { |
||||
|
WarehouseOutBillDetail entity = new WarehouseOutBillDetail(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.insert(entity); |
||||
|
} |
||||
|
|
||||
|
public void updateByDto(WarehouseOutBillDetailDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
public WarehouseOutBillDetailVo fetchDetailsVoBySid(String sid) { |
||||
|
WarehouseOutBillDetail entity = fetchBySid(sid); |
||||
|
WarehouseOutBillDetailVo vo = new WarehouseOutBillDetailVo(); |
||||
|
BeanUtil.copyProperties(entity, vo); |
||||
|
return vo; |
||||
|
} |
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilldetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseOutBillDetailVo { |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("商品基础信息Sid") |
||||
|
private String goodSpuSid; |
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String goodsSpuName; |
||||
|
@ApiModelProperty("商品Skusid") |
||||
|
private String goodsSkuSid; |
||||
|
@ApiModelProperty("商品Sku名称") |
||||
|
private String goodsSkuTitle; |
||||
|
@ApiModelProperty("商品sku编码") |
||||
|
private String goodsSkuCode; |
||||
|
@ApiModelProperty("规格型号") |
||||
|
private String goodsSkuOwnSpec; |
||||
|
@ApiModelProperty("计量单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("订单数量") |
||||
|
private BigDecimal orderCount; |
||||
|
@ApiModelProperty("未结数量") |
||||
|
private BigDecimal remainingCount; |
||||
|
@ApiModelProperty("调整数量") |
||||
|
private BigDecimal adjustCount; |
||||
|
@ApiModelProperty("分配数量") |
||||
|
private BigDecimal distributeCount; |
||||
|
@ApiModelProperty("发货数量") |
||||
|
private BigDecimal deliveryCount; |
||||
|
@ApiModelProperty("状态(新建/已发货完成、部分分配、全部分配等)") |
||||
|
private Integer billState; |
||||
|
@ApiModelProperty("发货时间") |
||||
|
private Date deliveTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilllock; |
||||
|
|
||||
|
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 WarehouseOutBillLock extends BaseEntity { |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("出库单明细sid") |
||||
|
private String billDetailSid; |
||||
|
@ApiModelProperty("库存sid") |
||||
|
private String inventorySid; |
||||
|
@ApiModelProperty("仓库sid") |
||||
|
private String warehouseSid; |
||||
|
@ApiModelProperty("仓库名称") |
||||
|
private String warehouseName; |
||||
|
@ApiModelProperty("库位sid") |
||||
|
private String warehouseRackSid; |
||||
|
@ApiModelProperty("库位编号") |
||||
|
private String warehouseRackCode; |
||||
|
@ApiModelProperty("数量") |
||||
|
private String count; |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilllock; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseOutBillLockDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("出库单明细sid") |
||||
|
private String billDetailSid; |
||||
|
@ApiModelProperty("库存sid") |
||||
|
private String inventorySid; |
||||
|
@ApiModelProperty("仓库sid") |
||||
|
private String warehouseSid; |
||||
|
@ApiModelProperty("仓库名称") |
||||
|
private String warehouseName; |
||||
|
@ApiModelProperty("库位sid") |
||||
|
private String warehouseRackSid; |
||||
|
@ApiModelProperty("库位编号") |
||||
|
private String warehouseRackCode; |
||||
|
@ApiModelProperty("数量") |
||||
|
private String count; |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilllock; |
||||
|
|
||||
|
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.Delete; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface WarehouseOutBillLockMapper extends BaseMapper<WarehouseOutBillLock> { |
||||
|
|
||||
|
IPage<WarehouseOutBillLockVo> listPage(IPage<WarehouseOutBillLock> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseOutBillLock> qw); |
||||
|
WarehouseOutBillLockVo initialization (@Param("sid") String sid); |
||||
|
|
||||
|
@Delete("delete from warehouse_out_bill_lock where sid = #{sid}") |
||||
|
void delByMainSid(String billSid); |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
<?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.warehouseoutbilllock.WarehouseOutBillLockMapper"> |
||||
|
|
||||
|
<select id="listPage" resultType="com.yxt.warehouse.biz.warehouseoutbilllock.WarehouseOutBillLockVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from warehouse_out_bill_lock a |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="initialization" resultType="com.yxt.warehouse.biz.warehouseoutbilllock.WarehouseOutBillLockVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from warehouse_out_bill_lock a |
||||
|
where a.sid =#{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,13 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilllock; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2024/6/6 16:42 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class WarehouseOutBillLockQuery implements Query { |
||||
|
private String name; |
||||
|
} |
@ -0,0 +1,101 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilllock; |
||||
|
|
||||
|
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 org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class WarehouseOutBillLockService extends MybatisBaseService<WarehouseOutBillLockMapper, WarehouseOutBillLock> { |
||||
|
|
||||
|
|
||||
|
public ResultBean<PagerVo<WarehouseOutBillLockVo>> listPage(PagerQuery<WarehouseOutBillLockQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseOutBillLockQuery query = pq.getParams(); |
||||
|
QueryWrapper<WarehouseOutBillLock> qw = new QueryWrapper<>(); |
||||
|
if (StringUtils.isNotBlank(query.getName())) { |
||||
|
qw.like("rackName", query.getName()); |
||||
|
} |
||||
|
|
||||
|
IPage<WarehouseOutBillLock> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<WarehouseOutBillLockVo> pagging = baseMapper.listPage(page, qw); |
||||
|
PagerVo<WarehouseOutBillLockVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
List<WarehouseOutBillLockVo> records = pagging.getRecords(); |
||||
|
return rb.success().setData(p); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean<WarehouseOutBillLockVo> initialization(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseOutBillLockVo vo = baseMapper.initialization(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
public void delAll(String[] sids) { |
||||
|
delBySids(sids); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delete(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseOutBillLock wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
baseMapper.deleteById(wmsWarehouseRack.getId()); |
||||
|
} |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
public ResultBean updateIsEnable(String sid, String isEnable) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseOutBillLock wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); |
||||
|
baseMapper.updateById(wmsWarehouseRack); |
||||
|
} |
||||
|
return rb.success().setMsg("成功"); |
||||
|
} |
||||
|
|
||||
|
public void delByMainSid(String billSid) { |
||||
|
baseMapper.delByMainSid(billSid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public void saveOrUpdateDto(WarehouseOutBillLockDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
this.insertByDto(dto); |
||||
|
return; |
||||
|
} |
||||
|
this.updateByDto(dto); |
||||
|
} |
||||
|
|
||||
|
public void insertByDto(WarehouseOutBillLockDto dto) { |
||||
|
WarehouseOutBillLock entity = new WarehouseOutBillLock(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.insert(entity); |
||||
|
} |
||||
|
|
||||
|
public void updateByDto(WarehouseOutBillLockDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
public WarehouseOutBillLockVo fetchDetailsVoBySid(String sid) { |
||||
|
WarehouseOutBillLock entity = fetchBySid(sid); |
||||
|
WarehouseOutBillLockVo vo = new WarehouseOutBillLockVo(); |
||||
|
BeanUtil.copyProperties(entity, vo); |
||||
|
return vo; |
||||
|
} |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.yxt.warehouse.biz.warehouseoutbilllock; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseOutBillLockVo { |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("出库单明细sid") |
||||
|
private String billDetailSid; |
||||
|
@ApiModelProperty("库存sid") |
||||
|
private String inventorySid; |
||||
|
@ApiModelProperty("仓库sid") |
||||
|
private String warehouseSid; |
||||
|
@ApiModelProperty("仓库名称") |
||||
|
private String warehouseName; |
||||
|
@ApiModelProperty("库位sid") |
||||
|
private String warehouseRackSid; |
||||
|
@ApiModelProperty("库位编号") |
||||
|
private String warehouseRackCode; |
||||
|
@ApiModelProperty("数量") |
||||
|
private String count; |
||||
|
|
||||
|
} |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouserack; |
package com.yxt.warehouse.biz.warehouserack; |
||||
|
|
||||
import com.yxt.common.core.domain.BaseEntity; |
import com.yxt.common.core.domain.BaseEntity; |
||||
import lombok.Data; |
import lombok.Data; |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouserack; |
package com.yxt.warehouse.biz.warehouserack; |
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.yxt.common.core.dto.Dto; |
import com.yxt.common.core.dto.Dto; |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouserack; |
package com.yxt.warehouse.biz.warehouserack; |
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
@ -1,29 +1,29 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
<?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"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.yxt.warehouse.biz.warehousewarehouserack.WarehouseRackMapper"> |
<mapper namespace="com.yxt.warehouse.biz.warehouserack.WarehouseRackMapper"> |
||||
<!-- <where> ${ew.sqlSegment} </where>--> |
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
<!-- ${ew.customSqlSegment} --> |
<!-- ${ew.customSqlSegment} --> |
||||
|
|
||||
<select id="listPage" resultType="com.yxt.warehouse.biz.warehousewarehouserack.WarehouseRackVo"> |
<select id="listPage" resultType="com.yxt.warehouse.biz.warehouserack.WarehouseRackVo"> |
||||
select |
select |
||||
a.*,b.areaName as locationName ,c.warehouseName as warehouseName |
a.*,b.areaName as locationName ,c.warehouseName as warehouseName |
||||
from warehouse_warehouse_rack a |
from warehouse_rack a |
||||
left join warehouse_warehouse_area b on b.sid =a.locationSid |
left join warehouse_area b on b.sid =a.locationSid |
||||
left join warehouse_warehouse_info c on c.sid = a.warehouseSid |
left join warehouse_info c on c.sid = a.warehouseSid |
||||
<where> |
<where> |
||||
${ew.sqlSegment} |
${ew.sqlSegment} |
||||
</where> |
</where> |
||||
</select> |
</select> |
||||
<select id="initialization" resultType="com.yxt.warehouse.biz.warehousewarehouserack.WarehouseRackVo"> |
<select id="initialization" resultType="com.yxt.warehouse.biz.warehouserack.WarehouseRackVo"> |
||||
select |
select |
||||
a.*,b.areaName as locationName ,c.warehouseName as warehouseName |
a.*,b.areaName as locationName ,c.warehouseName as warehouseName |
||||
from warehouse_warehouse_rack a |
from warehouse_rack a |
||||
left join warehouse_warehouse_area b on b.sid =a.locationSid |
left join warehouse_area b on b.sid =a.locationSid |
||||
left join warehouse_warehouse_info c on c.sid = a.warehouseSid |
left join warehouse_info c on c.sid = a.warehouseSid |
||||
where a.sid =#{sid} |
where a.sid =#{sid} |
||||
</select> |
</select> |
||||
<update id="updateBySidIsDelete"> |
<update id="updateBySidIsDelete"> |
||||
UPDATE warehouse_warehouse_rack |
UPDATE warehouse_rack |
||||
SET isDelete=1 |
SET isDelete=1 |
||||
where sid in |
where sid in |
||||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouserack; |
package com.yxt.warehouse.biz.warehouserack; |
||||
|
|
||||
import com.yxt.common.core.query.Query; |
import com.yxt.common.core.query.Query; |
||||
import lombok.Data; |
import lombok.Data; |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouserack; |
package com.yxt.warehouse.biz.warehouserack; |
||||
|
|
||||
import cn.hutool.core.bean.BeanUtil; |
import cn.hutool.core.bean.BeanUtil; |
||||
import cn.hutool.core.date.DateTime; |
import cn.hutool.core.date.DateTime; |
@ -1,4 +1,4 @@ |
|||||
package com.yxt.warehouse.biz.warehousewarehouserack; |
package com.yxt.warehouse.biz.warehouserack; |
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.yxt.common.core.vo.Vo; |
import com.yxt.common.core.vo.Vo; |
@ -0,0 +1,38 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousesmsbuyer; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseSmsBuyer extends BaseEntity { |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("收货人姓名") |
||||
|
private String buyerName; |
||||
|
@ApiModelProperty("收货人手机") |
||||
|
private String buyerMob; |
||||
|
@ApiModelProperty("收货省sid") |
||||
|
private String provinceSid; |
||||
|
@ApiModelProperty("") |
||||
|
private String province; |
||||
|
@ApiModelProperty("收货市sid") |
||||
|
private String citySid; |
||||
|
@ApiModelProperty("") |
||||
|
private String city; |
||||
|
@ApiModelProperty("收货县区sid") |
||||
|
private String countySid; |
||||
|
@ApiModelProperty("") |
||||
|
private String county; |
||||
|
|
||||
|
@ApiModelProperty("收货详细地址") |
||||
|
private String address; |
||||
|
|
||||
|
@ApiModelProperty("买家留言") |
||||
|
private String buyerMessage; |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousesmsbuyer; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseSmsBuyerDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("收货人姓名") |
||||
|
private String buyerName; |
||||
|
@ApiModelProperty("收货人手机") |
||||
|
private String buyerMob; |
||||
|
@ApiModelProperty("收货省sid") |
||||
|
private String provinceSid; |
||||
|
@ApiModelProperty("") |
||||
|
private String province; |
||||
|
@ApiModelProperty("收货市sid") |
||||
|
private String citySid; |
||||
|
@ApiModelProperty("") |
||||
|
private String city; |
||||
|
@ApiModelProperty("收货县区sid") |
||||
|
private String countySid; |
||||
|
@ApiModelProperty("") |
||||
|
private String county; |
||||
|
|
||||
|
@ApiModelProperty("收货详细地址") |
||||
|
private String address; |
||||
|
|
||||
|
@ApiModelProperty("买家留言") |
||||
|
private String buyerMessage; |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousesmsbuyer; |
||||
|
|
||||
|
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.Delete; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface WarehouseSmsBuyerMapper extends BaseMapper<WarehouseSmsBuyer> { |
||||
|
|
||||
|
IPage<WarehouseSmsBuyerVo> listPage(IPage<WarehouseSmsBuyer> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseSmsBuyer> qw); |
||||
|
WarehouseSmsBuyerVo initialization (@Param("sid") String sid); |
||||
|
|
||||
|
@Delete("delete from warehouse_sms_buyer where sid = #{sid}") |
||||
|
void delByMainSid(String billSid); |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
<?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.warehousesmsbuyer.WarehouseSmsBuyerMapper"> |
||||
|
|
||||
|
<select id="listPage" resultType="com.yxt.warehouse.biz.warehousesmsbuyer.WarehouseSmsBuyerVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from warehouse_sms_buyer a |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="initialization" resultType="com.yxt.warehouse.biz.warehousesmsbuyer.WarehouseSmsBuyerVo"> |
||||
|
select |
||||
|
a.* |
||||
|
from warehouse_sms_buyer a |
||||
|
where a.sid =#{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,13 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousesmsbuyer; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2024/6/6 16:42 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class WarehouseSmsBuyerQuery implements Query { |
||||
|
private String name; |
||||
|
} |
@ -0,0 +1,101 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousesmsbuyer; |
||||
|
|
||||
|
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 org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class WarehouseSmsBuyerService extends MybatisBaseService<WarehouseSmsBuyerMapper, WarehouseSmsBuyer> { |
||||
|
|
||||
|
|
||||
|
public ResultBean<PagerVo<WarehouseSmsBuyerVo>> listPage(PagerQuery<WarehouseSmsBuyerQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseSmsBuyerQuery query = pq.getParams(); |
||||
|
QueryWrapper<WarehouseSmsBuyer> qw = new QueryWrapper<>(); |
||||
|
if (StringUtils.isNotBlank(query.getName())) { |
||||
|
qw.like("rackName", query.getName()); |
||||
|
} |
||||
|
|
||||
|
IPage<WarehouseSmsBuyer> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<WarehouseSmsBuyerVo> pagging = baseMapper.listPage(page, qw); |
||||
|
PagerVo<WarehouseSmsBuyerVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
List<WarehouseSmsBuyerVo> records = pagging.getRecords(); |
||||
|
return rb.success().setData(p); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean<WarehouseSmsBuyerVo> initialization(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseSmsBuyerVo vo = baseMapper.initialization(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
public void delAll(String[] sids) { |
||||
|
delBySids(sids); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delete(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseSmsBuyer wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
baseMapper.deleteById(wmsWarehouseRack.getId()); |
||||
|
} |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
public ResultBean updateIsEnable(String sid, String isEnable) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
WarehouseSmsBuyer wmsWarehouseRack = fetchBySid(sid); |
||||
|
if (null != wmsWarehouseRack) { |
||||
|
wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); |
||||
|
baseMapper.updateById(wmsWarehouseRack); |
||||
|
} |
||||
|
return rb.success().setMsg("成功"); |
||||
|
} |
||||
|
|
||||
|
public void delByMainSid(String billSid) { |
||||
|
baseMapper.delByMainSid(billSid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public void saveOrUpdateDto(WarehouseSmsBuyerDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
this.insertByDto(dto); |
||||
|
return; |
||||
|
} |
||||
|
this.updateByDto(dto); |
||||
|
} |
||||
|
|
||||
|
public void insertByDto(WarehouseSmsBuyerDto dto) { |
||||
|
WarehouseSmsBuyer entity = new WarehouseSmsBuyer(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.insert(entity); |
||||
|
} |
||||
|
|
||||
|
public void updateByDto(WarehouseSmsBuyerDto dto) { |
||||
|
String dtoSid = dto.getSid(); |
||||
|
if (StringUtils.isBlank(dtoSid)) { |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
public WarehouseSmsBuyerVo fetchDetailsVoBySid(String sid) { |
||||
|
WarehouseSmsBuyer entity = fetchBySid(sid); |
||||
|
WarehouseSmsBuyerVo vo = new WarehouseSmsBuyerVo(); |
||||
|
BeanUtil.copyProperties(entity, vo); |
||||
|
return vo; |
||||
|
} |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.yxt.warehouse.biz.warehousesmsbuyer; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/4/12 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class WarehouseSmsBuyerVo { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("单据sid") |
||||
|
private String billSid; |
||||
|
@ApiModelProperty("收货人姓名") |
||||
|
private String buyerName; |
||||
|
@ApiModelProperty("收货人手机") |
||||
|
private String buyerMob; |
||||
|
@ApiModelProperty("收货省sid") |
||||
|
private String provinceSid; |
||||
|
@ApiModelProperty("") |
||||
|
private String province; |
||||
|
@ApiModelProperty("收货市sid") |
||||
|
private String citySid; |
||||
|
@ApiModelProperty("") |
||||
|
private String city; |
||||
|
@ApiModelProperty("收货县区sid") |
||||
|
private String countySid; |
||||
|
@ApiModelProperty("") |
||||
|
private String county; |
||||
|
|
||||
|
@ApiModelProperty("收货详细地址") |
||||
|
private String address; |
||||
|
|
||||
|
@ApiModelProperty("买家留言") |
||||
|
private String buyerMessage; |
||||
|
private String remark; |
||||
|
|
||||
|
} |
Loading…
Reference in new issue