Merge branch 'master' into docker_package
This commit is contained in:
commit
88f72d0fc7
|
@ -33,8 +33,6 @@ import io.swagger.annotations.Api;
|
|||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.activiti.engine.HistoryService;
|
||||
import org.activiti.engine.RuntimeService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -75,14 +73,32 @@ public class TAbilityApplicationController {
|
|||
private CameraChannelMapper cameraChannelMapper;
|
||||
@Autowired
|
||||
private SysDeptService sysDeptService;
|
||||
@Autowired
|
||||
protected RuntimeService runtimeService;
|
||||
@Autowired
|
||||
protected HistoryService historyService;
|
||||
@Value("${project.place}")
|
||||
private Integer projectPlace;
|
||||
|
||||
|
||||
/**
|
||||
* 根据能力资源id获取该能力申请使用分页
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("in_use_page")
|
||||
@LogOperation("资源已被使用的分页")
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "ended", value = "是否完成(true, false)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "resourceId", value = "资源id", paramType = "query", dataType = "String")
|
||||
}
|
||||
)
|
||||
public Result<PageData<TAbilityApplicationDTO>> resourceInUse(Map<String, Object> params) {
|
||||
PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params);
|
||||
return new Result<PageData<TAbilityApplicationDTO>>().ok(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据申请时的情况做出分页
|
||||
*
|
||||
|
|
|
@ -31,7 +31,7 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
|||
QueryWrapper<TAbilityApplicationEntity> wrapper = new QueryWrapper<>();
|
||||
params.keySet().stream().filter(index -> null != params.get(index)).forEach(index -> {
|
||||
switch (index) { //
|
||||
case "abilityprocess_v2":
|
||||
case "abilityprocess_v2": // 走abilityprocess_v2流程
|
||||
wrapper.select("DISTINCT apply_flag,apply_number");
|
||||
wrapper.isNotNull(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_flag")
|
||||
.isNotNull(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_number");
|
||||
|
@ -52,6 +52,9 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
|||
wrapper.exists("SELECT 1 FROM t_ability_application t1 WHERE t1.apply_flag = t_ability_application.apply_flag AND approve_status = '审核中'");
|
||||
}
|
||||
break;
|
||||
case "resourceId":
|
||||
wrapper.eq(StringUtils.isNotEmpty(params.get("resourceId").toString()), "resource_id", params.get("resourceId").toString());
|
||||
break;
|
||||
}
|
||||
});
|
||||
if (params.containsKey("abilityprocess_v2")) {
|
||||
|
|
Loading…
Reference in New Issue