Explorar el Código

1.增加参数分类管理及参数编号

zjh hace 2 años
padre
commit
1bdbe8b414

BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/beans/business/TSysParam.java


BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/beans/business/sysParam/TSysParamVO.java


BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/controller/business/TSysParamController.java


BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/mapper/business/TSysParamMapper.java


BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/service/business/TSysParamService.java


BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/service/business/doctor/TDoctorCollectService.java


+ 34 - 9
cbkj_web_api/src/main/resources/mappers/business/TSysParamMapper.xml

@@ -22,10 +22,13 @@
         <result column="DEL_USERNAME" jdbcType="VARCHAR" property="delUsername" />
         <result column="IS_DEL" jdbcType="VARCHAR" property="isDel" />
         <result column="SEQN" jdbcType="INTEGER" property="seqn" />
+        <result column="PAR_CLASSIFY" jdbcType="VARCHAR" property="parClassify" />
+        <result column="PAR_NUMBER" jdbcType="VARCHAR" property="parNumber" />
     </resultMap>
 
     <sql id="Base_Column_List">
-    PAR_ID,APP_ID,INS_CODE,DEPT_ID,PAR_CODE,PAR_NAME,PAR_VALUES,PAR_DES,CREATE_DATE,CREATE_USER,CREATE_USERNAME,UPDATE_DATE,UPDATE_USER,UPDATE_USERNAME,DEL_DATE,DEL_USER,DEL_USERNAME,IS_DEL,SEQN
+    PAR_ID,APP_ID,INS_CODE,DEPT_ID,PAR_CODE,PAR_NAME,PAR_VALUES,PAR_DES,CREATE_DATE,CREATE_USER,CREATE_USERNAME,UPDATE_DATE,UPDATE_USER,UPDATE_USERNAME,
+DEL_DATE,DEL_USER,DEL_USERNAME,IS_DEL,SEQN,PAR_CLASSIFY,PAR_NUMBER
     </sql>
 
     <delete id="deleteByCondition" parameterType="TSysParam">
@@ -34,15 +37,19 @@
 
     <!--单个插入-->
     <insert id="insert"  parameterType="TSysParam">
