|
@@ -2,6 +2,8 @@ package com.sy.coinage.workshop.controller;
|
|
|
|
|
|
import com.sy.coinage.core.redis.RedisService;
|
|
|
import com.sy.coinage.core.util.DateUtils;
|
|
|
+import com.sy.coinage.sys.model.Dept;
|
|
|
+import com.sy.coinage.sys.service.IDeptService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -49,7 +51,7 @@ public class BaseInfoController extends BaseController {
|
|
|
private IBaseInfoService baseInfoService;
|
|
|
|
|
|
@Autowired
|
|
|
- private RedisService redisService;
|
|
|
+ private IDeptService deptService;
|
|
|
|
|
|
//=========pc接口
|
|
|
@ApiOperation(value = "rfid基础信息登记列表")
|
|
@@ -71,7 +73,7 @@ public class BaseInfoController extends BaseController {
|
|
|
queryWrapper.eq(req.getDeptId() != null && req.getDeptId() > 0, BaseInfo::getDeptId,
|
|
|
req.getDeptId());
|
|
|
if (req.getQualityStatus() != null && req.getQualityStatus() > 0) {
|
|
|
- if (req.getQualityStatus().intValue() == 1) {
|
|
|
+ if (req.getQualityStatus().intValue() == 2) {
|
|
|
queryWrapper.and(qw -> {
|
|
|
qw.eq(BaseInfo::getQualityStatus, req.getQualityStatus())
|
|
|
.or().isNull(BaseInfo::getQualityStatus);
|
|
@@ -106,6 +108,52 @@ public class BaseInfoController extends BaseController {
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "rfid基础信息登记表分页列表")
|
|
|
+ @PostMapping("/page1")
|
|
|
+ @ActiveFastJsonProfile(groups = "list", clazz = BaseInfo.class)
|
|
|
+ public IPage<BaseInfo> page1(@RequestBody BaseInfoListReq req, @CurrentUser CacheUserVO user) {
|
|
|
+
|
|
|
+ Dept dept = this.deptService.getById(user.getDeptId());
|
|
|
+ LambdaQueryWrapper<BaseInfo> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.gt(BaseInfo::getId, 0); // 没条件时 排序生效
|
|
|
+ queryWrapper.and(qw -> {
|
|
|
+ qw.eq(BaseInfo::getLocWareId, dept.getRemark())
|
|
|
+ .or().isNull(BaseInfo::getLocWareId);
|
|
|
+ });
|
|
|
+ if (req.getQualityStatus() != null && req.getQualityStatus() > 0) {
|
|
|
+ if (req.getQualityStatus().intValue() == 2) {
|
|
|
+ queryWrapper.and(qw -> {
|
|
|
+ qw.eq(BaseInfo::getQualityStatus, req.getQualityStatus())
|
|
|
+ .or().isNull(BaseInfo::getQualityStatus);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(BaseInfo::getQualityStatus, req.getQualityStatus());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ queryWrapper.eq(req.getSecuritiesId() != null && req.getSecuritiesId() > 0, BaseInfo::getSecuritiesId, req.getSecuritiesId());
|
|
|
+ if (req.getStartDate() != null) {
|
|
|
+ queryWrapper.ge(BaseInfo::getWeightDate, DateUtils.getDayStartTime(req.getStartDate()));
|
|
|
+ }
|
|
|
+ if (req.getEndDate() != null) {
|
|
|
+ queryWrapper.le(BaseInfo::getWeightDate, DateUtils.getDayEndTime(req.getEndDate()));
|
|
|
+ }
|
|
|
+ if (req.getDeliveryStartDate() != null) {
|
|
|
+ queryWrapper.le(BaseInfo::getDeliveryTime, DateUtils.getDayStartTime(req.getDeliveryStartDate()));
|
|
|
+ }
|
|
|
+ if (req.getDeliveryEndDate() != null) {
|
|
|
+ queryWrapper.ge(BaseInfo::getDeliveryTime, DateUtils.getDayEndTime(req.getDeliveryEndDate()));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(req.getCrown())) {
|
|
|
+ queryWrapper.eq(BaseInfo::getSerialNumber, req.getCrown());
|
|
|
+
|
|
|
+ }
|
|
|
+ //按照创建时间倒序排列
|
|
|
+ queryWrapper.orderByDesc(BaseInfo::getCreateTime);
|
|
|
+ Page<BaseInfo> page = new Page<>(req.getPage(), req.getRows());
|
|
|
+ IPage<BaseInfo> data = this.baseInfoService.queryPageList(page, queryWrapper);
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "新拍记录分页列表")
|
|
|
@PostMapping("/newPalletPage")
|
|
|
@ActiveFastJsonProfile(groups = "list", clazz = BaseInfo.class)
|