|
|
@ -9,9 +9,12 @@ import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @author ns
|
|
|
|
* @author ns
|
|
|
@ -73,12 +76,22 @@ public class SysTableTemplateController {
|
|
|
|
.notNull("templateType", sysTableTemplate.getTemplateType());
|
|
|
|
.notNull("templateType", sysTableTemplate.getTemplateType());
|
|
|
|
return ResultBean.success().setResultObject(iSysTableTemplateService.insertSysTableTemplate((sysTableTemplate)));
|
|
|
|
return ResultBean.success().setResultObject(iSysTableTemplateService.insertSysTableTemplate((sysTableTemplate)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!iSysTableTemplateService.isExistSysTableTemplate(sysTableTemplate)) {
|
|
|
|
|
|
|
|
return ResultBean.fail("模板不存在");
|
|
|
|
|
|
|
|
}
|
|
|
|
return ResultBean.success().setResultObject(iSysTableTemplateService.updateSysTableTemplate((sysTableTemplate)));
|
|
|
|
return ResultBean.success().setResultObject(iSysTableTemplateService.updateSysTableTemplate((sysTableTemplate)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("查询系统模板")
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("条件查询表格模板")
|
|
|
|
@GetMapping("/find")
|
|
|
|
@GetMapping("/find")
|
|
|
|
public ResultBean findSysTableTemplate(SysTableTemplate sysTableTemplate) throws NoSuchFieldException {
|
|
|
|
@ApiImplicitParams({
|
|
|
|
|
|
|
|
@ApiImplicitParam(name = "page", value = "表格所属页面"),
|
|
|
|
|
|
|
|
@ApiImplicitParam(name = "softType", value = "所属软件类型"),
|
|
|
|
|
|
|
|
@ApiImplicitParam(name = "id", value = "id"),
|
|
|
|
|
|
|
|
@ApiImplicitParam(name = "templateType", value = "模板类型")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
public ResultBean findSysTableTemplate(@ApiIgnore SysTableTemplate sysTableTemplate) {
|
|
|
|
if (ObjectUtils.isEmpty(sysTableTemplate)) {
|
|
|
|
if (ObjectUtils.isEmpty(sysTableTemplate)) {
|
|
|
|
return ResultBean.fail("查询条件不能为空");
|
|
|
|
return ResultBean.fail("查询条件不能为空");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -88,18 +101,34 @@ public class SysTableTemplateController {
|
|
|
|
&& ObjectUtils.isEmpty(sysTableTemplate.getTemplateType())) {
|
|
|
|
&& ObjectUtils.isEmpty(sysTableTemplate.getTemplateType())) {
|
|
|
|
return ResultBean.fail("查询条件不能为空");
|
|
|
|
return ResultBean.fail("查询条件不能为空");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ResultBean.success().setResultObject(iSysTableTemplateService.findSysTableTemplate((sysTableTemplate)));
|
|
|
|
return ResultBean.success().setResultList(iSysTableTemplateService.findSysTableTemplate((sysTableTemplate)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("根据id查询表格模板")
|
|
|
|
|
|
|
|
@GetMapping("/getSysTableTemplate")
|
|
|
|
|
|
|
|
public ResultBean getSysTableTemplateById(Long id) throws NoSuchFieldException {
|
|
|
|
|
|
|
|
if (ObjectUtils.isEmpty(id)) {
|
|
|
|
|
|
|
|
return ResultBean.fail("id不能为空");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ResultBean.success().setResultObject(iSysTableTemplateService.getSysTableTemplateById(id));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("分页查询系统模板")
|
|
|
|
@ApiOperation("分页查询表格模板")
|
|
|
|
@GetMapping("/findBypage")
|
|
|
|
@GetMapping("/findBypage")
|
|
|
|
public ResultBean findSysTableTemplateByPage(SysTableTemplate sysTableTemplate, Pager pager) throws NoSuchFieldException {
|
|
|
|
@ApiImplicitParams({
|
|
|
|
|
|
|
|
@ApiImplicitParam(name = "page", value = "表格所属页面"),
|
|
|
|
|
|
|
|
@ApiImplicitParam(name = "softType", value = "所属软件类型"),
|
|
|
|
|
|
|
|
@ApiImplicitParam(name = "id", value = "id"),
|
|
|
|
|
|
|
|
@ApiImplicitParam(name = "templateType", value = "模板类型")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
public ResultBean findSysTableTemplateByPage(@ApiIgnore SysTableTemplate sysTableTemplate, Pager pager) throws NoSuchFieldException {
|
|
|
|
if (ObjectUtils.isEmpty(pager)) {
|
|
|
|
if (ObjectUtils.isEmpty(pager)) {
|
|
|
|
pager = Pager.defaultPager();
|
|
|
|
pager = Pager.defaultPager();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ResultBean.success().setResultObject(iSysTableTemplateService.findSysTableTemplateByPage(sysTableTemplate, pager));
|
|
|
|
return ResultBean.success().setListPager(iSysTableTemplateService.findSysTableTemplateByPage(sysTableTemplate, pager));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|