Commit 0e9355b5 by 张祺

Merge branch 'hy-tobacco' of http://132.232.112.242:7090/zhangkb/indicators into hy-tobacco

parents 56d360c0 9bb7fd0c
...@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.keymobile.indicators.model.entity.indicators.CompareUnitDef; import com.keymobile.indicators.model.entity.indicators.CompareUnitDef;
import com.keymobile.indicators.model.entity.indicators.DriveIndCalResultDef;
import com.keymobile.indicators.service.hytobacco.CompareUnitCalLogService; import com.keymobile.indicators.service.hytobacco.CompareUnitCalLogService;
import com.keymobile.indicators.service.hytobacco.DriveIndCalResultService; import com.keymobile.indicators.service.hytobacco.DriveIndCalResultService;
...@@ -45,4 +46,11 @@ public class DriveIndCalResultCtrl { ...@@ -45,4 +46,11 @@ public class DriveIndCalResultCtrl {
@RequestParam(defaultValue = "0") int page,@RequestParam(defaultValue = "10") int rows){ @RequestParam(defaultValue = "0") int page,@RequestParam(defaultValue = "10") int rows){
return compUnitCalLogService.findPageByCompareId(compareId, page, rows); return compUnitCalLogService.findPageByCompareId(compareId, page, rows);
} }
@ApiOperation(value = "根据对标单元id和年份获取对标指标结果", notes = "根据对标单元id和年份获取对标指标结果")
@PostMapping(value = "/findByCompareIdAndDate")
public List<DriveIndCalResultDef> findByCompareIdAndDate(@RequestParam String compareId,
@RequestParam Integer date){
return driveIndCalResultService.findByCompareIdAndDate(compareId, date);
}
} }
...@@ -49,4 +49,7 @@ public interface DriveIndCalResultDefMapper extends BaseMapper<DriveIndCalResult ...@@ -49,4 +49,7 @@ public interface DriveIndCalResultDefMapper extends BaseMapper<DriveIndCalResult
@Param("indId") String indId,@Param("date") int date); @Param("indId") String indId,@Param("date") int date);
public List<DriveIndCalResultDef> findByIndIdAndDateAndCompareObjIn(Map<String,Object> param); public List<DriveIndCalResultDef> findByIndIdAndDateAndCompareObjIn(Map<String,Object> param);
public List<DriveIndCalResultDef> findByCompareIdAndDate(@Param("compareId")String compareId,
@Param("date")Integer date);
} }
...@@ -51,6 +51,10 @@ public class DriveIndCalResultService { ...@@ -51,6 +51,10 @@ public class DriveIndCalResultService {
return driveIndCalResultDefMapper.findByCompareIdAndCompareObjAndIndIdAndDate(compareId, compareObj, indId, date); return driveIndCalResultDefMapper.findByCompareIdAndCompareObjAndIndIdAndDate(compareId, compareObj, indId, date);
} }
public List<DriveIndCalResultDef> findByCompareIdAndDate(String compareId,Integer date){
return driveIndCalResultDefMapper.findByCompareIdAndDate(compareId, date);
}
public void calculateComp(String compareId,String compareObjsString,String driveIndIdsString, public void calculateComp(String compareId,String compareObjsString,String driveIndIdsString,
int date) { int date) {
String[] compareObjs = compareObjsString.split(";"); String[] compareObjs = compareObjsString.split(";");
......
...@@ -129,4 +129,12 @@ ...@@ -129,4 +129,12 @@
</foreach> </foreach>
order by rank asc order by rank asc
</select> </select>
<select id="findByCompareIdAndDate" resultType="com.keymobile.indicators.model.entity.indicators.DriveIndCalResultDef" >
select *
from drive_ind_cal_result_def
where
compare_id = #{compareId} and
date = #{date}
</select>
</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