1.调整垛码明细查询

master
x_z 3 years ago
parent 05a2d72958
commit 1a94a5b251

@ -80,7 +80,7 @@ public class StackRulesController {
*/
@PostMapping("/udims/stackRules/delete")
public BaseResponse deleteStockRules(@RequestBody DeleteRequest deleteRequest) {
if (null == deleteRequest || StrUtil.isNotBlank(deleteRequest.getId())) {
if (null == deleteRequest || StrUtil.isBlank(deleteRequest.getId())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
stockRulesService.delete(deleteRequest.getId());

@ -91,6 +91,8 @@ public class StackOrderController {
stackOrderEntity.setCustomerId(customerService.getCustomerId() + "");
String stackOrderId = stackOrderService.insertOrder(stackOrderEntity);
//绑定垛号
stackUploadRequest.getStackCodeEntityList().forEach(stackCode -> stackCode.setOrderIdFk(stackOrderId));
stackCodeService.batchInsert(stackUploadRequest.getStackCodeEntityList());
return ResultVOUtils.success(stackOrderId);
}

@ -2,6 +2,8 @@ package com.glxp.udi.admin.dao.product;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.udi.admin.entity.product.StackCode;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface StackCodeDao extends BaseMapper<StackCode> {
}

@ -2,6 +2,8 @@ package com.glxp.udi.admin.dao.product;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.udi.admin.entity.product.StackOrder;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface StackOrderDao extends BaseMapper<StackOrder> {
}

@ -1,5 +1,8 @@
package com.glxp.udi.admin.entity.product;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
@ -7,7 +10,10 @@ import lombok.Data;
*/
@Data
@TableName("stack_code")
public class StackCode {
@TableId(type = IdType.AUTO)
private Integer id;
private String code;
private String orderIdFk;

@ -1,5 +1,8 @@
package com.glxp.udi.admin.entity.product;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@ -10,8 +13,10 @@ import java.util.Date;
*/
@Data
@TableName("stack_order")
public class StackOrder {
@TableId(type = IdType.AUTO)
private Integer id;
private String orderId;
private String name;

@ -1,5 +0,0 @@
package com.glxp.udi.admin.entity.product;
/**
*
*/

@ -14,4 +14,9 @@ public class FilterStackCodeRequest extends ListPageRequest {
*/
private String orderIdFk;
/**
*
*/
private String code;
}

@ -1,6 +1,7 @@
package com.glxp.udi.admin.service.product;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -48,7 +49,9 @@ public class StackCodeService {
* @return
*/
public IPage<StackCode> filterList(FilterStackCodeRequest filterStackCodeRequest) {
QueryWrapper<StackCode> wrapper = new QueryWrapper<StackCode>().eq("orderIdFk", filterStackCodeRequest.getOrderIdFk());
QueryWrapper<StackCode> wrapper = new QueryWrapper<StackCode>()
.eq("orderIdFk", filterStackCodeRequest.getOrderIdFk())
.eq(StrUtil.isNotBlank(filterStackCodeRequest.getCode()), "code", filterStackCodeRequest.getCode());
IPage<StackCode> page = new Page<>(filterStackCodeRequest.getPage(), filterStackCodeRequest.getLimit());
return stackCodeDao.selectPage(page, wrapper);
}

@ -18,7 +18,7 @@ import javax.annotation.Resource;
public class StackOrderService {
@Resource
StackOrderDao stackOrderDao;
private StackOrderDao stackOrderDao;
@Resource
private IdUtil idUtil;

Loading…
Cancel
Save