Commit 64d76dcb authored by mcb's avatar mcb

commit

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