From 6aa3771424b2b947446ec679aa5648712e4742ae Mon Sep 17 00:00:00 2001
From: 许鹏程 <1821349743@qq.com>
Date: 星期一, 23 九月 2024 17:04:49 +0800
Subject: [PATCH] 移动端获取表单组件字段,修正子表获取字段

---
 src/main/java/com/product/mobile/core/controller/ContactPersonController.java |   36 +++++++++++++++++++++---------------
 1 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/src/main/java/com/product/mobile/core/controller/ContactPersonController.java b/src/main/java/com/product/mobile/core/controller/ContactPersonController.java
index 90874ac..035945a 100644
--- a/src/main/java/com/product/mobile/core/controller/ContactPersonController.java
+++ b/src/main/java/com/product/mobile/core/controller/ContactPersonController.java
@@ -1,5 +1,6 @@
 package com.product.mobile.core.controller;
 
+import com.product.common.lang.StringUtils;
 import com.product.core.config.CoreConst;
 import com.product.core.controller.support.AbstractBaseController;
 import com.product.core.entity.FieldSetEntity;
@@ -14,9 +15,9 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
-
 /**
  * 閫氳繀褰�
+ * 
  * @Date 2022/3/3 19:54
  * @Desc
  */
@@ -24,19 +25,24 @@
 @RequestMapping("/api/mobile")
 public class ContactPersonController extends AbstractBaseController {
 
-    @Autowired
-    ContanctOrgListService contanctOrgListService;   
-    
-    @RequestMapping(value = "/contact/org/list/{version}", method = RequestMethod.POST)
-    @ApiVersion(1)
-    public String contactOrgList(HttpServletRequest request) {
-    	 FieldSetEntity fse = null;
-         Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA);
-         if (bean != null) {
-             RequestParameterEntity reqp = (RequestParameterEntity) bean;
-             fse = reqp.getFormData();
-         }
-        return this.OK_List(contanctOrgListService.orgList(fse));
-    }
+	@Autowired
+	ContanctOrgListService contanctOrgListService;
+
+	@RequestMapping(value = "/contact/org/list/{version}", method = RequestMethod.POST)
+	@ApiVersion(1)
+	public String contactOrgList(HttpServletRequest request) {
+		FieldSetEntity fse = null;
+		Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA);
+		if (bean != null) {
+			RequestParameterEntity reqp = (RequestParameterEntity) bean;
+			fse = reqp.getFormData();
+		}
+		if (StringUtils.isEmpty(fse.getString("orgCode"))) {//寤惰繜鍔犺浇鏃讹紝鎸囧畾閮ㄩ棬
+			return this.OK_List(contanctOrgListService.orgList(fse));
+		} else {
+			return this.OK_List(contanctOrgListService.orgList(fse.getString("orgCode")));
+		}
+
+	}
 
 }

--
Gitblit v1.9.2