Commit 64d76dcb authored by mcb's avatar mcb

commit

parent 14910f3f
......@@ -39,6 +39,8 @@ public class DateUtils {
private static final SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
private static final SimpleDateFormat hsFormat = new SimpleDateFormat("HH:mm");
final static long daytimes = 24 * 60 * 60 * 1000;
final static long hourtimes = 1 * 60 * 60 * 1000;
......@@ -174,6 +176,17 @@ public class DateUtils {
return timeFormat.format(date);
}
/**
* 格式化时间
* <p>
* 时间格式HH:mm
*
* @return
*/
public static String formatTimes(Date date) {
return hsFormat.format(date);
}
/**
* 格式化日期
* <p>
......
......@@ -38,7 +38,7 @@ public interface ExecutionFlowsMapper {
*/
List<Map> queryExamplesLogByExecId(String execId) throws Exception;
Map<String, Object> queryTaskInstanceStatus() throws Exception;
Map<String, Object> queryTaskInstanceStatus(@Param("taskName") String [] taskName) throws Exception;
/**
* 查询业务流程任务,最后一个执行实例的状态
......
......@@ -95,7 +95,7 @@ public class DmpDevExamplesController {
result = dmpDevelopTaskService.setSla(req);
} catch (Exception e) {
result.setCode(ResultCode.INTERNAL_SERVER_ERROR);
result.setMessage("failed!");
result.setMessage(e.getMessage());
e.printStackTrace();
}
return result;
......
......@@ -142,6 +142,9 @@ public class DmpDevTaskController {
if (StringUtils.isEmpty(scheduleId)) {
return new JsonResult(ResultCode.PARAMS_ERROR, "scheduleId不能为空!");
}
if (StringUtils.isEmpty(projectId)) {
return new JsonResult(ResultCode.PARAMS_ERROR, "projectId不能为空!");
}
JsonResult result = new JsonResult();
try {
result = dmpDevelopTaskService.getSlaInfo(scheduleId,projectId);
......
......@@ -90,6 +90,9 @@ public class DataDevTaskListDto {
@ApiModelProperty(value = "scheduleId")
private String scheduleId;
@ApiModelProperty(value = "sla状态:Y 已配置,N未配置")
private String slaStatus;
public String getStatus() {
return status;
}
......@@ -193,4 +196,12 @@ public class DataDevTaskListDto {
public void setScheduleId(String scheduleId) {
this.scheduleId = scheduleId;
}
public String getSlaStatus() {
return slaStatus;
}
public void setSlaStatus(String slaStatus) {
this.slaStatus = slaStatus;
}
}
......@@ -399,11 +399,12 @@ public class DmpApiMangeController {
*/
@ApiOperation(value = "授权--组织名称查询", notes = "授权--组织名称查询")
@GetMapping(value = "/getAuthOrgName")
@ApiImplicitParam(name = "orgName", value = "组织名称", required = true)
public JsonResult getAuthOrgName(@RequestParam String orgName) {
@ApiImplicitParams({@ApiImplicitParam(name = "orgName", value = "组织名称", required = true),
@ApiImplicitParam(name = "projectId", value = "projectId", required = true)})
public JsonResult getAuthOrgName(@RequestParam String orgName, String projectId) {
JsonResult jsonResult = new JsonResult();
try {
jsonResult = dmpApiMangeService.getAuthOrgName(orgName);
jsonResult = dmpApiMangeService.getAuthOrgName(orgName, projectId);
} catch (Exception e) {
jsonResult.setMessage(e.getMessage());
jsonResult.setCode(ResultCode.INTERNAL_SERVER_ERROR);
......
......@@ -139,7 +139,7 @@ public interface DmpApiMangeService {
* @author Bellamy
* @since 2021-03-02
*/
JsonResult getAuthOrgName(String orgName) throws Exception;
JsonResult getAuthOrgName(String orgName, String projectId) throws Exception;
/**
* API测试--下拉框
......
......@@ -461,10 +461,11 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
* @since 2021-03-02
*/
@Override
public JsonResult getAuthOrgName(String orgName) throws Exception {
public JsonResult getAuthOrgName(String orgName, String projectId) throws Exception {
String url = gatewayUrl + GatewayApiConstant.getOrgNameList;
Map params = new HashMap();
params.put("orgName", orgName);
params.put("projectId", projectId);
JsonResult result = GatewayApiConstant.getRequest2GetData(url, params);
return result;
}
......
......@@ -219,6 +219,7 @@
sum(case when status='60' then 1 else 0 end) killed,
sum(case when status='70' then 1 else 0 end) failed
FROM execution_flows
<include refid="flowIdSql"/>
)t
</select>
......@@ -234,7 +235,9 @@
execution_flows
WHERE 1 = 1
<if test="status != null and status !='' ">and status=#{status}</if>
<include refid="flowIdSql"/>
<if test="taskName != null and taskName !='' ">
<include refid="flowIdSql"/>
</if>
group by flow_id
</select>
......
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