Commit 9f059b5a authored by chenzhao's avatar chenzhao

任务 3374 添加GIS地图配置 查看 前端表示getFormValue方法返回值为名称无法回显 要求返回值重新改为code值

parent 6393d661
...@@ -8,6 +8,7 @@ import java.util.List; ...@@ -8,6 +8,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.biz.common.dto.DataDictionaryDto;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -111,6 +112,21 @@ public class DataDictionaryController extends BaseController { ...@@ -111,6 +112,21 @@ public class DataDictionaryController extends BaseController {
return iDataDictionaryService.getById(id); return iDataDictionaryService.getById(id);
} }
/**
* 根据id查询
*
* @param code
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/code", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据code查询", notes = "根据code查询")
public DataDictionary selectByCode(HttpServletRequest request,@RequestParam("code") String code) {
return iDataDictionaryService.getByCode(code);
}
/** /**
* 列表分页查询 * 列表分页查询
* *
...@@ -283,4 +299,6 @@ public class DataDictionaryController extends BaseController { ...@@ -283,4 +299,6 @@ public class DataDictionaryController extends BaseController {
return ResponseHelper.buildResponse(menuList); return ResponseHelper.buildResponse(menuList);
} }
} }
...@@ -22,4 +22,10 @@ public interface DataDictionaryMapper extends BaseMapper<DataDictionary> { ...@@ -22,4 +22,10 @@ public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
* @return * @return
*/ */
public List<DataDictionary> getNoInLinkUnit(); public List<DataDictionary> getNoInLinkUnit();
/**
* 根据code值查询
* @return
*/
public DataDictionary getByCode(String code);
} }
...@@ -47,4 +47,14 @@ WHERE ...@@ -47,4 +47,14 @@ WHERE
cbb.type = 'YJLDDW' and cbb.is_delete = 0 cbb.type = 'YJLDDW' and cbb.is_delete = 0
AND elink.count IS NOT NULL AND elink.count IS NOT NULL
</select> </select>
<select id ="getByCode" resultType="com.yeejoin.amos.boot.biz.common.entity.DataDictionary">
SELECT
*
FROM
cb_data_dictionary cbb
WHERE
cbb.code = #{code} and cbb.is_delete = 0
</select>
</mapper> </mapper>
...@@ -361,22 +361,25 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -361,22 +361,25 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override @Override
public List<FormValue> getFormValue(Long id) throws Exception { public List<FormValue> getFormValue(Long id) throws Exception {
// 动态表单数据 // 动态表单数据
/*BUG2580 返回值为code值 修改为类型名称 2021-08-31 陈召 开始 */
List<DynamicFormInstanceDto> list = alertFormValueServiceImpl.listByCalledId(id); List<DynamicFormInstanceDto> list = alertFormValueServiceImpl.listByCalledId(id);
List<FormValue> formValue = new ArrayList<>(); List<FormValue> formValue = new ArrayList<>();
for (DynamicFormInstanceDto alertFormValue : list) { for (DynamicFormInstanceDto alertFormValue : list) {
if (alertFormValue.getFieldValueLabel() != null) { /*BUG2580 返回值为code值 修改为类型名称 2021-08-31 陈召 开始 */
if (alertFormValue.getFieldValue() != null) {
/* 2021 09-08 前端表示getFieldValueLabel无法回显 要求返回值重新改为code值 改动代码 369 377*/
/*BUG2580 返回值为code值 修改为类型名称 2021-08-31 陈召 结束 */
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(),
alertFormValue.getFieldType(), alertFormValue.getFieldValueLabel(), alertFormValue.getBlock()); alertFormValue.getFieldType(), alertFormValue.getFieldValue(), alertFormValue.getBlock());
formValue.add(value); formValue.add(value);
} else { } else {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(),
alertFormValue.getFieldType(), alertFormValue.getFieldValue(), alertFormValue.getBlock()); alertFormValue.getFieldType(), alertFormValue.getFieldValueLabel(), alertFormValue.getBlock());
formValue.add(value); formValue.add(value);
} }
} }
return formValue; return formValue;
/*BUG2580 返回值为code值 修改为类型名称 2021-08-31 陈召 结束 */
} }
public List<FormValue> getFormValueDetail(Long id) throws Exception { public List<FormValue> getFormValueDetail(Long id) throws Exception {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment