|
@@ -49,10 +49,10 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
String pageSize = paramsMap.get("pageSize");
|
|
|
String vistitType = paramsMap.get("vistitType");
|
|
|
Page<BillPcr> page = new Page<>(Integer.parseInt(pageNo), Integer.parseInt(pageSize));
|
|
|
- Page<BillPcr> billPcrPage = billPcrMapper.selectPage(page, new QueryWrapper<BillPcr>().eq(StringUtils.isNotBlank(vistitType),"vistit_type",vistitType).eq("admission_user_id", TokenSign.getMemberIdByJwtToken(httpServletRequest)).orderByDesc("sub_date"));
|
|
|
- QueryWrapper<BillPcr> queryWrapper=new QueryWrapper<>();
|
|
|
- queryWrapper.eq(StringUtils.isNotBlank(vistitType),"vistit_type",vistitType).eq("admission_user_id", TokenSign.getMemberIdByJwtToken(httpServletRequest)).orderByDesc("sub_date");
|
|
|
- return new Result(ResultCode.SUCCESS, billPcrPage,billPcrMapper.selectCount(queryWrapper));
|
|
|
+ Page<BillPcr> billPcrPage = billPcrMapper.selectPage(page, new QueryWrapper<BillPcr>().eq(StringUtils.isNotBlank(vistitType), "vistit_type", vistitType).eq("admission_user_id", TokenSign.getMemberIdByJwtToken(httpServletRequest)).orderByDesc("sub_date"));
|
|
|
+ QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq(StringUtils.isNotBlank(vistitType), "vistit_type", vistitType).eq("admission_user_id", TokenSign.getMemberIdByJwtToken(httpServletRequest)).orderByDesc("sub_date");
|
|
|
+ return new Result(ResultCode.SUCCESS, billPcrPage, billPcrMapper.selectCount(queryWrapper));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -92,15 +92,30 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
|
|
|
} else if ("2".equals(type)) {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
- calendar.set(Calendar.DATE,calendar.get(Calendar.DATE)-7);
|
|
|
+ calendar.set(Calendar.DATE, calendar.get(Calendar.DATE) - 7);
|
|
|
queryWrapper.ge("sub_date", calendar.getTime());
|
|
|
|
|
|
} else if ("3".equals(type)) {
|
|
|
Date monthmorning = DataUill.getTimesMonthmorning();
|
|
|
- queryWrapper.ge("sub_date",monthmorning);
|
|
|
+ queryWrapper.ge("sub_date", monthmorning);
|
|
|
|
|
|
}
|
|
|
pcrVos = billPcrMapper.listPcr(queryWrapper);
|
|
|
+ for (PcrVo pcrVo : pcrVos) {
|
|
|
+ if (pcrVo.getType().equals("0")) {
|
|
|
+ pcrVo.setType("人员");
|
|
|
+ } else if (pcrVo.getType().equals("1")) {
|
|
|
+ pcrVo.setType("环保车");
|
|
|
+ } else if (pcrVo.getType().equals("2")) {
|
|
|
+ pcrVo.setType("拉猪车");
|
|
|
+ } else if (pcrVo.getType().equals("3")) {
|
|
|
+ pcrVo.setType("饲料车");
|
|
|
+ } else if (pcrVo.getType().equals("4")) {
|
|
|
+ pcrVo.setType("送猪车");
|
|
|
+ } else if (pcrVo.getType().equals("5")) {
|
|
|
+ pcrVo.setType("物资车");
|
|
|
+ }
|
|
|
+ }
|
|
|
return new Result(ResultCode.SUCCESS, pcrVos);
|
|
|
}
|
|
|
|
|
@@ -119,11 +134,11 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
queryWrapper.ge("sub_date", timesmorning);
|
|
|
} else if ("2".equals(type)) {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
- calendar.set(Calendar.DATE,calendar.get(Calendar.DATE)-7);
|
|
|
+ calendar.set(Calendar.DATE, calendar.get(Calendar.DATE) - 7);
|
|
|
queryWrapper.ge("sub_date", calendar.getTime());
|
|
|
} else if ("3".equals(type)) {
|
|
|
Date monthmorning = DataUill.getTimesMonthmorning();
|
|
|
- queryWrapper.ge("sub_date",monthmorning);
|
|
|
+ queryWrapper.ge("sub_date", monthmorning);
|
|
|
}
|
|
|
pcrVos = billPcrMapper.listLocation(queryWrapper);
|
|
|
return new Result(ResultCode.SUCCESS, pcrVos);
|
|
@@ -142,7 +157,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
queryWrapper.eq("farm_id", farmId).in("bill_status", 1, 2);
|
|
|
if ("".equals(personType) || null == personType) {
|
|
|
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
queryWrapper.eq("vistit_type", personType);
|
|
|
}
|
|
|
if ("1".equals(type)) {
|
|
@@ -150,11 +165,11 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
queryWrapper.ge("sub_date", timesmorning);
|
|
|
} else if ("2".equals(type)) {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
- calendar.set(Calendar.DATE,calendar.get(Calendar.DATE)-7);
|
|
|
+ calendar.set(Calendar.DATE, calendar.get(Calendar.DATE) - 7);
|
|
|
queryWrapper.ge("sub_date", calendar.getTime());
|
|
|
} else if ("3".equals(type)) {
|
|
|
Date monthmorning = DataUill.getTimesMonthmorning();
|
|
|
- queryWrapper.ge("sub_date",monthmorning);
|
|
|
+ queryWrapper.ge("sub_date", monthmorning);
|
|
|
}
|
|
|
pcrVos = billPcrMapper.listAll(queryWrapper);
|
|
|
for (PcrVo1 pcrVo : pcrVos) {
|
|
@@ -184,7 +199,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
}
|
|
|
QueryWrapper<BillPcr> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.in("bill_status", 1, 2);
|
|
|
- queryWrapper.eq("farm_id", farmId).eq(StringUtils.isNotBlank(destId),"dest_id", destId).eq(StringUtils.isNotBlank(type),"vistit_type",type);
|
|
|
+ queryWrapper.eq("farm_id", farmId).eq(StringUtils.isNotBlank(destId), "dest_id", destId).eq(StringUtils.isNotBlank(type), "vistit_type", type);
|
|
|
queryWrapper.between("check_date", startTime, endTime);
|
|
|
Page<BillPcr> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
|
return new Result(ResultCode.SUCCESS, billPcrMapper.selectPage(page, queryWrapper));
|
|
@@ -252,7 +267,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
|
|
|
QueryWrapper<BillPcr> queryWrapper2 = new QueryWrapper<>();
|
|
|
queryWrapper2.eq("farm_id", farmId).in("test_location_id", ids).orderByDesc("sub_date");
|
|
|
queryWrapper2.eq("bill_status", 0);
|
|
|
- return new Result(ResultCode.SUCCESS, pcrMapper.selectPage(page, queryWrapper),pcrMapper.selectCount(queryWrapper2));
|
|
|
+ return new Result(ResultCode.SUCCESS, pcrMapper.selectPage(page, queryWrapper), pcrMapper.selectCount(queryWrapper2));
|
|
|
}
|
|
|
|
|
|
@Override
|