|
@@ -12,7 +12,9 @@ import com.google.gson.Gson;
|
|
|
import com.google.gson.GsonBuilder;
|
|
|
import com.huimv.farm.damsubsidy.common.token.TokenSign;
|
|
|
import com.huimv.farm.damsubsidy.common.utils.*;
|
|
|
+import com.huimv.farm.damsubsidy.entity.BaseAnimal;
|
|
|
import com.huimv.farm.damsubsidy.entity.BillLandingInspection;
|
|
|
+import com.huimv.farm.damsubsidy.service.IBaseAnimalService;
|
|
|
import com.huimv.farm.damsubsidy.service.IBillLandingInspectionService;
|
|
|
import org.apache.http.HttpResponse;
|
|
|
import org.apache.http.client.HttpClient;
|
|
@@ -45,6 +47,8 @@ public class BillLandingInspectionController {
|
|
|
@Autowired
|
|
|
private IBillLandingInspectionService iBillLandingInspectionService;
|
|
|
@Autowired
|
|
|
+ private IBaseAnimalService baseAnimalService;
|
|
|
+ @Autowired
|
|
|
private UploadImage uploadImage;
|
|
|
|
|
|
@PostMapping("/addApplication")
|
|
@@ -100,9 +104,21 @@ public class BillLandingInspectionController {
|
|
|
|
|
|
@PostMapping("/listReadyApplication")
|
|
|
public Result listReadyApplication(){
|
|
|
- return new Result(ResultCode.SUCCESS,iBillLandingInspectionService.list(new QueryWrapper<BillLandingInspection>()
|
|
|
- .eq("inspection_sch",4)
|
|
|
- .eq("is_delete",0)));
|
|
|
+ List<BillLandingInspection> list = iBillLandingInspectionService.list(new QueryWrapper<BillLandingInspection>()
|
|
|
+ .eq("inspection_sch", 4)
|
|
|
+ .eq("is_delete", 0));
|
|
|
+ List<BillLandingInspection> endlist = new ArrayList<>();
|
|
|
+ // TODO 能不能搞sql
|
|
|
+ for (BillLandingInspection billLandingInspection : list) {
|
|
|
+ String inspectionNum = billLandingInspection.getInspectionNum();
|
|
|
+ int count = baseAnimalService.count(new QueryWrapper<BaseAnimal>().eq("animal_status", 1)
|
|
|
+ .eq("inspection_num", inspectionNum)
|
|
|
+ .eq("is_die", 0));
|
|
|
+ if (count>0){
|
|
|
+ endlist.add(billLandingInspection);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return new Result(ResultCode.SUCCESS,endlist);
|
|
|
}
|
|
|
|
|
|
@PostMapping("/listPersonal")
|