会稽山对接CRM代码

This commit is contained in:
yuqh 2024-12-03 14:55:57 +08:00
parent 4836f217a2
commit bece2f2ed0
2 changed files with 3 additions and 143 deletions

View File

@ -12,75 +12,8 @@
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.u8.saleout.entity.SaleOutDetailEntity"> <select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.u8.saleout.entity.SaleOutDetailEntity">
-- 销售出库单子表 -- 销售出库单子表
select * from ( select * from kjs_external.dbo.v_hzya_saleout_details
select
id,
'001' as AccId,
'UFDATA_001_2023' as AccCode,
inv.cinvcode,
inv.cinvname,
iquantity,
inum,
cbdlcode as idlrowno
from UFDATA_001_2023.dbo.rdrecords32 main
left join UFDATA_001_2023.dbo.inventory inv on main.cinvcode = inv.cinvcode
union all
select
id,
'002' as AccId,
'UFDATA_002_2024' as AccCode,
inv.cinvcode,
inv.cinvname,
iquantity,
inum,
cbdlcode as idlrowno
from UFDATA_002_2024.dbo.rdrecords32 main
left join UFDATA_002_2024.dbo.inventory inv on main.cinvcode = inv.cinvcode
union all
select
id,
'004' as AccId,
'UFDATA_004_2024' as AccCode,
inv.cinvcode,
inv.cinvname,
iquantity,
inum,
cbdlcode as idlrowno
from UFDATA_004_2024.dbo.rdrecords32 main
left join UFDATA_004_2024.dbo.inventory inv on main.cinvcode = inv.cinvcode
union all
select
id,
'005' as AccId,
'UFDATA_005_2024' as AccCode,
inv.cinvcode,
inv.cinvname,
iquantity,
inum,
cbdlcode as idlrowno
from UFDATA_005_2024.dbo.rdrecords32 main
left join UFDATA_005_2024.dbo.inventory inv on main.cinvcode = inv.cinvcode
union all
select
id,
'201' as AccId,
'UFDATA_201_2023' as AccCode,
inv.cinvcode,
inv.cinvname,
iquantity,
inum,
cbdlcode as idlrowno
from UFDATA_201_2023.dbo.rdrecords32 main
left join UFDATA_201_2023.dbo.inventory inv on main.cinvcode = inv.cinvcode
)m1
where id = #{id} and AccId = #{AccId} where id = #{id} and AccId = #{AccId}
</select> </select>
</mapper> </mapper>
`

View File

@ -18,80 +18,7 @@
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.u8.saleout.entity.SaleOutEntity"> <select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.u8.saleout.entity.SaleOutEntity">
-- 销售单主表 -- 销售单主表
select * from ( select * from kjs_external.dbo.v_hzya_saleout
select
'001' as AccId,
'UFDATA_001_2023' as AccCode,
'1001'+CAST(id AS VARCHAR(100)) as ids,
id,
cdlcode,
'' as couttype,
ccode,
ddate,
cCusCode,
cHandler,sync_flag
from UFDATA_001_2023.dbo.rdrecord32
union all
select
'002' as AccId,
'UFDATA_002_2024' as AccCode,
'1002'+CAST(id AS VARCHAR(100)) as ids,
id,
cdlcode,
'' as couttype,
ccode,
ddate,
cCusCode,
cHandler,sync_flag
from UFDATA_002_2024.dbo.rdrecord32
union all
select
'004' as AccId,
'UFDATA_004_2024' as AccCode,
'1004'+CAST(id AS VARCHAR(100)) as ids,
id,
cdlcode,
'' as couttype,
ccode,
ddate,
cCusCode,
cHandler,sync_flag
from UFDATA_004_2024.dbo.rdrecord32
union all
select
'005' as AccId,
'UFDATA_005_2024' as AccCode,
'1005'+CAST(id AS VARCHAR(100)) as ids,
id,
cdlcode,
'' as couttype,
ccode,
ddate,
cCusCode,
cHandler,sync_flag
from UFDATA_005_2024.dbo.rdrecord32
union all
select
'201' as AccId,
'UFDATA_201_2023' as AccCode,
'201'+CAST(id AS VARCHAR(100)) as ids,
id,
cdlcode,
'' as couttype,
ccode,
ddate,
cCusCode,
cHandler,sync_flag
from UFDATA_201_2023.dbo.rdrecord32
)m1 where cCusCode not in ('001','002','004','005') and cHandler is not null and sync_flag is null and AccId = '201'
<if test="ids != null and ids != ''">and ids = #{ids} </if> <if test="ids != null and ids != ''">and ids = #{ids} </if>
</select> </select>
<!--通过主键修改方法--> <!--通过主键修改方法-->