storage入库相关接口
This commit is contained in:
47
src/main/java/com/yxt/storage/apiadmin/WmsAnsBillRest.java
Normal file
47
src/main/java/com/yxt/storage/apiadmin/WmsAnsBillRest.java
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
package com.yxt.storage.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.storage.biz.wmsansbill.*;
|
||||||
|
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/9
|
||||||
|
**/
|
||||||
|
@Api(tags = "预期到货通知单")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/apiadmin/WmsAnsBill")
|
||||||
|
public class WmsAnsBillRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsAnsBillService wmsAnsBillService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("saveOrUpdate")
|
||||||
|
@ApiOperation("新增修改保存")
|
||||||
|
ResultBean<String> saveOrUpdate(@RequestBody WmsAnsBillDto dto) {
|
||||||
|
return wmsAnsBillService.saveOrUpdateBill(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("listPage")
|
||||||
|
@ApiOperation("分页列表")
|
||||||
|
ResultBean<PagerVo<WmsAnsBillVo>> listPage(@RequestBody PagerQuery<WmsAnsBillQuery> pagerQuery) {
|
||||||
|
ResultBean<PagerVo<WmsAnsBillVo>> rb = ResultBean.fireFail();
|
||||||
|
PagerVo<WmsAnsBillVo> pv = wmsAnsBillService.listPages(pagerQuery);
|
||||||
|
return rb.success().setData(pv);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("details")
|
||||||
|
@ApiOperation("详情")
|
||||||
|
ResultBean<WmsAnsDetailsVo> details(@RequestParam("sid") String sid) {
|
||||||
|
return wmsAnsBillService.details(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.yxt.storage.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.storage.biz.wmsdistributebill.*;
|
||||||
|
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/WmsDistributeBill")
|
||||||
|
public class WmsDistributeBillRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsDistributeBillService wmsDistributeBillService;
|
||||||
|
|
||||||
|
@ApiOperation("分页列表")
|
||||||
|
@PostMapping("/listPage")
|
||||||
|
ResultBean<PagerVo<WmsDistributeBillVo>> listPage(@RequestBody PagerQuery<WmsDistributeBillQuery> pagerQuery) {
|
||||||
|
ResultBean<PagerVo<WmsDistributeBillVo>> rb = ResultBean.fireFail();
|
||||||
|
PagerVo<WmsDistributeBillVo> pv = wmsDistributeBillService.listPage(pagerQuery);
|
||||||
|
return rb.success().setData(pv);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("从出库新增配货单")
|
||||||
|
@GetMapping("/getInit")
|
||||||
|
ResultBean<WmsDistributeBillInitVo> getInit(@RequestParam("sid") String sid) {
|
||||||
|
return wmsDistributeBillService.getInit(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("详情/编辑初始化")
|
||||||
|
@GetMapping("/details")
|
||||||
|
ResultBean<WmsDistributeBillInitVo> details(@RequestParam("sid") String sid) {
|
||||||
|
return wmsDistributeBillService.details(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("新增修改保存")
|
||||||
|
@PostMapping("/saveOrUpdateBill")
|
||||||
|
ResultBean<String> saveOrUpdateBill(@RequestBody WmsDistributeBillDto dto) {
|
||||||
|
return wmsDistributeBillService.saveOrUpdateBill(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("确认")
|
||||||
|
@PostMapping("/confirm")
|
||||||
|
ResultBean<String> confirm(@RequestBody WmsDistributeBillDto dto) {
|
||||||
|
return wmsDistributeBillService.confirm(dto);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,28 +1,61 @@
|
|||||||
|
|
||||||
package com.yxt.storage.apiadmin;
|
package com.yxt.storage.apiadmin;
|
||||||
|
|
||||||
|
import com.yxt.common.base.utils.ExportExcelUtils;
|
||||||
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
|
||||||
import com.yxt.storage.biz.wmsinventoryrecord.WmsInventoryRecordListVo;
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
import com.yxt.storage.biz.wmsinventoryrecord.WmsInventoryRecordService;
|
import com.yxt.storage.biz.wmsinventoryrecord.*;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Api(tags = "库存出入库记录")
|
@Api(tags = "库存出入库记录")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/apiadmin/wmsinventoryrecord")
|
@RequestMapping("/apiadmin/inventory/wmsinventoryrecord")
|
||||||
public class WmsInventoryRecordRest {
|
public class WmsInventoryRecordRest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private WmsInventoryRecordService wmsInventoryRecordService;
|
private WmsInventoryRecordService wmsInventoryRecordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
HttpServletResponse response;
|
||||||
|
|
||||||
@ApiOperation("根据库存sid获取出入库记录")
|
@ApiOperation("根据库存sid获取出入库记录")
|
||||||
@GetMapping("/getWmsInventoryRecordList")
|
@GetMapping("/getWmsInventoryRecordList")
|
||||||
ResultBean<List<WmsInventoryRecordListVo>> getWmsInventoryRecordList(@RequestParam("sid") String sid) {
|
ResultBean<List<WmsInventoryRecordListVo>> getWmsInventoryRecordList(@RequestParam("sid") String sid) {
|
||||||
return wmsInventoryRecordService.getWmsInventoryRecordList(sid);
|
return wmsInventoryRecordService.getWmsInventoryRecordList(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("出入库查询")
|
||||||
|
@PostMapping("/pageList")
|
||||||
|
ResultBean<PagerVo<WmsInventoryRecordsVo>> pageList(@RequestBody PagerQuery<WmsInventoryRecordsQuery> pagerQuery) {
|
||||||
|
ResultBean<PagerVo<WmsInventoryRecordsVo>> rb = ResultBean.fireFail();
|
||||||
|
PagerVo<WmsInventoryRecordsVo> pv = wmsInventoryRecordService.listPage(pagerQuery);
|
||||||
|
return rb.success().setData(pv);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/exportExcel")
|
||||||
|
@ApiOperation(value = "导出")
|
||||||
|
public void exportExcel(@RequestBody WmsInventoryRecordsQuery query) {
|
||||||
|
//得到所有要导出的数据
|
||||||
|
List<WmsInventoryRecordsExcelVo> exportVoList = wmsInventoryRecordService.listExcel(query);
|
||||||
|
//定义导出的excel名字
|
||||||
|
String excelName = "出入库查询";
|
||||||
|
String fileNameURL = "";
|
||||||
|
try {
|
||||||
|
fileNameURL = URLEncoder.encode(excelName, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
ExportExcelUtils.export(fileNameURL, exportVoList, WmsInventoryRecordsExcelVo.class, response);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
51
src/main/java/com/yxt/storage/apiadmin/WmsInventoryRest.java
Normal file
51
src/main/java/com/yxt/storage/apiadmin/WmsInventoryRest.java
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
package com.yxt.storage.apiadmin;
|
||||||
|
|
||||||
|
import com.yxt.common.base.utils.ExportExcelUtils;
|
||||||
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
|
import com.yxt.storage.biz.wmsinventory.WmsInventory;
|
||||||
|
import com.yxt.storage.biz.wmsinventory.WmsInventoryQuery;
|
||||||
|
import com.yxt.storage.biz.wmsinventory.WmsInventoryService;
|
||||||
|
import com.yxt.storage.biz.wmsinventory.WmsInventoryVo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/2/28 10:51
|
||||||
|
*/
|
||||||
|
@Api(tags = "库存信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/apiadmin/inventory/wmsinventory")
|
||||||
|
public class WmsInventoryRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
WmsInventoryService wmsInventoryService;
|
||||||
|
@Autowired
|
||||||
|
HttpServletResponse response;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("分页列表")
|
||||||
|
@PostMapping("/listPage")
|
||||||
|
public ResultBean<PagerVo<WmsInventoryVo>> listPage(@RequestBody PagerQuery<WmsInventoryQuery> pq) {
|
||||||
|
ResultBean<PagerVo<WmsInventoryVo>> rb = ResultBean.fireFail();
|
||||||
|
PagerVo<WmsInventoryVo> pv = wmsInventoryService.listPage(pq);
|
||||||
|
return rb.success().setData(pv);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除/批量删除")
|
||||||
|
@DeleteMapping("/delBySids")
|
||||||
|
ResultBean delBySids(@RequestBody String[] sids) {
|
||||||
|
return wmsInventoryService.delAllBySids(sids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
44
src/main/java/com/yxt/storage/apiadmin/WmsOutBillRest.java
Normal file
44
src/main/java/com/yxt/storage/apiadmin/WmsOutBillRest.java
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
package com.yxt.storage.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.storage.biz.wmsoutbill.*;
|
||||||
|
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/WmsOutBill")
|
||||||
|
public class WmsOutBillRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsOutBillService wmsOutBillService;
|
||||||
|
|
||||||
|
@ApiOperation("分页列表")
|
||||||
|
@PostMapping("/listPage")
|
||||||
|
ResultBean<PagerVo<WmsOutBillVo>> pageList(@RequestBody PagerQuery<WmsOutBillQuery> pagerQuery) {
|
||||||
|
ResultBean<PagerVo<WmsOutBillVo>> rb = ResultBean.fireFail();
|
||||||
|
PagerVo<WmsOutBillVo> pv = wmsOutBillService.listPage(pagerQuery);
|
||||||
|
return rb.success().setData(pv);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("出库保存修改")
|
||||||
|
@PostMapping("/saveOrUpdateOutBill")
|
||||||
|
ResultBean saveOrUpdateOutBill(@RequestBody WmsOutBillDto dto) {
|
||||||
|
return wmsOutBillService.saveOrUpdateOutBill(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("详情")
|
||||||
|
@GetMapping("/details")
|
||||||
|
ResultBean<WmsOutBillDetailsVo> details(@RequestParam("sid") String sid) {
|
||||||
|
return wmsOutBillService.details(sid);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.yxt.storage.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.storage.biz.wmsreceiptbill.*;
|
||||||
|
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/3
|
||||||
|
**/
|
||||||
|
@Api(tags = "收货单据")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/apiadmin/inventory/WmsReceiptBill")
|
||||||
|
public class WmsReceiptBillRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsReceiptBillService wmsReceiptBillService;
|
||||||
|
|
||||||
|
@ApiOperation("分页列表")
|
||||||
|
@PostMapping("/listPage")
|
||||||
|
public ResultBean<PagerVo<WmsReceiptBillPageVo>> listPage(@RequestBody PagerQuery<WmsReceiptBillQuery> pq) {
|
||||||
|
ResultBean<PagerVo<WmsReceiptBillPageVo>> rb = ResultBean.fireFail();
|
||||||
|
PagerVo<WmsReceiptBillPageVo> pv = wmsReceiptBillService.listPage(pq);
|
||||||
|
return rb.success().setData(pv);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("新增修改保存")
|
||||||
|
@PostMapping("/saveOrUpdate")
|
||||||
|
ResultBean<String> saveOrUpdate(@RequestBody WmsReceiptBillDto2 dto) {
|
||||||
|
return wmsReceiptBillService.saveOrUpdateBill2(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("通知单收货单初始化")
|
||||||
|
@GetMapping("/getInitDetails")
|
||||||
|
ResultBean<WmsReceiptBillVo> getInitDetails(@RequestParam("sourceSid") String sourceSid) {
|
||||||
|
return wmsReceiptBillService.getInitDetails(sourceSid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("收货单据编辑初始化/详情")
|
||||||
|
@GetMapping("/getDetailsInit")
|
||||||
|
ResultBean<WmsReceiptBillInitVo> getDetailsInit(@RequestParam("sid") String sid) {
|
||||||
|
return wmsReceiptBillService.getDetailsInit(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("确认")
|
||||||
|
@PostMapping("/confirm")
|
||||||
|
ResultBean<String> confirm(@RequestBody WmsReceiptBillDto2 dto) {
|
||||||
|
return wmsReceiptBillService.confirm(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除/批量删除")
|
||||||
|
@DeleteMapping("/delBySids")
|
||||||
|
ResultBean delBySids(@RequestBody String[] sids) {
|
||||||
|
return wmsReceiptBillService.delAllBySids(sids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
69
src/main/java/com/yxt/storage/apiadmin/WmsShelfBillRest.java
Normal file
69
src/main/java/com/yxt/storage/apiadmin/WmsShelfBillRest.java
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
package com.yxt.storage.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.storage.biz.wmsshelfbill.*;
|
||||||
|
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/11
|
||||||
|
**/
|
||||||
|
@Api(tags = "上货架")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/apiadmin/WmsShelfBill")
|
||||||
|
public class WmsShelfBillRest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsShelfBillService wmsShelfBillService;
|
||||||
|
|
||||||
|
@ApiOperation("分页列表")
|
||||||
|
@PostMapping("/listPage")
|
||||||
|
public ResultBean<PagerVo<WmsShelfBillVo>> listPage(@RequestBody PagerQuery<WmsShelfBillQuery> pq) {
|
||||||
|
ResultBean<PagerVo<WmsShelfBillVo>> rb = ResultBean.fireFail();
|
||||||
|
PagerVo<WmsShelfBillVo> pv = wmsShelfBillService.listPage(pq);
|
||||||
|
return rb.success().setData(pv);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("新增修改保存")
|
||||||
|
@PostMapping("/saveOrUpdate")
|
||||||
|
ResultBean saveOrUpdate(@RequestBody WmsShelfBillDto dto) {
|
||||||
|
return wmsShelfBillService.saveOrUpdateShelf(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除/批量删除")
|
||||||
|
@DeleteMapping("/delBySids")
|
||||||
|
ResultBean delBySids(@RequestBody String[] sids) {
|
||||||
|
return wmsShelfBillService.delAllBySids(sids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("详情")
|
||||||
|
@GetMapping("/details")
|
||||||
|
ResultBean<ShelfDetailsVo> details(@RequestParam("sid") String sid) {
|
||||||
|
return wmsShelfBillService.details(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增初始化
|
||||||
|
*
|
||||||
|
* @param sid 收货单据sid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增初始化")
|
||||||
|
@GetMapping("/getInit")
|
||||||
|
ResultBean<ShelfInitVo> getInit(@RequestParam("sid") String sid, @RequestParam("orgPath") String orgPath, @RequestParam("userSid") String userSid) {
|
||||||
|
return wmsShelfBillService.getInit(sid, orgPath, userSid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("确认")
|
||||||
|
@PostMapping("/confirm")
|
||||||
|
ResultBean<String> confirm(@RequestBody WmsShelfBillDto dto) {
|
||||||
|
return wmsShelfBillService.confirm(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
51
src/main/java/com/yxt/storage/biz/wmsansbill/WmsAnsBill.java
Normal file
51
src/main/java/com/yxt/storage/biz/wmsansbill/WmsAnsBill.java
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbill;
|
||||||
|
|
||||||
|
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/9
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsAnsBill extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty("外部单号(业务单据编号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("业务类型key(采购预约、调拨预约、其他预约)")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value(采购预约、调拨预约、其他预约)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("货物状态(在途、部分收货、已收货、已取消)")
|
||||||
|
private Integer billState;
|
||||||
|
@ApiModelProperty("审核状态(待审核、审核通过、审核拒绝)")
|
||||||
|
private String reviewStatus;
|
||||||
|
@ApiModelProperty("拒绝原因")
|
||||||
|
private String refuseReason;
|
||||||
|
@ApiModelProperty("联系人")
|
||||||
|
private String contact;
|
||||||
|
@ApiModelProperty("联系人手机")
|
||||||
|
private String mobile;
|
||||||
|
@ApiModelProperty("供应商sid")
|
||||||
|
private String supplierSid;
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("货主sid")
|
||||||
|
private String goodsOwnerSid;
|
||||||
|
@ApiModelProperty("货主")
|
||||||
|
private String goodsOwner;
|
||||||
|
@ApiModelProperty("预计到货日期")
|
||||||
|
private Date deliveryDate;
|
||||||
|
@ApiModelProperty("使用组织sid")
|
||||||
|
private String useOrgSid;
|
||||||
|
@ApiModelProperty("创建组织sid")
|
||||||
|
private String createOrgSid;
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbill;
|
||||||
|
|
||||||
|
import com.yxt.storage.biz.wmsansbilldetail.WmsAnsBillDetailDto;
|
||||||
|
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/9
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsAnsBillDto {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
|
||||||
|
@ApiModelProperty("外部单号(业务单据编号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("业务类型key(采购预约、调拨预约、其他预约)")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value(采购预约、调拨预约、其他预约)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("货物状态(在途、部分收货、已收货、已取消)")
|
||||||
|
private Integer billState;
|
||||||
|
@ApiModelProperty("审核状态(待审核、审核通过、审核拒绝)")
|
||||||
|
private String reviewStatus;
|
||||||
|
@ApiModelProperty("拒绝原因")
|
||||||
|
private String refuseReason;
|
||||||
|
@ApiModelProperty("联系人")
|
||||||
|
private String contact;
|
||||||
|
@ApiModelProperty("联系人手机")
|
||||||
|
private String mobile;
|
||||||
|
@ApiModelProperty("供应商sid")
|
||||||
|
private String supplierSid;
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("货主sid")
|
||||||
|
private String goodsOwnerSid;
|
||||||
|
@ApiModelProperty("货主")
|
||||||
|
private String goodsOwner;
|
||||||
|
@ApiModelProperty("预计到货日期")
|
||||||
|
private Date deliveryDate;
|
||||||
|
@ApiModelProperty("使用组织sid")
|
||||||
|
private String useOrgSid;
|
||||||
|
@ApiModelProperty("创建组织sid")
|
||||||
|
private String createOrgSid;
|
||||||
|
|
||||||
|
private List<WmsAnsBillDetailDto> wmsAnsBillDetailList = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbill;
|
||||||
|
|
||||||
|
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.wms.biz.inventory.wmsansbilldetail.WmsAnsBillDetail;
|
||||||
|
import com.yxt.wms.biz.inventory.wmsansbilldetail.WmsAnsBillDetailVo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/9
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsAnsBillMapper extends BaseMapper<WmsAnsBill> {
|
||||||
|
IPage<WmsAnsBillDetailVo> listPage(IPage<WmsAnsBillDetail> page, @Param(Constants.WRAPPER) QueryWrapper<WmsAnsBillDetail> qw);
|
||||||
|
|
||||||
|
IPage<WmsAnsBillVo> listPages(IPage<WmsAnsBill> page, @Param(Constants.WRAPPER) QueryWrapper<WmsAnsBill> qw);
|
||||||
|
|
||||||
|
WmsAnsDetailsVo details(String sid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<?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.wms.biz.inventory.wmsansbill.WmsAnsBillMapper">
|
||||||
|
<select id="listPage" resultType="com.yxt.wms.biz.inventory.wmsansbilldetail.WmsAnsBillDetailVo">
|
||||||
|
select wd.goodsSkuSid, wd.goodsSpuName, wd.goodsSkuCode, wd.goodsSkuTitle, wd.goodSpuSid
|
||||||
|
from wms_ans_bill_detail wd
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="listPages" resultType="com.yxt.wms.biz.inventory.wmsansbill.WmsAnsBillVo">
|
||||||
|
select wab.sid,
|
||||||
|
wab.billNo,
|
||||||
|
DATE_FORMAT(wab.createTime, '%Y-%m-%d') as createTime,
|
||||||
|
wab.createByName,
|
||||||
|
wab.sourceBillNo,
|
||||||
|
wab.busTypeValue,
|
||||||
|
wab.supplierName,
|
||||||
|
wab.contact,
|
||||||
|
wab.mobile,
|
||||||
|
DATE_FORMAT(wab.deliveryDate, '%Y-%m-%d') as deliveryDate,
|
||||||
|
wab.billState,
|
||||||
|
wab.reviewStatus,
|
||||||
|
wab.refuseReason
|
||||||
|
from wms_ans_bill wab
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
order by wab.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="details" resultType="com.yxt.wms.biz.inventory.wmsansbill.WmsAnsDetailsVo">
|
||||||
|
select wab.billNo,
|
||||||
|
wab.createByName,
|
||||||
|
DATE_FORMAT(wab.createTime, '%Y-%m-%d') as createTime,
|
||||||
|
wab.sourceBillNo,
|
||||||
|
wab.busTypeKey,
|
||||||
|
wab.busTypeValue,
|
||||||
|
wab.supplierSid,
|
||||||
|
wab.supplierName,
|
||||||
|
DATE_FORMAT(wab.deliveryDate, '%Y-%m-%d') as deliveryDate,
|
||||||
|
wab.billState,
|
||||||
|
wab.reviewStatus
|
||||||
|
from wms_ans_bill wab
|
||||||
|
where sid = #{sid}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbill;
|
||||||
|
|
||||||
|
import com.yxt.common.core.query.Query;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/11
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsAnsBillQuery implements Query {
|
||||||
|
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("开始时间")
|
||||||
|
private String createTimeStart;
|
||||||
|
@ApiModelProperty("结束时间")
|
||||||
|
private String createTimeEnd;
|
||||||
|
@ApiModelProperty("业务类型")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("供应商")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("预期到货日期开始时间")
|
||||||
|
private String deliveryDateStart;
|
||||||
|
@ApiModelProperty("预期到货日期结束时间")
|
||||||
|
private String deliveryDateEnd;
|
||||||
|
//单据状态
|
||||||
|
private String billState;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态")
|
||||||
|
private String reviewStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("外部单号(业务单据编号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
}
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbill;
|
||||||
|
|
||||||
|
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.storage.biz.wmsansbilldetail.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/9
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class WmsAnsBillService extends MybatisBaseService<WmsAnsBillMapper, WmsAnsBill> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsAnsBillDetailService wmsAnsBillDetailService;
|
||||||
|
|
||||||
|
public ResultBean<String> saveOrUpdateBill(WmsAnsBillDto dto) {
|
||||||
|
ResultBean<String> rb = ResultBean.fireFail();
|
||||||
|
String sid = dto.getSid();
|
||||||
|
if (StringUtils.isBlank(sid)) {
|
||||||
|
WmsAnsBill wmsAnsBill = new WmsAnsBill();
|
||||||
|
BeanUtil.copyProperties(dto, wmsAnsBill, "sid");
|
||||||
|
sid = wmsAnsBill.getSid();
|
||||||
|
List<WmsAnsBillDetailDto> wmsAnsBillDetailList = dto.getWmsAnsBillDetailList();
|
||||||
|
wmsAnsBillDetailList.removeAll(Collections.singleton(null));
|
||||||
|
if (!wmsAnsBillDetailList.isEmpty()) {
|
||||||
|
wmsAnsBillDetailService.saveOrUpdateDetailsList(sid, wmsAnsBillDetailList);
|
||||||
|
} else {
|
||||||
|
return rb.setMsg("单据明细不能为空");
|
||||||
|
}
|
||||||
|
baseMapper.insert(wmsAnsBill);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
WmsAnsBill wmsAnsBill = fetchBySid(sid);
|
||||||
|
if (wmsAnsBill == null) {
|
||||||
|
return rb.setMsg("该单据不存在");
|
||||||
|
}
|
||||||
|
BeanUtil.copyProperties(dto, wmsAnsBill, "sid");
|
||||||
|
List<WmsAnsBillDetailDto> wmsAnsBillDetailList = dto.getWmsAnsBillDetailList();
|
||||||
|
wmsAnsBillDetailList.removeAll(Collections.singleton(null));
|
||||||
|
if (!wmsAnsBillDetailList.isEmpty()) {
|
||||||
|
wmsAnsBillDetailService.saveOrUpdateDetailsList(sid, wmsAnsBillDetailList);
|
||||||
|
} else {
|
||||||
|
return rb.setMsg("单据明细不能为空");
|
||||||
|
}
|
||||||
|
baseMapper.updateById(wmsAnsBill);
|
||||||
|
|
||||||
|
}
|
||||||
|
return rb.success().setData(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PagerVo<WmsAnsBillVo> listPages(PagerQuery<WmsAnsBillQuery> pagerQuery) {
|
||||||
|
WmsAnsBillQuery query = pagerQuery.getParams();
|
||||||
|
QueryWrapper<WmsAnsBill> qw = new QueryWrapper<>();
|
||||||
|
//ToDo:添加查询条件
|
||||||
|
if (query != null) {
|
||||||
|
//单据编号
|
||||||
|
if (StringUtils.isNotBlank(query.getBillNo())) {
|
||||||
|
qw.like("wab.billNo", query.getBillNo());
|
||||||
|
}
|
||||||
|
//单据日期开始时间-单据日期结束时间
|
||||||
|
qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wab.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')").
|
||||||
|
apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wab.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')"
|
||||||
|
);
|
||||||
|
//业务类型
|
||||||
|
if (StringUtils.isNotBlank(query.getBusTypeKey())) {
|
||||||
|
qw.eq("wab.busTypeKey", query.getBusTypeKey());
|
||||||
|
}
|
||||||
|
//供应商
|
||||||
|
if (StringUtils.isNotBlank(query.getSupplierName())) {
|
||||||
|
qw.like("wab.supplierName", query.getSupplierName());
|
||||||
|
}
|
||||||
|
//预期到货日期开始时间-预期到货日期结束时间
|
||||||
|
qw.apply(StringUtils.isNotBlank(query.getDeliveryDateStart()), "date_format (wab.deliveryDate,'%Y-%m-%d') >= date_format('" + query.getDeliveryDateStart() + "','%Y-%m-%d')").
|
||||||
|
apply(StringUtils.isNotBlank(query.getDeliveryDateEnd()), "date_format (wab.deliveryDate,'%Y-%m-%d') <= date_format('" + query.getDeliveryDateEnd() + "','%Y-%m-%d')"
|
||||||
|
);
|
||||||
|
//单据状态
|
||||||
|
if (StringUtils.isNotBlank(query.getBillState())) {
|
||||||
|
qw.like("wab.billState", query.getBillState());
|
||||||
|
}
|
||||||
|
|
||||||
|
//审核状态
|
||||||
|
if (StringUtils.isNotBlank(query.getReviewStatus())) {
|
||||||
|
qw.like("wab.reviewStatus", query.getReviewStatus());
|
||||||
|
}
|
||||||
|
//外部编号
|
||||||
|
if (StringUtils.isNotBlank(query.getSourceBillNo())) {
|
||||||
|
qw.like("wab.sourceBillNo", query.getSourceBillNo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IPage<WmsAnsBill> page = PagerUtil.queryToPage(pagerQuery);
|
||||||
|
IPage<WmsAnsBillVo> pagging = baseMapper.listPages(page, qw);
|
||||||
|
PagerVo<WmsAnsBillVo> p = PagerUtil.pageToVo(pagging, null);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<WmsAnsDetailsVo> details(String sid) {
|
||||||
|
ResultBean<WmsAnsDetailsVo> rb = ResultBean.fireFail();
|
||||||
|
WmsAnsDetailsVo wmsAnsDetailsVo = baseMapper.details(sid);
|
||||||
|
if (wmsAnsDetailsVo != null) {
|
||||||
|
List<WmsAnsListDetailsVo> list = wmsAnsBillDetailService.selectByBillSid(sid);
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
wmsAnsDetailsVo.setList(list);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return rb.setMsg("该单据不存在");
|
||||||
|
}
|
||||||
|
return rb.success().setData(wmsAnsDetailsVo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbill;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/11
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsAnsBillVo {
|
||||||
|
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("外部单号(业务单据编号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("业务类型value(采购预约、调拨预约、其他预约)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("联系人")
|
||||||
|
private String contact;
|
||||||
|
@ApiModelProperty("联系人手机")
|
||||||
|
private String mobile;
|
||||||
|
@ApiModelProperty("预计到货日期")
|
||||||
|
private String deliveryDate;
|
||||||
|
|
||||||
|
//单据状态
|
||||||
|
private String billState;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态(待审核、审核通过、审核拒绝)")
|
||||||
|
private String reviewStatus;
|
||||||
|
@ApiModelProperty("拒绝原因")
|
||||||
|
private String refuseReason;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbill;
|
||||||
|
|
||||||
|
import com.yxt.storage.biz.wmsansbilldetail.WmsAnsListDetailsVo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/12
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsAnsDetailsVo {
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("外部单号(业务单据编号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("业务类型key(采购预约、调拨预约、其他预约)")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value(采购预约、调拨预约、其他预约)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("供应商sid")
|
||||||
|
private String supplierSid;
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("预计到货日期")
|
||||||
|
private String deliveryDate;
|
||||||
|
|
||||||
|
//单据状态
|
||||||
|
private String billState;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态(待审核、审核通过、审核拒绝)")
|
||||||
|
private String reviewStatus;
|
||||||
|
@ApiModelProperty("拒绝原因")
|
||||||
|
private String refuseReason;
|
||||||
|
|
||||||
|
private List<WmsAnsListDetailsVo> list = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbilldetail;
|
||||||
|
|
||||||
|
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/9
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsAnsBillDetail extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty("单据sid")
|
||||||
|
private String billSid;
|
||||||
|
@ApiModelProperty("商品基础信息sid")
|
||||||
|
private String goodSpuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品Skusid")
|
||||||
|
private String goodsSkuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
@ApiModelProperty("商品编码(图号)")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
@ApiModelProperty("单位成本(采购价)")
|
||||||
|
private String cost;
|
||||||
|
@ApiModelProperty("预约数量(采购订单数量)")
|
||||||
|
private String orderCount;
|
||||||
|
@ApiModelProperty("待入库数量-根据收货单计算")
|
||||||
|
private Integer waitInCount;
|
||||||
|
@ApiModelProperty("实际入库数量-根据收货单计算")
|
||||||
|
private Integer actualInCount;
|
||||||
|
@ApiModelProperty("税额")
|
||||||
|
private BigDecimal taxAmount;
|
||||||
|
@ApiModelProperty("含税价")
|
||||||
|
private BigDecimal taxPrice;
|
||||||
|
@ApiModelProperty("金额")
|
||||||
|
private BigDecimal amount;
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/9
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsAnsBillDetailDto {
|
||||||
|
|
||||||
|
@ApiModelProperty("商品基础信息sid")
|
||||||
|
private String goodSpuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品Skusid")
|
||||||
|
private String goodsSkuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
@ApiModelProperty("商品编码(图号)")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
@ApiModelProperty("单位成本(采购价)")
|
||||||
|
private String cost;
|
||||||
|
@ApiModelProperty("预约数量(采购订单数量)")
|
||||||
|
private String orderCount;
|
||||||
|
@ApiModelProperty("税额")
|
||||||
|
private String taxAmount;
|
||||||
|
@ApiModelProperty("含税价")
|
||||||
|
private String taxPrice;
|
||||||
|
@ApiModelProperty("金额")
|
||||||
|
private String amount;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbilldetail;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/9
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsAnsBillDetailMapper extends BaseMapper<WmsAnsBillDetail> {
|
||||||
|
int deleteDetails(String sid);
|
||||||
|
|
||||||
|
List<WmsAnsListDetailsVo> selectByBillSid(String sid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?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.storage.biz.wmsansbilldetail.WmsAnsBillDetailMapper">
|
||||||
|
<delete id="deleteDetails">
|
||||||
|
delete
|
||||||
|
from wms_ans_bill_detail
|
||||||
|
where billSid = #{sid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectByBillSid" resultType="com.yxt.storage.biz.wmsansbilldetail.WmsAnsListDetailsVo">
|
||||||
|
select wd.goodsSkuTitle,
|
||||||
|
wd.goodsSkuCode,
|
||||||
|
wd.goodsSkuOwnSpec,
|
||||||
|
wd.unit,
|
||||||
|
wd.orderCount,
|
||||||
|
wd.waitInCount,
|
||||||
|
wd.actualInCount,
|
||||||
|
wd.cost,
|
||||||
|
wd.taxAmount,
|
||||||
|
wd.taxPrice,
|
||||||
|
wd.amount
|
||||||
|
from wms_ans_bill_detail wd
|
||||||
|
where billSid = #{sid}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbilldetail;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/9
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class WmsAnsBillDetailService extends MybatisBaseService<WmsAnsBillDetailMapper, WmsAnsBillDetail> {
|
||||||
|
public void saveOrUpdateDetailsList(String sid, List<WmsAnsBillDetailDto> wmsAnsBillDetailList) {
|
||||||
|
baseMapper.deleteDetails(sid);
|
||||||
|
wmsAnsBillDetailList.forEach(v->{
|
||||||
|
WmsAnsBillDetail wmsAnsBillDetail = new WmsAnsBillDetail();
|
||||||
|
BeanUtil.copyProperties(v,wmsAnsBillDetail,"sid");
|
||||||
|
wmsAnsBillDetail.setBillSid(sid);
|
||||||
|
baseMapper.insert(wmsAnsBillDetail);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WmsAnsListDetailsVo> selectByBillSid(String sid) {
|
||||||
|
return baseMapper.selectByBillSid(sid);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/10
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsAnsBillDetailVo {
|
||||||
|
|
||||||
|
@ApiModelProperty("来源单sid")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("来源单号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("商品基础信息sid")
|
||||||
|
private String goodSpuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品Skusid")
|
||||||
|
private String goodsSkuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
@ApiModelProperty("商品编码(图号)")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.yxt.storage.biz.wmsansbilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/11
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsAnsListDetailsVo {
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
@ApiModelProperty("商品编码(图号)")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
//仓库
|
||||||
|
private String warehouseName;
|
||||||
|
//库位
|
||||||
|
private String warehouseRack;
|
||||||
|
|
||||||
|
//预约数量
|
||||||
|
@ApiModelProperty("预约数量(采购订单数量)")
|
||||||
|
private String orderCount;
|
||||||
|
//待收货数量
|
||||||
|
@ApiModelProperty("待入库数量-根据收货单计算")
|
||||||
|
private Integer waitInCount;
|
||||||
|
//已收货数量
|
||||||
|
@ApiModelProperty("实际入库数量-根据收货单计算")
|
||||||
|
private Integer actualInCount;
|
||||||
|
//入库价
|
||||||
|
@ApiModelProperty("单位成本(采购价)")
|
||||||
|
private String cost;
|
||||||
|
@ApiModelProperty("税额")
|
||||||
|
private String taxAmount;
|
||||||
|
@ApiModelProperty("含税价")
|
||||||
|
private String taxPrice;
|
||||||
|
//采购金额
|
||||||
|
@ApiModelProperty("金额")
|
||||||
|
private String amount;
|
||||||
|
|
||||||
|
|
||||||
|
/* @ApiModelProperty("商品基础信息sid")
|
||||||
|
private String goodSpuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品Skusid")
|
||||||
|
private String goodsSkuSid;*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.yxt.storage.biz.wmsdistributebill;
|
||||||
|
|
||||||
|
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 WmsDistributeBill 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.storage.biz.wmsdistributebill;
|
||||||
|
|
||||||
|
import com.yxt.wms.biz.inventory.wmsdistributebilldetail.WmsDistributeBillDetailDto;
|
||||||
|
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 WmsDistributeBillDto {
|
||||||
|
|
||||||
|
@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<WmsDistributeBillDetailDto> detailList = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.yxt.storage.biz.wmsdistributebill;
|
||||||
|
|
||||||
|
import com.yxt.storage.biz.wmsdistributebilldetail.WmsDistributeBillDetailVo;
|
||||||
|
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 WmsDistributeBillInitVo {
|
||||||
|
|
||||||
|
//单据编号
|
||||||
|
private String billNo;
|
||||||
|
|
||||||
|
//制单人
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
|
||||||
|
//单据日期
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
//来源单号
|
||||||
|
@ApiModelProperty("来源单号(出库单)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
|
||||||
|
//单据状态
|
||||||
|
@ApiModelProperty("单据状态")
|
||||||
|
private String billState;
|
||||||
|
|
||||||
|
//备注
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
private List<WmsDistributeBillDetailVo> detailsList = new ArrayList<>();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.yxt.storage.biz.wmsdistributebill;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsDistributeBillMapper extends BaseMapper<WmsDistributeBill> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?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.wms.biz.inventory.wmsdistributebill.WmsDistributeBillMapper">
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.yxt.storage.biz.wmsdistributebill;
|
||||||
|
|
||||||
|
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 WmsDistributeBillQuery 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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.yxt.storage.biz.wmsdistributebill;
|
||||||
|
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class WmsDistributeBillService extends MybatisBaseService<WmsDistributeBillMapper, WmsDistributeBill> {
|
||||||
|
public PagerVo<WmsDistributeBillVo> listPage(PagerQuery<WmsDistributeBillQuery> pagerQuery) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<WmsDistributeBillInitVo> getInit(String sid) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<WmsDistributeBillInitVo> details(String sid) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<String> saveOrUpdateBill(WmsDistributeBillDto dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<String> confirm(WmsDistributeBillDto dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.yxt.storage.biz.wmsdistributebill;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsDistributeBillVo {
|
||||||
|
|
||||||
|
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.storage.biz.wmsdistributebilldetail;
|
||||||
|
|
||||||
|
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 WmsDistributeBillDetail 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.storage.biz.wmsdistributebilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsDistributeBillDetailDto {
|
||||||
|
|
||||||
|
@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,42 @@
|
|||||||
|
package com.yxt.storage.biz.wmsdistributebilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsDistributeBillDetailVo {
|
||||||
|
|
||||||
|
@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,58 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventory;
|
||||||
|
|
||||||
|
import com.yxt.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/2/28 8:38
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsInventory extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("商品ID(唯一编码,入库时生成,生成规则为商品编码+YYMMdd+4位流水)")
|
||||||
|
private String goodsID;
|
||||||
|
@ApiModelProperty("商品基础信息sid")
|
||||||
|
private String goodSpuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品Skusid")
|
||||||
|
private String goodsSkuSid;
|
||||||
|
@ApiModelProperty("商品Sku名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
@ApiModelProperty("商品编码(图号)")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
@ApiModelProperty("现有量")
|
||||||
|
private BigDecimal count;
|
||||||
|
@ApiModelProperty("分配量(锁定数量,出库申请通过,但未实际出库)")
|
||||||
|
private BigDecimal allocateCount;
|
||||||
|
@ApiModelProperty("拣货量")
|
||||||
|
private BigDecimal pickCount;
|
||||||
|
@ApiModelProperty("冻结量")
|
||||||
|
private BigDecimal freezeCount;
|
||||||
|
@ApiModelProperty("仓库sid")
|
||||||
|
private String warehouseSid;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位编码")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("首次入库日期-计算库龄的依据")
|
||||||
|
private Date firstInDate;
|
||||||
|
@ApiModelProperty("创建组织sid")
|
||||||
|
private String createOrgSid;
|
||||||
|
@ApiModelProperty("使用组织sid")
|
||||||
|
private String useOrgSid;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventory;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/2/26 13:40
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsInventoryMapper extends BaseMapper<WmsInventory> {
|
||||||
|
|
||||||
|
IPage<WmsInventoryVo> listPage(IPage<WmsInventory> page, @Param(Constants.WRAPPER) QueryWrapper<WmsInventory> qw);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?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.storage.biz.wmsinventory.WmsInventoryMapper">
|
||||||
|
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||||
|
<!-- ${ew.customSqlSegment} -->
|
||||||
|
|
||||||
|
<select id="listPage" resultType="com.yxt.storage.biz.wmsinventory.WmsInventoryVo">
|
||||||
|
select a.goodsID,
|
||||||
|
a.sid,
|
||||||
|
a.goodsSpuName,
|
||||||
|
a.goodsSkuCode,
|
||||||
|
a.goodsSkuOwnSpec,
|
||||||
|
a.unit,
|
||||||
|
a.warehouseName,
|
||||||
|
a.warehouseRackCode,
|
||||||
|
a.count,
|
||||||
|
a.allocateCount,
|
||||||
|
a.batchNumber,
|
||||||
|
DATE_FORMAT(a.firstInDate, '%Y-%m-%d') as firstInDate
|
||||||
|
from wms_inventory a
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventory;
|
||||||
|
|
||||||
|
import com.yxt.common.core.query.Query;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/2/26 13:37
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsInventoryQuery implements Query {
|
||||||
|
@ApiModelProperty("goodsID")
|
||||||
|
private String goodsID;
|
||||||
|
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
|
||||||
|
@ApiModelProperty("商品编码")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库")
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
@ApiModelProperty("库位编码")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
|
||||||
|
//供应商
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventory;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/19
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsInventorySaveDto {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("创建者sid")
|
||||||
|
private String createBySid;
|
||||||
|
@ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("商品ID(唯一编码,入库时生成,生成规则为商品编码+YYMMdd+4位流水)")
|
||||||
|
private String goodsID;
|
||||||
|
@ApiModelProperty("商品基础信息sid")
|
||||||
|
private String goodSpuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品Skusid")
|
||||||
|
private String goodsSkuSid;
|
||||||
|
@ApiModelProperty("商品Sku名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
@ApiModelProperty("商品编码")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
@ApiModelProperty("现有量")
|
||||||
|
private String count;
|
||||||
|
@ApiModelProperty("分配量")
|
||||||
|
private String allocateCount;
|
||||||
|
@ApiModelProperty("拣货量")
|
||||||
|
private String pickCount;
|
||||||
|
@ApiModelProperty("冻结量")
|
||||||
|
private String freezeCount;
|
||||||
|
@ApiModelProperty("仓库sid")
|
||||||
|
private String warehouseSid;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位编码")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("首次入库日期")
|
||||||
|
private String firstInDate;
|
||||||
|
@ApiModelProperty("创建组织sid")
|
||||||
|
private String createOrgSid;
|
||||||
|
@ApiModelProperty("使用组织sid")
|
||||||
|
private String useOrgSid;
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventory;
|
||||||
|
|
||||||
|
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.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/2/26 13:40
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper, WmsInventory> {
|
||||||
|
public PagerVo<WmsInventoryVo> listPage(PagerQuery<WmsInventoryQuery> pq) {
|
||||||
|
WmsInventoryQuery query = pq.getParams();
|
||||||
|
QueryWrapper<WmsInventory> qw = new QueryWrapper<>();
|
||||||
|
if (StringUtils.isNotBlank(query.getGoodsID())) {
|
||||||
|
qw.like("a.goodsID", query.getGoodsID());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getWarehouseName())) {
|
||||||
|
qw.like("a.warehouseName", query.getWarehouseName());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getGoodsSkuCode())) {
|
||||||
|
qw.like("a.goodsSkuCode", query.getGoodsSkuCode());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getGoodsSpuName())) {
|
||||||
|
qw.like("a.goodsSpuName", query.getGoodsSpuName());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getBatchNumber())) {
|
||||||
|
qw.like("a.batchNumber", query.getBatchNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
IPage<WmsInventory> page = PagerUtil.queryToPage(pq);
|
||||||
|
IPage<WmsInventoryVo> pagging = baseMapper.listPage(page, qw);
|
||||||
|
PagerVo<WmsInventoryVo> p = PagerUtil.pageToVo(pagging, null);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<String> saveWmsInventory(WmsInventorySaveDto dto) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
String sid = dto.getSid();
|
||||||
|
if (StringUtils.isBlank(sid)) {
|
||||||
|
WmsInventory wmsInventory = new WmsInventory();
|
||||||
|
BeanUtil.copyProperties(dto, wmsInventory, "sid");
|
||||||
|
sid = wmsInventory.getSid();
|
||||||
|
baseMapper.insert(wmsInventory);
|
||||||
|
} else {
|
||||||
|
WmsInventory wmsInventory = fetchBySid(sid);
|
||||||
|
if (wmsInventory == null) {
|
||||||
|
return rb.setMsg("该商品库存不存在");
|
||||||
|
}
|
||||||
|
BeanUtil.copyProperties(dto, wmsInventory, "sid");
|
||||||
|
baseMapper.updateById(wmsInventory);
|
||||||
|
}
|
||||||
|
return rb.success().setData(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean delAllBySids(String[] sids) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
List<String> sidss = Arrays.asList(sids);
|
||||||
|
delBySids(sids);
|
||||||
|
return rb.success().setMsg("删除成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventory;
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/2/26 13:37
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WmsInventoryVo implements Vo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("商品ID")
|
||||||
|
private String goodsID;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品编码")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位名称")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("现有库存")
|
||||||
|
private String count;
|
||||||
|
@ApiModelProperty("分配库存")
|
||||||
|
private String allocateCount;
|
||||||
|
@ApiModelProperty("可用库存")
|
||||||
|
private String useCount;
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("首次入库日期")
|
||||||
|
private String firstInDate;
|
||||||
|
@ApiModelProperty("库龄")
|
||||||
|
private String dateAge;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventoryrecord;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yxt.common.core.dto.Dto;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "库存出入库记录 数据传输对象", description = "库存出入库记录 数据传输对象")
|
||||||
|
public class WmsInventoryRecordDto implements Dto {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("库存sid")
|
||||||
|
private String inventorySid;
|
||||||
|
@ApiModelProperty("商品ID")
|
||||||
|
private String goodsID;
|
||||||
|
@ApiModelProperty("来源单sid(业务单sid)")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("来源单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("单据类型(1入库、0出库)")
|
||||||
|
private String billType;
|
||||||
|
@ApiModelProperty("业务类型key(采购入库、维修出入库、销售出入库等)")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("客户/供应商sid,出库是为客户,入库时为供应商")
|
||||||
|
private String billObjSid;
|
||||||
|
@ApiModelProperty("客户/供应商名称")
|
||||||
|
private String billObjName;
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("商品基础信息Sid")
|
||||||
|
private String goodSpuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品Skusid")
|
||||||
|
private String goodsSkuSid;
|
||||||
|
@ApiModelProperty("商品Sku名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
@ApiModelProperty("商品编码(图号)")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("出入库后的库存量")
|
||||||
|
private BigDecimal currentCount;
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private BigDecimal count;
|
||||||
|
@ApiModelProperty("仓库sid")
|
||||||
|
private String warehouseSid;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位编号")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
package com.yxt.storage.biz.wmsinventoryrecord;
|
package com.yxt.storage.biz.wmsinventoryrecord;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.yxt.common.base.service.MybatisBaseService;
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -20,4 +24,37 @@ public class WmsInventoryRecordService extends MybatisBaseService<WmsInventoryRe
|
|||||||
list.removeAll(Collections.singleton(null));
|
list.removeAll(Collections.singleton(null));
|
||||||
return rb.success().setData(list);
|
return rb.success().setData(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void saveOrUpdateDto(WmsInventoryRecordDto dto) {
|
||||||
|
String dtoSid = dto.getSid();
|
||||||
|
if (StringUtils.isBlank(dtoSid)) {
|
||||||
|
this.insertByDto(dto);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.updateByDto(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void insertByDto(WmsInventoryRecordDto dto) {
|
||||||
|
WmsInventoryRecord entity = new WmsInventoryRecord();
|
||||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
||||||
|
baseMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateByDto(WmsInventoryRecordDto dto) {
|
||||||
|
String dtoSid = dto.getSid();
|
||||||
|
if (StringUtils.isBlank(dtoSid)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
WmsInventoryRecord entity = fetchBySid(dtoSid);
|
||||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
||||||
|
baseMapper.updateById(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PagerVo<WmsInventoryRecordsVo> listPage(PagerQuery<WmsInventoryRecordsQuery> pagerQuery) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WmsInventoryRecordsExcelVo> listExcel(WmsInventoryRecordsQuery query) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventoryrecord;
|
||||||
|
|
||||||
|
import com.yxt.common.core.utils.ExportEntityMap;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsInventoryRecordsExcelVo {
|
||||||
|
|
||||||
|
|
||||||
|
@ExportEntityMap(CnName = "序号", EnName = "rankNo")
|
||||||
|
private Integer rankNo;
|
||||||
|
@ApiModelProperty("商品ID")
|
||||||
|
@ExportEntityMap(CnName = "商品ID", EnName = "goodsID")
|
||||||
|
private String goodsID;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
@ExportEntityMap(CnName = "商品名称", EnName = "goodsSpuName")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品编码")
|
||||||
|
@ExportEntityMap(CnName = "商品编码", EnName = "goodsSkuCode")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格")
|
||||||
|
@ExportEntityMap(CnName = "规格", EnName = "goodsSkuOwnSpec")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
@ExportEntityMap(CnName = "单位", EnName = "unit")
|
||||||
|
private String unit;
|
||||||
|
@ApiModelProperty("仓库")
|
||||||
|
@ExportEntityMap(CnName = "仓库", EnName = "warehouseName")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位")
|
||||||
|
@ExportEntityMap(CnName = "库位", EnName = "warehouseRackCode")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("来源单号")
|
||||||
|
@ExportEntityMap(CnName = "来源单号", EnName = "billNo")
|
||||||
|
private String billNo;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("单据类型(1入库、0出库)")
|
||||||
|
@ExportEntityMap(CnName = "单据类型", EnName = "billType")
|
||||||
|
private String billType;
|
||||||
|
@ExportEntityMap(CnName = "发生时间", EnName = "createTime")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)")
|
||||||
|
@ExportEntityMap(CnName = "业务类型", EnName = "busTypeValue")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("客户/供应商名称")
|
||||||
|
@ExportEntityMap(CnName = "客户/供应商名称", EnName = "billObjName")
|
||||||
|
private String billObjName;
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
@ExportEntityMap(CnName = "批次号", EnName = "batchNumber")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
@ExportEntityMap(CnName = "数量", EnName = "count")
|
||||||
|
private String count;
|
||||||
|
@ApiModelProperty("出入库后的库存量")
|
||||||
|
@ExportEntityMap(CnName = "出入库后的库存量", EnName = "currentCount")
|
||||||
|
private String currentCount;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventoryrecord;
|
||||||
|
|
||||||
|
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 WmsInventoryRecordsQuery implements Query {
|
||||||
|
|
||||||
|
@ApiModelProperty("商品ID")
|
||||||
|
private String goodsID;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品编码(图号)")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位编号")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("客户/供应商名称")
|
||||||
|
private String billObjName;
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("来源单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("单据类型(1入库、0出库)")
|
||||||
|
private String billType;
|
||||||
|
@ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("发生开始时间")
|
||||||
|
private String createTimeStart;
|
||||||
|
@ApiModelProperty("发生结束时间")
|
||||||
|
private String createTimeEnd;
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.yxt.storage.biz.wmsinventoryrecord;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsInventoryRecordsVo {
|
||||||
|
|
||||||
|
@ApiModelProperty("商品ID")
|
||||||
|
private String goodsID;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品编码(图号)")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位编号")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("来源单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("单据类型(1入库、0出库)")
|
||||||
|
private String billType;
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("业务类型value(采购入库、调拨入库、退货入库、盘盈入库等销售出库、调拨出库、采购退货出库、报损出库、盘亏出库等)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("客户/供应商名称")
|
||||||
|
private String billObjName;
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("出入库后的库存量")
|
||||||
|
private String currentCount;
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private String count;
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
}
|
||||||
45
src/main/java/com/yxt/storage/biz/wmsoutbill/WmsOutBill.java
Normal file
45
src/main/java/com/yxt/storage/biz/wmsoutbill/WmsOutBill.java
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package com.yxt.storage.biz.wmsoutbill;
|
||||||
|
|
||||||
|
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 WmsOutBill extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("来源单号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("制单人")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("业务类型key")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value((销售出库、采购退货出库等))")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("货主sid")
|
||||||
|
private String goodsOwnerSid;
|
||||||
|
@ApiModelProperty("货主")
|
||||||
|
private String goodsOwner;
|
||||||
|
@ApiModelProperty("已完成/已发货")
|
||||||
|
private Integer billState;
|
||||||
|
@ApiModelProperty("是否一起发货(否0,是1)")
|
||||||
|
private Integer isTogether;
|
||||||
|
@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,39 @@
|
|||||||
|
package com.yxt.storage.biz.wmsoutbill;
|
||||||
|
|
||||||
|
import com.yxt.wms.biz.inventory.wmsoutbilldetail.WmsOutBillDetailDto;
|
||||||
|
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 WmsOutBillDetailsVo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("创建人sid")
|
||||||
|
private String createBySid;
|
||||||
|
@ApiModelProperty("制单人")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("外部单号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务类型key")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value((销售出库、采购退货出库等))")
|
||||||
|
private String busTypeValue;
|
||||||
|
|
||||||
|
@ApiModelProperty("单据状态")
|
||||||
|
private String billState;
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
private List<WmsOutBillDetailDto> detailsList = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.yxt.storage.biz.wmsoutbill;
|
||||||
|
|
||||||
|
import com.yxt.wms.biz.inventory.wmsoutbilldetail.WmsOutBillDetailDto;
|
||||||
|
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 WmsOutBillDto {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("创建人sid")
|
||||||
|
private String createBySid;
|
||||||
|
@ApiModelProperty("制单人")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("外部单号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务类型key")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value((销售出库、采购退货出库等))")
|
||||||
|
private String busTypeValue;
|
||||||
|
|
||||||
|
@ApiModelProperty("单据状态")
|
||||||
|
private String billState;
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
private List<WmsOutBillDetailDto> detailsList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.yxt.storage.biz.wmsoutbill;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsOutBillMapper extends BaseMapper<WmsOutBill> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?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.storage.biz.wmsoutbill.WmsOutBillMapper">
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.yxt.storage.biz.wmsoutbill;
|
||||||
|
|
||||||
|
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 WmsOutBillQuery implements Query {
|
||||||
|
|
||||||
|
//单据编号
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
|
||||||
|
//单据日期开始时间
|
||||||
|
private String createTimeStart;
|
||||||
|
|
||||||
|
//单据日期结束时间
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
//外部单号
|
||||||
|
@ApiModelProperty("来源单号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
|
||||||
|
//业务类型
|
||||||
|
@ApiModelProperty("业务类型value((销售出库、采购退货出库等))")
|
||||||
|
private String busTypeValue;
|
||||||
|
|
||||||
|
//单据状态
|
||||||
|
@ApiModelProperty("已完成/已发货")
|
||||||
|
private String billState;
|
||||||
|
|
||||||
|
//挂起状态
|
||||||
|
@ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)")
|
||||||
|
private String isHandUp;
|
||||||
|
|
||||||
|
//优先级
|
||||||
|
@ApiModelProperty("优先级")
|
||||||
|
private String priority;
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.yxt.storage.biz.wmsoutbill;
|
||||||
|
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class WmsOutBillService extends MybatisBaseService<WmsOutBillMapper, WmsOutBill> {
|
||||||
|
public PagerVo<WmsOutBillVo> listPage(PagerQuery<WmsOutBillQuery> pagerQuery) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean saveOrUpdateOutBill(WmsOutBillDto dto) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<WmsOutBillDetailsVo> details(String sid) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.yxt.storage.biz.wmsoutbill;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsOutBillVo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
|
||||||
|
//单据编号
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
|
||||||
|
//单据日期
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
//制单人
|
||||||
|
@ApiModelProperty("制单人")
|
||||||
|
private String createByName;
|
||||||
|
|
||||||
|
//外部单号
|
||||||
|
@ApiModelProperty("来源单号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
|
||||||
|
//业务类型
|
||||||
|
@ApiModelProperty("业务类型value((销售出库、采购退货出库等))")
|
||||||
|
private String busTypeValue;
|
||||||
|
|
||||||
|
//单据状态
|
||||||
|
@ApiModelProperty("已完成/已发货")
|
||||||
|
private String billState;
|
||||||
|
|
||||||
|
//优先级
|
||||||
|
@ApiModelProperty("优先级")
|
||||||
|
private String priority;
|
||||||
|
|
||||||
|
//挂起状态
|
||||||
|
@ApiModelProperty("挂起状态(1挂起,0不挂起,2解锁)")
|
||||||
|
private String isHandUp;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.yxt.storage.biz.wmsoutbilldetail;
|
||||||
|
|
||||||
|
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 WmsOutBillDetail extends BaseEntity {
|
||||||
|
@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,32 @@
|
|||||||
|
package com.yxt.storage.biz.wmsoutbilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/24
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsOutBillDetailDto {
|
||||||
|
|
||||||
|
@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 String outCount;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbill;
|
||||||
|
|
||||||
|
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/3
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBill extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty("来源单sid(asn单sid)")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("来源单号(asn单号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("业务类型key(采购入库、销售退库等)")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value(采购入库、销售退库等)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("供应商sid")
|
||||||
|
private String supplierSid;
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("货主sid")
|
||||||
|
private String goodsOwnerSid;
|
||||||
|
@ApiModelProperty("货主")
|
||||||
|
private String goodsOwner;
|
||||||
|
@ApiModelProperty("到货日期")
|
||||||
|
private Date deliveryDate;
|
||||||
|
@ApiModelProperty("待收货/部分收货/已收货(默认)")
|
||||||
|
private String billState;
|
||||||
|
@ApiModelProperty("使用组织sid")
|
||||||
|
private String useOrgSid;
|
||||||
|
@ApiModelProperty("创建组织sid")
|
||||||
|
private String createOrgSid;
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbill;
|
||||||
|
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailDto2;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto2;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillDto2 {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("来源单sid(asn单sid)")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("来源单号(asn单号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("制单人sid")
|
||||||
|
private String createBySid;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("业务类型key(采购入库、销售退库等)")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value(采购入库、销售退库等)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("供应商sid")
|
||||||
|
private String supplierSid;
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("到货日期")
|
||||||
|
private String deliveryDate;
|
||||||
|
//单据状态:新建/已完成
|
||||||
|
@ApiModelProperty("单据状态:待收货/部分收货/已收货(默认)")
|
||||||
|
private String billState;
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remarks;
|
||||||
|
@ApiModelProperty("使用组织sid")
|
||||||
|
private String useOrgSid;
|
||||||
|
@ApiModelProperty("创建组织sid")
|
||||||
|
private String createOrgSid;
|
||||||
|
@ApiModelProperty("商品列表")
|
||||||
|
private List<WmsReceiptBillDetailDto2> list = new ArrayList<>();
|
||||||
|
@ApiModelProperty("批次列表")
|
||||||
|
private List<WmsReceiptBillDetailBatchDto2> pcList = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbill;
|
||||||
|
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailDto2;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto2;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillInitVo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("来源单sid(asn单sid)")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("来源单号(asn单号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("制单人sid")
|
||||||
|
private String createBySid;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("业务类型key(采购入库、销售退库等)")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value(采购入库、销售退库等)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("供应商sid")
|
||||||
|
private String supplierSid;
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("到货日期")
|
||||||
|
private String deliveryDate;
|
||||||
|
//单据状态:新建/已完成
|
||||||
|
@ApiModelProperty("单据状态:待收货/部分收货/已收货(默认)")
|
||||||
|
private String billState;
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remarks;
|
||||||
|
@ApiModelProperty("使用组织sid")
|
||||||
|
private String useOrgSid;
|
||||||
|
@ApiModelProperty("创建组织sid")
|
||||||
|
private String createOrgSid;
|
||||||
|
@ApiModelProperty("商品列表")
|
||||||
|
private List<WmsReceiptBillDetailDto2> list = new ArrayList<>();
|
||||||
|
@ApiModelProperty("批次列表")
|
||||||
|
private List<WmsReceiptBillDetailBatchDto2> pcList = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbill;
|
||||||
|
|
||||||
|
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/3
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsReceiptBillMapper extends BaseMapper<WmsReceiptBill> {
|
||||||
|
IPage<WmsReceiptBillPageVo> listPage(IPage<WmsReceiptBill> page, @Param(Constants.WRAPPER) QueryWrapper<WmsReceiptBill> qw);
|
||||||
|
|
||||||
|
WmsReceiptBillInitVo getDetailsInit(String sid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?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.storage.biz.wmsreceiptbill.WmsReceiptBillMapper">
|
||||||
|
<select id="listPage" resultType="com.yxt.storage.biz.wmsreceiptbill.WmsReceiptBillPageVo">
|
||||||
|
select wrb.sid,
|
||||||
|
wrb.billNo,
|
||||||
|
wrb.createByName,
|
||||||
|
wrb.sourceBillNo,
|
||||||
|
wrb.busTypeValue,
|
||||||
|
wrb.supplierName,
|
||||||
|
DATE_FORMAT(wrb.createTime, '%Y-%m-%d') as createTime,
|
||||||
|
DATE_FORMAT(wrb.deliveryDate, '%Y-%m-%d') as deliveryDate,
|
||||||
|
wrb.billState
|
||||||
|
from wms_receipt_bill wrb
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
order by wrb.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDetailsInit" resultType="com.yxt.storage.biz.wmsreceiptbill.WmsReceiptBillInitVo">
|
||||||
|
select wrb.sid,
|
||||||
|
wrb.billNo,
|
||||||
|
wrb.sourceBillSid,
|
||||||
|
wrb.sourceBillNo,
|
||||||
|
wrb.createBySid,
|
||||||
|
wrb.createByName,
|
||||||
|
wrb.busTypeKey,
|
||||||
|
wrb.busTypeValue,
|
||||||
|
wrb.supplierSid,
|
||||||
|
wrb.supplierName,
|
||||||
|
DATE_FORMAT(wrb.deliveryDate, '%Y-%m-%d') as deliveryDate,
|
||||||
|
case wrb.billState
|
||||||
|
when '0' then '新建'
|
||||||
|
when '1' then '已完成' end as billState,
|
||||||
|
wrb.remarks,
|
||||||
|
wrb.useOrgSid,
|
||||||
|
wrb.createOrgSid
|
||||||
|
from wms_receipt_bill wrb
|
||||||
|
where wrb.sid = #{sid}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbill;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/12
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillPageVo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("来源单号(asn单号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务类型value(采购入库、销售退库等)")
|
||||||
|
private String busTypeValue;
|
||||||
|
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
|
||||||
|
@ApiModelProperty("到货日期")
|
||||||
|
private String deliveryDate;
|
||||||
|
|
||||||
|
//单据状态:新建/已完成
|
||||||
|
@ApiModelProperty("单据状态:待收货/部分收货/已收货(默认)")
|
||||||
|
private String billState;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbill;
|
||||||
|
|
||||||
|
import com.yxt.common.core.query.Query;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/3
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillQuery implements Query {
|
||||||
|
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("单据日期开始时间")
|
||||||
|
private String createTimeStart;
|
||||||
|
@ApiModelProperty("单据日期结束时间")
|
||||||
|
private String createTimeEnd;
|
||||||
|
@ApiModelProperty("来源编号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("业务类型Key")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("到货日期开始时间")
|
||||||
|
private String deliveryDateStart;
|
||||||
|
@ApiModelProperty("到货日期结束时间")
|
||||||
|
private String deliveryDateEnd;
|
||||||
|
@ApiModelProperty("单据状态")
|
||||||
|
private String billState;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbill;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
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.storage.biz.wmsansbill.WmsAnsBill;
|
||||||
|
import com.yxt.storage.biz.wmsansbill.WmsAnsBillService;
|
||||||
|
import com.yxt.storage.biz.wmsansbilldetail.WmsAnsBillDetailService;
|
||||||
|
import com.yxt.storage.biz.wmsansbilldetail.WmsAnsListDetailsVo;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailDto2;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailMapper;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailService;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailVo;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto2;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchMapper;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/3
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class WmsReceiptBillService extends MybatisBaseService<WmsReceiptBillMapper, WmsReceiptBill> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsReceiptBillDetailService wmsReceiptBillDetailService;
|
||||||
|
@Autowired
|
||||||
|
private WmsAnsBillService wmsAnsBillService;
|
||||||
|
@Autowired
|
||||||
|
private WmsAnsBillDetailService wmsAnsBillDetailService;
|
||||||
|
@Autowired
|
||||||
|
private WmsReceiptBillDetailBatchService wmsReceiptBillDetailBatchService;
|
||||||
|
@Autowired
|
||||||
|
private WmsReceiptBillDetailMapper wmsReceiptBillDetailMapper;
|
||||||
|
@Autowired
|
||||||
|
private WmsReceiptBillDetailBatchMapper wmsReceiptBillDetailBatchMapper;
|
||||||
|
|
||||||
|
public PagerVo<WmsReceiptBillPageVo> listPage(PagerQuery<WmsReceiptBillQuery> pq) {
|
||||||
|
WmsReceiptBillQuery query = pq.getParams();
|
||||||
|
QueryWrapper<WmsReceiptBill> qw = new QueryWrapper<>();
|
||||||
|
//ToDo:添加查询条件
|
||||||
|
if (StringUtils.isNotBlank(query.getBillNo())) {
|
||||||
|
qw.like("wrb.billNo", query.getBillNo());
|
||||||
|
}
|
||||||
|
//单据日期开始时间-单据日期结束时间
|
||||||
|
qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wrb.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')").
|
||||||
|
apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wrb.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')"
|
||||||
|
);
|
||||||
|
//预期到货日期开始时间-预期到货日期结束时间
|
||||||
|
qw.apply(StringUtils.isNotBlank(query.getDeliveryDateStart()), "date_format (wrb.deliveryDate,'%Y-%m-%d') >= date_format('" + query.getDeliveryDateStart() + "','%Y-%m-%d')").
|
||||||
|
apply(StringUtils.isNotBlank(query.getDeliveryDateEnd()), "date_format (wrb.deliveryDate,'%Y-%m-%d') <= date_format('" + query.getDeliveryDateEnd() + "','%Y-%m-%d')"
|
||||||
|
);
|
||||||
|
//单据状态
|
||||||
|
if (StringUtils.isNotBlank(query.getBillState())) {
|
||||||
|
qw.like("wrb.billState", query.getBillState());
|
||||||
|
}
|
||||||
|
//外部编号
|
||||||
|
if (StringUtils.isNotBlank(query.getSourceBillNo())) {
|
||||||
|
qw.like("wrb.sourceBillNo", query.getSourceBillNo());
|
||||||
|
}
|
||||||
|
IPage<WmsReceiptBill> page = PagerUtil.queryToPage(pq);
|
||||||
|
IPage<WmsReceiptBillPageVo> pagging = baseMapper.listPage(page, qw);
|
||||||
|
PagerVo<WmsReceiptBillPageVo> p = PagerUtil.pageToVo(pagging, null);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<String> saveOrUpdateBill2(WmsReceiptBillDto2 dto) {
|
||||||
|
ResultBean<String> rb = ResultBean.fireFail();
|
||||||
|
String sid = dto.getSid();
|
||||||
|
if (StringUtils.isBlank(sid)) {
|
||||||
|
WmsReceiptBill wmsReceiptBill = new WmsReceiptBill();
|
||||||
|
sid = wmsReceiptBill.getSid();
|
||||||
|
BeanUtil.copyProperties(dto, wmsReceiptBill, "sid");
|
||||||
|
List<WmsReceiptBillDetailDto2> list = dto.getList();
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
List<WmsReceiptBillDetailBatchDto2> pcList = dto.getPcList();
|
||||||
|
pcList.removeAll(Collections.singleton(null));
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
wmsReceiptBillDetailService.saveOrUpdateDetailsList2(sid, list, pcList);
|
||||||
|
}
|
||||||
|
baseMapper.insert(wmsReceiptBill);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
WmsReceiptBill wmsReceiptBill = fetchBySid(sid);
|
||||||
|
if (wmsReceiptBill == null) {
|
||||||
|
return rb.setMsg("该单据不存在");
|
||||||
|
}
|
||||||
|
BeanUtil.copyProperties(dto, wmsReceiptBill, "sid");
|
||||||
|
List<WmsReceiptBillDetailDto2> list = dto.getList();
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
List<WmsReceiptBillDetailBatchDto2> pcList = dto.getPcList();
|
||||||
|
pcList.removeAll(Collections.singleton(null));
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
wmsReceiptBillDetailService.saveOrUpdateDetailsList2(sid, list, pcList);
|
||||||
|
}
|
||||||
|
baseMapper.updateById(wmsReceiptBill);
|
||||||
|
}
|
||||||
|
return rb.success().setData(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<WmsReceiptBillVo> getInitDetails(String sourceSid) {
|
||||||
|
ResultBean<WmsReceiptBillVo> rb = ResultBean.fireFail();
|
||||||
|
WmsReceiptBillVo wmsReceiptBillVo = new WmsReceiptBillVo();
|
||||||
|
WmsAnsBill wmsAnsBill = wmsAnsBillService.fetchBySid(sourceSid);
|
||||||
|
BeanUtil.copyProperties(wmsAnsBill, wmsReceiptBillVo, "sid");
|
||||||
|
wmsReceiptBillVo.setSourceBillNo(wmsAnsBill.getBillNo());
|
||||||
|
wmsReceiptBillVo.setSourceBillSid(wmsAnsBill.getSid());
|
||||||
|
wmsReceiptBillVo.setCreateTime(DateUtil.today());
|
||||||
|
List<WmsAnsListDetailsVo> list = wmsAnsBillDetailService.selectByBillSid(sourceSid);
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
List<WmsReceiptBillDetailVo> lists = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), WmsReceiptBillDetailVo.class)).collect(Collectors.toList());
|
||||||
|
wmsReceiptBillVo.setList(lists);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rb.success().setData(wmsReceiptBillVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<WmsReceiptBillInitVo> getDetailsInit(String sid) {
|
||||||
|
ResultBean<WmsReceiptBillInitVo> rb = ResultBean.fireFail();
|
||||||
|
WmsReceiptBillInitVo wmsReceiptBillInitVo = baseMapper.getDetailsInit(sid);
|
||||||
|
List<WmsReceiptBillDetailBatchDto2> pcList = new ArrayList<>();
|
||||||
|
if (wmsReceiptBillInitVo != null) {
|
||||||
|
List<WmsReceiptBillDetailDto2> list = wmsReceiptBillDetailService.getDetailsInit(sid);
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
WmsReceiptBillDetailDto2 wmsReceiptBillDetailDto2 = list.get(i);
|
||||||
|
int a = i + 1;
|
||||||
|
wmsReceiptBillDetailDto2.setXh(String.valueOf(a));
|
||||||
|
List<WmsReceiptBillDetailBatchDto2> pcList2 = wmsReceiptBillDetailBatchService.getDetailsInit(sid, wmsReceiptBillDetailDto2.getDetailsSid());
|
||||||
|
pcList2.removeAll(Collections.singleton(null));
|
||||||
|
if (!pcList2.isEmpty()) {
|
||||||
|
for (int j = 0; j < pcList2.size(); j++) {
|
||||||
|
WmsReceiptBillDetailBatchDto2 wmsReceiptBillDetailBatchDto2 = pcList2.get(j);
|
||||||
|
wmsReceiptBillDetailBatchDto2.setXh(String.valueOf(a));
|
||||||
|
}
|
||||||
|
pcList.addAll(pcList2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wmsReceiptBillInitVo.setList(list);
|
||||||
|
wmsReceiptBillInitVo.setPcList(pcList);
|
||||||
|
} else {
|
||||||
|
return rb.setMsg("该单据不存在");
|
||||||
|
}
|
||||||
|
return rb.success().setData(wmsReceiptBillInitVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<String> confirm(WmsReceiptBillDto2 dto) {
|
||||||
|
ResultBean<String> rb = ResultBean.fireFail();
|
||||||
|
dto.setBillState("1");
|
||||||
|
List<WmsReceiptBillDetailDto2> list = dto.getList();
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
WmsReceiptBillDetailDto2 wmsReceiptBillDetailDto2 = list.get(i);
|
||||||
|
wmsReceiptBillDetailDto2.setState(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dto.setList(list);
|
||||||
|
ResultBean<String> resultBean = saveOrUpdateBill2(dto);
|
||||||
|
String sid = resultBean.getData();
|
||||||
|
return rb.success().setData(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean delAllBySids(String[] sids) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
List<String> sidss = Arrays.asList(sids);
|
||||||
|
for (int i = 0; i < sidss.size(); i++) {
|
||||||
|
String s = sidss.get(i);
|
||||||
|
wmsReceiptBillDetailMapper.deleteByBillSid(s);
|
||||||
|
wmsReceiptBillDetailBatchMapper.deleteByDetails(s);
|
||||||
|
}
|
||||||
|
delBySids(sids);
|
||||||
|
return rb.success().setMsg("删除成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbill;
|
||||||
|
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailVo;
|
||||||
|
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/3
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillVo {
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("来源单sid(asn单sid)")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("来源单号(asn单号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("制单人sid")
|
||||||
|
private String createBySid;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("业务类型key(采购入库、销售退库等)")
|
||||||
|
private String busTypeKey;
|
||||||
|
@ApiModelProperty("业务类型value(采购入库、销售退库等)")
|
||||||
|
private String busTypeValue;
|
||||||
|
@ApiModelProperty("供应商sid")
|
||||||
|
private String supplierSid;
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("到货日期")
|
||||||
|
private Date deliveryDate;
|
||||||
|
//单据状态:新建/已完成
|
||||||
|
@ApiModelProperty("单据状态:待收货/部分收货/已收货(默认)")
|
||||||
|
private String billState;
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remarks;
|
||||||
|
@ApiModelProperty("使用组织sid")
|
||||||
|
private String useOrgSid;
|
||||||
|
@ApiModelProperty("创建组织sid")
|
||||||
|
private String createOrgSid;
|
||||||
|
|
||||||
|
private List<WmsReceiptBillDetailVo> list = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbilldetail;
|
||||||
|
|
||||||
|
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/3
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillDetail extends BaseEntity {
|
||||||
|
@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 actualInCount;
|
||||||
|
@ApiModelProperty("拒收数量")
|
||||||
|
private BigDecimal rejectCount;
|
||||||
|
@ApiModelProperty("拒收原因")
|
||||||
|
private String rejectReason;
|
||||||
|
@ApiModelProperty("收货时间")
|
||||||
|
private Date receivingGoodsTime;
|
||||||
|
@ApiModelProperty("是否需要质检(不需要0,需要1)")
|
||||||
|
private Integer isQuality;
|
||||||
|
@ApiModelProperty("质检状态(合格0,不合格1)")
|
||||||
|
private Integer qualityState;
|
||||||
|
@ApiModelProperty("载具说明")
|
||||||
|
private String packageRemark;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库sid")
|
||||||
|
private String warehouseSid;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位名称")
|
||||||
|
private String warehouseRackName;
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbilldetail;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillDetailDto2 {
|
||||||
|
|
||||||
|
@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 warehouseSid;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位名称")
|
||||||
|
private String warehouseRackName;
|
||||||
|
@ApiModelProperty("实收数量")
|
||||||
|
private String actualInCount;
|
||||||
|
@ApiModelProperty("拒收数量")
|
||||||
|
private String rejectCount;
|
||||||
|
@ApiModelProperty("拒收原因")
|
||||||
|
private String rejectReason;
|
||||||
|
@ApiModelProperty("是否需要质检(不需要0,需要1)")
|
||||||
|
private Integer isQuality;
|
||||||
|
@ApiModelProperty("质检状态(合格0,不合格1)")
|
||||||
|
private Integer qualityState;
|
||||||
|
@ApiModelProperty("载具说明")
|
||||||
|
private String packageRemark;
|
||||||
|
@ApiModelProperty("单据明细状态:0新建,1已完成")
|
||||||
|
private Integer state;
|
||||||
|
@ApiModelProperty("序号")
|
||||||
|
private String xh;
|
||||||
|
@JsonIgnore
|
||||||
|
private String detailsSid;
|
||||||
|
|
||||||
|
@ApiModelProperty("预约数量(采购订单数量)")
|
||||||
|
private String orderCount;
|
||||||
|
|
||||||
|
|
||||||
|
//入库价
|
||||||
|
@ApiModelProperty("单位成本(采购价)")
|
||||||
|
private String cost;
|
||||||
|
@ApiModelProperty("税额")
|
||||||
|
private String taxAmount;
|
||||||
|
@ApiModelProperty("含税价")
|
||||||
|
private String taxPrice;
|
||||||
|
//采购金额
|
||||||
|
@ApiModelProperty("金额")
|
||||||
|
private String amount;
|
||||||
|
|
||||||
|
@ApiModelProperty("有效天数")
|
||||||
|
private String shelfLife;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbilldetail;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/3
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsReceiptBillDetailMapper extends BaseMapper<WmsReceiptBillDetail> {
|
||||||
|
int deleteByBillSid(String sid);
|
||||||
|
|
||||||
|
List<WmsReceiptBillDetailDto2> getDetailsInit(String sid);
|
||||||
|
|
||||||
|
List<WmsReceiptBillDetail> selectByBillSid(@Param("sid") String sid, @Param("sidList") List<String> sidList);
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?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.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailMapper">
|
||||||
|
<delete id="deleteByBillSid">
|
||||||
|
delete
|
||||||
|
from wms_receipt_bill_detail
|
||||||
|
where billSid = #{sid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="getDetailsInit" resultType="com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailDto2">
|
||||||
|
select wrbd.goodsSkuSid,
|
||||||
|
wrbd.goodsSkuTitle,
|
||||||
|
wrbd.goodsSkuCode,
|
||||||
|
wrbd.goodsSkuOwnSpec,
|
||||||
|
wrbd.unit,
|
||||||
|
wrbd.warehouseSid,
|
||||||
|
wrbd.warehouseName,
|
||||||
|
wrbd.warehouseRackSid,
|
||||||
|
wrbd.warehouseRackName,
|
||||||
|
wrbd.actualInCount,
|
||||||
|
wrbd.rejectCount,
|
||||||
|
wrbd.rejectReason,
|
||||||
|
wrbd.isQuality,
|
||||||
|
wrbd.qualityState,
|
||||||
|
wrbd.packageRemark,
|
||||||
|
wrbd.state,
|
||||||
|
wrbd.sid detailsSid
|
||||||
|
from wms_receipt_bill_detail wrbd
|
||||||
|
where billSid = #{sid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByBillSid" resultType="com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetail">
|
||||||
|
select *
|
||||||
|
from wms_receipt_bill_detail where billSid = #{sid}
|
||||||
|
<if test="sidList != null and sidList.size() != 0">
|
||||||
|
and sid not in
|
||||||
|
<foreach collection="sidList" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbilldetail;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto2;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/3
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class WmsReceiptBillDetailService extends MybatisBaseService<WmsReceiptBillDetailMapper, WmsReceiptBillDetail> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsReceiptBillDetailBatchService wmsReceiptBillDetailBatchService;
|
||||||
|
|
||||||
|
public void saveOrUpdateDetailsList2(String sid, List<WmsReceiptBillDetailDto2> list, List<WmsReceiptBillDetailBatchDto2> pcList) {
|
||||||
|
baseMapper.deleteByBillSid(sid);
|
||||||
|
list.forEach(v -> {
|
||||||
|
WmsReceiptBillDetail wmsReceiptBillDetail = new WmsReceiptBillDetail();
|
||||||
|
BeanUtil.copyProperties(v, wmsReceiptBillDetail, "sid");
|
||||||
|
wmsReceiptBillDetail.setBillSid(sid);
|
||||||
|
baseMapper.insert(wmsReceiptBillDetail);
|
||||||
|
wmsReceiptBillDetailBatchService.deleteByDetails(sid);
|
||||||
|
pcList.removeAll(Collections.singleton(null));
|
||||||
|
if (!pcList.isEmpty()) {
|
||||||
|
List<WmsReceiptBillDetailBatchDto2> pcList2 = pcList.stream().filter(c -> c.getXh().equals(v.getXh())).collect(Collectors.toList());
|
||||||
|
pcList2.removeAll(Collections.singleton(null));
|
||||||
|
if (!pcList2.isEmpty()) {
|
||||||
|
wmsReceiptBillDetailBatchService.saveBatchs2(sid, wmsReceiptBillDetail.getSid(), pcList2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WmsReceiptBillDetailDto2> getDetailsInit(String sid) {
|
||||||
|
return baseMapper.getDetailsInit(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WmsReceiptBillDetail> selectByBillSid(String sid, List<String> sidList) {
|
||||||
|
return baseMapper.selectByBillSid(sid, sidList);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/12
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillDetailVo {
|
||||||
|
|
||||||
|
@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 warehouseSid;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位名称")
|
||||||
|
private String warehouseRackName;
|
||||||
|
@ApiModelProperty("实收数量")
|
||||||
|
private String actualInCount;
|
||||||
|
@ApiModelProperty("拒收数量")
|
||||||
|
private String rejectCount;
|
||||||
|
@ApiModelProperty("拒收原因")
|
||||||
|
private String rejectReason;
|
||||||
|
@ApiModelProperty("是否需要质检(不需要0,需要1)")
|
||||||
|
private Integer isQuality;
|
||||||
|
@ApiModelProperty("质检状态(合格0,不合格1)")
|
||||||
|
private Integer qualityState;
|
||||||
|
@ApiModelProperty("载具说明")
|
||||||
|
private String packageRemark;
|
||||||
|
|
||||||
|
//入库价
|
||||||
|
@ApiModelProperty("单位成本(采购价)")
|
||||||
|
private String cost;
|
||||||
|
@ApiModelProperty("税额")
|
||||||
|
private String taxAmount;
|
||||||
|
@ApiModelProperty("含税价")
|
||||||
|
private String taxPrice;
|
||||||
|
//采购金额
|
||||||
|
@ApiModelProperty("金额")
|
||||||
|
private String amount;
|
||||||
|
|
||||||
|
@ApiModelProperty("有效期天数")
|
||||||
|
private Integer shelfLife;
|
||||||
|
@ApiModelProperty("预约数量(采购订单数量)")
|
||||||
|
private String orderCount;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbilldetailbatch;
|
||||||
|
|
||||||
|
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/10
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillDetailBatch extends BaseEntity {
|
||||||
|
@ApiModelProperty("收货单sid")
|
||||||
|
private String billSid;
|
||||||
|
@ApiModelProperty("收货明细sid")
|
||||||
|
private String detailSid;
|
||||||
|
@ApiModelProperty("批次号(收货日期+有效日期,如240320-241009)")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("生产日期")
|
||||||
|
private Date manufactureDate;
|
||||||
|
@ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)")
|
||||||
|
private Date expirationDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private BigDecimal batchCount;
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbilldetailbatch;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsReceiptBillDetailBatchDto2 {
|
||||||
|
|
||||||
|
@ApiModelProperty("批次号(收货日期+有效日期,如240320-241009)")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("生产日期")
|
||||||
|
private String manufactureDate;
|
||||||
|
@ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)")
|
||||||
|
private String expirationDate;
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private String batchCount;
|
||||||
|
@ApiModelProperty("有效期天数")
|
||||||
|
private Integer shelfLife;
|
||||||
|
|
||||||
|
private String xh;
|
||||||
|
|
||||||
|
//商品名称
|
||||||
|
@ApiModelProperty("商品Sku名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
//商品编码
|
||||||
|
@ApiModelProperty("商品sku编码")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
//规格
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
//单位
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
//仓库
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
//库位
|
||||||
|
@ApiModelProperty("库位名称")
|
||||||
|
private String warehouseRackName;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbilldetailbatch;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/12
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsReceiptBillDetailBatchMapper extends BaseMapper<WmsReceiptBillDetailBatch> {
|
||||||
|
int deleteByDetails(String sid);
|
||||||
|
|
||||||
|
List<WmsReceiptBillDetailBatchDto2> getDetailsInit(@Param("sid") String sid, @Param("detailsSid") String detailsSid);
|
||||||
|
|
||||||
|
WmsReceiptBillDetailBatch selectByDetails(String sid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?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.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchMapper">
|
||||||
|
<delete id="deleteByDetails">
|
||||||
|
delete
|
||||||
|
from wms_receipt_bill_detail_batch
|
||||||
|
where billSid = #{sid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="getDetailsInit"
|
||||||
|
resultType="com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchDto2">
|
||||||
|
select wb.batchNumber,
|
||||||
|
DATE_FORMAT(wb.manufactureDate, '%Y-%m-%d') as manufactureDate,
|
||||||
|
DATE_FORMAT(wb.expirationDate, '%Y-%m-%d') as expirationDate,
|
||||||
|
wb.batchCount
|
||||||
|
from wms_receipt_bill_detail_batch wb
|
||||||
|
where wb.billSid = #{sid}
|
||||||
|
and wb.detailSid = #{detailsSid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByDetails"
|
||||||
|
resultType="com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatch">
|
||||||
|
select *
|
||||||
|
from wms_receipt_bill_detail_batch
|
||||||
|
where detailSid = #{sid}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.yxt.storage.biz.wmsreceiptbilldetailbatch;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/12
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class WmsReceiptBillDetailBatchService extends MybatisBaseService<WmsReceiptBillDetailBatchMapper, WmsReceiptBillDetailBatch> {
|
||||||
|
public int deleteByDetails(String sid) {
|
||||||
|
return baseMapper.deleteByDetails(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveBatchs2(String sid, String sid1, List<WmsReceiptBillDetailBatchDto2> list) {
|
||||||
|
list.forEach(v -> {
|
||||||
|
WmsReceiptBillDetailBatch wmsReceiptBillDetailBatch = new WmsReceiptBillDetailBatch();
|
||||||
|
BeanUtil.copyProperties(v, wmsReceiptBillDetailBatch, "sid");
|
||||||
|
wmsReceiptBillDetailBatch.setBillSid(sid);
|
||||||
|
wmsReceiptBillDetailBatch.setDetailSid(sid1);
|
||||||
|
baseMapper.insert(wmsReceiptBillDetailBatch);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WmsReceiptBillDetailBatchDto2> getDetailsInit(String sid, String detailsSid) {
|
||||||
|
return baseMapper.getDetailsInit(sid, detailsSid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WmsReceiptBillDetailBatch selectByDetails(String sid) {
|
||||||
|
return baseMapper.selectByDetails(sid);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbill;
|
||||||
|
|
||||||
|
import com.yxt.storage.biz.wmsshelfbilldetail.ShelfDetailsListVo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/17
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class ShelfDetailsVo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("制单人sid")
|
||||||
|
private String createBySid;
|
||||||
|
@ApiModelProperty("制单人名称")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("来源单号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("来源单sid")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("单据状态:0新建,1已完成")
|
||||||
|
private Integer billState;
|
||||||
|
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
private List<ShelfDetailsListVo> list = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbill;
|
||||||
|
|
||||||
|
import com.yxt.storage.biz.wmsshelfbilldetail.ShelfInitListVo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/23
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class ShelfInitVo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("制单人sid")
|
||||||
|
private String createBySid;
|
||||||
|
@ApiModelProperty("制单人名称")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("来源单号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("来源单sid")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("单据状态:0新建,1已完成")
|
||||||
|
private Integer billState;
|
||||||
|
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
private List<ShelfInitListVo> list = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbill;
|
||||||
|
|
||||||
|
import com.yxt.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/10
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsShelfBill extends BaseEntity {
|
||||||
|
@ApiModelProperty("来源单sid(收货单sid)")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("来源单号(收货单号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("0新建,1已完成")
|
||||||
|
private Integer billState;
|
||||||
|
|
||||||
|
private String createOrgSid;
|
||||||
|
|
||||||
|
private String useOrgSid;
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbill;
|
||||||
|
|
||||||
|
import com.yxt.storage.biz.wmsshelfbilldetail.WmsShelfBillDetailDto;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsShelfBillDto {
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("制单人sid")
|
||||||
|
private String createBySid;
|
||||||
|
@ApiModelProperty("制单人名称")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("来源单号")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("来源单sid")
|
||||||
|
private String sourceBillSid;
|
||||||
|
@ApiModelProperty("单据状态:0新建,1已完成")
|
||||||
|
private Integer billState;
|
||||||
|
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
private List<WmsShelfBillDetailDto> list = new ArrayList<>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbill;
|
||||||
|
|
||||||
|
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/11
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsShelfBillMapper extends BaseMapper<WmsShelfBill> {
|
||||||
|
IPage<WmsShelfBillVo> listPage(IPage<WmsShelfBill> page, @Param(Constants.WRAPPER) QueryWrapper<WmsShelfBill> qw);
|
||||||
|
|
||||||
|
ShelfDetailsVo details(String sid);
|
||||||
|
|
||||||
|
String selectNum(String goodsId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?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.storage.biz.wmsshelfbill.WmsShelfBillMapper">
|
||||||
|
<select id="listPage" resultType="com.yxt.storage.biz.wmsshelfbill.WmsShelfBillVo">
|
||||||
|
select wsb.sid,
|
||||||
|
wsb.billNo,
|
||||||
|
DATE_FORMAT(wsb.createTime, '%Y-%m-%d') as createTime,
|
||||||
|
wsb.createByName,
|
||||||
|
wsb.sourceBillNo,
|
||||||
|
case wsb.billState
|
||||||
|
when 0 then '新建'
|
||||||
|
when 1 then '已完成' end as billState
|
||||||
|
from wms_shelf_bill wsb
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="details" resultType="com.yxt.storage.biz.wmsshelfbill.ShelfDetailsVo">
|
||||||
|
select wsb.sid,
|
||||||
|
wsb.billNo,
|
||||||
|
wsb.createBySid,
|
||||||
|
wsb.createByName,
|
||||||
|
DATE_FORMAT(wsb.createTime, '%Y-%m-%d') as createTime,
|
||||||
|
wsb.sourceBillNo,
|
||||||
|
wsb.sourceBillSid,
|
||||||
|
wsb.billState
|
||||||
|
from wms_shelf_bill wsb
|
||||||
|
where sid = #{sid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNum" resultType="java.lang.String">
|
||||||
|
select RIGHT(goodsID, 4)
|
||||||
|
from wms_inventory
|
||||||
|
where goodsID LIKE concat(#{bill}, '%')
|
||||||
|
order by id desc
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbill;
|
||||||
|
|
||||||
|
import com.yxt.common.core.query.Query;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsShelfBillQuery implements Query {
|
||||||
|
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("单据日期开始时间")
|
||||||
|
private String createTimeStart;
|
||||||
|
@ApiModelProperty("单据日期结束时间")
|
||||||
|
private String createTimeEnd;
|
||||||
|
@ApiModelProperty("单据状态")
|
||||||
|
private String billState;
|
||||||
|
}
|
||||||
@@ -0,0 +1,261 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbill;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
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.storage.biz.wmsinventory.WmsInventorySaveDto;
|
||||||
|
import com.yxt.storage.biz.wmsinventory.WmsInventoryService;
|
||||||
|
import com.yxt.storage.biz.wmsinventoryrecord.WmsInventoryRecordDto;
|
||||||
|
import com.yxt.storage.biz.wmsinventoryrecord.WmsInventoryRecordService;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbill.WmsReceiptBill;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbill.WmsReceiptBillService;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetail;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetail.WmsReceiptBillDetailService;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatch;
|
||||||
|
import com.yxt.storage.biz.wmsreceiptbilldetailbatch.WmsReceiptBillDetailBatchService;
|
||||||
|
import com.yxt.storage.biz.wmsshelfbilldetail.*;
|
||||||
|
import com.yxt.storage.feign.goods.basegoodssku.BaseGoodsSkuDetailsVo;
|
||||||
|
import com.yxt.storage.feign.goods.basegoodssku.BaseGoodsSkuFeign;
|
||||||
|
import com.yxt.storage.utils.Rule;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/11
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, WmsShelfBill> {
|
||||||
|
@Autowired
|
||||||
|
private WmsShelfBillDetailService wmsShelfBillDetailService;
|
||||||
|
@Autowired
|
||||||
|
private WmsShelfBillDetailMapper wmsShelfBillDetailMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsInventoryService wmsInventoryService;
|
||||||
|
@Resource
|
||||||
|
private BaseGoodsSkuFeign baseGoodsSkuFeign;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmsInventoryRecordService wmsInventoryRecordService;
|
||||||
|
@Autowired
|
||||||
|
private WmsReceiptBillService wmsReceiptBillService;
|
||||||
|
@Autowired
|
||||||
|
private WmsReceiptBillDetailService wmsReceiptBillDetailService;
|
||||||
|
@Autowired
|
||||||
|
private WmsReceiptBillDetailBatchService wmsReceiptBillDetailBatchService;
|
||||||
|
|
||||||
|
public PagerVo<WmsShelfBillVo> listPage(PagerQuery<WmsShelfBillQuery> pq) {
|
||||||
|
WmsShelfBillQuery query = pq.getParams();
|
||||||
|
QueryWrapper<WmsShelfBill> qw = new QueryWrapper<>();
|
||||||
|
//ToDo:添加查询条件
|
||||||
|
if (StringUtils.isNotBlank(query.getBillNo())) {
|
||||||
|
qw.like("wsb.billNo", query.getBillNo());
|
||||||
|
}
|
||||||
|
//单据日期开始时间-单据日期结束时间
|
||||||
|
qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wsb.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')").
|
||||||
|
apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wsb.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')"
|
||||||
|
);
|
||||||
|
//单据状态
|
||||||
|
if (StringUtils.isNotBlank(query.getBillState())) {
|
||||||
|
qw.like("wsb.billState", query.getBillState());
|
||||||
|
}
|
||||||
|
IPage<WmsShelfBill> page = PagerUtil.queryToPage(pq);
|
||||||
|
IPage<WmsShelfBillVo> pagging = baseMapper.listPage(page, qw);
|
||||||
|
PagerVo<WmsShelfBillVo> p = PagerUtil.pageToVo(pagging, null);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean saveOrUpdateShelf(WmsShelfBillDto dto) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
String sid = dto.getSid();
|
||||||
|
if (StringUtils.isBlank(sid)) {
|
||||||
|
WmsShelfBill wmsShelfBill = new WmsShelfBill();
|
||||||
|
BeanUtil.copyProperties(dto, wmsShelfBill, "sid");
|
||||||
|
List<WmsShelfBillDetailDto> list = dto.getList();
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
sid = wmsShelfBill.getSid();
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
wmsShelfBillDetailService.saveShelfDetails(sid, list);
|
||||||
|
}
|
||||||
|
baseMapper.insert(wmsShelfBill);
|
||||||
|
} else {
|
||||||
|
WmsShelfBill wmsShelfBill = fetchBySid(sid);
|
||||||
|
if (wmsShelfBill == null) {
|
||||||
|
return rb.setMsg("该单据不存在");
|
||||||
|
}
|
||||||
|
BeanUtil.copyProperties(dto, wmsShelfBill, "sid");
|
||||||
|
List<WmsShelfBillDetailDto> list = dto.getList();
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
sid = wmsShelfBill.getSid();
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
wmsShelfBillDetailService.saveShelfDetails(sid, list);
|
||||||
|
}
|
||||||
|
baseMapper.updateById(wmsShelfBill);
|
||||||
|
|
||||||
|
}
|
||||||
|
saveWmsInventory(sid);
|
||||||
|
//新增出入库记录
|
||||||
|
|
||||||
|
return rb.success().setData(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveWmsInventory(String sid) {
|
||||||
|
WmsShelfBill wmsShelfBill = fetchBySid(sid);
|
||||||
|
List<WmsShelfBillDetailVos> detailList = wmsShelfBillDetailService.selectByBillSid(sid);
|
||||||
|
detailList.removeAll(Collections.singleton(null));
|
||||||
|
if (!detailList.isEmpty()) {
|
||||||
|
for (int i = 0; i < detailList.size(); i++) {
|
||||||
|
WmsShelfBillDetailVos s = detailList.get(i);
|
||||||
|
WmsInventorySaveDto dto = new WmsInventorySaveDto();
|
||||||
|
dto.setCreateBySid(wmsShelfBill.getCreateBySid());
|
||||||
|
dto.setBatchNumber(s.getBatchNumber());
|
||||||
|
dto.setGoodsID(getGoodsId(s.getGoodsSkuSid()));
|
||||||
|
dto.setGoodSpuSid(s.getGoodSpuSid());
|
||||||
|
dto.setGoodsSpuName(s.getGoodsSpuName());
|
||||||
|
dto.setGoodsSkuSid(s.getGoodsSkuSid());
|
||||||
|
dto.setGoodsSkuTitle(s.getGoodsSkuTitle());
|
||||||
|
dto.setGoodsSkuCode(s.getGoodsSkuCode());
|
||||||
|
dto.setGoodsSkuOwnSpec(s.getGoodsSkuOwnSpec());
|
||||||
|
dto.setUnit(s.getUnit());
|
||||||
|
dto.setCount(s.getCount());
|
||||||
|
dto.setWarehouseSid(s.getWarehouseSid());
|
||||||
|
dto.setWarehouseName(s.getWarehouseName());
|
||||||
|
dto.setWarehouseRackSid(s.getWarehouseRackSid());
|
||||||
|
dto.setWarehouseRackCode(s.getWarehouseRackCode());
|
||||||
|
dto.setFirstInDate(DateUtil.today());
|
||||||
|
dto.setCreateOrgSid(wmsShelfBill.getCreateOrgSid());
|
||||||
|
dto.setUseOrgSid(wmsShelfBill.getUseOrgSid());
|
||||||
|
dto.setSid(s.getInventorySid());
|
||||||
|
String inventorySid = wmsInventoryService.saveWmsInventory(dto).getData();
|
||||||
|
WmsShelfBillDetail wmsShelfBillDetail = wmsShelfBillDetailService.fetchBySid(s.getDetailsSid());
|
||||||
|
wmsShelfBillDetail.setInventorySid(inventorySid);
|
||||||
|
wmsShelfBillDetailService.updateById(wmsShelfBillDetail);
|
||||||
|
WmsInventoryRecordDto wmsInventoryRecordDto = new WmsInventoryRecordDto();
|
||||||
|
wmsInventoryRecordDto.setInventorySid(inventorySid);
|
||||||
|
wmsInventoryRecordDto.setGoodsID(dto.getGoodsID());
|
||||||
|
wmsInventoryRecordDto.setSourceBillSid(wmsShelfBill.getSourceBillSid());
|
||||||
|
wmsInventoryRecordDto.setBillNo(wmsShelfBill.getSourceBillNo());
|
||||||
|
wmsInventoryRecordDto.setBillType("1");
|
||||||
|
wmsInventoryRecordDto.setBatchNumber(dto.getBatchNumber());
|
||||||
|
wmsInventoryRecordDto.setGoodSpuSid(dto.getGoodSpuSid());
|
||||||
|
wmsInventoryRecordDto.setGoodsSpuName(dto.getGoodsSpuName());
|
||||||
|
wmsInventoryRecordDto.setGoodsSkuSid(dto.getGoodsSkuSid());
|
||||||
|
wmsInventoryRecordDto.setGoodsSkuCode(dto.getGoodsSkuCode());
|
||||||
|
wmsInventoryRecordDto.setUnit(dto.getUnit());
|
||||||
|
wmsInventoryRecordDto.setCurrentCount(StringUtils.isNotBlank(dto.getCount()) ? new BigDecimal(dto.getCount()) : BigDecimal.ZERO);
|
||||||
|
wmsInventoryRecordDto.setWarehouseSid(dto.getWarehouseSid());
|
||||||
|
wmsInventoryRecordDto.setWarehouseName(dto.getWarehouseName());
|
||||||
|
wmsInventoryRecordDto.setWarehouseRackSid(dto.getWarehouseRackSid());
|
||||||
|
wmsInventoryRecordDto.setWarehouseRackCode(dto.getWarehouseRackCode());
|
||||||
|
wmsInventoryRecordService.saveOrUpdateDto(wmsInventoryRecordDto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商品唯一的goodsID
|
||||||
|
*
|
||||||
|
* @param goodsSkuSid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getGoodsId(String goodsSkuSid) {
|
||||||
|
String goodsId = "";
|
||||||
|
ResultBean<BaseGoodsSkuDetailsVo> resultBean = baseGoodsSkuFeign.getDetails(goodsSkuSid);
|
||||||
|
if (resultBean.getSuccess()) {
|
||||||
|
BaseGoodsSkuDetailsVo baseGoodsSkuDetailsVo = resultBean.getData();
|
||||||
|
goodsId = baseGoodsSkuDetailsVo.getGoodsCode();
|
||||||
|
String date = DateUtil.format(DateUtil.date(), "yyyyMM");
|
||||||
|
goodsId = goodsId + date;
|
||||||
|
String i = baseMapper.selectNum(goodsId);
|
||||||
|
if (StringUtils.isNotBlank(i)) {
|
||||||
|
goodsId = Rule.getBillNo(goodsId, Integer.valueOf(i).intValue());
|
||||||
|
} else {
|
||||||
|
goodsId = Rule.getBillNo(goodsId, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return goodsId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean delAllBySids(String[] sids) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
List<String> sidss = Arrays.asList(sids);
|
||||||
|
for (int i = 0; i < sidss.size(); i++) {
|
||||||
|
String s = sidss.get(i);
|
||||||
|
wmsShelfBillDetailMapper.deleteByMainSid(s);
|
||||||
|
}
|
||||||
|
delBySids(sids);
|
||||||
|
return rb.success().setMsg("删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<ShelfDetailsVo> details(String sid) {
|
||||||
|
ResultBean<ShelfDetailsVo> rb = ResultBean.fireFail();
|
||||||
|
ShelfDetailsVo shelfDetailsVo = baseMapper.details(sid);
|
||||||
|
if (shelfDetailsVo == null) {
|
||||||
|
return rb.setMsg("该单据不存在");
|
||||||
|
}
|
||||||
|
List<ShelfDetailsListVo> list = wmsShelfBillDetailService.details(sid);
|
||||||
|
list.removeAll(Collections.singleton(null));
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
shelfDetailsVo.setList(list);
|
||||||
|
}
|
||||||
|
return rb.success().setData(shelfDetailsVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<ShelfInitVo> getInit(String sid, String orgPath, String userSid) {
|
||||||
|
ResultBean<ShelfInitVo> rb = ResultBean.fireFail();
|
||||||
|
ShelfInitVo shelfInitVo = new ShelfInitVo();
|
||||||
|
//查询所有已上架的商品
|
||||||
|
List<String> stringList = wmsShelfBillDetailService.selectReceiptSidList();
|
||||||
|
stringList.removeAll(Collections.singleton(null));
|
||||||
|
//获取收货单据
|
||||||
|
WmsReceiptBill wmsReceiptBill = wmsReceiptBillService.fetchBySid(sid);
|
||||||
|
shelfInitVo.setCreateTime(DateUtil.today());//单据日期
|
||||||
|
shelfInitVo.setSourceBillNo(wmsReceiptBill.getBillNo());//来源单编号
|
||||||
|
shelfInitVo.setSourceBillSid(wmsReceiptBill.getSid());//来源单sid
|
||||||
|
shelfInitVo.setBillState(0);
|
||||||
|
List<ShelfInitListVo> list = new ArrayList<>();
|
||||||
|
//获取收货单据的明细
|
||||||
|
List<WmsReceiptBillDetail> wmsReceiptBillDetailsList = wmsReceiptBillDetailService.selectByBillSid(sid, stringList);
|
||||||
|
wmsReceiptBillDetailsList.removeAll(Collections.singleton(null));
|
||||||
|
if (!wmsReceiptBillDetailsList.isEmpty()) {
|
||||||
|
for (int i = 0; i < wmsReceiptBillDetailsList.size(); i++) {
|
||||||
|
WmsReceiptBillDetail v = wmsReceiptBillDetailsList.get(i);
|
||||||
|
WmsReceiptBillDetailBatch wmsReceiptBillDetailBatch = wmsReceiptBillDetailBatchService.selectByDetails(v.getSid());
|
||||||
|
ShelfInitListVo shelfInitListVo = new ShelfInitListVo();
|
||||||
|
BeanUtil.copyProperties(v, shelfInitListVo, "sid");
|
||||||
|
shelfInitListVo.setBatchNumber(wmsReceiptBillDetailBatch.getBatchNumber());
|
||||||
|
shelfInitListVo.setWarehouseSid(v.getWarehouseSid());
|
||||||
|
shelfInitListVo.setWarehouseRackSid(v.getWarehouseRackSid());
|
||||||
|
shelfInitListVo.setWarehouseRackCode("");
|
||||||
|
list.add(shelfInitListVo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
shelfInitVo.setList(list);
|
||||||
|
|
||||||
|
return rb.success().setData(shelfInitVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultBean<String> confirm(WmsShelfBillDto dto) {
|
||||||
|
ResultBean<String> rb = ResultBean.fireFail();
|
||||||
|
dto.setBillState(1);
|
||||||
|
ResultBean<String> resultBean = saveOrUpdateShelf(dto);
|
||||||
|
String sid = resultBean.getData();
|
||||||
|
return rb.success().setData(sid);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbill;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsShelfBillVo {
|
||||||
|
|
||||||
|
private String sid;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("单据日期")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty("来源单号(收货单号)")
|
||||||
|
private String sourceBillNo;
|
||||||
|
@ApiModelProperty("单据状态:0新建,1已完成")
|
||||||
|
private String billState;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbilldetail;
|
||||||
|
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/18
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class ShelfDetailsListVo implements Vo {
|
||||||
|
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("库存sid")
|
||||||
|
private String inventorySid;
|
||||||
|
@ApiModelProperty("仓库sid")
|
||||||
|
private String warehouseSid;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位编号")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("上架数量")
|
||||||
|
private String count;
|
||||||
|
|
||||||
|
//商品名称
|
||||||
|
@ApiModelProperty("商品Sku名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
//商品编码
|
||||||
|
@ApiModelProperty("商品sku编码")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
//规格
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
//单位
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
//仓库
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
//库位
|
||||||
|
@ApiModelProperty("库位名称")
|
||||||
|
private String warehouseRackName;
|
||||||
|
//已上架数量
|
||||||
|
private String actualCount;
|
||||||
|
//载具编号
|
||||||
|
private String packageNo;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/23
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class ShelfInitListVo {
|
||||||
|
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("库存sid")
|
||||||
|
private String inventorySid;
|
||||||
|
@ApiModelProperty("仓库sid")
|
||||||
|
private String warehouseSid;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位编号")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("上架数量")
|
||||||
|
private String count;
|
||||||
|
|
||||||
|
//商品名称
|
||||||
|
@ApiModelProperty("商品Sku名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
//商品编码
|
||||||
|
@ApiModelProperty("商品sku编码")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
//规格
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
//单位
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
//仓库
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
//库位
|
||||||
|
@ApiModelProperty("库位名称")
|
||||||
|
private String warehouseRackName;
|
||||||
|
//已上架数量
|
||||||
|
private String actualCount;
|
||||||
|
//载具编号
|
||||||
|
private String packageNo;
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbilldetail;
|
||||||
|
|
||||||
|
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/10
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsShelfBillDetail extends BaseEntity {
|
||||||
|
@ApiModelProperty("单据sid")
|
||||||
|
private String billSid;
|
||||||
|
@ApiModelProperty("收货单明细sid")
|
||||||
|
private String receiptDetailSid;
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("库存sid")
|
||||||
|
private String inventorySid;
|
||||||
|
@ApiModelProperty("仓库sid")
|
||||||
|
private String warehouseSid;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位编号")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("上架数量")
|
||||||
|
private BigDecimal count;
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/15
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsShelfBillDetailDto {
|
||||||
|
|
||||||
|
@ApiModelProperty("收货单明细sid")
|
||||||
|
private String receiptDetailSid;
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
@ApiModelProperty("库存sid")
|
||||||
|
private String inventorySid;
|
||||||
|
@ApiModelProperty("仓库sid")
|
||||||
|
private String warehouseSid;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位编号")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("需上架数量")
|
||||||
|
private String count;
|
||||||
|
|
||||||
|
|
||||||
|
//商品名称
|
||||||
|
@ApiModelProperty("商品Sku名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
//商品编码
|
||||||
|
@ApiModelProperty("商品sku编码")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
//规格
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
//单位
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
//仓库
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
//库位
|
||||||
|
@ApiModelProperty("库位名称")
|
||||||
|
private String warehouseRackName;
|
||||||
|
//已上架数量
|
||||||
|
private String actualCount;
|
||||||
|
//载具编号
|
||||||
|
private String packageNo;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbilldetail;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/17
|
||||||
|
**/
|
||||||
|
@Mapper
|
||||||
|
public interface WmsShelfBillDetailMapper extends BaseMapper<WmsShelfBillDetail> {
|
||||||
|
int deleteByMainSid(String sid);
|
||||||
|
|
||||||
|
List<ShelfDetailsListVo> details(String sid);
|
||||||
|
|
||||||
|
List<WmsShelfBillDetailVos> selectByBillSid(String sid);
|
||||||
|
|
||||||
|
List<String> selectReceiptSidList();
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<?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.storage.biz.wmsshelfbilldetail.WmsShelfBillDetailMapper">
|
||||||
|
<delete id="deleteByMainSid">
|
||||||
|
delete
|
||||||
|
from wms_shelf_bill_detail
|
||||||
|
where billSid = #{sid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="details" resultType="com.yxt.storage.biz.wmsshelfbilldetail.ShelfDetailsListVo">
|
||||||
|
select wsd.batchNumber,
|
||||||
|
wsd.inventorySid,
|
||||||
|
wsd.warehouseSid,
|
||||||
|
wsd.warehouseRackCode,
|
||||||
|
wsd.warehouseRackSid,
|
||||||
|
wsd.count
|
||||||
|
from wms_shelf_bill_detail wsd
|
||||||
|
where billSid = #{sid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByBillSid" resultType="com.yxt.storage.biz.wmsshelfbilldetail.WmsShelfBillDetailVos">
|
||||||
|
select wrbd.goodSpuSid,
|
||||||
|
wrbd.goodsSpuName,
|
||||||
|
wrbd.goodsSkuSid,
|
||||||
|
wrbd.goodsSkuTitle,
|
||||||
|
wrbd.goodsSkuCode,
|
||||||
|
wrbd.goodsSkuOwnSpec,
|
||||||
|
wrbd.unit,
|
||||||
|
wsbd.actualCount count,
|
||||||
|
wrbd.warehouseSid,
|
||||||
|
wrbd.warehouseName,
|
||||||
|
wrbd.warehouseRackSid,
|
||||||
|
wsbd.warehouseRackCode,
|
||||||
|
wsbd.batchNumber,
|
||||||
|
wsbd.inventorySid,
|
||||||
|
wsbd.sid detailsSid
|
||||||
|
from wms_shelf_bill_detail wsbd
|
||||||
|
left join wms_receipt_bill_detail wrbd on wrbd.sid = wsbd.receiptDetailSid
|
||||||
|
where wsbd.billSid = #{sid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectReceiptSidList" resultType="java.lang.String">
|
||||||
|
select receiptDetailSid
|
||||||
|
from wms_shelf_bill_detail
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbilldetail;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/17
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class WmsShelfBillDetailService extends MybatisBaseService<WmsShelfBillDetailMapper, WmsShelfBillDetail> {
|
||||||
|
public void saveShelfDetails(String sid, List<WmsShelfBillDetailDto> list) {
|
||||||
|
baseMapper.deleteByMainSid(sid);
|
||||||
|
list.forEach(v -> {
|
||||||
|
WmsShelfBillDetail wmsShelfBillDetail = new WmsShelfBillDetail();
|
||||||
|
BeanUtil.copyProperties(v, wmsShelfBillDetail, "sid");
|
||||||
|
wmsShelfBillDetail.setBillSid(sid);
|
||||||
|
baseMapper.insert(wmsShelfBillDetail);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ShelfDetailsListVo> details(String sid) {
|
||||||
|
return baseMapper.details(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WmsShelfBillDetailVos> selectByBillSid(String sid) {
|
||||||
|
return baseMapper.selectByBillSid(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> selectReceiptSidList() {
|
||||||
|
return baseMapper.selectReceiptSidList();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.yxt.storage.biz.wmsshelfbilldetail;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/4/19
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class WmsShelfBillDetailVos {
|
||||||
|
|
||||||
|
private String detailsSid;
|
||||||
|
|
||||||
|
@ApiModelProperty("商品基础信息sid")
|
||||||
|
private String goodSpuSid;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsSpuName;
|
||||||
|
@ApiModelProperty("商品Skusid")
|
||||||
|
private String goodsSkuSid;
|
||||||
|
@ApiModelProperty("商品Sku名称")
|
||||||
|
private String goodsSkuTitle;
|
||||||
|
@ApiModelProperty("商品编码")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("规格型号")
|
||||||
|
private String goodsSkuOwnSpec;
|
||||||
|
@ApiModelProperty("计量单位")
|
||||||
|
private String unit;
|
||||||
|
@ApiModelProperty("现有量")
|
||||||
|
private String count;
|
||||||
|
@ApiModelProperty("仓库sid")
|
||||||
|
private String warehouseSid;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
@ApiModelProperty("库位sid")
|
||||||
|
private String warehouseRackSid;
|
||||||
|
@ApiModelProperty("库位编码")
|
||||||
|
private String warehouseRackCode;
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
|
||||||
|
private String inventorySid;
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.yxt.storage.feign.goods.basegoodssku;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/3/20
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class BaseGoodsSkuDetailsVo {
|
||||||
|
|
||||||
|
@ApiModelProperty("商品代码")
|
||||||
|
private String goodsCode;
|
||||||
|
@ApiModelProperty("条形码")
|
||||||
|
private String barCode;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goodsName;
|
||||||
|
@ApiModelProperty("副标题")
|
||||||
|
private String subTitle;
|
||||||
|
@ApiModelProperty("拼音缩写")
|
||||||
|
private String goodsPY;
|
||||||
|
@ApiModelProperty("商品简称")
|
||||||
|
private String goodsShortName;
|
||||||
|
@ApiModelProperty("商品分类sid")
|
||||||
|
private String goodsTypeSid;
|
||||||
|
@ApiModelProperty("品牌sid")
|
||||||
|
private String brandSid;
|
||||||
|
@ApiModelProperty("厂家sid")
|
||||||
|
private String manufacturersid;
|
||||||
|
@ApiModelProperty("商品单位sid")
|
||||||
|
private String goodsUnitSid;
|
||||||
|
@ApiModelProperty("商品单位名称")
|
||||||
|
private String goodsUnitName;
|
||||||
|
|
||||||
|
@ApiModelProperty("商品Sku代码")
|
||||||
|
private String goodsSkuCode;
|
||||||
|
@ApiModelProperty("商品标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否一品一码(goodID),0否,1是")
|
||||||
|
@JsonProperty("isGoodsID")
|
||||||
|
private int isGoodsID;
|
||||||
|
@ApiModelProperty("商品类别名称")
|
||||||
|
private String goodsTypeName;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.yxt.storage.feign.goods.basegoodssku;
|
||||||
|
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/3/20
|
||||||
|
**/
|
||||||
|
@FeignClient(
|
||||||
|
contextId = "yxt-base-BaseGoodsSku",
|
||||||
|
name = "yxt-base",
|
||||||
|
path = "/apiadmin/base/basegoodssku",
|
||||||
|
fallback = BaseGoodsSkuFeignFallback.class)
|
||||||
|
public interface BaseGoodsSkuFeign {
|
||||||
|
|
||||||
|
@ApiOperation("获取商品信息")
|
||||||
|
@GetMapping("/getDetails")
|
||||||
|
ResultBean<BaseGoodsSkuDetailsVo> getDetails(@RequestParam("sid") String sid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.yxt.storage.feign.goods.basegoodssku;
|
||||||
|
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/3/20
|
||||||
|
**/
|
||||||
|
@Component
|
||||||
|
public class BaseGoodsSkuFeignFallback implements BaseGoodsSkuFeign{
|
||||||
|
@Override
|
||||||
|
public ResultBean<BaseGoodsSkuDetailsVo> getDetails(String sid) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
15
src/main/java/com/yxt/storage/utils/Rule.java
Normal file
15
src/main/java/com/yxt/storage/utils/Rule.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package com.yxt.storage.utils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/3/20
|
||||||
|
**/
|
||||||
|
public class Rule {
|
||||||
|
|
||||||
|
public static String getBillNo(String bill, int i) {
|
||||||
|
String num = String.format("%04d", i + 1); // 不足4位补0
|
||||||
|
String billNo = bill + num;
|
||||||
|
return billNo;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
hikari:
|
||||||
|
max-lifetime: 500000
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://39.104.100.138:3306/yxt_wms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
||||||
|
username: root
|
||||||
|
password: yxt_mysql_138
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
server-addr: 127.0.0.1:8848
|
||||||
|
redis:
|
||||||
|
database: 3 # Redis数据库索引(默认为0)
|
||||||
|
host: 127.0.0.1
|
||||||
|
jedis:
|
||||||
|
pool:
|
||||||
|
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||||
|
max-idle: 8 #连接池中的最大空闲连接
|
||||||
|
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
min-idle: 0 # 连接池中的最小空闲连接
|
||||||
|
password: 123456
|
||||||
|
port: 6379
|
||||||
|
timeout: 0 # 连接超时时间(毫秒)
|
||||||
|
|
||||||
|
image:
|
||||||
|
upload:
|
||||||
|
path: D:/works/projects/yxt/yxtgit/lipinka/yxt-yythmall-biz/target/classes/static/upload/
|
||||||
|
url:
|
||||||
|
prefix: http://192.168.2.111:7211/upload/
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: yxt-wms
|
||||||
|
profiles:
|
||||||
|
active: devv
|
||||||
|
messages:
|
||||||
|
# 国际化资源文件路径
|
||||||
|
basename: i18n/messages
|
||||||
|
servlet:
|
||||||
|
#上传文件
|
||||||
|
multipart:
|
||||||
|
max-file-size: 50MB
|
||||||
|
max-request-size: 100MB
|
||||||
|
devtools:
|
||||||
|
restart:
|
||||||
|
# 热部署开关
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 7301
|
||||||
|
max-http-header-size: 102400
|
||||||
|
undertow:
|
||||||
|
max-http-post-size: -1
|
||||||
|
|
||||||
|
#mybatis
|
||||||
|
mybatis-plus:
|
||||||
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
|
mapper-locations: classpath*:**Mapper.xml
|
||||||
|
global-config:
|
||||||
|
refresh: true
|
||||||
|
db-config:
|
||||||
|
#定义生成ID的类型
|
||||||
|
id-type: Auto
|
||||||
|
db-type: mysql
|
||||||
|
configuration:
|
||||||
|
map-underscore-to-camel-case: false
|
||||||
|
cache-enabled: true
|
||||||
|
call-setters-on-nulls: true
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
54
src/main/resources/logback-spring.xml
Normal file
54
src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
|
||||||
|
<property name="log.base" value="logs/yxt_storage"/>
|
||||||
|
|
||||||
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 :
|
||||||
|
|%blue(%thread) 线程 如 :DiscoveryClient-CacheRefreshExecutor-0-->
|
||||||
|
<!--<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>-->
|
||||||
|
<pattern>%yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n)
|
||||||
|
</pattern>
|
||||||
|
<!--<charset>UTF-8</charset> -->
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 彩色日志 -->
|
||||||
|
<!-- 彩色日志依赖的渲染类 -->
|
||||||
|
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
|
||||||
|
<conversionRule conversionWord="wex"
|
||||||
|
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
|
||||||
|
<conversionRule conversionWord="wEx"
|
||||||
|
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
||||||
|
<!-- 彩色日志格式 -->
|
||||||
|
<property name="CONSOLE_LOG_PATTERN"
|
||||||
|
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||||
|
|
||||||
|
<appender name="FILEOUT"
|
||||||
|
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.base}.log</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<fileNamePattern>${log.base}.%d{yyyyMMdd}.%i.log.zip
|
||||||
|
</fileNamePattern>
|
||||||
|
<!-- 当文件大小超过10MB时触发滚动 -->
|
||||||
|
<timeBasedFileNamingAndTriggeringPolicy
|
||||||
|
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||||
|
<maxFileSize>1MB</maxFileSize>
|
||||||
|
</timeBasedFileNamingAndTriggeringPolicy>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<!--<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>-->
|
||||||
|
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}
|
||||||
|
-%msg%n
|
||||||
|
</Pattern>
|
||||||
|
<!--<charset>UTF-8</charset> -->
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root level="DEBUG">
|
||||||
|
<appender-ref ref="STDOUT"/>
|
||||||
|
<appender-ref ref="FILEOUT"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
Reference in New Issue
Block a user