1.添加垛码查询接口

2.垛查询添加客户ID条件
master
x_z 3 years ago
parent 44c725f8af
commit 05a2d72958

@ -0,0 +1,46 @@
package com.glxp.udi.admin.controller.product;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.glxp.udi.admin.common.enums.ResultEnum;
import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.common.util.ResultVOUtils;
import com.glxp.udi.admin.entity.product.StackCode;
import com.glxp.udi.admin.req.product.FilterStackCodeRequest;
import com.glxp.udi.admin.res.PageSimpleResponse;
import com.glxp.udi.admin.service.product.StackCodeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* -
*/
@Slf4j
@RestController
public class StackCodeController {
@Resource
private StackCodeService stackCodeService;
/**
*
*
* @param filterStackCodeRequest
* @return
*/
@GetMapping("/udims/stack/code/filter")
public BaseResponse filterList(FilterStackCodeRequest filterStackCodeRequest) {
if (null == filterStackCodeRequest || StrUtil.isBlank(filterStackCodeRequest.getOrderIdFk())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
IPage<StackCode> page = stackCodeService.filterList(filterStackCodeRequest);
PageSimpleResponse pageSimpleResponse = new PageSimpleResponse();
pageSimpleResponse.setList(page.getRecords());
pageSimpleResponse.setTotal(page.getTotal());
return ResultVOUtils.success(pageSimpleResponse);
}
}

@ -1,5 +1,6 @@
package com.glxp.udi.admin.entity.product;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@ -16,7 +17,11 @@ public class StackOrder {
private String name;
private Integer exportStatus;
private Integer status;
@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 updateTime;
private String customerId;
}

@ -0,0 +1,17 @@
package com.glxp.udi.admin.req.product;
import com.glxp.udi.admin.req.ListPageRequest;
import lombok.Data;
/**
*
*/
@Data
public class FilterStackCodeRequest extends ListPageRequest {
/**
*
*/
private String orderIdFk;
}

@ -1,8 +1,12 @@
package com.glxp.udi.admin.service.product;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.dao.product.StackCodeDao;
import com.glxp.udi.admin.entity.product.StackCode;
import com.glxp.udi.admin.req.product.FilterStackCodeRequest;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
@ -19,7 +23,9 @@ public class StackCodeService {
@Resource
SqlSessionFactory sqlSessionFactory;
private SqlSessionFactory sqlSessionFactory;
@Resource
private StackCodeDao stackCodeDao;
public void batchInsert(List<StackCode> stackCodeEntityList) {
@ -35,4 +41,15 @@ public class StackCodeService {
}
/**
*
*
* @param filterStackCodeRequest
* @return
*/
public IPage<StackCode> filterList(FilterStackCodeRequest filterStackCodeRequest) {
QueryWrapper<StackCode> wrapper = new QueryWrapper<StackCode>().eq("orderIdFk", filterStackCodeRequest.getOrderIdFk());
IPage<StackCode> page = new Page<>(filterStackCodeRequest.getPage(), filterStackCodeRequest.getLimit());
return stackCodeDao.selectPage(page, wrapper);
}
}

@ -28,6 +28,7 @@ public class StackOrderService {
QueryWrapper<StackOrder> wrapper = new QueryWrapper<>();
wrapper.eq(stackOrderFilterRequest.getId() != null, "id", stackOrderFilterRequest.getId())
.eq(StrUtil.isNotBlank(stackOrderFilterRequest.getCustomerId()), "customerId", stackOrderFilterRequest.getCustomerId())
.eq(StrUtil.isNotBlank(stackOrderFilterRequest.getOrderId()), "orderId", stackOrderFilterRequest.getOrderId())
.eq(stackOrderFilterRequest.getExportStatus() != null, "exportStatus", stackOrderFilterRequest.getExportStatus())
.eq(stackOrderFilterRequest.getStatus() != null, "status", stackOrderFilterRequest.getStatus())

Loading…
Cancel
Save