|
@@ -5,10 +5,12 @@ import com.ruoyi.common.core.web.page.PageDomain;
|
|
|
import com.ruoyi.common.core.web.page.TableSupport;
|
|
|
import com.sooka.sponest.data.api.digitalagriculture.domain.FarmEnterprise;
|
|
|
import com.sooka.sponest.data.api.digitalagriculture.service.RemoteEnterpriseService;
|
|
|
+import com.sooka.sponest.mobile.system.camera.service.AppCameraService;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 饲料企业
|
|
@@ -19,6 +21,9 @@ public class EnterpriseController {
|
|
|
@Resource
|
|
|
RemoteEnterpriseService remoteEnterpriseService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ AppCameraService appCameraService;
|
|
|
+
|
|
|
/**
|
|
|
* 新增饲料企业
|
|
|
* @param json
|
|
@@ -36,7 +41,6 @@ public class EnterpriseController {
|
|
|
*/
|
|
|
@GetMapping("/enterprise/list")
|
|
|
public AjaxResult enterpriseList(FarmEnterprise farmEnterprise) {
|
|
|
-
|
|
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
Integer pageNum = pageDomain.getPageNum();
|
|
|
Integer pageSize = pageDomain.getPageSize();
|
|
@@ -70,6 +74,13 @@ public class EnterpriseController {
|
|
|
*/
|
|
|
@GetMapping("/enterprise/edit")
|
|
|
public AjaxResult enterpriseEdit(String id) {
|
|
|
- return remoteEnterpriseService.enterpriseEdit(id);
|
|
|
+ AjaxResult ajaxResult = remoteEnterpriseService.enterpriseEdit(id);
|
|
|
+ if("200".equals(ajaxResult.get("code").toString())){
|
|
|
+ Map<String, Object> info = (Map<String, Object>) ajaxResult.get("data");
|
|
|
+ return appCameraService.selectCameraByIds(info);
|
|
|
+ }else{
|
|
|
+ return ajaxResult;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|