|
@@ -65,6 +65,8 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
private ConfigurationMapper configurationMapper;
|
|
|
@Autowired
|
|
|
private ExistMapper existMapper;
|
|
|
+ @Autowired
|
|
|
+ private BillGoodsInventoryMapper inventoryMapper;
|
|
|
|
|
|
@Override
|
|
|
public Result listAll(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
@@ -86,10 +88,7 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
data = "0";
|
|
|
}
|
|
|
if (type.equals("0")) {
|
|
|
-
|
|
|
BaseLocation baseLocation = locationMapper.selectById(TokenSign.getWorkIdByJwtToken(httpServletRequest));
|
|
|
-
|
|
|
-
|
|
|
Page<BillClean> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
|
QueryWrapper<BillClean> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("farm_id", farmId).eq("vistit_type", type).orderByDesc("sub_date")
|
|
@@ -109,23 +108,29 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
.eq("test_location_id", baseLocation.getId()).eq("bill_status", 0);
|
|
|
|
|
|
return new Result(ResultCode.SUCCESS, cleanMapper.selectPage(page, queryWrapper), cleanMapper.selectCount(queryWrapper2));
|
|
|
- }/* else if (type.equals("4")) {
|
|
|
- Page<BillClean> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
|
- QueryWrapper<BillClean> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("farm_id", farmId).eq("vistit_type", 4).orderByDesc("sub_date")
|
|
|
- .eq("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
|
|
|
+ }
|
|
|
+ else if ("5".equals(type)) {
|
|
|
+ BaseLocation baseLocation = locationMapper.selectById(TokenSign.getWorkIdByJwtToken(httpServletRequest));
|
|
|
+ Page<BillGoodsInventory> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
|
+ QueryWrapper<BillGoodsInventory> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("farm_id", farmId).orderByDesc("sub_date")
|
|
|
+ .eq("current_location_id", baseLocation.getId());
|
|
|
|
|
|
if ("0".equals(data)) {
|
|
|
- queryWrapper.in("bill_status", 0, 1, 2);
|
|
|
+ queryWrapper.in("status", 0, 1);
|
|
|
}
|
|
|
if ("1".equals(data)) {
|
|
|
- queryWrapper.eq("bill_status", 0);
|
|
|
+ queryWrapper.eq("status", 0);
|
|
|
}
|
|
|
if ("2".equals(data)) {
|
|
|
- queryWrapper.eq("bill_status", 1);
|
|
|
+ queryWrapper.eq("status", 1);
|
|
|
}
|
|
|
- return new Result(ResultCode.SUCCESS, cleanMapper.selectPage(page, queryWrapper));
|
|
|
- }*/ else {
|
|
|
+ QueryWrapper<BillGoodsInventory> queryWrapper2 = new QueryWrapper<>();
|
|
|
+ queryWrapper2.eq("farm_id", farmId).orderByDesc("sub_date")
|
|
|
+ .eq("current_location_id", baseLocation.getId()).eq("status", 0);
|
|
|
+
|
|
|
+ return new Result(ResultCode.SUCCESS, inventoryMapper.selectPage(page, queryWrapper), inventoryMapper.selectCount(queryWrapper2));
|
|
|
+ } else {
|
|
|
Page<CleanAndDryVo2> cleanAndDryVo2Page = null;
|
|
|
Page<CleanAndDryVo2> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
|
QueryWrapper<BillClean> queryWrapper = new QueryWrapper<>();
|
|
@@ -566,8 +571,6 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
private BillCleanBeforeMapper beforeMapper;
|
|
|
@Autowired
|
|
|
private BillSamplingMapper samplingMapper;
|
|
|
- @Autowired
|
|
|
- private BillGoodsInventoryMapper inventoryMapper;
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -906,6 +909,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
} else if (Integer.parseInt(splits[1]) == 4) {
|
|
|
//新增隔离
|
|
|
BillIsolate pcr = (BillIsolate) entity;
|
|
|
+ if (billClean.getVistitType() != 0) {
|
|
|
+ pcr.setCarNum(billClean.getCarNum());
|
|
|
+ }
|
|
|
isolateMapper.insert(pcr);
|
|
|
} else if (Integer.parseInt(splits[1]) == 5) {
|
|
|
BillDry billClean1 = (BillDry) entity;
|
|
@@ -967,6 +973,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
}else if (nextId == 4) {
|
|
|
//新增隔离
|
|
|
BillIsolate pcr = (BillIsolate) newObject;
|
|
|
+ if (billClean.getVistitType() != 0) {
|
|
|
+ pcr.setCarNum(billClean.getCarNum());
|
|
|
+ }
|
|
|
isolateMapper.insert(pcr);
|
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
|
}else if (nextId == 5) {
|
|
@@ -1119,6 +1128,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
} else if (Integer.parseInt(splits[1]) == 4) {
|
|
|
//新增隔离
|
|
|
BillIsolate pcr = (BillIsolate) entity;
|
|
|
+ if (billClean.getVistitType() != 0) {
|
|
|
+ pcr.setCarNum(billClean.getCarNum());
|
|
|
+ }
|
|
|
isolateMapper.insert(pcr);
|
|
|
} else if (Integer.parseInt(splits[1]) == 5) {
|
|
|
BillDry billClean1 = (BillDry) entity;
|
|
@@ -1180,6 +1192,9 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
|
|
|
}else if (nextId == 4) {
|
|
|
//新增隔离
|
|
|
BillIsolate pcr = (BillIsolate) newObject;
|
|
|
+ if (billClean.getVistitType() != 0) {
|
|
|
+ pcr.setCarNum(billClean.getCarNum());
|
|
|
+ }
|
|
|
isolateMapper.insert(pcr);
|
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
|
}else if (nextId == 5) {
|