新增出入库主子表页面新增

master
maxw@mesnac.com 6 days ago
parent 46d3875884
commit 1b6bb08d91

@ -107,7 +107,7 @@ public class WmsAllocateOrderDetailController extends BaseController {
@SaCheckPermission("system:allocateOrderDetail:remove")
@Log(title = "调拨子", businessType = BusinessType.DELETE)
@DeleteMapping("removeDetail/{aoDId}")
public R<Void> removeDetail(@NotEmpty(message = "主键不能为空")
public R<Void> removeDetail(
@PathVariable Long aoDId) {
return toAjax(wmsAllocateOrderDetailService.deleteById(aoDId));
}

@ -77,7 +77,7 @@ public class WmsInstockDetailController extends BaseController {
@Log(title = "入库单-物料", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
public R<Void> add(@RequestBody WmsInstockDetailBo bo) {
public R<Void> add(@RequestBody List<WmsInstockDetailBo> bo) {
return toAjax(wmsInstockDetailService.insertByBo(bo));
}
@ -104,4 +104,11 @@ public class WmsInstockDetailController extends BaseController {
@PathVariable Long[] instockDetailIds) {
return toAjax(wmsInstockDetailService.deleteWithValidByIds(List.of(instockDetailIds), true));
}
@SaCheckPermission("system:instockDetail:remove")
@Log(title = "入库单-物料", businessType = BusinessType.DELETE)
@DeleteMapping("/removeInstockDetail/{instockDetailId}")
public R<Void> removeInstockDetail( @PathVariable Long instockDetailId) {
return toAjax(wmsInstockDetailService.deleteById(instockDetailId)>0);
}
}

@ -77,8 +77,8 @@ public class WmsInstockOrderController extends BaseController {
@Log(title = "入库单", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
public R<Void> add( @RequestBody WmsInstockOrderBo bo) {
return toAjax(wmsInstockOrderService.insertByBo(bo));
public R<WmsInstockOrderVo> add( @RequestBody WmsInstockOrderBo bo) {
return R.ok(wmsInstockOrderService.insertByBo(bo));
}
/**
@ -88,7 +88,7 @@ public class WmsInstockOrderController extends BaseController {
@Log(title = "入库单", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsInstockOrderBo bo) {
public R<Void> edit(@RequestBody WmsInstockOrderBo bo) {
return toAjax(wmsInstockOrderService.updateByBo(bo));
}

@ -6,6 +6,9 @@ import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.dromara.wms.domain.WmsInstockDetail;
import org.dromara.wms.domain.WmsOutstockDetail;
import org.dromara.wms.domain.bo.WmsInstockDetailBo;
import org.dromara.wms.domain.bo.WmsOutstockDetailBo;
import org.dromara.wms.domain.vo.WmsOutstockDetailVo;
import org.dromara.wms.service.IWmsOutstockDetailService;
@ -77,7 +80,7 @@ public class WmsOutstockDetailController extends BaseController {
@Log(title = "出库单-物料", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
public R<Void> add(@RequestBody WmsOutstockDetailBo bo) {
public R<Void> add(@RequestBody List<WmsOutstockDetailBo> bo) {
return toAjax(wmsOutstockDetailService.insertByBo(bo));
}
@ -101,7 +104,14 @@ public class WmsOutstockDetailController extends BaseController {
@Log(title = "出库单-物料", businessType = BusinessType.DELETE)
@DeleteMapping("/{outstockDetailIds}")
public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] outstockDetailIds) {
@PathVariable Long outstockDetailIds) {
return toAjax(wmsOutstockDetailService.deleteWithValidByIds(List.of(outstockDetailIds), true));
}
@SaCheckPermission("system:outstockDetail:remove")
@Log(title = "出库单-物料", businessType = BusinessType.DELETE)
@DeleteMapping("detailRemove/{outstockDetailId}")
public R<Void> removeOutstockDetailId(@PathVariable Long outstockDetailId) {
return toAjax(wmsOutstockDetailService.deleteById(outstockDetailId)>0);
}
}

@ -6,6 +6,7 @@ import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.dromara.wms.domain.WmsOutstockOrder;
import org.dromara.wms.domain.bo.WmsOutstockOrderBo;
import org.dromara.wms.domain.vo.WmsOutstockOrderVo;
import org.dromara.wms.service.IWmsOutstockOrderService;
@ -76,8 +77,8 @@ public class WmsOutstockOrderController extends BaseController {
@Log(title = "出库单", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsOutstockOrderBo bo) {
return toAjax(wmsOutstockOrderService.insertByBo(bo));
public R<WmsOutstockOrderVo> add(@RequestBody WmsOutstockOrderBo bo) {
return R.ok(wmsOutstockOrderService.insertByBo(bo));
}
/**

@ -24,6 +24,7 @@ public class WmsAllocateOrderDetail {
/**
*
*/
@TableId(type = IdType.AUTO)
private Long aoDId;
/**
@ -74,6 +75,8 @@ public class WmsAllocateOrderDetail {
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
@TableField(exist = false)
private String materialCode;
}

@ -25,6 +25,7 @@ public class WmsInstockDetail{
/**
*
*/
@TableId(type = IdType.AUTO)
private Long instockDetailId;
/**

@ -79,8 +79,9 @@ public class WmsOutstockDetail {
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
@TableField(exist = false)
private String materialCode;
private String materialName;
}

@ -57,6 +57,9 @@ public class WmsOutstockDetailBo extends BaseEntity {
// @NotBlank(message = "物料大类不能为空", groups = { AddGroup.class, EditGroup.class })
private String materialCategories;
private String tenantId;
private String materialCode;
private String materialName;
}

@ -90,5 +90,7 @@ public class WmsAllocateOrderDetailVo implements Serializable {
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
private String materialCode;
}

@ -93,5 +93,7 @@ public class WmsOutstockDetailVo implements Serializable {
private String materialCode;
private String materialName;
}

@ -47,7 +47,7 @@ public interface IWmsInstockDetailService {
* @param bo -
* @return
*/
Boolean insertByBo(WmsInstockDetailBo bo);
Boolean insertByBo(List<WmsInstockDetailBo> bo);
/**
* -
@ -65,4 +65,6 @@ public interface IWmsInstockDetailService {
* @return
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
int deleteById(Long instockDetailId);
}

@ -47,7 +47,7 @@ public interface IWmsInstockOrderService {
* @param bo
* @return
*/
Boolean insertByBo(WmsInstockOrderBo bo);
WmsInstockOrderVo insertByBo(WmsInstockOrderBo bo);
/**
*

@ -1,5 +1,6 @@
package org.dromara.wms.service;
import org.dromara.common.core.domain.R;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.wms.domain.bo.WmsOutstockDetailBo;
@ -47,7 +48,7 @@ public interface IWmsOutstockDetailService {
* @param bo -
* @return
*/
Boolean insertByBo(WmsOutstockDetailBo bo);
Boolean insertByBo(List<WmsOutstockDetailBo> bo);
/**
* -
@ -65,4 +66,6 @@ public interface IWmsOutstockDetailService {
* @return
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
int deleteById(Long outstockDetailId);
}

@ -2,6 +2,7 @@ package org.dromara.wms.service;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.wms.domain.WmsOutstockOrder;
import org.dromara.wms.domain.bo.WmsOutstockOrderBo;
import org.dromara.wms.domain.vo.WmsOutstockOrderVo;
@ -47,7 +48,7 @@ public interface IWmsOutstockOrderService {
* @param bo
* @return
*/
Boolean insertByBo(WmsOutstockOrderBo bo);
WmsOutstockOrderVo insertByBo(WmsOutstockOrderBo bo);
/**
*

@ -1,5 +1,7 @@
package org.dromara.wms.service.impl;
import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -8,8 +10,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.dromara.wms.domain.BaseMaterialInfo;
import org.dromara.wms.domain.WmsAllocateOrderDetail;
import org.dromara.wms.domain.WmsBaseWarehouse;
import org.dromara.wms.domain.WmsMoveOrder;
import org.dromara.wms.domain.bo.WmsAllocateOrderDetailBo;
import org.dromara.wms.domain.bo.WmsMoveOrderBo;
import org.dromara.wms.domain.vo.WmsAllocateOrderDetailVo;
import org.dromara.wms.mapper.WmsAllocateOrderDetailMapper;
import org.dromara.wms.service.IWmsAllocateOrderDetailService;
@ -49,8 +55,8 @@ public class WmsAllocateOrderDetailServiceImpl implements IWmsAllocateOrderDetai
*/
@Override
public TableDataInfo<WmsAllocateOrderDetailVo> queryPageList(WmsAllocateOrderDetailBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<WmsAllocateOrderDetail> lqw = buildQueryWrapper(bo);
lqw.orderByDesc(WmsAllocateOrderDetail::getCreateTime);
// LambdaQueryWrapper<WmsAllocateOrderDetail> lqw = buildQueryWrapper(bo);
MPJLambdaWrapper<WmsAllocateOrderDetail> lqw = buildJoinQueryWrapper(bo);
Page<WmsAllocateOrderDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}
@ -78,6 +84,19 @@ public class WmsAllocateOrderDetailServiceImpl implements IWmsAllocateOrderDetai
lqw.eq(bo.getErpSynchronousQty() != null, WmsAllocateOrderDetail::getErpSynchronousQty, bo.getErpSynchronousQty());
return lqw;
}
private MPJLambdaWrapper<WmsAllocateOrderDetail> buildJoinQueryWrapper(WmsAllocateOrderDetailBo bo) {
Map<String, Object> params = bo.getParams();
MPJLambdaWrapper<WmsAllocateOrderDetail> lqw = JoinWrappers.lambda(WmsAllocateOrderDetail.class)
.selectAll(WmsAllocateOrderDetail.class).select(BaseMaterialInfo::getMaterialCode)
.leftJoin(BaseMaterialInfo.class,BaseMaterialInfo::getMaterialId,WmsAllocateOrderDetail::getMaterialId);
lqw.eq(bo.getAoDId() != null, WmsAllocateOrderDetail::getAoDId, bo.getAoDId());
lqw.eq(StringUtils.isNotBlank(bo.getAllocateCode()), WmsAllocateOrderDetail::getAllocateCode, bo.getAllocateCode());
lqw.eq(bo.getMaterialId() != null, WmsAllocateOrderDetail::getMaterialId, bo.getMaterialId());
lqw.eq(bo.getAllocateOrderQty() != null, WmsAllocateOrderDetail::getAllocateOrderQty, bo.getAllocateOrderQty());
lqw.eq(StringUtils.isNotBlank(bo.getErpSynchronousStatus()), WmsAllocateOrderDetail::getErpSynchronousStatus, bo.getErpSynchronousStatus());
lqw.eq(bo.getErpSynchronousQty() != null, WmsAllocateOrderDetail::getErpSynchronousQty, bo.getErpSynchronousQty()).orderByDesc(WmsAllocateOrderDetail::getCreateTime);
return lqw;
}
/**
*
@ -142,7 +161,6 @@ public class WmsAllocateOrderDetailServiceImpl implements IWmsAllocateOrderDetai
@Override
public List<WmsAllocateOrderDetailVo> selectAllocateDetails() {
return null;
}
}

@ -9,9 +9,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.dromara.wms.domain.WmsInstockDetail;
import org.dromara.wms.domain.WmsInstockOrder;
import org.dromara.wms.domain.WmsInstockPrint;
import org.dromara.wms.domain.*;
import org.dromara.wms.domain.bo.BaseMaterialInfoBo;
import org.dromara.wms.domain.bo.WmsAllocateOrderDetailBo;
import org.dromara.wms.domain.bo.WmsInstockDetailBo;
import org.dromara.wms.domain.vo.BaseMaterialInfoVo;
import org.dromara.wms.domain.vo.WmsInstockDetailVo;
@ -23,6 +23,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Collection;
@ -109,16 +110,19 @@ public class WmsInstockDetailServiceImpl implements IWmsInstockDetailService {
* @return
*/
@Override
public Boolean insertByBo(WmsInstockDetailBo bo) {
WmsInstockDetail add = MapstructUtils.convert(bo, WmsInstockDetail.class);
BaseMaterialInfoVo baseMaterialInfoVo = baseMaterialInfoService.queryById(bo.getMaterialId());
BeanUtils.copyProperties(baseMaterialInfoVo,add);
validEntityBeforeSave(add);
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
bo.setInstockDetailId(add.getInstockDetailId());
public Boolean insertByBo(List<WmsInstockDetailBo> bo) {
ArrayList<WmsInstockDetail> list = new ArrayList<>();
int a = 0;
for (WmsInstockDetailBo detailBo : bo) {
BaseMaterialInfoBo baseMaterialInfo = new BaseMaterialInfoBo();
baseMaterialInfo.setMaterialId(detailBo.getMaterialId());
List<BaseMaterialInfoVo> baseMaterialInfoVos = baseMaterialInfoService.queryList(baseMaterialInfo);
WmsInstockDetail add = MapstructUtils.convert(detailBo, WmsInstockDetail.class);
add.setMaterialCode(baseMaterialInfoVos.get(0).getMaterialCode());
add.setMaterialName(baseMaterialInfoVos.get(0).getMaterialName());
a += baseMapper.insert(add);
}
return flag;
return a>0;
}
/**
@ -173,6 +177,11 @@ public class WmsInstockDetailServiceImpl implements IWmsInstockDetailService {
//TODO 做一些数据校验,如唯一约束
}
@Override
public int deleteById(Long instockDetailId) {
return baseMapper.deleteById(instockDetailId);
}
/**
* -
*

@ -54,7 +54,10 @@ public class WmsInstockOrderServiceImpl implements IWmsInstockOrderService {
@Override
public WmsInstockOrderVo queryById(Long instockId){
LambdaQueryWrapper<WmsInstockOrder> wrapper = new LambdaQueryWrapper<>();
MPJLambdaWrapper<WmsInstockOrder> wrapper = new MPJLambdaWrapper<>();
wrapper.selectAll(WmsInstockOrder.class).select(WmsBaseWarehouse::getWarehouseCode)
.leftJoin(WmsBaseWarehouse.class,WmsBaseWarehouse::getWarehouseId,WmsInstockOrder::getWarehouseId);
wrapper.eq(WmsInstockOrder::getInstockId,instockId);
return baseMapper.selectVoOne(wrapper);
}
@ -127,7 +130,7 @@ public class WmsInstockOrderServiceImpl implements IWmsInstockOrderService {
* @return
*/
@Override
public Boolean insertByBo(WmsInstockOrderBo bo) {
public WmsInstockOrderVo insertByBo(WmsInstockOrderBo bo) {
Date date = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHssmm");
String orderDate = format.format(date);
@ -148,7 +151,10 @@ public class WmsInstockOrderServiceImpl implements IWmsInstockOrderService {
if (flag) {
bo.setInstockId(add.getInstockId());
}
return flag;
LambdaQueryWrapper<WmsInstockOrder> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(WmsInstockOrder::getInstockCode,inStockOrder);
WmsInstockOrderVo instockOrderVo = baseMapper.selectVoOne(wrapper);
return instockOrderVo;
}
public String generateOrder(Integer value){
if (value.toString().length()<3){

@ -11,14 +11,21 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.dromara.wms.domain.BaseMaterialInfo;
import org.dromara.wms.domain.WmsInstockDetail;
import org.dromara.wms.domain.WmsInventory;
import org.dromara.wms.domain.WmsOutstockDetail;
import org.dromara.wms.domain.bo.BaseMaterialInfoBo;
import org.dromara.wms.domain.bo.WmsInstockDetailBo;
import org.dromara.wms.domain.bo.WmsOutstockDetailBo;
import org.dromara.wms.domain.vo.BaseMaterialInfoVo;
import org.dromara.wms.domain.vo.WmsOutstockDetailVo;
import org.dromara.wms.mapper.WmsOutstockDetailMapper;
import org.dromara.wms.service.IBaseMaterialInfoService;
import org.dromara.wms.service.IWmsOutstockDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Collection;
@ -35,6 +42,9 @@ public class WmsOutstockDetailServiceImpl implements IWmsOutstockDetailService {
private final WmsOutstockDetailMapper baseMapper;
@Autowired
private IBaseMaterialInfoService baseMaterialInfoService;
/**
* -
*
@ -107,14 +117,20 @@ public class WmsOutstockDetailServiceImpl implements IWmsOutstockDetailService {
* @return
*/
@Override
public Boolean insertByBo(WmsOutstockDetailBo bo) {
WmsOutstockDetail add = MapstructUtils.convert(bo, WmsOutstockDetail.class);
validEntityBeforeSave(add);
boolean flag = baseMapper.insert(add) > 0;
if (flag) {
bo.setOutstockDetailId(add.getOutstockDetailId());
public Boolean insertByBo(List<WmsOutstockDetailBo> bo) {
ArrayList<WmsOutstockDetail> list = new ArrayList<>();
int rows = 0;
for (WmsOutstockDetailBo detailBo : bo) {
BaseMaterialInfoBo baseMaterialInfo = new BaseMaterialInfoBo();
baseMaterialInfo.setMaterialId(detailBo.getMaterialId());
List<BaseMaterialInfoVo> baseMaterialInfoVos = baseMaterialInfoService.queryList(baseMaterialInfo);
WmsOutstockDetail add = MapstructUtils.convert(detailBo, WmsOutstockDetail.class);
add.setMaterialCode(baseMaterialInfoVos.get(0).getMaterialCode());
add.setMaterialName(baseMaterialInfoVos.get(0).getMaterialName());
rows += baseMapper.insert(add);
}
return flag;
return rows>0;
}
/**
@ -137,6 +153,11 @@ public class WmsOutstockDetailServiceImpl implements IWmsOutstockDetailService {
//TODO 做一些数据校验,如唯一约束
}
@Override
public int deleteById(Long outstockDetailId) {
return baseMapper.deleteById(outstockDetailId);
}
/**
* -
*

@ -1,5 +1,7 @@
package org.dromara.wms.service.impl;
import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -8,7 +10,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.dromara.wms.domain.BaseMaterialInfo;
import org.dromara.wms.domain.WmsBaseWarehouse;
import org.dromara.wms.domain.WmsOutstockDetail;
import org.dromara.wms.domain.WmsOutstockOrder;
import org.dromara.wms.domain.bo.WmsOutstockDetailBo;
import org.dromara.wms.domain.bo.WmsOutstockOrderBo;
import org.dromara.wms.domain.vo.WmsOutstockOrderVo;
import org.dromara.wms.mapper.WmsInstockOrderMapper;
@ -59,12 +65,30 @@ public class WmsOutstockOrderServiceImpl implements IWmsOutstockOrderService {
*/
@Override
public TableDataInfo<WmsOutstockOrderVo> queryPageList(WmsOutstockOrderBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<WmsOutstockOrder> lqw = buildQueryWrapper(bo);
lqw.orderByDesc(WmsOutstockOrder::getCreateTime);
MPJLambdaWrapper<WmsOutstockOrder> lqw = buildJoinQueryWrapper(bo);
Page<WmsOutstockOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
return TableDataInfo.build(result);
}
private MPJLambdaWrapper<WmsOutstockOrder> buildJoinQueryWrapper(WmsOutstockOrderBo bo) {
Map<String, Object> params = bo.getParams();
MPJLambdaWrapper<WmsOutstockOrder> lqw = JoinWrappers.lambda(WmsOutstockOrder.class)
.selectAll(WmsOutstockOrder.class)
.select(WmsBaseWarehouse::getWarehouseCode)
.leftJoin(WmsBaseWarehouse.class, WmsBaseWarehouse::getWarehouseId, WmsOutstockOrder::getWarehouseId);
lqw.eq(bo.getOutstockId() != null, WmsOutstockOrder::getOutstockId, bo.getOutstockId());
lqw.eq(bo.getWarehouseId() != null, WmsOutstockOrder::getWarehouseId, bo.getWarehouseId());
lqw.eq(StringUtils.isNotBlank(bo.getOutstockCode()), WmsOutstockOrder::getOutstockCode, bo.getOutstockCode());
lqw.eq(StringUtils.isNotBlank(bo.getOutstockType()), WmsOutstockOrder::getOutstockType, bo.getOutstockType());
lqw.eq(StringUtils.isNotBlank(bo.getMaterialCategories()), WmsOutstockOrder::getMaterialCategories, bo.getMaterialCategories());
lqw.eq(StringUtils.isNotBlank(bo.getOrderType()), WmsOutstockOrder::getOrderType, bo.getOrderType());
lqw.eq(StringUtils.isNotBlank(bo.getOrderNo()), WmsOutstockOrder::getOrderNo, bo.getOrderNo());
lqw.eq(StringUtils.isNotBlank(bo.getAuditBy()), WmsOutstockOrder::getAuditBy, bo.getAuditBy());
lqw.eq(bo.getAuditTime() != null, WmsOutstockOrder::getAuditTime, bo.getAuditTime());
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), WmsOutstockOrder::getAuditStatus, bo.getAuditStatus());
lqw.eq(StringUtils.isNotBlank(bo.getAuditComments()), WmsOutstockOrder::getAuditComments, bo.getAuditComments())
.orderByAsc(WmsOutstockOrder::getCreateTime);
return lqw;
}
/**
*
*
@ -101,7 +125,7 @@ public class WmsOutstockOrderServiceImpl implements IWmsOutstockOrderService {
* @return
*/
@Override
public Boolean insertByBo(WmsOutstockOrderBo bo) {
public WmsOutstockOrderVo insertByBo(WmsOutstockOrderBo bo) {
Date date = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHssmm");
String orderDate = format.format(date);
@ -122,7 +146,11 @@ public class WmsOutstockOrderServiceImpl implements IWmsOutstockOrderService {
if (flag) {
bo.setOutstockId(add.getOutstockId());
}
return flag;
LambdaQueryWrapper<WmsOutstockOrder> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(WmsOutstockOrder::getOutstockCode,outStockOrder);
List<WmsOutstockOrderVo> vos = baseMapper.selectVoList(wrapper);
return vos.get(0);
}
public String generateOrder(Integer value){
if (value.toString().length()<3){

Loading…
Cancel
Save