-        insert into t_sys_param (PAR_ID,APP_ID,INS_CODE,DEPT_ID,PAR_CODE,PAR_NAME,PAR_VALUES,PAR_DES,CREATE_DATE,CREATE_USER,CREATE_USERNAME,SEQN) values
-        (#{parId},#{appId},#{insCode},#{deptId},#{parCode},#{parName},#{parValues},#{parDes},#{createDate},#{createUser},#{createUsername},#{seqn})
+        insert into t_sys_param (PAR_ID,APP_ID,INS_CODE,DEPT_ID,PAR_CODE,PAR_NAME,
+                                 PAR_VALUES,PAR_DES,CREATE_DATE,CREATE_USER,CREATE_USERNAME,SEQN,PAR_CLASSIFY,PAR_NUMBER) values
+        (#{parId},#{appId},#{insCode},#{deptId},#{parCode},#{parName},
+         #{parValues},#{parDes},#{createDate},#{createUser},#{createUsername},#{seqn},#{parClassify},#{parNumber})
     </insert>
 
     <!--批量插入-->
     <insert id="insertList" parameterType="List">
-        insert into t_sys_param (PAR_ID,APP_ID,INS_CODE,DEPT_ID,PAR_CODE,PAR_NAME,PAR_VALUES,PAR_DES,CREATE_DATE,CREATE_USER,CREATE_USERNAME,SEQN) values
+        insert into t_sys_param (PAR_ID,APP_ID,INS_CODE,DEPT_ID,PAR_CODE,PAR_NAME,PAR_VALUES,PAR_DES,
+                                 CREATE_DATE,CREATE_USER,CREATE_USERNAME,SEQN,PAR_CLASSIFY,PAR_NUMBER) values
         <foreach collection="list" item="item" index="index" separator="," >
-            (#{ item.parId },#{item.appId},#{item.insCode},#{item.deptId},#{item.parCode},#{item.parName},#{item.parValues},#{item.parDes},#{item.createDate},#{item.createUser},#{item.createUsername},#{item.seqn})
+            (#{ item.parId },#{item.appId},#{item.insCode},#{item.deptId},#{item.parCode},#{item.parName},#{item.parValues},#{item.parDes},
+             #{item.createDate},#{item.createUser},#{item.createUsername},#{item.seqn},#{item.parClassify},#{item.parNumber})
         </foreach>
     </insert>
 
@@ -100,6 +107,12 @@
             <if test="isDel != null">
                 IS_DEL = #{ isDel },
             </if>
+            <if test="parClassify != null">
+                PAR_CLASSIFY = #{parClassify},
+            </if>
+            <if test="parNumber != null">
+                PAR_NUMBER = #{parNumber},
+            </if>
         </set>
         where PAR_ID = #{ parId }
     </update>
@@ -123,7 +136,7 @@
     <!--分页查询基础语句返回对象-->
     <select id="getPageListByObj" parameterType="TSysParam" resultMap="BaseResultMap">
         SELECT p.PAR_ID,p.APP_ID,p.INS_CODE,p.DEPT_ID,p.PAR_CODE,p.PAR_NAME,p.PAR_VALUES,p.PAR_DES,p.CREATE_DATE,p.CREATE_USER,p.CREATE_USERNAME,
-        DATE_FORMAT(p.UPDATE_DATE,'%Y-%m-%d %H:%i:%s') UPDATE_DATE,p.UPDATE_USER,p.UPDATE_USERNAME,p.SEQN,
+        DATE_FORMAT(p.UPDATE_DATE,'%Y-%m-%d %H:%i:%s') UPDATE_DATE,p.UPDATE_USER,p.UPDATE_USERNAME,p.SEQN,p.PAR_CLASSIFY,p.PAR_NUMBER,
         i.INS_NAME as insName,
         a.app_name as appName
         from t_sys_param p
@@ -145,14 +158,20 @@
         <if test="parCode != null and parCode!='' ">
             and p.PAR_CODE = #{parCode}
         </if>
+        <if test="parClassify != null and parClassify!='' ">
+            and p.PAR_CLASSIFY = #{parClassify}
+        </if>
+        <if test="parNumber != null and parNumber!='' ">
+            and p.PAR_NUMBER = #{parNumber}
+        </if>
         GROUP BY p.PAR_CODE
-        ORDER BY p.PAR_CODE, p.SEQN
+        ORDER BY p.PAR_NUMBER,p.PAR_CODE, p.SEQN
     </select>
 
 
     <!--分页查询基础语句返回对象-->
     <select id="getListByCode" parameterType="TSysParam" resultMap="BaseResultMap">
-        SELECT p.PAR_ID,p.APP_ID,p.INS_CODE,p.DEPT_ID,p.PAR_CODE,p.PAR_NAME,p.PAR_VALUES,p.PAR_DES,p.SEQN,
+        SELECT p.PAR_ID,p.APP_ID,p.INS_CODE,p.DEPT_ID,p.PAR_CODE,p.PAR_NAME,p.PAR_VALUES,p.PAR_DES,p.SEQN,p.PAR_CLASSIFY,p.PAR_NUMBER,
             i.INS_NAME as insName, a.app_name as appName
         from t_sys_param p
         left join sys_institution i on i.INS_CODE = p.INS_CODE and p.APP_ID = i.APP_ID
@@ -170,7 +189,7 @@
         <if test="parCode != null and parCode!='' ">
             and p.PAR_CODE = #{parCode}
         </if>
-        order by p.PAR_CODE, p.SEQN
+        order by p.PAR_NUMBER,p.PAR_CODE, p.SEQN
     </select>
 
     <select id="getObjectByAppIdInsCodeAndCode" resultMap="BaseResultMap" parameterType="TSysParam">
@@ -196,4 +215,10 @@
         from t_sys_param where IS_DEL='0'
         group by PAR_CODE
     </select>
+    <select id="getAllParamClassifyList" resultType="java.util.Map">
+        select
+            PAR_NUMBER as parNumber
+        from t_sys_param where IS_DEL = '0'
+        GROUP BY PAR_NUMBER
+    </select>
 </mapper>

+ 4 - 0
cbkj_web_api/src/main/resources/sqlRecord/pre_api_v5.12.6.sql

@@ -1,4 +1,8 @@
 -- 2022-01-14 zjh CONNECT_ID字段长度改为65,因为临床诊疗指南需要
 ALTER TABLE t_doctor_collect`
     CHANGE `CONNECT_ID` `CONNECT_ID` VARCHAR (65) CHARSET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关联id:例如 药品id,方剂id';
+-- 2022-01-14 zjh 增加两个字段:参数分类、参数编号
+ALTER TABLE `t_sys_param` ADD COLUMN `PAR_CLASSIFY` VARCHAR (256) NULL COMMENT '参数分类' AFTER `SEQN`,ADD COLUMN `PAR_NUMBER` VARCHAR (256) NULL COMMENT '参数编号' AFTER `PAR_CLASSIFY`;
+
+