|
@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.huimv.cattle.mapper.SysRegionCounTownVillMapper;
|
|
import com.huimv.cattle.pojo.OutStock;
|
|
import com.huimv.cattle.pojo.OutStock;
|
|
import com.huimv.cattle.mapper.OutStockMapper;
|
|
import com.huimv.cattle.mapper.OutStockMapper;
|
|
import com.huimv.cattle.service.OutStockService;
|
|
import com.huimv.cattle.service.OutStockService;
|
|
@@ -34,6 +35,8 @@ public class OutStockServiceImpl extends ServiceImpl<OutStockMapper, OutStock> i
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private OutStockMapper outStockMapper;
|
|
private OutStockMapper outStockMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private SysRegionCounTownVillMapper sysRegionCounTownVillMapper;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Result listOutStock(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
public Result listOutStock(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
@@ -114,4 +117,20 @@ public class OutStockServiceImpl extends ServiceImpl<OutStockMapper, OutStock> i
|
|
}
|
|
}
|
|
return new Result(ResultCode.SUCCESS,"保存成功");
|
|
return new Result(ResultCode.SUCCESS,"保存成功");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Result listVillageOutStock(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
|
|
+ String farmCode =paramsMap.get("farmCode");
|
|
|
|
+ if (farmCode==null) {
|
|
|
|
+ farmCode = TokenSign.getFarmCode(httpServletRequest);
|
|
|
|
+ }
|
|
|
|
+ String month = paramsMap.get("months");
|
|
|
|
+ if (month == null || month == "") {
|
|
|
|
+ String cityCode = sysRegionCounTownVillMapper.listSub(farmCode);
|
|
|
|
+ String[] city = cityCode.split(",");
|
|
|
|
+ List<OutStock> list = outStockMapper.listVillageOutStock(city);
|
|
|
|
+ return new Result(ResultCode.SUCCESS, list);
|
|
|
|
+ }
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
}
|
|
}
|