yuansh 2 سال پیش
والد
کامیت
698ddc7956

+ 15 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDictController.java

@@ -539,6 +539,21 @@ public class SysDictController {
 
 	}
 
+	/**
+	 *
+	 */
+	@RequestMapping(value = "/selectDictByJiMuPrint", method = RequestMethod.GET)
+	public DictModel selectDictByJiMuPrint(String tableName){
+
+		try {
+			DictModel sysdict= sysDictService.selectDictByJiMuPrint(tableName);
+			return sysdict;
+		}catch (Exception e){
+			return null;
+		}
+
+	}
+
 
 	/**
 	 * 获取字典数据

+ 2 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java

@@ -40,6 +40,8 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
 
 	public String queryTableDictTextByKey(@Param("table") String table,@Param("text") String text,@Param("code") String code,@Param("key") String key);
 
+	public DictModel selectDictByJiMuPrint(@Param("tableName") String tableName);
+
 	public List<DictModel> queryTableDictByKeys(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("keyArray") String[] keyArray);
 
 	/**

+ 5 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysDictMapper.xml

@@ -35,6 +35,11 @@
 		   select ${text} as "text" from ${table} where ${code}= #{key}
 	</select>
 
+	<select id="selectDictByJiMuPrint" parameterType="String" resultType="org.jeecg.common.system.vo.DictModel">
+		select item_value as "text",description as "value"  from sys_dict_item where dict_id in(select id from sys_dict where dict_code='jimu_print')
+		and item_text=#{tableName}
+	</select>
+	
 	<!--通过查询指定table的 text code key 获取字典值,包含value-->
 	<select id="queryTableDictByKeys" parameterType="String" resultType="org.jeecg.common.system.vo.DictModel">
 		select ${text} as "text", ${code} as "value" from ${table} where ${code} in

+ 2 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysDictService.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.system.service;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ibatis.annotations.Param;
 import org.jeecg.common.system.vo.DictModel;
 import org.jeecg.modules.system.entity.SysDict;
 import com.baomidou.mybatisplus.extension.service.IService;
@@ -31,6 +32,7 @@ public interface ISysDictService extends IService<SysDict> {
 
 	List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray);
 
+	public DictModel selectDictByJiMuPrint(String tableName);
     /**
      * 根据字典类型删除关联表中其对应的数据
      *

+ 11 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDictServiceImpl.java

@@ -40,6 +40,17 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
     @Autowired
     private SysDictItemMapper sysDictItemMapper;
 
+
+	/**
+	 * tableName
+	 * @param tableName
+	 * @return
+	 */
+	@Override
+	public DictModel selectDictByJiMuPrint(String tableName) {
+		return sysDictMapper.selectDictByJiMuPrint(tableName);
+	}
+
 	/**
 	 * 通过查询指定code 获取字典
 	 * @param code