e16a5805 by 荆蔚杰

新数据库模型项目创建

1 parent c5c67ee1
Showing 150 changed files with 4784 additions and 12 deletions
...@@ -220,12 +220,12 @@ ...@@ -220,12 +220,12 @@
220 <artifactId>mapstruct-processor</artifactId> 220 <artifactId>mapstruct-processor</artifactId>
221 <version>${mapstruct.version}</version> 221 <version>${mapstruct.version}</version>
222 </dependency> 222 </dependency>
223 <!--<dependency>--> 223 <dependency>
224 <!-- <groupId>polaris</groupId>--> 224 <groupId>polaris</groupId>
225 <!-- <artifactId>polaris-fileattachment</artifactId>--> 225 <artifactId>polaris-fileattachment</artifactId>
226 <!-- <version>1.0</version>--> 226 <version>1.0</version>
227 <!-- <scope>compile</scope>--> 227 <scope>compile</scope>
228 <!--</dependency>--> 228 </dependency>
229 <dependency> 229 <dependency>
230 <groupId>io.minio</groupId> 230 <groupId>io.minio</groupId>
231 <artifactId>minio</artifactId> 231 <artifactId>minio</artifactId>
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
279 <directory>src/main/resources</directory> 279 <directory>src/main/resources</directory>
280 <excludes> 280 <excludes>
281 <!--使用通配符,当然可以定义多个exclude标签进行排除--> 281 <!--使用通配符,当然可以定义多个exclude标签进行排除-->
282 <exclude>application*.yml</exclude> 282 <exclude>application*.yaml</exclude>
283 </excludes> 283 </excludes>
284 </resource> 284 </resource>
285 285
...@@ -289,9 +289,9 @@ ...@@ -289,9 +289,9 @@
289 <!--引入所需环境的配置文件--> 289 <!--引入所需环境的配置文件-->
290 <filtering>true</filtering> 290 <filtering>true</filtering>
291 <includes> 291 <includes>
292 <include>application.yml</include> 292 <include>application.yaml</include>
293 <!--根据maven选择环境导入配置文件--> 293 <!--根据maven选择环境导入配置文件-->
294 <include>application-${profile.active}.yml</include> 294 <include>application-${profile.active}.yaml</include>
295 </includes> 295 </includes>
296 </resource> 296 </resource>
297 </resources> 297 </resources>
......
1 package com.pashanhoo.archive.controller;
2
3
4 import com.pashanhoo.archive.entity.vo.AddDgArchivesRequest;
5 import com.pashanhoo.archive.service.DgArchivesService;
6 import com.pashanhoo.common.Result;
7 import com.pashanhoo.archive.entity.vo.UpdateDgArchivesRequest;
8 import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest;
9 import org.springframework.web.bind.annotation.RestController;
10 import org.springframework.web.bind.annotation.*;
11 import io.swagger.annotations.Api;
12 import io.swagger.annotations.ApiOperation;
13 import io.swagger.annotations.ApiParam;
14 import org.springframework.beans.factory.annotation.Autowired;
15
16 import java.util.List;
17
18 /**
19 * <p>
20 * 案卷基本信息 前端控制器
21 * </p>
22 *
23 * @author
24 * @since 2021-11-05
25 */
26 @RestController
27 @RequestMapping("/system/dgArchives/")
28 @Api(tags = "案卷基本信息接口")
29 public class DgArchivesController {
30 @Autowired
31 private DgArchivesService dgarchivesService;
32
33 @PostMapping("insertDgArchives")
34 @ApiOperation("新增案卷基本信息")
35 public Result insertDgArchives(@RequestBody AddDgArchivesRequest request){
36 if(dgarchivesService.insertDgArchives(request)){
37 return Result.ok();
38 }
39 return Result.error("新增失败");
40 }
41
42 @DeleteMapping("deleteDgArchivesByIds")
43 @ApiOperation(value = "批量删除案卷基本信息")
44 public Result deleteDgArchivesByIds(@ApiParam("案卷基本信息ID列表") @RequestParam(value = "idList") List<String> idList) {
45 if(dgarchivesService.removeByIds(idList)) {
46 return Result.ok("删除成功");
47 }
48 return Result.error("删除失败");
49 }
50
51 @PutMapping("updateDgArchives")
52 @ApiOperation("修改案卷基本信息")
53 public Result updateDgArchives(@RequestBody UpdateDgArchivesRequest request){
54 if(dgarchivesService.updateDgArchives(request)) {
55 return Result.ok("修改成功");
56 }
57 return Result.error("修改失败");
58 }
59
60 @GetMapping("getDgArchivesDetailById")
61 @ApiOperation(value = "读取明细")
62 public Result getDgArchivesDetailById(@ApiParam("案卷基本信息ID") @RequestParam String id){
63 return Result.ok(dgarchivesService.getDgArchivesDetailById(id));
64 }
65
66 @PostMapping("search")
67 @ApiOperation(value = "根据条件进行列表查询")
68 public Result searchDgArchivesList(@RequestBody DgArchivesSearchRequest request) {
69 //TODO 默认排序条件设置
70 request.defaultFillPageProp("","");
71 return Result.ok(dgarchivesService.searchDgArchivesList(request));
72 }
73 }
1 package com.pashanhoo.archive.entity;
2
3 import java.util.List;
4
5 import com.pashanhoo.archive.entity.vo.AddDgArchivesRequest;
6 import com.pashanhoo.archive.entity.vo.DgArchivesDetailVO;
7 import com.pashanhoo.archive.entity.vo.DgArchivesListVO;
8 import com.pashanhoo.archive.entity.vo.UpdateDgArchivesRequest;
9 import org.mapstruct.Mapper;
10
11 /**
12 * @author
13 * @since 2021-11-05
14 */
15 @Mapper(componentModel = "spring")
16 public interface DgArchivesConverter{
17 DgArchivesDO addRequest2DO(AddDgArchivesRequest request);
18
19 DgArchivesDetailVO do2DetailVO(DgArchivesDO dgarchivesDO);
20
21 DgArchivesDO updateRequest2DO(UpdateDgArchivesRequest request);
22
23 DgArchivesListVO do2ListVO(DgArchivesDO dgarchivesDO);
24
25 List<DgArchivesListVO> doList2ListVOList(List<DgArchivesDO> dgarchivesDOList);
26 }
1 package com.pashanhoo.archive.entity;
2
3 import java.math.BigDecimal;
4 import com.baomidou.mybatisplus.annotation.TableName;
5 import com.baomidou.mybatisplus.annotation.IdType;
6 import java.util.Date;
7 import com.baomidou.mybatisplus.annotation.TableId;
8 import com.baomidou.mybatisplus.annotation.TableField;
9 import java.io.Serializable;
10 import lombok.Data;
11 import lombok.EqualsAndHashCode;
12
13 /**
14 * <p>
15 * 案卷基本信息
16 * </p>
17 *
18 * @author
19 * @since 2021-11-05
20 */
21 @Data
22 @EqualsAndHashCode(callSuper = false)
23 @TableName("DG_ARCHIVES")
24 public class DgArchivesDO implements Serializable {
25
26 private static final long serialVersionUID = 1L;
27
28 /**
29 * 档案标识码
30 */
31 @TableId(value = "BSM_ARCHIVES", type = IdType.UUID)
32 private String bsmArchives;
33
34 /**
35 * 案卷标题
36 */
37 @TableField("AJBT")
38 private String ajbt;
39
40 /**
41 * 主题词
42 */
43 @TableField("ZTC")
44 private String ztc;
45
46 /**
47 * 分类号
48 */
49 @TableField("FLH")
50 private String flh;
51
52 /**
53 * 目录号
54 */
55 @TableField("MLH")
56 private String mlh;
57
58 /**
59 * 案卷号
60 */
61 @TableField("AJH")
62 private String ajh;
63
64 /**
65 * 年度
66 */
67 @TableField("ND")
68 private BigDecimal nd;
69
70 /**
71 * 件数
72 */
73 @TableField("JS")
74 private BigDecimal js;
75
76 /**
77 * 页数
78 */
79 @TableField("YS")
80 private BigDecimal ys;
81
82 /**
83 * 保管期限
84 */
85 @TableField("BGQX")
86 private String bgqx;
87
88 /**
89 * 起始日期
90 */
91 @TableField("QSRQ")
92 private Date qsrq;
93
94 /**
95 * 终止日期
96 */
97 @TableField("ZZRQ")
98 private Date zzrq;
99
100 /**
101 * 保密级别
102 */
103 @TableField("MJ")
104 private String mj;
105
106 /**
107 * 盒号
108 */
109 @TableField("HH")
110 private String hh;
111
112 /**
113 * 存放位置
114 */
115 @TableField("CFWZ")
116 private String cfwz;
117
118 /**
119 * 创建人
120 */
121 @TableField("CJR")
122 private String cjr;
123
124 /**
125 * 创建日期
126 */
127 @TableField("CJRQ")
128 private Date cjrq;
129
130 /**
131 * 核查人
132 */
133 @TableField("HCR")
134 private String hcr;
135
136 /**
137 * 备注
138 */
139 @TableField("BZ")
140 private String bz;
141
142 /**
143 * 扫描状态
144 */
145 @TableField("SMZT")
146 private BigDecimal smzt;
147
148 /**
149 * 档案状态
150 */
151 @TableField("DAZT")
152 private BigDecimal dazt;
153
154 /**
155 * 存档机构编码
156 */
157 @TableField("CDJGBM")
158 private String cdjgbm;
159
160 /**
161 * 档案来源(1:不动产归档,2:存量档案补录)
162 */
163 @TableField("DALY")
164 private String daly;
165
166
167 }
1 package com.pashanhoo.archive.entity.vo;
2
3 import java.math.BigDecimal;
4 import java.util.Date;
5 import java.io.Serializable;
6 import io.swagger.annotations.ApiModel;
7 import io.swagger.annotations.ApiModelProperty;
8 import lombok.Data;
9 import lombok.EqualsAndHashCode;
10
11 /**
12 * <p>
13 * 案卷基本信息新增请求实体
14 * </p>
15 *
16 * @author
17 * @since 2021-11-05
18 */
19 @Data
20 @EqualsAndHashCode(callSuper = false)
21 @ApiModel(value="案卷基本信息新增请求实体")
22 public class AddDgArchivesRequest implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26
27 /**
28 * 案卷标题
29 */
30 @ApiModelProperty(name = "ajbt", value = "案卷标题")
31 private String ajbt;
32
33 /**
34 * 主题词
35 */
36 @ApiModelProperty(name = "ztc", value = "主题词")
37 private String ztc;
38
39 /**
40 * 分类号
41 */
42 @ApiModelProperty(name = "flh", value = "分类号")
43 private String flh;
44
45 /**
46 * 目录号
47 */
48 @ApiModelProperty(name = "mlh", value = "目录号")
49 private String mlh;
50
51 /**
52 * 案卷号
53 */
54 @ApiModelProperty(name = "ajh", value = "案卷号")
55 private String ajh;
56
57 /**
58 * 年度
59 */
60 @ApiModelProperty(name = "nd", value = "年度")
61 private BigDecimal nd;
62
63 /**
64 * 件数
65 */
66 @ApiModelProperty(name = "js", value = "件数")
67 private BigDecimal js;
68
69 /**
70 * 页数
71 */
72 @ApiModelProperty(name = "ys", value = "页数")
73 private BigDecimal ys;
74
75 /**
76 * 保管期限
77 */
78 @ApiModelProperty(name = "bgqx", value = "保管期限")
79 private String bgqx;
80
81 /**
82 * 起始日期
83 */
84 @ApiModelProperty(name = "qsrq", value = "起始日期")
85 private Date qsrq;
86
87 /**
88 * 终止日期
89 */
90 @ApiModelProperty(name = "zzrq", value = "终止日期")
91 private Date zzrq;
92
93 /**
94 * 保密级别
95 */
96 @ApiModelProperty(name = "mj", value = "保密级别")
97 private String mj;
98
99 /**
100 * 盒号
101 */
102 @ApiModelProperty(name = "hh", value = "盒号")
103 private String hh;
104
105 /**
106 * 存放位置
107 */
108 @ApiModelProperty(name = "cfwz", value = "存放位置")
109 private String cfwz;
110
111 /**
112 * 创建人
113 */
114 @ApiModelProperty(name = "cjr", value = "创建人")
115 private String cjr;
116
117 /**
118 * 创建日期
119 */
120 @ApiModelProperty(name = "cjrq", value = "创建日期")
121 private Date cjrq;
122
123 /**
124 * 核查人
125 */
126 @ApiModelProperty(name = "hcr", value = "核查人")
127 private String hcr;
128
129 /**
130 * 备注
131 */
132 @ApiModelProperty(name = "bz", value = "备注")
133 private String bz;
134
135 /**
136 * 扫描状态
137 */
138 @ApiModelProperty(name = "smzt", value = "扫描状态")
139 private BigDecimal smzt;
140
141 /**
142 * 档案状态
143 */
144 @ApiModelProperty(name = "dazt", value = "档案状态")
145 private BigDecimal dazt;
146
147 /**
148 * 存档机构编码
149 */
150 @ApiModelProperty(name = "cdjgbm", value = "存档机构编码")
151 private String cdjgbm;
152
153 /**
154 * 档案来源(1:不动产归档,2:存量档案补录)
155 */
156 @ApiModelProperty(name = "daly", value = "档案来源(1:不动产归档,2:存量档案补录)")
157 private String daly;
158
159
160 }
1 package com.pashanhoo.archive.entity.vo;
2
3 import java.math.BigDecimal;
4 import java.util.Date;
5 import com.baomidou.mybatisplus.annotation.TableId;
6 import com.baomidou.mybatisplus.annotation.TableField;
7 import java.io.Serializable;
8 import io.swagger.annotations.ApiModel;
9 import io.swagger.annotations.ApiModelProperty;
10 import lombok.Data;
11 import lombok.EqualsAndHashCode;
12
13 /**
14 * <p>
15 * 案卷基本信息明细实体
16 * </p>
17 *
18 * @author
19 * @since 2021-11-05
20 */
21 @Data
22 @EqualsAndHashCode(callSuper = false)
23 @ApiModel(value="案卷基本信息明细实体")
24 public class DgArchivesDetailVO implements Serializable {
25
26 private static final long serialVersionUID = 1L;
27
28 /**
29 * 档案标识码
30 */
31 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
32 private String bsmArchives;
33
34 /**
35 * 案卷标题
36 */
37 @ApiModelProperty(name = "ajbt", value = "案卷标题")
38 private String ajbt;
39
40 /**
41 * 主题词
42 */
43 @ApiModelProperty(name = "ztc", value = "主题词")
44 private String ztc;
45
46 /**
47 * 分类号
48 */
49 @ApiModelProperty(name = "flh", value = "分类号")
50 private String flh;
51
52 /**
53 * 目录号
54 */
55 @ApiModelProperty(name = "mlh", value = "目录号")
56 private String mlh;
57
58 /**
59 * 案卷号
60 */
61 @ApiModelProperty(name = "ajh", value = "案卷号")
62 private String ajh;
63
64 /**
65 * 年度
66 */
67 @ApiModelProperty(name = "nd", value = "年度")
68 private BigDecimal nd;
69
70 /**
71 * 件数
72 */
73 @ApiModelProperty(name = "js", value = "件数")
74 private BigDecimal js;
75
76 /**
77 * 页数
78 */
79 @ApiModelProperty(name = "ys", value = "页数")
80 private BigDecimal ys;
81
82 /**
83 * 保管期限
84 */
85 @ApiModelProperty(name = "bgqx", value = "保管期限")
86 private String bgqx;
87
88 /**
89 * 起始日期
90 */
91 @ApiModelProperty(name = "qsrq", value = "起始日期")
92 private Date qsrq;
93
94 /**
95 * 终止日期
96 */
97 @ApiModelProperty(name = "zzrq", value = "终止日期")
98 private Date zzrq;
99
100 /**
101 * 保密级别
102 */
103 @ApiModelProperty(name = "mj", value = "保密级别")
104 private String mj;
105
106 /**
107 * 盒号
108 */
109 @ApiModelProperty(name = "hh", value = "盒号")
110 private String hh;
111
112 /**
113 * 存放位置
114 */
115 @ApiModelProperty(name = "cfwz", value = "存放位置")
116 private String cfwz;
117
118 /**
119 * 创建人
120 */
121 @ApiModelProperty(name = "cjr", value = "创建人")
122 private String cjr;
123
124 /**
125 * 创建日期
126 */
127 @ApiModelProperty(name = "cjrq", value = "创建日期")
128 private Date cjrq;
129
130 /**
131 * 核查人
132 */
133 @ApiModelProperty(name = "hcr", value = "核查人")
134 private String hcr;
135
136 /**
137 * 备注
138 */
139 @ApiModelProperty(name = "bz", value = "备注")
140 private String bz;
141
142 /**
143 * 扫描状态
144 */
145 @ApiModelProperty(name = "smzt", value = "扫描状态")
146 private BigDecimal smzt;
147
148 /**
149 * 档案状态
150 */
151 @ApiModelProperty(name = "dazt", value = "档案状态")
152 private BigDecimal dazt;
153
154 /**
155 * 存档机构编码
156 */
157 @ApiModelProperty(name = "cdjgbm", value = "存档机构编码")
158 private String cdjgbm;
159
160 /**
161 * 档案来源(1:不动产归档,2:存量档案补录)
162 */
163 @ApiModelProperty(name = "daly", value = "档案来源(1:不动产归档,2:存量档案补录)")
164 private String daly;
165
166
167 }
1 package com.pashanhoo.archive.entity.vo;
2
3 import java.math.BigDecimal;
4 import java.util.Date;
5 import com.baomidou.mybatisplus.annotation.TableId;
6 import com.baomidou.mybatisplus.annotation.TableField;
7 import java.io.Serializable;
8 import io.swagger.annotations.ApiModel;
9 import io.swagger.annotations.ApiModelProperty;
10 import lombok.Data;
11 import lombok.EqualsAndHashCode;
12
13 /**
14 * <p>
15 * 案卷基本信息列表VO
16 * </p>
17 *
18 * @author
19 * @since 2021-11-05
20 */
21 @Data
22 @EqualsAndHashCode(callSuper = false)
23 @ApiModel(value="案卷基本信息列表VO")
24 //TODO 该类属性暂时是完整的全部属性,需进行个性化的增删
25 public class DgArchivesListVO implements Serializable {
26
27 private static final long serialVersionUID = 1L;
28
29 /**
30 * 档案标识码
31 */
32 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
33 private String bsmArchives;
34
35 /**
36 * 案卷标题
37 */
38 @ApiModelProperty(name = "ajbt", value = "案卷标题")
39 private String ajbt;
40
41 /**
42 * 主题词
43 */
44 @ApiModelProperty(name = "ztc", value = "主题词")
45 private String ztc;
46
47 /**
48 * 分类号
49 */
50 @ApiModelProperty(name = "flh", value = "分类号")
51 private String flh;
52
53 /**
54 * 目录号
55 */
56 @ApiModelProperty(name = "mlh", value = "目录号")
57 private String mlh;
58
59 /**
60 * 案卷号
61 */
62 @ApiModelProperty(name = "ajh", value = "案卷号")
63 private String ajh;
64
65 /**
66 * 年度
67 */
68 @ApiModelProperty(name = "nd", value = "年度")
69 private BigDecimal nd;
70
71 /**
72 * 件数
73 */
74 @ApiModelProperty(name = "js", value = "件数")
75 private BigDecimal js;
76
77 /**
78 * 页数
79 */
80 @ApiModelProperty(name = "ys", value = "页数")
81 private BigDecimal ys;
82
83 /**
84 * 保管期限
85 */
86 @ApiModelProperty(name = "bgqx", value = "保管期限")
87 private String bgqx;
88
89 /**
90 * 起始日期
91 */
92 @ApiModelProperty(name = "qsrq", value = "起始日期")
93 private Date qsrq;
94
95 /**
96 * 终止日期
97 */
98 @ApiModelProperty(name = "zzrq", value = "终止日期")
99 private Date zzrq;
100
101 /**
102 * 保密级别
103 */
104 @ApiModelProperty(name = "mj", value = "保密级别")
105 private String mj;
106
107 /**
108 * 盒号
109 */
110 @ApiModelProperty(name = "hh", value = "盒号")
111 private String hh;
112
113 /**
114 * 存放位置
115 */
116 @ApiModelProperty(name = "cfwz", value = "存放位置")
117 private String cfwz;
118
119 /**
120 * 创建人
121 */
122 @ApiModelProperty(name = "cjr", value = "创建人")
123 private String cjr;
124
125 /**
126 * 创建日期
127 */
128 @ApiModelProperty(name = "cjrq", value = "创建日期")
129 private Date cjrq;
130
131 /**
132 * 核查人
133 */
134 @ApiModelProperty(name = "hcr", value = "核查人")
135 private String hcr;
136
137 /**
138 * 备注
139 */
140 @ApiModelProperty(name = "bz", value = "备注")
141 private String bz;
142
143 /**
144 * 扫描状态
145 */
146 @ApiModelProperty(name = "smzt", value = "扫描状态")
147 private BigDecimal smzt;
148
149 /**
150 * 档案状态
151 */
152 @ApiModelProperty(name = "dazt", value = "档案状态")
153 private BigDecimal dazt;
154
155 /**
156 * 存档机构编码
157 */
158 @ApiModelProperty(name = "cdjgbm", value = "存档机构编码")
159 private String cdjgbm;
160
161 /**
162 * 档案来源(1:不动产归档,2:存量档案补录)
163 */
164 @ApiModelProperty(name = "daly", value = "档案来源(1:不动产归档,2:存量档案补录)")
165 private String daly;
166
167
168 }
1 package com.pashanhoo.archive.entity.vo;
2
3 import java.math.BigDecimal;
4 import java.util.Date;
5 import java.io.Serializable;
6 import io.swagger.annotations.ApiModel;
7 import io.swagger.annotations.ApiModelProperty;
8 import lombok.Data;
9 import lombok.EqualsAndHashCode;
10 import com.pashanhoo.common.PageInfo;
11
12 /**
13 * <p>
14 * 案卷基本信息列表查询请求实体
15 * </p>
16 *
17 * @author
18 * @since 2021-11-05
19 */
20 @Data
21 @EqualsAndHashCode(callSuper = false)
22 @ApiModel(value="案卷基本信息列表查询请求实体")
23 //TODO 初始查询条件是全部,需要根据情况自行删减
24 public class DgArchivesSearchRequest extends PageInfo implements Serializable {
25
26 private static final long serialVersionUID = 1L;
27
28 /**
29 * 档案标识码
30 */
31 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
32 private String bsmArchives;
33
34 /**
35 * 案卷标题
36 */
37 @ApiModelProperty(name = "ajbt", value = "案卷标题")
38 private String ajbt;
39
40 /**
41 * 主题词
42 */
43 @ApiModelProperty(name = "ztc", value = "主题词")
44 private String ztc;
45
46 /**
47 * 分类号
48 */
49 @ApiModelProperty(name = "flh", value = "分类号")
50 private String flh;
51
52 /**
53 * 目录号
54 */
55 @ApiModelProperty(name = "mlh", value = "目录号")
56 private String mlh;
57
58 /**
59 * 案卷号
60 */
61 @ApiModelProperty(name = "ajh", value = "案卷号")
62 private String ajh;
63
64 /**
65 * 年度
66 */
67 @ApiModelProperty(name = "nd", value = "年度")
68 private BigDecimal nd;
69
70 /**
71 * 件数
72 */
73 @ApiModelProperty(name = "js", value = "件数")
74 private BigDecimal js;
75
76 /**
77 * 页数
78 */
79 @ApiModelProperty(name = "ys", value = "页数")
80 private BigDecimal ys;
81
82 /**
83 * 保管期限
84 */
85 @ApiModelProperty(name = "bgqx", value = "保管期限")
86 private String bgqx;
87
88 /**
89 * 起始日期
90 */
91 @ApiModelProperty(name = "qsrq", value = "起始日期")
92 private Date qsrq;
93
94 /**
95 * 终止日期
96 */
97 @ApiModelProperty(name = "zzrq", value = "终止日期")
98 private Date zzrq;
99
100 /**
101 * 保密级别
102 */
103 @ApiModelProperty(name = "mj", value = "保密级别")
104 private String mj;
105
106 /**
107 * 盒号
108 */
109 @ApiModelProperty(name = "hh", value = "盒号")
110 private String hh;
111
112 /**
113 * 存放位置
114 */
115 @ApiModelProperty(name = "cfwz", value = "存放位置")
116 private String cfwz;
117
118 /**
119 * 创建人
120 */
121 @ApiModelProperty(name = "cjr", value = "创建人")
122 private String cjr;
123
124 /**
125 * 创建日期
126 */
127 @ApiModelProperty(name = "cjrq", value = "创建日期")
128 private Date cjrq;
129
130 /**
131 * 核查人
132 */
133 @ApiModelProperty(name = "hcr", value = "核查人")
134 private String hcr;
135
136 /**
137 * 备注
138 */
139 @ApiModelProperty(name = "bz", value = "备注")
140 private String bz;
141
142 /**
143 * 扫描状态
144 */
145 @ApiModelProperty(name = "smzt", value = "扫描状态")
146 private BigDecimal smzt;
147
148 /**
149 * 档案状态
150 */
151 @ApiModelProperty(name = "dazt", value = "档案状态")
152 private BigDecimal dazt;
153
154 /**
155 * 存档机构编码
156 */
157 @ApiModelProperty(name = "cdjgbm", value = "存档机构编码")
158 private String cdjgbm;
159
160 /**
161 * 档案来源(1:不动产归档,2:存量档案补录)
162 */
163 @ApiModelProperty(name = "daly", value = "档案来源(1:不动产归档,2:存量档案补录)")
164 private String daly;
165
166
167 }
1 package com.pashanhoo.archive.entity.vo;
2
3 import java.math.BigDecimal;
4 import java.util.Date;
5 import java.io.Serializable;
6 import io.swagger.annotations.ApiModel;
7 import io.swagger.annotations.ApiModelProperty;
8 import lombok.Data;
9 import lombok.EqualsAndHashCode;
10
11 /**
12 * <p>
13 * 案卷基本信息修改请求实体
14 * </p>
15 *
16 * @author
17 * @since 2021-11-05
18 */
19 @Data
20 @EqualsAndHashCode(callSuper = false)
21 @ApiModel(value="案卷基本信息修改请求实体")
22 public class UpdateDgArchivesRequest implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * 档案标识码
28 */
29 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
30 private String bsmArchives;
31
32 /**
33 * 案卷标题
34 */
35 @ApiModelProperty(name = "ajbt", value = "案卷标题")
36 private String ajbt;
37
38 /**
39 * 主题词
40 */
41 @ApiModelProperty(name = "ztc", value = "主题词")
42 private String ztc;
43
44 /**
45 * 分类号
46 */
47 @ApiModelProperty(name = "flh", value = "分类号")
48 private String flh;
49
50 /**
51 * 目录号
52 */
53 @ApiModelProperty(name = "mlh", value = "目录号")
54 private String mlh;
55
56 /**
57 * 案卷号
58 */
59 @ApiModelProperty(name = "ajh", value = "案卷号")
60 private String ajh;
61
62 /**
63 * 年度
64 */
65 @ApiModelProperty(name = "nd", value = "年度")
66 private BigDecimal nd;
67
68 /**
69 * 件数
70 */
71 @ApiModelProperty(name = "js", value = "件数")
72 private BigDecimal js;
73
74 /**
75 * 页数
76 */
77 @ApiModelProperty(name = "ys", value = "页数")
78 private BigDecimal ys;
79
80 /**
81 * 保管期限
82 */
83 @ApiModelProperty(name = "bgqx", value = "保管期限")
84 private String bgqx;
85
86 /**
87 * 起始日期
88 */
89 @ApiModelProperty(name = "qsrq", value = "起始日期")
90 private Date qsrq;
91
92 /**
93 * 终止日期
94 */
95 @ApiModelProperty(name = "zzrq", value = "终止日期")
96 private Date zzrq;
97
98 /**
99 * 保密级别
100 */
101 @ApiModelProperty(name = "mj", value = "保密级别")
102 private String mj;
103
104 /**
105 * 盒号
106 */
107 @ApiModelProperty(name = "hh", value = "盒号")
108 private String hh;
109
110 /**
111 * 存放位置
112 */
113 @ApiModelProperty(name = "cfwz", value = "存放位置")
114 private String cfwz;
115
116 /**
117 * 创建人
118 */
119 @ApiModelProperty(name = "cjr", value = "创建人")
120 private String cjr;
121
122 /**
123 * 创建日期
124 */
125 @ApiModelProperty(name = "cjrq", value = "创建日期")
126 private Date cjrq;
127
128 /**
129 * 核查人
130 */
131 @ApiModelProperty(name = "hcr", value = "核查人")
132 private String hcr;
133
134 /**
135 * 备注
136 */
137 @ApiModelProperty(name = "bz", value = "备注")
138 private String bz;
139
140 /**
141 * 扫描状态
142 */
143 @ApiModelProperty(name = "smzt", value = "扫描状态")
144 private BigDecimal smzt;
145
146 /**
147 * 档案状态
148 */
149 @ApiModelProperty(name = "dazt", value = "档案状态")
150 private BigDecimal dazt;
151
152 /**
153 * 存档机构编码
154 */
155 @ApiModelProperty(name = "cdjgbm", value = "存档机构编码")
156 private String cdjgbm;
157
158 /**
159 * 档案来源(1:不动产归档,2:存量档案补录)
160 */
161 @ApiModelProperty(name = "daly", value = "档案来源(1:不动产归档,2:存量档案补录)")
162 private String daly;
163
164
165 }
1 package com.pashanhoo.archive.mapper;
2
3
4 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 import com.pashanhoo.archive.entity.DgArchivesDO;
6
7 /**
8 * <p>
9 * 案卷基本信息 Mapper 接口
10 * </p>
11 *
12 * @author
13 * @since 2021-11-05
14 */
15 public interface DgArchivesMapper extends BaseMapper<DgArchivesDO> {
16
17 }
1 package com.pashanhoo.archive.service;
2
3 import com.baomidou.mybatisplus.extension.service.IService;
4 import com.pashanhoo.archive.entity.DgArchivesDO;
5 import com.pashanhoo.archive.entity.vo.AddDgArchivesRequest;
6 import com.pashanhoo.archive.entity.vo.DgArchivesDetailVO;
7 import com.pashanhoo.archive.entity.vo.UpdateDgArchivesRequest;
8 import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest;
9 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
10
11 /**
12 * <p>
13 * 案卷基本信息 服务类
14 * </p>
15 *
16 * @author
17 * @since 2021-11-05
18 */
19 public interface DgArchivesService extends IService<DgArchivesDO> {
20 /**
21 * 新增记录
22 * @param request
23 * @return
24 */
25 boolean insertDgArchives(AddDgArchivesRequest request);
26
27 /**
28 * 根据主键查询记录详情
29 * @param id
30 * @return
31 */
32 DgArchivesDetailVO getDgArchivesDetailById(String id);
33
34 /**
35 * 修改单条记录
36 * @param request
37 * @return
38 */
39 boolean updateDgArchives(UpdateDgArchivesRequest request);
40
41 /**
42 * 根据条件进行列表查询
43 * @param request
44 * @return
45 */
46 Page searchDgArchivesList(DgArchivesSearchRequest request);
47 }
1 package com.pashanhoo.archive.service.impl;
2
3
4 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5 import com.pashanhoo.archive.entity.DgArchivesConverter;
6 import com.pashanhoo.archive.entity.DgArchivesDO;
7 import com.pashanhoo.archive.entity.vo.AddDgArchivesRequest;
8 import com.pashanhoo.archive.entity.vo.DgArchivesDetailVO;
9 import com.pashanhoo.archive.entity.vo.UpdateDgArchivesRequest;
10 import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest;
11 import com.pashanhoo.archive.mapper.DgArchivesMapper;
12 import com.pashanhoo.archive.service.DgArchivesService;
13 import org.springframework.beans.factory.annotation.Autowired;
14 import org.springframework.stereotype.Service;
15
16 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
17 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
18
19 /**
20 * <p>
21 * 案卷基本信息 服务实现类
22 * </p>
23 *
24 * @author
25 * @since 2021-11-05
26 */
27 @Service
28 public class DgArchivesServiceImpl extends ServiceImpl<DgArchivesMapper, DgArchivesDO> implements DgArchivesService {
29
30 @Autowired
31 private DgArchivesConverter dgarchivesConverter;
32
33 @Autowired
34 private DgArchivesMapper dgarchivesMapper;
35
36 /**
37 * 新增记录
38 * @param request
39 * @return
40 */
41 @Override
42 public boolean insertDgArchives(AddDgArchivesRequest request) {
43 DgArchivesDO dgarchivesDO = dgarchivesConverter.addRequest2DO(request);
44 return this.save(dgarchivesDO);
45 }
46
47 /**
48 * 根据主键查询记录详情
49 * @param id
50 * @return
51 */
52 @Override
53 public DgArchivesDetailVO getDgArchivesDetailById(String id) {
54 DgArchivesDO dgarchivesDO = this.getById(id);
55 return dgarchivesConverter.do2DetailVO(dgarchivesDO);
56 }
57
58 /**
59 * 修改单条记录
60 * @param request
61 * @return
62 */
63 @Override
64 public boolean updateDgArchives(UpdateDgArchivesRequest request) {
65 DgArchivesDO dgarchivesDO = dgarchivesConverter.updateRequest2DO(request);
66 return this.updateById(dgarchivesDO);
67 }
68
69 /**
70 * 根据条件进行列表查询
71 * @param request
72 * @return
73 */
74 @Override
75 public Page searchDgArchivesList(DgArchivesSearchRequest request) {
76 Page<DgArchivesDO> pageParam = new Page<DgArchivesDO>(request.getCurrentPage(), request.getPageSize());
77 QueryWrapper<DgArchivesDO> wrapper = new QueryWrapper<>();
78 //设置默认排序
79 wrapper = "desc".equals(request.getSortOrder()) ? wrapper.orderByDesc(request.getSortField()) : wrapper.orderByAsc(request.getSortField());
80
81 //TODO 根据当前情况设置wrapper条件
82
83 Page page = this.page(pageParam, wrapper);
84 //将查询出来的DO List转为 ListVO List并重新设置到page对象中,并返回page对象
85 return page.setRecords(dgarchivesConverter.doList2ListVOList(page.getRecords()));
86 }
87
88 }
1 package com.pashanhoo.bdcdy.controller;
2
3 import com.pashanhoo.common.Result;
4 import com.pashanhoo.bdcdy.entity.vo.AddDgBdcdyRequest;
5 import com.pashanhoo.bdcdy.entity.vo.UpdateDgBdcdyRequest;
6 import com.pashanhoo.bdcdy.entity.vo.DgBdcdySearchRequest;
7 import com.pashanhoo.bdcdy.service.DgBdcdyService;
8 import org.springframework.web.bind.annotation.RestController;
9 import org.springframework.web.bind.annotation.*;
10 import io.swagger.annotations.Api;
11 import io.swagger.annotations.ApiOperation;
12 import io.swagger.annotations.ApiParam;
13 import org.springframework.beans.factory.annotation.Autowired;
14 import java.util.List;
15
16 /**
17 * <p>
18 * 档案不动产信息 前端控制器
19 * </p>
20 *
21 * @author
22 * @since 2021-11-05
23 */
24 @RestController
25 @RequestMapping("/system/dgBdcdy/")
26 @Api(tags = "档案不动产信息接口")
27 public class DgBdcdyController {
28 @Autowired
29 private DgBdcdyService dgbdcdyService;
30
31 @PostMapping("insertDgBdcdy")
32 @ApiOperation("新增档案不动产信息")
33 public Result insertDgBdcdy(@RequestBody AddDgBdcdyRequest request){
34 if(dgbdcdyService.insertDgBdcdy(request)){
35 return Result.ok();
36 }
37 return Result.error("新增失败");
38 }
39
40 @DeleteMapping("deleteDgBdcdyByIds")
41 @ApiOperation(value = "批量删除档案不动产信息")
42 public Result deleteDgBdcdyByIds(@ApiParam("档案不动产信息ID列表") @RequestParam(value = "idList") List<String> idList) {
43 if(dgbdcdyService.removeByIds(idList)) {
44 return Result.ok("删除成功");
45 }
46 return Result.error("删除失败");
47 }
48
49 @PutMapping("updateDgBdcdy")
50 @ApiOperation("修改档案不动产信息")
51 public Result updateDgBdcdy(@RequestBody UpdateDgBdcdyRequest request){
52 if(dgbdcdyService.updateDgBdcdy(request)) {
53 return Result.ok("修改成功");
54 }
55 return Result.error("修改失败");
56 }
57
58 @GetMapping("getDgBdcdyDetailById")
59 @ApiOperation(value = "读取明细")
60 public Result getDgBdcdyDetailById(@ApiParam("档案不动产信息ID") @RequestParam String id){
61 return Result.ok(dgbdcdyService.getDgBdcdyDetailById(id));
62 }
63
64 @PostMapping("search")
65 @ApiOperation(value = "根据条件进行列表查询")
66 public Result searchDgBdcdyList(@RequestBody DgBdcdySearchRequest request) {
67 //TODO 默认排序条件设置
68 request.defaultFillPageProp("","");
69 return Result.ok(dgbdcdyService.searchDgBdcdyList(request));
70 }
71 }
1 package com.pashanhoo.bdcdy.entity;
2
3 import java.util.List;
4
5 import com.pashanhoo.bdcdy.entity.vo.AddDgBdcdyRequest;
6 import com.pashanhoo.bdcdy.entity.vo.DgBdcdyDetailVO;
7 import com.pashanhoo.bdcdy.entity.vo.DgBdcdyListVO;
8 import com.pashanhoo.bdcdy.entity.vo.UpdateDgBdcdyRequest;
9 import org.mapstruct.Mapper;
10
11 /**
12 * @author
13 * @since 2021-11-05
14 */
15 @Mapper(componentModel = "spring")
16 public interface DgBdcdyConverter{
17 DgBdcdyDO addRequest2DO(AddDgBdcdyRequest request);
18
19 DgBdcdyDetailVO do2DetailVO(DgBdcdyDO dgbdcdyDO);
20
21 DgBdcdyDO updateRequest2DO(UpdateDgBdcdyRequest request);
22
23 DgBdcdyListVO do2ListVO(DgBdcdyDO dgbdcdyDO);
24
25 List<DgBdcdyListVO> doList2ListVOList(List<DgBdcdyDO> dgbdcdyDOList);
26 }
1 package com.pashanhoo.bdcdy.entity;
2
3 import com.baomidou.mybatisplus.annotation.TableName;
4 import com.baomidou.mybatisplus.annotation.IdType;
5 import java.util.Date;
6 import com.baomidou.mybatisplus.annotation.TableId;
7 import com.baomidou.mybatisplus.annotation.TableField;
8 import java.io.Serializable;
9 import lombok.Data;
10 import lombok.EqualsAndHashCode;
11
12 /**
13 * <p>
14 * 档案不动产信息
15 * </p>
16 *
17 * @author
18 * @since 2021-11-05
19 */
20 @Data
21 @EqualsAndHashCode(callSuper = false)
22 @TableName("DG_BDCDY")
23 public class DgBdcdyDO implements Serializable {
24
25 private static final long serialVersionUID = 1L;
26
27 /**
28 * 单元标识码
29 */
30 @TableId(value = "BSM_BDCDY", type = IdType.UUID)
31 private String bsmBdcdy;
32
33 /**
34 * 档案标识码
35 */
36 @TableField("BSM_ARCHIVES")
37 private String bsmArchives;
38
39 /**
40 * 权利标识码
41 */
42 @TableField("BSM_QL")
43 private String bsmQl;
44
45 /**
46 * 不动产单元ID
47 */
48 @TableField("BDCDYID")
49 private String bdcdyid;
50
51 /**
52 * 不动产单元号
53 */
54 @TableField("BDCDYH")
55 private String bdcdyh;
56
57 /**
58 * 坐落
59 */
60 @TableField("ZL")
61 private String zl;
62
63 /**
64 * 权利人
65 */
66 @TableField("QLR")
67 private String qlr;
68
69 /**
70 * 权利人证件号
71 */
72 @TableField("ZJHM")
73 private String zjhm;
74
75 /**
76 * 义务人
77 */
78 @TableField("YWR")
79 private String ywr;
80
81 /**
82 * 不动产权证号
83 */
84 @TableField("BDCQZH")
85 private String bdcqzh;
86
87 /**
88 * 登记时间
89 */
90 @TableField("DJSJ")
91 private Date djsj;
92
93 /**
94 * 注销时间
95 */
96 @TableField("ZXSJ")
97 private Date zxsj;
98
99
100 }
1 package com.pashanhoo.bdcdy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9
10 /**
11 * <p>
12 * 档案不动产信息新增请求实体
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案不动产信息新增请求实体")
21 public class AddDgBdcdyRequest implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25
26 /**
27 * 档案标识码
28 */
29 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
30 private String bsmArchives;
31
32 /**
33 * 权利标识码
34 */
35 @ApiModelProperty(name = "bsmQl", value = "权利标识码")
36 private String bsmQl;
37
38 /**
39 * 不动产单元ID
40 */
41 @ApiModelProperty(name = "bdcdyid", value = "不动产单元ID")
42 private String bdcdyid;
43
44 /**
45 * 不动产单元号
46 */
47 @ApiModelProperty(name = "bdcdyh", value = "不动产单元号")
48 private String bdcdyh;
49
50 /**
51 * 坐落
52 */
53 @ApiModelProperty(name = "zl", value = "坐落")
54 private String zl;
55
56 /**
57 * 权利人
58 */
59 @ApiModelProperty(name = "qlr", value = "权利人")
60 private String qlr;
61
62 /**
63 * 权利人证件号
64 */
65 @ApiModelProperty(name = "zjhm", value = "权利人证件号")
66 private String zjhm;
67
68 /**
69 * 义务人
70 */
71 @ApiModelProperty(name = "ywr", value = "义务人")
72 private String ywr;
73
74 /**
75 * 不动产权证号
76 */
77 @ApiModelProperty(name = "bdcqzh", value = "不动产权证号")
78 private String bdcqzh;
79
80 /**
81 * 登记时间
82 */
83 @ApiModelProperty(name = "djsj", value = "登记时间")
84 private Date djsj;
85
86 /**
87 * 注销时间
88 */
89 @ApiModelProperty(name = "zxsj", value = "注销时间")
90 private Date zxsj;
91
92
93 }
1 package com.pashanhoo.bdcdy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9
10 /**
11 * <p>
12 * 档案不动产信息明细实体
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案不动产信息明细实体")
21 public class DgBdcdyDetailVO implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25 /**
26 * 单元标识码
27 */
28 @ApiModelProperty(name = "bsmBdcdy", value = "单元标识码")
29 private String bsmBdcdy;
30
31 /**
32 * 档案标识码
33 */
34 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
35 private String bsmArchives;
36
37 /**
38 * 权利标识码
39 */
40 @ApiModelProperty(name = "bsmQl", value = "权利标识码")
41 private String bsmQl;
42
43 /**
44 * 不动产单元ID
45 */
46 @ApiModelProperty(name = "bdcdyid", value = "不动产单元ID")
47 private String bdcdyid;
48
49 /**
50 * 不动产单元号
51 */
52 @ApiModelProperty(name = "bdcdyh", value = "不动产单元号")
53 private String bdcdyh;
54
55 /**
56 * 坐落
57 */
58 @ApiModelProperty(name = "zl", value = "坐落")
59 private String zl;
60
61 /**
62 * 权利人
63 */
64 @ApiModelProperty(name = "qlr", value = "权利人")
65 private String qlr;
66
67 /**
68 * 权利人证件号
69 */
70 @ApiModelProperty(name = "zjhm", value = "权利人证件号")
71 private String zjhm;
72
73 /**
74 * 义务人
75 */
76 @ApiModelProperty(name = "ywr", value = "义务人")
77 private String ywr;
78
79 /**
80 * 不动产权证号
81 */
82 @ApiModelProperty(name = "bdcqzh", value = "不动产权证号")
83 private String bdcqzh;
84
85 /**
86 * 登记时间
87 */
88 @ApiModelProperty(name = "djsj", value = "登记时间")
89 private Date djsj;
90
91 /**
92 * 注销时间
93 */
94 @ApiModelProperty(name = "zxsj", value = "注销时间")
95 private Date zxsj;
96
97
98 }
1 package com.pashanhoo.bdcdy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9
10 /**
11 * <p>
12 * 档案不动产信息列表VO
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案不动产信息列表VO")
21 //TODO 该类属性暂时是完整的全部属性,需进行个性化的增删
22 public class DgBdcdyListVO implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * 单元标识码
28 */
29 @ApiModelProperty(name = "bsmBdcdy", value = "单元标识码")
30 private String bsmBdcdy;
31
32 /**
33 * 档案标识码
34 */
35 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
36 private String bsmArchives;
37
38 /**
39 * 权利标识码
40 */
41 @ApiModelProperty(name = "bsmQl", value = "权利标识码")
42 private String bsmQl;
43
44 /**
45 * 不动产单元ID
46 */
47 @ApiModelProperty(name = "bdcdyid", value = "不动产单元ID")
48 private String bdcdyid;
49
50 /**
51 * 不动产单元号
52 */
53 @ApiModelProperty(name = "bdcdyh", value = "不动产单元号")
54 private String bdcdyh;
55
56 /**
57 * 坐落
58 */
59 @ApiModelProperty(name = "zl", value = "坐落")
60 private String zl;
61
62 /**
63 * 权利人
64 */
65 @ApiModelProperty(name = "qlr", value = "权利人")
66 private String qlr;
67
68 /**
69 * 权利人证件号
70 */
71 @ApiModelProperty(name = "zjhm", value = "权利人证件号")
72 private String zjhm;
73
74 /**
75 * 义务人
76 */
77 @ApiModelProperty(name = "ywr", value = "义务人")
78 private String ywr;
79
80 /**
81 * 不动产权证号
82 */
83 @ApiModelProperty(name = "bdcqzh", value = "不动产权证号")
84 private String bdcqzh;
85
86 /**
87 * 登记时间
88 */
89 @ApiModelProperty(name = "djsj", value = "登记时间")
90 private Date djsj;
91
92 /**
93 * 注销时间
94 */
95 @ApiModelProperty(name = "zxsj", value = "注销时间")
96 private Date zxsj;
97
98
99 }
1 package com.pashanhoo.bdcdy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9 import com.pashanhoo.common.PageInfo;
10
11 /**
12 * <p>
13 * 档案不动产信息列表查询请求实体
14 * </p>
15 *
16 * @author
17 * @since 2021-11-05
18 */
19 @Data
20 @EqualsAndHashCode(callSuper = false)
21 @ApiModel(value="档案不动产信息列表查询请求实体")
22 //TODO 初始查询条件是全部,需要根据情况自行删减
23 public class DgBdcdySearchRequest extends PageInfo implements Serializable {
24
25 private static final long serialVersionUID = 1L;
26
27 /**
28 * 单元标识码
29 */
30 @ApiModelProperty(name = "bsmBdcdy", value = "单元标识码")
31 private String bsmBdcdy;
32
33 /**
34 * 档案标识码
35 */
36 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
37 private String bsmArchives;
38
39 /**
40 * 权利标识码
41 */
42 @ApiModelProperty(name = "bsmQl", value = "权利标识码")
43 private String bsmQl;
44
45 /**
46 * 不动产单元ID
47 */
48 @ApiModelProperty(name = "bdcdyid", value = "不动产单元ID")
49 private String bdcdyid;
50
51 /**
52 * 不动产单元号
53 */
54 @ApiModelProperty(name = "bdcdyh", value = "不动产单元号")
55 private String bdcdyh;
56
57 /**
58 * 坐落
59 */
60 @ApiModelProperty(name = "zl", value = "坐落")
61 private String zl;
62
63 /**
64 * 权利人
65 */
66 @ApiModelProperty(name = "qlr", value = "权利人")
67 private String qlr;
68
69 /**
70 * 权利人证件号
71 */
72 @ApiModelProperty(name = "zjhm", value = "权利人证件号")
73 private String zjhm;
74
75 /**
76 * 义务人
77 */
78 @ApiModelProperty(name = "ywr", value = "义务人")
79 private String ywr;
80
81 /**
82 * 不动产权证号
83 */
84 @ApiModelProperty(name = "bdcqzh", value = "不动产权证号")
85 private String bdcqzh;
86
87 /**
88 * 登记时间
89 */
90 @ApiModelProperty(name = "djsj", value = "登记时间")
91 private Date djsj;
92
93 /**
94 * 注销时间
95 */
96 @ApiModelProperty(name = "zxsj", value = "注销时间")
97 private Date zxsj;
98
99
100 }
1 package com.pashanhoo.bdcdy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9
10 /**
11 * <p>
12 * 档案不动产信息修改请求实体
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案不动产信息修改请求实体")
21 public class UpdateDgBdcdyRequest implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25 /**
26 * 单元标识码
27 */
28 @ApiModelProperty(name = "bsmBdcdy", value = "单元标识码")
29 private String bsmBdcdy;
30
31 /**
32 * 档案标识码
33 */
34 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
35 private String bsmArchives;
36
37 /**
38 * 权利标识码
39 */
40 @ApiModelProperty(name = "bsmQl", value = "权利标识码")
41 private String bsmQl;
42
43 /**
44 * 不动产单元ID
45 */
46 @ApiModelProperty(name = "bdcdyid", value = "不动产单元ID")
47 private String bdcdyid;
48
49 /**
50 * 不动产单元号
51 */
52 @ApiModelProperty(name = "bdcdyh", value = "不动产单元号")
53 private String bdcdyh;
54
55 /**
56 * 坐落
57 */
58 @ApiModelProperty(name = "zl", value = "坐落")
59 private String zl;
60
61 /**
62 * 权利人
63 */
64 @ApiModelProperty(name = "qlr", value = "权利人")
65 private String qlr;
66
67 /**
68 * 权利人证件号
69 */
70 @ApiModelProperty(name = "zjhm", value = "权利人证件号")
71 private String zjhm;
72
73 /**
74 * 义务人
75 */
76 @ApiModelProperty(name = "ywr", value = "义务人")
77 private String ywr;
78
79 /**
80 * 不动产权证号
81 */
82 @ApiModelProperty(name = "bdcqzh", value = "不动产权证号")
83 private String bdcqzh;
84
85 /**
86 * 登记时间
87 */
88 @ApiModelProperty(name = "djsj", value = "登记时间")
89 private Date djsj;
90
91 /**
92 * 注销时间
93 */
94 @ApiModelProperty(name = "zxsj", value = "注销时间")
95 private Date zxsj;
96
97
98 }
1 package com.pashanhoo.bdcdy.mapper;
2
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.pashanhoo.bdcdy.entity.DgBdcdyDO;
5
6 /**
7 * <p>
8 * 档案不动产信息 Mapper 接口
9 * </p>
10 *
11 * @author
12 * @since 2021-11-05
13 */
14 public interface DgBdcdyMapper extends BaseMapper<DgBdcdyDO> {
15
16 }
1 package com.pashanhoo.bdcdy.service;
2
3 import com.baomidou.mybatisplus.extension.service.IService;
4 import com.pashanhoo.bdcdy.entity.DgBdcdyDO;
5 import com.pashanhoo.bdcdy.entity.vo.AddDgBdcdyRequest;
6 import com.pashanhoo.bdcdy.entity.vo.DgBdcdyDetailVO;
7 import com.pashanhoo.bdcdy.entity.vo.UpdateDgBdcdyRequest;
8 import com.pashanhoo.bdcdy.entity.vo.DgBdcdySearchRequest;
9 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
10
11 /**
12 * <p>
13 * 档案不动产信息 服务类
14 * </p>
15 *
16 * @author
17 * @since 2021-11-05
18 */
19 public interface DgBdcdyService extends IService<DgBdcdyDO> {
20 /**
21 * 新增记录
22 * @param request
23 * @return
24 */
25 boolean insertDgBdcdy(AddDgBdcdyRequest request);
26
27 /**
28 * 根据主键查询记录详情
29 * @param id
30 * @return
31 */
32 DgBdcdyDetailVO getDgBdcdyDetailById(String id);
33
34 /**
35 * 修改单条记录
36 * @param request
37 * @return
38 */
39 boolean updateDgBdcdy(UpdateDgBdcdyRequest request);
40
41 /**
42 * 根据条件进行列表查询
43 * @param request
44 * @return
45 */
46 Page searchDgBdcdyList(DgBdcdySearchRequest request);
47 }
1 package com.pashanhoo.bdcdy.service.impl;
2
3 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4 import com.pashanhoo.bdcdy.entity.DgBdcdyConverter;
5 import com.pashanhoo.bdcdy.entity.DgBdcdyDO;
6 import com.pashanhoo.bdcdy.entity.vo.AddDgBdcdyRequest;
7 import com.pashanhoo.bdcdy.entity.vo.DgBdcdyDetailVO;
8 import com.pashanhoo.bdcdy.entity.vo.UpdateDgBdcdyRequest;
9 import com.pashanhoo.bdcdy.entity.vo.DgBdcdySearchRequest;
10 import com.pashanhoo.bdcdy.mapper.DgBdcdyMapper;
11 import com.pashanhoo.bdcdy.service.DgBdcdyService;
12 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.stereotype.Service;
14
15 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
16 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
17
18 /**
19 * <p>
20 * 档案不动产信息 服务实现类
21 * </p>
22 *
23 * @author
24 * @since 2021-11-05
25 */
26 @Service
27 public class DgBdcdyServiceImpl extends ServiceImpl<DgBdcdyMapper, DgBdcdyDO> implements DgBdcdyService {
28
29 @Autowired
30 private DgBdcdyConverter dgbdcdyConverter;
31
32 @Autowired
33 private DgBdcdyMapper dgbdcdyMapper;
34
35 /**
36 * 新增记录
37 * @param request
38 * @return
39 */
40 @Override
41 public boolean insertDgBdcdy(AddDgBdcdyRequest request) {
42 DgBdcdyDO dgbdcdyDO = dgbdcdyConverter.addRequest2DO(request);
43 return this.save(dgbdcdyDO);
44 }
45
46 /**
47 * 根据主键查询记录详情
48 * @param id
49 * @return
50 */
51 @Override
52 public DgBdcdyDetailVO getDgBdcdyDetailById(String id) {
53 DgBdcdyDO dgbdcdyDO = this.getById(id);
54 return dgbdcdyConverter.do2DetailVO(dgbdcdyDO);
55 }
56
57 /**
58 * 修改单条记录
59 * @param request
60 * @return
61 */
62 @Override
63 public boolean updateDgBdcdy(UpdateDgBdcdyRequest request) {
64 DgBdcdyDO dgbdcdyDO = dgbdcdyConverter.updateRequest2DO(request);
65 return this.updateById(dgbdcdyDO);
66 }
67
68 /**
69 * 根据条件进行列表查询
70 * @param request
71 * @return
72 */
73 @Override
74 public Page searchDgBdcdyList(DgBdcdySearchRequest request) {
75 Page<DgBdcdyDO> pageParam = new Page<DgBdcdyDO>(request.getCurrentPage(), request.getPageSize());
76 QueryWrapper<DgBdcdyDO> wrapper = new QueryWrapper<>();
77 //设置默认排序
78 wrapper = "desc".equals(request.getSortOrder()) ? wrapper.orderByDesc(request.getSortField()) : wrapper.orderByAsc(request.getSortField());
79
80 //TODO 根据当前情况设置wrapper条件
81
82 Page page = this.page(pageParam, wrapper);
83 //将查询出来的DO List转为 ListVO List并重新设置到page对象中,并返回page对象
84 return page.setRecords(dgbdcdyConverter.doList2ListVOList(page.getRecords()));
85 }
86
87 }
1 package com.pashanhoo.business.controller;
2
3
4 import com.pashanhoo.common.Result;
5 import com.pashanhoo.business.entity.vo.AddDgBusinessRequest;
6 import com.pashanhoo.business.entity.vo.UpdateDgBusinessRequest;
7 import com.pashanhoo.business.entity.vo.DgBusinessSearchRequest;
8 import com.pashanhoo.business.service.DgBusinessService;
9 import org.springframework.web.bind.annotation.RestController;
10 import org.springframework.web.bind.annotation.*;
11 import io.swagger.annotations.Api;
12 import io.swagger.annotations.ApiOperation;
13 import io.swagger.annotations.ApiParam;
14 import org.springframework.beans.factory.annotation.Autowired;
15 import java.util.List;
16
17 /**
18 * <p>
19 * 档案业务信息 前端控制器
20 * </p>
21 *
22 * @author
23 * @since 2021-11-05
24 */
25 @RestController
26 @RequestMapping("/system/dgBusiness/")
27 @Api(tags = "档案业务信息接口")
28 public class DgBusinessController {
29 @Autowired
30 private DgBusinessService dgbusinessService;
31
32 @PostMapping("insertDgBusiness")
33 @ApiOperation("新增档案业务信息")
34 public Result insertDgBusiness(@RequestBody AddDgBusinessRequest request){
35 if(dgbusinessService.insertDgBusiness(request)){
36 return Result.ok();
37 }
38 return Result.error("新增失败");
39 }
40
41 @DeleteMapping("deleteDgBusinessByIds")
42 @ApiOperation(value = "批量删除档案业务信息")
43 public Result deleteDgBusinessByIds(@ApiParam("档案业务信息ID列表") @RequestParam(value = "idList") List<String> idList) {
44 if(dgbusinessService.removeByIds(idList)) {
45 return Result.ok("删除成功");
46 }
47 return Result.error("删除失败");
48 }
49
50 @PutMapping("updateDgBusiness")
51 @ApiOperation("修改档案业务信息")
52 public Result updateDgBusiness(@RequestBody UpdateDgBusinessRequest request){
53 if(dgbusinessService.updateDgBusiness(request)) {
54 return Result.ok("修改成功");
55 }
56 return Result.error("修改失败");
57 }
58
59 @GetMapping("getDgBusinessDetailById")
60 @ApiOperation(value = "读取明细")
61 public Result getDgBusinessDetailById(@ApiParam("档案业务信息ID") @RequestParam String id){
62 return Result.ok(dgbusinessService.getDgBusinessDetailById(id));
63 }
64
65 @PostMapping("search")
66 @ApiOperation(value = "根据条件进行列表查询")
67 public Result searchDgBusinessList(@RequestBody DgBusinessSearchRequest request) {
68 //TODO 默认排序条件设置
69 request.defaultFillPageProp("","");
70 return Result.ok(dgbusinessService.searchDgBusinessList(request));
71 }
72 }
1 package com.pashanhoo.business.entity;
2
3 import java.util.List;
4
5 import com.pashanhoo.business.entity.vo.AddDgBusinessRequest;
6 import com.pashanhoo.business.entity.vo.DgBusinessDetailVO;
7 import com.pashanhoo.business.entity.vo.DgBusinessListVO;
8 import com.pashanhoo.business.entity.vo.UpdateDgBusinessRequest;
9 import org.mapstruct.Mapper;
10
11 /**
12 * @author
13 * @since 2021-11-05
14 */
15 @Mapper(componentModel = "spring")
16 public interface DgBusinessConverter{
17 DgBusinessDO addRequest2DO(AddDgBusinessRequest request);
18
19 DgBusinessDetailVO do2DetailVO(DgBusinessDO dgbusinessDO);
20
21 DgBusinessDO updateRequest2DO(UpdateDgBusinessRequest request);
22
23 DgBusinessListVO do2ListVO(DgBusinessDO dgbusinessDO);
24
25 List<DgBusinessListVO> doList2ListVOList(List<DgBusinessDO> dgbusinessDOList);
26 }
1 package com.pashanhoo.business.entity;
2
3 import com.baomidou.mybatisplus.annotation.TableName;
4 import com.baomidou.mybatisplus.annotation.IdType;
5 import com.baomidou.mybatisplus.annotation.TableId;
6 import com.baomidou.mybatisplus.annotation.TableField;
7 import java.io.Serializable;
8 import lombok.Data;
9 import lombok.EqualsAndHashCode;
10
11 /**
12 * <p>
13 * 档案业务信息
14 * </p>
15 *
16 * @author
17 * @since 2021-11-05
18 */
19 @Data
20 @EqualsAndHashCode(callSuper = false)
21 @TableName("DG_BUSINESS")
22 public class DgBusinessDO implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * 业务标识码
28 */
29 @TableId(value = "BSM_BUSINESS", type = IdType.UUID)
30 private String bsmBusiness;
31
32 /**
33 * 档案标识码
34 */
35 @TableField("BSM_ARCHIVES")
36 private String bsmArchives;
37
38 /**
39 * 业务号
40 */
41 @TableField("YWH")
42 private String ywh;
43
44 /**
45 * 登记类型
46 */
47 @TableField("DJLX")
48 private String djlx;
49
50 /**
51 * 权利类型
52 */
53 @TableField("QLLX")
54 private String qllx;
55
56 /**
57 * 登记机构编码
58 */
59 @TableField("DJJGBM")
60 private String djjgbm;
61
62 /**
63 * 登记机构名称
64 */
65 @TableField("DJJGMC")
66 private String djjgmc;
67
68
69 }
1 package com.pashanhoo.business.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案业务信息新增请求实体
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案业务信息新增请求实体")
20 public class AddDgBusinessRequest implements Serializable {
21
22 private static final long serialVersionUID = 1L;
23
24
25 /**
26 * 档案标识码
27 */
28 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
29 private String bsmArchives;
30
31 /**
32 * 业务号
33 */
34 @ApiModelProperty(name = "ywh", value = "业务号")
35 private String ywh;
36
37 /**
38 * 登记类型
39 */
40 @ApiModelProperty(name = "djlx", value = "登记类型")
41 private String djlx;
42
43 /**
44 * 权利类型
45 */
46 @ApiModelProperty(name = "qllx", value = "权利类型")
47 private String qllx;
48
49 /**
50 * 登记机构编码
51 */
52 @ApiModelProperty(name = "djjgbm", value = "登记机构编码")
53 private String djjgbm;
54
55 /**
56 * 登记机构名称
57 */
58 @ApiModelProperty(name = "djjgmc", value = "登记机构名称")
59 private String djjgmc;
60
61
62 }
1 package com.pashanhoo.business.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案业务信息明细实体
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案业务信息明细实体")
20 public class DgBusinessDetailVO implements Serializable {
21
22 private static final long serialVersionUID = 1L;
23
24 /**
25 * 业务标识码
26 */
27 @ApiModelProperty(name = "bsmBusiness", value = "业务标识码")
28 private String bsmBusiness;
29
30 /**
31 * 档案标识码
32 */
33 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
34 private String bsmArchives;
35
36 /**
37 * 业务号
38 */
39 @ApiModelProperty(name = "ywh", value = "业务号")
40 private String ywh;
41
42 /**
43 * 登记类型
44 */
45 @ApiModelProperty(name = "djlx", value = "登记类型")
46 private String djlx;
47
48 /**
49 * 权利类型
50 */
51 @ApiModelProperty(name = "qllx", value = "权利类型")
52 private String qllx;
53
54 /**
55 * 登记机构编码
56 */
57 @ApiModelProperty(name = "djjgbm", value = "登记机构编码")
58 private String djjgbm;
59
60 /**
61 * 登记机构名称
62 */
63 @ApiModelProperty(name = "djjgmc", value = "登记机构名称")
64 private String djjgmc;
65
66
67 }
1 package com.pashanhoo.business.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案业务信息列表VO
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案业务信息列表VO")
20 //TODO 该类属性暂时是完整的全部属性,需进行个性化的增删
21 public class DgBusinessListVO implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25 /**
26 * 业务标识码
27 */
28 @ApiModelProperty(name = "bsmBusiness", value = "业务标识码")
29 private String bsmBusiness;
30
31 /**
32 * 档案标识码
33 */
34 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
35 private String bsmArchives;
36
37 /**
38 * 业务号
39 */
40 @ApiModelProperty(name = "ywh", value = "业务号")
41 private String ywh;
42
43 /**
44 * 登记类型
45 */
46 @ApiModelProperty(name = "djlx", value = "登记类型")
47 private String djlx;
48
49 /**
50 * 权利类型
51 */
52 @ApiModelProperty(name = "qllx", value = "权利类型")
53 private String qllx;
54
55 /**
56 * 登记机构编码
57 */
58 @ApiModelProperty(name = "djjgbm", value = "登记机构编码")
59 private String djjgbm;
60
61 /**
62 * 登记机构名称
63 */
64 @ApiModelProperty(name = "djjgmc", value = "登记机构名称")
65 private String djjgmc;
66
67
68 }
1 package com.pashanhoo.business.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8 import com.pashanhoo.common.PageInfo;
9
10 /**
11 * <p>
12 * 档案业务信息列表查询请求实体
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案业务信息列表查询请求实体")
21 //TODO 初始查询条件是全部,需要根据情况自行删减
22 public class DgBusinessSearchRequest extends PageInfo implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * 业务标识码
28 */
29 @ApiModelProperty(name = "bsmBusiness", value = "业务标识码")
30 private String bsmBusiness;
31
32 /**
33 * 档案标识码
34 */
35 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
36 private String bsmArchives;
37
38 /**
39 * 业务号
40 */
41 @ApiModelProperty(name = "ywh", value = "业务号")
42 private String ywh;
43
44 /**
45 * 登记类型
46 */
47 @ApiModelProperty(name = "djlx", value = "登记类型")
48 private String djlx;
49
50 /**
51 * 权利类型
52 */
53 @ApiModelProperty(name = "qllx", value = "权利类型")
54 private String qllx;
55
56 /**
57 * 登记机构编码
58 */
59 @ApiModelProperty(name = "djjgbm", value = "登记机构编码")
60 private String djjgbm;
61
62 /**
63 * 登记机构名称
64 */
65 @ApiModelProperty(name = "djjgmc", value = "登记机构名称")
66 private String djjgmc;
67
68
69 }
1 package com.pashanhoo.business.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案业务信息修改请求实体
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案业务信息修改请求实体")
20 public class UpdateDgBusinessRequest implements Serializable {
21
22 private static final long serialVersionUID = 1L;
23
24 /**
25 * 业务标识码
26 */
27 @ApiModelProperty(name = "bsmBusiness", value = "业务标识码")
28 private String bsmBusiness;
29
30 /**
31 * 档案标识码
32 */
33 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
34 private String bsmArchives;
35
36 /**
37 * 业务号
38 */
39 @ApiModelProperty(name = "ywh", value = "业务号")
40 private String ywh;
41
42 /**
43 * 登记类型
44 */
45 @ApiModelProperty(name = "djlx", value = "登记类型")
46 private String djlx;
47
48 /**
49 * 权利类型
50 */
51 @ApiModelProperty(name = "qllx", value = "权利类型")
52 private String qllx;
53
54 /**
55 * 登记机构编码
56 */
57 @ApiModelProperty(name = "djjgbm", value = "登记机构编码")
58 private String djjgbm;
59
60 /**
61 * 登记机构名称
62 */
63 @ApiModelProperty(name = "djjgmc", value = "登记机构名称")
64 private String djjgmc;
65
66
67 }
1 package com.pashanhoo.business.mapper;
2
3
4 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 import com.pashanhoo.business.entity.DgBusinessDO;
6
7 /**
8 * <p>
9 * 档案业务信息 Mapper 接口
10 * </p>
11 *
12 * @author
13 * @since 2021-11-05
14 */
15 public interface DgBusinessMapper extends BaseMapper<DgBusinessDO> {
16
17 }
1 package com.pashanhoo.business.service;
2
3
4 import com.pashanhoo.business.entity.DgBusinessDO;
5 import com.pashanhoo.business.entity.vo.AddDgBusinessRequest;
6 import com.pashanhoo.business.entity.vo.DgBusinessDetailVO;
7 import com.pashanhoo.business.entity.vo.UpdateDgBusinessRequest;
8 import com.pashanhoo.business.entity.vo.DgBusinessSearchRequest;
9 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
10 import com.baomidou.mybatisplus.extension.service.IService;
11
12 /**
13 * <p>
14 * 档案业务信息 服务类
15 * </p>
16 *
17 * @author
18 * @since 2021-11-05
19 */
20 public interface DgBusinessService extends IService<DgBusinessDO> {
21 /**
22 * 新增记录
23 * @param request
24 * @return
25 */
26 boolean insertDgBusiness(AddDgBusinessRequest request);
27
28 /**
29 * 根据主键查询记录详情
30 * @param id
31 * @return
32 */
33 DgBusinessDetailVO getDgBusinessDetailById(String id);
34
35 /**
36 * 修改单条记录
37 * @param request
38 * @return
39 */
40 boolean updateDgBusiness(UpdateDgBusinessRequest request);
41
42 /**
43 * 根据条件进行列表查询
44 * @param request
45 * @return
46 */
47 Page searchDgBusinessList(DgBusinessSearchRequest request);
48 }
1 package com.pashanhoo.business.service.impl;
2
3 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4 import com.pashanhoo.business.entity.DgBusinessConverter;
5 import com.pashanhoo.business.entity.DgBusinessDO;
6 import com.pashanhoo.business.entity.vo.AddDgBusinessRequest;
7 import com.pashanhoo.business.entity.vo.DgBusinessDetailVO;
8 import com.pashanhoo.business.entity.vo.UpdateDgBusinessRequest;
9 import com.pashanhoo.business.entity.vo.DgBusinessSearchRequest;
10 import com.pashanhoo.business.mapper.DgBusinessMapper;
11 import com.pashanhoo.business.service.DgBusinessService;
12 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.stereotype.Service;
14
15 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
16 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
17
18 /**
19 * <p>
20 * 档案业务信息 服务实现类
21 * </p>
22 *
23 * @author
24 * @since 2021-11-05
25 */
26 @Service
27 public class DgBusinessServiceImpl extends ServiceImpl<DgBusinessMapper, DgBusinessDO> implements DgBusinessService {
28
29 @Autowired
30 private DgBusinessConverter dgbusinessConverter;
31
32 @Autowired
33 private DgBusinessMapper dgbusinessMapper;
34
35 /**
36 * 新增记录
37 * @param request
38 * @return
39 */
40 @Override
41 public boolean insertDgBusiness(AddDgBusinessRequest request) {
42 DgBusinessDO dgbusinessDO = dgbusinessConverter.addRequest2DO(request);
43 return this.save(dgbusinessDO);
44 }
45
46 /**
47 * 根据主键查询记录详情
48 * @param id
49 * @return
50 */
51 @Override
52 public DgBusinessDetailVO getDgBusinessDetailById(String id) {
53 DgBusinessDO dgbusinessDO = this.getById(id);
54 return dgbusinessConverter.do2DetailVO(dgbusinessDO);
55 }
56
57 /**
58 * 修改单条记录
59 * @param request
60 * @return
61 */
62 @Override
63 public boolean updateDgBusiness(UpdateDgBusinessRequest request) {
64 DgBusinessDO dgbusinessDO = dgbusinessConverter.updateRequest2DO(request);
65 return this.updateById(dgbusinessDO);
66 }
67
68 /**
69 * 根据条件进行列表查询
70 * @param request
71 * @return
72 */
73 @Override
74 public Page searchDgBusinessList(DgBusinessSearchRequest request) {
75 Page<DgBusinessDO> pageParam = new Page<DgBusinessDO>(request.getCurrentPage(), request.getPageSize());
76 QueryWrapper<DgBusinessDO> wrapper = new QueryWrapper<>();
77 //设置默认排序
78 wrapper = "desc".equals(request.getSortOrder()) ? wrapper.orderByDesc(request.getSortField()) : wrapper.orderByAsc(request.getSortField());
79
80 //TODO 根据当前情况设置wrapper条件
81
82 Page page = this.page(pageParam, wrapper);
83 //将查询出来的DO List转为 ListVO List并重新设置到page对象中,并返回page对象
84 return page.setRecords(dgbusinessConverter.doList2ListVOList(page.getRecords()));
85 }
86
87 }
1 package com.pashanhoo.catalog.controller;
2
3
4
5 import com.pashanhoo.catalog.entity.vo.AddDgArchivesCatalogRequest;
6 import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogSearchRequest;
7 import com.pashanhoo.catalog.entity.vo.UpdateDgArchivesCatalogRequest;
8 import com.pashanhoo.catalog.service.DgArchivesCatalogService;
9 import com.pashanhoo.common.Result;
10 import org.springframework.web.bind.annotation.RestController;
11 import org.springframework.web.bind.annotation.*;
12 import io.swagger.annotations.Api;
13 import io.swagger.annotations.ApiOperation;
14 import io.swagger.annotations.ApiParam;
15 import org.springframework.beans.factory.annotation.Autowired;
16
17 import java.util.List;
18
19 /**
20 * <p>
21 * 档案目录信息 前端控制器
22 * </p>
23 *
24 * @author
25 * @since 2021-11-05
26 */
27 @RestController
28 @RequestMapping("/system/dgArchivesCatalog/")
29 @Api(tags = "档案目录信息接口")
30 public class DgArchivesCatalogController {
31 @Autowired
32 private DgArchivesCatalogService dgarchivescatalogService;
33
34 @PostMapping("insertDgArchivesCatalog")
35 @ApiOperation("新增档案目录信息")
36 public Result insertDgArchivesCatalog(@RequestBody AddDgArchivesCatalogRequest request){
37 if(dgarchivescatalogService.insertDgArchivesCatalog(request)){
38 return Result.ok();
39 }
40 return Result.error("新增失败");
41 }
42
43 @DeleteMapping("deleteDgArchivesCatalogByIds")
44 @ApiOperation(value = "批量删除档案目录信息")
45 public Result deleteDgArchivesCatalogByIds(@ApiParam("档案目录信息ID列表") @RequestParam(value = "idList") List<String> idList) {
46 if(dgarchivescatalogService.removeByIds(idList)) {
47 return Result.ok("删除成功");
48 }
49 return Result.error("删除失败");
50 }
51
52 @PutMapping("updateDgArchivesCatalog")
53 @ApiOperation("修改档案目录信息")
54 public Result updateDgArchivesCatalog(@RequestBody UpdateDgArchivesCatalogRequest request){
55 if(dgarchivescatalogService.updateDgArchivesCatalog(request)) {
56 return Result.ok("修改成功");
57 }
58 return Result.error("修改失败");
59 }
60
61 @GetMapping("getDgArchivesCatalogDetailById")
62 @ApiOperation(value = "读取明细")
63 public Result getDgArchivesCatalogDetailById(@ApiParam("档案目录信息ID") @RequestParam String id){
64 return Result.ok(dgarchivescatalogService.getDgArchivesCatalogDetailById(id));
65 }
66
67 @PostMapping("search")
68 @ApiOperation(value = "根据条件进行列表查询")
69 public Result searchDgArchivesCatalogList(@RequestBody DgArchivesCatalogSearchRequest request) {
70 //TODO 默认排序条件设置
71 request.defaultFillPageProp("","");
72 return Result.ok(dgarchivescatalogService.searchDgArchivesCatalogList(request));
73 }
74 }
1 package com.pashanhoo.catalog.entity;
2
3 import java.util.List;
4
5 import com.pashanhoo.catalog.entity.vo.AddDgArchivesCatalogRequest;
6 import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogDetailVO;
7 import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogListVO;
8 import com.pashanhoo.catalog.entity.vo.UpdateDgArchivesCatalogRequest;
9 import org.mapstruct.Mapper;
10
11 /**
12 * @author
13 * @since 2021-11-05
14 */
15 @Mapper(componentModel = "spring")
16 public interface DgArchivesCatalogConverter{
17 DgArchivesCatalogDO addRequest2DO(AddDgArchivesCatalogRequest request);
18
19 DgArchivesCatalogDetailVO do2DetailVO(DgArchivesCatalogDO dgarchivescatalogDO);
20
21 DgArchivesCatalogDO updateRequest2DO(UpdateDgArchivesCatalogRequest request);
22
23 DgArchivesCatalogListVO do2ListVO(DgArchivesCatalogDO dgarchivescatalogDO);
24
25 List<DgArchivesCatalogListVO> doList2ListVOList(List<DgArchivesCatalogDO> dgarchivescatalogDOList);
26 }
1 package com.pashanhoo.catalog.entity;
2
3 import com.baomidou.mybatisplus.annotation.TableName;
4 import com.baomidou.mybatisplus.annotation.IdType;
5 import com.baomidou.mybatisplus.annotation.TableId;
6 import com.baomidou.mybatisplus.annotation.TableField;
7 import java.io.Serializable;
8 import lombok.Data;
9 import lombok.EqualsAndHashCode;
10
11 /**
12 * <p>
13 * 档案目录信息
14 * </p>
15 *
16 * @author
17 * @since 2021-11-05
18 */
19 @Data
20 @EqualsAndHashCode(callSuper = false)
21 @TableName("DG_ARCHIVES_CATALOG")
22 public class DgArchivesCatalogDO implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * 目录标识码
28 */
29 @TableId(value = "BSM_CATALOG", type = IdType.UUID)
30 private String bsmCatalog;
31
32 /**
33 * 档案标识码
34 */
35 @TableField("BSM_ARCHIVES")
36 private String bsmArchives;
37
38 /**
39 * 序号
40 */
41 @TableField("XH")
42 private String xh;
43
44 /**
45 * 材料编码
46 */
47 @TableField("WJBM")
48 private String wjbm;
49
50 /**
51 * 材料名称
52 */
53 @TableField("WJMC")
54 private String wjmc;
55
56 /**
57 * 材料类型编码
58 */
59 @TableField("CLLXBM")
60 private String cllxbm;
61
62 /**
63 * 材料类型名称
64 */
65 @TableField("CLLXMC")
66 private String cllxmc;
67
68 /**
69 * 页数
70 */
71 @TableField("YS")
72 private String ys;
73
74 /**
75 * 页号
76 */
77 @TableField("YH")
78 private String yh;
79
80 /**
81 * 份数
82 */
83 @TableField("FS")
84 private String fs;
85
86 /**
87 * 文号
88 */
89 @TableField("WH")
90 private String wh;
91
92 /**
93 * 备注
94 */
95 @TableField("BZ")
96 private String bz;
97
98
99 }
1 package com.pashanhoo.catalog.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案目录信息新增请求实体
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案目录信息新增请求实体")
20 public class AddDgArchivesCatalogRequest implements Serializable {
21
22 private static final long serialVersionUID = 1L;
23
24
25 /**
26 * 档案标识码
27 */
28 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
29 private String bsmArchives;
30
31 /**
32 * 序号
33 */
34 @ApiModelProperty(name = "xh", value = "序号")
35 private String xh;
36
37 /**
38 * 材料编码
39 */
40 @ApiModelProperty(name = "wjbm", value = "材料编码")
41 private String wjbm;
42
43 /**
44 * 材料名称
45 */
46 @ApiModelProperty(name = "wjmc", value = "材料名称")
47 private String wjmc;
48
49 /**
50 * 材料类型编码
51 */
52 @ApiModelProperty(name = "cllxbm", value = "材料类型编码")
53 private String cllxbm;
54
55 /**
56 * 材料类型名称
57 */
58 @ApiModelProperty(name = "cllxmc", value = "材料类型名称")
59 private String cllxmc;
60
61 /**
62 * 页数
63 */
64 @ApiModelProperty(name = "ys", value = "页数")
65 private String ys;
66
67 /**
68 * 页号
69 */
70 @ApiModelProperty(name = "yh", value = "页号")
71 private String yh;
72
73 /**
74 * 份数
75 */
76 @ApiModelProperty(name = "fs", value = "份数")
77 private String fs;
78
79 /**
80 * 文号
81 */
82 @ApiModelProperty(name = "wh", value = "文号")
83 private String wh;
84
85 /**
86 * 备注
87 */
88 @ApiModelProperty(name = "bz", value = "备注")
89 private String bz;
90
91
92 }
1 package com.pashanhoo.catalog.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案目录信息明细实体
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案目录信息明细实体")
20 public class DgArchivesCatalogDetailVO implements Serializable {
21
22 private static final long serialVersionUID = 1L;
23
24 /**
25 * 目录标识码
26 */
27 @ApiModelProperty(name = "bsmCatalog", value = "目录标识码")
28 private String bsmCatalog;
29
30 /**
31 * 档案标识码
32 */
33 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
34 private String bsmArchives;
35
36 /**
37 * 序号
38 */
39 @ApiModelProperty(name = "xh", value = "序号")
40 private String xh;
41
42 /**
43 * 材料编码
44 */
45 @ApiModelProperty(name = "wjbm", value = "材料编码")
46 private String wjbm;
47
48 /**
49 * 材料名称
50 */
51 @ApiModelProperty(name = "wjmc", value = "材料名称")
52 private String wjmc;
53
54 /**
55 * 材料类型编码
56 */
57 @ApiModelProperty(name = "cllxbm", value = "材料类型编码")
58 private String cllxbm;
59
60 /**
61 * 材料类型名称
62 */
63 @ApiModelProperty(name = "cllxmc", value = "材料类型名称")
64 private String cllxmc;
65
66 /**
67 * 页数
68 */
69 @ApiModelProperty(name = "ys", value = "页数")
70 private String ys;
71
72 /**
73 * 页号
74 */
75 @ApiModelProperty(name = "yh", value = "页号")
76 private String yh;
77
78 /**
79 * 份数
80 */
81 @ApiModelProperty(name = "fs", value = "份数")
82 private String fs;
83
84 /**
85 * 文号
86 */
87 @ApiModelProperty(name = "wh", value = "文号")
88 private String wh;
89
90 /**
91 * 备注
92 */
93 @ApiModelProperty(name = "bz", value = "备注")
94 private String bz;
95
96
97 }
1 package com.pashanhoo.catalog.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案目录信息列表VO
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案目录信息列表VO")
20 //TODO 该类属性暂时是完整的全部属性,需进行个性化的增删
21 public class DgArchivesCatalogListVO implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25 /**
26 * 目录标识码
27 */
28 @ApiModelProperty(name = "bsmCatalog", value = "目录标识码")
29 private String bsmCatalog;
30
31 /**
32 * 档案标识码
33 */
34 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
35 private String bsmArchives;
36
37 /**
38 * 序号
39 */
40 @ApiModelProperty(name = "xh", value = "序号")
41 private String xh;
42
43 /**
44 * 材料编码
45 */
46 @ApiModelProperty(name = "wjbm", value = "材料编码")
47 private String wjbm;
48
49 /**
50 * 材料名称
51 */
52 @ApiModelProperty(name = "wjmc", value = "材料名称")
53 private String wjmc;
54
55 /**
56 * 材料类型编码
57 */
58 @ApiModelProperty(name = "cllxbm", value = "材料类型编码")
59 private String cllxbm;
60
61 /**
62 * 材料类型名称
63 */
64 @ApiModelProperty(name = "cllxmc", value = "材料类型名称")
65 private String cllxmc;
66
67 /**
68 * 页数
69 */
70 @ApiModelProperty(name = "ys", value = "页数")
71 private String ys;
72
73 /**
74 * 页号
75 */
76 @ApiModelProperty(name = "yh", value = "页号")
77 private String yh;
78
79 /**
80 * 份数
81 */
82 @ApiModelProperty(name = "fs", value = "份数")
83 private String fs;
84
85 /**
86 * 文号
87 */
88 @ApiModelProperty(name = "wh", value = "文号")
89 private String wh;
90
91 /**
92 * 备注
93 */
94 @ApiModelProperty(name = "bz", value = "备注")
95 private String bz;
96
97
98 }
1 package com.pashanhoo.catalog.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8 import com.pashanhoo.common.PageInfo;
9
10 /**
11 * <p>
12 * 档案目录信息列表查询请求实体
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案目录信息列表查询请求实体")
21 //TODO 初始查询条件是全部,需要根据情况自行删减
22 public class DgArchivesCatalogSearchRequest extends PageInfo implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * 目录标识码
28 */
29 @ApiModelProperty(name = "bsmCatalog", value = "目录标识码")
30 private String bsmCatalog;
31
32 /**
33 * 档案标识码
34 */
35 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
36 private String bsmArchives;
37
38 /**
39 * 序号
40 */
41 @ApiModelProperty(name = "xh", value = "序号")
42 private String xh;
43
44 /**
45 * 材料编码
46 */
47 @ApiModelProperty(name = "wjbm", value = "材料编码")
48 private String wjbm;
49
50 /**
51 * 材料名称
52 */
53 @ApiModelProperty(name = "wjmc", value = "材料名称")
54 private String wjmc;
55
56 /**
57 * 材料类型编码
58 */
59 @ApiModelProperty(name = "cllxbm", value = "材料类型编码")
60 private String cllxbm;
61
62 /**
63 * 材料类型名称
64 */
65 @ApiModelProperty(name = "cllxmc", value = "材料类型名称")
66 private String cllxmc;
67
68 /**
69 * 页数
70 */
71 @ApiModelProperty(name = "ys", value = "页数")
72 private String ys;
73
74 /**
75 * 页号
76 */
77 @ApiModelProperty(name = "yh", value = "页号")
78 private String yh;
79
80 /**
81 * 份数
82 */
83 @ApiModelProperty(name = "fs", value = "份数")
84 private String fs;
85
86 /**
87 * 文号
88 */
89 @ApiModelProperty(name = "wh", value = "文号")
90 private String wh;
91
92 /**
93 * 备注
94 */
95 @ApiModelProperty(name = "bz", value = "备注")
96 private String bz;
97
98
99 }
1 package com.pashanhoo.catalog.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案目录信息修改请求实体
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案目录信息修改请求实体")
20 public class UpdateDgArchivesCatalogRequest implements Serializable {
21
22 private static final long serialVersionUID = 1L;
23
24 /**
25 * 目录标识码
26 */
27 @ApiModelProperty(name = "bsmCatalog", value = "目录标识码")
28 private String bsmCatalog;
29
30 /**
31 * 档案标识码
32 */
33 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
34 private String bsmArchives;
35
36 /**
37 * 序号
38 */
39 @ApiModelProperty(name = "xh", value = "序号")
40 private String xh;
41
42 /**
43 * 材料编码
44 */
45 @ApiModelProperty(name = "wjbm", value = "材料编码")
46 private String wjbm;
47
48 /**
49 * 材料名称
50 */
51 @ApiModelProperty(name = "wjmc", value = "材料名称")
52 private String wjmc;
53
54 /**
55 * 材料类型编码
56 */
57 @ApiModelProperty(name = "cllxbm", value = "材料类型编码")
58 private String cllxbm;
59
60 /**
61 * 材料类型名称
62 */
63 @ApiModelProperty(name = "cllxmc", value = "材料类型名称")
64 private String cllxmc;
65
66 /**
67 * 页数
68 */
69 @ApiModelProperty(name = "ys", value = "页数")
70 private String ys;
71
72 /**
73 * 页号
74 */
75 @ApiModelProperty(name = "yh", value = "页号")
76 private String yh;
77
78 /**
79 * 份数
80 */
81 @ApiModelProperty(name = "fs", value = "份数")
82 private String fs;
83
84 /**
85 * 文号
86 */
87 @ApiModelProperty(name = "wh", value = "文号")
88 private String wh;
89
90 /**
91 * 备注
92 */
93 @ApiModelProperty(name = "bz", value = "备注")
94 private String bz;
95
96
97 }
1 package com.pashanhoo.catalog.mapper;
2
3
4 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 import com.pashanhoo.catalog.entity.DgArchivesCatalogDO;
6
7 /**
8 * <p>
9 * 档案目录信息 Mapper 接口
10 * </p>
11 *
12 * @author
13 * @since 2021-11-05
14 */
15 public interface DgArchivesCatalogMapper extends BaseMapper<DgArchivesCatalogDO> {
16
17 }
1 package com.pashanhoo.catalog.service;
2
3
4 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 import com.baomidou.mybatisplus.extension.service.IService;
6 import com.pashanhoo.catalog.entity.*;
7 import com.pashanhoo.catalog.entity.vo.AddDgArchivesCatalogRequest;
8 import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogDetailVO;
9 import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogSearchRequest;
10 import com.pashanhoo.catalog.entity.vo.UpdateDgArchivesCatalogRequest;
11
12 /**
13 * <p>
14 * 档案目录信息 服务类
15 * </p>
16 *
17 * @author
18 * @since 2021-11-05
19 */
20 public interface DgArchivesCatalogService extends IService<DgArchivesCatalogDO> {
21 /**
22 * 新增记录
23 * @param request
24 * @return
25 */
26 boolean insertDgArchivesCatalog(AddDgArchivesCatalogRequest request);
27
28 /**
29 * 根据主键查询记录详情
30 * @param id
31 * @return
32 */
33 DgArchivesCatalogDetailVO getDgArchivesCatalogDetailById(String id);
34
35 /**
36 * 修改单条记录
37 * @param request
38 * @return
39 */
40 boolean updateDgArchivesCatalog(UpdateDgArchivesCatalogRequest request);
41
42 /**
43 * 根据条件进行列表查询
44 * @param request
45 * @return
46 */
47 Page searchDgArchivesCatalogList(DgArchivesCatalogSearchRequest request);
48 }
1 package com.pashanhoo.catalog.service.impl;
2
3
4 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5 import com.pashanhoo.catalog.entity.*;
6 import com.pashanhoo.catalog.entity.vo.AddDgArchivesCatalogRequest;
7 import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogDetailVO;
8 import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogSearchRequest;
9 import com.pashanhoo.catalog.entity.vo.UpdateDgArchivesCatalogRequest;
10 import com.pashanhoo.catalog.mapper.DgArchivesCatalogMapper;
11 import com.pashanhoo.catalog.service.DgArchivesCatalogService;
12 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.stereotype.Service;
14
15 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
16 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
17
18 /**
19 * <p>
20 * 档案目录信息 服务实现类
21 * </p>
22 *
23 * @author
24 * @since 2021-11-05
25 */
26 @Service
27 public class DgArchivesCatalogServiceImpl extends ServiceImpl<DgArchivesCatalogMapper, DgArchivesCatalogDO> implements DgArchivesCatalogService {
28
29 @Autowired
30 private DgArchivesCatalogConverter dgarchivescatalogConverter;
31
32 @Autowired
33 private DgArchivesCatalogMapper dgarchivescatalogMapper;
34
35 /**
36 * 新增记录
37 * @param request
38 * @return
39 */
40 @Override
41 public boolean insertDgArchivesCatalog(AddDgArchivesCatalogRequest request) {
42 DgArchivesCatalogDO dgarchivescatalogDO = dgarchivescatalogConverter.addRequest2DO(request);
43 return this.save(dgarchivescatalogDO);
44 }
45
46 /**
47 * 根据主键查询记录详情
48 * @param id
49 * @return
50 */
51 @Override
52 public DgArchivesCatalogDetailVO getDgArchivesCatalogDetailById(String id) {
53 DgArchivesCatalogDO dgarchivescatalogDO = this.getById(id);
54 return dgarchivescatalogConverter.do2DetailVO(dgarchivescatalogDO);
55 }
56
57 /**
58 * 修改单条记录
59 * @param request
60 * @return
61 */
62 @Override
63 public boolean updateDgArchivesCatalog(UpdateDgArchivesCatalogRequest request) {
64 DgArchivesCatalogDO dgarchivescatalogDO = dgarchivescatalogConverter.updateRequest2DO(request);
65 return this.updateById(dgarchivescatalogDO);
66 }
67
68 /**
69 * 根据条件进行列表查询
70 * @param request
71 * @return
72 */
73 @Override
74 public Page searchDgArchivesCatalogList(DgArchivesCatalogSearchRequest request) {
75 Page<DgArchivesCatalogDO> pageParam = new Page<DgArchivesCatalogDO>(request.getCurrentPage(), request.getPageSize());
76 QueryWrapper<DgArchivesCatalogDO> wrapper = new QueryWrapper<>();
77 //设置默认排序
78 wrapper = "desc".equals(request.getSortOrder()) ? wrapper.orderByDesc(request.getSortField()) : wrapper.orderByAsc(request.getSortField());
79
80 //TODO 根据当前情况设置wrapper条件
81
82 Page page = this.page(pageParam, wrapper);
83 //将查询出来的DO List转为 ListVO List并重新设置到page对象中,并返回page对象
84 return page.setRecords(dgarchivescatalogConverter.doList2ListVOList(page.getRecords()));
85 }
86
87 }
...@@ -39,8 +39,8 @@ public class CodeGenerator { ...@@ -39,8 +39,8 @@ public class CodeGenerator {
39 DataSourceConfig dsc = new DataSourceConfig(); 39 DataSourceConfig dsc = new DataSourceConfig();
40 dsc.setUrl("jdbc:oracle:thin:@192.168.2.218:1521:orcl"); 40 dsc.setUrl("jdbc:oracle:thin:@192.168.2.218:1521:orcl");
41 dsc.setDriverName("oracle.jdbc.driver.OracleDriver"); 41 dsc.setDriverName("oracle.jdbc.driver.OracleDriver");
42 dsc.setUsername("bdcdjsb"); 42 dsc.setUsername("dangan1");
43 dsc.setPassword("bdcdjsb"); 43 dsc.setPassword("dangan1");
44 dsc.setDbType(DbType.ORACLE); 44 dsc.setDbType(DbType.ORACLE);
45 mpg.setDataSource(dsc); 45 mpg.setDataSource(dsc);
46 //3、包的配置 46 //3、包的配置
...@@ -71,7 +71,7 @@ public class CodeGenerator { ...@@ -71,7 +71,7 @@ public class CodeGenerator {
71 //4、策略配置 71 //4、策略配置
72 StrategyConfig strategy = new StrategyConfig(); 72 StrategyConfig strategy = new StrategyConfig();
73 // 设置要映射的表名 73 // 设置要映射的表名
74 strategy.setInclude("DJF_DJ_SJ"); 74 strategy.setInclude("DG_RECEIVE");
75 strategy.setNaming(NamingStrategy.underline_to_camel); 75 strategy.setNaming(NamingStrategy.underline_to_camel);
76 strategy.setColumnNaming(NamingStrategy.underline_to_camel); 76 strategy.setColumnNaming(NamingStrategy.underline_to_camel);
77 // 自动lombok; 77 // 自动lombok;
......
1 package com.pashanhoo.common.util;
2
3 import polaris.fileattachment.AttachmentService;
4 import polaris.fileattachment.models.FileUrl;
5
6 import javax.annotation.Resource;
7 import java.text.SimpleDateFormat;
8 import java.util.Date;
9 import java.util.regex.Matcher;
10 import java.util.regex.Pattern;
11
12 public class FileAttachmentUtil {
13 private static final String FILE_URL_PATTERN = "^[^\\\\/:*?\"<>|\r\n]+?:[^\\\\/:*?\"<>|\r\n]+(/[^\\\\/:*?\"<>|\r\n]+)*$";
14 private static final Pattern DIRECTORY_NAME_PATTERN = Pattern.compile("([^/]*)[/]?$");
15 private static final Pattern SERVER_REGEX = Pattern.compile("^[^\\\\/:*?\"<>|\r\n]+?:");
16 private static final Pattern FILE_REGEX = Pattern.compile("[/:]([^\\\\/:*?\"<>|\r\n]+)$");
17
18 @Resource
19 private AttachmentService attachmentService;
20
21 public FileAttachmentUtil() {
22 }
23
24 public static FileUrl parseFileUrl(String fileUrl) throws RuntimeException {
25 int index1 = 0;
26 int index2 = 0;
27 if (fileUrl != null && fileUrl.matches(FILE_URL_PATTERN)) {
28 Matcher regexMatcher = SERVER_REGEX.matcher(fileUrl);
29 if (regexMatcher.find()) {
30 index1 = regexMatcher.end();
31 }
32 regexMatcher = FILE_REGEX.matcher(fileUrl);
33 if (regexMatcher.find()) {
34 index2 = regexMatcher.start(1);
35 }
36 if (index1 != 0 && index2 != 0 && index1 <= index2) {
37 return new FileUrl(fileUrl.substring(0, index1 - 1), fileUrl.substring(index1, index2), fileUrl.substring(index2));
38 } else {
39 throw new RuntimeException("附件url格式错误,fileUrl = " + fileUrl);
40 }
41 } else {
42 throw new RuntimeException("附件url格式错误,fileUrl = " + (fileUrl == null ? "null" : fileUrl));
43 }
44 }
45
46 public static String getServerNameFromFileUrl(String fileUrl) {
47 if (fileUrl != null && fileUrl.matches(FILE_URL_PATTERN)) {
48 Matcher regexMatcher = SERVER_REGEX.matcher(fileUrl);
49 if (regexMatcher.find()) {
50 int index = regexMatcher.end();
51 return fileUrl.substring(0, index - 1);
52 }
53 }
54 throw new RuntimeException("附件url格式错误,fileUrl = " + (fileUrl == null ? "null" : fileUrl));
55 }
56
57 public static String generateFileUrl(String serverName, String path, String fileId) throws RuntimeException {
58 if (serverName != null && !serverName.isEmpty()) {
59 if (path != null && !path.isEmpty()) {
60 if (fileId != null && !fileId.isEmpty()) {
61 StringBuilder result = new StringBuilder();
62 result.append(serverName);
63 result.append(":");
64 result.append(path);
65 if (!path.endsWith("/")) {
66 result.append("/");
67 }
68 result.append(fileId);
69 return result.toString();
70 } else {
71 throw new RuntimeException("创建附件服务器自定义格式的FileUrl地址时附件名称(ID)为null");
72 }
73 } else {
74 throw new RuntimeException("创建附件服务器自定义格式的FileUrl地址时附件路径为null");
75 }
76 } else {
77 throw new RuntimeException("创建附件服务器自定义格式的FileUrl地址时附件服务器名为null");
78 }
79 }
80
81 public static boolean isFileUrl(String fileUrl) {
82 return fileUrl.matches(FILE_URL_PATTERN);
83 }
84
85 public static String getParentPath(String path) {
86 Matcher m = DIRECTORY_NAME_PATTERN.matcher(path);
87 m.find();
88 return m.replaceAll("");
89 }
90
91 public static String getPathName(String path) {
92 Matcher m = DIRECTORY_NAME_PATTERN.matcher(path);
93 m.find();
94 return m.group(1);
95 }
96
97 public static String getSavePath(String bsm) {
98 String date = new SimpleDateFormat("yyyyMMdd").format(new Date());
99 String path = filterString(bsm);
100 return date + "/" + path;
101 }
102
103 public static String filterString(String str) {
104 StringBuffer s = new StringBuffer(str.length());
105 for (int i = 0; i < str.length(); i++) {
106 if (!hasFullChar(String.valueOf(str.charAt(i)))) {
107 s.append(str.charAt(i));
108 }
109 }
110 return s.toString();
111 }
112
113 public static boolean hasFullChar(String str) {
114 return str.getBytes().length != str.length();
115 }
116
117 public static String getFileNameNoEx(String filename) {
118 if ((filename != null) && (filename.length() > 0)) {
119 int dot = filename.lastIndexOf('.');
120 if ((dot > -1) && (dot < (filename.length()))) {
121 return filename.substring(0, dot);
122 }
123 }
124 return filename;
125 }
126 }
1 package com.pashanhoo.common.util;
2
3 import lombok.Data;
4 import org.springframework.boot.context.properties.ConfigurationProperties;
5 import org.springframework.stereotype.Component;
6
7 /**
8 * minio配置类
9 */
10 @Data
11 @Component
12 @ConfigurationProperties(prefix = "minio.params")
13 public class MinioConfig {
14 /**
15 * 链接类型
16 */
17 private String type;
18 /**
19 * 桶名称
20 */
21 private String bucket;
22 /**
23 * 服务地址
24 */
25 private String endpoint;
26 /**
27 * 端口
28 */
29 private String port;
30 /**
31 * 用户
32 */
33 private String accessKeyId;
34 /**
35 * 密码
36 */
37 private String accessKeySecret;
38 }
1 package com.pashanhoo.destroy.controller;
2
3
4 import com.pashanhoo.common.Result;
5 import com.pashanhoo.destroy.entity.vo.AddDgArchivesDestructionRequest;
6 import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionSearchRequest;
7 import com.pashanhoo.destroy.entity.vo.UpdateDgArchivesDestructionRequest;
8 import com.pashanhoo.destroy.service.DgArchivesDestructionService;
9 import org.springframework.web.bind.annotation.RestController;
10 import org.springframework.web.bind.annotation.*;
11 import io.swagger.annotations.Api;
12 import io.swagger.annotations.ApiOperation;
13 import io.swagger.annotations.ApiParam;
14 import org.springframework.beans.factory.annotation.Autowired;
15
16 import java.util.List;
17
18 /**
19 * <p>
20 * 档案销毁 前端控制器
21 * </p>
22 *
23 * @author
24 * @since 2021-11-05
25 */
26 @RestController
27 @RequestMapping("/system/dgArchivesDestruction/")
28 @Api(tags = "档案销毁接口")
29 public class DgArchivesDestructionController {
30 @Autowired
31 private DgArchivesDestructionService dgarchivesdestructionService;
32
33 @PostMapping("insertDgArchivesDestruction")
34 @ApiOperation("新增档案销毁")
35 public Result insertDgArchivesDestruction(@RequestBody AddDgArchivesDestructionRequest request) {
36 if (dgarchivesdestructionService.insertDgArchivesDestruction(request)) {
37 return Result.ok();
38 }
39 return Result.error("新增失败");
40 }
41
42 @DeleteMapping("deleteDgArchivesDestructionByIds")
43 @ApiOperation(value = "批量删除档案销毁")
44 public Result deleteDgArchivesDestructionByIds(@ApiParam("档案销毁ID列表") @RequestParam(value = "idList") List<String> idList) {
45 if (dgarchivesdestructionService.removeByIds(idList)) {
46 return Result.ok("删除成功");
47 }
48 return Result.error("删除失败");
49 }
50
51 @PutMapping("updateDgArchivesDestruction")
52 @ApiOperation("修改档案销毁")
53 public Result updateDgArchivesDestruction(@RequestBody UpdateDgArchivesDestructionRequest request) {
54 if (dgarchivesdestructionService.updateDgArchivesDestruction(request)) {
55 return Result.ok("修改成功");
56 }
57 return Result.error("修改失败");
58 }
59
60 @GetMapping("getDgArchivesDestructionDetailById")
61 @ApiOperation(value = "读取明细")
62 public Result getDgArchivesDestructionDetailById(@ApiParam("档案销毁ID") @RequestParam String id) {
63 return Result.ok(dgarchivesdestructionService.getDgArchivesDestructionDetailById(id));
64 }
65
66 @PostMapping("search")
67 @ApiOperation(value = "根据条件进行列表查询")
68 public Result searchDgArchivesDestructionList(@RequestBody DgArchivesDestructionSearchRequest request) {
69 //TODO 默认排序条件设置
70 request.defaultFillPageProp("", "");
71 return Result.ok(dgarchivesdestructionService.searchDgArchivesDestructionList(request));
72 }
73 }
1 package com.pashanhoo.destroy.entity;
2
3 import java.util.List;
4
5 import com.pashanhoo.destroy.entity.vo.AddDgArchivesDestructionRequest;
6 import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionDetailVO;
7 import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionListVO;
8 import com.pashanhoo.destroy.entity.vo.UpdateDgArchivesDestructionRequest;
9 import org.mapstruct.Mapper;
10
11 /**
12 * @author
13 * @since 2021-11-05
14 */
15 @Mapper(componentModel = "spring")
16 public interface DgArchivesDestructionConverter{
17 DgArchivesDestructionDO addRequest2DO(AddDgArchivesDestructionRequest request);
18
19 DgArchivesDestructionDetailVO do2DetailVO(DgArchivesDestructionDO dgarchivesdestructionDO);
20
21 DgArchivesDestructionDO updateRequest2DO(UpdateDgArchivesDestructionRequest request);
22
23 DgArchivesDestructionListVO do2ListVO(DgArchivesDestructionDO dgarchivesdestructionDO);
24
25 List<DgArchivesDestructionListVO> doList2ListVOList(List<DgArchivesDestructionDO> dgarchivesdestructionDOList);
26 }
1 package com.pashanhoo.destroy.entity;
2
3 import com.baomidou.mybatisplus.annotation.TableName;
4 import com.baomidou.mybatisplus.annotation.IdType;
5 import java.util.Date;
6 import com.baomidou.mybatisplus.annotation.TableId;
7 import com.baomidou.mybatisplus.annotation.TableField;
8 import java.io.Serializable;
9 import lombok.Data;
10 import lombok.EqualsAndHashCode;
11
12 /**
13 * <p>
14 * 档案销毁
15 * </p>
16 *
17 * @author
18 * @since 2021-11-05
19 */
20 @Data
21 @EqualsAndHashCode(callSuper = false)
22 @TableName("DG_ARCHIVES_DESTRUCTION")
23 public class DgArchivesDestructionDO implements Serializable {
24
25 private static final long serialVersionUID = 1L;
26
27 /**
28 * 销毁标识码
29 */
30 @TableId(value = "BSM_DESTRUCTION", type = IdType.UUID)
31 private String bsmDestruction;
32
33 /**
34 * 销毁清册编号
35 */
36 @TableField("XHQCBH")
37 private String xhqcbh;
38
39 /**
40 * 发起人
41 */
42 @TableField("FQR")
43 private String fqr;
44
45 /**
46 * 发起日期
47 */
48 @TableField("FQRQ")
49 private Date fqrq;
50
51 /**
52 * 销毁原因
53 */
54 @TableField("XHYY")
55 private String xhyy;
56
57 /**
58 * 审核人
59 */
60 @TableField("SHRY")
61 private String shry;
62
63 /**
64 * 审批意见
65 */
66 @TableField("SHYJ")
67 private String shyj;
68
69 /**
70 * 监销人
71 */
72 @TableField("XHR")
73 private String xhr;
74
75 /**
76 * 销毁日期
77 */
78 @TableField("XHRQ")
79 private Date xhrq;
80
81
82 }
1 package com.pashanhoo.destroy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9
10 /**
11 * <p>
12 * 档案销毁新增请求实体
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案销毁新增请求实体")
21 public class AddDgArchivesDestructionRequest implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25
26 /**
27 * 销毁清册编号
28 */
29 @ApiModelProperty(name = "xhqcbh", value = "销毁清册编号")
30 private String xhqcbh;
31
32 /**
33 * 发起人
34 */
35 @ApiModelProperty(name = "fqr", value = "发起人")
36 private String fqr;
37
38 /**
39 * 发起日期
40 */
41 @ApiModelProperty(name = "fqrq", value = "发起日期")
42 private Date fqrq;
43
44 /**
45 * 销毁原因
46 */
47 @ApiModelProperty(name = "xhyy", value = "销毁原因")
48 private String xhyy;
49
50 /**
51 * 审核人
52 */
53 @ApiModelProperty(name = "shry", value = "审核人")
54 private String shry;
55
56 /**
57 * 审批意见
58 */
59 @ApiModelProperty(name = "shyj", value = "审批意见")
60 private String shyj;
61
62 /**
63 * 监销人
64 */
65 @ApiModelProperty(name = "xhr", value = "监销人")
66 private String xhr;
67
68 /**
69 * 销毁日期
70 */
71 @ApiModelProperty(name = "xhrq", value = "销毁日期")
72 private Date xhrq;
73
74
75 }
1 package com.pashanhoo.destroy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9
10 /**
11 * <p>
12 * 档案销毁明细实体
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案销毁明细实体")
21 public class DgArchivesDestructionDetailVO implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25 /**
26 * 销毁标识码
27 */
28 @ApiModelProperty(name = "bsmDestruction", value = "销毁标识码")
29 private String bsmDestruction;
30
31 /**
32 * 销毁清册编号
33 */
34 @ApiModelProperty(name = "xhqcbh", value = "销毁清册编号")
35 private String xhqcbh;
36
37 /**
38 * 发起人
39 */
40 @ApiModelProperty(name = "fqr", value = "发起人")
41 private String fqr;
42
43 /**
44 * 发起日期
45 */
46 @ApiModelProperty(name = "fqrq", value = "发起日期")
47 private Date fqrq;
48
49 /**
50 * 销毁原因
51 */
52 @ApiModelProperty(name = "xhyy", value = "销毁原因")
53 private String xhyy;
54
55 /**
56 * 审核人
57 */
58 @ApiModelProperty(name = "shry", value = "审核人")
59 private String shry;
60
61 /**
62 * 审批意见
63 */
64 @ApiModelProperty(name = "shyj", value = "审批意见")
65 private String shyj;
66
67 /**
68 * 监销人
69 */
70 @ApiModelProperty(name = "xhr", value = "监销人")
71 private String xhr;
72
73 /**
74 * 销毁日期
75 */
76 @ApiModelProperty(name = "xhrq", value = "销毁日期")
77 private Date xhrq;
78
79
80 }
1 package com.pashanhoo.destroy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9
10 /**
11 * <p>
12 * 档案销毁列表VO
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案销毁列表VO")
21 //TODO 该类属性暂时是完整的全部属性,需进行个性化的增删
22 public class DgArchivesDestructionListVO implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * 销毁标识码
28 */
29 @ApiModelProperty(name = "bsmDestruction", value = "销毁标识码")
30 private String bsmDestruction;
31
32 /**
33 * 销毁清册编号
34 */
35 @ApiModelProperty(name = "xhqcbh", value = "销毁清册编号")
36 private String xhqcbh;
37
38 /**
39 * 发起人
40 */
41 @ApiModelProperty(name = "fqr", value = "发起人")
42 private String fqr;
43
44 /**
45 * 发起日期
46 */
47 @ApiModelProperty(name = "fqrq", value = "发起日期")
48 private Date fqrq;
49
50 /**
51 * 销毁原因
52 */
53 @ApiModelProperty(name = "xhyy", value = "销毁原因")
54 private String xhyy;
55
56 /**
57 * 审核人
58 */
59 @ApiModelProperty(name = "shry", value = "审核人")
60 private String shry;
61
62 /**
63 * 审批意见
64 */
65 @ApiModelProperty(name = "shyj", value = "审批意见")
66 private String shyj;
67
68 /**
69 * 监销人
70 */
71 @ApiModelProperty(name = "xhr", value = "监销人")
72 private String xhr;
73
74 /**
75 * 销毁日期
76 */
77 @ApiModelProperty(name = "xhrq", value = "销毁日期")
78 private Date xhrq;
79
80
81 }
1 package com.pashanhoo.destroy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9 import com.pashanhoo.common.PageInfo;
10
11 /**
12 * <p>
13 * 档案销毁列表查询请求实体
14 * </p>
15 *
16 * @author
17 * @since 2021-11-05
18 */
19 @Data
20 @EqualsAndHashCode(callSuper = false)
21 @ApiModel(value="档案销毁列表查询请求实体")
22 //TODO 初始查询条件是全部,需要根据情况自行删减
23 public class DgArchivesDestructionSearchRequest extends PageInfo implements Serializable {
24
25 private static final long serialVersionUID = 1L;
26
27 /**
28 * 销毁标识码
29 */
30 @ApiModelProperty(name = "bsmDestruction", value = "销毁标识码")
31 private String bsmDestruction;
32
33 /**
34 * 销毁清册编号
35 */
36 @ApiModelProperty(name = "xhqcbh", value = "销毁清册编号")
37 private String xhqcbh;
38
39 /**
40 * 发起人
41 */
42 @ApiModelProperty(name = "fqr", value = "发起人")
43 private String fqr;
44
45 /**
46 * 发起日期
47 */
48 @ApiModelProperty(name = "fqrq", value = "发起日期")
49 private Date fqrq;
50
51 /**
52 * 销毁原因
53 */
54 @ApiModelProperty(name = "xhyy", value = "销毁原因")
55 private String xhyy;
56
57 /**
58 * 审核人
59 */
60 @ApiModelProperty(name = "shry", value = "审核人")
61 private String shry;
62
63 /**
64 * 审批意见
65 */
66 @ApiModelProperty(name = "shyj", value = "审批意见")
67 private String shyj;
68
69 /**
70 * 监销人
71 */
72 @ApiModelProperty(name = "xhr", value = "监销人")
73 private String xhr;
74
75 /**
76 * 销毁日期
77 */
78 @ApiModelProperty(name = "xhrq", value = "销毁日期")
79 private Date xhrq;
80
81
82 }
1 package com.pashanhoo.destroy.entity.vo;
2
3 import java.util.Date;
4 import java.io.Serializable;
5 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data;
8 import lombok.EqualsAndHashCode;
9
10 /**
11 * <p>
12 * 档案销毁修改请求实体
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案销毁修改请求实体")
21 public class UpdateDgArchivesDestructionRequest implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25 /**
26 * 销毁标识码
27 */
28 @ApiModelProperty(name = "bsmDestruction", value = "销毁标识码")
29 private String bsmDestruction;
30
31 /**
32 * 销毁清册编号
33 */
34 @ApiModelProperty(name = "xhqcbh", value = "销毁清册编号")
35 private String xhqcbh;
36
37 /**
38 * 发起人
39 */
40 @ApiModelProperty(name = "fqr", value = "发起人")
41 private String fqr;
42
43 /**
44 * 发起日期
45 */
46 @ApiModelProperty(name = "fqrq", value = "发起日期")
47 private Date fqrq;
48
49 /**
50 * 销毁原因
51 */
52 @ApiModelProperty(name = "xhyy", value = "销毁原因")
53 private String xhyy;
54
55 /**
56 * 审核人
57 */
58 @ApiModelProperty(name = "shry", value = "审核人")
59 private String shry;
60
61 /**
62 * 审批意见
63 */
64 @ApiModelProperty(name = "shyj", value = "审批意见")
65 private String shyj;
66
67 /**
68 * 监销人
69 */
70 @ApiModelProperty(name = "xhr", value = "监销人")
71 private String xhr;
72
73 /**
74 * 销毁日期
75 */
76 @ApiModelProperty(name = "xhrq", value = "销毁日期")
77 private Date xhrq;
78
79
80 }
1 package com.pashanhoo.destroy.mapper;
2
3
4 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 import com.pashanhoo.destroy.entity.DgArchivesDestructionDO;
6
7 /**
8 * <p>
9 * 档案销毁 Mapper 接口
10 * </p>
11 *
12 * @author
13 * @since 2021-11-05
14 */
15 public interface DgArchivesDestructionMapper extends BaseMapper<DgArchivesDestructionDO> {
16
17 }
1 package com.pashanhoo.destroy.service;
2
3
4 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 import com.baomidou.mybatisplus.extension.service.IService;
6 import com.pashanhoo.destroy.entity.*;
7 import com.pashanhoo.destroy.entity.vo.AddDgArchivesDestructionRequest;
8 import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionDetailVO;
9 import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionSearchRequest;
10 import com.pashanhoo.destroy.entity.vo.UpdateDgArchivesDestructionRequest;
11
12 /**
13 * <p>
14 * 档案销毁 服务类
15 * </p>
16 *
17 * @author
18 * @since 2021-11-05
19 */
20 public interface DgArchivesDestructionService extends IService<DgArchivesDestructionDO> {
21 /**
22 * 新增记录
23 * @param request
24 * @return
25 */
26 boolean insertDgArchivesDestruction(AddDgArchivesDestructionRequest request);
27
28 /**
29 * 根据主键查询记录详情
30 * @param id
31 * @return
32 */
33 DgArchivesDestructionDetailVO getDgArchivesDestructionDetailById(String id);
34
35 /**
36 * 修改单条记录
37 * @param request
38 * @return
39 */
40 boolean updateDgArchivesDestruction(UpdateDgArchivesDestructionRequest request);
41
42 /**
43 * 根据条件进行列表查询
44 * @param request
45 * @return
46 */
47 Page searchDgArchivesDestructionList(DgArchivesDestructionSearchRequest request);
48 }
1 package com.pashanhoo.destroy.service.impl;
2
3
4 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5 import com.pashanhoo.destroy.entity.*;
6 import com.pashanhoo.destroy.entity.vo.AddDgArchivesDestructionRequest;
7 import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionDetailVO;
8 import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionSearchRequest;
9 import com.pashanhoo.destroy.entity.vo.UpdateDgArchivesDestructionRequest;
10 import com.pashanhoo.destroy.mapper.DgArchivesDestructionMapper;
11 import com.pashanhoo.destroy.service.DgArchivesDestructionService;
12 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.stereotype.Service;
14
15 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
16 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
17
18 /**
19 * <p>
20 * 档案销毁 服务实现类
21 * </p>
22 *
23 * @author
24 * @since 2021-11-05
25 */
26 @Service
27 public class DgArchivesDestructionServiceImpl extends ServiceImpl<DgArchivesDestructionMapper, DgArchivesDestructionDO> implements DgArchivesDestructionService {
28
29 @Autowired
30 private DgArchivesDestructionConverter dgarchivesdestructionConverter;
31
32 @Autowired
33 private DgArchivesDestructionMapper dgarchivesdestructionMapper;
34
35 /**
36 * 新增记录
37 * @param request
38 * @return
39 */
40 @Override
41 public boolean insertDgArchivesDestruction(AddDgArchivesDestructionRequest request) {
42 DgArchivesDestructionDO dgarchivesdestructionDO = dgarchivesdestructionConverter.addRequest2DO(request);
43 return this.save(dgarchivesdestructionDO);
44 }
45
46 /**
47 * 根据主键查询记录详情
48 * @param id
49 * @return
50 */
51 @Override
52 public DgArchivesDestructionDetailVO getDgArchivesDestructionDetailById(String id) {
53 DgArchivesDestructionDO dgarchivesdestructionDO = this.getById(id);
54 return dgarchivesdestructionConverter.do2DetailVO(dgarchivesdestructionDO);
55 }
56
57 /**
58 * 修改单条记录
59 * @param request
60 * @return
61 */
62 @Override
63 public boolean updateDgArchivesDestruction(UpdateDgArchivesDestructionRequest request) {
64 DgArchivesDestructionDO dgarchivesdestructionDO = dgarchivesdestructionConverter.updateRequest2DO(request);
65 return this.updateById(dgarchivesdestructionDO);
66 }
67
68 /**
69 * 根据条件进行列表查询
70 * @param request
71 * @return
72 */
73 @Override
74 public Page searchDgArchivesDestructionList(DgArchivesDestructionSearchRequest request) {
75 Page<DgArchivesDestructionDO> pageParam = new Page<DgArchivesDestructionDO>(request.getCurrentPage(), request.getPageSize());
76 QueryWrapper<DgArchivesDestructionDO> wrapper = new QueryWrapper<>();
77 //设置默认排序
78 wrapper = "desc".equals(request.getSortOrder()) ? wrapper.orderByDesc(request.getSortField()) : wrapper.orderByAsc(request.getSortField());
79
80 //TODO 根据当前情况设置wrapper条件
81
82 Page page = this.page(pageParam, wrapper);
83 //将查询出来的DO List转为 ListVO List并重新设置到page对象中,并返回page对象
84 return page.setRecords(dgarchivesdestructionConverter.doList2ListVOList(page.getRecords()));
85 }
86
87 }
1 package com.pashanhoo.destroycatalog.controller;
2
3 import com.pashanhoo.common.Result;
4 import com.pashanhoo.destroycatalog.entity.vo.AddDgDestructionCatalogRequest;
5 import com.pashanhoo.destroycatalog.entity.vo.UpdateDgDestructionCatalogRequest;
6 import com.pashanhoo.destroycatalog.entity.vo.DgDestructionCatalogSearchRequest;
7 import com.pashanhoo.destroycatalog.service.DgDestructionCatalogService;
8 import org.springframework.web.bind.annotation.RestController;
9 import org.springframework.web.bind.annotation.*;
10 import io.swagger.annotations.Api;
11 import io.swagger.annotations.ApiOperation;
12 import io.swagger.annotations.ApiParam;
13 import org.springframework.beans.factory.annotation.Autowired;
14 import java.util.List;
15
16 /**
17 * <p>
18 * 档案销毁目录 前端控制器
19 * </p>
20 *
21 * @author
22 * @since 2021-11-05
23 */
24 @RestController
25 @RequestMapping("/system/dgDestructionCatalog/")
26 @Api(tags = "档案销毁目录接口")
27 public class DgDestructionCatalogController {
28 @Autowired
29 private DgDestructionCatalogService dgdestructioncatalogService;
30
31 @PostMapping("insertDgDestructionCatalog")
32 @ApiOperation("新增档案销毁目录")
33 public Result insertDgDestructionCatalog(@RequestBody AddDgDestructionCatalogRequest request){
34 if(dgdestructioncatalogService.insertDgDestructionCatalog(request)){
35 return Result.ok();
36 }
37 return Result.error("新增失败");
38 }
39
40 @DeleteMapping("deleteDgDestructionCatalogByIds")
41 @ApiOperation(value = "批量删除档案销毁目录")
42 public Result deleteDgDestructionCatalogByIds(@ApiParam("档案销毁目录ID列表") @RequestParam(value = "idList") List<String> idList) {
43 if(dgdestructioncatalogService.removeByIds(idList)) {
44 return Result.ok("删除成功");
45 }
46 return Result.error("删除失败");
47 }
48
49 @PutMapping("updateDgDestructionCatalog")
50 @ApiOperation("修改档案销毁目录")
51 public Result updateDgDestructionCatalog(@RequestBody UpdateDgDestructionCatalogRequest request){
52 if(dgdestructioncatalogService.updateDgDestructionCatalog(request)) {
53 return Result.ok("修改成功");
54 }
55 return Result.error("修改失败");
56 }
57
58 @GetMapping("getDgDestructionCatalogDetailById")
59 @ApiOperation(value = "读取明细")
60 public Result getDgDestructionCatalogDetailById(@ApiParam("档案销毁目录ID") @RequestParam String id){
61 return Result.ok(dgdestructioncatalogService.getDgDestructionCatalogDetailById(id));
62 }
63
64 @PostMapping("search")
65 @ApiOperation(value = "根据条件进行列表查询")
66 public Result searchDgDestructionCatalogList(@RequestBody DgDestructionCatalogSearchRequest request) {
67 //TODO 默认排序条件设置
68 request.defaultFillPageProp("","");
69 return Result.ok(dgdestructioncatalogService.searchDgDestructionCatalogList(request));
70 }
71 }
1 package com.pashanhoo.destroycatalog.entity;
2
3 import java.util.List;
4 import com.pashanhoo.destroycatalog.entity.vo.AddDgDestructionCatalogRequest;
5 import com.pashanhoo.destroycatalog.entity.vo.DgDestructionCatalogDetailVO;
6 import com.pashanhoo.destroycatalog.entity.vo.DgDestructionCatalogListVO;
7 import com.pashanhoo.destroycatalog.entity.vo.UpdateDgDestructionCatalogRequest;
8 import org.mapstruct.Mapper;
9
10 /**
11 * @author
12 * @since 2021-11-05
13 */
14 @Mapper(componentModel = "spring")
15 public interface DgDestructionCatalogConverter{
16 DgDestructionCatalogDO addRequest2DO(AddDgDestructionCatalogRequest request);
17
18 DgDestructionCatalogDetailVO do2DetailVO(DgDestructionCatalogDO dgdestructioncatalogDO);
19
20 DgDestructionCatalogDO updateRequest2DO(UpdateDgDestructionCatalogRequest request);
21
22 DgDestructionCatalogListVO do2ListVO(DgDestructionCatalogDO dgdestructioncatalogDO);
23
24 List<DgDestructionCatalogListVO> doList2ListVOList(List<DgDestructionCatalogDO> dgdestructioncatalogDOList);
25 }
1 package com.pashanhoo.destroycatalog.entity;
2
3 import com.baomidou.mybatisplus.annotation.TableName;
4 import com.baomidou.mybatisplus.annotation.IdType;
5 import com.baomidou.mybatisplus.annotation.TableId;
6 import com.baomidou.mybatisplus.annotation.TableField;
7 import java.io.Serializable;
8 import lombok.Data;
9 import lombok.EqualsAndHashCode;
10
11 /**
12 * <p>
13 * 档案销毁目录
14 * </p>
15 *
16 * @author
17 * @since 2021-11-05
18 */
19 @Data
20 @EqualsAndHashCode(callSuper = false)
21 @TableName("DG_DESTRUCTION_CATALOG")
22 public class DgDestructionCatalogDO implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * 销毁目录标识码
28 */
29 @TableId(value = "BSM_LENDCATALOG", type = IdType.UUID)
30 private String bsmLendcatalog;
31
32 /**
33 * 档案标识码
34 */
35 @TableField("BSM_ARCHIVES")
36 private String bsmArchives;
37
38 /**
39 * 销毁标识码
40 */
41 @TableField("BSM_DESTRUCTION")
42 private String bsmDestruction;
43
44
45 }
1 package com.pashanhoo.destroycatalog.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案销毁目录新增请求实体
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案销毁目录新增请求实体")
20 public class AddDgDestructionCatalogRequest implements Serializable {
21
22 private static final long serialVersionUID = 1L;
23
24
25 /**
26 * 档案标识码
27 */
28 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
29 private String bsmArchives;
30
31 /**
32 * 销毁标识码
33 */
34 @ApiModelProperty(name = "bsmDestruction", value = "销毁标识码")
35 private String bsmDestruction;
36
37
38 }
1 package com.pashanhoo.destroycatalog.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案销毁目录明细实体
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案销毁目录明细实体")
20 public class DgDestructionCatalogDetailVO implements Serializable {
21
22 private static final long serialVersionUID = 1L;
23
24 /**
25 * 销毁目录标识码
26 */
27 @ApiModelProperty(name = "bsmLendcatalog", value = "销毁目录标识码")
28 private String bsmLendcatalog;
29
30 /**
31 * 档案标识码
32 */
33 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
34 private String bsmArchives;
35
36 /**
37 * 销毁标识码
38 */
39 @ApiModelProperty(name = "bsmDestruction", value = "销毁标识码")
40 private String bsmDestruction;
41
42
43 }
1 package com.pashanhoo.destroycatalog.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8
9 /**
10 * <p>
11 * 档案销毁目录列表VO
12 * </p>
13 *
14 * @author
15 * @since 2021-11-05
16 */
17 @Data
18 @EqualsAndHashCode(callSuper = false)
19 @ApiModel(value="档案销毁目录列表VO")
20 //TODO 该类属性暂时是完整的全部属性,需进行个性化的增删
21 public class DgDestructionCatalogListVO implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25 /**
26 * 销毁目录标识码
27 */
28 @ApiModelProperty(name = "bsmLendcatalog", value = "销毁目录标识码")
29 private String bsmLendcatalog;
30
31 /**
32 * 档案标识码
33 */
34 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
35 private String bsmArchives;
36
37 /**
38 * 销毁标识码
39 */
40 @ApiModelProperty(name = "bsmDestruction", value = "销毁标识码")
41 private String bsmDestruction;
42
43
44 }
1 package com.pashanhoo.destroycatalog.entity.vo;
2
3 import java.io.Serializable;
4 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8 import com.pashanhoo.common.PageInfo;
9
10 /**
11 * <p>
12 * 档案销毁目录列表查询请求实体
13 * </p>
14 *
15 * @author
16 * @since 2021-11-05
17 */
18 @Data
19 @EqualsAndHashCode(callSuper = false)
20 @ApiModel(value="档案销毁目录列表查询请求实体")
21 //TODO 初始查询条件是全部,需要根据情况自行删减
22 public class DgDestructionCatalogSearchRequest extends PageInfo implements Serializable {
23
24 private static final long serialVersionUID = 1L;
25
26 /**
27 * 销毁目录标识码
28 */
29 @ApiModelProperty(name = "bsmLendcatalog", value = "销毁目录标识码")
30 private String bsmLendcatalog;
31
32 /**
33 * 档案标识码
34 */
35 @ApiModelProperty(name = "bsmArchives", value = "档案标识码")
36 private String bsmArchives;
37
38 /**
39 * 销毁标识码
40 */
41 @ApiModelProperty(name = "bsmDestruction", value = "销毁标识码")
42 private String bsmDestruction;
43
44
45 }