|
@@ -62,6 +62,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
|
public Result list(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
|
String farmId = paramsMap.get("farmId");
|
|
|
String type = paramsMap.get("type");//展示类型
|
|
|
+ String data = paramsMap.get("data");
|
|
|
String pageNum = paramsMap.get("pageNum");
|
|
|
String pageSize = paramsMap.get("pageSize");
|
|
|
if ("".equals(pageNum) || null == pageNum) {
|
|
@@ -72,20 +73,22 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
|
}
|
|
|
Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
|
QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("farm_id", farmId).in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date");
|
|
|
- if ("0".equals(type)) {
|
|
|
+ queryWrapper.eq("farm_id", farmId)
|
|
|
+ .in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date").eq("vistit_type",type);
|
|
|
+ if ("0".equals(data)) {
|
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3);
|
|
|
}
|
|
|
- if ("1".equals(type)) {
|
|
|
+ if ("1".equals(data)) {
|
|
|
queryWrapper.eq("bill_status", 0);
|
|
|
}
|
|
|
- if ("2".equals(type)) {
|
|
|
+ if ("2".equals(data)) {
|
|
|
queryWrapper.eq("bill_status", 1);
|
|
|
}
|
|
|
- if ("3".equals(type)) {
|
|
|
+ if ("3".equals(data)) {
|
|
|
queryWrapper.in("bill_status", 2, 3);
|
|
|
}
|
|
|
QueryWrapper<BillSampling> queryWrapper2 = new QueryWrapper<>();
|
|
|
+ queryWrapper2.eq("vistit_type", type);
|
|
|
queryWrapper2.eq("farm_id", farmId).in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date");
|
|
|
queryWrapper2.eq("bill_status", 0);
|
|
|
return new Result(ResultCode.SUCCESS, billSamplingMapper.selectPage(page, queryWrapper), billSamplingMapper.selectCount(queryWrapper2));
|