wangpengfei 1 year ago
parent
commit
4d164aa76e
  1. 94
      src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchService.java
  2. 50
      src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailQuery.java
  3. 104
      src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java

94
src/main/java/com/yxt/warehouse/biz/wmsinventorybatch/WmsInventoryBatchService.java

@ -0,0 +1,94 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.warehouse.biz.wmsinventorybatch;
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 org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
/**
* Project: yxt-wms(库存) <br/>
* File: WmsInventoryBatchService.java <br/>
* Class: com.yxt.wms.biz.wmsinventorybatch.WmsInventoryBatchService <br/>
* Description: 商品库存-批次属性 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-04-30 14:05:11 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class WmsInventoryBatchService extends MybatisBaseService<WmsInventoryBatchMapper, WmsInventoryBatch> {
public PagerVo<WmsInventoryBatchVo> listPageVo(PagerQuery<WmsInventoryBatchQuery> pq) {
WmsInventoryBatchQuery query = pq.getParams();
QueryWrapper<WmsInventoryBatch> qw = new QueryWrapper<>();
IPage<WmsInventoryBatch> page = PagerUtil.queryToPage(pq);
IPage<WmsInventoryBatchVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<WmsInventoryBatchVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(WmsInventoryBatchDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(WmsInventoryBatchDto dto){
WmsInventoryBatch entity = new WmsInventoryBatch();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(WmsInventoryBatchDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
WmsInventoryBatch entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public WmsInventoryBatchDetailsVo fetchDetailsVoBySid(String sid){
WmsInventoryBatch entity = fetchBySid(sid);
WmsInventoryBatchDetailsVo vo = new WmsInventoryBatchDetailsVo();
BeanUtil.copyProperties(entity, vo);
return vo;
}
}

50
src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailQuery.java

@ -0,0 +1,50 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.warehouse.biz.wmsinventorycheckbilldetail;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* Project: yxt-wms(仓储) <br/>
* File: WmsInventoryCheckbillDetailQuery.java <br/>
* Class: com.yxt.wms.api.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailQuery <br/>
* Description: 库存盘点-明细 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-03-22 09:25:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "库存盘点-明细 查询条件", description = "库存盘点-明细 查询条件")
public class WmsInventoryCheckbillDetailQuery implements Query {
}

104
src/main/java/com/yxt/warehouse/biz/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailService.java

@ -0,0 +1,104 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.warehouse.biz.wmsinventorycheckbilldetail;
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 org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Project: yxt-wms(仓储) <br/>
* File: WmsInventoryCheckbillDetailService.java <br/>
* Class: com.yxt.wms.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailService <br/>
* Description: 库存盘点-明细 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-03-22 09:25:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class WmsInventoryCheckbillDetailService extends MybatisBaseService<WmsInventoryCheckbillDetailMapper, WmsInventoryCheckbillDetail> {
public PagerVo<WmsInventoryCheckbillDetailVo> listPageVo(PagerQuery<WmsInventoryCheckbillDetailQuery> pq) {
WmsInventoryCheckbillDetailQuery query = pq.getParams();
QueryWrapper<WmsInventoryCheckbillDetail> qw = new QueryWrapper<>();
IPage<WmsInventoryCheckbillDetail> page = PagerUtil.queryToPage(pq);
IPage<WmsInventoryCheckbillDetailVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<WmsInventoryCheckbillDetailVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(WmsInventoryCheckbillDetailDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(WmsInventoryCheckbillDetailDto dto){
WmsInventoryCheckbillDetail entity = new WmsInventoryCheckbillDetail();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(WmsInventoryCheckbillDetailDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
WmsInventoryCheckbillDetail entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public WmsInventoryCheckbillDetailDetailsVo fetchDetailsVoBySid(String sid){
WmsInventoryCheckbillDetail entity = fetchBySid(sid);
WmsInventoryCheckbillDetailDetailsVo vo = new WmsInventoryCheckbillDetailDetailsVo();
BeanUtil.copyProperties(entity, vo);
return vo;
}
public void delByMainSid(String dtoSid) {
baseMapper.delByMainSid(dtoSid);
}
public List<WmsInventoryCheckbillDetailDetailsVo> selByMainSid(String billSid) {
return baseMapper.selByMainSid(billSid);
}
}
Loading…
Cancel
Save