SELECT m.MEETINGID,
m.MEETINGNAME,
m.SHYKTYPE,
z.DZZMC as PARTYNAME,
m.PARTYCODE,
m.MEETINGADDRESS,
m.CHAIRUSER,
m.RECORDUSER,
m.BEGINTIME,
m.ENDTIME,
m.ISTEMP,
m.SHYKSTATUS,
m.CREATETIME,
m.CREATEUSERID,
m.CREATEUSERNAME,
m.UPDATETIME,
m.UPDATEUSERID,
m.UPDATEUSERNAME,
m.MEETINGAPPROVESTATUS,
m.MEETINGAPPROVEUSERNAME,
m.DECISIONSTATUS,-- 决议填写状态 0保存中,1已提交
m.ISUPLOADIMG, -- 是否上传会议图片 0未上传,1已上传
m.MEETINGRECORDSTATE,-- 会议填写状态 0保存中,1已提交
SUBSTR(m.PARTYCODE,1,12) as DWDZZDM,
dw.DZZMC as DWMC
, m.isFirstTopic
, m.topicContent
, st.shykTypes
, st.shykTypeNames
FROM SHYK_MEETING m
inner join ZZ_ZZQKXX z on m.partycode=z.dzzdm
inner join ZZ_ZZQKXX dw on SUBSTR(m.partycode,1,12)=dw.DZZDM
inner join (
select t.meetingId
, GROUP_CONCAT(shykType order by shykType SEPARATOR ', ') as shykTypes
, GROUP_CONCAT(dic.DICVALUE order by shykType SEPARATOR ', ') as shykTypeNames
from SHYK_Meeting_Type t
inner join cf_dictionary dic on t.shykType = dic.DICKEY and dic.DICTYPEKEY = 'shykType'
where 1=1
group by meetingId
) st on m.meetingId = st.meetingId
inner join (
select meetingId from SHYK_Meeting_Type where 1=1
and shykType in
#{shyktype}
group by meetingId
) tt on m.meetingId = tt.meetingId
where 1=1 and m.OPERATESTATE in ('A','M')
and m.partyCode like concat('',#{partyCode},'%')
and m.meetingName like concat('%',#{meetingName},'%')
and m.meetingAddress like concat('%',#{meetingAddress},'%')
and m.shykStatus = #{shykStatus}
and m.beginTime = ]]> date_format(#{beginTime},'%Y%m%d')
and m.beginTime date_add(date_format(#{endTime},'%Y%m%d'),interval 1 day)
and m.partyCode = #{ssdzzdm}
order by m.BEGINTIME desc
SELECT count(1)
FROM SHYK_MEETING m
inner join ZZ_ZZQKXX z on m.PARTYCODE=z.DZZDM
where m.OPERATESTATE in ('A','M') and m.SHYKSTATUS ]]> 2
and m.PARTYCODE like concat('%',#{partyCode},'%')
and m.MEETINGNAME like concat('%',#{meetingName},'%')
and m.MEETINGADDRESS like concat('%',#{meetingAddress},'%')
and m.SHYKSTATUS = #{shykStatus}
and m.BEGINTIME = ]]> date_format(#{beginTime},'%Y%m%d')
and m.BEGINTIME date_add(date_format(#{endTime},'%Y%m%d'),interval 1 day)
and m.SHYKTYPE in
#{shyktype}
and m.PARTYCODE = #{ssdzzdm}
select m.ID,m.MBMC,m.SHYKLX,m.CJRQ,m.SORT,t.MEETINGTOPICID from shyk_mb_ytmb m
left join shyk_meetingtopic t on m.ID=t.MODELID and t.MEETINGID=#{meetingId} and t.OPERATESTATE ]]>
'D'
where 1=1 and m.OPERATESTATE ]]> 'D'
and m.SHYKLX = #{shykType}
order by m.SORT
select mu.MEETINGUSERID, mu.MEETINGID,mu.USERNAME,mu.USERCODE, mu.PARTYNAME,mu.PARTYCODE,
mu.SIGNINSTATUS,mu.SIGNINUSERCODE,mu.SIGNINUSERNAME,mu.SIGNINTIME,mu.CHECKINSTATUS,
mu.CHECKINUSERCODE,mu.CHECKINUSERNAME, mu.CHECKINTIME,mu.USERREMARK,mu.APPROVESTATUS, mu.APPROVEOPINION,
mu.APPROVEUSERCODE,mu.APPROVEUSERNAME,mu.MAKEUUPSTUDY,
u.XM,u.SFZH,u.JG,p.DZZMC,xb.HZMC as XBMC,mu.USERCODE as RYBM,u.RYJBXXBS,u.SZDZBDM,
(case when ue.MEETINGUSERID is not null then 1 else 0 end) as ISEVALUATE
from SHYK_MeetingUser mu
inner join VM_RYJBXX u on mu.USERCODE = u.RYBM
inner join ZZ_ZZQKXX p on u.SZDZBDM=p.DZZDM
left join zd_xbm xb on u.XB=xb.BM -- 性别
left join SHYK_USEREVALUATE ue on mu.MEETINGUSERID=ue.MEETINGUSERID and ue.OPERATESTATE not in('D')
where mu.MEETINGID=#{meetingId}
and mu.OPERATESTATE ]]> 'D'
order by mu.PARTYCODE,mu.USERCODE
select mdr.democracyreviewid ,mdr.meetingid,mdr.usercode,mdr.startdate,mdr.enddate,mdr.democracyreviewresulttype
,mdr.createtime,mdr.createuserid,mdr.updatetime,mdr.updateuserid
,p.dzzdm as partyCode,p.dzzmc as partyName,us.xm as userName
,dic.DICVALUE as democracyReviewResultTypeName
from SHYK_Meeting_DemocracyReview mdr
inner join vm_ryjbxx us on mdr.userCode = us.rybm
inner join zz_zzqkxx p on us.SZDZBDM = p.dzzdm
inner join cf_dictionary dic on dic.DICKEY = mdr.democracyreviewresulttype and dic.DICTYPEKEY='DemocracyReviewResultType'
where mdr.meetingId = #{meetingId}
order by p.dzzdm,CONVERT(us.XM USING gbk)
select mt.meetingid,mt.shyktype,dic.DICVALUE as shykTypeName
from SHYK_Meeting_Type mt
inner join cf_dictionary dic on dic.DICKEY = mt.shykType and dic.DICTYPEKEY='shykType'
where mt.meetingId = #{meetingId}
order by mt.shykType
select * from shyk_meetingtopic
where MEETINGID=#{meetingId} and OPERATESTATE ]]> 'D'
update SHYK_MeetingUser set OPERATESTATE='D',OPERATETIME=sysdate(),SYNCSTATE='N' where MEETINGID=#{meetingId}
and OPERATESTATE ]]> 'D'
delete from shyk_meeting_democracyreview where MEETINGID=#{meetingId}
delete from shyk_meeting_type where MEETINGID=#{meetingId}
update shyk_meetingtopic set OPERATESTATE='D',OPERATETIME=sysdate(),SYNCSTATE='N' where MEETINGID=#{meetingId}
and OPERATESTATE ]]> 'D'
update SHYK_MeetingDecision set OPERATESTATE='D',OPERATETIME=sysdate(),SYNCSTATE='N' where MEETINGID=#{meetingId}
and OPERATESTATE ]]> 'D'
update SHYK_Meeting set OPERATESTATE='D',OPERATETIME=sysdate(),SYNCSTATE='N' where MEETINGID=#{meetingId}
select MEETINGADDRESS from (
select MEETINGADDRESS,max(CREATETIME) CREATETIME from SHYK_MEETING m
where 1=1
and m.OPERATESTATE ]]> 'D'
and m.CREATEUSERID=#{userId}
group by MEETINGADDRESS
) meet order by CREATETIME desc
select t1.*,0 as total from (
select DZZDM,DZZMC,CHILDCOUNT,YY,QUARTER,SHYKTYPE,
case SHYKTYPE when 1 then '党员大会'
when 2 then '支委会'
when 3 then '党小组会'
when 4 then '党课'
else '' end SHYKTYPENAME
,MONTH_FIRST,MONTH_SECOND,MONTH_THIRD from (
select *
,SUM(IF (month_order='1',num,0)) 'month_first',
SUM(IF (month_order='2',num,0)) 'month_second',
SUM(IF (month_order='3',num,0)) 'month_third' from(
select t1.DZZDM,t1.DZZMC,t1.CHILDCOUNT,t1.YY,t1.QUARTER,t1.SHYKTYPE,t1.MONTH_ORDER,ifnull(t2.NUM,0) as NUM
from (
-- 组织、年度、季度、会议类型、季度第几月
select * from(
select dzzdm,dzzmc,CHILDCOUNT,yy,quarter,shyktype,dmq1.month_order from (
select z.dzzdm,z.dzzmc, 0 as CHILDCOUNT,#{year} as yy,#{quarter} as quarter,dq1.shyktype
from ZZ_ZZQKXX z
cross join (select dq.DICKEY as shyktype from cf_dictionary dq where dq.DICTYPEKEY='quarterType') dq1
) t1 cross join (select dmq.DICKEY as month_order from cf_dictionary dmq where dmq.DICTYPEKEY=
'monthQuarterType') dmq1
) z
where 1=1
and dzzdm like concat('',#{dzzdm},'%')
and SUBSTR(dzzdm,1,12) in(select dzzdm from ZZ_DZZFBQK where zzfb= #{zzfbType})
and dzzdm = #{ssdzzdm}
) t1
left join (
-- 统计三会一课
select z.dzzdm,m.yy,m.quarter,m.shyktype,m.month_order,count(m.partyCode) num
from ZZ_ZZQKXX z
inner join (select date_format(begintime,'%Y') as yy,QUARTER(begintime) as quarter,date_format(begintime,'%m') as
mon,
date_format(begintime,'%m')-(QUARTER(begintime)-1)*3 month_order, partycode, shyktype from SHYK_MEETING
where 1=1 and OPERATESTATE ]]> 'D' and SHYKSTATUS not in (2) -- 排除已取消
) m on (z.dzzdm = m.partyCode or z.dzzdm = substr(m.partyCode, 1, length(z.dzzdm)))
where 1=1
and z.dzzdm like concat('',#{dzzdm},'%')
and SUBSTR(z.dzzdm,1,12) in(select dzzdm from ZZ_DZZFBQK where zzfb= #{zzfbType})
and z.dzzdm = #{ssdzzdm}
group by z.dzzdm,m.yy,m.quarter,m.month_order,m.shyktype
order by z.dzzdm,m.yy,m.quarter,m.month_order,m.shyktype
) t2 on t1.dzzdm=t2.dzzdm and t1.yy=t2.yy and t1.quarter=t2.quarter and t1.month_order=t2.month_order and
t1.shyktype=t2.shyktype
where 1=1
and t1.dzzdm like concat('',#{dzzdm},'%')
and SUBSTR(t1.dzzdm,1,12) in(select dzzdm from ZZ_DZZFBQK where zzfb= #{zzfbType})
and t1.dzzdm = #{ssdzzdm}
) t1
order by dzzdm,yy,quarter,shyktype,month_order
) t1
-- piv ot (max(num) for month_order in ('1' as month_first,'2' AS month_second,'3' AS month_third ))
order by dzzdm,yy,quarter,shyktype
) t1
where 1=1
and (dzzdm=#{dzzdm} or length(dzzdm)=(length(#{dzzdm})+3))
and dzzdm = #{ssdzzdm}
order by dzzdm,yy,quarter,shyktype
select #{dzzdm} as DZZDM,#{year} as YY,#{quarter} as QUARTER,SHYKTYPE,
sum(case
when BEGINTIME >= date_format(#{month1_bt},'%Y-%m-%d') and BEGINTIME date_format(#{month1_et},'%Y-%m-%d')
then 1
else 0 end) as MONTH1,
sum(case
when BEGINTIME >= date_format(#{month2_bt},'%Y-%m-%d') and BEGINTIME date_format(#{month2_bt},'%Y-%m-%d')
then 1
else 0 end) as MONTH2,
sum(case
when BEGINTIME >= date_format(#{month3_bt},'%Y-%m-%d') and BEGINTIME date_format(#{month3_bt},'%Y-%m-%d')
then 1
else 0 end) as MONTH3,
count(1) as YEARCOUNT,
sum(case when QUARTER(BEGINTIME)=1 then 1 else 0 end) as QUARTERCOUNT1,
sum(case when QUARTER(BEGINTIME)=2 then 1 else 0 end) as QUARTERCOUNT2,
sum(case when QUARTER(BEGINTIME)=3 then 1 else 0 end) as QUARTERCOUNT3,
sum(case when QUARTER(BEGINTIME)=4 then 1 else 0 end) as QUARTERCOUNT4
from SHYK_MEETING
where 1=1 and OPERATESTATE not in('D') and SHYKSTATUS not in (2) -- 排除已取消
and PARTYCODE =#{dzzdm}
and Extract(year from BEGINTIME)=#{year}
group by #{dzzdm},SHYKTYPE
order by SHYKTYPE
select
p.DZZDM,p.DZZMC,p.ZZLB,
SUBSTR(p.DZZDM,1,LENGTH(p.DZZDM)-3) PARENTCODE ,-- 父级组织代码,
plan.PLANID PLANID,
dcUser.DICVALUE PLANTYPE_USERNAME,
dcBranch.DICVALUE PLANTYPE_BRANCHNAME,
dcGroup.DICVALUE PLANTYPE_GROUPNAME,
dcClass.DICVALUE PLANTYPE_CLASSNAME,
p.DZZDM PARTYCODE,
p.DZZMC PARTYNAME,
plan.PLANTYPE_USER PLANTYPEUSER,
plan.PLANTYPE_BRANCH PLANTYPEBRANCH,
plan.PLANTYPE_GROUP PLANTYPEGROUP,
plan.PLANTYPE_CLASS PLANTYPECLASS
from ZZ_ZZQKXX p
left join ZZ_DZZFBQK fbType on p.DZZDM = fbType.DZZDM
left join SHYK_PARTYPLAN plan on p.DZZDM=plan.PARTYCODE
left join CF_DICTIONARY dcUser on plan.PLANTYPE_USER=dcUser.DICKEY and dcUser.DICTYPEKEY='SHYK_PartyPlan' -- 党员大会
left join CF_DICTIONARY dcBranch on plan.PLANTYPE_BRANCH=dcBranch.DICKEY and
dcBranch.DICTYPEKEY='SHYK_PartyPlan' -- 支委会
left join CF_DICTIONARY dcGroup on plan.PLANTYPE_GROUP=dcGroup.DICKEY and dcGroup.DICTYPEKEY='SHYK_PartyPlan'
-- 党小组会
left join CF_DICTIONARY dcClass on plan.PLANTYPE_CLASS=dcClass.DICKEY and dcClass.DICTYPEKEY='SHYK_PartyPlan'
-- 党课
where 1=1
and p.DZZDM like concat('%',#{dzzdm},'%') and length(p.DZZDM)=(length(#{dzzdm})+3)
and SUBSTR(p.dzzdm,1,12) in(select DZZDM from ZZ_DZZFBQK where ZZFB= #{zzfbType})
order by fbType.SORT
select PARTYCODE,PARTYNAME,PLANTYPE_USER,PLANTYPE_BRANCH,PLANTYPE_GROUP,PLANTYPE_CLASS from SHYK_PartyPlan p
where OPERATESTATE not in('D')
and p.PARTYCODE like concat('',#{dzzdm},'%')
and p.PARTYCODE=#{ssdzzdm}
select
m.MEETINGID,
m.MEETINGNAME,
m.SHYKTYPE,
z.DZZMC as PARTYNAME,
m.PARTYCODE,
m.MEETINGADDRESS,
m.CHAIRUSER,
m.RECORDUSER,
m.BEGINTIME,
m.ENDTIME,
m.ISTEMP,
m.SHYKSTATUS,
m.CREATETIME,
m.CREATEUSERID,
m.CREATEUSERNAME,
m.UPDATETIME,
m.UPDATEUSERID,
m.UPDATEUSERNAME,
m.MEETINGAPPROVESTATUS,
m.MEETINGAPPROVEUSERNAME,
us.MEETINGUSERID,
ue.TEACHNAME,
(case when sysdate()>m.ENDTIME then 1 else 0 end) as ISEND,
topic.TOPICNAME,
(case when ue.MEETINGUSERID is not null then 1 else 0 end) as ISEVALUATE
from SHYK_MEETING m
inner join SHYK_MEETINGUSER us on m.MEETINGID=us.MEETINGID
inner join ZZ_ZZQKXX z on m.PARTYCODE=z.DZZDM
left join SHYK_USEREVALUATE ue on us.MEETINGUSERID=ue.MEETINGUSERID and ue.OPERATESTATE not in('D')
left join SHYK_MEETINGTOPIC topic on topic.MEETINGID=m.MEETINGID and topic.OPERATESTATE not in('D') and topic.MODELID is null
where 1=1 and m.OPERATESTATE ]]> 'D' and us.USERCODE=#{userCode}
and us.OPERATESTATE ]]> 'D'
and m.BEGINTIME = ]]> date_format(#{beginTime},'%Y%m%d')
and m.BEGINTIME date_add(date_format(#{endTime},'%Y%m%d'),interval 1 day)
and date_format(m.BEGINTIME,'%Y-%m-%d') = #{day}
and ue.MEETINGUSERID is not null
and ue.MEETINGUSERID is null
and m.SHYKTYPE=#{shykType}
and topic.TOPICNAME like concat('%',#{meetingName},'%')
and m.MEETINGADDRESS like concat('%',#{meetingAddress},'%')
and m.PARTYCODE like concat('',#{partyCode},'%')
order by BEGINTIME desc
select dic.DICKEY as SHYKEVALUATETYPE,dic.DICVALUE as PROJECTNAME,ue.PROJECTID,ue.USEREVALUATEID,ue.SHYKEVALUATERESULTTYPE,ue.SHYKEVALUATERESULTTYPENAME,ue.RECOMMEND
from (select * from CF_DICTIONARY where DICTYPEKEY='shykEvaluateType') dic
left join (
select p.SHYKEVALUATETYPE,p.PROJECTID,p.USEREVALUATEID,p.SHYKEVALUATERESULTTYPE,dicResult.DICVALUE as SHYKEVALUATERESULTTYPENAME,p.RECOMMEND
from SHYK_USEREVALUATE ue
inner join SHYK_USEREVALUATEPROJECT p on p.USEREVALUATEID=ue.USEREVALUATEID
inner join CF_DICTIONARY dicResult on p.SHYKEVALUATERESULTTYPE=dicResult.DICKEY and dicResult.DICTYPEKEY='shykEvaluateResultType'
where ue.OPERATESTATE not in('D') and p.OPERATESTATE not in('D')
and ue.MEETINGUSERID=#{meetingUserId}
) ue on dic.DICKEY=ue.SHYKEVALUATETYPE
where 1=1
order by dic.DICKEY
update SHYK_USEREVALUATEPROJECT set OPERATESTATE='D',OPERATETIME=sysdate(),SYNCSTATE='N' where USEREVALUATEID=#{userevaluateId}
and OPERATESTATE ]]> 'D'
select ztp.SHYKTYPE,
(case ztp.SHYKTYPE
when 1 then '党员大会'
when 2 then '支委会'
when 3 then '党小组会'
when 4 then '党课'
else '' end) as shykTypeName,
ztp.DZZDM, ztp.DZZMC, ztp.planType,
(case ztp.PLANTYPE when 1 then '每月一次'
when 2 then '每季度一次'
when 3 then '每半年一次'
when 4 then '每年一次'
else '' end) as planTypeName,
sum(
case when m.MEETINGID is not null and ztp.PLANTYPE = 1 and date_format(m.BEGINTIME,'%Y') = #{year} and date_format(m.BEGINTIME,'%m') = #{month} then 1 -- 每月一次
when m.MEETINGID is not null and ztp.PLANTYPE = 2 and date_format(m.BEGINTIME,'%Y') = #{year} and QUARTER(m.BEGINTIME) = #{quarter} then 1 -- 每季度一次
when m.MEETINGID is not null and ztp.PLANTYPE = 3 and date_format(m.BEGINTIME,'%Y') = #{year} and #{quarter} in(1,2) and QUARTER(m.BEGINTIME) in (1,2) then 1 -- 每半年一次
when m.MEETINGID is not null and ztp.PLANTYPE = 3 and date_format(m.BEGINTIME,'%Y') = #{year} and #{quarter} in(3,4) and QUARTER(m.BEGINTIME) in (3,4) then 1 -- 每半年一次
when m.MEETINGID is not null and ztp.PLANTYPE = 4 and date_format(m.BEGINTIME,'%Y') = #{year} then 1
else 0 end -- 每年一次
) as planCount
from (
select t1.SHYKTYPE,
z.DZZDM,
z.DZZMC,
(case t1.SHYKTYPE
when 1 then pn.PLANTYPE_USER
when 2 then pn.PLANTYPE_BRANCH
when 3 then pn.PLANTYPE_GROUP
when 4 then pn.PLANTYPE_CLASS
else 99 end) as planType
from (select level SHYKTYPE from dual connect by 0 + level ) t1,
ZZ_ZZQKXX z
inner join SHYK_PARTYPLAN pn on pn.PARTYCODE = z.DZZDM
) ztp
left join SHYK_MEETING m on ztp.DZZDM = m.PARTYCODE and ztp.SHYKTYPE = m.SHYKTYPE and m.OPERATESTATE not in('D') and m.SHYKSTATUS not in (2) -- 排除已取消
where 1=1
and ztp.DZZDM=#{dzzdm}
and ztp.DZZDM like concat('%',#{dzzdmSearch},'%')
group by ztp.SHYKTYPE, ztp.DZZDM, ztp.DZZMC, ztp.PLANTYPE
SELECT m.MEETINGID,
m.MEETINGNAME,
m.SHYKTYPE,
z.DZZMC as PARTYNAME ,
m.PARTYCODE,
m.MEETINGADDRESS,partyList
m.CHAIRUSER,
m.RECORDUSER,
m.BEGINTIME,
m.ENDTIME,
m.ISTEMP,
m.SHYKSTATUS,
m.CREATETIME,
m.CREATEUSERID,
m.CREATEUSERNAME,
m.UPDATETIME,
m.UPDATEUSERID,
m.UPDATEUSERNAME,
m.MEETINGAPPROVESTATUS,
m.MEETINGAPPROVEUSERNAME,
dw.DZZMC as DWMC,
m.DECISIONSTATUS,-- 决议填写状态 0保存中,1已提交
ISUPLOADIMG, -- 是否上传会议图片 0未上传,1已上传
MEETINGRECORDSTATE,-- 会议填写状态 0保存中,1已提交
ROUND((ENDTIME - BEGINTIME) * 24,2) as MEETINGTIME, -- 会议时长(小时)
(case
when BEGINTIME > sysdate() then 1 else 2 end ) as STATUS, -- 1会议未开始,2会议已开始
(sysdate()-ENDTIME) as endLongTime -- 会议结束时长
FROM SHYK_MEETING m
inner join ZZ_ZZQKXX z on m.PARTYCODE=z.DZZDM
inner join ZZ_ZZQKXX dw on SUBSTR(m.PARTYCODE,1,12)=dw.DZZDM
inner join SHYK_MEETINGUSER us on m.MEETINGID = us.MEETINGID
where 1=1 and m.OPERATESTATE ]]> 'D' and m.SHYKSTATUS ]]> 2
and us.OPERATESTATE ]]> 'D'
and us.USERCODE = #{userId}
order by BEGINTIME desc
select pt.partycode
,p.dzzmc as partyName
,pt.shyktype
,pt.targettype
,dic_type.DICVALUE as shykTypeName
,dic_target.DICVALUE as targetName
from shyk_partytarget pt
inner join zz_zzqkxx p on pt.partyCode = p.dzzdm
inner join cf_dictionary dic_type on pt.shykType = dic_type.DICKEY and dic_type.DICTYPEKEY='shykType'
inner join cf_dictionary dic_target on pt.targetType = dic_target.DICKEY and dic_target.DICTYPEKEY='SHYK_PartyPlan'
order by pt.partyCode,pt.shykType
select m.partyCode,t.shykType,year(m.BEGINTIME) as year,month(m.BEGINTIME) as month,count(1) as count
from SHYK_MEETING m
inner join shyk_meeting_type t on t.meetingId = m.meetingId
where 1=1
and m.partyCode = #{partyCode}
and year(m.BEGINTIME) = #{year}
group by m.partyCode,t.shyktype,year(m.BEGINTIME),month(m.BEGINTIME)
select m.partyCode,t.shykType,count(1) as count
from SHYK_MEETING m
inner join shyk_meeting_type t on t.meetingId = m.meetingId
where 1=1
and m.partyCode like concat('',#{partyCode},'%')
and m.beginTime = ]]> date_format(#{beginTime},'%Y%m%d')
and m.beginTime date_add(date_format(#{endTime},'%Y%m%d'),interval 1 day)
group by m.partyCode,t.shyktype