Sfoglia il codice sorgente

新增队伍统计内外判断规则

zx 5 mesi fa
parent
commit
5b5aeafa75

+ 1 - 1
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmScoreRankTeamMapper.xml

@@ -106,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="saveTeam" parameterType="PdmScoreRankTeam">
         insert into pdm_score_rank_team(report_year,report_date,team_type,team_name,score)
         select SUBSTRING(t2.data_dt,1,4) report_year,SUBSTRING(t2.data_dt,1,6) report_date,
-        '1',op_team,count(1) score
+        if(t2.op_team like '%公司',2,1) team_type,op_team,count(1) score
         from pdm_violation_records t1,pdm_inspection_records t2
         where t1.audit_rec_id = t2.audit_rec_id
           and  date_format(t2.op_plan_start_tm,'%Y%m%d') &gt;= #{startDate}