Commit c4c70b6a by zhangkb

提交整合考核指标报表2数据代码

parent 94282e26
...@@ -33,4 +33,12 @@ public class IndicatorReportCtrl { ...@@ -33,4 +33,12 @@ public class IndicatorReportCtrl {
indicatorsReportService.dealBaseIndReportOneData(date, compareObjs); indicatorsReportService.dealBaseIndReportOneData(date, compareObjs);
return "基础项本期同期报表数据开始整合..."; return "基础项本期同期报表数据开始整合...";
} }
@ApiOperation(value = "整合考核指标报表数据2", notes = "整合考核指标报表数据2")
@PostMapping(value = "/dealDriveReportTwo")
public String dealDriveReportTwo(@RequestParam String compareUnitId,@RequestParam List<String> indIds,
@RequestParam List<String> compareObjs,@RequestParam Integer date) {
indicatorsReportService.dealDriveIndReportTwoData(compareUnitId, indIds, compareObjs, date);
return "整合考核指标报表数据2开始整合...";
}
} }
...@@ -24,7 +24,7 @@ public class BaseIndDef { ...@@ -24,7 +24,7 @@ public class BaseIndDef {
private String indUnit;//数据项单位 private String indUnit;//数据项单位
private String indDesc;//说明 private String indDesc;//说明
private Integer indSource;//数据项来源 1:excel导入 2:手工填报 private Integer indSource;//数据项来源 1:excel导入 2:手工填报
private String indFrequency;//数据源频度 0:月度 1:季度 2:年度 private String indFrequency;//数据源频度 0:月度 1:季度 2:年度 3:半年度
private String indFormat;//指标公式 private String indFormat;//指标公式
private String indFormatDesc;//指标公式描述 private String indFormatDesc;//指标公式描述
private String creater; private String creater;
......
...@@ -28,7 +28,7 @@ public class DriveIndDef { ...@@ -28,7 +28,7 @@ public class DriveIndDef {
private Integer indCalScoreRule;//计分规则 private Integer indCalScoreRule;//计分规则
private String indCalScoreRuleDesc;//计分规则描述 private String indCalScoreRuleDesc;//计分规则描述
private String isUnitCalScore;//是否参与单位得分计算 是:1 否:0 private String isUnitCalScore;//是否参与单位得分计算 是:1 否:0
private String indFrequency;//指标频度 0:月度给数 1:季度给数 2:年度给数 private String indFrequency;//指标频度 0:月度给数 1:季度给数 2:年度给数 3:半年度
private String growCalType;//增幅计算类型 0:本期-同期 1:(本期-同期)/同期*100 private String growCalType;//增幅计算类型 0:本期-同期 1:(本期-同期)/同期*100
private String version;//版本号 private String version;//版本号
private String code;//标识编码 private String code;//标识编码
......
...@@ -25,7 +25,7 @@ public class IndicatorsReportOne { ...@@ -25,7 +25,7 @@ public class IndicatorsReportOne {
private String compareType;//对标类型: 1:日 2:月 3:季 4:年 private String compareType;//对标类型: 1:日 2:月 3:季 4:年
private String unit;//指标单位 private String unit;//指标单位
private String depart;//指标归属部门 private String depart;//指标归属部门
private String catalogType;//指标归属类别 private Integer catalogType;//指标归属类别
private String currentValue;//本期值 private String currentValue;//本期值
private String lastSameValue;// 同期值 private String lastSameValue;// 同期值
private String valueRate;//同比 private String valueRate;//同比
......
...@@ -24,6 +24,7 @@ public class IndicatorsReportTwo { ...@@ -24,6 +24,7 @@ public class IndicatorsReportTwo {
private Integer compareDate;//对标时间 private Integer compareDate;//对标时间
private String compareType;//对标类型 private String compareType;//对标类型
private String unit;//单位 private String unit;//单位
private Integer catalogType;//指标归属类别
private String currentActualAverage;//本期全省平均值 private String currentActualAverage;//本期全省平均值
private String sameActualAverage;//同期全省平均值 private String sameActualAverage;//同期全省平均值
private String averageRate;//全省平均分同比 private String averageRate;//全省平均分同比
......
package com.keymobile.indicators.model.mapper.report; package com.keymobile.indicators.model.mapper.report;
import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -11,4 +13,8 @@ import tk.mybatis.mapper.common.BaseMapper; ...@@ -11,4 +13,8 @@ import tk.mybatis.mapper.common.BaseMapper;
public interface ReportTwoMapper extends BaseMapper<IndicatorsReportTwo>{ public interface ReportTwoMapper extends BaseMapper<IndicatorsReportTwo>{
public IndicatorsReportTwo getDataByParam(@Param("indId")String indId,@Param("compareUnitId")String compareUnitId, public IndicatorsReportTwo getDataByParam(@Param("indId")String indId,@Param("compareUnitId")String compareUnitId,
@Param("date")Integer date,@Param("type")String type); @Param("date")Integer date,@Param("type")String type);
public void batchSave(@Param("datas")List<IndicatorsReportTwo> datas);
public void batchUpdate(@Param("datas")List<IndicatorsReportTwo> datas);
} }
...@@ -53,6 +53,24 @@ public class IndicatorsReportService { ...@@ -53,6 +53,24 @@ public class IndicatorsReportService {
return reportTwoData.getId(); return reportTwoData.getId();
} }
public void batchSaveOrUpdateReportTwo(List<IndicatorsReportTwo> reportTwoDatas) {
List<IndicatorsReportTwo> addList = new ArrayList<>();
List<IndicatorsReportTwo> updateList = new ArrayList<>();
for(IndicatorsReportTwo reportTwoData : reportTwoDatas) {
if(reportTwoData.getId()==null) {
addList.add(reportTwoData);
}else {
updateList.add(reportTwoData);
}
}
if(!addList.isEmpty()) {
reportTwoMapper.batchSave(addList);
}
if(!updateList.isEmpty()) {
reportTwoMapper.batchUpdate(updateList);
}
}
public Integer saveOrUpdate(IndicatorsReportOne reportData) { public Integer saveOrUpdate(IndicatorsReportOne reportData) {
if(reportData.getId()==null) { if(reportData.getId()==null) {
reportOneMapper.insert(reportData); reportOneMapper.insert(reportData);
...@@ -82,6 +100,7 @@ public class IndicatorsReportService { ...@@ -82,6 +100,7 @@ public class IndicatorsReportService {
public void dealDriveIndReportTwoData(String compareUnitId,List<String> indIds, public void dealDriveIndReportTwoData(String compareUnitId,List<String> indIds,
List<String> compareObjs,Integer date) { List<String> compareObjs,Integer date) {
List<IndicatorsReportTwo> dataList = new ArrayList<>();
String type = this.getCompareType(date); String type = this.getCompareType(date);
for(String indId : indIds) { for(String indId : indIds) {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
...@@ -94,16 +113,17 @@ public class IndicatorsReportService { ...@@ -94,16 +113,17 @@ public class IndicatorsReportService {
//判断是否存在 //判断是否存在
IndicatorsReportTwo indReportData = reportTwoMapper.getDataByParam(indId, IndicatorsReportTwo indReportData = reportTwoMapper.getDataByParam(indId,
compareUnitId, date, type); compareUnitId, date, type);
if(indReportData!=null) { if(indReportData==null) {
indReportData = new IndicatorsReportTwo(); indReportData = new IndicatorsReportTwo();
} }
indReportData.setCompareType(type); indReportData.setCompareType(type);
indReportData.setCompareUnitId(compareUnitId); indReportData.setCompareUnitId(compareUnitId);
indReportData.setCompareDate(date); indReportData.setCompareDate(date);
indReportData = fillDriveIndiReportTwoData(indId, calDatas, indReportData, date, compareObjs);
this.saveOrUpdateReportTwo(indReportData); dataList.add(indReportData);
} }
} }
this.batchSaveOrUpdateReportTwo(dataList);//批量新增或修改
} }
//异步执行基础项数据整合 //异步执行基础项数据整合
...@@ -184,36 +204,42 @@ public class IndicatorsReportService { ...@@ -184,36 +204,42 @@ public class IndicatorsReportService {
indReportData.setIndId(driveIndDef.getIndId()); indReportData.setIndId(driveIndDef.getIndId());
indReportData.setIndName(driveIndDef.getIndName()); indReportData.setIndName(driveIndDef.getIndName());
indReportData.setUnit(driveIndDef.getIndUnit()); indReportData.setUnit(driveIndDef.getIndUnit());
indReportData.setCatalogType(driveIndDef.getCatalogId()==null? null:driveIndDef.getCatalogId());
} }
//取出一项获取平均值 //取出一项获取平均值
if(!calDatas.isEmpty()) { if(!calDatas.isEmpty()) {
indReportData.setCurrentActualAverage(calDatas.get(0).getActualAverage()); //获取全省维度的指标值做为平均数
DriveIndCalResultDef currentActualAverage = driveIndCalResultDefMapper.findByIndIdAndDateAndCompareObj(
indId, date, "43");
if(currentActualAverage!=null) {
indReportData.setCurrentActualAverage(currentActualAverage.getValue());
}
//查找同期对标结果 //查找同期对标结果
DriveIndCalResultDef sameCalData = driveIndCalResultDefMapper.findByIndIdAndDateAndCompareObj( DriveIndCalResultDef sameActualAverage = driveIndCalResultDefMapper.findByIndIdAndDateAndCompareObj(
indId, (date-100), calDatas.get(0).getCompareObj()); indId, (date-100), "43");
if(sameCalData!=null) { if(sameActualAverage!=null) {
indReportData.setSameActualAverage(sameCalData.getActualAverage()); indReportData.setSameActualAverage(sameActualAverage.getValue());
//获取指标正反向类型 //获取指标正反向类型
String indRule = null; String indRule = null;
if(driveIndDef!=null) { if(driveIndDef!=null) {
indRule = driveIndDef.getIndRule(); indRule = driveIndDef.getIndRule();
} }
//算平均分同比 //算平均分同比
String averageRate = CalculateUtils.calGowth(calDatas.get(0).getActualAverage(), String averageRate = CalculateUtils.calGowth(currentActualAverage.getValue(),
sameCalData.getActualAverage(), indRule); sameActualAverage.getValue(), indRule);
indReportData.setAverageRate(averageRate); indReportData.setAverageRate(averageRate);
//计算变化趋势 //计算变化趋势
if(StringUtils.isNotBlank(averageRate)) { if(StringUtils.isNotBlank(averageRate)) {
if("1".equals(indRule)) {//反向 if("1".equals(indRule)) {//反向
if(Double.parseDouble(calDatas.get(0).getActualAverage())> if(Double.parseDouble(currentActualAverage.getValue())>
Double.parseDouble(sameCalData.getActualAverage())) { Double.parseDouble(sameActualAverage.getValue())) {
indReportData.setTrend("1");//趋差 indReportData.setTrend("1");//趋差
}else { }else {
indReportData.setTrend("0"); indReportData.setTrend("0");
} }
}else {//其他当正向处理 }else {//其他当正向处理
if(Double.parseDouble(calDatas.get(0).getActualAverage())> if(Double.parseDouble(currentActualAverage.getValue())>
Double.parseDouble(sameCalData.getActualAverage())) { Double.parseDouble(sameActualAverage.getValue())) {
indReportData.setTrend("0");//趋好 indReportData.setTrend("0");//趋好
}else { }else {
indReportData.setTrend("1"); indReportData.setTrend("1");
...@@ -228,9 +254,13 @@ public class IndicatorsReportService { ...@@ -228,9 +254,13 @@ public class IndicatorsReportService {
}else { }else {
average = calDatas.get(0).getAverage(); average = calDatas.get(0).getAverage();
} }
indReportData.setAverageRate(average); indReportData.setCurrentAverage(average);
} }
if(!calDatas.isEmpty()) { if(!calDatas.isEmpty()) {
Map<String,String> compareObjMapper = new HashMap<>();//定义地区编码和地区名映射map
for(DriveIndCalResultDef calData : calDatas) {
compareObjMapper.put(calData.getCompareObj(),calData.getCompareObjDesc());
}
//标杆单位 //标杆单位
indReportData.setBestUnit(calDatas.get(0).getCompareObj()); indReportData.setBestUnit(calDatas.get(0).getCompareObj());
indReportData.setBestUnitDesc(calDatas.get(0).getCompareObjDesc()); indReportData.setBestUnitDesc(calDatas.get(0).getCompareObjDesc());
...@@ -244,6 +274,71 @@ public class IndicatorsReportService { ...@@ -244,6 +274,71 @@ public class IndicatorsReportService {
Map<String,Object> sameImproveResult = this.sameImproveUnits(indId, date, compareObjs, Map<String,Object> sameImproveResult = this.sameImproveUnits(indId, date, compareObjs,
calDatas); calDatas);
indReportData.setSameImproveUnits(Integer.parseInt(sameImproveResult.get("improveNum").toString())); indReportData.setSameImproveUnits(Integer.parseInt(sameImproveResult.get("improveNum").toString()));
//同比提升前三
int start = 0;
int end = 3;
Map<String,Integer> resultRank = (Map<String,Integer>)sameImproveResult.get("resultRank");
if(!resultRank.isEmpty()) {
StringBuilder sameImproveHeadThree = new StringBuilder("");//同比提升前三
StringBuilder sameImproveHeadThreeDesc = new StringBuilder("");
for(Map.Entry<String,Integer> entry : resultRank.entrySet()) {
sameImproveHeadThree.append(entry.getKey()).append(";");
sameImproveHeadThreeDesc.append(compareObjMapper.get(entry.getKey())).append(";");
start += 1;
if(start>=end) {
break;
}
}
indReportData.setSameImproveHeadThree(sameImproveHeadThree.toString());
indReportData.setSameImproveHeadThreeDesc(sameImproveHeadThreeDesc.toString());
start = 0;
//同比提升末三
StringBuilder sameImproveAfterThree = new StringBuilder("");//同比提升前三
StringBuilder sameImproveAfterThreeDesc = new StringBuilder("");//
resultRank = CalculateUtils.sortMapByValue(resultRank,1);//按照value从大到小排序
for(Map.Entry<String,Integer> entry : resultRank.entrySet()) {
sameImproveAfterThree.append(entry.getKey()).append(";");
sameImproveAfterThreeDesc.append(compareObjMapper.get(entry.getKey())).append(";");
start += 1;
if(start>=end) {
break;
}
}
indReportData.setSameImproveAfterThree(sameImproveAfterThree.toString());
indReportData.setSameImproveAfterThreeDesc(sameImproveAfterThreeDesc.toString());
}
//排名前三
start = 0;
StringBuilder rankHeadThree = new StringBuilder("");
StringBuilder rankHeadThreeDesc = new StringBuilder("");
for(DriveIndCalResultDef calData : calDatas) {
rankHeadThree.append(calData.getCompareObj()).append(";");
rankHeadThreeDesc.append(calData.getCompareObjDesc()).append(";");
start += 1;
if(start>=end) {
break;
}
}
indReportData.setRankHeadThree(rankHeadThree.toString());
indReportData.setRankHeadThreeDesc(rankHeadThreeDesc.toString());
//排名莫三
start = 0;
StringBuilder rankAfterThree = new StringBuilder("");
StringBuilder rankAfterThreeDesc = new StringBuilder("");
for(int i=(calDatas.size()-1);i>=0;i--) {
if("NaN".equals(calDatas.get(i).getValue()) ||
"Infinite".equals(calDatas.get(i).getValue())) {
continue;
}
rankAfterThree.append(calDatas.get(i).getCompareObj()).append(";");
rankAfterThreeDesc.append(calDatas.get(i).getCompareObjDesc()).append(";");
start += 1;
if(start>=end) {
break;
}
}
indReportData.setRankAfterThree(rankAfterThree.toString());
indReportData.setRankAfterThreeDesc(rankAfterThreeDesc.toString());
} }
return indReportData; return indReportData;
} }
...@@ -267,7 +362,10 @@ public class IndicatorsReportService { ...@@ -267,7 +362,10 @@ public class IndicatorsReportService {
for(DriveIndCalResultDef currentCalData : currentCalDatas) { for(DriveIndCalResultDef currentCalData : currentCalDatas) {
for(DriveIndCalResultDef sameCalData : sameCalDatas) { for(DriveIndCalResultDef sameCalData : sameCalDatas) {
if(sameCalData.getCompareObj().equals(currentCalData.getCompareObj()) if(sameCalData.getCompareObj().equals(currentCalData.getCompareObj())
&& !"NaN".equals(sameCalData.getValue()) && !"NaN".equals(currentCalData.getValue())) { && !"NaN".equals(sameCalData.getValue())
&&!"Infinite".equals(sameCalData.getValue())
&& !"NaN".equals(currentCalData.getValue())
&&!"Infinite".equals(currentCalData.getValue())) {
rankMap.put(currentCalData.getCompareObj(), rankMap.put(currentCalData.getCompareObj(),
String.valueOf((currentCalData.getRank()-sameCalData.getRank()))); String.valueOf((currentCalData.getRank()-sameCalData.getRank())));
if((currentCalData.getRank()-sameCalData.getRank())>0) { if((currentCalData.getRank()-sameCalData.getRank())>0) {
...@@ -278,6 +376,7 @@ public class IndicatorsReportService { ...@@ -278,6 +376,7 @@ public class IndicatorsReportService {
} }
} }
resultRank = CalculateUtils.rankValue(rankMap, "0"); resultRank = CalculateUtils.rankValue(rankMap, "0");
resultRank = CalculateUtils.sortMapByValue(resultRank,0);//按照value从小到大排序
} }
result.put("improveNum", improveNum); result.put("improveNum", improveNum);
result.put("resultRank", resultRank); result.put("resultRank", resultRank);
...@@ -329,7 +428,7 @@ public class IndicatorsReportService { ...@@ -329,7 +428,7 @@ public class IndicatorsReportService {
if(driveIndDef!=null) { if(driveIndDef!=null) {
indReportData.setIndName(driveIndDef.getIndName()); indReportData.setIndName(driveIndDef.getIndName());
indReportData.setDepart(driveIndDef.getIndDept()); indReportData.setDepart(driveIndDef.getIndDept());
indReportData.setCatalogType(driveIndDef.getCatalogId()==null? "":driveIndDef.getCatalogId().toString()); indReportData.setCatalogType(driveIndDef.getCatalogId()==null? null:driveIndDef.getCatalogId());
} }
indReportData.setCompareObj(calData.getCompareObj());//对标对象 indReportData.setCompareObj(calData.getCompareObj());//对标对象
indReportData.setCompareObjDesc(calData.getCompareObjDesc());//对标对象描述 indReportData.setCompareObjDesc(calData.getCompareObjDesc());//对标对象描述
......
package com.keymobile.indicators.utils; package com.keymobile.indicators.utils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -227,6 +230,41 @@ public class CalculateUtils { ...@@ -227,6 +230,41 @@ public class CalculateUtils {
Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,
LinkedHashMap::new)); LinkedHashMap::new));
} }
//type:0从小到大 1从大到小
public static Map<String, Integer> sortMapByValue(Map<String, Integer> oriMap,Integer type) {
if (oriMap == null || oriMap.isEmpty()) {
return null;
}
Map<String, Integer> sortedMap = new LinkedHashMap<String, Integer>();
List<Map.Entry<String, Integer>> entryList = new ArrayList<Map.Entry<String, Integer>>(
oriMap.entrySet());
Collections.sort(entryList, new MapValueComparator(type));
Iterator<Map.Entry<String, Integer>> iter = entryList.iterator();
Map.Entry<String, Integer> tmpEntry = null;
while (iter.hasNext()) {
tmpEntry = iter.next();
sortedMap.put(tmpEntry.getKey(), tmpEntry.getValue());
}
return sortedMap;
}
public static class MapValueComparator implements Comparator<Map.Entry<String, Integer>> {
private Integer type;//0:从小到大 1:从大到小
public MapValueComparator(Integer type) {
this.type = type;
}
@Override
public int compare(Entry<String, Integer> me1, Entry<String, Integer> me2) {
if(type==0) {
return me1.getValue().compareTo(me2.getValue());//按照从小到大
}
return me2.getValue().compareTo(me1.getValue());//按照从大到小
}
}
public static void main(String[] args) { public static void main(String[] args) {
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
...@@ -240,6 +278,7 @@ public class CalculateUtils { ...@@ -240,6 +278,7 @@ public class CalculateUtils {
map.put("1008", "-6"); map.put("1008", "-6");
CalculateUtils cal = new CalculateUtils(); CalculateUtils cal = new CalculateUtils();
Map<String,Integer> result = cal.rankValue(map, "0"); Map<String,Integer> result = cal.rankValue(map, "0");
result = cal.sortMapByValue(result,1);
System.out.println(result); System.out.println(result);
// //
// String formula = "([1001]+[1002])/2"; // String formula = "([1001]+[1002])/2";
......
...@@ -10,4 +10,111 @@ ...@@ -10,4 +10,111 @@
compare_date = #{date} and compare_date = #{date} and
compare_type = #{type} compare_type = #{type}
</select> </select>
<insert id="batchSave" parameterType="java.util.List">
insert into indicators_report_two(
ind_id,ind_name,compare_unit_id,compare_unit_name,compare_date,compare_type,unit,catalog_type,current_actual_average,
same_actual_average,average_rate,trend,current_average,best_unit,best_unit_desc,best_unit_value,
best_average_units,same_improve_units,rank_head_three,rank_head_three_desc,rank_after_three,
rank_after_three_desc,same_improve_head_three,same_improve_head_three_desc,same_improve_after_three,
same_improve_after_three_desc)
values
<foreach collection="datas" item="val" separator=",">
(
#{val.indId}, #{val.indName}, #{val.compareUnitId}, #{val.compareUnitName}, #{val.compareDate},
#{val.compareType},#{val.unit},#{val.catalogType},#{val.currentActualAverage},#{val.sameActualAverage},#{val.averageRate},
#{val.trend},#{val.currentAverage},#{val.bestUnit},#{val.bestUnitDesc},#{val.bestUnitValue},
#{val.bestAverageUnits},#{val.sameImproveUnits},#{val.rankHeadThree},#{val.rankHeadThreeDesc},
#{val.rankAfterThree},#{val.rankAfterThreeDesc},#{val.sameImproveHeadThree},#{val.sameImproveHeadThreeDesc},
#{val.sameImproveAfterThree},#{val.sameImproveAfterThreeDesc}
)
</foreach>
</insert>
<update id="batchUpdate" parameterType="java.util.List">
<foreach collection="datas" item="val" separator=";">
update indicators_report_two
<set>
<if test="val.indId != null">
ind_id = #{val.indId},
</if>
<if test="val.indName != null">
ind_name = #{val.indName},
</if>
<if test="val.compareUnitId != null">
compare_unit_id = #{val.compareUnitId},
</if>
<if test="val.compareUnitName != null">
compare_unit_name = #{val.compareUnitName},
</if>
<if test="val.compareDate != null">
compare_date = #{val.compareDate},
</if>
<if test="val.compareType != null">
compare_type = #{val.compareType},
</if>
<if test="val.unit != null">
unit = #{val.unit},
</if>
<if test="val.catalogType != null">
catalog_type = #{val.catalogType},
</if>
<if test="val.currentActualAverage != null">
current_actual_average = #{val.currentActualAverage},
</if>
<if test="val.sameActualAverage != null">
same_actual_average = #{val.sameActualAverage},
</if>
<if test="val.averageRate != null">
average_rate = #{val.averageRate},
</if>
<if test="val.trend != null">
trend = #{val.trend},
</if>
<if test="val.currentAverage != null">
current_average = #{val.currentAverage},
</if>
<if test="val.bestUnit != null">
best_unit = #{val.bestUnit},
</if>
<if test="val.bestUnitDesc != null">
best_unit_desc = #{val.bestUnitDesc},
</if>
<if test="val.bestUnitValue != null">
best_unit_value = #{val.bestUnitValue},
</if>
<if test="val.bestAverageUnits != null">
best_average_units = #{val.bestAverageUnits},
</if>
<if test="val.sameImproveUnits != null">
same_improve_units = #{val.sameImproveUnits},
</if>
<if test="val.rankHeadThree != null">
rank_head_three = #{val.rankHeadThree},
</if>
<if test="val.rankHeadThreeDesc != null">
rank_head_three_desc = #{val.rankHeadThreeDesc},
</if>
<if test="val.rankAfterThree != null">
rank_after_three = #{val.rankAfterThree},
</if>
<if test="val.rankAfterThreeDesc != null">
rank_after_three_desc = #{val.rankAfterThreeDesc},
</if>
<if test="val.sameImproveHeadThree != null">
same_improve_head_three = #{val.sameImproveHeadThree},
</if>
<if test="val.sameImproveHeadThreeDesc != null">
same_improve_head_three_desc = #{val.sameImproveHeadThreeDesc},
</if>
<if test="val.sameImproveAfterThree != null">
same_improve_after_three = #{val.sameImproveAfterThree},
</if>
<if test="val.sameImproveAfterThreeDesc != null">
same_improve_after_three_desc = #{val.sameImproveAfterThreeDesc},
</if>
</set>
where id = ${val.id}
</foreach>
</update>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment