Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
ms-data-circulation-portal-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b232645f
authored
2024-12-31 11:47:35 +0800
by
徐少波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
门户-数据需求开发
1 parent
8f0eb5d7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
675 additions
and
0 deletions
src/main/java/com/csbr/qingcloud/controller/DemandController.java
src/main/java/com/csbr/qingcloud/domain/vo/DemandQueryVO.java
src/main/java/com/csbr/qingcloud/domain/vo/DemandRQVO.java
src/main/java/com/csbr/qingcloud/domain/vo/DemandRSVO.java
src/main/java/com/csbr/qingcloud/mybatis/entity/MfDemand.java
src/main/java/com/csbr/qingcloud/mybatis/mapper/MfDemandMapper.java
src/main/java/com/csbr/qingcloud/mybatis/service/MfDemandService.java
src/main/java/com/csbr/qingcloud/mybatis/service/impl/MfDemandServiceImpl.java
src/main/java/com/csbr/qingcloud/service/DemandService.java
src/main/java/com/csbr/qingcloud/service/impl/DemandServiceImpl.java
src/main/java/com/csbr/qingcloud/controller/DemandController.java
0 → 100644
View file @
b232645
package
com
.
csbr
.
qingcloud
.
controller
;
import
com.csbr.cloud.common.response.CommonRes
;
import
csbr.cloud.entity.annotation.SystemLog
;
import
csbr.cloud.entity.domain.base.vo.PageListVO
;
import
com.csbr.qingcloud.domain.vo.DemandQueryVO
;
import
com.csbr.qingcloud.domain.vo.DemandRQVO
;
import
com.csbr.qingcloud.domain.vo.DemandRSVO
;
import
com.csbr.qingcloud.service.DemandService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
jakarta.annotation.Resource
;
import
jakarta.validation.Valid
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @program: D:/csbr/sjzc/ms-data-circulation-portal-service
* @description: -控制器
* @author: xushaobo
* @create: 2024-12-30 16:29
**/
@RestController
@RequestMapping
(
"/demand"
)
@Tag
(
name
=
"-控制器"
)
public
class
DemandController
{
@Resource
private
DemandService
demandService
;
//region 基本操作
@PostMapping
(
"/save"
)
@SystemLog
(
value
=
"-新增"
)
@Operation
(
summary
=
"-新增"
)
public
CommonRes
<
Boolean
>
saveDemand
(
@RequestBody
@Valid
DemandRQVO
vo
)
{
demandService
.
saveDemand
(
vo
);
return
CommonRes
.
success
(
true
);
}
@PutMapping
(
"/update"
)
@SystemLog
(
value
=
"-修改"
)
@Operation
(
summary
=
"-修改"
)
public
CommonRes
<
Boolean
>
updateDemand
(
@RequestBody
@Valid
DemandRQVO
vo
)
{
demandService
.
updateDemand
(
vo
);
return
CommonRes
.
success
(
true
);
}
@DeleteMapping
(
"/delete"
)
@SystemLog
(
value
=
"-批量删除"
)
@Operation
(
summary
=
"-批量删除"
)
public
CommonRes
<
Boolean
>
removeByGuids
(
@RequestBody
List
<
String
>
guids
)
{
demandService
.
removeByGuids
(
guids
);
return
CommonRes
.
success
(
true
);
}
@PostMapping
(
"/page-list"
)
@SystemLog
(
value
=
"-分页"
)
@Operation
(
summary
=
"-分页"
)
public
CommonRes
<
PageListVO
<
DemandRSVO
>>
pageList
(
@RequestBody
@Valid
DemandQueryVO
queryVO
)
{
PageListVO
<
DemandRSVO
>
pageVO
=
demandService
.
pageList
(
queryVO
);
return
CommonRes
.
success
(
pageVO
);
}
@GetMapping
(
"/detail"
)
@SystemLog
(
value
=
"-详情"
)
@Operation
(
summary
=
"-详情"
,
parameters
=
{
@Parameter
(
name
=
"guid"
,
description
=
"唯一标识"
,
required
=
true
)}
)
public
CommonRes
<
DemandRSVO
>
getDemandDetail
(
@RequestParam
String
guid
)
{
DemandRSVO
vo
=
demandService
.
getDemandDetail
(
guid
);
return
CommonRes
.
success
(
vo
);
}
//endregion
}
src/main/java/com/csbr/qingcloud/domain/vo/DemandQueryVO.java
0 → 100644
View file @
b232645
package
com
.
csbr
.
qingcloud
.
domain
.
vo
;
import
csbr.cloud.entity.domain.base.dto.BasePageDTO
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.EqualsAndHashCode
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @program: D:/csbr/sjzc/ms-data-circulation-portal-service
* @description: 查询参数
* @author: xushaobo
* @create: 2024-12-30 16:29
**/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Schema
(
title
=
"查询参数"
)
public
class
DemandQueryVO
extends
BasePageDTO
{
}
src/main/java/com/csbr/qingcloud/domain/vo/DemandRQVO.java
0 → 100644
View file @
b232645
package
com
.
csbr
.
qingcloud
.
domain
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @program: D:/csbr/sjzc/ms-data-circulation-portal-service
* @description: 新增、修改参数
* @author: xushaobo
* @create: 2024-12-30 16:29
**/
@Data
@Schema
(
title
=
"新增、修改参数"
)
public
class
DemandRQVO
{
/**
* 系统唯一标识
*/
@Schema
(
description
=
"系统唯一标识"
)
private
String
guid
;
/**
* 数据需求名称
*/
@Schema
(
description
=
"数据需求名称"
)
private
String
dataDemandName
;
/**
* 需求类型 (1 产业端;2 科研端;3 临床端)
*/
@Schema
(
description
=
"需求类型 (1 产业端;2 科研端;3 临床端)"
)
private
String
requirementType
;
/**
* 需求开始时间
*/
@Schema
(
description
=
"需求开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
requirementTermSdate
;
/**
* 需求结束时间
*/
@Schema
(
description
=
"需求结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
requirementTermEdate
;
/**
* 需求内容
*/
@Schema
(
description
=
"需求内容"
)
private
String
requirementContent
;
/**
* 数据需求字段 数据格式:[{"name":"","path":""},{"name":"","path":""}]
*/
@Schema
(
description
=
"数据需求字段 数据格式:[{\"name\":\"\",\"path\":\"\"},{\"name\":\"\",\"path\":\"\"}]"
)
private
String
dataDemandFieldAttachJson
;
/**
* 期望交付时间
*/
@Schema
(
description
=
"期望交付时间"
)
private
BigDecimal
deliveryTime
;
/**
* 最低预算
*/
@Schema
(
description
=
"最低预算"
)
private
BigDecimal
minBudget
;
/**
* 最高预算
*/
@Schema
(
description
=
"最高预算"
)
private
BigDecimal
maxBudget
;
/**
* 费用来源
*/
@Schema
(
description
=
"费用来源"
)
private
String
costSource
;
/**
* 更新周期
*/
@Schema
(
description
=
"更新周期"
)
private
String
updateCycle
;
/**
* 获取路径方式 (1 接口调用;2 文件下载)
*/
@Schema
(
description
=
"获取路径方式 (1 接口调用;2 文件下载)"
)
private
String
requestType
;
/**
* 场景名称
*/
@Schema
(
description
=
"场景名称"
)
private
String
sceneName
;
/**
* 应用场景描述
*/
@Schema
(
description
=
"应用场景描述"
)
private
String
sceneDescription
;
/**
* 数据质量要求
*/
@Schema
(
description
=
"数据质量要求"
)
private
String
qualityDemand
;
/**
* 隐私合规要求
*/
@Schema
(
description
=
"隐私合规要求"
)
private
String
privacyDemand
;
/**
* 其他补充内容
*/
@Schema
(
description
=
"其他补充内容"
)
private
String
otherContent
;
/**
* 联系人
*/
@Schema
(
description
=
"联系人"
)
private
String
contacts
;
/**
* 需求单位
*/
@Schema
(
description
=
"需求单位"
)
private
String
requirementUnit
;
/**
* 联系方式
*/
@Schema
(
description
=
"联系方式"
)
private
String
contactInformation
;
/******** 库表存储属性 需处理 *****/
/******** 自定义扩展 *****/
/******** 子对象 *****/
}
src/main/java/com/csbr/qingcloud/domain/vo/DemandRSVO.java
0 → 100644
View file @
b232645
package
com
.
csbr
.
qingcloud
.
domain
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @program: D:/csbr/sjzc/ms-data-circulation-portal-service
* @description: 返回参数
* @author: xushaobo
* @create: 2024-12-30 16:29
**/
@Data
@Schema
(
title
=
"返回参数"
)
public
class
DemandRSVO
{
/**
* 系统唯一标识
*/
@Schema
(
description
=
"系统唯一标识"
)
private
String
guid
;
/**
* 数据需求名称
*/
@Schema
(
description
=
"数据需求名称"
)
private
String
dataDemandName
;
/**
* 需求类型 (1 产业端;2 科研端;3 临床端)
*/
@Schema
(
description
=
"需求类型 (1 产业端;2 科研端;3 临床端)"
)
private
String
requirementType
;
/**
* 需求开始时间
*/
@Schema
(
description
=
"需求开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
requirementTermSdate
;
/**
* 需求结束时间
*/
@Schema
(
description
=
"需求结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
requirementTermEdate
;
/**
* 需求内容
*/
@Schema
(
description
=
"需求内容"
)
private
String
requirementContent
;
/**
* 数据需求字段 数据格式:[{"name":"","path":""},{"name":"","path":""}]
*/
@Schema
(
description
=
"数据需求字段 数据格式:[{\"name\":\"\",\"path\":\"\"},{\"name\":\"\",\"path\":\"\"}]"
)
private
String
dataDemandFieldAttachJson
;
/**
* 期望交付时间
*/
@Schema
(
description
=
"期望交付时间"
)
private
BigDecimal
deliveryTime
;
/**
* 最低预算
*/
@Schema
(
description
=
"最低预算"
)
private
BigDecimal
minBudget
;
/**
* 最高预算
*/
@Schema
(
description
=
"最高预算"
)
private
BigDecimal
maxBudget
;
/**
* 费用来源
*/
@Schema
(
description
=
"费用来源"
)
private
String
costSource
;
/**
* 更新周期
*/
@Schema
(
description
=
"更新周期"
)
private
String
updateCycle
;
/**
* 获取路径方式 (1 接口调用;2 文件下载)
*/
@Schema
(
description
=
"获取路径方式 (1 接口调用;2 文件下载)"
)
private
String
requestType
;
/**
* 场景名称
*/
@Schema
(
description
=
"场景名称"
)
private
String
sceneName
;
/**
* 应用场景描述
*/
@Schema
(
description
=
"应用场景描述"
)
private
String
sceneDescription
;
/**
* 数据质量要求
*/
@Schema
(
description
=
"数据质量要求"
)
private
String
qualityDemand
;
/**
* 隐私合规要求
*/
@Schema
(
description
=
"隐私合规要求"
)
private
String
privacyDemand
;
/**
* 其他补充内容
*/
@Schema
(
description
=
"其他补充内容"
)
private
String
otherContent
;
/**
* 联系人
*/
@Schema
(
description
=
"联系人"
)
private
String
contacts
;
/**
* 需求单位
*/
@Schema
(
description
=
"需求单位"
)
private
String
requirementUnit
;
/**
* 联系方式
*/
@Schema
(
description
=
"联系方式"
)
private
String
contactInformation
;
/******** 库表存储属性 需处理 *****/
/******** 自定义扩展 *****/
/******** 子对象 *****/
}
src/main/java/com/csbr/qingcloud/mybatis/entity/MfDemand.java
0 → 100644
View file @
b232645
package
com
.
csbr
.
qingcloud
.
mybatis
.
entity
;
import
csbr.cloud.entity.domain.base.dao.BaseShardingDO
;
import
jdk.jfr.Name
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @program: D:/csbr/sjzc/ms-data-circulation-portal-service
* @description: 实体
* @author: xushaobo
* @create: 2024-12-30 16:26
**/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@Name
(
""
)
public
class
MfDemand
extends
BaseShardingDO
{
/**
* 数据需求名称
*/
@Name
(
"数据需求名称"
)
private
String
dataDemandName
;
/**
* 需求类型 (1 产业端;2 科研端;3 临床端)
*/
@Name
(
"需求类型 (1 产业端;2 科研端;3 临床端)"
)
private
String
requirementType
;
/**
* 需求开始时间
*/
@Name
(
"需求开始时间"
)
private
Date
requirementTermSdate
;
/**
* 需求结束时间
*/
@Name
(
"需求结束时间"
)
private
Date
requirementTermEdate
;
/**
* 需求内容
*/
@Name
(
"需求内容"
)
private
String
requirementContent
;
/**
* 数据需求字段 数据格式:[{"name":"","path":""},{"name":"","path":""}]
*/
@Name
(
"数据需求字段 数据格式:[{\"name\":\"\",\"path\":\"\"},{\"name\":\"\",\"path\":\"\"}]"
)
private
String
dataDemandFieldAttachJson
;
/**
* 期望交付时间
*/
@Name
(
"期望交付时间"
)
private
BigDecimal
deliveryTime
;
/**
* 最低预算
*/
@Name
(
"最低预算"
)
private
BigDecimal
minBudget
;
/**
* 最高预算
*/
@Name
(
"最高预算"
)
private
BigDecimal
maxBudget
;
/**
* 费用来源
*/
@Name
(
"费用来源"
)
private
String
costSource
;
/**
* 更新周期
*/
@Name
(
"更新周期"
)
private
String
updateCycle
;
/**
* 获取路径方式 (1 接口调用;2 文件下载)
*/
@Name
(
"获取路径方式 (1 接口调用;2 文件下载)"
)
private
String
requestType
;
/**
* 场景名称
*/
@Name
(
"场景名称"
)
private
String
sceneName
;
/**
* 应用场景描述
*/
@Name
(
"应用场景描述"
)
private
String
sceneDescription
;
/**
* 数据质量要求
*/
@Name
(
"数据质量要求"
)
private
String
qualityDemand
;
/**
* 隐私合规要求
*/
@Name
(
"隐私合规要求"
)
private
String
privacyDemand
;
/**
* 其他补充内容
*/
@Name
(
"其他补充内容"
)
private
String
otherContent
;
/**
* 联系人
*/
@Name
(
"联系人"
)
private
String
contacts
;
/**
* 需求单位
*/
@Name
(
"需求单位"
)
private
String
requirementUnit
;
/**
* 联系方式
*/
@Name
(
"联系方式"
)
private
String
contactInformation
;
}
src/main/java/com/csbr/qingcloud/mybatis/mapper/MfDemandMapper.java
0 → 100644
View file @
b232645
package
com
.
csbr
.
qingcloud
.
mybatis
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.csbr.qingcloud.mybatis.entity.MfDemand
;
/**
* @program: D:/csbr/sjzc/ms-data-circulation-portal-service
* @description: Mapper 接口
* @author: xushaobo
* @create: 2024-12-30 16:29
**/
@Mapper
public
interface
MfDemandMapper
extends
BaseMapper
<
MfDemand
>
{
}
src/main/java/com/csbr/qingcloud/mybatis/service/MfDemandService.java
0 → 100644
View file @
b232645
package
com
.
csbr
.
qingcloud
.
mybatis
.
service
;
import
com.csbr.cloud.base.service.CsbrService
;
import
com.csbr.qingcloud.mybatis.entity.MfDemand
;
/**
* @program: D:/csbr/sjzc/ms-data-circulation-portal-service
* @description: 逻辑层接口
* @author: xushaobo
* @create: 2024-12-30 16:29
**/
public
interface
MfDemandService
extends
CsbrService
<
MfDemand
>
{
}
src/main/java/com/csbr/qingcloud/mybatis/service/impl/MfDemandServiceImpl.java
0 → 100644
View file @
b232645
package
com
.
csbr
.
qingcloud
.
mybatis
.
service
.
impl
;
import
com.csbr.cloud.mybatis.service.impl.CsbrServiceImpl
;
import
com.csbr.qingcloud.mybatis.mapper.MfDemandMapper
;
import
com.csbr.qingcloud.mybatis.entity.MfDemand
;
import
com.csbr.qingcloud.mybatis.service.MfDemandService
;
import
jakarta.annotation.Resource
;
import
org.springframework.stereotype.Service
;
/**
* @program: D:/csbr/sjzc/ms-data-circulation-portal-service
* @description: 逻辑层接口实现
* @author: xushaobo
* @create: 2024-12-30 16:29
**/
@Service
public
class
MfDemandServiceImpl
extends
CsbrServiceImpl
<
MfDemandMapper
,
MfDemand
>
implements
MfDemandService
{
@Resource
private
MfDemandMapper
mfDemandMapper
;
}
src/main/java/com/csbr/qingcloud/service/DemandService.java
0 → 100644
View file @
b232645
package
com
.
csbr
.
qingcloud
.
service
;
import
csbr.cloud.entity.domain.base.vo.PageListVO
;
import
com.csbr.qingcloud.domain.vo.DemandQueryVO
;
import
com.csbr.qingcloud.domain.vo.DemandRQVO
;
import
com.csbr.qingcloud.domain.vo.DemandRSVO
;
import
java.util.List
;
/**
* @program: D:/csbr/sjzc/ms-data-circulation-portal-service
* @description: 业务逻辑接口
* @author: xushaobo
* @create: 2024-12-30 16:31
**/
public
interface
DemandService
{
/**
* 分页查询
* @author xushaobo
* @date 2024-12-30 16:31
* @param queryVO
* @return com.csbr.cloud.mybatis.entity.PageListVO<com.csbr.qingcloud.domain.vo.DemandRSVO>
*/
PageListVO
<
DemandRSVO
>
pageList
(
DemandQueryVO
queryVO
);
/**
* 获取详情数据
* @author xushaobo
* @date 2024-12-30 16:31
* @param guid
* @return com.csbr.qingcloud.domain.vo.DemandRSVO
*/
DemandRSVO
getDemandDetail
(
String
guid
);
/**
* 数据新增
* @author xushaobo
* @date 2024-12-30 16:31
* @param rqVO
* @return boolean
*/
void
saveDemand
(
DemandRQVO
rqVO
);
/**
* 数据修改
* @author xushaobo
* @date 2024-12-30 16:31
* @param rqVO
* @return boolean
*/
void
updateDemand
(
DemandRQVO
rqVO
);
/**
* 数据删除
* @author xushaobo
* @date 2024-12-30 16:31
* @param guids
* @return void
*/
void
removeByGuids
(
List
<
String
>
guids
);
/**
* 数据删除、并有相关的处理操作
* @author xushaobo
* @date 2024-12-30 16:31
* @param guids
* @return void
*/
void
removeHandleByGuids
(
List
<
String
>
guids
);
}
src/main/java/com/csbr/qingcloud/service/impl/DemandServiceImpl.java
0 → 100644
View file @
b232645
This diff is collapsed.
Click to expand it.
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment