修改会计科目的单位

This commit is contained in:
lvleigang 2024-10-11 15:02:50 +08:00
parent a242a89fc2
commit 060d5ca3ef
1 changed files with 21 additions and 20 deletions

View File

@ -234,26 +234,26 @@
<!-- 分页查询列表 采用like格式 -->
<select id="queryData" resultMap="get-DictAcctSubjEntityVo-result" parameterType = "com.hzya.frame.xsFinance.dictAcctSubj.entity.DictAcctSubjEntity">
select
kjnd as acct_year, -- 年度
kmdm as acct_subj_code, -- 会计科目编码
kmmc as acct_subj_name, -- 会计科目名称
convert(varchar(200),(case when LEN(kmdm) = 4 THEN kmdm else left(kmdm,len(kmdm)-2)end )) as supper_code, -- 上级编码
CASE WHEN LEN(kmdm) = 4 THEN 1 else LEN(kmdm)/2-1 end as subj_level, -- 科目级次
kmmx as is_last, -- 是否末级
isnull(kmqx,3) as subj_type_code, -- 科目类型编码
kmxx.kjnd as acct_year, -- 年度
kmxx.kmdm as acct_subj_code, -- 会计科目编码
kmxx.kmmc as acct_subj_name, -- 会计科目名称
convert(varchar(200),(case when LEN(kmxx.kmdm) = 4 THEN kmxx.kmdm else left(kmxx.kmdm,len(kmxx.kmdm)-2)end )) as supper_code, -- 上级编码
CASE WHEN LEN(kmxx.kmdm) = 4 THEN 1 else LEN(kmxx.kmdm)/2-1 end as subj_level, -- 科目级次
kmxx.kmmx as is_last, -- 是否末级
isnull(kmxx.kmqx,3) as subj_type_code, -- 科目类型编码
CASE
WHEN kmqx = '1' THEN
WHEN kmxx.kmqx = '1' THEN
'收入类'
WHEN kmqx = '2' THEN
WHEN kmxx.kmqx = '2' THEN
'支出类'
ELSE
'未定义类'
END as subj_type_name, -- 科目类型名称
case when yefx='J' then '借' when yefx='D' then '贷' end as direction, -- 借贷方向
case when kmmc='现金' then 1 else 0 end as is_cash, -- 是否现金
kmxz as subj_nature_code, -- 科目性质
case when fzhs is not null and fzhs !='' then 1 else 0 end as is_check, -- 是否辅助核算
syzt as Is_stop, -- 是否停用
case when kmxx.yefx='J' then '借' when kmxx.yefx='D' then '贷' end as direction, -- 借贷方向
case when kmxx.kmmc='现金' then 1 else 0 end as is_cash, -- 是否现金
kmxx.kmxz as subj_nature_code, -- 科目性质
case when kmxx.fzhs is not null and kmxx.fzhs !='' then 1 else 0 end as is_check, -- 是否辅助核算
kmxx.syzt as Is_stop, -- 是否停用
'' as budg_subj_code, -- 预算会计科目编码
'' as budg_subj_name, -- 预算会计科目名称
'' as check_type_name1, -- 辅助核算项目1
@ -264,15 +264,16 @@
'' as check_type_name6, -- 辅助核算项目6
'' as check_type_name7, -- 辅助核算项目7
'' as check_type_name8, -- 辅助核算项目8
'' as org_code, -- 单位编码
'' as org_name, -- 单位名称
kmxx.gsdm as org_code, -- 单位编码
ztcs.gsmc as org_name, -- 单位名称
'' as branch_code, -- 院区编码
'' as branch_name -- 院区名称
from GL_KMXX
from GL_KMXX kmxx
LEFT JOIN PubGszl ztcs on kmxx.kjnd = ztcs.kjnd and kmxx.gsdm = ztcs.gsdm
<trim prefix="where" prefixOverrides="and">
<if test="acct_year != null and acct_year != ''"> and kjnd like '%${acct_year}%' </if>
<if test="acct_subj_code != null and acct_subj_code != ''"> and kmdm like '%${acct_subj_code}%' </if>
<if test="acct_subj_name != null and acct_subj_name != ''"> and kmmc like '%${acct_subj_name}%' </if>
<if test="acct_year != null and acct_year != ''"> and kmxx.kjnd like '%${acct_year}%' </if>
<if test="acct_subj_code != null and acct_subj_code != ''"> and kmxx.kmdm like '%${acct_subj_code}%' </if>
<if test="acct_subj_name != null and acct_subj_name != ''"> and kmxx.kmmc like '%${acct_subj_name}%' </if>
</trim>
</select>
</mapper>