|
@@ -405,6 +405,28 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
|
return new Result(10000, "修改成功!", true);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Result listAll(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");
|
|
|
+ Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
|
+ QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("farm_id", farmId).orderByDesc("sub_date").eq("vistit_type",type);
|
|
|
+ if ("0".equals(data)) {
|
|
|
+ queryWrapper.in("bill_status", 0, 1, 2, 3);
|
|
|
+ }
|
|
|
+ if ("1".equals(data)) {
|
|
|
+ queryWrapper.in("bill_status", 0,3);
|
|
|
+ }
|
|
|
+ if ("2".equals(data)) {
|
|
|
+ queryWrapper.eq("bill_status", 1);
|
|
|
+ }
|
|
|
+ return new Result(ResultCode.SUCCESS,billSamplingMapper.selectPage(page,queryWrapper));
|
|
|
+ }
|
|
|
+
|
|
|
public static void main(String[] args) {
|
|
|
String s = "0,1,0,2,0,3,0";
|
|
|
int i = s.indexOf("2");
|