Browse Source

1、开方页面使用配方:根据选择的药房搜索配方
2、配方颗粒开方时无需判断明细库存

guowei 2 years ago
parent
commit
fb62a3336c

BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/beans/formula/TFormula.java


BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/beans/formula/TFormulaAuth.java


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


BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/service/formula/center/TFormulaInterface.java


BIN
cbkj_web_api/src/main/java/com/jiuzhekan/cbkj/service/myData/TPersonalPrescriptionService.java


+ 4 - 55
cbkj_web_api/src/main/resources/mappers/formula/TFormulaAuthMapper.xml

@@ -8,6 +8,7 @@
         <result column="APP_ID" jdbcType="VARCHAR" property="appId" />
         <result column="INS_CODE" jdbcType="VARCHAR" property="insCode" />
         <result column="DEPT_ID" jdbcType="VARCHAR" property="deptId" />
+        <result column="STORE_ID" jdbcType="VARCHAR" property="storeId" />
         <result column="PRE_STOCK" jdbcType="INTEGER" property="preStock" />
         <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
         <result column="CREATE_USER" jdbcType="VARCHAR" property="createUser" />
@@ -15,66 +16,14 @@
 
 
     <sql id="Base_Column_List">
-        AUTH_ID,FORMULA_ID,APP_ID,INS_CODE,DEPT_ID,PRE_STOCK,CREATE_DATE,CREATE_USER
+        AUTH_ID,FORMULA_ID,APP_ID,INS_CODE,DEPT_ID,STORE_ID,PRE_STOCK,CREATE_DATE,CREATE_USER
     </sql>
 
-    <delete id="deleteByPrimaryKey" parameterType="TFormulaAuth">
-        delete from t_formula_auth where AUTH_ID = #{ authId }
-    </delete>
-
-    <delete id="deleteBylist" parameterType="ArrayList">
-        delete from t_formula_auth where AUTH_ID in
-        <foreach collection="array" item="item" open="(" separator="," close=")">
-        #{item}
-        </foreach>
-    </delete>
-
-    <insert id="insert"  parameterType="TFormulaAuth">
-        insert into t_formula_auth (FORMULA_ID,APP_ID,INS_CODE,DEPT_ID,PRE_STOCK,CREATE_DATE,CREATE_USER) values
-        (#{formulaId},#{appId},#{insCode},#{deptId},#{preStock},#{createDate},#{createUser})
-    </insert>
-
-    <insert id="insertList" parameterType="List">
-        insert into t_formula_auth (FORMULA_ID,APP_ID,INS_CODE,DEPT_ID,PRE_STOCK,CREATE_DATE,CREATE_USER) values
-        <foreach collection="list" item="item" index="index" separator="," >
-            (#{item.formulaId},#{item.appId},#{item.insCode},#{item.deptId},#{item.preStock},#{item.createDate},#{item.createUser})
-        </foreach>
-    </insert>
-
-    <update id="updateByPrimaryKey" parameterType="TFormulaAuth">
-        update t_formula_auth
-        <set>
-             <if test="formulaId != null">
-                FORMULA_ID = #{ formulaId },
-             </if>
-             <if test="appId != null">
-                APP_ID = #{ appId },
-             </if>
-             <if test="insCode != null">
-                INS_CODE = #{ insCode },
-             </if>
-             <if test="deptId != null">
-                DEPT_ID = #{ deptId },
-             </if>
-            <if test="preStock != null">
-                PRE_STOCK = #{ preStock },
-            </if>
-        </set>
-        where AUTH_ID = #{ authId }
-    </update>
-
     <select id="getObjectById" resultMap="BaseResultMap" parameterType="String">
         select <include refid="Base_Column_List" />
         from t_formula_auth where AUTH_ID = #{id}
     </select>
 
-    <select id="getPageListByObj" parameterType="TFormulaAuth" resultMap="BaseResultMap">
-        SELECT AUTH_ID,FORMULA_ID,APP_ID,INS_CODE,DEPT_ID,PRE_STOCK
-        from t_formula_auth
-        <where>
-        </where>
-    </select>
-
     <delete id="deleteByFormulaIds" parameterType="list">
         delete from t_formula_auth where FORMULA_ID in
         <foreach collection="list" item="item" separator="," open="(" close=")">
@@ -91,9 +40,9 @@
         )
     </delete>
     <insert id="insertListByCenterFormulaStocks" parameterType="List">
-        insert into t_formula_auth (FORMULA_ID,APP_ID,INS_CODE,PRE_STOCK,CREATE_DATE,CREATE_USER) values
+        insert into t_formula_auth (FORMULA_ID,APP_ID,INS_CODE,STORE_ID,PRE_STOCK,CREATE_DATE,CREATE_USER) values
         <foreach collection="list" item="item" index="index" separator="," >
-            (IFNULL((SELECT FORMULA_ID FROM t_formula WHERE STORE_PRICE_ID = #{item.gaofangid}),''), #{item.APPID}, #{item.INSID}, #{item.KUCUNSL}, now(), 'system')
+            (IFNULL((SELECT FORMULA_ID FROM t_formula WHERE STORE_PRICE_ID = #{item.gaofangid}),''), #{item.APPID}, #{item.INSID}, #{item.YINGYONGID}, #{item.KUCUNSL}, now(), 'system')
         </foreach>
     </insert>
 

+ 3 - 0
cbkj_web_api/src/main/resources/mappers/formula/TFormulaMapper.xml

@@ -313,6 +313,9 @@
 <!--            <if test=" deptId != null and deptId!='' ">-->
 <!--                and a.DEPT_ID = #{deptId}-->
 <!--            </if>-->
+            <if test=" storeId != null and storeId!='' ">
+                and a.STORE_ID = #{storeId}
+            </if>
             <if test=" formulaId != null and formulaId!='' ">
                 and a.FORMULA_ID = #{formulaId}
             </if>