Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -136,11 +136,6 @@ public class HpcHandler implements ExecutionHandler<Map<String, Object>,HPCExecu
|
||||
ThreadLocalContext.setUserId(userId);
|
||||
ThreadLocalContext.setUserName(userName);
|
||||
ThreadLocalContext.setTenantId(tenantId);
|
||||
|
||||
ThreadLocalContext.setUserId(1979078323595476993l);
|
||||
ThreadLocalContext.setUserName("yytest");
|
||||
ThreadLocalContext.setTenantId(1979091834410176514l);
|
||||
|
||||
CoreLogger.info("hpcHander initUserInfo userId:{},tenantId:{},userName:{}",userId,tenantId,userName);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class SimuluationTaskPoolController implements ISimuluationTaskPoolFeignC
|
||||
|
||||
@GetMapping(value = "/cleanTaskPool")
|
||||
@ResponseBody
|
||||
SdmResponse cleanSimulationTaskPool(@RequestParam String poolName,@RequestParam String version)
|
||||
SdmResponse cleanSimulationTaskPool(@RequestParam String poolName,@RequestParam(required = false) String version)
|
||||
{
|
||||
return service.cleanTaskPool(poolName,version);
|
||||
}
|
||||
|
||||
@@ -1056,10 +1056,19 @@ public class SimulationTaskPoolServiceImpl extends BaseService implements ISimul
|
||||
*/
|
||||
public SdmResponse cleanTaskPool(String poolName,String version)
|
||||
{
|
||||
if(version==null || StringUtil.isEmpty(version))
|
||||
return cleanTaskPool(poolName);
|
||||
SdmResponse response = SdmResponse.success();
|
||||
if(mapper.deleteTaskPoolSingleVersion(poolName,version) < 0)
|
||||
List<TaskPoolVersion> poolVersions = mapper.queryTaskPoolAllVersion(poolName);
|
||||
if(poolVersions.size() == 1 && poolVersions.get(0).poolVersion.equals(version))
|
||||
{
|
||||
response = SdmResponse.failed("删除分析项库版本失败");
|
||||
cleanTaskPool(poolName);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mapper.deleteTaskPoolSingleVersion(poolName, version) < 0) {
|
||||
response = SdmResponse.failed("删除分析项库版本失败");
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
@@ -2334,6 +2343,7 @@ public class SimulationTaskPoolServiceImpl extends BaseService implements ISimul
|
||||
public SdmResponse statisicDisciplineConfidence(String poolName)
|
||||
{
|
||||
SdmResponse response = SdmResponse.success();
|
||||
syncProjectTaskConfidence();
|
||||
List<String> disciplineNames = mapper.queryTaskPoolAllDiscipline(poolName);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
String month = sdf.format(new Date());
|
||||
@@ -2372,6 +2382,7 @@ public class SimulationTaskPoolServiceImpl extends BaseService implements ISimul
|
||||
public SdmResponse staticDisciplineConfidenceTrend(String poolName,String timeRange)
|
||||
{
|
||||
SdmResponse response = SdmResponse.success();
|
||||
syncProjectTaskConfidence();
|
||||
if(timeRange == null || timeRange.isEmpty())
|
||||
{
|
||||
response = SdmResponse.failed("时间范围为空");
|
||||
@@ -2411,6 +2422,7 @@ public class SimulationTaskPoolServiceImpl extends BaseService implements ISimul
|
||||
public SdmResponse statisicDisciplineDifficulty(String poolName)
|
||||
{
|
||||
SdmResponse response = SdmResponse.success();
|
||||
syncProjectTaskDifficulty();
|
||||
List<String> disciplineNames = mapper.queryTaskPoolAllDiscipline(poolName);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
String month = sdf.format(new Date());
|
||||
@@ -2537,12 +2549,11 @@ public class SimulationTaskPoolServiceImpl extends BaseService implements ISimul
|
||||
SdmResponse response = simulationTaskFeignClient.getTaskDifficultStatistics();
|
||||
if(response.isSuccess())
|
||||
{
|
||||
List<JSONObject> taskConfidences = (List<JSONObject>)response.getData();
|
||||
handleSyncProjectTaskRecord(taskConfidences,1);
|
||||
List<JSONObject> taskDifficulty = (List<JSONObject>)response.getData();
|
||||
handleSyncProjectTaskRecord(taskDifficulty,1);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user