Przeglądaj źródła

字典和参数管理功能

git-svn-id: https://192.168.57.71/svn/jsgkj@834 931142cf-59ea-a443-aa0e-51397b428577
ld_zhouk 8 lat temu
rodzic
commit
5392bd547f
21 zmienionych plików z 299 dodań i 26 usunięć
  1. 2 1
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/ButtonModelMapper.java
  2. 24 0
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/CodeModelMapper.java
  3. 2 1
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/MenuModelMapper.java
  4. 0 2
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/OrgModelMapper.java
  5. 10 0
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/ParamModelMapper.java
  6. 3 3
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/model/ButtonModel.java
  7. 91 0
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/model/CodeModel.java
  8. 3 3
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/model/MenuModel.java
  9. 6 1
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/model/ParamModel.java
  10. 1 1
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/ButtonService.java
  11. 16 0
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/CodeService.java
  12. 2 2
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/MenuService.java
  13. 12 2
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/ParamService.java
  14. 3 3
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/impl/ButtonServiceImpl.java
  15. 32 0
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/impl/CodeServiceImpl.java
  16. 3 3
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/impl/MenuServiceImpl.java
  17. 8 2
      gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/impl/ParamServiceImpl.java
  18. 67 0
      gkaqv2/trunk/modules/frame/src/main/resources/com/xt/js/gkaq/frame/mappers/CodeModelMapper.xml
  19. 2 1
      gkaqv2/trunk/modules/frame/src/main/resources/com/xt/js/gkaq/frame/mappers/MenuModelMapper.xml
  20. 7 0
      gkaqv2/trunk/modules/frame/src/main/resources/com/xt/js/gkaq/frame/mappers/ParamModelMapper.xml
  21. 5 1
      gkaqv2/trunk/modules/frame/src/main/resources/generatorConfig.xml

+ 2 - 1
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/ButtonModelMapper.java

@@ -7,8 +7,9 @@ public interface ButtonModelMapper extends BaseMapper<ButtonModel> {
 
     /**
      * 根据菜单ID删除关联的按钮
+     * 
      * @param pid
      * @return
      */
-	int deleteByMenu(String menu);
+    int deleteByMenu(String menu);
 }

+ 24 - 0
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/CodeModelMapper.java

@@ -0,0 +1,24 @@
+package com.xt.js.gkaq.frame.mappers;
+
+import java.util.List;
+
+import com.xt.js.gkaq.common.BaseMapper;
+import com.xt.js.gkaq.frame.model.CodeModel;
+
+public interface CodeModelMapper extends BaseMapper<CodeModel> {
+
+    /**
+     * 查询初始化字典
+     * 
+     * @return
+     */
+    List<CodeModel> selectInitDict();
+
+    /**
+     * 根据父记录ID删除关联的子记录
+     * 
+     * @param pid
+     * @return
+     */
+    int deleteByPid(String pid);
+}

+ 2 - 1
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/MenuModelMapper.java

@@ -16,8 +16,9 @@ public interface MenuModelMapper extends BaseMapper<MenuModel> {
 
     /**
      * 몽앴만꽉데ID�뇜밑젬돨綾꽉데
+     * 
      * @param pid
      * @return
      */
-	int deleteByPid(String pid);
+    int deleteByPid(String pid);
 }

+ 0 - 2
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/OrgModelMapper.java

@@ -1,9 +1,7 @@
 package com.xt.js.gkaq.frame.mappers;
 
 import com.xt.js.gkaq.common.BaseMapper;
-import com.xt.js.gkaq.frame.model.GroupModel;
 import com.xt.js.gkaq.frame.model.OrgModel;
-import java.util.List;
 
 public interface OrgModelMapper extends BaseMapper<OrgModel> {
 }

+ 10 - 0
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/ParamModelMapper.java

@@ -1,7 +1,17 @@
 package com.xt.js.gkaq.frame.mappers;
 
+import java.util.List;
+
 import com.xt.js.gkaq.common.BaseMapper;
 import com.xt.js.gkaq.frame.model.ParamModel;
 
 public interface ParamModelMapper extends BaseMapper<ParamModel> {
+
+    /**
+     * ¸ù¾ÝÌõ¼þ²éѯÊý¾Ý¼¯ºÏ
+     * 
+     * @param model
+     * @return
+     */
+    List<ParamModel> selectAllByCond(ParamModel model);
 }

+ 3 - 3
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/model/ButtonModel.java

@@ -4,9 +4,9 @@ import com.xt.js.gkaq.common.BaseUUIDModel;
 
 public class ButtonModel extends BaseUUIDModel {
     /**
-	 * serialVersionUID
-	 */
-	private static final long serialVersionUID = -4829431105521798820L;
+     * serialVersionUID
+     */
+    private static final long serialVersionUID = -4829431105521798820L;
 
     private String name;
 

+ 91 - 0
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/model/CodeModel.java

@@ -0,0 +1,91 @@
+package com.xt.js.gkaq.frame.model;
+
+import com.xt.js.gkaq.common.BaseUUIDModel;
+
+public class CodeModel extends BaseUUIDModel {
+    /**
+     * serialVersionUID
+     */
+    private static final long serialVersionUID = -912038364468670574L;
+
+    private String pid;
+
+    private String pcode;
+
+    private String text;
+
+    private String code;
+
+    private String val;
+
+    private String leaf;
+
+    private Long sortno;
+
+    private String remark;
+
+    public String getPid() {
+        return pid;
+    }
+
+    public void setPid(String pid) {
+        this.pid = pid == null ? null : pid.trim();
+    }
+
+    public String getPcode() {
+        return pcode;
+    }
+
+    public void setPcode(String pcode) {
+        this.pcode = pcode == null ? null : pcode.trim();
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text == null ? null : text.trim();
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code == null ? null : code.trim();
+    }
+
+    public String getVal() {
+        return val;
+    }
+
+    public void setVal(String val) {
+        this.val = val == null ? null : val.trim();
+    }
+
+    public String getLeaf() {
+        return leaf;
+    }
+
+    public void setLeaf(String leaf) {
+        this.leaf = leaf == null ? null : leaf.trim();
+    }
+
+    public Long getSortno() {
+        return sortno;
+    }
+
+    public void setSortno(Long sortno) {
+        this.sortno = sortno;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark == null ? null : remark.trim();
+    }
+
+}

+ 3 - 3
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/model/MenuModel.java

@@ -4,9 +4,9 @@ import com.xt.js.gkaq.common.BaseUUIDModel;
 
 public class MenuModel extends BaseUUIDModel {
     /**
-	 * serialVersionUID
-	 */
-	private static final long serialVersionUID = -27198057540373269L;
+     * serialVersionUID
+     */
+    private static final long serialVersionUID = -27198057540373269L;
 
     private String pid;
 

+ 6 - 1
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/model/ParamModel.java

@@ -3,7 +3,12 @@ package com.xt.js.gkaq.frame.model;
 import com.xt.js.gkaq.common.BaseUUIDModel;
 
 public class ParamModel extends BaseUUIDModel {
-	private String key;
+	/**
+     * serialVersionUID
+     */
+    private static final long serialVersionUID = -4550167487381112158L;
+
+    private String key;
 
 	private String value;
 

+ 1 - 1
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/ButtonService.java

@@ -8,5 +8,5 @@ import com.xt.js.gkaq.frame.model.ButtonModel;
  */
 public interface ButtonService extends BaseUUIDModelService<ButtonModel> {
 
-	public int deleteByMenu(String menu);
+    public int deleteByMenu(String menu);
 }

+ 16 - 0
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/CodeService.java

@@ -0,0 +1,16 @@
+package com.xt.js.gkaq.frame.service;
+
+import java.util.List;
+
+import com.xt.js.gkaq.common.BaseUUIDModelService;
+import com.xt.js.gkaq.frame.model.CodeModel;
+
+/**
+ * ×Öµä·þÎñ½Ó¿Ú
+ */
+public interface CodeService extends BaseUUIDModelService<CodeModel> {
+
+    public List<CodeModel> selectInitDict();
+
+    public int deleteByPid(String pid);
+}

+ 2 - 2
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/MenuService.java

@@ -10,7 +10,7 @@ import com.xt.js.gkaq.frame.model.MenuModel;
  */
 public interface MenuService extends BaseUUIDModelService<MenuModel> {
 
-	public List<MenuModel> selectInitMenu();
+    public List<MenuModel> selectInitMenu();
 
-	public int deleteByPid(String pid);
+    public int deleteByPid(String pid);
 }

+ 12 - 2
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/ParamService.java

@@ -1,6 +1,8 @@
 package com.xt.js.gkaq.frame.service;
 
-import com.xt.js.gkaq.common.BaseService;
+import java.util.List;
+
+import com.xt.js.gkaq.common.BaseUUIDModelService;
 import com.xt.js.gkaq.frame.model.ParamModel;
 
 /**
@@ -9,5 +11,13 @@ import com.xt.js.gkaq.frame.model.ParamModel;
  * @author yuanxd
  *
  */
-public interface ParamService extends BaseService<ParamModel> {
+public interface ParamService extends BaseUUIDModelService<ParamModel> {
+
+    /**
+     * ¸ù¾ÝÌõ¼þ²éѯÊý¾Ý¼¯ºÏ
+     * 
+     * @param model
+     * @return
+     */
+    public List<ParamModel> selectAllByCond(ParamModel model);
 }

+ 3 - 3
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/impl/ButtonServiceImpl.java

@@ -19,8 +19,8 @@ public class ButtonServiceImpl extends BaseUUIDModelServiceImpl<ButtonModel> imp
         return mapper;
     }
 
-	public int deleteByMenu(String menu) {
-		return mapper.deleteByMenu(menu);
-	}
+    public int deleteByMenu(String menu) {
+        return mapper.deleteByMenu(menu);
+    }
 
 }

+ 32 - 0
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/impl/CodeServiceImpl.java

@@ -0,0 +1,32 @@
+package com.xt.js.gkaq.frame.service.impl;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.xt.js.gkaq.common.BaseMapper;
+import com.xt.js.gkaq.common.BaseUUIDModelServiceImpl;
+import com.xt.js.gkaq.frame.mappers.CodeModelMapper;
+import com.xt.js.gkaq.frame.model.CodeModel;
+import com.xt.js.gkaq.frame.service.CodeService;
+
+@Service
+public class CodeServiceImpl extends BaseUUIDModelServiceImpl<CodeModel> implements CodeService {
+    @Autowired
+    private CodeModelMapper mapper;
+
+    @Override
+    protected BaseMapper<CodeModel> getMapper() {
+        return mapper;
+    }
+
+    public List<CodeModel> selectInitDict() {
+        return mapper.selectInitDict();
+    }
+
+    public int deleteByPid(String pid) {
+        return mapper.deleteByPid(pid);
+    }
+
+}

+ 3 - 3
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/impl/MenuServiceImpl.java

@@ -25,8 +25,8 @@ public class MenuServiceImpl extends BaseUUIDModelServiceImpl<MenuModel> impleme
         return mapper.selectInitMenu();
     }
 
-	public int deleteByPid(String pid) {
-		return mapper.deleteByPid(pid);
-	}
+    public int deleteByPid(String pid) {
+        return mapper.deleteByPid(pid);
+    }
 
 }

