| | |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.BattGroupDataMapper; |
| | | import com.whyc.pojo.BattgroupData; |
| | | import com.whyc.pojo.BattgroupInfo; |
| | | import com.whyc.pojo.FileInfo; |
| | | import com.whyc.pojo.FileParam; |
| | | import com.whyc.pojo.*; |
| | | import com.whyc.util.MathUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private BattGroupInfoService battGroupInfoService; |
| | | |
| | | @Autowired |
| | | private TestParamService testParamService; |
| | | |
| | | public List<BattgroupData> getListWithTestTime(String fileId) { |
| | | String battGroupId = battGroupInfoService.getByFileId(fileId).getBattgroupId(); |
| | | List<BattgroupData> dataList = mapper.getListWithTestTime(battGroupId); |
| | | //查询系数和阈值是否禁用 |
| | | //BattgroupInfo info = battGroupInfoService.getByBattGroupId(fileId); |
| | | FileParam param = fileParamService.getFactorsAndThreshold(fileId); |
| | | if(param.getFactorDisabled() == 1){ //系数和阈值禁用,不需要判断处理阈值 |
| | | FileParam param = fileParamService.getByFileId(fileId); |
| | | TestParam param2 = testParamService.getFactorsAndThreshold(); |
| | | if(param2.getEnabled() == 0){ //系数和阈值禁用,不需要判断处理阈值 |
| | | return dataList; |
| | | } |
| | | Float stdVol = param.getBattVol(); |
| | | Float stdRes = param.getBattRes(); |
| | | Float volLowCoeK1 = param.getVolLowCoeK1(); |
| | | Float volHighCoeK2 = param.getVolHighCoeK2(); |
| | | Float resGoodCoeK3 = param.getResGoodCoeK3(); |
| | | Float resBadCoeK4 = param.getResBadCoeK4(); |
| | | Float chainRes = param.getChainRes(); |
| | | Float volLowCoeK1 = param2.getVolLowCoeK1(); |
| | | Float volHighCoeK2 = param2.getVolHighCoeK2(); |
| | | Float resGoodCoeK3 = param2.getResGoodCoeK3(); |
| | | Float resBadCoeK4 = param2.getResBadCoeK4(); |
| | | Float chainRes = param2.getChainRes(); |
| | | dataList.forEach(data->{ |
| | | //判断处理阈值 |
| | | Float br = data.getBr(); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | |
| | | } |
| | | } |