丽知:修改查询内部转移价的sql,调拨

This commit is contained in:
zhengyf 2025-02-14 08:34:28 +08:00
parent 748b12b405
commit 0c6174b7f4
1 changed files with 11 additions and 11 deletions

View File

@ -43,7 +43,7 @@
<!-- 查询的字段-->
<sql id = "IaMonthledgerEntity_Base_Column_List">
BTRYFLAG
,CACCOUNTMONTH
,CACCOUNTMONTH
,CACCOUNTYEAR
,CINVENTORYID
,CMONTHLEDGERID
@ -77,14 +77,14 @@
,VFREE6
,VFREE7
,VFREE8
,VFREE9
,VFREE9
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-IaMonthledgerEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity">
select
<include refid="IaMonthledgerEntity_Base_Column_List" />
from IA_MONTHLEDGER
<trim prefix="where" prefixOverrides="and">
<trim prefix="where" prefixOverrides="and">
<if test="btryflag != null and btryflag != ''"> and BTRYFLAG = #{btryflag} </if>
<if test="caccountmonth != null and caccountmonth != ''"> and CACCOUNTMONTH = #{caccountmonth} </if>
<if test="caccountyear != null and caccountyear != ''"> and CACCOUNTYEAR = #{caccountyear} </if>
@ -124,11 +124,11 @@
ORDER BY TS DESC
</trim>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity">
select count(1) from IA_MONTHLEDGER
<trim prefix="where" prefixOverrides="and">
<trim prefix="where" prefixOverrides="and">
<if test="btryflag != null and btryflag != ''"> and BTRYFLAG = #{btryflag} </if>
<if test="caccountmonth != null and caccountmonth != ''"> and CACCOUNTMONTH = #{caccountmonth} </if>
<if test="caccountyear != null and caccountyear != ''"> and CACCOUNTYEAR = #{caccountyear} </if>
@ -176,7 +176,7 @@
select
<include refid="IaMonthledgerEntity_Base_Column_List" />
from IA_MONTHLEDGER
<trim prefix="where" prefixOverrides="and">
<trim prefix="where" prefixOverrides="and">
<if test="btryflag != null and btryflag != ''"> and BTRYFLAG like concat('%',#{btryflag},'%') </if>
<if test="caccountmonth != null and caccountmonth != ''"> and CACCOUNTMONTH like concat('%',#{caccountmonth},'%') </if>
<if test="caccountyear != null and caccountyear != ''"> and CACCOUNTYEAR like concat('%',#{caccountyear},'%') </if>
@ -224,7 +224,7 @@
select
<include refid="IaMonthledgerEntity_Base_Column_List" />
from IA_MONTHLEDGER
<trim prefix="where" prefixOverrides="and">
<trim prefix="where" prefixOverrides="and">
<if test="btryflag != null and btryflag != ''"> or BTRYFLAG = #{btryflag} </if>
<if test="caccountmonth != null and caccountmonth != ''"> or CACCOUNTMONTH = #{caccountmonth} </if>
<if test="caccountyear != null and caccountyear != ''"> or CACCOUNTYEAR = #{caccountyear} </if>
@ -351,11 +351,11 @@
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from IA_MONTHLEDGER a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="cmonthledgerid" useGeneratedKeys="true">
insert into IA_MONTHLEDGER(BTRYFLAG, CACCOUNTMONTH, CACCOUNTYEAR, CINVENTORYID, CRDCENTERID, CVENDORID, DR, FPRICEMODEFLAG, FRECORDTYPEFLAG, NABMNY, NABNUM, NABPRICE, NABVARYMNY, NINMNY, NINNUM, NINVARYMNY, NMONTHPRICE, NOUTMNY, NOUTNUM, NOUTVARYMNY, NPLANEDPRICE, NVARIANCERATE, PK_CORP, TS, VBATCH, VFREE1, VFREE10, VFREE2, VFREE3, VFREE4, VFREE5, VFREE6, VFREE7, VFREE8, VFREE9, sts)
insert into IA_MONTHLEDGER(BTRYFLAG, CACCOUNTMONTH, CACCOUNTYEAR, CINVENTORYID, CRDCENTERID, CVENDORID, DR, FPRICEMODEFLAG, FRECORDTYPEFLAG, NABMNY, NABNUM, NABPRICE, NABVARYMNY, NINMNY, NINNUM, NINVARYMNY, NMONTHPRICE, NOUTMNY, NOUTNUM, NOUTVARYMNY, NPLANEDPRICE, NVARIANCERATE, PK_CORP, TS, VBATCH, VFREE1, VFREE10, VFREE2, VFREE3, VFREE4, VFREE5, VFREE6, VFREE7, VFREE8, VFREE9, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.btryflag},#{entity.caccountmonth},#{entity.caccountyear},#{entity.cinventoryid},#{entity.crdcenterid},#{entity.cvendorid},#{entity.dr},#{entity.fpricemodeflag},#{entity.frecordtypeflag},#{entity.nabmny},#{entity.nabnum},#{entity.nabprice},#{entity.nabvarymny},#{entity.ninmny},#{entity.ninnum},#{entity.ninvarymny},#{entity.nmonthprice},#{entity.noutmny},#{entity.noutnum},#{entity.noutvarymny},#{entity.nplanedprice},#{entity.nvariancerate},#{entity.pkCorp},#{entity.ts},#{entity.vbatch},#{entity.vfree1},#{entity.vfree10},#{entity.vfree2},#{entity.vfree3},#{entity.vfree4},#{entity.vfree5},#{entity.vfree6},#{entity.vfree7},#{entity.vfree8},#{entity.vfree9}, 'Y')
@ -454,7 +454,7 @@ where CMONTHLEDGERID = #{cmonthledgerid}
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.IaMonthledgerEntity" >
update IA_MONTHLEDGER set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<trim prefix="where" prefixOverrides="and">
<if test="btryflag != null and btryflag != ''"> and BTRYFLAG = #{btryflag} </if>
<if test="caccountmonth != null and caccountmonth != ''"> and CACCOUNTMONTH = #{caccountmonth} </if>
<if test="caccountyear != null and caccountyear != ''"> and CACCOUNTYEAR = #{caccountyear} </if>
@ -500,7 +500,7 @@ update IA_MONTHLEDGER set sts= 'N' ,modify_time = #{modify_time},modify_user_id
</delete>
<select id="queryNbzyjByPkInvmandoc" parameterType="String" resultType="String">
SELECT nbzyj FROM bd_produce WHERE dr=0 AND pk_invbasdoc=#{pkInvmandoc}
SELECT nbzyj FROM bd_produce WHERE dr=0 AND pk_invmandoc = #{pkInvmandoc}
</select>
</mapper>