+ 8 - 2
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/service/impl/ParamServiceImpl.java

@@ -1,16 +1,18 @@
 package com.xt.js.gkaq.frame.service.impl;
 
+import java.util.List;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.xt.js.gkaq.common.BaseMapper;
-import com.xt.js.gkaq.common.BaseServiceImpl;
+import com.xt.js.gkaq.common.BaseUUIDModelServiceImpl;
 import com.xt.js.gkaq.frame.mappers.ParamModelMapper;
 import com.xt.js.gkaq.frame.model.ParamModel;
 import com.xt.js.gkaq.frame.service.ParamService;
 
 @Service
-public class ParamServiceImpl extends BaseServiceImpl<ParamModel> implements ParamService {
+public class ParamServiceImpl extends BaseUUIDModelServiceImpl<ParamModel> implements ParamService {
 	@Autowired
 	private ParamModelMapper mapper;
 
@@ -18,4 +20,8 @@ public class ParamServiceImpl extends BaseServiceImpl<ParamModel> implements Par
 	protected BaseMapper<ParamModel> getMapper() {
 		return mapper;
 	}
+
+    public List<ParamModel> selectAllByCond(ParamModel model) {
+        return mapper.selectAllByCond(model);
+    }
 }

+ 67 - 0
gkaqv2/trunk/modules/frame/src/main/resources/com/xt/js/gkaq/frame/mappers/CodeModelMapper.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.xt.js.gkaq.frame.mappers.CodeModelMapper" >
+  <resultMap id="BaseResultMap" type="com.xt.js.gkaq.frame.model.CodeModel" >
+    <id column="ID" property="id" jdbcType="VARCHAR" />
+    <result column="PID" property="pid" jdbcType="VARCHAR" />
+    <result column="PCODE" property="pcode" jdbcType="VARCHAR" />
+    <result column="TEXT" property="text" jdbcType="VARCHAR" />
+    <result column="CODE" property="code" jdbcType="VARCHAR" />
+    <result column="VAL" property="val" jdbcType="VARCHAR" />
+    <result column="LEAF" property="leaf" jdbcType="CHAR" />
+    <result column="SORTNO" property="sortno" jdbcType="DECIMAL" />
+    <result column="REMARK" property="remark" jdbcType="VARCHAR" />
+    <result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="UPDATE_TIME" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="STATE" property="state" jdbcType="CHAR" />
+  </resultMap>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from AQ_BASIC_FRAME_CODE
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.xt.js.gkaq.frame.model.CodeModel" >
+    insert into AQ_BASIC_FRAME_CODE (ID, PID, PCODE, 
+      TEXT, CODE, VAL, LEAF, 
+      SORTNO, REMARK, CREATE_TIME, 
+      UPDATE_TIME, STATE)
+    values (#{id,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{pcode,jdbcType=VARCHAR}, 
+      #{text,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{val,jdbcType=VARCHAR}, #{leaf,jdbcType=CHAR}, 
+      #{sortno,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{state,jdbcType=CHAR})
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.frame.model.CodeModel" >
+    update AQ_BASIC_FRAME_CODE
+    set PID = #{pid,jdbcType=VARCHAR},
+      PCODE = #{pcode,jdbcType=VARCHAR},
+      TEXT = #{text,jdbcType=VARCHAR},
+      CODE = #{code,jdbcType=VARCHAR},
+      VAL = #{val,jdbcType=VARCHAR},
+      LEAF = #{leaf,jdbcType=CHAR},
+      SORTNO = #{sortno,jdbcType=DECIMAL},
+      REMARK = #{remark,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      STATE = #{state,jdbcType=CHAR}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select ID, PID, PCODE, TEXT, CODE, VAL, LEAF, SORTNO, REMARK, CREATE_TIME, UPDATE_TIME, 
+    STATE
+    from AQ_BASIC_FRAME_CODE
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectAll" resultMap="BaseResultMap" >
+    select ID, PID, PCODE, TEXT, CODE, VAL, LEAF, SORTNO, REMARK, CREATE_TIME, UPDATE_TIME, 
+    STATE
+    from AQ_BASIC_FRAME_CODE
+  </select>
+  <select id="selectInitDict" resultMap="BaseResultMap" >
+    select ID, PID, TEXT, CODE, LEAF, SORTNO
+    from AQ_BASIC_FRAME_CODE
+    order by SORTNO
+  </select>
+  <delete id="deleteByPid" parameterType="java.lang.String" >
+    delete from AQ_BASIC_FRAME_CODE
+    where PID = #{pid,jdbcType=VARCHAR}
+  </delete>
+</mapper>

+ 2 - 1
gkaqv2/trunk/modules/frame/src/main/resources/com/xt/js/gkaq/frame/mappers/MenuModelMapper.xml

@@ -68,7 +68,8 @@
     from AQ_BASIC_FRAME_MENU
     union all
     select ID, MENU PID, NAME, CODE, 'B' LEAF, SORTNO
-    from AQ_BASIC_FRAME_BUTTON order by SORTNO
+    from AQ_BASIC_FRAME_BUTTON
+    order by SORTNO
   </select>
   <delete id="deleteByPid" parameterType="java.lang.String" >
     delete from AQ_BASIC_FRAME_MENU

+ 7 - 0
gkaqv2/trunk/modules/frame/src/main/resources/com/xt/js/gkaq/frame/mappers/ParamModelMapper.xml

@@ -47,4 +47,11 @@
     select ID, KEY, VALUE, CLAZZ, DISP, STATE, CREATE_TIME, UPDATE_TIME,CREATE_USER,UPDATE_USER
     from AQ_BASIC_FRAME_PARAM
   </select>
+  <select id="selectAllByCond" resultMap="BaseResultMap" parameterType="com.xt.js.gkaq.frame.model.ParamModel" >
+    select ID, KEY, VALUE, CLAZZ, DISP
+    from AQ_BASIC_FRAME_PARAM
+    <if test="key != null and key != ''">
+        where KEY = #{key,jdbcType=VARCHAR}
+    </if>
+  </select>
 </mapper>

+ 5 - 1
gkaqv2/trunk/modules/frame/src/main/resources/generatorConfig.xml

@@ -50,10 +50,14 @@
 			<columnOverride column="CREATE_TIME" jdbcType="TIMESTAMP"/>  
 			<columnOverride column="UPDATE_TIME" jdbcType="TIMESTAMP"/>  
 		</table>
-		  -->
 		<table tableName="AQ_BASIC_FRAME_BUTTON" domainObjectName="ButtonModel">
 			<columnOverride column="CREATE_TIME" jdbcType="TIMESTAMP"/>  
 			<columnOverride column="UPDATE_TIME" jdbcType="TIMESTAMP"/>  
 		</table>
+		  -->
+		<table tableName="AQ_BASIC_FRAME_CODE" domainObjectName="CodeModel">
+			<columnOverride column="CREATE_TIME" jdbcType="TIMESTAMP"/>  
+			<columnOverride column="UPDATE_TIME" jdbcType="TIMESTAMP"/>  
+		</table>
 	</context>
 </generatorConfiguration>