diff --git a/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryAllocatebillDetailRest.java b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryAllocatebillDetailRest.java new file mode 100644 index 0000000..3c4086c --- /dev/null +++ b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryAllocatebillDetailRest.java @@ -0,0 +1,96 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsinventoryallocatebill.*; +import com.yxt.warehouse.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailDtoNew; +import com.yxt.warehouse.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailQuery; +import com.yxt.warehouse.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailService; +import com.yxt.warehouse.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillDetailFeignFallback.java
+ * Class: com.yxt.wms.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailRest
+ * Description: (调拨单-明细).
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "(调拨单-明细)") +@RestController +@RequestMapping("v1/wmsinventoryallocatebilldetail") +public class WmsInventoryAllocatebillDetailRest { + + @Autowired + private WmsInventoryAllocateBillDetailService wmsInventoryAllocateBillDetailService; + + + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + return wmsInventoryAllocateBillDetailService.listPage(pq); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventoryAllocateBillDetailDtoNew dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryAllocateBillDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryAllocateBillDetailService.delAll(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetailsVoNew vo = wmsInventoryAllocateBillDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + + +} diff --git a/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryAllocatebillRest.java b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryAllocatebillRest.java new file mode 100644 index 0000000..3c23895 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryAllocatebillRest.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsinventoryallocatebill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillFeignFallback.java
+ * Class: com.yxt.wms.biz.wmsinventoryallocatebill.WmsInventoryAllocatebillRest
+ * Description: (调拨单)-调出方操作.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "(调拨单)-调出方操作") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventoryallocatebill") +public class WmsInventoryAllocatebillRest { + + @Autowired + private WmsInventoryAllocateBillService wmsInventoryAllocateBillService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryAllocateBillService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventoryAllocateBillDtoNew dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryAllocateBillService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryAllocateBillService.delAll(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetailsVoNew vo = wmsInventoryAllocateBillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("调拨") + @PostMapping("/allocation") + public ResultBean allocation(@RequestBody WmsInventoryAllocateBillDtoNew dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryAllocateBillService.allocation(dto); + return rb.success(); + } +} diff --git a/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryBatchRest.java b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryBatchRest.java new file mode 100644 index 0000000..af750d1 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryBatchRest.java @@ -0,0 +1,52 @@ +package com.yxt.warehouse.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsinventorybatch.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/6/4 16:56 + */ +@Api(tags = "(商品库存-批次属性)") +@RestController +@RequestMapping("/apiadmin/base/inventorybatch") +public class WmsInventoryBatchRest { + + @Autowired + WmsInventoryBatchService wmsInventoryBatchService; + + + @ApiOperation("分页列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq) { + return new ResultBean(wmsInventoryBatchService.listPageVo(pq)); + } + + + @ApiOperation("保存修改") + @PostMapping("/saveOrUpdate") + public void saveOrUpdate(@RequestBody WmsInventoryBatchDto dto) { + wmsInventoryBatchService.saveOrUpdateDto(dto); + } + + @ApiOperation("初始化") + @GetMapping("/initialization/{sid}") + public ResultBean initialization(@PathVariable("sid") String sid) { + return new ResultBean<>(wmsInventoryBatchService.fetchDetailsVoBySid(sid)); + } + + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryBatchService.delBySids(sids); + return rb.success(); + } +} diff --git a/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryCheckbillDetailRest.java b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryCheckbillDetailRest.java new file mode 100644 index 0000000..72b0c80 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryCheckbillDetailRest.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsinventorycheckbilldetail.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailFeignFallback.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailRest
+ * Description: 库存盘点-明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "库存盘点-明细") +@RestController +@RequestMapping("wmsinventorycheckbilldetail") +public class WmsInventoryCheckbillDetailRest { + + @Autowired + private WmsInventoryCheckbillDetailService wmsInventoryCheckbillDetailService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryCheckbillDetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventoryCheckbillDetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillDetailService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryCheckbillDetailDetailsVo vo = wmsInventoryCheckbillDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryCheckbillRest.java b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryCheckbillRest.java new file mode 100644 index 0000000..38c52ea --- /dev/null +++ b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventoryCheckbillRest.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsinventorycheckbill.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillFeignFallback.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbill.WmsInventoryCheckbillRest
+ * Description: 库存盘点.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "库存盘点") +@RestController +@RequestMapping("v1/wmsinventorycheckbill") +public class WmsInventoryCheckbillRest { + + @Autowired + private WmsInventoryCheckbillService wmsInventoryCheckbillService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventoryCheckbillService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventoryCheckbillDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillService.delBySids(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryCheckbillDetailsVo vo = wmsInventoryCheckbillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + @ApiOperation("盘点") + @PostMapping("/inven") + public ResultBean inven(@RequestBody WmsInventoryCheckbillDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryCheckbillService.inven(dto); + return rb.success(); + } +} diff --git a/src/main/java/com/yxt/warehouse/apiadmin/WmsInventorySettlebillDetailRest.java b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventorySettlebillDetailRest.java new file mode 100644 index 0000000..46cb2c2 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventorySettlebillDetailRest.java @@ -0,0 +1,117 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.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.warehouse.biz.wmsinventorysettlebilldetail.*; +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; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailFeignFallback.java
+ * Class: wms.biz.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailRest
+ * Description: 库存结算明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "库存结算明细") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventorysettlebilldetail") +public class WmsInventorySettlebillDetailRest{ + + @Autowired + private WmsInventorySettlebillDetailService wmsInventorySettlebillDetailService; + @Autowired + HttpServletResponse response; + + @PostMapping("/exportExcel") + @ApiOperation(value = "导出") + public void exportExcel(@RequestBody WmsInventorySettlebillDetailQuery query) { + //得到所有要导出的数据 + List exportVoList = wmsInventorySettlebillDetailService.listExcel(query); + //定义导出的excel名字 + String excelName = "结转库存列表"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + ExportExcelUtils.export(fileNameURL, exportVoList, WmsInventorySettlebillExportVo.class, response); + + } + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventorySettlebillDetailService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventorySettlebillDetailDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillDetailService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillDetailService.delBySids(sids); + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventorySettlebillDetailDetailsVo vo = wmsInventorySettlebillDetailService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/src/main/java/com/yxt/warehouse/apiadmin/WmsInventorySettlebillRest.java b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventorySettlebillRest.java new file mode 100644 index 0000000..654fb6e --- /dev/null +++ b/src/main/java/com/yxt/warehouse/apiadmin/WmsInventorySettlebillRest.java @@ -0,0 +1,117 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsinventorysettlebill.*; +import com.yxt.warehouse.biz.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillFeignFallback.java
+ * Class: wms.biz.wmsinventorysettlebill.WmsInventorySettlebillRest
+ * Description: 库存结算单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "库存结算单") +@RestController +@RequestMapping("/apiadmin/inventory/wmsinventorysettlebill") +public class WmsInventorySettlebillRest { + + @Autowired + private WmsInventorySettlebillService wmsInventorySettlebillService; + @Autowired + private WmsInventorySettlebillDetailService wmsInventorySettlebillDetailService; + + @ApiOperation("库存结转") + @PostMapping("/saveSettlebill") + public ResultBean saveSettlebill(@RequestBody WmsInventorySettlebillDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillService.saveSettlebill(dto); + return rb.success(); + } + + @ApiOperation("结转记录查询") + @PostMapping("/carryForwardList") + public ResultBean> carryForwardList(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventorySettlebillService.carryForwardList(pq); + return rb.success().setData(pv); + } + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = wmsInventorySettlebillService.listPageVo(pq); + return rb.success().setData(pv); + } + + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsInventorySettlebillDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillService.saveOrUpdateDto(dto); + return rb.success(); + } + + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsInventorySettlebillService.delBySids(sids); + for (String sid : sids) { + wmsInventorySettlebillDetailService.delByMainSid(sid); + } + return rb.success(); + } + + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventorySettlebillDetailsVo vo = wmsInventorySettlebillService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + + + +} diff --git a/src/main/java/com/yxt/warehouse/apiadmin/WmsReportLoseRest.java b/src/main/java/com/yxt/warehouse/apiadmin/WmsReportLoseRest.java new file mode 100644 index 0000000..5571f1d --- /dev/null +++ b/src/main/java/com/yxt/warehouse/apiadmin/WmsReportLoseRest.java @@ -0,0 +1,55 @@ +package com.yxt.warehouse.apiadmin; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsreportlose.WmsReportLoseDto; +import com.yxt.warehouse.biz.wmsreportlose.WmsReportLoseQuery; +import com.yxt.warehouse.biz.wmsreportlose.WmsReportLoseService; +import com.yxt.warehouse.biz.wmsreportlose.WmsReportLoseVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author wangpengfei + * @date 2024/6/5 16:48 + */ +@Api(tags = "库存结算单") +@RestController +@RequestMapping("/apiadmin/inventory/wmsreportlose") +public class WmsReportLoseRest { + @Autowired + private WmsReportLoseService wmsReportLoseService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + return wmsReportLoseService.listPage(pq); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody WmsReportLoseDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsReportLoseService.saveOrUpdateDto(dto); + return rb.success(); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + wmsReportLoseService.delAll(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsReportLoseVo vo = wmsReportLoseService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/src/main/java/com/yxt/warehouse/biz/warehouseshelfbill/WarehouseShelfBillService.java b/src/main/java/com/yxt/warehouse/biz/warehouseshelfbill/WarehouseShelfBillService.java index 37d0ff3..dcc346b 100644 --- a/src/main/java/com/yxt/warehouse/biz/warehouseshelfbill/WarehouseShelfBillService.java +++ b/src/main/java/com/yxt/warehouse/biz/warehouseshelfbill/WarehouseShelfBillService.java @@ -21,8 +21,6 @@ import com.yxt.warehouse.biz.warehousereceiptbilldetail.WarehouseReceiptBillDeta import com.yxt.warehouse.biz.warehousereceiptbilldetailbatch.WarehouseReceiptBillDetailBatch; import com.yxt.warehouse.biz.warehousereceiptbilldetailbatch.WarehouseReceiptBillDetailBatchService; import com.yxt.warehouse.biz.warehouseshelfbilldetail.*; -import com.yxt.warehouse.feign.goods.basegoodssku.BaseGoodsSkuDetailsVo; -import com.yxt.warehouse.feign.goods.basegoodssku.BaseGoodsSkuFeign; import com.yxt.warehouse.utils.Rule; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -48,8 +46,6 @@ public class WarehouseShelfBillService extends MybatisBaseService 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; - } +// private String getGoodsId(String goodsSkuSid) { +// String goodsId = ""; +// ResultBean 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(); diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBill.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBill.java new file mode 100644 index 0000000..cf3f456 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBill.java @@ -0,0 +1,31 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsInventoryAllocateBill extends BaseEntity { + + private String billNo;//单据编号 + private String createDate;//制单日期 + private String createUserSid;//制单人sid + private String createByName;//制单人姓名 + private String outOrgSid;//调出分公司sid + private String inOrgSid;//调入分公司sid + private String count;//调拨数量 + private String amount;//调拨金额 + private String confirmSid;//确认人sid + private String confirmName;//确认人姓名 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date finishTime;//完成时间 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java new file mode 100644 index 0000000..3cb4ae2 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java @@ -0,0 +1,96 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import com.yxt.warehouse.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailDetailsVoNew; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebill.WmsInventoryAllocatebillVo
+ * Description: (调拨单)-调出方操作 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单)-调出方操作 视图数据详情", description = "(调拨单)-调出方操作 视图数据详情") +public class WmsInventoryAllocateBillDetailsVoNew implements Vo { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("调出分公司sid") + private String outOrgSid; + @ApiModelProperty("调入分公司sid") + private String inOrgSid; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额") + private BigDecimal amount; + @ApiModelProperty("确认人sid") + private String confirmSid; + @ApiModelProperty("确认人姓名") + private String confirmName; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("完成时间") + private Date finishTime; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("调拨单商品明细") + private List wmsInventoryAllocateBillDetailNewList; + + /* + * 页面展示 + * */ + @ApiModelProperty("调出分公司名称") + private String outOrgName; + @ApiModelProperty("调入分公司名称") + private String inOrgName; +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillDto.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillDto.java new file mode 100644 index 0000000..23be8e2 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillDto.java @@ -0,0 +1,45 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryAllocateBillDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodsSid;//商品sid + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + private String unit;//计量单位 + private String count;//库存数量 + private String minimumPrice;//销售底价 + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String isShowDiscount;//是否显示折扣标志 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillDtoNew.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillDtoNew.java new file mode 100644 index 0000000..9984b0d --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillDtoNew.java @@ -0,0 +1,59 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import com.yxt.warehouse.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailDtoNew; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryAllocateBillDtoNew implements Dto { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("调出分公司sid") + private String outOrgSid; + @ApiModelProperty("调入分公司sid") + private String inOrgSid; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额") + private BigDecimal amount; + @ApiModelProperty("确认人sid") + private String confirmSid; + @ApiModelProperty("确认人姓名") + private String confirmName; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("完成时间") + private Date finishTime; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("调拨单商品明细") + private List wmsInventoryAllocateBillDetailNewList; + + /* + * 页面展示 + * */ + @ApiModelProperty("调出分公司名称") + private String outOrgName; + @ApiModelProperty("调入分公司名称") + private String inOrgName; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.java new file mode 100644 index 0000000..a203051 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.java @@ -0,0 +1,20 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + +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; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsInventoryAllocateBillMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsInventoryAllocateBillVo initialization (@Param("sid") String sid); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.xml b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.xml new file mode 100644 index 0000000..488b0d1 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillMapper.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillQuery.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillQuery.java new file mode 100644 index 0000000..da921d2 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillQuery.java @@ -0,0 +1,13 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryAllocateBillQuery implements Query { + private String name; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java new file mode 100644 index 0000000..6ac38fc --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java @@ -0,0 +1,26 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + +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 WmsInventoryAllocateBillQueryNew implements Query { + + @ApiModelProperty("创建开始日期") + private String createStartTime; + @ApiModelProperty("创建结束日期") + private String createEndTime; + @ApiModelProperty("门店") + private String createOrgSid; + @ApiModelProperty("状态") + private String state; + @ApiModelProperty("单据范围") + private String billFW; + @ApiModelProperty("其他查询条件") + private String otherQuery; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java new file mode 100644 index 0000000..aca0fa8 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java @@ -0,0 +1,195 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailDtoNew; +import com.yxt.warehouse.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailService; +import com.yxt.warehouse.biz.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailDetailsVoNew; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsInventoryAllocateBillService extends MybatisBaseService { + + @Autowired + private WmsInventoryAllocateBillDetailService wmsInventoryAllocateBillDetailService; + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("rackName", query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventoryAllocateBillQueryNew query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + /** + * 入库 + * @param dto + * @return + */ +// public ResultBean warehousing(WmsInventoryAllocateBillDto dto) { +// ResultBean rb = ResultBean.fireFail(); +// WmsInventoryAllocateBill wmsInventory=baseMapper.selectOne(new QueryWrapper().eq("goodsSid",dto.getGoodsSid()).eq("warehouseSid",dto.getWarehouseSid())); +// if(null==wmsInventory){ +// WmsInventoryAllocateBill wms=new WmsInventoryAllocateBill(); +// BeanUtil.copyProperties(dto,wms,"sid","id"); +// wms.setFirstInDate(new Date()); +// baseMapper.insert(wms); +// return rb.success().setData(wms); +// }else{ +// wmsInventory.setCount(String.valueOf(Double.valueOf(dto.getCount())+Double.valueOf(wmsInventory.getCount()))); +// baseMapper.updateById(wmsInventory); +// } +// return rb.success().setData(wmsInventory); +// } + + /** + * 出库 + * + * @param dto + * @return + */ + public ResultBean outWarehousing(WmsInventoryAllocateBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBill wmsInventory = baseMapper.selectOne(new QueryWrapper().eq("goodsSid", dto.getGoodsSid()).eq("warehouseSid", dto.getWarehouseSid())); + double exisInventory = Double.valueOf(wmsInventory.getCount()); + double out = Double.valueOf(dto.getCount()); + if (null == wmsInventory) { + return rb.setMsg("此仓库没有相应的商品库存"); + } + if (exisInventory < -out) { + return rb.setMsg("库存不足"); + } + wmsInventory.setCount(String.valueOf(exisInventory + out)); + baseMapper.updateById(wmsInventory); + return rb.success().setData(wmsInventory); + } + + public ResultBean saveOrUpdate(WmsInventoryAllocateBillDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsInventoryAllocateBill wmsWarehouseRack = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + baseMapper.updateById(wmsWarehouseRack); + } else { + WmsInventoryAllocateBill wmsWarehouseRack = new WmsInventoryAllocateBill(); + sid = wmsWarehouseRack.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBill wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + baseMapper.deleteById(wmsWarehouseRack.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBill wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public WmsInventoryAllocateBillDetailsVoNew fetchDetailsVoBySid(String sid) { + WmsInventoryAllocateBill entity = fetchBySid(sid); + WmsInventoryAllocateBillDetailsVoNew vo = new WmsInventoryAllocateBillDetailsVoNew(); + BeanUtil.copyProperties(entity, vo); + List wmsInventoryAllocatebillDetailDetailsVoNews = wmsInventoryAllocateBillDetailService.selByMainSid(sid); + vo.setWmsInventoryAllocateBillDetailNewList(wmsInventoryAllocatebillDetailDetailsVoNews); + return vo; + } + + public void delAll(String[] sids) { + delBySids(sids); + for (String sid : sids) { + wmsInventoryAllocateBillDetailService.delByMainSid(sid); + } + } + + public void saveOrUpdateDto(WmsInventoryAllocateBillDtoNew dto) { + String dtoSid = dto.getSid(); + List wmsInventoryAllocateBillDetailNewList = dto.getWmsInventoryAllocateBillDetailNewList(); + if (StringUtils.isBlank(dtoSid)) { + String sid = this.insertByDto(dto); + for (WmsInventoryAllocateBillDetailDtoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocateBillDetailNewList) { + wmsInventoryAllocateBillDetailDtoNew.setBillSid(sid); + wmsInventoryAllocateBillDetailService.saveOrUpdateDto(wmsInventoryAllocateBillDetailDtoNew); + } + return; + } + this.updateByDto(dto); + wmsInventoryAllocateBillDetailService.delByMainSid(dtoSid); + for (WmsInventoryAllocateBillDetailDtoNew wmsInventoryAllocateBillDetailDtoNew : wmsInventoryAllocateBillDetailNewList) { + wmsInventoryAllocateBillDetailDtoNew.setBillSid(dtoSid); + wmsInventoryAllocateBillDetailService.saveOrUpdateDto(wmsInventoryAllocateBillDetailDtoNew); + } + } + + public String insertByDto(WmsInventoryAllocateBillDtoNew dto) { + WmsInventoryAllocateBill entity = new WmsInventoryAllocateBill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return entity.getSid(); + } + + public void updateByDto(WmsInventoryAllocateBillDtoNew dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + } + + public void allocation(WmsInventoryAllocateBillDtoNew dto) { + + } +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillVo.java new file mode 100644 index 0000000..67203cc --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillVo.java @@ -0,0 +1,52 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryAllocateBillVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodsSid;//商品sid + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + private String unit;//计量单位 + private String count;//库存数量 + private String minimumPrice;//销售底价 + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String isShowDiscount;//是否显示折扣标志 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + private String goodsName; + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java new file mode 100644 index 0000000..8d92080 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java @@ -0,0 +1,55 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebill.WmsInventoryAllocatebillVo
+ * Description: (调拨单)-调出方操作 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单)-调出方操作 视图数据对象", description = "(调拨单)-调出方操作 视图数据对象") +public class WmsInventoryAllocateBillVoNew implements Vo { + + private String sid; + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("制单日期") + private String createDate; + @ApiModelProperty("完成标志") + private String state; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("完成时间") + private Date finishTime; + @ApiModelProperty("调出门店") + private String outOrg; + @ApiModelProperty("调入门店") + private String inOrg; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额") + private BigDecimal amount; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("门店") + private String createOrgName; + +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java new file mode 100644 index 0000000..8cfc2a8 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java @@ -0,0 +1,38 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebilldetail; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsInventoryAllocateBillDetail extends BaseEntity { +// private String id; +// private String sid= UUID.randomUUID().toString(); +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") +// private Date createTime; +// private String remarks; +// private String isEnable; + private String billSid;//商品ID(唯一编码,入库时生成) + private String inventorySid;//商品sid + private String goodsSid;//入库单sid + private String goodsName;//入库单明细sid + private String goodsCode;//销售价格1 + private String specification;//销售价格2 + private String goodsModel;//销售价格3 + private String unit;//销售价格4 + private String outWarehouseSid;//销售价格5 + private String outWarehouseName;//计量单位 + private String warehouseAreasid;//库存数量 + private String warehouseArea;//销售底价 + private String taxPrice;//三包价格 + private String stockCount;//首保价格 + private String inWarehouseSid;//仓库sid + private String inWarehouseName;//仓库名称 + private String count;//货位 + private String amount;//是否显示折扣标志 + + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDto.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDto.java new file mode 100644 index 0000000..3ba2567 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDto.java @@ -0,0 +1,45 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryAllocateBillDetailDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodsSid;//商品sid + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + private String unit;//计量单位 + private String count;//库存数量 + private String minimumPrice;//销售底价 + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String isShowDiscount;//是否显示折扣标志 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java new file mode 100644 index 0000000..378d8ad --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java @@ -0,0 +1,60 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebilldetail; + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsInventoryAllocateBillDetailDtoNew implements Dto { + + private String sid; + + @ApiModelProperty("盘点单sid") + private String billSid; + @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 taxPrice; + @ApiModelProperty("库存数量") + private BigDecimal stockCount; + @ApiModelProperty("调入仓库sid") + private String inWarehouseSid; + @ApiModelProperty("调入仓库名称") + private String inWarehouseName; + @ApiModelProperty("调入库位sid") + private String inWarehouseRackSid; + @ApiModelProperty("调入库位编码") + private String inWarehouseRackCode; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额(调拨数量*含税价)") + private BigDecimal amount; + + /* + * 页面展示 + * */ + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("零件号") + private String goodsSkuCode; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("车型") + private String carModel; + @ApiModelProperty("商品单位") + private String unit; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.java new file mode 100644 index 0000000..3b4538d --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.java @@ -0,0 +1,26 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebilldetail; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsInventoryAllocateBillDetailMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsInventoryAllocateBillDetailVo initialization (@Param("sid") String sid); + + @Delete("delete from wms_inventory_allocatebill_detail where billSid = #{billSid}") + void delByMainSid(String billSid); + + List selByMainSid(String billSid); +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml new file mode 100644 index 0000000..8298849 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailQuery.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailQuery.java new file mode 100644 index 0000000..370cb90 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailQuery.java @@ -0,0 +1,13 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebilldetail; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryAllocateBillDetailQuery implements Query { + private String name; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailService.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailService.java new file mode 100644 index 0000000..a8709d8 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailService.java @@ -0,0 +1,148 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebilldetail; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsinventoryallocatebill.WmsInventoryAllocateBill; +import com.yxt.warehouse.biz.wmsinventoryallocatebill.WmsInventoryAllocateBillDetailsVoNew; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsInventoryAllocateBillDetailService extends MybatisBaseService { + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetailQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("rackName", query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + + + + /** + * 出库 + * + * @param dto + * @return + */ + public ResultBean outWarehousing(WmsInventoryAllocateBillDetailDto dto) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetail wmsInventory = baseMapper.selectOne(new QueryWrapper().eq("goodsSid", dto.getGoodsSid()).eq("warehouseSid", dto.getWarehouseSid())); + double exisInventory = Double.valueOf(wmsInventory.getCount()); + double out = Double.valueOf(dto.getCount()); + if (null == wmsInventory) { + return rb.setMsg("此仓库没有相应的商品库存"); + } + if (exisInventory < -out) { + return rb.setMsg("库存不足"); + } + wmsInventory.setCount(String.valueOf(exisInventory + out)); + baseMapper.updateById(wmsInventory); + return rb.success().setData(wmsInventory); + } + + public ResultBean saveOrUpdate(WmsInventoryAllocateBillDetailDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsInventoryAllocateBillDetail wmsWarehouseRack = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + baseMapper.updateById(wmsWarehouseRack); + } else { + WmsInventoryAllocateBillDetail wmsWarehouseRack = new WmsInventoryAllocateBillDetail(); + sid = wmsWarehouseRack.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetailVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + public void delAll(String[] sids) { + delBySids(sids); + } + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetail wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + baseMapper.deleteById(wmsWarehouseRack.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetail wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public void delByMainSid(String billSid) { + baseMapper.delByMainSid(billSid); + } + + public List selByMainSid(String billSid) { + return baseMapper.selByMainSid(billSid); + } + + public void saveOrUpdateDto(WmsInventoryAllocateBillDetailDtoNew dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsInventoryAllocateBillDetailDtoNew dto) { + WmsInventoryAllocateBillDetail entity = new WmsInventoryAllocateBillDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsInventoryAllocateBillDetailDtoNew dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + } + public WmsInventoryAllocateBillDetailsVoNew fetchDetailsVoBySid(String sid) { + WmsInventoryAllocateBillDetail entity = fetchBySid(sid); + WmsInventoryAllocateBillDetailsVoNew vo = new WmsInventoryAllocateBillDetailsVoNew(); + BeanUtil.copyProperties(entity, vo); + + return vo; + } +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailVo.java new file mode 100644 index 0000000..c47cbb0 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailVo.java @@ -0,0 +1,52 @@ +package com.yxt.warehouse.biz.wmsinventoryallocatebilldetail; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsInventoryAllocateBillDetailVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String goodsID;//商品ID(唯一编码,入库时生成) + private String goodsSid;//商品sid + private String billSid;//入库单sid + private String billDetailSid;//入库单明细sid + private String price1;//销售价格1 + private String price2;//销售价格2 + private String price3;//销售价格3 + private String price4;//销售价格4 + private String price5;//销售价格5 + private String unit;//计量单位 + private String count;//库存数量 + private String minimumPrice;//销售底价 + private String freePrice;//三包价格 + private String firstMaintainPrice;//首保价格 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseArea;//货位 + private String isShowDiscount;//是否显示折扣标志 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date firstInDate;//首次入库日期-计算库龄的依据 + private String lockCount;//锁定数量,计算字段,出库申请通过,但未实际出库 + private String sortNo;//排序 + private String useOrgSid;//使用组织sid + private String createOrgSid;//创建组织sid + private String goodsName; + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java new file mode 100644 index 0000000..23c1cca --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java @@ -0,0 +1,97 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventoryallocatebilldetail; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillDetailVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailVo
+ * Description: (调拨单-明细) 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单-明细) 视图数据详情", description = "(调拨单-明细) 视图数据详情") +public class WmsInventoryAllocatebillDetailDetailsVoNew implements Vo { + + private String sid; + + @ApiModelProperty("盘点单sid") + private String billSid; + @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 taxPrice; + @ApiModelProperty("库存数量") + private BigDecimal stockCount; + @ApiModelProperty("调入仓库sid") + private String inWarehouseSid; + @ApiModelProperty("调入仓库名称") + private String inWarehouseName; + @ApiModelProperty("调入库位sid") + private String inWarehouseRackSid; + @ApiModelProperty("调入库位编码") + private String inWarehouseRackCode; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额(调拨数量*含税价)") + private BigDecimal amount; + + /* + * 页面展示 + * */ + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("零件号") + private String goodsSkuCode; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("车型") + private String carModel; + @ApiModelProperty("商品单位") + private String unit; +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatch.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatch.java new file mode 100644 index 0000000..9c7a575 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatch.java @@ -0,0 +1,86 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorybatch; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatch.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatch
+ * Description: 商品库存-批次属性.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性", description = "商品库存-批次属性") +@TableName("wms_inventory_batch") +public class WmsInventoryBatch extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDate; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDate; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDate; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchDetailsVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchDetailsVo.java new file mode 100644 index 0000000..4977a14 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchDetailsVo.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorybatch; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchVo.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatchVo
+ * Description: 商品库存-批次属性 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性 视图数据详情", description = "商品库存-批次属性 视图数据详情") +public class WmsInventoryBatchDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDateStart; // 收货日期 + private Date deliveryDateEnd; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDateStart; // 生产日期 + private Date manufactureDateEnd; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDateStart; // 有效期(根据spu中有效天数、生产日期计算) + private Date expirationDateEnd; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchDto.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchDto.java new file mode 100644 index 0000000..aeec423 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchDto.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorybatch; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchDto.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatchDto
+ * Description: 商品库存-批次属性 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性 数据传输对象", description = "商品库存-批次属性 数据传输对象") +public class WmsInventoryBatchDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDateStart; // 收货日期 + private Date deliveryDateEnd; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDateStart; // 生产日期 + private Date manufactureDateEnd; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDateStart; // 有效期(根据spu中有效天数、生产日期计算) + private Date expirationDateEnd; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchMapper.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchMapper.java new file mode 100644 index 0000000..9f8618f --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorybatch; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +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 org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchMapper.java
+ * Class: com.yxt.wms.biz.wmsinventorybatch.WmsInventoryBatchMapper
+ * Description: 商品库存-批次属性.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventoryBatchMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_batch") + List selectListVo(); +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchMapper.xml b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchMapper.xml new file mode 100644 index 0000000..4cf3897 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchQuery.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchQuery.java new file mode 100644 index 0000000..8f04cd6 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchQuery.java @@ -0,0 +1,87 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorybatch; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchQuery.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatchQuery
+ * Description: 商品库存-批次属性 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性 查询条件", description = "商品库存-批次属性 查询条件") +public class WmsInventoryBatchQuery implements Query { + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDateStart; // 收货日期 + private Date deliveryDateEnd; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDateStart; // 生产日期 + private Date manufactureDateEnd; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDateStart; // 有效期(根据spu中有效天数、生产日期计算) + private Date expirationDateEnd; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchVo.java new file mode 100644 index 0000000..9cf7a6c --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchVo.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorybatch; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-wms(库存)
+ * File: WmsInventoryBatchVo.java
+ * Class: com.yxt.wms.api.wmsinventorybatch.WmsInventoryBatchVo
+ * Description: 商品库存-批次属性 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-30 14:05:11
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品库存-批次属性 视图数据对象", description = "商品库存-批次属性 视图数据对象") +public class WmsInventoryBatchVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") + private String batchNumber; // 批次号(入库日期+生产日期,如240320-240109) + @ApiModelProperty("库存sid") + private String inventorySid; // 库存sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("收货日期") + private Date deliveryDateStart; // 收货日期 + private Date deliveryDateEnd; // 收货日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("生产日期") + private Date manufactureDateStart; // 生产日期 + private Date manufactureDateEnd; // 生产日期 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("有效期(根据spu中有效天数、生产日期计算)") + private Date expirationDateStart; // 有效期(根据spu中有效天数、生产日期计算) + private Date expirationDateEnd; // 有效期(根据spu中有效天数、生产日期计算) + @ApiModelProperty("商品质检状态(良品、残品等)") + private Integer qualityState; // 商品质检状态(良品、残品等) + @ApiModelProperty("货主sid") + private String goodsOwnerSid; // 货主sid + @ApiModelProperty("货主名称") + private String goodsOwner; // 货主名称 + @ApiModelProperty("供应商sid") + private String supplierSid; // 供应商sid + @ApiModelProperty("供应商名称") + private String supplierName; // 供应商名称 + @ApiModelProperty("入库单sid") + private String billSid; // 入库单sid + @ApiModelProperty("入库单号") + private String billNo; // 入库单号 + @ApiModelProperty("入库单明细sid") + private String billDetailSid; // 入库单明细sid + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbill.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbill.java new file mode 100644 index 0000000..f2ef60e --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbill.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbill; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbill.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbill
+ * Description: 库存盘点.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点", description = "库存盘点") +@TableName("wms_inventory_checkbill") +public class WmsInventoryCheckbill extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("盘点类型") + private String checkType; // 盘点类型 + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private Integer checkState; // 盘点状态(盘点中1,盘点完成2) + @ApiModelProperty("盘盈数量") + private BigDecimal profitCount; // 盘盈数量 + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmount; // 盘盈金额 + @ApiModelProperty("盘亏数量") + private BigDecimal lossCount; // 盘亏数量 + @ApiModelProperty("盈亏金额") + private BigDecimal lossAmount; // 盈亏金额 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillDetailsVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillDetailsVo.java new file mode 100644 index 0000000..afab610 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillDetailsVo.java @@ -0,0 +1,83 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbill; + + +import com.yxt.common.core.vo.Vo; +import com.yxt.warehouse.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDetailsVo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillVo.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbillVo
+ * Description: 库存盘点 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点 视图数据详情", description = "库存盘点 视图数据详情") +public class WmsInventoryCheckbillDetailsVo implements Vo { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("盘点类型") + private String checkType; + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private Integer checkState; + @ApiModelProperty("盘盈数量") + private BigDecimal profitCount; + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmount; + @ApiModelProperty("盘亏数量") + private BigDecimal lossCount; + @ApiModelProperty("盘亏金额") + private BigDecimal lossAmount; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("盘库明细") + private List wmsInventoryCheckbillDetailList; +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillDto.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillDto.java new file mode 100644 index 0000000..b597f0d --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillDto.java @@ -0,0 +1,83 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbill; + + +import com.yxt.common.core.dto.Dto; +import com.yxt.warehouse.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDto.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbillDto
+ * Description: 库存盘点 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点 数据传输对象", description = "库存盘点 数据传输对象") +public class WmsInventoryCheckbillDto implements Dto { + + private String sid; + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("盘点类型") + private String checkType; + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private Integer checkState; + @ApiModelProperty("盘盈数量") + private BigDecimal profitCount; + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmount; + @ApiModelProperty("盘亏数量") + private BigDecimal lossCount; + @ApiModelProperty("盘亏金额") + private BigDecimal lossAmount; + @ApiModelProperty("使用组织sid") + private String useOrgSid; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("盘库明细") + private List wmsInventoryCheckbillDetailList; +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java new file mode 100644 index 0000000..390a300 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbill; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +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 org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillMapper.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbill.WmsInventoryCheckbillMapper
+ * Description: 库存盘点.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventoryCheckbillMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_checkbill") + List selectListVo(); +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml new file mode 100644 index 0000000..c2ca9e2 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillQuery.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillQuery.java new file mode 100644 index 0000000..76320d7 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillQuery.java @@ -0,0 +1,57 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbill; + + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillQuery.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbillQuery
+ * Description: 库存盘点 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点 查询条件", description = "库存盘点 查询条件") +public class WmsInventoryCheckbillQuery implements Query { + + @ApiModelProperty("创建开始日期") + private String createStartTime; + @ApiModelProperty("创建结束日期") + private String createEndTime; + @ApiModelProperty("其他查询条件") + private String otherQuery; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillService.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillService.java new file mode 100644 index 0000000..3b3de91 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillService.java @@ -0,0 +1,140 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbill; + +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.core.query.PagerQuery; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDetailsVo; +import com.yxt.warehouse.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDto; +import com.yxt.warehouse.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillService.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbill.WmsInventoryCheckbillService
+ * Description: 库存盘点 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class WmsInventoryCheckbillService extends MybatisBaseService { + + @Autowired + private WmsInventoryCheckbillDetailService wmsInventoryCheckbillDetailService; + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventoryCheckbillQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getOtherQuery())){ + qw.and(wrapper -> wrapper.like("pb.billNo", query.getOtherQuery())); + } + String createStartTime = query.getCreateStartTime(); + String createEndTime = query.getCreateEndTime(); + qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (pb.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). + apply(StringUtils.isNotEmpty(createEndTime), "date_format (pb.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" + ); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + for (WmsInventoryCheckbillVo record : pagging.getRecords()) { + Integer checkState = record.getCheckState(); + if (checkState == 1){ + record.setCheckStateName("盘点中"); + }else if (checkState == 2){ + record.setCheckStateName("盘点完成"); + } + } + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(WmsInventoryCheckbillDto dto){ + String dtoSid = dto.getSid(); + List wmsInventoryCheckbillDetailList = dto.getWmsInventoryCheckbillDetailList(); + if (StringUtils.isBlank(dtoSid)) { + String sid = this.insertByDto(dto); + for (WmsInventoryCheckbillDetailDto wmsInventoryCheckbillDetailDto : wmsInventoryCheckbillDetailList) { + wmsInventoryCheckbillDetailDto.setBillSid(sid); + wmsInventoryCheckbillDetailService.saveOrUpdateDto(wmsInventoryCheckbillDetailDto); + } + return; + } + this.updateByDto(dto); + wmsInventoryCheckbillDetailService.delByMainSid(dtoSid); + for (WmsInventoryCheckbillDetailDto wmsInventoryCheckbillDetailDto : wmsInventoryCheckbillDetailList) { + wmsInventoryCheckbillDetailDto.setBillSid(dtoSid); + wmsInventoryCheckbillDetailService.saveOrUpdateDto(wmsInventoryCheckbillDetailDto); + } + } + + public String insertByDto(WmsInventoryCheckbillDto dto){ + WmsInventoryCheckbill entity = new WmsInventoryCheckbill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + return entity.getSid(); + } + + public void updateByDto(WmsInventoryCheckbillDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + WmsInventoryCheckbill entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public WmsInventoryCheckbillDetailsVo fetchDetailsVoBySid(String sid){ + WmsInventoryCheckbill entity = fetchBySid(sid); + WmsInventoryCheckbillDetailsVo vo = new WmsInventoryCheckbillDetailsVo(); + BeanUtil.copyProperties(entity, vo); + List wmsInventoryCheckbillDetailDetailsVos = wmsInventoryCheckbillDetailService.selByMainSid(sid); + vo.setWmsInventoryCheckbillDetailList(wmsInventoryCheckbillDetailDetailsVos); + return vo; + } + + public void inven(WmsInventoryCheckbillDto dto) { + saveOrUpdateDto(dto); + List wmsInventoryCheckbillDetailList = dto.getWmsInventoryCheckbillDetailList(); + for (WmsInventoryCheckbillDetailDto wmsInventoryCheckbillDetailDto : wmsInventoryCheckbillDetailList) { + + } + } +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillVo.java new file mode 100644 index 0000000..eb4f59e --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbill/WmsInventoryCheckbillVo.java @@ -0,0 +1,81 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbill; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillVo.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbill.WmsInventoryCheckbillVo
+ * Description: 库存盘点 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:01
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点 视图数据对象", description = "库存盘点 视图数据对象") +public class WmsInventoryCheckbillVo implements Vo { + + private String sid; + + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("制单日期") + private String createDate; + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private Integer checkState; + @ApiModelProperty("盘点状态(盘点中1,盘点完成2)") + private String checkStateName; + @ApiModelProperty("完成时间") + private String completeDate; + @ApiModelProperty("盘盈数量") + private BigDecimal profitCount; + @ApiModelProperty("盘盈金额") + private BigDecimal profitAmount; + @ApiModelProperty("盘亏数量") + private BigDecimal lossCount; + @ApiModelProperty("盈亏金额") + private BigDecimal lossAmount; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("门店") + private String createOrgName; + @ApiModelProperty("id") + private String id; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetail.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetail.java new file mode 100644 index 0000000..3bf9098 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetail.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbilldetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetail.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetail
+ * Description: 库存盘点-明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点-明细", description = "库存盘点-明细") +@TableName("wms_inventory_checkbill_detail") +public class WmsInventoryCheckbillDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("盘点单sid") + private String billSid; // 盘点单sid + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库") + private String warehouseName; // 仓库 + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("含税价") + private BigDecimal taxPrice; // 含税价 + @ApiModelProperty("账面数量") + private BigDecimal bookCount; // 账面数量 + @ApiModelProperty("实盘数量") + private BigDecimal realCount; // 实盘数量 + @ApiModelProperty("现场照片(多张中间用英文逗号分隔)") + private String picUrl; // 现场照片(多张中间用英文逗号分隔) + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDetailsVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDetailsVo.java new file mode 100644 index 0000000..38da957 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDetailsVo.java @@ -0,0 +1,102 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbilldetail; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailVo.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailVo
+ * Description: 库存盘点-明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点-明细 视图数据详情", description = "库存盘点-明细 视图数据详情") +public class WmsInventoryCheckbillDetailDetailsVo implements Vo { + + private String sid; + + /* + * 数据库字段 + * */ + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("盘点状态(0正常、2盘亏、1盘盈)") + private String state; + @ApiModelProperty("盘点单sid") + private String billSid; + @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 taxPrice; + @ApiModelProperty("账面数量") + private BigDecimal bookCount; + @ApiModelProperty("实盘数量") + private BigDecimal realCount; + @ApiModelProperty("现场照片") + private List picUrls = new ArrayList<>(); + + /* + * 页面展示字段 + * */ + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("零件号") + private String goodsSkuCode; + @ApiModelProperty("车型") + private String carModel; + @ApiModelProperty("商品单位") + private String unit; + + /* + * 盘点接口需要字段 + * */ + @ApiModelProperty("盈亏数") + private BigDecimal proAndLossCount; +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDto.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDto.java new file mode 100644 index 0000000..7c8b162 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailDto.java @@ -0,0 +1,102 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbilldetail; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailDto.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDto
+ * Description: 库存盘点-明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点-明细 数据传输对象", description = "库存盘点-明细 数据传输对象") +public class WmsInventoryCheckbillDetailDto implements Dto { + + private String sid; + + /* + * 数据库字段 + * */ + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("盘点状态(0正常、2盘亏、1盘盈)") + private String state; + @ApiModelProperty("盘点单sid") + private String billSid; + @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 taxPrice; + @ApiModelProperty("账面数量") + private BigDecimal bookCount; + @ApiModelProperty("实盘数量") + private BigDecimal realCount; + @ApiModelProperty("现场照片") + private List picUrls = new ArrayList<>(); + + /* + * 页面展示字段 + * */ + @ApiModelProperty("商品名称") + private String goodsSpuName; + @ApiModelProperty("零件号") + private String goodsSkuCode; + @ApiModelProperty("车型") + private String carModel; + @ApiModelProperty("商品单位") + private String unit; + + /* + * 盘点接口需要字段 + * */ + @ApiModelProperty("盈亏数") + private BigDecimal proAndLossCount; +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java new file mode 100644 index 0000000..2cc670c --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbilldetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailMapper.java
+ * Class: com.yxt.wms.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailMapper
+ * Description: 库存盘点-明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventoryCheckbillDetailMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_checkbill_detail") + List selectListVo(); + + @Delete("delete from wms_inventory_checkbill_detail where billSid = #{dtoSid}") + void delByMainSid(String dtoSid); + + List selByMainSid(String billSid); +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml new file mode 100644 index 0000000..ff613ff --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailVo.java new file mode 100644 index 0000000..7500283 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailVo.java @@ -0,0 +1,50 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorycheckbilldetail; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * Project: yxt-wms(仓储)
+ * File: WmsInventoryCheckbillDetailVo.java
+ * Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailVo
+ * Description: 库存盘点-明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-22 09:25:02
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存盘点-明细 视图数据对象", description = "库存盘点-明细 视图数据对象") +public class WmsInventoryCheckbillDetailVo implements Vo { + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettleRecordQuery.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettleRecordQuery.java new file mode 100644 index 0000000..ebb07aa --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettleRecordQuery.java @@ -0,0 +1,18 @@ +package com.yxt.warehouse.biz.wmsinventorysettlebill; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/1 16:20 + */ +@Data +public class WmsInventorySettleRecordQuery implements Query { + + private String startDate; + private String endDate; + private String useOrgName; + private String orgPath; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettleRecordVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettleRecordVo.java new file mode 100644 index 0000000..79b9d16 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettleRecordVo.java @@ -0,0 +1,22 @@ +package com.yxt.warehouse.biz.wmsinventorysettlebill; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author Fan + * @description + * @date 2024/4/1 16:19 + */ +@Data +public class WmsInventorySettleRecordVo implements Vo { + + private String sid; + private String createByName; + @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + private Date createTime; + private String useOrgName; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebill.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebill.java new file mode 100644 index 0000000..cf605d0 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebill.java @@ -0,0 +1,78 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebill; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebill.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebill
+ * Description: 库存结算单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单", description = "库存结算单") +@TableName("wms_inventory_settlebill") +public class WmsInventorySettlebill extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算单编号") + private String billNo; // 结算单编号 + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private Integer settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("开始时间") + private Date settleStartTime; // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结束时间") + private Date settleEndTime; // 结束时间 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("使用组织") + private String useOrgName; // 使用组织 + @ApiModelProperty("创建组织") + private String createOrgName; // 创建组织 +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillDetailsVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillDetailsVo.java new file mode 100644 index 0000000..312ede5 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillDetailsVo.java @@ -0,0 +1,81 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillVo.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebillVo
+ * Description: 库存结算单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单 视图数据详情", description = "库存结算单 视图数据详情") +public class WmsInventorySettlebillDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算单编号") + private String billNo; // 结算单编号 + @ApiModelProperty("制单日期") + private String createDate; // 制单日期 + @ApiModelProperty("制单人sid") + private String createUserSid; // 制单人sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private Integer settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("开始时间") + private Date settle_startTimeStart; // 开始时间 + private Date settle_startTimeEnd; // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结束时间") + private Date settle_endTimeStart; // 结束时间 + private Date settle_endTimeEnd; // 结束时间 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillDto.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillDto.java new file mode 100644 index 0000000..ae45416 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillDto.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebill; + + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDto.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebillDto
+ * Description: 库存结算单 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单 数据传输对象", description = "库存结算单 数据传输对象") +public class WmsInventorySettlebillDto implements Dto { + + private String sid; + @ApiModelProperty("制单日期") + private String createTime; // 制单日期 + @ApiModelProperty("制单人sid") + private String createBySid; // 制单人sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private String settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private String settleType; // 库存结算类型(1月结 2年结) + @ApiModelProperty("开始时间") + private String settleStartTime; // 开始时间 + @ApiModelProperty("结束时间") + private String settleEndTime; // 结束时间 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillMapper.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillMapper.java new file mode 100644 index 0000000..ab42fb3 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillMapper.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebill; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.yxt.warehouse.biz.warehouseinventory.WarehouseInventory; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillMapper.java
+ * Class: wms.biz.wmsinventorysettlebill.WmsInventorySettlebillMapper
+ * Description: 库存结算单.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventorySettlebillMapper extends BaseMapper { + + //@Update("update wms_inventory_settlebill set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_settlebill") + List selectListVo(); + + List selInventoryForStettleBill(@Param("useOrgSid") String useOrgSid); + + String selLastNum(@Param("inventorySid") String inventorySid); + + IPage carryForwardList(IPage page,@Param(Constants.WRAPPER) QueryWrapper qw); +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillMapper.xml b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillMapper.xml new file mode 100644 index 0000000..a9ba17a --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillQuery.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillQuery.java new file mode 100644 index 0000000..82a37d1 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillQuery.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillQuery.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebillQuery
+ * Description: 库存结算单 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单 查询条件", description = "库存结算单 查询条件") +public class WmsInventorySettlebillQuery implements Query { + + @ApiModelProperty("结算单编号") + private String billNo; // 结算单编号 + @ApiModelProperty("制单日期") + private String createDate; // 制单日期 + @ApiModelProperty("制单人sid") + private String createUserSid; // 制单人sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private Integer settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiModelProperty("开始时间") + private Date settle_startTimeStart; // 开始时间 + private Date settle_startTimeEnd; // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiModelProperty("结束时间") + private Date settle_endTimeStart; // 结束时间 + private Date settle_endTimeEnd; // 结束时间 + private String orgPath; + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillService.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillService.java new file mode 100644 index 0000000..5872452 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillService.java @@ -0,0 +1,164 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebill; + +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.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.warehouse.biz.warehouseinventory.WarehouseInventory; +import com.yxt.warehouse.biz.wmsinventorysettlebilldetail.WmsInventorySettlebillDetail; +import com.yxt.warehouse.biz.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillService.java
+ * Class: wms.biz.wmsinventorysettlebill.WmsInventorySettlebillService
+ * Description: 库存结算单 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class WmsInventorySettlebillService extends MybatisBaseService { + + @Autowired + private WmsInventorySettlebillDetailService wmsInventorySettlebillDetailService; + + private QueryWrapper createQueryWrapper(WmsInventorySettlebillQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventorySettlebillQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(WmsInventorySettlebillDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsInventorySettlebillDto dto) { + WmsInventorySettlebill entity = new WmsInventorySettlebill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsInventorySettlebillDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + WmsInventorySettlebill entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public WmsInventorySettlebillDetailsVo fetchDetailsVoBySid(String sid) { + WmsInventorySettlebill entity = fetchBySid(sid); + WmsInventorySettlebillDetailsVo vo = new WmsInventorySettlebillDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void saveSettlebill(WmsInventorySettlebillDto dto) { + WmsInventorySettlebill entity = new WmsInventorySettlebill(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + String mainSid = entity.getSid(); + List wmsInventories = baseMapper.selInventoryForStettleBill(dto.getUseOrgSid()); + if (!wmsInventories.isEmpty()) { + for (WarehouseInventory w : wmsInventories) { + WmsInventorySettlebillDetail d = new WmsInventorySettlebillDetail(); + BeanUtil.copyProperties(w, d, "id", "sid"); + d.setBillSid(mainSid); + if (StringUtils.isNotBlank(dto.getSettleState())) { + d.setSettleType(Integer.parseInt(dto.getSettleType())); + } + d.setInventorySid(w.getSid()); + //查询上期库存 + String lastNum = baseMapper.selLastNum(w.getSid()); + if (StringUtils.isNotBlank(lastNum)) { + d.setPreBalance(new BigDecimal(lastNum)); + } + if (null != w.getCount()) { + d.setCurrentBalance(w.getCount()); + } + wmsInventorySettlebillDetailService.insert(d); + } + } + } + + public PagerVo carryForwardList(PagerQuery pq) { + WmsInventorySettleRecordQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); +// if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getOrgPath())) { +// String orgPath = query.getOrgPath(); +// ResultBean orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(orgPath); +// if (orgSidByPath.getSuccess()) { +// String useOrgSid = orgSidByPath.getData(); +// qw.eq("useOrgSid", useOrgSid); +// } +// } + if (StringUtils.isNotBlank(query.getUseOrgName())) { + qw.like("useOrgName",query.getUseOrgName()); + } + qw.apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getStartDate()), "date_format (createTime,'%Y-%m-%d') >= date_format('" + query.getStartDate() + "','%Y-%m-%d')"). + apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getEndDate()), "date_format (createTime,'%Y-%m-%d') <= date_format('" + query.getEndDate() + "','%Y-%m-%d')" + ); + qw.orderByDesc("createTime"); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.carryForwardList(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillVo.java new file mode 100644 index 0000000..acec684 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebill/WmsInventorySettlebillVo.java @@ -0,0 +1,81 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillVo.java
+ * Class: wms.api.wmsinventorysettlebill.WmsInventorySettlebillVo
+ * Description: 库存结算单 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算单 视图数据对象", description = "库存结算单 视图数据对象") +public class WmsInventorySettlebillVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算单编号") + private String billNo; // 结算单编号 + @ApiModelProperty("制单日期") + private String createDate; // 制单日期 + @ApiModelProperty("制单人sid") + private String createUserSid; // 制单人sid + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("库存结算状态(1进行中 2已完成)") + private Integer settleState; // 库存结算状态(1进行中 2已完成) + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("开始时间") + private Date settle_startTimeStart; // 开始时间 + private Date settle_startTimeEnd; // 开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("结束时间") + private Date settle_endTimeStart; // 结束时间 + private Date settle_endTimeEnd; // 结束时间 + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetail.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetail.java new file mode 100644 index 0000000..6f3da9e --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetail.java @@ -0,0 +1,82 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebilldetail; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetail.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetail
+ * Description: 库存结算明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细", description = "库存结算明细") +@TableName("wms_inventory_settlebill_detail") +public class WmsInventorySettlebillDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("结算单sid") + private String billSid; // 结算单sid + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Integer settleType; // 库存结算类型(1月结 2年结) + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + private String goodSpuSid;//商品基础信息sid + private String goodsSpuName;//商品名称 + private String goodsSkuSid;//商品Skusid + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseRackSid;//库位Sid + private String warehouseRackCode;//库位编码 + @ApiModelProperty("上期结存") + private BigDecimal preBalance; // 上期结存 + @ApiModelProperty("本期结存") + private BigDecimal currentBalance; // 本期结存 + @ApiModelProperty("本期入库") + private BigDecimal currentEnter; // 本期入库 + @ApiModelProperty("本期出库") + private BigDecimal currentOut; // 本期出库 + @ApiModelProperty("本期盘点") + private BigDecimal currentCheck; // 本期盘点 + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDetailsVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDetailsVo.java new file mode 100644 index 0000000..c345c7d --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDetailsVo.java @@ -0,0 +1,94 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebilldetail; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailVo.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailVo
+ * Description: 库存结算明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细 视图数据详情", description = "库存结算明细 视图数据详情") +public class WmsInventorySettlebillDetailDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("结算单sid") + private String billSid; // 结算单sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Date settleTypeStart; // 库存结算类型(1月结 2年结) + private Date settleTypeEnd; // 库存结算类型(1月结 2年结) + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品sid") + private String goodsSid; // 商品sid + @ApiModelProperty("商品编码") + private String goodsCode; // 商品编码 + @ApiModelProperty("商品名称") + private String goodsName; // 商品名称 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库编码") + private String warehouseCode; // 仓库编码 + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("货位sid") + private String warehouseAreasid; // 货位sid + @ApiModelProperty("货位编码") + private String warehouseAreaCode; // 货位编码 + @ApiModelProperty("货位名称") + private String warehouseAreaName; // 货位名称 + @ApiModelProperty("上期结存") + private BigDecimal preBalance; // 上期结存 + @ApiModelProperty("本期结存") + private BigDecimal currentBalance; // 本期结存 + @ApiModelProperty("本期入库") + private BigDecimal currentEnter; // 本期入库 + @ApiModelProperty("本期出库") + private BigDecimal currentOut; // 本期出库 + @ApiModelProperty("本期盘点") + private BigDecimal currentCheck; // 本期盘点 + +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDto.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDto.java new file mode 100644 index 0000000..5a9d8cb --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailDto.java @@ -0,0 +1,94 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebilldetail; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailDto.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailDto
+ * Description: 库存结算明细 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细 数据传输对象", description = "库存结算明细 数据传输对象") +public class WmsInventorySettlebillDetailDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("结算单sid") + private String billSid; // 结算单sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("库存结算类型(1月结 2年结)") + private Date settleTypeStart; // 库存结算类型(1月结 2年结) + private Date settleTypeEnd; // 库存结算类型(1月结 2年结) + @ApiModelProperty("商品库存sid") + private String inventorySid; // 商品库存sid + @ApiModelProperty("商品sid") + private String goodsSid; // 商品sid + @ApiModelProperty("商品编码") + private String goodsCode; // 商品编码 + @ApiModelProperty("商品名称") + private String goodsName; // 商品名称 + @ApiModelProperty("仓库sid") + private String warehouseSid; // 仓库sid + @ApiModelProperty("仓库编码") + private String warehouseCode; // 仓库编码 + @ApiModelProperty("仓库名称") + private String warehouseName; // 仓库名称 + @ApiModelProperty("货位sid") + private String warehouseAreasid; // 货位sid + @ApiModelProperty("货位编码") + private String warehouseAreaCode; // 货位编码 + @ApiModelProperty("货位名称") + private String warehouseAreaName; // 货位名称 + @ApiModelProperty("上期结存") + private BigDecimal preBalance; // 上期结存 + @ApiModelProperty("本期结存") + private BigDecimal currentBalance; // 本期结存 + @ApiModelProperty("本期入库") + private BigDecimal currentEnter; // 本期入库 + @ApiModelProperty("本期出库") + private BigDecimal currentOut; // 本期出库 + @ApiModelProperty("本期盘点") + private BigDecimal currentCheck; // 本期盘点 + +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.java new file mode 100644 index 0000000..cffcdf6 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebilldetail; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailMapper.java
+ * Class: wms.biz.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailMapper
+ * Description: 库存结算明细.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface WmsInventorySettlebillDetailMapper extends BaseMapper { + + //@Update("update wms_inventory_settlebill_detail set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from wms_inventory_settlebill_detail") + List selectListVo(); + + @Delete("delete from wms_inventory_settlebill_detail where billSid = #{sid}") + void delByMainSid(String sid); + + List listExcel(@Param(Constants.WRAPPER) QueryWrapper qw); +} \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.xml b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.xml new file mode 100644 index 0000000..dcfc3fd --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailQuery.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailQuery.java new file mode 100644 index 0000000..f3e336f --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailQuery.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebilldetail; + + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailQuery.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailQuery
+ * Description: 库存结算明细 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细 查询条件", description = "库存结算明细 查询条件") +public class WmsInventorySettlebillDetailQuery implements Query { + + private String goodsSpuName;//商品名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String warehouseName;//仓库名称 + private String warehouseRackCode;//库位编码 + private String orgPath; + private String startDate; + private String endDate; + + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailService.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailService.java new file mode 100644 index 0000000..167f1b7 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailService.java @@ -0,0 +1,137 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebilldetail; + +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.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailService.java
+ * Class: wms.biz.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailService
+ * Description: 库存结算明细 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class WmsInventorySettlebillDetailService extends MybatisBaseService { + + + private QueryWrapper createQueryWrapper(WmsInventorySettlebillDetailQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); +// if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getOrgPath())) { +// String orgPath = query.getOrgPath(); +// ResultBean orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(orgPath); +// if (orgSidByPath.getSuccess()) { +// String useOrgSid = orgSidByPath.getData(); +// qw.eq("s.useOrgSid", useOrgSid); +// } +// } + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getGoodsSpuName())) { + qw.like("d.goodsSpuName", query.getGoodsSpuName()); + } + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getWarehouseName())) { + qw.like("d.warehouseName", query.getWarehouseName()); + } + if (com.yxt.common.base.utils.StringUtils.isNotBlank(query.getGoodsSkuCode())) { + qw.like("d.goodsSkuCode", query.getGoodsSkuCode()); + } + qw.apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getStartDate()), "date_format (s.createTime,'%Y-%m-%d') >= date_format('" + query.getStartDate() + "','%Y-%m-%d')"). + apply(com.yxt.common.base.utils.StringUtils.isNotBlank(query.getEndDate()), "date_format (s.createTime,'%Y-%m-%d') <= date_format('" + query.getEndDate() + "','%Y-%m-%d')" + ); + qw.orderByDesc("s.createTime"); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + WmsInventorySettlebillDetailQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(WmsInventorySettlebillDetailDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsInventorySettlebillDetailDto dto) { + WmsInventorySettlebillDetail entity = new WmsInventorySettlebillDetail(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsInventorySettlebillDetailDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + WmsInventorySettlebillDetail entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public WmsInventorySettlebillDetailDetailsVo fetchDetailsVoBySid(String sid) { + WmsInventorySettlebillDetail entity = fetchBySid(sid); + WmsInventorySettlebillDetailDetailsVo vo = new WmsInventorySettlebillDetailDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void delByMainSid(String sid) { + baseMapper.delByMainSid(sid); + } + + public List listExcel(WmsInventorySettlebillDetailQuery query) { + QueryWrapper qw = createQueryWrapper(query); + List list = baseMapper.listExcel(qw); + return list; + } +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailVo.java new file mode 100644 index 0000000..8e735af --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillDetailVo.java @@ -0,0 +1,66 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.warehouse.biz.wmsinventorysettlebilldetail; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(yxt-wms)
+ * File: WmsInventorySettlebillDetailVo.java
+ * Class: wms.api.wmsinventorysettlebilldetail.WmsInventorySettlebillDetailVo
+ * Description: 库存结算明细 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-01 14:22:38
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "库存结算明细 视图数据对象", description = "库存结算明细 视图数据对象") +public class WmsInventorySettlebillDetailVo implements Vo { + + private String sid; // sid + private String createTime; //结转日期 + @ApiModelProperty("库存结算类型(1月结 2年结)") + private String settleType; // 库存结算类型(1月结 2年结) + private String goodsSpuName;//商品名称 + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String warehouseName;//仓库名称 + private String warehouseRackCode;//库位编码 + @ApiModelProperty("上期结存") + private String preBalance; // 上期结存 + @ApiModelProperty("本期结存") + private String currentBalance; // 本期结存 + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillExportVo.java b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillExportVo.java new file mode 100644 index 0000000..c1c5986 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsinventorysettlebilldetail/WmsInventorySettlebillExportVo.java @@ -0,0 +1,35 @@ +package com.yxt.warehouse.biz.wmsinventorysettlebilldetail; + +import com.yxt.common.core.utils.ExportEntityMap; +import lombok.Data; + +/** + * @author Fan + * @description + * @date 2024/4/1 16:42 + */ +@Data +public class WmsInventorySettlebillExportVo { + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "结转日期", EnName = "createTime") + private String createTime; //结转日期 + @ExportEntityMap(CnName = "库存结算类型", EnName = "settleType") + private String settleType; // 库存结算类型(1月结 2年结) + @ExportEntityMap(CnName = "商品名称", EnName = "goodsSpuName") + private String goodsSpuName;//商品名称 + @ExportEntityMap(CnName = "商品Sku名称", EnName = "goodsSkuTitle") + private String goodsSkuTitle;//商品Sku名称 + @ExportEntityMap(CnName = "零件号", EnName = "goodsSkuCode") + private String goodsSkuCode;//零件号 + @ExportEntityMap(CnName = "规格型号", EnName = "goodsSkuOwnSpec") + private String goodsSkuOwnSpec; //规格型号 + @ExportEntityMap(CnName = "仓库名称", EnName = "warehouseName") + private String warehouseName;//仓库名称 + @ExportEntityMap(CnName = "库位编码", EnName = "warehouseRackCode") + private String warehouseRackCode;//货架名称 + @ExportEntityMap(CnName = "上期结存", EnName = "preBalance") + private String preBalance; // 上期结存 + @ExportEntityMap(CnName = "本期结存", EnName = "currentBalance") + private String currentBalance; // 本期结存 +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLose.java b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLose.java new file mode 100644 index 0000000..8f20b26 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLose.java @@ -0,0 +1,37 @@ +package com.yxt.warehouse.biz.wmsreportlose; + +import com.yxt.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/28 8:38 + */ +@Data +public class WmsReportLose extends BaseEntity { + + + private String inventorySid;//商品库存sid + private String goodsID;//商品ID(唯一编码,入库时生成,生成规则为商品编码+YYMMdd+4位流水) + private String goodSpuSid;//商品基础信息Sid + private String goodsSpuName;//商品名称 + private String goodsSkuSid;//、、商品Skusid + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String unit;//计量单位 + private String count;//数量 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseRackSid;//、库位sid + private String warehouseRackCode;//库位编码 + private String loseCount;//损费量 + private String reportTime;//上报时间 + private String reportUserSid;//上报人 + private String picUrl;//现场拍照,多个照片用逗号分隔 + private String isSyncInventory;//是否同步到系统库存 + private String confirmUserSid;//损废确认人 + private String confirmTime;//损废确认时间 + + +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseDto.java b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseDto.java new file mode 100644 index 0000000..709021a --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseDto.java @@ -0,0 +1,42 @@ +package com.yxt.warehouse.biz.wmsreportlose; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:38 + */ +@Data +public class WmsReportLoseDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String inventorySid;//商品库存sid + private String goodsID;//商品ID(唯一编码,入库时生成,生成规则为商品编码+YYMMdd+4位流水) + private String goodSpuSid;//商品基础信息Sid + private String goodsSpuName;//商品名称 + private String goodsSkuSid;//、、商品Skusid + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String unit;//计量单位 + private String count;//数量 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseRackSid;//、库位sid + private String warehouseRackCode;//库位编码 + private String loseCount;//损费量 + private String reportTime;//上报时间 + private String reportUserSid;//上报人 + private String picUrl;//现场拍照,多个照片用逗号分隔 + private String isSyncInventory;//是否同步到系统库存 + private String confirmUserSid;//损废确认人 + private String confirmTime;//损废确认时间 +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseMapper.java b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseMapper.java new file mode 100644 index 0000000..0ca69e5 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseMapper.java @@ -0,0 +1,26 @@ +package com.yxt.warehouse.biz.wmsreportlose; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Mapper +public interface WmsReportLoseMapper extends BaseMapper { + IPage listPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + WmsReportLoseVo initialization (@Param("sid") String sid); + + @Delete("delete from wms_reportlose where sid = #{sid}") + void delByMainSid(String billSid); + + List selByMainSid(String billSid); +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseMapper.xml b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseMapper.xml new file mode 100644 index 0000000..8bbb109 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseQuery.java b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseQuery.java new file mode 100644 index 0000000..cfd2f4c --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseQuery.java @@ -0,0 +1,13 @@ +package com.yxt.warehouse.biz.wmsreportlose; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsReportLoseQuery implements Query { + private String name; +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseService.java b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseService.java new file mode 100644 index 0000000..6974e4c --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseService.java @@ -0,0 +1,126 @@ +package com.yxt.warehouse.biz.wmsreportlose; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.base.utils.StringUtils; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2024/2/26 13:40 + */ +@Service +public class WmsReportLoseService extends MybatisBaseService { + + + public ResultBean> listPage(PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + WmsReportLoseQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if (StringUtils.isNotBlank(query.getName())) { + qw.like("rackName", query.getName()); + } + + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.listPage(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + List records = pagging.getRecords(); + return rb.success().setData(p); + } + + + + + + public ResultBean saveOrUpdate(WmsReportLoseDto dto) { + ResultBean rb = ResultBean.fireFail(); + String sid = ""; + if (StringUtils.isNotBlank(dto.getSid())) { + sid = dto.getSid(); + WmsReportLose wmsWarehouseRack = fetchBySid(dto.getSid()); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + baseMapper.updateById(wmsWarehouseRack); + } else { + WmsReportLose wmsWarehouseRack = new WmsReportLose(); + sid = wmsWarehouseRack.getSid(); + BeanUtil.copyProperties(dto, wmsWarehouseRack, "id", "sid"); + wmsWarehouseRack.setCreateTime(new DateTime()); + baseMapper.insert(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public ResultBean initialization(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsReportLoseVo vo = baseMapper.initialization(sid); + return rb.success().setData(vo); + } + public void delAll(String[] sids) { + delBySids(sids); + } + + public ResultBean delete(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsReportLose wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + baseMapper.deleteById(wmsWarehouseRack.getId()); + } + return rb.success(); + } + + public ResultBean updateIsEnable(String sid, String isEnable) { + ResultBean rb = ResultBean.fireFail(); + WmsReportLose wmsWarehouseRack = fetchBySid(sid); + if (null != wmsWarehouseRack) { + wmsWarehouseRack.setIsEnable(Integer.parseInt(isEnable)); + baseMapper.updateById(wmsWarehouseRack); + } + return rb.success().setMsg("成功"); + } + + public void delByMainSid(String billSid) { + baseMapper.delByMainSid(billSid); + } + + public List selByMainSid(String billSid) { + return baseMapper.selByMainSid(billSid); + } + + public void saveOrUpdateDto(WmsReportLoseDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(WmsReportLoseDto dto) { + WmsReportLose entity = new WmsReportLose(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(WmsReportLoseDto dto) { + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + } + public WmsReportLoseVo fetchDetailsVoBySid(String sid) { + WmsReportLose entity = fetchBySid(sid); + WmsReportLoseVo vo = new WmsReportLoseVo(); + BeanUtil.copyProperties(entity, vo); + + return vo; + } +} diff --git a/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseVo.java b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseVo.java new file mode 100644 index 0000000..98a90f8 --- /dev/null +++ b/src/main/java/com/yxt/warehouse/biz/wmsreportlose/WmsReportLoseVo.java @@ -0,0 +1,48 @@ +package com.yxt.warehouse.biz.wmsreportlose; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; + +/** + * @author wangpengfei + * @date 2024/2/26 13:37 + */ +@Data +public class WmsReportLoseVo implements Vo { + private String id; + private String sid; + private String lockVersion; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date modifyTime; + private String remarks; + private String isEnable; + private String state; + private String isDelete; + private String inventorySid;//商品库存sid + private String goodsID;//商品ID(唯一编码,入库时生成,生成规则为商品编码+YYMMdd+4位流水) + private String goodSpuSid;//商品基础信息Sid + private String goodsSpuName;//商品名称 + private String goodsSkuSid;//、、商品Skusid + private String goodsSkuTitle;//商品Sku名称 + private String goodsSkuCode;//商品编码(图号) + private String goodsSkuOwnSpec;//规格型号 + private String unit;//计量单位 + private String count;//数量 + private String warehouseSid;//仓库sid + private String warehouseName;//仓库名称 + private String warehouseRackSid;//、库位sid + private String warehouseRackCode;//库位编码 + private String loseCount;//损费量 + private String reportTime;//上报时间 + private String reportUserSid;//上报人 + private String picUrl;//现场拍照,多个照片用逗号分隔 + private String isSyncInventory;//是否同步到系统库存 + private String confirmUserSid;//损废确认人 + private String confirmTime;//损废确认时间 + +} diff --git a/src/main/java/com/yxt/warehouse/feign/goods/basegoodssku/BaseGoodsSkuDetailsVo.java b/src/main/java/com/yxt/warehouse/feign/goods/basegoodssku/BaseGoodsSkuDetailsVo.java deleted file mode 100644 index 02f879b..0000000 --- a/src/main/java/com/yxt/warehouse/feign/goods/basegoodssku/BaseGoodsSkuDetailsVo.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.yxt.warehouse.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; -} diff --git a/src/main/java/com/yxt/warehouse/feign/goods/basegoodssku/BaseGoodsSkuFeign.java b/src/main/java/com/yxt/warehouse/feign/goods/basegoodssku/BaseGoodsSkuFeign.java deleted file mode 100644 index 295f522..0000000 --- a/src/main/java/com/yxt/warehouse/feign/goods/basegoodssku/BaseGoodsSkuFeign.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.yxt.warehouse.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 getDetails(@RequestParam("sid") String sid); -} diff --git a/src/main/java/com/yxt/warehouse/feign/goods/basegoodssku/BaseGoodsSkuFeignFallback.java b/src/main/java/com/yxt/warehouse/feign/goods/basegoodssku/BaseGoodsSkuFeignFallback.java deleted file mode 100644 index d0a3475..0000000 --- a/src/main/java/com/yxt/warehouse/feign/goods/basegoodssku/BaseGoodsSkuFeignFallback.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.yxt.warehouse.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 getDetails(String sid) { - return null; - } -}