|
@@ -58,6 +58,49 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
+ 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) {
|
|
|
|
+ pageNum = "1";
|
|
|
|
+ }
|
|
|
|
+ if ("".equals(pageSize) || null == pageSize) {
|
|
|
|
+ pageSize = "20";
|
|
|
|
+ }
|
|
|
|
+ Page<BillCleanBefore> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
|
|
+ QueryWrapper<BillCleanBefore> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ 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(data)) {
|
|
|
|
+ queryWrapper.eq("bill_status", 0);
|
|
|
|
+ }
|
|
|
|
+ if ("2".equals(data)) {
|
|
|
|
+ queryWrapper.eq("bill_status", 1);
|
|
|
|
+ }
|
|
|
|
+ if ("3".equals(data)) {
|
|
|
|
+ queryWrapper.in("bill_status", 2, 3);
|
|
|
|
+ }
|
|
|
|
+ QueryWrapper<BillCleanBefore> 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, billCleanBeforeMapper.selectPage(page, queryWrapper), billCleanBeforeMapper.selectCount(queryWrapper2));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Result listById(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
|
|
+ String id = paramsMap.get("id");
|
|
|
|
+ BillCleanBefore billPcr = billCleanBeforeMapper.selectById(id);
|
|
|
|
+ return new Result(ResultCode.SUCCESS, billPcr);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
public Result listPersonalCleanBefore(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
public Result listPersonalCleanBefore(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
String farmId = paramsMap.get("farmId");
|
|
String farmId = paramsMap.get("farmId");
|
|
String pageNo = paramsMap.get("pageNum");
|
|
String pageNo = paramsMap.get("pageNum");
|