|
@@ -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>
|
|
|
|