Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
civil
civil-bigdata
Commits
9c2401f6
Commit
9c2401f6
authored
Sep 14, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接调试共享平台接口
parent
5cf557dc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
980 additions
and
236 deletions
+980
-236
civil-common-utils/src/main/java/com/zq/common/vo/IdVo.java
+2
-0
resource-server/src/main/java/com/zq/resource/controller/admin/CategoryController.java
+1
-39
resource-server/src/main/java/com/zq/resource/controller/admin/CategoryInterfaceController.java
+98
-3
resource-server/src/main/java/com/zq/resource/controller/admin/DbInfoController.java
+5
-5
resource-server/src/main/java/com/zq/resource/controller/admin/DeptDutyController.java
+9
-0
resource-server/src/main/java/com/zq/resource/controller/admin/FileResourceController.java
+82
-0
resource-server/src/main/java/com/zq/resource/controller/admin/StandardDataController.java
+7
-7
resource-server/src/main/java/com/zq/resource/controller/app/AreaApi.java
+1
-1
resource-server/src/main/java/com/zq/resource/dao/CategoryInterfaceInputDao.java
+17
-0
resource-server/src/main/java/com/zq/resource/dao/CategoryInterfaceOutputDao.java
+17
-0
resource-server/src/main/java/com/zq/resource/dao/FileResourceDao.java
+5
-4
resource-server/src/main/java/com/zq/resource/entity/CategoryInterface.java
+5
-0
resource-server/src/main/java/com/zq/resource/entity/CategoryInterfaceAttach.java
+5
-0
resource-server/src/main/java/com/zq/resource/entity/CategoryInterfaceInput.java
+24
-27
resource-server/src/main/java/com/zq/resource/entity/CategoryInterfaceOutput.java
+28
-22
resource-server/src/main/java/com/zq/resource/entity/CodeItem.java
+4
-0
resource-server/src/main/java/com/zq/resource/entity/CodeMain.java
+9
-0
resource-server/src/main/java/com/zq/resource/entity/DataCategory.java
+11
-8
resource-server/src/main/java/com/zq/resource/entity/DataCategoryGroup.java
+9
-0
resource-server/src/main/java/com/zq/resource/entity/DbInfo.java
+9
-0
resource-server/src/main/java/com/zq/resource/entity/DeptLiability.java
+5
-0
resource-server/src/main/java/com/zq/resource/entity/FileResource.java
+116
-0
resource-server/src/main/java/com/zq/resource/entity/StandardCategoryName.java
+1
-1
resource-server/src/main/java/com/zq/resource/entity/StandardData.java
+34
-5
resource-server/src/main/java/com/zq/resource/entity/StandardDataMapping.java
+14
-4
resource-server/src/main/java/com/zq/resource/entity/SystemInfo.java
+5
-0
resource-server/src/main/java/com/zq/resource/service/CategoryInterfaceService.java
+0
-0
resource-server/src/main/java/com/zq/resource/service/CategoryService.java
+39
-65
resource-server/src/main/java/com/zq/resource/service/CodeService.java
+26
-2
resource-server/src/main/java/com/zq/resource/service/DbInfoService.java
+49
-18
resource-server/src/main/java/com/zq/resource/service/DeptDutyService.java
+10
-1
resource-server/src/main/java/com/zq/resource/service/FileResourceService.java
+138
-0
resource-server/src/main/java/com/zq/resource/service/StandardDataService.java
+32
-15
resource-server/src/main/java/com/zq/resource/service/SystemInfoService.java
+6
-1
resource-server/src/main/java/com/zq/resource/vo/FileResourceFindVo.java
+109
-0
resource-server/src/main/java/com/zq/resource/vo/StandardDataFindVo.java
+45
-5
resource-server/src/main/resources/mapper/DeptLiabilityCategoryMapper.xml
+3
-3
No files found.
civil-common-utils/src/main/java/com/zq/common/vo/IdVo.java
View file @
9c2401f6
...
@@ -19,6 +19,8 @@ public class IdVo {
...
@@ -19,6 +19,8 @@ public class IdVo {
private
String
id
;
private
String
id
;
private
String
note
;
private
Set
<
String
>
ids
;
private
Set
<
String
>
ids
;
public
Set
<
String
>
getIds
()
{
public
Set
<
String
>
getIds
()
{
...
...
resource-server/src/main/java/com/zq/resource/controller/admin/CategoryController.java
View file @
9c2401f6
...
@@ -6,10 +6,8 @@ import com.zq.common.vo.IdVo;
...
@@ -6,10 +6,8 @@ import com.zq.common.vo.IdVo;
import
com.zq.common.vo.PageVo
;
import
com.zq.common.vo.PageVo
;
import
com.zq.common.vo.ResultVo
;
import
com.zq.common.vo.ResultVo
;
import
com.zq.resource.entity.DataCategory
;
import
com.zq.resource.entity.DataCategory
;
import
com.zq.resource.entity.DataCategoryItem
;
import
com.zq.resource.service.CategoryService
;
import
com.zq.resource.service.CategoryService
;
import
com.zq.resource.vo.DataCategoryFindVo
;
import
com.zq.resource.vo.DataCategoryFindVo
;
import
com.zq.resource.vo.DataCategoryItemFindVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -43,7 +41,7 @@ public class CategoryController {
...
@@ -43,7 +41,7 @@ public class CategoryController {
return
ResultVo
.
success
(
categoryService
.
getAllCategoryList
(
vo
));
return
ResultVo
.
success
(
categoryService
.
getAllCategoryList
(
vo
));
}
}
@ApiOperation
(
"获取目录
列表
"
)
@ApiOperation
(
"获取目录
信息
"
)
@PostMapping
(
value
=
"/getCategoryInfo/{categoryId}"
)
@PostMapping
(
value
=
"/getCategoryInfo/{categoryId}"
)
public
ResultVo
getCategoryInfo
(
@PathVariable
String
categoryId
)
{
public
ResultVo
getCategoryInfo
(
@PathVariable
String
categoryId
)
{
AssertUtils
.
hasText
(
categoryId
,
"ID不能为空"
);
AssertUtils
.
hasText
(
categoryId
,
"ID不能为空"
);
...
@@ -99,40 +97,4 @@ public class CategoryController {
...
@@ -99,40 +97,4 @@ public class CategoryController {
return
ResultVo
.
success
();
return
ResultVo
.
success
();
}
}
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓目录信息项↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
@ApiOperation
(
"获取目录信息项列表"
)
@PostMapping
(
value
=
"/getCategoryItemList"
)
public
ResultVo
<
PageVo
<
DataCategoryItem
>>
getCategoryItemList
(
@RequestBody
DataCategoryItemFindVo
vo
)
{
return
ResultVo
.
success
(
categoryService
.
getCategoryItemList
(
vo
));
}
@ApiOperation
(
"获取目录信息项"
)
@PostMapping
(
value
=
"/getCategoryItemInfo/{id}"
)
public
ResultVo
<
DataCategoryItem
>
getCategoryItemInfo
(
@PathVariable
String
id
)
{
AssertUtils
.
hasText
(
id
,
"ID不能为空"
);
return
ResultVo
.
success
(
categoryService
.
getCategoryItemInfo
(
id
));
}
@ApiOperation
(
"添加目录信息项"
)
@PostMapping
(
value
=
"/addCategoryItem"
)
public
ResultVo
addCategoryItem
(
@RequestBody
DataCategoryItem
vo
)
{
AssertUtils
.
hasText
(
vo
.
getCategoryId
(),
"目录ID不能为空"
);
AssertUtils
.
hasText
(
vo
.
getCnName
(),
"名称不能为空"
);
AssertUtils
.
hasText
(
vo
.
getDataFormat
(),
"数据类型不能为空"
);
AssertUtils
.
notNull
(
vo
.
getLength
(),
"数据长度不能为空"
);
categoryService
.
addCategoryItem
(
vo
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"修改目录信息项"
)
@PostMapping
(
value
=
"/modifyCategoryItem"
)
public
ResultVo
modifyCategory
(
@RequestBody
DataCategoryItem
vo
)
{
AssertUtils
.
hasText
(
vo
.
getId
(),
"ID不能为空"
);
categoryService
.
modifyCategoryItem
(
vo
);
return
ResultVo
.
success
();
}
}
}
resource-server/src/main/java/com/zq/resource/controller/admin/CategoryInterfaceController.java
View file @
9c2401f6
...
@@ -7,11 +7,12 @@ import com.zq.common.vo.PageVo;
...
@@ -7,11 +7,12 @@ import com.zq.common.vo.PageVo;
import
com.zq.common.vo.ResultVo
;
import
com.zq.common.vo.ResultVo
;
import
com.zq.resource.entity.CategoryInterface
;
import
com.zq.resource.entity.CategoryInterface
;
import
com.zq.resource.entity.CategoryInterfaceAttach
;
import
com.zq.resource.entity.CategoryInterfaceAttach
;
import
com.zq.resource.entity.CategoryInterfaceInput
;
import
com.zq.resource.entity.CategoryInterfaceOutput
;
import
com.zq.resource.service.CategoryInterfaceService
;
import
com.zq.resource.service.CategoryInterfaceService
;
import
com.zq.resource.vo.CategoryInterfaceFindVo
;
import
com.zq.resource.vo.CategoryInterfaceFindVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -27,6 +28,8 @@ public class CategoryInterfaceController {
...
@@ -27,6 +28,8 @@ public class CategoryInterfaceController {
private
final
CategoryInterfaceService
categoryInterfaceService
;
private
final
CategoryInterfaceService
categoryInterfaceService
;
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓接口资源↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
@ApiOperation
(
"接口资源列表"
)
@ApiOperation
(
"接口资源列表"
)
@PostMapping
(
value
=
"/getCategoryInterfaceList"
)
@PostMapping
(
value
=
"/getCategoryInterfaceList"
)
public
ResultVo
<
PageVo
<
CategoryInterface
>>
getCategoryInterfaceList
(
@RequestBody
CategoryInterfaceFindVo
vo
)
{
public
ResultVo
<
PageVo
<
CategoryInterface
>>
getCategoryInterfaceList
(
@RequestBody
CategoryInterfaceFindVo
vo
)
{
...
@@ -75,13 +78,16 @@ public class CategoryInterfaceController {
...
@@ -75,13 +78,16 @@ public class CategoryInterfaceController {
@ApiOperation
(
"接口资源撤销"
)
@ApiOperation
(
"接口资源撤销"
)
@PostMapping
(
value
=
"/share/cancelCategoryInterface"
)
@PostMapping
(
value
=
"/share/cancelCategoryInterface"
)
public
ResultVo
cancelCategoryInterface
(
@RequestBody
IdVo
vo
,
@ApiParam
(
"撤销原因"
)
@RequestParam
String
note
)
{
public
ResultVo
cancelCategoryInterface
(
@RequestBody
IdVo
vo
)
{
AssertUtils
.
notEmpty
(
vo
.
getIds
(),
"至少选择一项"
);
AssertUtils
.
notEmpty
(
vo
.
getIds
(),
"至少选择一项"
);
AssertUtils
.
hasText
(
vo
.
getNote
(),
"原因不能为空"
);
categoryInterfaceService
.
cancelCategoryInterface
(
vo
.
getIds
(),
note
);
categoryInterfaceService
.
cancelCategoryInterface
(
vo
.
getIds
(),
vo
.
getNote
()
);
return
ResultVo
.
success
();
return
ResultVo
.
success
();
}
}
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓接口资源附件↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
@ApiOperation
(
"接口资源附件列表"
)
@ApiOperation
(
"接口资源附件列表"
)
@PostMapping
(
value
=
"/getCategoryInterfaceAttachList"
)
@PostMapping
(
value
=
"/getCategoryInterfaceAttachList"
)
public
ResultVo
<
PageVo
<
CategoryInterfaceAttach
>>
getCategoryInterfaceAttachList
(
@RequestBody
KeywordFindVo
vo
)
{
public
ResultVo
<
PageVo
<
CategoryInterfaceAttach
>>
getCategoryInterfaceAttachList
(
@RequestBody
KeywordFindVo
vo
)
{
...
@@ -114,4 +120,93 @@ public class CategoryInterfaceController {
...
@@ -114,4 +120,93 @@ public class CategoryInterfaceController {
return
ResultVo
.
success
();
return
ResultVo
.
success
();
}
}
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓接口资源输入参数↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
@ApiOperation
(
"接口资源输入参数列表"
)
@PostMapping
(
value
=
"/getCategoryInterfaceInputList"
)
public
ResultVo
<
PageVo
<
CategoryInterfaceInput
>>
getCategoryInterfaceInputList
(
@RequestBody
KeywordFindVo
vo
)
{
return
ResultVo
.
success
(
categoryInterfaceService
.
getCategoryInterfaceInputList
(
vo
));
}
@ApiOperation
(
"获取接口资源输入参数信息"
)
@PostMapping
(
value
=
"/getCategoryInterfaceInputInfo/{id}"
)
public
ResultVo
<
CategoryInterfaceInput
>
getCategoryInterfaceInputInfo
(
@PathVariable
String
id
)
{
return
ResultVo
.
success
(
categoryInterfaceService
.
getCategoryInterfaceInputInfo
(
id
));
}
@ApiOperation
(
"添加接口资源输入参数"
)
@PostMapping
(
value
=
"/addCategoryInterfaceInput"
)
public
ResultVo
addCategoryInterfaceInput
(
@RequestBody
CategoryInterfaceInput
vo
)
{
AssertUtils
.
notNull
(
vo
.
getCategoryInterfaceId
(),
"缺少接口资源ID"
);
AssertUtils
.
hasText
(
vo
.
getParamName
(),
"缺少参数名"
);
AssertUtils
.
hasText
(
vo
.
getParamType
(),
"缺少参数类型"
);
AssertUtils
.
notNull
(
vo
.
getMustfill
(),
"缺少是否不能为空"
);
AssertUtils
.
hasText
(
vo
.
getRemark
(),
"缺少说明备注"
);
categoryInterfaceService
.
addCategoryInterfaceInput
(
vo
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"修改接口资源输入参数"
)
@PostMapping
(
value
=
"/modifyCategoryInterfaceInput"
)
public
ResultVo
modifyCategoryInterfaceInput
(
@RequestBody
CategoryInterfaceInput
vo
)
{
AssertUtils
.
hasText
(
vo
.
getId
(),
"ID不能为空"
);
categoryInterfaceService
.
modifyCategoryInterfaceInput
(
vo
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"删除接口资源输入参数"
)
@DeleteMapping
(
value
=
"/deleteCategoryInterfaceInput/{id}"
)
public
ResultVo
modifyCategoryInterfaceInput
(
@PathVariable
String
id
)
{
AssertUtils
.
hasText
(
id
,
"ID不能为空"
);
categoryInterfaceService
.
deleteCategoryInterfaceInput
(
id
);
return
ResultVo
.
success
();
}
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓接口资源输出参数↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
@ApiOperation
(
"接口资源输出参数列表"
)
@PostMapping
(
value
=
"/getCategoryInterfaceOutputList"
)
public
ResultVo
<
PageVo
<
CategoryInterfaceOutput
>>
getCategoryInterfaceOutputList
(
@RequestBody
KeywordFindVo
vo
)
{
return
ResultVo
.
success
(
categoryInterfaceService
.
getCategoryInterfaceOutputList
(
vo
));
}
@ApiOperation
(
"获取接口资源输出参数信息"
)
@PostMapping
(
value
=
"/getCategoryInterfaceOutputInfo/{id}"
)
public
ResultVo
<
CategoryInterfaceOutput
>
getCategoryInterfaceOutputInfo
(
@PathVariable
String
id
)
{
return
ResultVo
.
success
(
categoryInterfaceService
.
getCategoryInterfaceOutputInfo
(
id
));
}
@ApiOperation
(
"添加接口资源输出参数"
)
@PostMapping
(
value
=
"/addCategoryInterfaceOutput"
)
public
ResultVo
addCategoryInterfaceOutput
(
@RequestBody
CategoryInterfaceOutput
vo
)
{
AssertUtils
.
notNull
(
vo
.
getCategoryInterfaceId
(),
"缺少接口资源ID"
);
AssertUtils
.
hasText
(
vo
.
getParamName
(),
"缺少参数名"
);
AssertUtils
.
hasText
(
vo
.
getParamType
(),
"缺少参数类型"
);
AssertUtils
.
hasText
(
vo
.
getRemark
(),
"缺少说明备注"
);
categoryInterfaceService
.
addCategoryInterfaceOutput
(
vo
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"修改接口资源输出参数"
)
@PostMapping
(
value
=
"/modifyCategoryInterfaceOutput"
)
public
ResultVo
modifyCategoryInterfaceOutput
(
@RequestBody
CategoryInterfaceOutput
vo
)
{
AssertUtils
.
hasText
(
vo
.
getId
(),
"ID不能为空"
);
categoryInterfaceService
.
modifyCategoryInterfaceOutput
(
vo
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"删除接口资源输入参数"
)
@DeleteMapping
(
value
=
"/deleteCategoryInterfaceOutput/{id}"
)
public
ResultVo
deleteCategoryInterfaceOutput
(
@PathVariable
String
id
)
{
AssertUtils
.
hasText
(
id
,
"ID不能为空"
);
categoryInterfaceService
.
deleteCategoryInterfaceOutput
(
id
);
return
ResultVo
.
success
();
}
}
}
resource-server/src/main/java/com/zq/resource/controller/admin/DbInfoController.java
View file @
9c2401f6
...
@@ -71,20 +71,20 @@ public class DbInfoController {
...
@@ -71,20 +71,20 @@ public class DbInfoController {
@ApiOperation
(
"注册库表资源"
)
@ApiOperation
(
"注册库表资源"
)
@PostMapping
(
value
=
"/share/registerDbInfo"
)
@PostMapping
(
value
=
"/share/registerDbInfo"
)
public
ResultVo
registerDbInfo
(
@RequestBody
IdVo
vo
,
@RequestParam
String
mappingId
)
{
public
ResultVo
registerDbInfo
(
@RequestBody
IdVo
vo
)
{
AssertUtils
.
isTrue
(
CollUtil
.
isNotEmpty
(
vo
.
getIds
()),
"至少选择一项"
);
AssertUtils
.
isTrue
(
CollUtil
.
isNotEmpty
(
vo
.
getIds
()),
"至少选择一项"
);
AssertUtils
.
hasText
(
mappingId
,
"缺少映射ID"
);
dbInfoService
.
registerDbInfo
(
vo
.
getIds
()
,
mappingId
);
dbInfoService
.
registerDbInfo
(
vo
.
getIds
());
return
ResultVo
.
success
();
return
ResultVo
.
success
();
}
}
@ApiOperation
(
"撤销库表资源"
)
@ApiOperation
(
"撤销库表资源"
)
@PostMapping
(
value
=
"/share/cancelDbInfo"
)
@PostMapping
(
value
=
"/share/cancelDbInfo"
)
public
ResultVo
cancelDbInfo
(
@RequestBody
IdVo
vo
)
{
public
ResultVo
cancelDbInfo
(
@RequestBody
IdVo
vo
)
{
AssertUtils
.
isTrue
(
CollUtil
.
isNotEmpty
(
vo
.
getIds
()),
"至少选择一项"
);
AssertUtils
.
notEmpty
(
vo
.
getIds
(),
"至少选择一项"
);
AssertUtils
.
hasText
(
vo
.
getNote
(),
"请输入原因"
);
dbInfoService
.
cancelDbInfo
(
vo
.
getIds
());
dbInfoService
.
cancelDbInfo
(
vo
.
getIds
()
,
vo
.
getNote
()
);
return
ResultVo
.
success
();
return
ResultVo
.
success
();
}
}
...
...
resource-server/src/main/java/com/zq/resource/controller/admin/DeptDutyController.java
View file @
9c2401f6
...
@@ -155,6 +155,15 @@ public class DeptDutyController {
...
@@ -155,6 +155,15 @@ public class DeptDutyController {
return
ResultVo
.
success
();
return
ResultVo
.
success
();
}
}
@ApiOperation
(
"删除事项-标签"
)
@PostMapping
(
value
=
"/deleteDeptLiabilityLabel/{id}"
)
public
ResultVo
deleteDeptLiabilityLabel
(
@RequestBody
String
id
)
{
AssertUtils
.
hasText
(
id
,
"ID不能为空"
);
deptDutyService
.
deleteDeptLiabilityLabel
(
id
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"获取事项-标签列表"
)
@ApiOperation
(
"获取事项-标签列表"
)
@PostMapping
(
value
=
"/getDeptLiabilityLabelList"
)
@PostMapping
(
value
=
"/getDeptLiabilityLabelList"
)
public
ResultVo
<
PageVo
<
DeptLiabilityLabel
>>
getDeptLiabilityLabelList
(
@RequestBody
KeywordFindVo
vo
)
{
public
ResultVo
<
PageVo
<
DeptLiabilityLabel
>>
getDeptLiabilityLabelList
(
@RequestBody
KeywordFindVo
vo
)
{
...
...
resource-server/src/main/java/com/zq/resource/controller/admin/FileResourceController.java
0 → 100644
View file @
9c2401f6
package
com
.
zq
.
resource
.
controller
.
admin
;
import
cn.hutool.core.collection.CollUtil
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.vo.IdVo
;
import
com.zq.common.vo.PageVo
;
import
com.zq.common.vo.ResultVo
;
import
com.zq.resource.entity.FileResource
;
import
com.zq.resource.service.FileResourceService
;
import
com.zq.resource.vo.FileResourceFindVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
/**
* @author wilmiam
* @since 2021/8/19 14:33
*/
@Api
(
tags
=
"文件资源相关接口"
)
@RequiredArgsConstructor
@RestController
@RequestMapping
(
value
=
"/resource/file"
)
public
class
FileResourceController
{
private
final
FileResourceService
fileResourceService
;
@ApiOperation
(
"添加文件资源"
)
@PostMapping
(
value
=
"/addFileResource"
)
public
ResultVo
addFileResource
(
@RequestBody
FileResource
vo
)
{
AssertUtils
.
notNull
(
vo
.
getCategoryId
(),
"缺少目录ID"
);
AssertUtils
.
hasText
(
vo
.
getFtpIp
(),
"缺少FTP IP"
);
AssertUtils
.
hasText
(
vo
.
getFtpPort
(),
"缺少FTP 端口"
);
AssertUtils
.
hasText
(
vo
.
getFtpUser
(),
"缺少FTP 账号"
);
AssertUtils
.
hasText
(
vo
.
getFtpPwd
(),
"缺少FTP 密码"
);
AssertUtils
.
hasText
(
vo
.
getFolderName
(),
"缺少FTP 文件名称"
);
fileResourceService
.
addFileResource
(
vo
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"修改文件资源"
)
@PostMapping
(
value
=
"/modifyFileResource"
)
public
ResultVo
modifyFileResource
(
@RequestBody
FileResource
vo
)
{
AssertUtils
.
notNull
(
vo
.
getId
(),
"缺少ID"
);
fileResourceService
.
modifyFileResource
(
vo
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"获取文件资源列表"
)
@PostMapping
(
value
=
"/getFileResourceList"
)
public
ResultVo
<
PageVo
<
FileResource
>>
getFileResourceList
(
@RequestBody
FileResourceFindVo
vo
)
{
return
ResultVo
.
success
(
fileResourceService
.
getFileResourceList
(
vo
));
}
@ApiOperation
(
"获取文件资源信息"
)
@GetMapping
(
value
=
"/getFileResourceInfo/{id}"
)
public
ResultVo
<
FileResource
>
getFileResourceInfo
(
@PathVariable
String
id
)
{
return
ResultVo
.
success
(
fileResourceService
.
getFileResourceInfo
(
id
));
}
@ApiOperation
(
"注册文件资源"
)
@PostMapping
(
value
=
"/share/registerFileResource"
)
public
ResultVo
registerFileResource
(
@RequestBody
IdVo
vo
)
{
AssertUtils
.
isTrue
(
CollUtil
.
isNotEmpty
(
vo
.
getIds
()),
"至少选择一项"
);
fileResourceService
.
registerFileResource
(
vo
.
getIds
());
return
ResultVo
.
success
();
}
@ApiOperation
(
"撤销文件资源"
)
@PostMapping
(
value
=
"/share/cancelFileResource"
)
public
ResultVo
cancelFileResource
(
@RequestBody
IdVo
vo
)
{
AssertUtils
.
notEmpty
(
vo
.
getIds
(),
"至少选择一项"
);
AssertUtils
.
hasText
(
vo
.
getNote
(),
"原因不能为空"
);
fileResourceService
.
cancelFileResource
(
vo
.
getIds
(),
vo
.
getNote
());
return
ResultVo
.
success
();
}
}
resource-server/src/main/java/com/zq/resource/controller/admin/StandardDataController.java
View file @
9c2401f6
...
@@ -36,7 +36,7 @@ public class StandardDataController {
...
@@ -36,7 +36,7 @@ public class StandardDataController {
@ApiOperation
(
"添加数据元"
)
@ApiOperation
(
"添加数据元"
)
@PostMapping
(
value
=
"/addStandardData"
)
@PostMapping
(
value
=
"/addStandardData"
)
public
ResultVo
addStandardData
(
@RequestBody
StandardData
vo
)
{
public
ResultVo
addStandardData
(
@RequestBody
StandardData
vo
)
{
AssertUtils
.
notNull
(
vo
.
getCategoryId
(),
"缺少
领域
ID"
);
AssertUtils
.
notNull
(
vo
.
getCategoryId
(),
"缺少
目录
ID"
);
AssertUtils
.
hasText
(
vo
.
getStandardName
(),
"缺少数据源名称"
);
AssertUtils
.
hasText
(
vo
.
getStandardName
(),
"缺少数据源名称"
);
AssertUtils
.
hasText
(
vo
.
getStandardDataType
(),
"缺少数据元类型"
);
AssertUtils
.
hasText
(
vo
.
getStandardDataType
(),
"缺少数据元类型"
);
AssertUtils
.
hasText
(
vo
.
getStandardDataLength
(),
"缺少数据元长度"
);
AssertUtils
.
hasText
(
vo
.
getStandardDataLength
(),
"缺少数据元长度"
);
...
@@ -45,7 +45,7 @@ public class StandardDataController {
...
@@ -45,7 +45,7 @@ public class StandardDataController {
AssertUtils
.
hasText
(
vo
.
getEnglishName
(),
"缺少英文名"
);
AssertUtils
.
hasText
(
vo
.
getEnglishName
(),
"缺少英文名"
);
AssertUtils
.
hasText
(
vo
.
getStandardLevel
(),
"缺少标准级别"
);
AssertUtils
.
hasText
(
vo
.
getStandardLevel
(),
"缺少标准级别"
);
AssertUtils
.
hasText
(
vo
.
getIdentification
(),
"缺少内部标识"
);
AssertUtils
.
hasText
(
vo
.
getIdentification
(),
"缺少内部标识"
);
AssertUtils
.
notNull
(
vo
.
get
Not
Null
(),
"缺少是否非空"
);
AssertUtils
.
notNull
(
vo
.
get
Is
Null
(),
"缺少是否非空"
);
AssertUtils
.
hasText
(
vo
.
getStandardNum
(),
"缺少数据标准编目"
);
AssertUtils
.
hasText
(
vo
.
getStandardNum
(),
"缺少数据标准编目"
);
AssertUtils
.
hasText
(
vo
.
getLabel
(),
"缺少编目名称"
);
AssertUtils
.
hasText
(
vo
.
getLabel
(),
"缺少编目名称"
);
AssertUtils
.
hasText
(
vo
.
getCategoryNum
(),
"缺少所属领域编码"
);
AssertUtils
.
hasText
(
vo
.
getCategoryNum
(),
"缺少所属领域编码"
);
...
@@ -108,11 +108,11 @@ public class StandardDataController {
...
@@ -108,11 +108,11 @@ public class StandardDataController {
AssertUtils
.
hasText
(
vo
.
getStandardId
(),
"缺少数据元ID"
);
AssertUtils
.
hasText
(
vo
.
getStandardId
(),
"缺少数据元ID"
);
AssertUtils
.
hasText
(
vo
.
getTableName
(),
"缺少表名"
);
AssertUtils
.
hasText
(
vo
.
getTableName
(),
"缺少表名"
);
AssertUtils
.
hasText
(
vo
.
getTableSqlname
(),
"缺少数据库表名"
);
AssertUtils
.
hasText
(
vo
.
getTableSqlname
(),
"缺少数据库表名"
);
AssertUtils
.
hasText
(
vo
.
getFieldName
(),
"缺少列名"
);
//
AssertUtils.hasText(vo.getFieldName(), "缺少列名");
AssertUtils
.
hasText
(
vo
.
getFieldType
(),
"缺少列类型"
);
//
AssertUtils.hasText(vo.getFieldType(), "缺少列类型");
AssertUtils
.
notNull
(
vo
.
getLength
(),
"缺少列长度"
);
//
AssertUtils.notNull(vo.getLength(), "缺少列长度");
AssertUtils
.
notNull
(
vo
.
getFieldPrecision
(),
"缺少列精度"
);
//
AssertUtils.notNull(vo.getFieldPrecision(), "缺少列精度");
AssertUtils
.
notNull
(
vo
.
getIsPk
(),
"确实是否主键"
);
//
AssertUtils.notNull(vo.getIsPk(), "确实是否主键");
AssertUtils
.
hasText
(
vo
.
getStandardNum
(),
"缺少数据标准编目"
);
AssertUtils
.
hasText
(
vo
.
getStandardNum
(),
"缺少数据标准编目"
);
AssertUtils
.
hasText
(
vo
.
getConnecttionName
(),
"缺少数据源名称"
);
AssertUtils
.
hasText
(
vo
.
getConnecttionName
(),
"缺少数据源名称"
);
AssertUtils
.
hasText
(
vo
.
getCreditCode
(),
"缺少统一信用码"
);
AssertUtils
.
hasText
(
vo
.
getCreditCode
(),
"缺少统一信用码"
);
...
...
resource-server/src/main/java/com/zq/resource/controller/app/AreaApi.java
View file @
9c2401f6
...
@@ -31,7 +31,7 @@ public class AreaApi {
...
@@ -31,7 +31,7 @@ public class AreaApi {
@ApiOperation
(
"指定条件获取区域列表"
)
@ApiOperation
(
"指定条件获取区域列表"
)
@PostMapping
(
value
=
"/getAreaList"
)
@PostMapping
(
value
=
"/getAreaList"
)
public
ResultVo
<
List
<
SystemArea
>>
getAreaList
(
@RequestBody
SystemArea
vo
)
{
public
ResultVo
<
List
<
SystemArea
>>
getAreaList
(
@RequestBody
SystemArea
vo
,
String
id
)
{
return
ResultVo
.
success
(
areaService
.
getAreaList
(
vo
));
return
ResultVo
.
success
(
areaService
.
getAreaList
(
vo
));
}
}
...
...
resource-server/src/main/java/com/zq/resource/dao/CategoryInterfaceInputDao.java
0 → 100644
View file @
9c2401f6
package
com
.
zq
.
resource
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zq.resource.entity.CategoryInterfaceInput
;
import
org.springframework.stereotype.Repository
;
/**
* 接口资源-输入参数(CategoryInterfaceInput)表数据库访问层
*
* @author makejava
* @since 2021-09-14 10:04:18
*/
@Repository
public
interface
CategoryInterfaceInputDao
extends
BaseMapper
<
CategoryInterfaceInput
>
{
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/dao/CategoryInterfaceOutputDao.java
0 → 100644
View file @
9c2401f6
package
com
.
zq
.
resource
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zq.resource.entity.CategoryInterfaceOutput
;
import
org.springframework.stereotype.Repository
;
/**
* 接口资源-输出参数(CategoryInterfaceOutput)表数据库访问层
*
* @author makejava
* @since 2021-09-14 10:04:18
*/
@Repository
public
interface
CategoryInterfaceOutputDao
extends
BaseMapper
<
CategoryInterfaceOutput
>
{
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/dao/
DataCategoryItem
Dao.java
→
resource-server/src/main/java/com/zq/resource/dao/
FileResource
Dao.java
View file @
9c2401f6
package
com
.
zq
.
resource
.
dao
;
package
com
.
zq
.
resource
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zq.resource.entity.
DataCategoryItem
;
import
com.zq.resource.entity.
FileResource
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
/**
/**
*
资源目录管理表(DataCategoryItem
)表数据库访问层
*
文件资源(FileResource
)表数据库访问层
*
*
* @author makejava
* @author makejava
* @since 2021-0
8-31 15:23:3
7
* @since 2021-0
9-13 17:59:1
7
*/
*/
@Repository
@Repository
public
interface
DataCategoryItemDao
extends
BaseMapper
<
DataCategoryItem
>
{
public
interface
FileResourceDao
extends
BaseMapper
<
FileResource
>
{
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/CategoryInterface.java
View file @
9c2401f6
...
@@ -150,4 +150,8 @@ public class CategoryInterface {
...
@@ -150,4 +150,8 @@ public class CategoryInterface {
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"目录名称"
)
@TableField
(
exist
=
false
)
private
String
categoryName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/CategoryInterfaceAttach.java
View file @
9c2401f6
...
@@ -72,4 +72,8 @@ public class CategoryInterfaceAttach {
...
@@ -72,4 +72,8 @@ public class CategoryInterfaceAttach {
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"接口资源名称"
)
@TableField
(
exist
=
false
)
private
String
categoryInterfaceName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/
DataCategoryItem
.java
→
resource-server/src/main/java/com/zq/resource/entity/
CategoryInterfaceInput
.java
View file @
9c2401f6
...
@@ -9,63 +9,58 @@ import lombok.Builder;
...
@@ -9,63 +9,58 @@ import lombok.Builder;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
*
资源目录管理表(DataCategory
)实体类
*
接口资源-输入参数(CategoryInterfaceInput
)实体类
*
*
* @author makejava
* @author makejava
* @since 2021-0
8-31 15:23:37
* @since 2021-0
9-14 10:04:18
*/
*/
@Data
@Data
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@Builder
@Builder
@TableName
(
value
=
"
DATA_CATEGORY_ITEM
"
,
schema
=
"ZY"
)
@TableName
(
value
=
"
CATEGORY_INTERFACE_INPUT
"
,
schema
=
"ZY"
)
public
class
DataCategoryItem
{
public
class
CategoryInterfaceInput
{
/**
/**
*
ID
*
自增
*/
*/
@ApiModelProperty
(
"
ID
"
)
@ApiModelProperty
(
"
自增
"
)
@TableId
(
type
=
IdType
.
ASSIGN_UUID
)
@TableId
(
type
=
IdType
.
ASSIGN_UUID
)
private
String
id
;
private
String
id
;
/**
/**
*
目录ID
*
参数字段名
*/
*/
@ApiModelProperty
(
"
目录ID
"
)
@ApiModelProperty
(
"
参数字段名
"
)
private
String
categoryId
;
private
String
paramName
;
/**
/**
*
信息项名称
*
参数类型
*/
*/
@ApiModelProperty
(
"
信息项名称
"
)
@ApiModelProperty
(
"
参数类型
"
)
private
String
cnNam
e
;
private
String
paramTyp
e
;
/**
/**
*
数据类型编码(见附录数据字典.数据类型)
*
是否必填
*/
*/
@ApiModelProperty
(
"
数据类型编码(见附录数据字典.数据类型)
"
)
@ApiModelProperty
(
"
是否必填
"
)
private
String
dataFormat
;
private
BigDecimal
mustfill
;
/**
/**
*
数据长度
*
参数描述
*/
*/
@ApiModelProperty
(
"
数据长度
"
)
@ApiModelProperty
(
"
参数描述
"
)
private
Integer
length
;
private
String
remark
;
/**
/**
*
数值类型选填精度
*
接口资源ID
*/
*/
@ApiModelProperty
(
"数值类型选填精度"
)
@ApiModelProperty
(
"接口资源ID"
)
private
String
fieldPrecision
;
private
String
categoryInterfaceId
;
/**
* 排序编号
*/
@ApiModelProperty
(
"排序编号"
)
private
Integer
orderId
;
/**
/**
* 创建时间
* 创建时间
...
@@ -78,4 +73,5 @@ public class DataCategoryItem {
...
@@ -78,4 +73,5 @@ public class DataCategoryItem {
*/
*/
@ApiModelProperty
(
"更新时间"
)
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
private
Date
updateTime
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/
vo/DataCategoryItemFindVo
.java
→
resource-server/src/main/java/com/zq/resource/
entity/CategoryInterfaceOutput
.java
View file @
9c2401f6
package
com
.
zq
.
resource
.
vo
;
package
com
.
zq
.
resource
.
entity
;
import
com.zq.common.vo.PageReqVo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
...
@@ -10,56 +12,59 @@ import lombok.NoArgsConstructor;
...
@@ -10,56 +12,59 @@ import lombok.NoArgsConstructor;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
*
资源目录管理表(DataCategory
)实体类
*
接口资源-输出参数(CategoryInterfaceOutput
)实体类
*
*
* @author makejava
* @author makejava
* @since 2021-0
8-31 15:23:37
* @since 2021-0
9-14 10:04:18
*/
*/
@Data
@Data
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@Builder
@Builder
public
class
DataCategoryItemFindVo
extends
PageReqVo
{
@TableName
(
value
=
"CATEGORY_INTERFACE_OUTPUT"
,
schema
=
"ZY"
)
public
class
CategoryInterfaceOutput
{
/**
/**
*
ID
*
自增
*/
*/
@ApiModelProperty
(
"ID"
)
@ApiModelProperty
(
"自增"
)
@TableId
(
type
=
IdType
.
ASSIGN_UUID
)
private
String
id
;
private
String
id
;
/**
/**
*
信息项名称
*
参数字段名
*/
*/
@ApiModelProperty
(
"
信息项名称
"
)
@ApiModelProperty
(
"
参数字段名
"
)
private
String
cn
Name
;
private
String
param
Name
;
/**
/**
*
数据类型编码(见附录数据字典.数据类型)
*
参数类型
*/
*/
@ApiModelProperty
(
"
数据类型编码(见附录数据字典.数据类型)
"
)
@ApiModelProperty
(
"
参数类型
"
)
private
String
dataFormat
;
private
String
paramType
;
/**
/**
*
数据长度
*
参数描述
*/
*/
@ApiModelProperty
(
"
数据长度
"
)
@ApiModelProperty
(
"
参数描述
"
)
private
Integer
length
;
private
String
remark
;
/**
/**
*
数值类型选填精度
*
接口资源ID
*/
*/
@ApiModelProperty
(
"
数值类型选填精度
"
)
@ApiModelProperty
(
"
接口资源ID
"
)
private
String
fieldPrecision
;
private
String
categoryInterfaceId
;
/**
/**
*
排序编号
*
创建时间
*/
*/
@ApiModelProperty
(
"
排序编号
"
)
@ApiModelProperty
(
"
创建时间
"
)
private
Integer
orderId
;
private
Date
createTime
;
/**
/**
* 更新时间
* 更新时间
*/
*/
@ApiModelProperty
(
"更新时间"
)
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
private
Date
updateTime
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/CodeItem.java
View file @
9c2401f6
...
@@ -72,4 +72,7 @@ public class CodeItem {
...
@@ -72,4 +72,7 @@ public class CodeItem {
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"代码项主项名称"
)
@TableField
(
exist
=
false
)
private
String
codeMainName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/CodeMain.java
View file @
9c2401f6
...
@@ -78,4 +78,12 @@ public class CodeMain {
...
@@ -78,4 +78,12 @@ public class CodeMain {
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"系统名称"
)
@TableField
(
exist
=
false
)
private
String
systemName
;
@ApiModelProperty
(
"部门名称"
)
@TableField
(
exist
=
false
)
private
String
deptName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/DataCategory.java
View file @
9c2401f6
...
@@ -30,15 +30,9 @@ public class DataCategory {
...
@@ -30,15 +30,9 @@ public class DataCategory {
private
String
id
;
private
String
id
;
/**
/**
*
国家平台目录ID区共享平台返回的目录ID,UU
ID
*
目录分类
ID
*/
*/
@ApiModelProperty
(
"国家平台目录ID区共享平台返回的目录ID,UUID"
)
@ApiModelProperty
(
"目录分类ID"
)
private
String
cataId
;
/**
* 区共享平台返回的目录分类ID
*/
@ApiModelProperty
(
"区共享平台返回的目录分类ID"
)
private
String
groupId
;
private
String
groupId
;
/**
/**
...
@@ -185,4 +179,12 @@ public class DataCategory {
...
@@ -185,4 +179,12 @@ public class DataCategory {
@ApiModelProperty
(
"注册接口返回的ID"
)
@ApiModelProperty
(
"注册接口返回的ID"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"目录分类名称"
)
@TableField
(
exist
=
false
)
private
String
groupName
;
@ApiModelProperty
(
"目录分类授权部门名称"
)
@TableField
(
exist
=
false
)
private
String
deptName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/DataCategoryGroup.java
View file @
9c2401f6
...
@@ -83,4 +83,12 @@ public class DataCategoryGroup {
...
@@ -83,4 +83,12 @@ public class DataCategoryGroup {
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"父目录分类名称"
)
@TableField
(
exist
=
false
)
private
String
parentName
;
@ApiModelProperty
(
"目录分类授权部门名称"
)
@TableField
(
exist
=
false
)
private
String
deptName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/DbInfo.java
View file @
9c2401f6
...
@@ -108,4 +108,12 @@ public class DbInfo {
...
@@ -108,4 +108,12 @@ public class DbInfo {
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"目录名称"
)
@TableField
(
exist
=
false
)
private
String
categoryName
;
@ApiModelProperty
(
"系统名称"
)
@TableField
(
exist
=
false
)
private
String
systemName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/DeptLiability.java
View file @
9c2401f6
...
@@ -66,4 +66,8 @@ public class DeptLiability {
...
@@ -66,4 +66,8 @@ public class DeptLiability {
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"职责名称"
)
@TableField
(
exist
=
false
)
private
String
deptDutyName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/FileResource.java
0 → 100644
View file @
9c2401f6
package
com
.
zq
.
resource
.
entity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* 文件资源(FileResource)实体类
*
* @author makejava
* @since 2021-09-13 17:59:17
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName
(
value
=
"FILE_RESOURCE"
,
schema
=
"ZY"
)
public
class
FileResource
{
/**
* ID
*/
@ApiModelProperty
(
"ID"
)
@TableId
(
type
=
IdType
.
ASSIGN_UUID
)
private
String
id
;
/**
* 目录ID
*/
@ApiModelProperty
(
"目录ID"
)
private
String
categoryId
;
/**
* 数据字典:主题分类
*/
@ApiModelProperty
(
"数据字典:主题分类"
)
private
String
business
;
/**
* 是否使用sftp
*/
@ApiModelProperty
(
"是否使用sftp"
)
private
Integer
isSftp
;
/**
* 描述
*/
@ApiModelProperty
(
"描述"
)
private
String
remark
;
/**
* ftp服务器IP
*/
@ApiModelProperty
(
"ftp服务器IP"
)
private
String
ftpIp
;
/**
* ftp服务器端口
*/
@ApiModelProperty
(
"ftp服务器端口"
)
private
String
ftpPort
;
/**
* ftp账号
*/
@ApiModelProperty
(
"ftp账号"
)
private
String
ftpUser
;
/**
* ftp密码
*/
@ApiModelProperty
(
"ftp密码"
)
private
String
ftpPwd
;
/**
* 文件名称
*/
@ApiModelProperty
(
"文件名称"
)
private
String
folderName
;
/**
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
/**
* 状态: 1-正常, 2-删除
*/
@ApiModelProperty
(
"状态: 1-正常, 2-删除"
)
private
Integer
state
;
/**
* 注册接口返回的ID
*/
@ApiModelProperty
(
"注册接口返回的ID"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
@ApiModelProperty
(
"目录名称"
)
@TableField
(
exist
=
false
)
private
String
categoryName
;
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/StandardCategoryName.java
View file @
9c2401f6
...
@@ -51,7 +51,7 @@ public class StandardCategoryName {
...
@@ -51,7 +51,7 @@ public class StandardCategoryName {
* 是否通用
* 是否通用
*/
*/
@ApiModelProperty
(
"是否通用"
)
@ApiModelProperty
(
"是否通用"
)
private
Boolean
isGeneral
;
private
Integer
isGeneral
;
/**
/**
* 区平台对应的领域编码
* 区平台对应的领域编码
...
...
resource-server/src/main/java/com/zq/resource/entity/StandardData.java
View file @
9c2401f6
...
@@ -30,12 +30,24 @@ public class StandardData {
...
@@ -30,12 +30,24 @@ public class StandardData {
private
String
id
;
private
String
id
;
/**
/**
*
所属领域id
*
目录ID
*/
*/
@ApiModelProperty
(
"
所属领域id
"
)
@ApiModelProperty
(
"
目录ID
"
)
private
String
categoryId
;
private
String
categoryId
;
/**
/**
* 表映射ID
*/
@ApiModelProperty
(
"表映射ID"
)
private
String
mappingId
;
/**
* 信息项ID
*/
@ApiModelProperty
(
"信息项ID"
)
private
String
infoItemId
;
/**
* 数据元名称
* 数据元名称
*/
*/
@ApiModelProperty
(
"数据元名称"
)
@ApiModelProperty
(
"数据元名称"
)
...
@@ -84,10 +96,22 @@ public class StandardData {
...
@@ -84,10 +96,22 @@ public class StandardData {
private
String
identification
;
private
String
identification
;
/**
/**
* 是否
非
空
* 是否
允许为
空
*/
*/
@ApiModelProperty
(
"是否非空"
)
@ApiModelProperty
(
"是否允许为空"
)
private
String
notNull
;
private
Integer
isNull
;
/**
* 是否主键
*/
@ApiModelProperty
(
"是否主键"
)
private
Integer
isPk
;
/**
* 排序编号,默认为0
*/
@ApiModelProperty
(
"排序编号,默认为0"
)
private
Integer
orderNum
;
/**
/**
* 数据标准编目
* 数据标准编目
...
@@ -132,4 +156,8 @@ public class StandardData {
...
@@ -132,4 +156,8 @@ public class StandardData {
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"目录名称"
)
@TableField
(
exist
=
false
)
private
String
categoryName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/StandardDataMapping.java
View file @
9c2401f6
...
@@ -81,7 +81,7 @@ public class StandardDataMapping {
...
@@ -81,7 +81,7 @@ public class StandardDataMapping {
* 是否主键
* 是否主键
*/
*/
@ApiModelProperty
(
"是否主键"
)
@ApiModelProperty
(
"是否主键"
)
private
Boolean
isPk
;
private
Integer
isPk
;
/**
/**
* 数据标准编目
* 数据标准编目
...
@@ -139,9 +139,18 @@ public class StandardDataMapping {
...
@@ -139,9 +139,18 @@ public class StandardDataMapping {
private
String
cascadeguid
;
private
String
cascadeguid
;
/**
/**
*
是否在库表资源注册: 0-未注册 1-已注册
*
注册接口返回的ID
*/
*/
@ApiModelProperty
(
"是否在库表资源注册: 0-未注册 1-已注册"
)
@ApiModelProperty
(
"注册库表接口返回的ID"
)
private
Integer
regTableState
;
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
tableCascadeguid
;
@ApiModelProperty
(
"数据库名称"
)
@TableField
(
exist
=
false
)
private
String
dbName
;
@ApiModelProperty
(
"数据元名称"
)
@TableField
(
exist
=
false
)
private
String
standardName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/entity/SystemInfo.java
View file @
9c2401f6
...
@@ -114,4 +114,8 @@ public class SystemInfo {
...
@@ -114,4 +114,8 @@ public class SystemInfo {
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
private
String
cascadeguid
;
@ApiModelProperty
(
"目录分类授权部门名称"
)
@TableField
(
exist
=
false
)
private
String
deptName
;
}
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/service/CategoryInterfaceService.java
View file @
9c2401f6
This diff is collapsed.
Click to expand it.
resource-server/src/main/java/com/zq/resource/service/CategoryService.java
View file @
9c2401f6
...
@@ -12,11 +12,14 @@ import com.zq.common.utils.PagingUtils;
...
@@ -12,11 +12,14 @@ import com.zq.common.utils.PagingUtils;
import
com.zq.common.vo.PageVo
;
import
com.zq.common.vo.PageVo
;
import
com.zq.resource.config.ShareApiConfig
;
import
com.zq.resource.config.ShareApiConfig
;
import
com.zq.resource.constant.ShareApiEnum
;
import
com.zq.resource.constant.ShareApiEnum
;
import
com.zq.resource.dao.*
;
import
com.zq.resource.dao.DataCategoryDao
;
import
com.zq.resource.dao.DataCategoryGroupDao
;
import
com.zq.resource.dao.OrgDeptDao
;
import
com.zq.resource.dao.StandardDataDao
;
import
com.zq.resource.entity.DataCategory
;
import
com.zq.resource.entity.DataCategory
;
import
com.zq.resource.entity.DataCategoryGroup
;
import
com.zq.resource.entity.DataCategoryGroup
;
import
com.zq.resource.entity.DataCategoryItem
;
import
com.zq.resource.entity.OrgDept
;
import
com.zq.resource.entity.OrgDept
;
import
com.zq.resource.entity.StandardData
;
import
com.zq.resource.utils.ShareApiUtils
;
import
com.zq.resource.utils.ShareApiUtils
;
import
com.zq.resource.utils.TreeUtils
;
import
com.zq.resource.utils.TreeUtils
;
import
com.zq.resource.vo.*
;
import
com.zq.resource.vo.*
;
...
@@ -37,10 +40,8 @@ public class CategoryService {
...
@@ -37,10 +40,8 @@ public class CategoryService {
private
final
DataCategoryDao
dataCategoryDao
;
private
final
DataCategoryDao
dataCategoryDao
;
private
final
DataCategoryGroupDao
dataCategoryGroupDao
;
private
final
DataCategoryGroupDao
dataCategoryGroupDao
;
private
final
DataCategoryItemDao
dataCategoryItem
Dao
;
private
final
StandardDataDao
standardData
Dao
;
private
final
OrgDeptDao
orgDeptDao
;
private
final
OrgDeptDao
orgDeptDao
;
private
final
CategoryInterfaceDao
categoryInterfaceDao
;
private
final
CategoryInterfaceAttachDao
categoryInterfaceAttachDao
;
private
final
ShareApiConfig
shareApiConfig
;
private
final
ShareApiConfig
shareApiConfig
;
public
PageVo
<
DataCategory
>
getCategoryList
(
DataCategoryFindVo
vo
)
{
public
PageVo
<
DataCategory
>
getCategoryList
(
DataCategoryFindVo
vo
)
{
...
@@ -50,8 +51,14 @@ public class CategoryService {
...
@@ -50,8 +51,14 @@ public class CategoryService {
lambdaQuery
.
like
(
DataCategory:
:
getCataTitle
,
vo
.
getCataTitle
());
lambdaQuery
.
like
(
DataCategory:
:
getCataTitle
,
vo
.
getCataTitle
());
vo
.
setCataTitle
(
null
);
vo
.
setCataTitle
(
null
);
}
}
PageVo
<
DataCategory
>
paging
=
PagingUtils
.
paging
(
vo
,
dataCategoryDao
,
DataCategory
.
class
,
lambdaQuery
);
return
PagingUtils
.
paging
(
vo
,
dataCategoryDao
,
DataCategory
.
class
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
dataCategory
->
{
DataCategoryGroup
dataCategoryGroup
=
dataCategoryGroupDao
.
selectById
(
dataCategory
.
getGroupId
());
dataCategory
.
setGroupName
(
dataCategoryGroup
.
getGroupName
());
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
dataCategory
.
getDeptId
());
dataCategory
.
setDeptName
(
orgDept
.
getDeptName
());
});
return
paging
;
}
}
public
List
<
DataCategory
>
getAllCategoryList
(
DataCategoryFindVo
vo
)
{
public
List
<
DataCategory
>
getAllCategoryList
(
DataCategoryFindVo
vo
)
{
...
@@ -173,18 +180,18 @@ public class CategoryService {
...
@@ -173,18 +180,18 @@ public class CategoryService {
* @return
* @return
*/
*/
public
List
<
Map
<
String
,
Object
>>
getColumnList
(
String
categoryId
)
{
public
List
<
Map
<
String
,
Object
>>
getColumnList
(
String
categoryId
)
{
List
<
DataCategoryItem
>
dataCategoryItemList
=
dataCategoryItemDao
.
selectList
(
Wrappers
.
lambdaQuery
(
DataCategoryItem
.
builder
(
).
build
()));
List
<
StandardData
>
standardDataList
=
standardDataDao
.
selectList
(
Wrappers
.
lambdaQuery
(
StandardData
.
builder
().
categoryId
(
categoryId
).
build
()));
List
<
Map
<
String
,
Object
>>
itemList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
itemList
=
new
ArrayList
<>();
for
(
DataCategoryItem
dataCategoryItem
:
dataCategoryItem
List
)
{
for
(
StandardData
standardData
:
standardData
List
)
{
Map
<
String
,
Object
>
dataItem
=
new
HashMap
<>();
Map
<
String
,
Object
>
dataItem
=
new
HashMap
<>();
dataItem
.
put
(
"columnid"
,
dataCategoryItem
.
get
Id
());
dataItem
.
put
(
"columnid"
,
standardData
.
getInfoItem
Id
());
dataItem
.
put
(
"namecn"
,
dataCategoryItem
.
getCn
Name
());
dataItem
.
put
(
"namecn"
,
standardData
.
getStandard
Name
());
dataItem
.
put
(
"dataformat"
,
dataCategoryItem
.
getDataFormat
());
dataItem
.
put
(
"dataformat"
,
standardData
.
getStandardDataType
());
dataItem
.
put
(
"length"
,
dataCategoryItem
.
get
Length
());
dataItem
.
put
(
"length"
,
standardData
.
getStandardData
Length
());
dataItem
.
put
(
"precision"
,
dataCategoryItem
.
getFieldPrecision
());
dataItem
.
put
(
"precision"
,
standardData
.
getFieldPrecision
());
dataItem
.
put
(
"order_id"
,
dataCategoryItem
.
getOrderId
());
dataItem
.
put
(
"order_id"
,
standardData
.
getOrderNum
());
dataItem
.
put
(
"updatetime"
,
dataCategoryItem
.
getUpdateTime
());
dataItem
.
put
(
"updatetime"
,
standardData
.
getUpdateTime
());
itemList
.
add
(
dataItem
);
itemList
.
add
(
dataItem
);
}
}
...
@@ -221,11 +228,12 @@ public class CategoryService {
...
@@ -221,11 +228,12 @@ public class CategoryService {
dataCategoryDao
.
updateById
(
dataCategory
);
dataCategoryDao
.
updateById
(
dataCategory
);
List
<
DataCategoryItem
>
dataCategoryItemList
=
dataCategoryItemDao
.
selectList
(
Wrappers
.
lambdaQuery
(
DataCategoryItem
.
builder
().
categoryId
(
dataCategory
.
getId
()).
build
()));
List
<
StandardData
>
standardDataList
=
standardDataDao
.
selectList
(
Wrappers
.
lambdaQuery
(
StandardData
.
builder
().
categoryId
(
dataCategory
.
getId
()).
build
()));
for
(
DataCategoryItem
dataCategoryItem
:
dataCategoryItemList
)
{
for
(
StandardData
standardData
:
standardDataList
)
{
dataCategoryItemDao
.
update
(
null
,
Wrappers
.
lambdaUpdate
(
DataCategoryItem
.
class
)
standardData
.
setInfoItemId
(
IdUtil
.
randomUUID
());
.
set
(
DataCategoryItem:
:
getId
,
IdUtil
.
randomUUID
())
standardData
.
setUpdateTime
(
DateUtil
.
date
());
.
eq
(
DataCategoryItem:
:
getId
,
dataCategoryItem
.
getId
()));
standardDataDao
.
updateById
(
standardData
);
}
}
}
}
}
}
...
@@ -325,7 +333,16 @@ public class CategoryService {
...
@@ -325,7 +333,16 @@ public class CategoryService {
vo
.
setRemark
(
null
);
vo
.
setRemark
(
null
);
}
}
return
PagingUtils
.
paging
(
vo
,
dataCategoryGroupDao
,
DataCategoryGroup
.
class
,
lambdaQuery
);
PageVo
<
DataCategoryGroup
>
paging
=
PagingUtils
.
paging
(
vo
,
dataCategoryGroupDao
,
DataCategoryGroup
.
class
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
dataCategoryGroup
->
{
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
dataCategoryGroup
.
getDeptId
());
dataCategoryGroup
.
setDeptName
(
orgDept
.
getDeptName
());
if
(
StringUtils
.
isNotBlank
(
dataCategoryGroup
.
getParentId
()))
{
DataCategoryGroup
parentDataCategoryGroup
=
dataCategoryGroupDao
.
selectById
(
dataCategoryGroup
.
getParentId
());
dataCategoryGroup
.
setParentName
(
parentDataCategoryGroup
.
getGroupName
());
}
});
return
paging
;
}
}
public
void
registerCategoryGroup
(
Set
<
String
>
ids
)
{
public
void
registerCategoryGroup
(
Set
<
String
>
ids
)
{
...
@@ -393,47 +410,4 @@ public class CategoryService {
...
@@ -393,47 +410,4 @@ public class CategoryService {
return
TreeUtils
.
buildTree
(
collect
,
null
);
return
TreeUtils
.
buildTree
(
collect
,
null
);
}
}
public
PageVo
<
DataCategoryItem
>
getCategoryItemList
(
DataCategoryItemFindVo
vo
)
{
LambdaQueryWrapper
<
DataCategoryItem
>
lambdaQuery
=
Wrappers
.
lambdaQuery
(
DataCategoryItem
.
class
);
if
(
StringUtils
.
isNotBlank
(
vo
.
getCnName
()))
{
lambdaQuery
.
like
(
DataCategoryItem:
:
getCnName
,
vo
.
getCnName
());
vo
.
setCnName
(
null
);
}
return
PagingUtils
.
paging
(
vo
,
dataCategoryItemDao
,
DataCategoryItem
.
class
,
lambdaQuery
);
}
public
DataCategoryItem
getCategoryItemInfo
(
String
id
)
{
return
dataCategoryItemDao
.
selectById
(
id
);
}
public
void
addCategoryItem
(
DataCategoryItem
vo
)
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
vo
.
getCategoryId
());
AssertUtils
.
notNull
(
dataCategory
,
"目录不存在"
);
if
(
vo
.
getOrderId
()
==
null
)
{
vo
.
setOrderId
(
0
);
}
vo
.
setId
(
IdUtil
.
randomUUID
());
vo
.
setCreateTime
(
DateUtil
.
date
());
vo
.
setUpdateTime
(
DateUtil
.
date
());
dataCategoryItemDao
.
insert
(
vo
);
}
public
void
modifyCategoryItem
(
DataCategoryItem
vo
)
{
DataCategoryItem
dataCategoryItem
=
dataCategoryItemDao
.
selectById
(
vo
.
getId
());
AssertUtils
.
notNull
(
dataCategoryItem
,
"无此信息项"
);
dataCategoryItem
.
setCnName
(
vo
.
getCnName
());
dataCategoryItem
.
setDataFormat
(
vo
.
getDataFormat
());
dataCategoryItem
.
setLength
(
vo
.
getLength
());
dataCategoryItem
.
setFieldPrecision
(
vo
.
getFieldPrecision
());
dataCategoryItem
.
setOrderId
(
vo
.
getOrderId
());
dataCategoryItem
.
setUpdateTime
(
vo
.
getUpdateTime
());
dataCategoryItemDao
.
updateById
(
dataCategoryItem
);
}
}
}
resource-server/src/main/java/com/zq/resource/service/CodeService.java
View file @
9c2401f6
...
@@ -10,9 +10,11 @@ import com.zq.resource.constant.ShareApiEnum;
...
@@ -10,9 +10,11 @@ import com.zq.resource.constant.ShareApiEnum;
import
com.zq.resource.dao.CodeItemDao
;
import
com.zq.resource.dao.CodeItemDao
;
import
com.zq.resource.dao.CodeMainDao
;
import
com.zq.resource.dao.CodeMainDao
;
import
com.zq.resource.dao.OrgDeptDao
;
import
com.zq.resource.dao.OrgDeptDao
;
import
com.zq.resource.dao.SystemInfoDao
;
import
com.zq.resource.entity.CodeItem
;
import
com.zq.resource.entity.CodeItem
;
import
com.zq.resource.entity.CodeMain
;
import
com.zq.resource.entity.CodeMain
;
import
com.zq.resource.entity.OrgDept
;
import
com.zq.resource.entity.OrgDept
;
import
com.zq.resource.entity.SystemInfo
;
import
com.zq.resource.utils.ShareApiUtils
;
import
com.zq.resource.utils.ShareApiUtils
;
import
com.zq.resource.vo.CodeItemFindVo
;
import
com.zq.resource.vo.CodeItemFindVo
;
import
com.zq.resource.vo.CodeMainFindVo
;
import
com.zq.resource.vo.CodeMainFindVo
;
...
@@ -35,8 +37,14 @@ public class CodeService {
...
@@ -35,8 +37,14 @@ public class CodeService {
private
final
CodeMainDao
codeMainDao
;
private
final
CodeMainDao
codeMainDao
;
private
final
CodeItemDao
codeItemDao
;
private
final
CodeItemDao
codeItemDao
;
private
final
OrgDeptDao
orgDeptDao
;
private
final
OrgDeptDao
orgDeptDao
;
private
final
SystemInfoDao
systemInfoDao
;
public
void
addCodeMain
(
CodeMain
vo
)
{
public
void
addCodeMain
(
CodeMain
vo
)
{
SystemInfo
systemInfo
=
systemInfoDao
.
selectById
(
vo
.
getAppId
());
AssertUtils
.
notNull
(
systemInfo
,
"系统不存在"
);
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
vo
.
getDeptId
());
AssertUtils
.
notNull
(
orgDept
,
"机构不存在"
);
vo
.
setCreateTime
(
DateUtil
.
date
());
vo
.
setCreateTime
(
DateUtil
.
date
());
vo
.
setUpdateTime
(
DateUtil
.
date
());
vo
.
setUpdateTime
(
DateUtil
.
date
());
...
@@ -46,6 +54,10 @@ public class CodeService {
...
@@ -46,6 +54,10 @@ public class CodeService {
public
void
modifyCodeMain
(
CodeMain
vo
)
{
public
void
modifyCodeMain
(
CodeMain
vo
)
{
CodeMain
codeMain
=
codeMainDao
.
selectById
(
vo
.
getId
());
CodeMain
codeMain
=
codeMainDao
.
selectById
(
vo
.
getId
());
AssertUtils
.
notNull
(
codeMain
,
"无此代码主项"
);
AssertUtils
.
notNull
(
codeMain
,
"无此代码主项"
);
if
(
StringUtils
.
isNotBlank
(
vo
.
getAppId
()))
{
SystemInfo
systemInfo
=
systemInfoDao
.
selectById
(
vo
.
getAppId
());
AssertUtils
.
notNull
(
systemInfo
,
"系统不存在"
);
}
codeMain
.
setDeptId
(
vo
.
getDeptId
());
codeMain
.
setDeptId
(
vo
.
getDeptId
());
codeMain
.
setAppId
(
vo
.
getAppId
());
codeMain
.
setAppId
(
vo
.
getAppId
());
...
@@ -68,7 +80,14 @@ public class CodeService {
...
@@ -68,7 +80,14 @@ public class CodeService {
vo
.
setDescription
(
null
);
vo
.
setDescription
(
null
);
}
}
return
PagingUtils
.
paging
(
vo
,
codeMainDao
,
CodeMain
.
class
,
lambdaQuery
);
PageVo
<
CodeMain
>
paging
=
PagingUtils
.
paging
(
vo
,
codeMainDao
,
CodeMain
.
class
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
codeMain
->
{
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
codeMain
.
getDeptId
());
codeMain
.
setDeptName
(
orgDept
.
getDeptName
());
SystemInfo
systemInfo
=
systemInfoDao
.
selectById
(
codeMain
.
getAppId
());
codeMain
.
setSystemName
(
systemInfo
.
getSystemName
());
});
return
paging
;
}
}
public
CodeMain
getCodeMainInfo
(
String
codeMainId
)
{
public
CodeMain
getCodeMainInfo
(
String
codeMainId
)
{
...
@@ -143,7 +162,12 @@ public class CodeService {
...
@@ -143,7 +162,12 @@ public class CodeService {
vo
.
setItemText
(
null
);
vo
.
setItemText
(
null
);
}
}
return
PagingUtils
.
paging
(
vo
,
codeItemDao
,
CodeItem
.
class
,
lambdaQuery
);
PageVo
<
CodeItem
>
paging
=
PagingUtils
.
paging
(
vo
,
codeItemDao
,
CodeItem
.
class
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
codeItem
->
{
CodeMain
codeMain
=
codeMainDao
.
selectById
(
codeItem
.
getCodeMainId
());
codeItem
.
setCodeMainName
(
codeMain
.
getCodeName
());
});
return
paging
;
}
}
public
CodeItem
getCodeItemInfo
(
String
codeItemId
)
{
public
CodeItem
getCodeItemInfo
(
String
codeItemId
)
{
...
...
resource-server/src/main/java/com/zq/resource/service/DbInfoService.java
View file @
9c2401f6
...
@@ -17,10 +17,7 @@ import lombok.RequiredArgsConstructor;
...
@@ -17,10 +17,7 @@ import lombok.RequiredArgsConstructor;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
/**
/**
* @author wilmiam
* @author wilmiam
...
@@ -83,7 +80,14 @@ public class DbInfoService {
...
@@ -83,7 +80,14 @@ public class DbInfoService {
vo
.
setRemark
(
null
);
vo
.
setRemark
(
null
);
}
}
return
PagingUtils
.
paging
(
vo
,
dbInfoDao
,
DbInfo
.
class
,
lambdaQuery
);
PageVo
<
DbInfo
>
paging
=
PagingUtils
.
paging
(
vo
,
dbInfoDao
,
DbInfo
.
class
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
dbInfo
->
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
dbInfo
.
getCategoryId
());
dbInfo
.
setCategoryName
(
dataCategory
.
getCataTitle
());
SystemInfo
systemInfo
=
systemInfoDao
.
selectById
(
dbInfo
.
getSystemId
());
dbInfo
.
setSystemName
(
systemInfo
.
getSystemName
());
});
return
paging
;
}
}
public
List
<
DbInfo
>
getAllDbInfoList
(
DbInfoFindVo
vo
)
{
public
List
<
DbInfo
>
getAllDbInfoList
(
DbInfoFindVo
vo
)
{
...
@@ -111,16 +115,16 @@ public class DbInfoService {
...
@@ -111,16 +115,16 @@ public class DbInfoService {
return
dbInfoDao
.
selectById
(
id
);
return
dbInfoDao
.
selectById
(
id
);
}
}
public
void
registerDbInfo
(
Set
<
String
>
ids
,
String
mappingId
)
{
public
void
registerDbInfo
(
Set
<
String
>
ids
)
{
for
(
String
id
:
ids
)
{
for
(
String
id
:
ids
)
{
DbInfo
dbInfo
=
dbInfoDao
.
selectById
(
id
);
StandardDataMapping
standardDataMapping
=
standardDataMappingDao
.
selectById
(
id
);
if
(
dbInfo
!=
null
&&
StringUtils
.
isBlank
(
dbInfo
.
getCascadeguid
()))
{
if
(
standardDataMapping
!=
null
&&
StringUtils
.
isBlank
(
standardDataMapping
.
getTableCascadeguid
()))
{
DbInfo
dbInfo
=
dbInfoDao
.
selectById
(
standardDataMapping
.
getDbId
());
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
dbInfo
.
getCategoryId
());
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
dbInfo
.
getCategoryId
());
AssertUtils
.
hasText
(
dataCategory
.
getCascadeguid
(),
"目录未注册"
);
AssertUtils
.
hasText
(
dataCategory
.
getCascadeguid
(),
"目录未注册"
);
SystemInfo
systemInfo
=
systemInfoDao
.
selectById
(
dbInfo
.
getSystemId
());
SystemInfo
systemInfo
=
systemInfoDao
.
selectById
(
dbInfo
.
getSystemId
());
AssertUtils
.
hasText
(
systemInfo
.
getCascadeguid
(),
"系统未注册"
);
AssertUtils
.
hasText
(
systemInfo
.
getCascadeguid
(),
"系统未注册"
);
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
dataCategory
.
getDeptId
());
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
dataCategory
.
getDeptId
());
StandardDataMapping
standardDataMapping
=
standardDataMappingDao
.
selectById
(
mappingId
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"resource_name"
,
dataCategory
.
getCataTitle
());
params
.
put
(
"resource_name"
,
dataCategory
.
getCataTitle
());
...
@@ -139,12 +143,7 @@ public class DbInfoService {
...
@@ -139,12 +143,7 @@ public class DbInfoService {
ShareApiResponse
shareApiResponse
=
ShareApiUtils
.
doPost
(
params
,
ShareApiEnum
.
TABLE_REGISTER
);
ShareApiResponse
shareApiResponse
=
ShareApiUtils
.
doPost
(
params
,
ShareApiEnum
.
TABLE_REGISTER
);
if
(
shareApiResponse
.
isSuccess
())
{
if
(
shareApiResponse
.
isSuccess
())
{
dbInfo
.
setCascadeguid
(
shareApiResponse
.
getString
(
"cascadeguid"
));
standardDataMapping
.
setTableCascadeguid
(
shareApiResponse
.
getString
(
"cascadeguid"
));
dbInfo
.
setUpdateTime
(
DateUtil
.
date
());
dbInfoDao
.
updateById
(
dbInfo
);
standardDataMapping
.
setRegTableState
(
1
);
standardDataMapping
.
setUpdateTime
(
DateUtil
.
date
());
standardDataMapping
.
setUpdateTime
(
DateUtil
.
date
());
standardDataMappingDao
.
updateById
(
standardDataMapping
);
standardDataMappingDao
.
updateById
(
standardDataMapping
);
}
}
...
@@ -153,13 +152,45 @@ public class DbInfoService {
...
@@ -153,13 +152,45 @@ public class DbInfoService {
}
}
public
Map
<
String
,
Object
>
getTableJson
(
StandardDataMapping
standardDataMapping
)
{
public
Map
<
String
,
Object
>
getTableJson
(
StandardDataMapping
standardDataMapping
)
{
standardDataDao
.
selectList
(
Wrappers
.
lambdaQuery
(
StandardData
.
builder
().
build
()));
Map
<
String
,
Object
>
tableParams
=
new
HashMap
<>();
return
null
;
tableParams
.
put
(
"table_name"
,
standardDataMapping
.
getTableName
());
tableParams
.
put
(
"table_sqlname"
,
standardDataMapping
.
getTableSqlname
());
List
<
StandardData
>
standardDataList
=
standardDataDao
.
selectList
(
Wrappers
.
lambdaQuery
(
StandardData
.
builder
().
mappingId
(
standardDataMapping
.
getId
()).
build
()));
ArrayList
<
Map
<
String
,
Object
>>
columnsList
=
new
ArrayList
<>();
for
(
StandardData
standardData
:
standardDataList
)
{
Map
<
String
,
Object
>
columnsParams
=
new
HashMap
<>();
columnsParams
.
put
(
"desc"
,
standardData
.
getStandardName
());
columnsParams
.
put
(
"name"
,
standardData
.
getEnglishName
());
columnsParams
.
put
(
"type"
,
standardData
.
getStandardDataType
());
columnsParams
.
put
(
"length"
,
standardData
.
getStandardDataLength
());
columnsParams
.
put
(
"precision"
,
standardData
.
getFieldPrecision
());
columnsParams
.
put
(
"is_pk"
,
standardData
.
getIsPk
());
columnsParams
.
put
(
"is_null"
,
standardData
.
getIsNull
());
columnsParams
.
put
(
"columnid"
,
standardData
.
getInfoItemId
());
columnsList
.
add
(
columnsParams
);
}
tableParams
.
put
(
"table_columns"
,
columnsList
);
return
tableParams
;
}
}
public
void
cancelDbInfo
(
Set
<
String
>
ids
)
{
public
void
cancelDbInfo
(
Set
<
String
>
ids
,
String
note
)
{
for
(
String
id
:
ids
)
{
for
(
String
id
:
ids
)
{
StandardDataMapping
standardDataMapping
=
standardDataMappingDao
.
selectById
(
id
);
if
(
standardDataMapping
!=
null
&&
StringUtils
.
isNotBlank
(
standardDataMapping
.
getTableCascadeguid
()))
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"table_id"
,
standardDataMapping
.
getTableCascadeguid
());
params
.
put
(
"note"
,
note
);
ShareApiResponse
shareApiResponse
=
ShareApiUtils
.
doPost
(
params
,
ShareApiEnum
.
TABLE_CANCEL
);
if
(
shareApiResponse
.
isSuccess
())
{
standardDataMapping
.
setTableCascadeguid
(
""
);
standardDataMapping
.
setUpdateTime
(
DateUtil
.
date
());
standardDataMappingDao
.
updateById
(
standardDataMapping
);
}
}
}
}
}
}
}
}
resource-server/src/main/java/com/zq/resource/service/DeptDutyService.java
View file @
9c2401f6
...
@@ -114,7 +114,12 @@ public class DeptDutyService {
...
@@ -114,7 +114,12 @@ public class DeptDutyService {
lambdaQuery
.
like
(
DeptLiability:
:
getBusinessName
,
vo
.
getKeyword
());
lambdaQuery
.
like
(
DeptLiability:
:
getBusinessName
,
vo
.
getKeyword
());
}
}
return
PagingUtils
.
paging
(
vo
,
deptLiabilityDao
,
lambdaQuery
);
PageVo
<
DeptLiability
>
paging
=
PagingUtils
.
paging
(
vo
,
deptLiabilityDao
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
deptLiability
->
{
DeptDuty
deptDuty
=
deptDutyDao
.
selectById
(
deptLiability
.
getDeptDutyId
());
deptLiability
.
setDeptDutyName
(
deptDuty
.
getDuties
());
});
return
paging
;
}
}
public
DeptLiability
getDeptLiabilityInfo
(
String
liabilityId
)
{
public
DeptLiability
getDeptLiabilityInfo
(
String
liabilityId
)
{
...
@@ -165,6 +170,10 @@ public class DeptDutyService {
...
@@ -165,6 +170,10 @@ public class DeptDutyService {
deptLiabilityLabelDao
.
updateById
(
deptLiabilityLabel
);
deptLiabilityLabelDao
.
updateById
(
deptLiabilityLabel
);
}
}
public
void
deleteDeptLiabilityLabel
(
String
id
)
{
deptLiabilityLabelDao
.
deleteById
(
id
);
}
public
PageVo
<
DeptLiabilityLabel
>
getDeptLiabilityLabelList
(
KeywordFindVo
vo
)
{
public
PageVo
<
DeptLiabilityLabel
>
getDeptLiabilityLabelList
(
KeywordFindVo
vo
)
{
LambdaQueryWrapper
<
DeptLiabilityLabel
>
lambdaQuery
=
Wrappers
.
lambdaQuery
(
DeptLiabilityLabel
.
builder
().
deptLiabilityId
(
vo
.
getAssocId
()).
build
());
LambdaQueryWrapper
<
DeptLiabilityLabel
>
lambdaQuery
=
Wrappers
.
lambdaQuery
(
DeptLiabilityLabel
.
builder
().
deptLiabilityId
(
vo
.
getAssocId
()).
build
());
...
...
resource-server/src/main/java/com/zq/resource/service/FileResourceService.java
0 → 100644
View file @
9c2401f6
package
com
.
zq
.
resource
.
service
;
import
cn.hutool.core.date.DateUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.utils.PagingUtils
;
import
com.zq.common.vo.PageVo
;
import
com.zq.resource.constant.ShareApiEnum
;
import
com.zq.resource.dao.DataCategoryDao
;
import
com.zq.resource.dao.FileResourceDao
;
import
com.zq.resource.dao.OrgDeptDao
;
import
com.zq.resource.entity.DataCategory
;
import
com.zq.resource.entity.FileResource
;
import
com.zq.resource.entity.OrgDept
;
import
com.zq.resource.utils.ShareApiUtils
;
import
com.zq.resource.vo.FileResourceFindVo
;
import
com.zq.resource.vo.ShareApiResponse
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Set
;
/**
* @author wilmiam
* @since 2021-09-13 18:12
*/
@Service
@RequiredArgsConstructor
public
class
FileResourceService
{
private
final
FileResourceDao
fileResourceDao
;
private
final
DataCategoryDao
dataCategoryDao
;
private
final
OrgDeptDao
orgDeptDao
;
public
void
addFileResource
(
FileResource
vo
)
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
vo
.
getCategoryId
());
AssertUtils
.
notNull
(
dataCategory
,
"目录不存在"
);
vo
.
setCreateTime
(
DateUtil
.
date
());
vo
.
setUpdateTime
(
DateUtil
.
date
());
fileResourceDao
.
insert
(
vo
);
}
public
void
modifyFileResource
(
FileResource
vo
)
{
FileResource
fileResource
=
fileResourceDao
.
selectById
(
vo
.
getId
());
AssertUtils
.
notNull
(
fileResource
,
"文件不存在"
);
fileResource
.
setState
(
vo
.
getState
());
fileResource
.
setCategoryId
(
vo
.
getCategoryId
());
fileResource
.
setBusiness
(
vo
.
getBusiness
());
fileResource
.
setIsSftp
(
vo
.
getIsSftp
());
fileResource
.
setRemark
(
vo
.
getRemark
());
fileResource
.
setFtpIp
(
vo
.
getFtpIp
());
fileResource
.
setFtpPort
(
vo
.
getFtpPort
());
fileResource
.
setFtpUser
(
vo
.
getFtpUser
());
fileResource
.
setFtpPwd
(
vo
.
getFtpPwd
());
fileResource
.
setFolderName
(
vo
.
getFolderName
());
fileResource
.
setUpdateTime
(
DateUtil
.
date
());
fileResourceDao
.
updateById
(
fileResource
);
}
public
PageVo
<
FileResource
>
getFileResourceList
(
FileResourceFindVo
vo
)
{
LambdaQueryWrapper
<
FileResource
>
lambdaQuery
=
Wrappers
.
lambdaQuery
(
FileResource
.
class
);
if
(
StringUtils
.
isNotBlank
(
vo
.
getFolderName
()))
{
lambdaQuery
.
like
(
FileResource:
:
getFolderName
,
vo
.
getFolderName
());
vo
.
setFolderName
(
null
);
}
PageVo
<
FileResource
>
paging
=
PagingUtils
.
paging
(
vo
,
fileResourceDao
,
FileResource
.
class
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
fileResource
->
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
fileResource
.
getCategoryId
());
fileResource
.
setCategoryName
(
dataCategory
.
getCataTitle
());
});
return
paging
;
}
public
FileResource
getFileResourceInfo
(
String
id
)
{
return
fileResourceDao
.
selectById
(
id
);
}
public
void
registerFileResource
(
Set
<
String
>
ids
)
{
for
(
String
id
:
ids
)
{
FileResource
fileResource
=
fileResourceDao
.
selectById
(
id
);
if
(
fileResource
!=
null
&&
StringUtils
.
isBlank
(
fileResource
.
getCascadeguid
()))
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
fileResource
.
getCategoryId
());
AssertUtils
.
hasText
(
dataCategory
.
getCascadeguid
(),
"目录未注册"
);
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
dataCategory
.
getDeptId
());
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"resource_name"
,
dataCategory
.
getCataTitle
());
params
.
put
(
"cata_id"
,
dataCategory
.
getCascadeguid
());
params
.
put
(
"resour_system_id"
,
""
);
params
.
put
(
"credit_code"
,
orgDept
.
getCreditCode
());
params
.
put
(
"business"
,
fileResource
.
getBusiness
());
params
.
put
(
"issftp"
,
fileResource
.
getIsSftp
());
params
.
put
(
"remark"
,
fileResource
.
getRemark
());
params
.
put
(
"ftp_ip"
,
fileResource
.
getFtpIp
());
params
.
put
(
"ftp_port"
,
fileResource
.
getFtpPort
());
params
.
put
(
"ftp_user"
,
fileResource
.
getFtpUser
());
params
.
put
(
"ftp_pwd"
,
fileResource
.
getFtpPwd
());
params
.
put
(
"folder_name"
,
fileResource
.
getFolderName
());
ShareApiResponse
shareApiResponse
=
ShareApiUtils
.
doPost
(
params
,
ShareApiEnum
.
FILE_REGISTER
);
if
(
shareApiResponse
.
isSuccess
())
{
fileResource
.
setCascadeguid
(
shareApiResponse
.
getString
(
"cascadeguid"
));
fileResource
.
setUpdateTime
(
DateUtil
.
date
());
fileResourceDao
.
updateById
(
fileResource
);
}
}
}
}
public
void
cancelFileResource
(
Set
<
String
>
ids
,
String
note
)
{
for
(
String
id
:
ids
)
{
FileResource
fileResource
=
fileResourceDao
.
selectById
(
id
);
if
(
fileResource
!=
null
&&
StringUtils
.
isNotBlank
(
fileResource
.
getCascadeguid
()))
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"file_id"
,
fileResource
.
getCascadeguid
());
params
.
put
(
"note"
,
note
);
ShareApiResponse
shareApiResponse
=
ShareApiUtils
.
doPost
(
params
,
ShareApiEnum
.
FILE_CANCEL
);
if
(
shareApiResponse
.
isSuccess
())
{
fileResource
.
setCascadeguid
(
""
);
fileResource
.
setUpdateTime
(
DateUtil
.
date
());
fileResourceDao
.
updateById
(
fileResource
);
}
}
}
}
}
resource-server/src/main/java/com/zq/resource/service/StandardDataService.java
View file @
9c2401f6
...
@@ -2,20 +2,15 @@ package com.zq.resource.service;
...
@@ -2,20 +2,15 @@ package com.zq.resource.service;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.IdUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.utils.PagingUtils
;
import
com.zq.common.utils.PagingUtils
;
import
com.zq.common.vo.PageVo
;
import
com.zq.common.vo.PageVo
;
import
com.zq.resource.constant.ShareApiEnum
;
import
com.zq.resource.constant.ShareApiEnum
;
import
com.zq.resource.dao.DbInfoDao
;
import
com.zq.resource.dao.*
;
import
com.zq.resource.dao.StandardCategoryNameDao
;
import
com.zq.resource.entity.*
;
import
com.zq.resource.dao.StandardDataDao
;
import
com.zq.resource.dao.StandardDataMappingDao
;
import
com.zq.resource.entity.DbInfo
;
import
com.zq.resource.entity.StandardCategoryName
;
import
com.zq.resource.entity.StandardData
;
import
com.zq.resource.entity.StandardDataMapping
;
import
com.zq.resource.utils.ShareApiUtils
;
import
com.zq.resource.utils.ShareApiUtils
;
import
com.zq.resource.utils.TreeUtils
;
import
com.zq.resource.utils.TreeUtils
;
import
com.zq.resource.vo.*
;
import
com.zq.resource.vo.*
;
...
@@ -40,8 +35,14 @@ public class StandardDataService {
...
@@ -40,8 +35,14 @@ public class StandardDataService {
private
final
StandardDataMappingDao
standardDataMappingDao
;
private
final
StandardDataMappingDao
standardDataMappingDao
;
private
final
StandardCategoryNameDao
standardCategoryNameDao
;
private
final
StandardCategoryNameDao
standardCategoryNameDao
;
private
final
DbInfoDao
dbInfoDao
;
private
final
DbInfoDao
dbInfoDao
;
private
final
DataCategoryDao
dataCategoryDao
;
private
final
DataDictDao
dataDictDao
;
public
void
addStandardData
(
StandardData
vo
)
{
public
void
addStandardData
(
StandardData
vo
)
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
vo
.
getCategoryId
());
AssertUtils
.
notNull
(
dataCategory
,
"目录不存在"
);
vo
.
setInfoItemId
(
IdUtil
.
randomUUID
());
vo
.
setCreateTime
(
DateUtil
.
date
());
vo
.
setCreateTime
(
DateUtil
.
date
());
vo
.
setUpdateTime
(
DateUtil
.
date
());
vo
.
setUpdateTime
(
DateUtil
.
date
());
...
@@ -51,6 +52,8 @@ public class StandardDataService {
...
@@ -51,6 +52,8 @@ public class StandardDataService {
public
void
modifyStandardData
(
StandardData
vo
)
{
public
void
modifyStandardData
(
StandardData
vo
)
{
StandardData
standardData
=
standardDataDao
.
selectById
(
vo
.
getId
());
StandardData
standardData
=
standardDataDao
.
selectById
(
vo
.
getId
());
AssertUtils
.
notNull
(
standardData
,
"无此数据元"
);
AssertUtils
.
notNull
(
standardData
,
"无此数据元"
);
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
vo
.
getCategoryId
());
AssertUtils
.
notNull
(
dataCategory
,
"目录不存在"
);
standardData
.
setCategoryId
(
vo
.
getCategoryId
());
standardData
.
setCategoryId
(
vo
.
getCategoryId
());
standardData
.
setStandardName
(
vo
.
getStandardName
());
standardData
.
setStandardName
(
vo
.
getStandardName
());
...
@@ -61,7 +64,9 @@ public class StandardDataService {
...
@@ -61,7 +64,9 @@ public class StandardDataService {
standardData
.
setEnglishName
(
vo
.
getEnglishName
());
standardData
.
setEnglishName
(
vo
.
getEnglishName
());
standardData
.
setStandardLevel
(
vo
.
getStandardLevel
());
standardData
.
setStandardLevel
(
vo
.
getStandardLevel
());
standardData
.
setIdentification
(
vo
.
getIdentification
());
standardData
.
setIdentification
(
vo
.
getIdentification
());
standardData
.
setNotNull
(
vo
.
getNotNull
());
standardData
.
setIsNull
(
vo
.
getIsNull
());
standardData
.
setIsPk
(
vo
.
getIsPk
());
standardData
.
setOrderNum
(
vo
.
getOrderNum
());
standardData
.
setStandardNum
(
vo
.
getStandardNum
());
standardData
.
setStandardNum
(
vo
.
getStandardNum
());
standardData
.
setLabel
(
vo
.
getLabel
());
standardData
.
setLabel
(
vo
.
getLabel
());
standardData
.
setCategoryNum
(
vo
.
getCategoryNum
());
standardData
.
setCategoryNum
(
vo
.
getCategoryNum
());
...
@@ -90,7 +95,12 @@ public class StandardDataService {
...
@@ -90,7 +95,12 @@ public class StandardDataService {
vo
.
setLabel
(
null
);
vo
.
setLabel
(
null
);
}
}
return
PagingUtils
.
paging
(
vo
,
standardDataDao
,
StandardData
.
class
,
lambdaQuery
);
PageVo
<
StandardData
>
paging
=
PagingUtils
.
paging
(
vo
,
standardDataDao
,
StandardData
.
class
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
standardData
->
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
standardData
.
getCategoryId
());
standardData
.
setCategoryName
(
dataCategory
.
getCataTitle
());
});
return
paging
;
}
}
public
List
<
StandardData
>
getAllStandardDataList
(
StandardDataFindVo
vo
)
{
public
List
<
StandardData
>
getAllStandardDataList
(
StandardDataFindVo
vo
)
{
...
@@ -173,7 +183,14 @@ public class StandardDataService {
...
@@ -173,7 +183,14 @@ public class StandardDataService {
vo
.
setCreditCode
(
null
);
vo
.
setCreditCode
(
null
);
}
}
return
PagingUtils
.
paging
(
vo
,
standardDataMappingDao
,
StandardDataMapping
.
class
,
lambdaQuery
);
PageVo
<
StandardDataMapping
>
paging
=
PagingUtils
.
paging
(
vo
,
standardDataMappingDao
,
StandardDataMapping
.
class
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
standardDataMapping
->
{
DbInfo
dbInfo
=
dbInfoDao
.
selectById
(
standardDataMapping
.
getDbId
());
standardDataMapping
.
setDbName
(
dbInfo
.
getDbName
());
StandardData
standardData
=
standardDataDao
.
selectById
(
standardDataMapping
.
getStandardId
());
standardDataMapping
.
setStandardName
(
standardData
.
getStandardName
());
});
return
paging
;
}
}
public
List
<
StandardDataMapping
>
getAllStandardDataMappingList
(
StandardDataMappingFindVo
vo
)
{
public
List
<
StandardDataMapping
>
getAllStandardDataMappingList
(
StandardDataMappingFindVo
vo
)
{
...
@@ -311,11 +328,11 @@ public class StandardDataService {
...
@@ -311,11 +328,11 @@ public class StandardDataService {
params
.
put
(
"englishName"
,
standardData
.
getEnglishName
());
params
.
put
(
"englishName"
,
standardData
.
getEnglishName
());
params
.
put
(
"standardLevel"
,
standardData
.
getStandardLevel
());
params
.
put
(
"standardLevel"
,
standardData
.
getStandardLevel
());
params
.
put
(
"identification"
,
standardData
.
getIdentification
());
params
.
put
(
"identification"
,
standardData
.
getIdentification
());
params
.
put
(
"notNull"
,
standardData
.
get
Not
Null
());
params
.
put
(
"notNull"
,
standardData
.
get
Is
Null
());
params
.
put
(
"standardNum"
,
standardData
.
getStandardNum
());
params
.
put
(
"standardNum"
,
standardData
.
getStandardNum
());
params
.
put
(
"categoryName"
,
standardData
.
getCategoryNum
()
);
params
.
put
(
"categoryName"
,
""
);
params
.
put
(
"label"
,
standardData
.
getLabel
());
params
.
put
(
"label"
,
standardData
.
getLabel
());
params
.
put
(
"categoryNum"
,
standardData
.
getCategory
Id
());
params
.
put
(
"categoryNum"
,
standardData
.
getCategory
Num
());
ShareApiResponse
shareApiResponse
=
ShareApiUtils
.
doPost
(
params
,
ShareApiEnum
.
STANDARD_ADD
);
ShareApiResponse
shareApiResponse
=
ShareApiUtils
.
doPost
(
params
,
ShareApiEnum
.
STANDARD_ADD
);
if
(
shareApiResponse
.
isSuccess
())
{
if
(
shareApiResponse
.
isSuccess
())
{
...
@@ -364,7 +381,7 @@ public class StandardDataService {
...
@@ -364,7 +381,7 @@ public class StandardDataService {
params
.
put
(
"Fieldtype"
,
standardDataMapping
.
getFieldType
());
params
.
put
(
"Fieldtype"
,
standardDataMapping
.
getFieldType
());
params
.
put
(
"length"
,
standardDataMapping
.
getLength
());
params
.
put
(
"length"
,
standardDataMapping
.
getLength
());
params
.
put
(
"precision"
,
standardDataMapping
.
getFieldPrecision
());
params
.
put
(
"precision"
,
standardDataMapping
.
getFieldPrecision
());
params
.
put
(
"is_pk"
,
standardDataMapping
.
getIsPk
()
?
1
:
0
);
params
.
put
(
"is_pk"
,
standardDataMapping
.
getIsPk
());
params
.
put
(
"standardNum"
,
standardDataMapping
.
getStandardNum
());
params
.
put
(
"standardNum"
,
standardDataMapping
.
getStandardNum
());
params
.
put
(
"standardName"
,
standardData
.
getStandardName
());
params
.
put
(
"standardName"
,
standardData
.
getStandardName
());
params
.
put
(
"connecttion_name"
,
standardDataMapping
.
getConnecttionName
());
params
.
put
(
"connecttion_name"
,
standardDataMapping
.
getConnecttionName
());
...
...
resource-server/src/main/java/com/zq/resource/service/SystemInfoService.java
View file @
9c2401f6
...
@@ -43,7 +43,12 @@ public class SystemInfoService {
...
@@ -43,7 +43,12 @@ public class SystemInfoService {
vo
.
setSystemName
(
null
);
vo
.
setSystemName
(
null
);
}
}
return
PagingUtils
.
paging
(
vo
,
systemInfoDao
,
SystemInfo
.
class
,
lambdaQuery
);
PageVo
<
SystemInfo
>
paging
=
PagingUtils
.
paging
(
vo
,
systemInfoDao
,
SystemInfo
.
class
,
lambdaQuery
);
paging
.
getRows
().
forEach
(
systemInfo
->
{
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
systemInfo
.
getBelongDeptId
());
systemInfo
.
setDeptName
(
orgDept
.
getDeptName
());
});
return
paging
;
}
}
public
List
<
SystemInfo
>
getAllSystemList
(
SystemInfoFindVo
vo
)
{
public
List
<
SystemInfo
>
getAllSystemList
(
SystemInfoFindVo
vo
)
{
...
...
resource-server/src/main/java/com/zq/resource/vo/FileResourceFindVo.java
0 → 100644
View file @
9c2401f6
package
com
.
zq
.
resource
.
vo
;
import
com.zq.common.vo.PageReqVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* 文件资源(FileResource)实体类
*
* @author makejava
* @since 2021-09-13 17:59:17
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
FileResourceFindVo
extends
PageReqVo
{
/**
* ID
*/
@ApiModelProperty
(
"ID"
)
private
String
id
;
/**
* 目录ID
*/
@ApiModelProperty
(
"目录ID"
)
private
String
categoryId
;
/**
* 数据字典:主题分类
*/
@ApiModelProperty
(
"数据字典:主题分类"
)
private
String
business
;
/**
* 是否使用sftp
*/
@ApiModelProperty
(
"是否使用sftp"
)
private
Integer
isSftp
;
/**
* 描述
*/
@ApiModelProperty
(
"描述"
)
private
String
remark
;
/**
* ftp服务器IP
*/
@ApiModelProperty
(
"ftp服务器IP"
)
private
String
ftpIp
;
/**
* ftp服务器端口
*/
@ApiModelProperty
(
"ftp服务器端口"
)
private
String
ftpPort
;
/**
* ftp账号
*/
@ApiModelProperty
(
"ftp账号"
)
private
String
ftpUser
;
/**
* ftp密码
*/
@ApiModelProperty
(
"ftp密码"
)
private
String
ftpPwd
;
/**
* 文件名称
*/
@ApiModelProperty
(
"文件名称"
)
private
String
folderName
;
/**
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
/**
* 状态: 1-正常, 2-删除
*/
@ApiModelProperty
(
"状态: 1-正常, 2-删除"
)
private
Integer
state
;
/**
* 注册接口返回的ID
*/
@ApiModelProperty
(
"注册接口返回的ID"
)
private
String
cascadeguid
;
}
\ No newline at end of file
resource-server/src/main/java/com/zq/resource/vo/StandardDataFindVo.java
View file @
9c2401f6
package
com
.
zq
.
resource
.
vo
;
package
com
.
zq
.
resource
.
vo
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.zq.common.vo.PageReqVo
;
import
com.zq.common.vo.PageReqVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -28,12 +30,24 @@ public class StandardDataFindVo extends PageReqVo {
...
@@ -28,12 +30,24 @@ public class StandardDataFindVo extends PageReqVo {
private
String
id
;
private
String
id
;
/**
/**
*
所属领域id
*
目录ID
*/
*/
@ApiModelProperty
(
"
所属领域id
"
)
@ApiModelProperty
(
"
目录ID
"
)
private
String
categoryId
;
private
String
categoryId
;
/**
/**
* 表映射ID
*/
@ApiModelProperty
(
"表映射ID"
)
private
String
mappingId
;
/**
* 信息项ID
*/
@ApiModelProperty
(
"信息项ID"
)
private
String
infoItemId
;
/**
* 数据元名称
* 数据元名称
*/
*/
@ApiModelProperty
(
"数据元名称"
)
@ApiModelProperty
(
"数据元名称"
)
...
@@ -82,10 +96,22 @@ public class StandardDataFindVo extends PageReqVo {
...
@@ -82,10 +96,22 @@ public class StandardDataFindVo extends PageReqVo {
private
String
identification
;
private
String
identification
;
/**
/**
* 是否非空
* 是否允许为空
*/
@ApiModelProperty
(
"是否允许为空"
)
private
Integer
isNull
;
/**
* 是否主键
*/
*/
@ApiModelProperty
(
"是否非空"
)
@ApiModelProperty
(
"是否主键"
)
private
Boolean
notNull
;
private
Integer
isPk
;
/**
* 排序编号,默认为0
*/
@ApiModelProperty
(
"排序编号,默认为0"
)
private
Integer
orderNum
;
/**
/**
* 数据标准编目
* 数据标准编目
...
@@ -117,4 +143,17 @@ public class StandardDataFindVo extends PageReqVo {
...
@@ -117,4 +143,17 @@ public class StandardDataFindVo extends PageReqVo {
@ApiModelProperty
(
"更新时间"
)
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
private
Date
updateTime
;
/**
* 状态: 1-正常, 2-删除
*/
@ApiModelProperty
(
"状态: 1-正常, 2-删除"
)
private
Integer
state
;
/**
* 注册接口返回的ID
*/
@ApiModelProperty
(
"注册接口返回的ID"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
NOT_NULL
)
private
String
cascadeguid
;
}
}
\ No newline at end of file
resource-server/src/main/resources/mapper/DeptLiabilityCategoryMapper.xml
View file @
9c2401f6
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
<select
id=
"getDeptLiabilityCategoryList"
resultType=
"com.zq.resource.vo.DeptLiabilityCategoryVo"
>
<select
id=
"getDeptLiabilityCategoryList"
resultType=
"com.zq.resource.vo.DeptLiabilityCategoryVo"
>
SELECT LC.ID, LC.DEPT_LIABILITY_ID, LC.CATEGORY_ID, LC.CREATE_TIME, LC.UPDATE_TIME,
SELECT LC.ID, LC.DEPT_LIABILITY_ID, LC.CATEGORY_ID, LC.CREATE_TIME, LC.UPDATE_TIME,
C.CATA_TITLE 'categoryName', L.BUSINESS_NAME 'deptLiabilityName'
C.CATA_TITLE 'categoryName', L.BUSINESS_NAME 'deptLiabilityName'
FROM DEPT_LIABILITY_CATEGORY LC
FROM
`ZY`.
DEPT_LIABILITY_CATEGORY LC
LEFT JOIN DATA_CATEGORY C ON LC.CATEGORY_ID = C.ID
LEFT JOIN
`ZY`.
DATA_CATEGORY C ON LC.CATEGORY_ID = C.ID
LEFT JOIN DEPT_LIABILITY L ON LC.DEPT_LIABILITY_ID = L.ID
LEFT JOIN
`ZY`.
DEPT_LIABILITY L ON LC.DEPT_LIABILITY_ID = L.ID
<where>
<where>
<if
test=
"id != null and id != ''"
>
<if
test=
"id != null and id != ''"
>
AND LC.ID = #{id, jdbcType=VARCHAR}
AND LC.ID = #{id, jdbcType=VARCHAR}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment