|
@@ -8,6 +8,7 @@ import cn.iselab.mooctest.site.service.fromDev.AnalysisService;
|
|
|
import cn.iselab.mooctest.site.web.data.forMongo.MutationForMongoDTO;
|
|
|
import cn.iselab.mooctest.site.web.data.forMongo.NodeCatch.CaughtNodeDTO;
|
|
|
import cn.iselab.mooctest.site.web.data.forMongo.TargetGraphDTO;
|
|
|
+import cn.iselab.mooctest.site.web.exception.HttpBadRequestException;
|
|
|
import cn.iselab.mooctest.site.web.logic.CalculateSocreLogic;
|
|
|
import cn.iselab.mooctest.site.web.logic.GeneralCalculateScoreLogic;
|
|
|
import com.google.gson.Gson;
|
|
@@ -141,11 +142,14 @@ public class MutationCallBack implements AsyncTaskCallBack {
|
|
|
Gson gson=new Gson();
|
|
|
TargetGraphDTO dto=gson.fromJson(result,TargetGraphDTO.class);
|
|
|
dto.setTargetId(targetId);
|
|
|
- dto=targetGraphService.updateTargetGraph(dto);
|
|
|
- try {
|
|
|
+ try{
|
|
|
+ dto.validate();
|
|
|
+ dto=targetGraphService.updateTargetGraph(dto);
|
|
|
targetGraphService.saveTargetGraphJson(dto);
|
|
|
- }catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
+ }catch (HttpBadRequestException e){
|
|
|
+ targetGraphService.saveFailJson(targetId);
|
|
|
+ LOG.error(targetId+"生成node不合法:"+e.getMessage());
|
|
|
+ }catch (IOException e){
|
|
|
LOG.info(targetId+"生成变异元数据json文件失败");
|
|
|
}
|
|
|
}
|