diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..ca69d8b --- /dev/null +++ b/readme.md @@ -0,0 +1,37 @@ +# 20231206迭代`未上线` + +## 表结构调整 + +### kpi_khxz_wgy_3 + +| 字段 | 类型 | 默认值 | 描述 | 操作 | +|---------------------------------|--------------|-----|----------|----| +| community_base_population_count | int(11) | 0 | 社区基础人口数量 | 新增 | +| community_population_count | int(11) | 0 | 社区实际人口数量 | 新增 | +| community_population_rate | double(11,2) | 0 | 社区实际人口比例 | 新增 | +| population_count | int(11) | 0 | 人口数量 | 新增 | +| area_name | varchar(255) | 0 | 街道名称 | 新增 | +| community_name | varchar(255) | 0 | 社区名称 | 新增 | + +### kpi_khxz_wgy_4 + +| 字段 | 类型 | 默认值 | 描述 | 操作 | +|---------------------------------|--------------|-----|----------|----| +| community_base_population_count | int(11) | 0 | 社区基础人口数量 | 新增 | +| community_population_count | int(11) | 0 | 社区实际人口数量 | 新增 | +| community_population_rate | double(11,2) | 0 | 社区实际人口比例 | 新增 | +| population_count | int(11) | 0 | 人口数量 | 新增 | +| area_name | varchar(255) | 0 | 街道名称 | 新增 | +| community_name | varchar(255) | 0 | 社区名称 | 新增 | + +### kpi_khxz_zf_ga + +| 字段 | 类型 | 默认值 | 描述 | 操作 | +|---------|--------------|-----|------|----| +| reasonF | varchar(255) | | 金额原因 | 新增 | + +### kpi_khxz_znbm + +| 字段 | 类型 | 默认值 | 描述 | 操作 | +|---------|--------------|-----|------|----| +| reasonF | varchar(255) | | 金额原因 | 新增 | diff --git a/src/main/java/com/cm/bigdata/config/db/Db3Config.java b/src/main/java/com/cm/bigdata/config/db/Db3Config.java new file mode 100644 index 0000000..5bf010e --- /dev/null +++ b/src/main/java/com/cm/bigdata/config/db/Db3Config.java @@ -0,0 +1,99 @@ +package com.cm.bigdata.config.db; + +import com.alibaba.druid.pool.DruidDataSource; +import com.cm.bigdata.config.properties.db.Db3Properties; +import com.cm.bigdata.config.properties.db.DbCommonProperties; +import com.github.pagehelper.PageInterceptor; +import org.apache.ibatis.plugin.Interceptor; +import org.apache.ibatis.session.SqlSessionFactory; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.mybatis.spring.SqlSessionTemplate; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; +import org.springframework.jdbc.datasource.DataSourceTransactionManager; + +import javax.sql.DataSource; +import java.sql.SQLException; +import java.util.Properties; + +@Configuration +@MapperScan(basePackages = {"com.cm.**.dao3"}, sqlSessionFactoryRef = "db3SqlSessionFactory") +public class Db3Config { + + @Autowired + private DbCommonProperties dbCommonProperties; + @Autowired + private Db3Properties db3Properties; + + @Bean(name = "db3DataSource") + public DataSource db3DataSource() throws SQLException { + DruidDataSource druid = new DruidDataSource(); + // 监控统计拦截的filters + druid.setFilters(dbCommonProperties.getFilters()); + + // 配置基本属性 + druid.setDriverClassName(db3Properties.getDriverClassName()); + druid.setUsername(db3Properties.getUsername()); + druid.setPassword(db3Properties.getPassword()); + druid.setUrl(db3Properties.getUrl()); + + //初始化时建立物理连接的个数 + druid.setInitialSize(dbCommonProperties.getInitialSize()); + //最大连接池数量 + druid.setMaxActive(dbCommonProperties.getMaxActive()); + //最小连接池数量 + druid.setMinIdle(dbCommonProperties.getMinIdle()); + //获取连接时最大等待时间,单位毫秒。 + druid.setMaxWait(dbCommonProperties.getMaxWait()); + //间隔多久进行一次检测,检测需要关闭的空闲连接 + druid.setTimeBetweenEvictionRunsMillis(dbCommonProperties.getTimeBetweenEvictionRunsMillis()); + //一个连接在池中最小生存的时间 + druid.setMinEvictableIdleTimeMillis(dbCommonProperties.getMinEvictableIdleTimeMillis()); + //用来检测连接是否有效的sql + druid.setValidationQuery(dbCommonProperties.getValidationQuery()); + //建议配置为true,不影响性能,并且保证安全性。 + druid.setTestWhileIdle(dbCommonProperties.isTestWhileIdle()); + //申请连接时执行validationQuery检测连接是否有效 + druid.setTestOnBorrow(dbCommonProperties.isTestOnBorrow()); + druid.setTestOnReturn(dbCommonProperties.isTestOnReturn()); + //是否缓存preparedStatement,也就是PSCache,oracle设为true,mysql设为false。分库分表较多推荐设置为false + druid.setPoolPreparedStatements(dbCommonProperties.isPoolPreparedStatements()); + // 打开PSCache时,指定每个连接上PSCache的大小 + druid.setMaxPoolPreparedStatementPerConnectionSize(dbCommonProperties.getMaxPoolPreparedStatementPerConnectionSize()); + return druid; + } + + @Bean(name = "db3TransactionManager") + public DataSourceTransactionManager db3TransactionManager() throws SQLException { + return new DataSourceTransactionManager(db3DataSource()); + } + + public Interceptor pageHelper() { + Interceptor pageHelper = new PageInterceptor(); + Properties p = new Properties(); + p.setProperty("offsetAsPageNum", "true"); + p.setProperty("rowBoundsWithCount", "true"); + p.setProperty("reasonable", "true"); + pageHelper.setProperties(p); + return pageHelper; + } + + @Bean(name = "db3SqlSessionFactory") + public SqlSessionFactory db2SqlSessionFactory(@Qualifier("db3DataSource") DataSource dataSource) throws Exception { + final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); + sessionFactory.setDataSource(dataSource); // 设置数据源bean + sessionFactory.setPlugins(new Interceptor[]{pageHelper()}); + sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(db3Properties.getMapperLocations())); // 设置mapper文件路径 + return sessionFactory.getObject(); + } + + @Bean("db3SqlSessionTemplate") + public SqlSessionTemplate db2SqlSessionTemplate(@Qualifier("db3SqlSessionFactory") SqlSessionFactory sqlSessionFactory) { + return new SqlSessionTemplate(sqlSessionFactory); + } + +} diff --git a/src/main/java/com/cm/bigdata/config/properties/db/Db3Properties.java b/src/main/java/com/cm/bigdata/config/properties/db/Db3Properties.java new file mode 100644 index 0000000..4cbd46a --- /dev/null +++ b/src/main/java/com/cm/bigdata/config/properties/db/Db3Properties.java @@ -0,0 +1,64 @@ +package com.cm.bigdata.config.properties.db; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ConfigurationProperties(prefix = "spring.datasource.druid.db3") +public class Db3Properties { + + private String url; + private String dbType; + private String driverClassName; + private String username; + private String password; + private String mapperLocations; + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getDbType() { + return dbType; + } + + public void setDbType(String dbType) { + this.dbType = dbType; + } + + public String getDriverClassName() { + return driverClassName; + } + + public void setDriverClassName(String driverClassName) { + this.driverClassName = driverClassName; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getMapperLocations() { + return mapperLocations; + } + + public void setMapperLocations(String mapperLocations) { + this.mapperLocations = mapperLocations; + } +} diff --git a/src/main/java/com/cm/bigdata/dao3/kpi/IPopulationInfoDao.java b/src/main/java/com/cm/bigdata/dao3/kpi/IPopulationInfoDao.java new file mode 100644 index 0000000..6d136d7 --- /dev/null +++ b/src/main/java/com/cm/bigdata/dao3/kpi/IPopulationInfoDao.java @@ -0,0 +1,21 @@ +package com.cm.bigdata.dao3.kpi; + +import com.cm.bigdata.pojo.pos.kpi.BasePopulationInAreaCountPO; +import com.cm.bigdata.pojo.pos.kpi.BasePopulationInCommunityCountPO; +import com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoCountPO; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +@Repository +public interface IPopulationInfoDao { + + List listPopulationSaveCount(Map params); + + List listPopulationUpdateCount(Map params); + + List listPopulationInAreaCount(Map params); + + List listPopulationInCommunityCount(Map params); +} diff --git a/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzWgyDTO.java b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzWgyDTO.java index ddec4b7..bf7b2e8 100644 --- a/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzWgyDTO.java +++ b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzWgyDTO.java @@ -217,10 +217,18 @@ public class KpiKhxzWgyDTO implements Serializable { */ @ExcelIgnore private String reasonV; + @ExcelProperty(value = {"人口信息管理", "社区基数人口数"}, index = 22) + private Integer communityBasePopulationCount; + @ExcelProperty(value = {"人口信息管理", "社区录入人口数"}, index = 23) + private Integer communityPopulationCount; + @ExcelProperty(value = {"人口信息管理", "社区人口录入比例"}, index = 24) + private Double communityPopulationRate; + @ExcelIgnore + private Integer populationCount; /** * 人口信息录入 */ - @ExcelProperty(value = {"人口信息管理", "人口信息录入"}, index = 22) + @ExcelProperty(value = {"人口信息管理", "人口信息录入"}, index = 25) @JsonProperty("W") private Double w; /** @@ -231,7 +239,7 @@ public class KpiKhxzWgyDTO implements Serializable { /** * 人口信息质量管理 */ - @ExcelProperty(value = {"人口信息管理", "人口信息质量管理"}, index = 23) + @ExcelProperty(value = {"人口信息管理", "人口信息质量管理"}, index = 26) @JsonProperty("X") private Double x; /** @@ -242,7 +250,7 @@ public class KpiKhxzWgyDTO implements Serializable { /** * 人口信息维护 */ - @ExcelProperty(value = {"人口信息管理", "人口信息维护"}, index = 24) + @ExcelProperty(value = {"人口信息管理", "人口信息维护"}, index = 27) @JsonProperty("Y") private Double y; /** @@ -253,7 +261,7 @@ public class KpiKhxzWgyDTO implements Serializable { /** * 抽查情况 */ - @ExcelProperty(value = {"人口信息管理", "抽查情况"}, index = 25) + @ExcelProperty(value = {"人口信息管理", "抽查情况"}, index = 28) @JsonProperty("Z") private Double z; /** @@ -264,7 +272,7 @@ public class KpiKhxzWgyDTO implements Serializable { /** * 党建信息上报 */ - @ExcelProperty(value = {"党组织建设", "党建信息上报"}, index = 26) + @ExcelProperty(value = {"党组织建设", "党建信息上报"}, index = 29) @JsonProperty("AA") private Double aA; /** @@ -275,7 +283,7 @@ public class KpiKhxzWgyDTO implements Serializable { /** * 党建信息质量管理 */ - @ExcelProperty(value = {"党组织建设", "党建信息质量管理"}, index = 27) + @ExcelProperty(value = {"党组织建设", "党建信息质量管理"}, index = 30) @JsonProperty("AB") private Double aB; /** @@ -286,7 +294,7 @@ public class KpiKhxzWgyDTO implements Serializable { /** * 党建信息维护 */ - @ExcelProperty(value = {"党组织建设", "党建信息维护"}, index = 28) + @ExcelProperty(value = {"党组织建设", "党建信息维护"}, index = 31) @JsonProperty("AC") private Double aC; /** @@ -297,7 +305,7 @@ public class KpiKhxzWgyDTO implements Serializable { /** * 抽查情况 */ - @ExcelProperty(value = {"党组织建设", "抽查情况"}, index = 29) + @ExcelProperty(value = {"党组织建设", "抽查情况"}, index = 32) @JsonProperty("AD") private Double aD; /** @@ -308,25 +316,25 @@ public class KpiKhxzWgyDTO implements Serializable { /** * 总得分 */ - @ExcelProperty(value = {"总得分"}, index = 30) + @ExcelProperty(value = {"总得分"}, index = 33) @JsonProperty("AE") private Double aE; /** * 应发绩效工资 */ - @ExcelProperty(value = {"应发(浮动)绩效工资"}, index = 31) + @ExcelProperty(value = {"应发(浮动)绩效工资"}, index = 34) @JsonProperty("AF") private String aF; /** * 实发绩效工资 */ - @ExcelProperty(value = {"实发绩效工资"}, index = 32) + @ExcelProperty(value = {"实发绩效工资"}, index = 35) @JsonProperty("AG") private Double aG; /** * 评价 */ - @ExcelProperty(value = {"评价"}, index = 33) + @ExcelProperty(value = {"评价"}, index = 36) @JsonProperty("AH") private String aH; /** @@ -339,6 +347,11 @@ public class KpiKhxzWgyDTO implements Serializable { */ @ExcelIgnore private String modifier; + @ExcelIgnore + private String areaName; + @ExcelIgnore + private String communityName; + public Long getId() { return id; @@ -803,4 +816,52 @@ public class KpiKhxzWgyDTO implements Serializable { public void setModifier(String modifier) { this.modifier = modifier; } + + public String getAreaName() { + return areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getCommunityName() { + return communityName; + } + + public void setCommunityName(String communityName) { + this.communityName = communityName; + } + + public Integer getCommunityBasePopulationCount() { + return communityBasePopulationCount; + } + + public void setCommunityBasePopulationCount(Integer communityBasePopulationCount) { + this.communityBasePopulationCount = communityBasePopulationCount; + } + + public Integer getCommunityPopulationCount() { + return communityPopulationCount; + } + + public void setCommunityPopulationCount(Integer communityPopulationCount) { + this.communityPopulationCount = communityPopulationCount; + } + + public Double getCommunityPopulationRate() { + return communityPopulationRate; + } + + public void setCommunityPopulationRate(Double communityPopulationRate) { + this.communityPopulationRate = communityPopulationRate; + } + + public Integer getPopulationCount() { + return populationCount; + } + + public void setPopulationCount(Integer populationCount) { + this.populationCount = populationCount; + } } diff --git a/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzZfGaDTO.java b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzZfGaDTO.java index 3589cca..516797a 100644 --- a/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzZfGaDTO.java +++ b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzZfGaDTO.java @@ -101,6 +101,11 @@ public class KpiKhxzZfGaDTO implements Serializable { @ExcelProperty(value = {"案件受理数量", "案件奖励(元)"}, index = 5) @JsonProperty("F") private Double f; + @Size(max = 255, message = "编码长度不能超过255") + @ApiModelProperty("案件奖励(元)原因") + @Length(max = 255, message = "编码长度不能超过255") + @ExcelIgnore + private String reasonF; /** * 未在规定的时限内退单,影响处置时效 */ @@ -321,6 +326,14 @@ public class KpiKhxzZfGaDTO implements Serializable { this.f = f; } + public String getReasonF() { + return reasonF; + } + + public void setReasonF(String reasonF) { + this.reasonF = reasonF; + } + public Double getG() { return g; } diff --git a/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzZnbmDTO.java b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzZnbmDTO.java index 962dacf..e82843e 100644 --- a/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzZnbmDTO.java +++ b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/KpiKhxzZnbmDTO.java @@ -101,6 +101,11 @@ public class KpiKhxzZnbmDTO implements Serializable { @ExcelProperty(value = {"案件受理数量", "案件办理得分与奖励金额", "案件积分奖励(元)"}, index = 5) @JsonProperty("F") private Double f; + @Size(max= 255,message="编码长度不能超过255") + @ApiModelProperty("金额原因") + @Length(max= 255,message="编码长度不能超过255") + @ExcelIgnore + private String reasonF; /** * 案件办理得分与奖励金额得分 */ @@ -312,6 +317,14 @@ public class KpiKhxzZnbmDTO implements Serializable { this.f = f; } + public String getReasonF() { + return reasonF; + } + + public void setReasonF(String reasonF) { + this.reasonF = reasonF; + } + public Double getG() { return g; } diff --git a/src/main/java/com/cm/bigdata/pojo/pos/kpi/BasePopulationInAreaCountPO.java b/src/main/java/com/cm/bigdata/pojo/pos/kpi/BasePopulationInAreaCountPO.java new file mode 100644 index 0000000..70c6fa2 --- /dev/null +++ b/src/main/java/com/cm/bigdata/pojo/pos/kpi/BasePopulationInAreaCountPO.java @@ -0,0 +1,24 @@ +package com.cm.bigdata.pojo.pos.kpi; + +public class BasePopulationInAreaCountPO { + + private String creatorArea1; + + private Integer total; + + public String getCreatorArea1() { + return creatorArea1; + } + + public void setCreatorArea1(String creatorArea1) { + this.creatorArea1 = creatorArea1; + } + + public Integer getTotal() { + return total; + } + + public void setTotal(Integer total) { + this.total = total; + } +} diff --git a/src/main/java/com/cm/bigdata/pojo/pos/kpi/BasePopulationInCommunityCountPO.java b/src/main/java/com/cm/bigdata/pojo/pos/kpi/BasePopulationInCommunityCountPO.java new file mode 100644 index 0000000..935221c --- /dev/null +++ b/src/main/java/com/cm/bigdata/pojo/pos/kpi/BasePopulationInCommunityCountPO.java @@ -0,0 +1,33 @@ +package com.cm.bigdata.pojo.pos.kpi; + +public class BasePopulationInCommunityCountPO { + + private String creatorArea1; + private String creatorArea2; + + private Integer total; + + public String getCreatorArea1() { + return creatorArea1; + } + + public void setCreatorArea1(String creatorArea1) { + this.creatorArea1 = creatorArea1; + } + + public String getCreatorArea2() { + return creatorArea2; + } + + public void setCreatorArea2(String creatorArea2) { + this.creatorArea2 = creatorArea2; + } + + public Integer getTotal() { + return total; + } + + public void setTotal(Integer total) { + this.total = total; + } +} diff --git a/src/main/java/com/cm/bigdata/pojo/pos/kpi/CommunityPO.java b/src/main/java/com/cm/bigdata/pojo/pos/kpi/CommunityPO.java index d9d2625..a627809 100644 --- a/src/main/java/com/cm/bigdata/pojo/pos/kpi/CommunityPO.java +++ b/src/main/java/com/cm/bigdata/pojo/pos/kpi/CommunityPO.java @@ -6,6 +6,10 @@ public class CommunityPO { private String communityName; private String areaId; private String areaName; + private Integer baseGridCount; + private Integer baseCommunityBossCount; + private Integer baseHouseCount; + private Integer basePopulationCount; public String getCommunityId() { return communityId; @@ -38,4 +42,36 @@ public class CommunityPO { public void setAreaName(String areaName) { this.areaName = areaName; } + + public Integer getBaseGridCount() { + return baseGridCount; + } + + public void setBaseGridCount(Integer baseGridCount) { + this.baseGridCount = baseGridCount; + } + + public Integer getBaseCommunityBossCount() { + return baseCommunityBossCount; + } + + public void setBaseCommunityBossCount(Integer baseCommunityBossCount) { + this.baseCommunityBossCount = baseCommunityBossCount; + } + + public Integer getBaseHouseCount() { + return baseHouseCount; + } + + public void setBaseHouseCount(Integer baseHouseCount) { + this.baseHouseCount = baseHouseCount; + } + + public Integer getBasePopulationCount() { + return basePopulationCount; + } + + public void setBasePopulationCount(Integer basePopulationCount) { + this.basePopulationCount = basePopulationCount; + } } diff --git a/src/main/java/com/cm/bigdata/service/kpi/IPopulationInfoService.java b/src/main/java/com/cm/bigdata/service/kpi/IPopulationInfoService.java new file mode 100644 index 0000000..0872d14 --- /dev/null +++ b/src/main/java/com/cm/bigdata/service/kpi/IPopulationInfoService.java @@ -0,0 +1,28 @@ +package com.cm.bigdata.service.kpi; + +import com.cm.bigdata.pojo.pos.kpi.BasePopulationInAreaCountPO; +import com.cm.bigdata.pojo.pos.kpi.BasePopulationInCommunityCountPO; +import com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoCountPO; + +import java.util.List; +import java.util.Map; + +public interface IPopulationInfoService { + List listPopulationSaveCountByUserIds(List userIds); + + + List listPopulationSaveCountByUserId(String userId); + + List listPopulationSaveCountByUserIdsAndDay(List userIds, String date); + + List listPopulationSaveCountByUserIdAndDay(String userId, String date); + + List listPopulationUpdateCountByUserIdsAndDay(List userIds, String date); + + List listPopulationUpdateCountByUserIdAndDay(String userId, String date); + + List listPopulationInAreaCount(); + + List listPopulationInCommunityCount(); + +} diff --git a/src/main/java/com/cm/bigdata/service/kpi/impl/KpiServiceImpl.java b/src/main/java/com/cm/bigdata/service/kpi/impl/KpiServiceImpl.java index cabbc94..ece3d04 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/impl/KpiServiceImpl.java +++ b/src/main/java/com/cm/bigdata/service/kpi/impl/KpiServiceImpl.java @@ -39,6 +39,8 @@ public class KpiServiceImpl implements IKpiService { @Autowired private IBasePopulationInfoService basePopulationInfoService; @Autowired + private IPopulationInfoService populationInfoService; + @Autowired private IReportCaseService reportCaseService; @Autowired private IUserService userService; @@ -76,9 +78,9 @@ public class KpiServiceImpl implements IKpiService { int isHoliday = KpiUtil.hasValueInList(holidays, date) ? 1 : 0; Map> userSigninMap = KpiUtil.mapSignin(userSignService, userIds, date); Map> userSignoutMap = KpiUtil.mapSignout(userSignService, userIds, date); - Map populationCountMap = KpiUtil.mapPopulationCount(basePopulationInfoService, userIds); - Map populationSaveCountMap = KpiUtil.mapPopulationSaveCount(basePopulationInfoService, userIds, date); - Map populationUpdateCountMap = KpiUtil.mapPopulationUpdateCount(basePopulationInfoService, userIds, date); + Map populationCountMap = KpiUtil.mapPopulationCount(populationInfoService, userIds); + Map populationSaveCountMap = KpiUtil.mapPopulationSaveCount(populationInfoService, userIds, date); + Map populationUpdateCountMap = KpiUtil.mapPopulationUpdateCount(populationInfoService, userIds, date); Map leaveMap = KpiUtil.mapLeave(leaveService, userIds, date); // 删除当日数据 @@ -195,9 +197,9 @@ public class KpiServiceImpl implements IKpiService { int isHoliday = KpiUtil.hasValueInList(holidays, date) ? 1 : 0; Map> userSigninMap = KpiUtil.mapSignin(userSignService, userId, date); Map> userSignoutMap = KpiUtil.mapSignout(userSignService, userId, date); - Map populationCountMap = KpiUtil.mapPopulationCount(basePopulationInfoService, userId); - Map populationSaveCountMap = KpiUtil.mapPopulationSaveCount(basePopulationInfoService, userId, date); - Map populationUpdateCountMap = KpiUtil.mapPopulationUpdateCount(basePopulationInfoService, userId, date); + Map populationCountMap = KpiUtil.mapPopulationCount(populationInfoService, userId); + Map populationSaveCountMap = KpiUtil.mapPopulationSaveCount(populationInfoService, userId, date); + Map populationUpdateCountMap = KpiUtil.mapPopulationUpdateCount(populationInfoService, userId, date); Map leaveMap = KpiUtil.mapLeave(leaveService, userId, date); // 删除当日数据 deleteCommunityBossDayCount(date, communityBossLevel, userId); diff --git a/src/main/java/com/cm/bigdata/service/kpi/impl/PopulationInfoServiceImpl.java b/src/main/java/com/cm/bigdata/service/kpi/impl/PopulationInfoServiceImpl.java new file mode 100644 index 0000000..75b3438 --- /dev/null +++ b/src/main/java/com/cm/bigdata/service/kpi/impl/PopulationInfoServiceImpl.java @@ -0,0 +1,79 @@ +package com.cm.bigdata.service.kpi.impl; + +import com.cm.bigdata.dao3.kpi.IPopulationInfoDao; +import com.cm.bigdata.pojo.pos.kpi.BasePopulationInAreaCountPO; +import com.cm.bigdata.pojo.pos.kpi.BasePopulationInCommunityCountPO; +import com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoCountPO; +import com.cm.bigdata.service.kpi.IPopulationInfoService; +import com.cm.common.base.AbstractService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class PopulationInfoServiceImpl extends AbstractService implements IPopulationInfoService { + + @Autowired + private IPopulationInfoDao populationInfoDao; + + @Override + public List listPopulationSaveCountByUserIds(List userIds) { + Map params = new HashMap<>(); + params.put("userIds", userIds); + return populationInfoDao.listPopulationSaveCount(params); + } + + @Override + public List listPopulationSaveCountByUserId(String userId) { + Map params = new HashMap<>(); + params.put("userId", userId); + return populationInfoDao.listPopulationSaveCount(params); + } + + @Override + public List listPopulationSaveCountByUserIdsAndDay(List userIds, String date) { + Map params = new HashMap<>(); + params.put("day", date); + params.put("userIds", userIds); + return populationInfoDao.listPopulationSaveCount(params); + } + + @Override + public List listPopulationSaveCountByUserIdAndDay(String userId, String date) { + Map params = new HashMap<>(); + params.put("day", date); + params.put("userId", userId); + return populationInfoDao.listPopulationSaveCount(params); + } + + @Override + public List listPopulationUpdateCountByUserIdsAndDay(List userIds, String date) { + Map params = new HashMap<>(); + params.put("day", date); + params.put("userIds", userIds); + return populationInfoDao.listPopulationUpdateCount(params); + } + + @Override + public List listPopulationUpdateCountByUserIdAndDay(String userId, String date) { + Map params = new HashMap<>(); + params.put("day", date); + params.put("userId", userId); + return populationInfoDao.listPopulationUpdateCount(params); + } + + @Override + public List listPopulationInAreaCount() { + Map params = new HashMap<>(); + return populationInfoDao.listPopulationInAreaCount(params); + } + + @Override + public List listPopulationInCommunityCount() { + Map params = new HashMap<>(); + return populationInfoDao.listPopulationInCommunityCount(params); + } +} diff --git a/src/main/java/com/cm/bigdata/service/kpi/task/KpiKhxzWgyTask.java b/src/main/java/com/cm/bigdata/service/kpi/task/KpiKhxzWgyTask.java index ba4c154..ea54ef7 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/task/KpiKhxzWgyTask.java +++ b/src/main/java/com/cm/bigdata/service/kpi/task/KpiKhxzWgyTask.java @@ -5,11 +5,8 @@ import com.cm.bigdata.dao.kpi.IKpiHolidayDao; import com.cm.bigdata.dao.kpi.IKpiKhxzWgyDao; import com.cm.bigdata.monitor.KpiUpdateMonitor; import com.cm.bigdata.pojo.dtos.kpi.CommunityBossDTO; -import com.cm.bigdata.pojo.pos.kpi.UserPO; -import com.cm.bigdata.service.kpi.ICommunityBossService; -import com.cm.bigdata.service.kpi.IKpiService; -import com.cm.bigdata.service.kpi.IUserGridService; -import com.cm.bigdata.service.kpi.IUserService; +import com.cm.bigdata.pojo.pos.kpi.*; +import com.cm.bigdata.service.kpi.*; import com.cm.bigdata.service.kpi.task.sub.KpiKhxzWgyCRunnable; import com.cm.bigdata.service.kpi.task.sub.KpiKhxzWgyCUserRunnable; import com.cm.bigdata.service.kpi.task.sub.KpiKhxzWgyEGIKRTRunnable; @@ -39,6 +36,10 @@ public class KpiKhxzWgyTask { @Autowired private ICommunityBossService communityBossService; @Autowired + private ICommunityService communityService; + @Autowired + private IPopulationInfoService populationInfoService; + @Autowired private IUserGridService userGridService; private ExecutorService executorService = Executors.newFixedThreadPool(2); @@ -94,13 +95,20 @@ public class KpiKhxzWgyTask { } List userIds = communityBossDTOS.stream().map(CommunityBossDTO::getCommunityBossUserId).filter(StringUtils::isNotBlank).collect(Collectors.toList()); List userPOS = userService.listPO(userIds); + List basePopulationInfoCountPOS = populationInfoService.listPopulationSaveCountByUserIds(userIds); + List basePopulationInCommunityCountPOS = populationInfoService.listPopulationInCommunityCount(); + List communityPOS = communityService.listPO(new HashMap<>()); userPOS.forEach(userPO -> { String areaId = null; + String areaName = null; String communityId = null; + String communityName = null; for (CommunityBossDTO communityBossDTO : communityBossDTOS) { if (StringUtils.equals(userPO.getUserId(), communityBossDTO.getCommunityBossUserId())) { areaId = communityBossDTO.getAreaId(); + areaName = communityBossDTO.getAreaName(); communityId = communityBossDTO.getCommunityId(); + communityName = communityBossDTO.getCommunityName(); break; } } @@ -119,6 +127,11 @@ public class KpiKhxzWgyTask { saveParams.put("khMonth", khMonth); saveParams.put("wgyLevel", wgyLevel); saveParams.put("gridCount", gridCount); + saveParams.put("areaName", areaName); + saveParams.put("communityName", communityName); + setPopulationCount(userPO.getUserId(), saveParams, basePopulationInfoCountPOS); + setPopulationInCommunityCount(communityName, saveParams, basePopulationInCommunityCountPOS); + setPopulationRate(communityId, saveParams, communityPOS); kpiKhxzWgyDao.save(saveParams); }); KpiUpdateMonitor.getInstance().complete(); @@ -138,13 +151,20 @@ public class KpiKhxzWgyTask { } List userIds = communityBossDTOS.stream().map(CommunityBossDTO::getCommunityBossUserId).filter(StringUtils::isNotBlank).collect(Collectors.toList()); List userPOS = userService.listPO(userIds); + List basePopulationInfoCountPOS = populationInfoService.listPopulationSaveCountByUserIds(userIds); + List basePopulationInCommunityCountPOS = populationInfoService.listPopulationInCommunityCount(); + List communityPOS = communityService.listPO(new HashMap<>()); userPOS.forEach(userPO -> { String areaId = null; + String areaName = null; String communityId = null; + String communityName = null; for (CommunityBossDTO communityBossDTO : communityBossDTOS) { if (StringUtils.equals(userPO.getUserId(), communityBossDTO.getCommunityBossUserId())) { areaId = communityBossDTO.getAreaId(); + areaName = communityBossDTO.getAreaName(); communityId = communityBossDTO.getCommunityId(); + communityName = communityBossDTO.getCommunityName(); break; } } @@ -163,6 +183,11 @@ public class KpiKhxzWgyTask { saveParams.put("khMonth", khMonth); saveParams.put("wgyLevel", wgyLevel); saveParams.put("gridCount", gridCount); + saveParams.put("areaName", areaName); + saveParams.put("communityName", communityName); + setPopulationCount(userPO.getUserId(), saveParams, basePopulationInfoCountPOS); + setPopulationInCommunityCount(communityName, saveParams, basePopulationInCommunityCountPOS); + setPopulationRate(communityId, saveParams, communityPOS); kpiKhxzWgyDao.save(saveParams); }); } @@ -175,4 +200,49 @@ public class KpiKhxzWgyTask { return kpiKhxzWgyDao.listUserId(params); } + private void setPopulationCount(String userId, Map params, List basePopulationInfoCountPOS) { + boolean isExist = false; + for (BasePopulationInfoCountPO basePopulationInfoCountPO : basePopulationInfoCountPOS) { + if (StringUtils.equals(userId, basePopulationInfoCountPO.getUserId())) { + params.put("populationCount", basePopulationInfoCountPO.getTotal()); + isExist = true; + break; + } + } + if (!isExist) { + params.put("populationCount", 0); + } + } + + private void setPopulationInCommunityCount(String communityName, Map params, List populationInCommunityCountPOS) { + boolean isExist = false; + for (BasePopulationInCommunityCountPO basePopulationInCommunityCountPO : populationInCommunityCountPOS) { + if (StringUtils.equals(communityName, basePopulationInCommunityCountPO.getCreatorArea2())) { + params.put("communityPopulationCount", basePopulationInCommunityCountPO.getTotal()); + isExist = true; + break; + } + } + if (!isExist) { + params.put("communityPopulationCount", 0); + } + } + + private void setPopulationRate(String communityId, Map params, List communityPOS) { + Integer communityPopulationCount = (Integer) params.get("communityPopulationCount"); + for (CommunityPO communityPO : communityPOS) { + if (StringUtils.equals(communityId, communityPO.getCommunityId())) { + params.put("communityBasePopulationCount", communityPO.getBasePopulationCount()); + if (communityPopulationCount > communityPO.getBasePopulationCount()) { + params.put("communityPopulationRate", 1D); + break; + } + if (communityPO.getBasePopulationCount() == 0) { + params.put("communityPopulationRate", 0D); + break; + } + params.put("communityPopulationRate", Math.round((double) communityPopulationCount / communityPO.getBasePopulationCount() * 100D) * 0.01); + } + } + } } diff --git a/src/main/java/com/cm/bigdata/service/kpi/task/KpiKhxzZnbmTask.java b/src/main/java/com/cm/bigdata/service/kpi/task/KpiKhxzZnbmTask.java index c0fe851..d8f103d 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/task/KpiKhxzZnbmTask.java +++ b/src/main/java/com/cm/bigdata/service/kpi/task/KpiKhxzZnbmTask.java @@ -19,6 +19,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.stream.Collectors; @Service public class KpiKhxzZnbmTask { @@ -42,7 +43,8 @@ public class KpiKhxzZnbmTask { KpiUpdateMonitor.getInstance().complete(); return; } - executorService.execute(new KpiKhxzZnbmCDEFGLMRunnable(kpiKhxzZnbmDao, kpiDao, khYear, khMonth, userIds)); + List ldjcddUserIds = listLdjcddUserId(); + executorService.execute(new KpiKhxzZnbmCDEFGLMRunnable(kpiKhxzZnbmDao, kpiDao, khYear, khMonth, userIds, ldjcddUserIds)); executorService.execute(new KpiKhxzZnbmIJRunnable(kpiKhxzZnbmDao, kpiDao, khYear, khMonth, userIds)); } @@ -84,4 +86,17 @@ public class KpiKhxzZnbmTask { return kpiKhxzZnbmDao.listUserId(params); } + /** + * 劳动监察大队的用户ID列表 + * departmentId: 920105cd-8596-4d24-96ac-6d984abc915f + * + * @return + */ + private List listLdjcddUserId() { + Map params = new HashMap<>(); + // 劳动检查大队 + params.put("departmentId", "920105cd-8596-4d24-96ac-6d984abc915f"); + return userService.listPO(params).stream().map(UserPO::getUserId).collect(Collectors.toList()); + } + } diff --git a/src/main/java/com/cm/bigdata/service/kpi/task/sub/KpiKhxzZfGaDEFRunnable.java b/src/main/java/com/cm/bigdata/service/kpi/task/sub/KpiKhxzZfGaDEFRunnable.java index 9ca7e59..f1eb193 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/task/sub/KpiKhxzZfGaDEFRunnable.java +++ b/src/main/java/com/cm/bigdata/service/kpi/task/sub/KpiKhxzZfGaDEFRunnable.java @@ -47,7 +47,7 @@ public class KpiKhxzZfGaDEFRunnable implements Runnable { updateParams.put("userId", userId); updateParams.put("D", unInspectCount); updateParams.put("E", inspectCount); - double F = inspectCount * 200 + unInspectCount * 200 * 0.6; + double F = inspectCount * 50 + unInspectCount * 50 * 0.6; updateParams.put("F", F); kpiKhxzZfGaDao.updateDEF(updateParams); }); diff --git a/src/main/java/com/cm/bigdata/service/kpi/task/sub/KpiKhxzZnbmCDEFGLMRunnable.java b/src/main/java/com/cm/bigdata/service/kpi/task/sub/KpiKhxzZnbmCDEFGLMRunnable.java index 3c9f26a..588f978 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/task/sub/KpiKhxzZnbmCDEFGLMRunnable.java +++ b/src/main/java/com/cm/bigdata/service/kpi/task/sub/KpiKhxzZnbmCDEFGLMRunnable.java @@ -4,6 +4,7 @@ import com.cm.bigdata.dao.kpi.IKpiDao; import com.cm.bigdata.dao.kpi.IKpiKhxzZnbmDao; import com.cm.bigdata.monitor.KpiUpdateMonitor; import com.cm.bigdata.pojo.pos.kpi.CasePO; +import org.apache.commons.lang3.StringUtils; import java.util.HashMap; import java.util.List; @@ -16,13 +17,15 @@ public class KpiKhxzZnbmCDEFGLMRunnable implements Runnable { private int khYear; private int khMonth; private List userIds; + private List ldjcddUserIds; - public KpiKhxzZnbmCDEFGLMRunnable(IKpiKhxzZnbmDao kpiKhxzZnbmDao, IKpiDao kpiDao, int khYear, int khMonth, List userIds) { + public KpiKhxzZnbmCDEFGLMRunnable(IKpiKhxzZnbmDao kpiKhxzZnbmDao, IKpiDao kpiDao, int khYear, int khMonth, List userIds, List ldjcddUserIds) { this.kpiKhxzZnbmDao = kpiKhxzZnbmDao; this.kpiDao = kpiDao; this.khYear = khYear; this.khMonth = khMonth; this.userIds = userIds; + this.ldjcddUserIds = ldjcddUserIds; } @Override @@ -48,7 +51,12 @@ public class KpiKhxzZnbmCDEFGLMRunnable implements Runnable { updateParams.put("C", handleCount); updateParams.put("D", inspectCount); updateParams.put("E", unInspectCount); - updateParams.put("F", inspectCount * 200D); + // 这里劳动监察大队是50,其余的部门是200 + if (ldjcddUserIds.contains(userId)) { + updateParams.put("F", inspectCount * 50D); + } else { + updateParams.put("F", inspectCount * 200D); + } double G = handleCount == 0 ? 0 : 60D / handleCount * inspectCount; updateParams.put("G", G); updateParams.put("L", G > 0 ? 20 : 0); diff --git a/src/main/java/com/cm/bigdata/utils/KpiUtil.java b/src/main/java/com/cm/bigdata/utils/KpiUtil.java index 0623cb1..446f37c 100644 --- a/src/main/java/com/cm/bigdata/utils/KpiUtil.java +++ b/src/main/java/com/cm/bigdata/utils/KpiUtil.java @@ -232,8 +232,8 @@ public class KpiUtil { **/ } - public static Map mapPopulationCount(IBasePopulationInfoService basePopulationInfoService, List userIds) { - List basePopulationInfoCountPOS = basePopulationInfoService.listPopulationSaveCountByUserIds(userIds); + public static Map mapPopulationCount(IPopulationInfoService populationInfoService, List userIds) { + List basePopulationInfoCountPOS = populationInfoService.listPopulationSaveCountByUserIds(userIds); Map map = new HashMap<>(); basePopulationInfoCountPOS.forEach(basePopulationInfoCountPO -> { map.put(basePopulationInfoCountPO.getUserId(), basePopulationInfoCountPO.getTotal()); @@ -241,8 +241,8 @@ public class KpiUtil { return map; } - public static Map mapPopulationCount(IBasePopulationInfoService basePopulationInfoService, String userId) { - List basePopulationInfoCountPOS = basePopulationInfoService.listPopulationSaveCountByUserId(userId); + public static Map mapPopulationCount(IPopulationInfoService populationInfoService, String userId) { + List basePopulationInfoCountPOS = populationInfoService.listPopulationSaveCountByUserId(userId); Map map = new HashMap<>(); basePopulationInfoCountPOS.forEach(basePopulationInfoCountPO -> { map.put(basePopulationInfoCountPO.getUserId(), basePopulationInfoCountPO.getTotal()); @@ -250,8 +250,8 @@ public class KpiUtil { return map; } - public static Map mapPopulationSaveCount(IBasePopulationInfoService basePopulationInfoService, List userIds, String date) { - List basePopulationInfoCountPOS = basePopulationInfoService.listPopulationSaveCountByUserIdsAndDay(userIds, date); + public static Map mapPopulationSaveCount(IPopulationInfoService populationInfoService, List userIds, String date) { + List basePopulationInfoCountPOS = populationInfoService.listPopulationSaveCountByUserIdsAndDay(userIds, date); Map map = new HashMap<>(); basePopulationInfoCountPOS.forEach(basePopulationInfoCountPO -> { map.put(basePopulationInfoCountPO.getUserId(), basePopulationInfoCountPO.getTotal()); @@ -259,8 +259,8 @@ public class KpiUtil { return map; } - public static Map mapPopulationSaveCount(IBasePopulationInfoService basePopulationInfoService, String userId, String date) { - List basePopulationInfoCountPOS = basePopulationInfoService.listPopulationSaveCountByUserIdAndDay(userId, date); + public static Map mapPopulationSaveCount(IPopulationInfoService populationInfoService, String userId, String date) { + List basePopulationInfoCountPOS = populationInfoService.listPopulationSaveCountByUserIdAndDay(userId, date); Map map = new HashMap<>(); basePopulationInfoCountPOS.forEach(basePopulationInfoCountPO -> { map.put(basePopulationInfoCountPO.getUserId(), basePopulationInfoCountPO.getTotal()); @@ -268,8 +268,8 @@ public class KpiUtil { return map; } - public static Map mapPopulationUpdateCount(IBasePopulationInfoService basePopulationInfoService, List userIds, String date) { - List basePopulationInfoCountPOS = basePopulationInfoService.listPopulationUpdateCountByUserIdsAndDay(userIds, date); + public static Map mapPopulationUpdateCount(IPopulationInfoService populationInfoService, List userIds, String date) { + List basePopulationInfoCountPOS = populationInfoService.listPopulationUpdateCountByUserIdsAndDay(userIds, date); Map map = new HashMap<>(); basePopulationInfoCountPOS.forEach(basePopulationInfoCountPO -> { map.put(basePopulationInfoCountPO.getUserId(), basePopulationInfoCountPO.getTotal()); @@ -277,8 +277,8 @@ public class KpiUtil { return map; } - public static Map mapPopulationUpdateCount(IBasePopulationInfoService basePopulationInfoService, String userId, String date) { - List basePopulationInfoCountPOS = basePopulationInfoService.listPopulationUpdateCountByUserIdAndDay(userId, date); + public static Map mapPopulationUpdateCount(IPopulationInfoService populationInfoService, String userId, String date) { + List basePopulationInfoCountPOS = populationInfoService.listPopulationUpdateCountByUserIdAndDay(userId, date); Map map = new HashMap<>(); basePopulationInfoCountPOS.forEach(basePopulationInfoCountPO -> { map.put(basePopulationInfoCountPO.getUserId(), basePopulationInfoCountPO.getTotal()); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 6b20cf3..a926c39 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -34,6 +34,13 @@ spring: username: root password: root mapper-locations: classpath*:mybatis/db2-mapper/**/*.xml + db3: + url: jdbc:mysql://192.168.0.151:3306/db_baotou_city?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false + db-type: mysql + driver-class-name: com.mysql.jdbc.Driver + username: root + password: root + mapper-locations: classpath*:mybatis/db3-mapper/**/*.xml initial-size: 2 min-idle: 2 max-active: 5 diff --git a/src/main/resources/mybatis/db2-mapper/kpi/community-mapper.xml b/src/main/resources/mybatis/db2-mapper/kpi/community-mapper.xml index d0c3c48..5a7b584 100644 --- a/src/main/resources/mybatis/db2-mapper/kpi/community-mapper.xml +++ b/src/main/resources/mybatis/db2-mapper/kpi/community-mapper.xml @@ -7,6 +7,10 @@ + + + + diff --git a/src/main/resources/mybatis/db3-mapper/kpi/population-info-mapper.xml b/src/main/resources/mybatis/db3-mapper/kpi/population-info-mapper.xml new file mode 100644 index 0000000..b7293e9 --- /dev/null +++ b/src/main/resources/mybatis/db3-mapper/kpi/population-info-mapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/kpi/kpi-khxz-wgy-mapper.xml b/src/main/resources/mybatis/mapper/kpi/kpi-khxz-wgy-mapper.xml index 5686be1..b012bf2 100644 --- a/src/main/resources/mybatis/mapper/kpi/kpi-khxz-wgy-mapper.xml +++ b/src/main/resources/mybatis/mapper/kpi/kpi-khxz-wgy-mapper.xml @@ -61,6 +61,12 @@ + + + + + + @@ -72,7 +78,13 @@ kh_year, kh_month, grid_count, - B + B, + area_name, + community_name, + community_base_population_count, + community_population_count, + community_population_rate, + population_count ) VALUES ( #{areaId}, #{communityId}, @@ -81,7 +93,13 @@ #{khYear}, #{khMonth}, #{gridCount}, - #{B} + #{B}, + #{areaName}, + #{communityName}, + #{communityBasePopulationCount}, + #{communityPopulationCount}, + #{communityPopulationRate}, + #{populationCount} ) diff --git a/src/main/resources/mybatis/mapper/kpi/kpi-khxz-zfga-mapper.xml b/src/main/resources/mybatis/mapper/kpi/kpi-khxz-zfga-mapper.xml index 470dd6f..8aa3ac1 100644 --- a/src/main/resources/mybatis/mapper/kpi/kpi-khxz-zfga-mapper.xml +++ b/src/main/resources/mybatis/mapper/kpi/kpi-khxz-zfga-mapper.xml @@ -15,6 +15,7 @@ + @@ -124,6 +125,8 @@ UPDATE kpi_khxz_zf_ga SET + F = #{F}, + reasonF = #{reasonF}, G = #{G}, reasonG = #{reasonG}, H = #{H}, diff --git a/src/main/resources/mybatis/mapper/kpi/kpi-khxz-znbm-mapper.xml b/src/main/resources/mybatis/mapper/kpi/kpi-khxz-znbm-mapper.xml index 1b44326..47d8792 100644 --- a/src/main/resources/mybatis/mapper/kpi/kpi-khxz-znbm-mapper.xml +++ b/src/main/resources/mybatis/mapper/kpi/kpi-khxz-znbm-mapper.xml @@ -15,6 +15,7 @@ + @@ -128,6 +129,8 @@ UPDATE kpi_khxz_znbm SET + F = #{F}, + reasonF = #{reasonF}, H = #{H}, reasonH = #{reasonH}, K = #{K},