新增业务接收数据接口
Showing
17 changed files
with
222 additions
and
48 deletions
... | @@ -23,4 +23,6 @@ public interface DgArchivesConverter{ | ... | @@ -23,4 +23,6 @@ public interface DgArchivesConverter{ |
23 | DgArchivesListVO do2ListVO(DgArchivesDO dgarchivesDO); | 23 | DgArchivesListVO do2ListVO(DgArchivesDO dgarchivesDO); |
24 | 24 | ||
25 | List<DgArchivesListVO> doList2ListVOList(List<DgArchivesDO> dgarchivesDOList); | 25 | List<DgArchivesListVO> doList2ListVOList(List<DgArchivesDO> dgarchivesDOList); |
26 | |||
27 | List<DgArchivesDO> addArchivesList(List<AddDgArchivesRequest> request); | ||
26 | } | 28 | } | ... | ... |
... | @@ -23,7 +23,11 @@ public class AddDgArchivesRequest implements Serializable { | ... | @@ -23,7 +23,11 @@ public class AddDgArchivesRequest implements Serializable { |
23 | 23 | ||
24 | private static final long serialVersionUID = 1L; | 24 | private static final long serialVersionUID = 1L; |
25 | 25 | ||
26 | 26 | /** | |
27 | * 案卷标识码 | ||
28 | */ | ||
29 | @ApiModelProperty(name = "bsm_archives", value = "案卷标识码") | ||
30 | private String bsm_archives; | ||
27 | /** | 31 | /** |
28 | * 案卷标题 | 32 | * 案卷标题 |
29 | */ | 33 | */ | ... | ... |
... | @@ -23,4 +23,6 @@ public interface DgBdcdyConverter{ | ... | @@ -23,4 +23,6 @@ public interface DgBdcdyConverter{ |
23 | DgBdcdyListVO do2ListVO(DgBdcdyDO dgbdcdyDO); | 23 | DgBdcdyListVO do2ListVO(DgBdcdyDO dgbdcdyDO); |
24 | 24 | ||
25 | List<DgBdcdyListVO> doList2ListVOList(List<DgBdcdyDO> dgbdcdyDOList); | 25 | List<DgBdcdyListVO> doList2ListVOList(List<DgBdcdyDO> dgbdcdyDOList); |
26 | |||
27 | List<DgBdcdyDO> addRequestListDO(List<AddDgBdcdyRequest> request); | ||
26 | } | 28 | } | ... | ... |
... | @@ -7,6 +7,7 @@ import com.pashanhoo.bdcdy.entity.vo.DgBdcdyDetailVO; | ... | @@ -7,6 +7,7 @@ import com.pashanhoo.bdcdy.entity.vo.DgBdcdyDetailVO; |
7 | import com.pashanhoo.bdcdy.entity.vo.UpdateDgBdcdyRequest; | 7 | import com.pashanhoo.bdcdy.entity.vo.UpdateDgBdcdyRequest; |
8 | import com.pashanhoo.bdcdy.entity.vo.DgBdcdySearchRequest; | 8 | import com.pashanhoo.bdcdy.entity.vo.DgBdcdySearchRequest; |
9 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 9 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
10 | import com.pashanhoo.common.Result; | ||
10 | 11 | ||
11 | /** | 12 | /** |
12 | * <p> | 13 | * <p> |
... | @@ -44,4 +45,10 @@ public interface DgBdcdyService extends IService<DgBdcdyDO> { | ... | @@ -44,4 +45,10 @@ public interface DgBdcdyService extends IService<DgBdcdyDO> { |
44 | * @return | 45 | * @return |
45 | */ | 46 | */ |
46 | Page searchDgBdcdyList(DgBdcdySearchRequest request); | 47 | Page searchDgBdcdyList(DgBdcdySearchRequest request); |
48 | /** | ||
49 | * 非主键修改单元信息 | ||
50 | * @param request | ||
51 | * @return | ||
52 | */ | ||
53 | Result updateDgBdcdyByArchive(UpdateDgBdcdyRequest request); | ||
47 | } | 54 | } | ... | ... |
... | @@ -9,6 +9,7 @@ import com.pashanhoo.bdcdy.entity.vo.UpdateDgBdcdyRequest; | ... | @@ -9,6 +9,7 @@ import com.pashanhoo.bdcdy.entity.vo.UpdateDgBdcdyRequest; |
9 | import com.pashanhoo.bdcdy.entity.vo.DgBdcdySearchRequest; | 9 | import com.pashanhoo.bdcdy.entity.vo.DgBdcdySearchRequest; |
10 | import com.pashanhoo.bdcdy.mapper.DgBdcdyMapper; | 10 | import com.pashanhoo.bdcdy.mapper.DgBdcdyMapper; |
11 | import com.pashanhoo.bdcdy.service.DgBdcdyService; | 11 | import com.pashanhoo.bdcdy.service.DgBdcdyService; |
12 | import com.pashanhoo.common.Result; | ||
12 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
13 | import org.springframework.stereotype.Service; | 14 | import org.springframework.stereotype.Service; |
14 | 15 | ||
... | @@ -84,4 +85,13 @@ public class DgBdcdyServiceImpl extends ServiceImpl<DgBdcdyMapper, DgBdcdyDO> im | ... | @@ -84,4 +85,13 @@ public class DgBdcdyServiceImpl extends ServiceImpl<DgBdcdyMapper, DgBdcdyDO> im |
84 | return page.setRecords(dgbdcdyConverter.doList2ListVOList(page.getRecords())); | 85 | return page.setRecords(dgbdcdyConverter.doList2ListVOList(page.getRecords())); |
85 | } | 86 | } |
86 | 87 | ||
88 | @Override | ||
89 | public Result updateDgBdcdyByArchive(UpdateDgBdcdyRequest request) { | ||
90 | QueryWrapper<DgBdcdyDO> wrapper = new QueryWrapper<>(); | ||
91 | wrapper.eq(request.getBsmArchives()!=null && !"".equals(request.getBsmArchives()),"BSM_ARCHIVES",request.getBsmArchives()); | ||
92 | DgBdcdyDO bdcdyDO=dgbdcdyConverter.updateRequest2DO(request); | ||
93 | dgbdcdyMapper.update(bdcdyDO,wrapper); | ||
94 | return Result.ok(); | ||
95 | } | ||
96 | |||
87 | } | 97 | } | ... | ... |
... | @@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.IdType; | ... | @@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.IdType; |
5 | import com.baomidou.mybatisplus.annotation.TableId; | 5 | import com.baomidou.mybatisplus.annotation.TableId; |
6 | import com.baomidou.mybatisplus.annotation.TableField; | 6 | import com.baomidou.mybatisplus.annotation.TableField; |
7 | import java.io.Serializable; | 7 | import java.io.Serializable; |
8 | |||
9 | import io.swagger.annotations.ApiModelProperty; | ||
8 | import lombok.Data; | 10 | import lombok.Data; |
9 | import lombok.EqualsAndHashCode; | 11 | import lombok.EqualsAndHashCode; |
10 | 12 | ||
... | @@ -64,6 +66,16 @@ public class DgBusinessDO implements Serializable { | ... | @@ -64,6 +66,16 @@ public class DgBusinessDO implements Serializable { |
64 | */ | 66 | */ |
65 | @TableField("DJJGMC") | 67 | @TableField("DJJGMC") |
66 | private String djjgmc; | 68 | private String djjgmc; |
69 | /** | ||
70 | * 注销业务号 | ||
71 | */ | ||
72 | @TableField("ZXYWH") | ||
73 | private String zxywh; | ||
74 | /** | ||
75 | * 注销类型 | ||
76 | */ | ||
77 | @TableField("ZXLX") | ||
78 | private String zxlx; | ||
67 | 79 | ||
68 | 80 | ||
69 | } | 81 | } | ... | ... |
... | @@ -57,6 +57,15 @@ public class AddDgBusinessRequest implements Serializable { | ... | @@ -57,6 +57,15 @@ public class AddDgBusinessRequest implements Serializable { |
57 | */ | 57 | */ |
58 | @ApiModelProperty(name = "djjgmc", value = "登记机构名称") | 58 | @ApiModelProperty(name = "djjgmc", value = "登记机构名称") |
59 | private String djjgmc; | 59 | private String djjgmc; |
60 | 60 | /** | |
61 | * 注销业务号 | ||
62 | */ | ||
63 | @ApiModelProperty(name = "zxywh", value = "注销业务号") | ||
64 | private String zxywh; | ||
65 | /** | ||
66 | * 注销类型 | ||
67 | */ | ||
68 | @ApiModelProperty(name = "zxlx", value = "注销类型") | ||
69 | private String zxlx; | ||
61 | 70 | ||
62 | } | 71 | } | ... | ... |
... | @@ -18,7 +18,6 @@ import com.pashanhoo.common.PageInfo; | ... | @@ -18,7 +18,6 @@ import com.pashanhoo.common.PageInfo; |
18 | @Data | 18 | @Data |
19 | @EqualsAndHashCode(callSuper = false) | 19 | @EqualsAndHashCode(callSuper = false) |
20 | @ApiModel(value="档案业务信息列表查询请求实体") | 20 | @ApiModel(value="档案业务信息列表查询请求实体") |
21 | //TODO 初始查询条件是全部,需要根据情况自行删减 | ||
22 | public class DgBusinessSearchRequest extends PageInfo implements Serializable { | 21 | public class DgBusinessSearchRequest extends PageInfo implements Serializable { |
23 | 22 | ||
24 | private static final long serialVersionUID = 1L; | 23 | private static final long serialVersionUID = 1L; |
... | @@ -64,6 +63,15 @@ public class DgBusinessSearchRequest extends PageInfo implements Serializable { | ... | @@ -64,6 +63,15 @@ public class DgBusinessSearchRequest extends PageInfo implements Serializable { |
64 | */ | 63 | */ |
65 | @ApiModelProperty(name = "djjgmc", value = "登记机构名称") | 64 | @ApiModelProperty(name = "djjgmc", value = "登记机构名称") |
66 | private String djjgmc; | 65 | private String djjgmc; |
67 | 66 | /** | |
67 | * 注销业务号 | ||
68 | */ | ||
69 | @ApiModelProperty(name = "zxywh", value = "注销业务号") | ||
70 | private String zxywh; | ||
71 | /** | ||
72 | * 注销类型 | ||
73 | */ | ||
74 | @ApiModelProperty(name = "zxlx", value = "注销类型") | ||
75 | private String zxlx; | ||
68 | 76 | ||
69 | } | 77 | } | ... | ... |
... | @@ -45,4 +45,11 @@ public interface DgBusinessService extends IService<DgBusinessDO> { | ... | @@ -45,4 +45,11 @@ public interface DgBusinessService extends IService<DgBusinessDO> { |
45 | * @return | 45 | * @return |
46 | */ | 46 | */ |
47 | Page searchDgBusinessList(DgBusinessSearchRequest request); | 47 | Page searchDgBusinessList(DgBusinessSearchRequest request); |
48 | |||
49 | /** | ||
50 | * | ||
51 | * @param request | ||
52 | * @return | ||
53 | */ | ||
54 | DgBusinessDO searchDgBusiness(DgBusinessSearchRequest request); | ||
48 | } | 55 | } | ... | ... |
... | @@ -77,11 +77,19 @@ public class DgBusinessServiceImpl extends ServiceImpl<DgBusinessMapper, DgBusin | ... | @@ -77,11 +77,19 @@ public class DgBusinessServiceImpl extends ServiceImpl<DgBusinessMapper, DgBusin |
77 | //设置默认排序 | 77 | //设置默认排序 |
78 | wrapper = "desc".equals(request.getSortOrder()) ? wrapper.orderByDesc(request.getSortField()) : wrapper.orderByAsc(request.getSortField()); | 78 | wrapper = "desc".equals(request.getSortOrder()) ? wrapper.orderByDesc(request.getSortField()) : wrapper.orderByAsc(request.getSortField()); |
79 | 79 | ||
80 | //TODO 根据当前情况设置wrapper条件 | ||
81 | 80 | ||
82 | Page page = this.page(pageParam, wrapper); | 81 | Page page = this.page(pageParam, wrapper); |
83 | //将查询出来的DO List转为 ListVO List并重新设置到page对象中,并返回page对象 | 82 | //将查询出来的DO List转为 ListVO List并重新设置到page对象中,并返回page对象 |
84 | return page.setRecords(dgbusinessConverter.doList2ListVOList(page.getRecords())); | 83 | return page.setRecords(dgbusinessConverter.doList2ListVOList(page.getRecords())); |
85 | } | 84 | } |
86 | 85 | ||
86 | @Override | ||
87 | public DgBusinessDO searchDgBusiness(DgBusinessSearchRequest request) { | ||
88 | QueryWrapper<DgBusinessDO> wrapper = new QueryWrapper<>(); | ||
89 | wrapper.eq(request.getYwh()!=null && !"".equals(request.getYwh()),"YWH",request.getYwh()); | ||
90 | wrapper.eq(request.getZxywh()!=null && !"".equals(request.getZxywh()),"ZXYWH",request.getZxywh()); | ||
91 | DgBusinessDO businessDO= dgbusinessMapper.selectOne(wrapper); | ||
92 | return businessDO; | ||
93 | } | ||
94 | |||
87 | } | 95 | } | ... | ... |
1 | package com.pashanhoo.lend.controller; | 1 | package com.pashanhoo.lend.controller; |
2 | 2 | ||
3 | 3 | ||
4 | import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest; | ||
5 | import com.pashanhoo.common.Result; | 4 | import com.pashanhoo.common.Result; |
6 | import com.pashanhoo.lend.entity.vo.AddDgLendRequest; | 5 | import com.pashanhoo.lend.entity.vo.AddDgLendRequest; |
7 | import com.pashanhoo.lend.entity.vo.ArchiveLendSearchRequest; | 6 | import com.pashanhoo.lend.entity.vo.ArchiveLendSearchRequest; |
... | @@ -40,7 +39,7 @@ public class DgLendController { | ... | @@ -40,7 +39,7 @@ public class DgLendController { |
40 | } | 39 | } |
41 | @PostMapping("deleteDanganJyInfo") | 40 | @PostMapping("deleteDanganJyInfo") |
42 | @ApiOperation("通过借阅标识码删除借阅记录信息") | 41 | @ApiOperation("通过借阅标识码删除借阅记录信息") |
43 | public Result deleteDanganJyInfo(@RequestParam String lendBsm){ | 42 | public Result deleteDanganJyInfo(@ApiParam("档案借阅记录ID") @RequestParam String lendBsm){ |
44 | return dglendService.deleteDanganJyInfo(lendBsm); | 43 | return dglendService.deleteDanganJyInfo(lendBsm); |
45 | } | 44 | } |
46 | @PostMapping("danganGh") | 45 | @PostMapping("danganGh") | ... | ... |
... | @@ -90,7 +90,9 @@ public class DgLendServiceImpl extends ServiceImpl<DgLendMapper, DgLendDO> imple | ... | @@ -90,7 +90,9 @@ public class DgLendServiceImpl extends ServiceImpl<DgLendMapper, DgLendDO> imple |
90 | } | 90 | } |
91 | 91 | ||
92 | @Override | 92 | @Override |
93 | @Transactional(rollbackFor = Exception.class) | ||
93 | public Result danganGh(UpdateDgLendRequest ghRequest) { | 94 | public Result danganGh(UpdateDgLendRequest ghRequest) { |
95 | //新增借阅记录表归还信息数据 | ||
94 | DgLendDO lendDO=dglendConverter.updateRequest2DO(ghRequest); | 96 | DgLendDO lendDO=dglendConverter.updateRequest2DO(ghRequest); |
95 | dglendMapper.updateById(lendDO); | 97 | dglendMapper.updateById(lendDO); |
96 | //修改档案信息表状态 | 98 | //修改档案信息表状态 | ... | ... |
... | @@ -31,10 +31,7 @@ public class DgReceiveController { | ... | @@ -31,10 +31,7 @@ public class DgReceiveController { |
31 | @PostMapping("insertDgReceive") | 31 | @PostMapping("insertDgReceive") |
32 | @ApiOperation("新增档案接收记录") | 32 | @ApiOperation("新增档案接收记录") |
33 | public Result insertDgReceive(@RequestBody AddDgReceiveRequest request){ | 33 | public Result insertDgReceive(@RequestBody AddDgReceiveRequest request){ |
34 | if(dgreceiveService.insertDgReceive(request)){ | 34 | return dgreceiveService.insertDgReceive(request); |
35 | return Result.ok(); | ||
36 | } | ||
37 | return Result.error("新增失败"); | ||
38 | } | 35 | } |
39 | 36 | ||
40 | @DeleteMapping("deleteDgReceiveByIds") | 37 | @DeleteMapping("deleteDgReceiveByIds") | ... | ... |
... | @@ -3,6 +3,10 @@ package com.pashanhoo.receive.entity.vo; | ... | @@ -3,6 +3,10 @@ package com.pashanhoo.receive.entity.vo; |
3 | import java.math.BigDecimal; | 3 | import java.math.BigDecimal; |
4 | import java.util.Date; | 4 | import java.util.Date; |
5 | import java.io.Serializable; | 5 | import java.io.Serializable; |
6 | import java.util.List; | ||
7 | |||
8 | import com.pashanhoo.bdcdy.entity.vo.AddDgBdcdyRequest; | ||
9 | import com.pashanhoo.business.entity.vo.AddDgBusinessRequest; | ||
6 | import io.swagger.annotations.ApiModel; | 10 | import io.swagger.annotations.ApiModel; |
7 | import io.swagger.annotations.ApiModelProperty; | 11 | import io.swagger.annotations.ApiModelProperty; |
8 | import lombok.Data; | 12 | import lombok.Data; |
... | @@ -22,121 +26,101 @@ import lombok.EqualsAndHashCode; | ... | @@ -22,121 +26,101 @@ import lombok.EqualsAndHashCode; |
22 | public class AddDgReceiveRequest implements Serializable { | 26 | public class AddDgReceiveRequest implements Serializable { |
23 | 27 | ||
24 | private static final long serialVersionUID = 1L; | 28 | private static final long serialVersionUID = 1L; |
25 | 29 | /** | |
26 | 30 | * 主键 | |
31 | */ | ||
32 | @ApiModelProperty(name = "bms_receive", value = "主键") | ||
33 | private String bms_receive; | ||
27 | /** | 34 | /** |
28 | * 业务来源编码 | 35 | * 业务来源编码 |
29 | */ | 36 | */ |
30 | @ApiModelProperty(name = "ywlyjbm", value = "业务来源编码") | 37 | @ApiModelProperty(name = "ywlyjbm", value = "业务来源编码") |
31 | private String ywlyjbm; | 38 | private String ywlyjbm; |
32 | |||
33 | /** | 39 | /** |
34 | * 权利类型 | 40 | * 权利类型 |
35 | */ | 41 | */ |
36 | @ApiModelProperty(name = "qllx", value = "权利类型") | 42 | @ApiModelProperty(name = "qllx", value = "权利类型") |
37 | private String qllx; | 43 | private String qllx; |
38 | |||
39 | /** | 44 | /** |
40 | * 登记类型 | 45 | * 登记类型 |
41 | */ | 46 | */ |
42 | @ApiModelProperty(name = "djlx", value = "登记类型") | 47 | @ApiModelProperty(name = "djlx", value = "登记类型") |
43 | private String djlx; | 48 | private String djlx; |
44 | |||
45 | /** | 49 | /** |
46 | * 收件人员 | 50 | * 收件人员 |
47 | */ | 51 | */ |
48 | @ApiModelProperty(name = "sjry", value = "收件人员") | 52 | @ApiModelProperty(name = "sjry", value = "收件人员") |
49 | private String sjry; | 53 | private String sjry; |
50 | |||
51 | /** | 54 | /** |
52 | * 收件时间 | 55 | * 收件时间 |
53 | */ | 56 | */ |
54 | @ApiModelProperty(name = "sjsj", value = "收件时间") | 57 | @ApiModelProperty(name = "sjsj", value = "收件时间") |
55 | private Date sjsj; | 58 | private Date sjsj; |
56 | |||
57 | /** | 59 | /** |
58 | * 业务号 | 60 | * 业务号 |
59 | */ | 61 | */ |
60 | @ApiModelProperty(name = "ywh", value = "业务号") | 62 | @ApiModelProperty(name = "ywh", value = "业务号") |
61 | private String ywh; | 63 | private String ywh; |
62 | |||
63 | /** | 64 | /** |
64 | * 不动产单元号 | 65 | * 不动产单元号 |
65 | */ | 66 | */ |
66 | @ApiModelProperty(name = "bdcdyh", value = "不动产单元号") | 67 | @ApiModelProperty(name = "bdcdyh", value = "不动产单元号") |
67 | private String bdcdyh; | 68 | private String bdcdyh; |
68 | |||
69 | /** | 69 | /** |
70 | * 单元总数 | 70 | * 单元总数 |
71 | */ | 71 | */ |
72 | @ApiModelProperty(name = "dyzs", value = "单元总数") | 72 | @ApiModelProperty(name = "dyzs", value = "单元总数") |
73 | private BigDecimal dyzs; | 73 | private BigDecimal dyzs; |
74 | |||
75 | /** | 74 | /** |
76 | * 不动产权证号 | 75 | * 不动产权证号 |
77 | */ | 76 | */ |
78 | @ApiModelProperty(name = "bdcqzh", value = "不动产权证号") | 77 | @ApiModelProperty(name = "bdcqzh", value = "不动产权证号") |
79 | private String bdcqzh; | 78 | private String bdcqzh; |
80 | |||
81 | /** | 79 | /** |
82 | * 权利人 | 80 | * 权利人 |
83 | */ | 81 | */ |
84 | @ApiModelProperty(name = "qlr", value = "权利人") | 82 | @ApiModelProperty(name = "qlr", value = "权利人") |
85 | private String qlr; | 83 | private String qlr; |
86 | |||
87 | /** | 84 | /** |
88 | * 权利人证件号码 | 85 | * 权利人证件号码 |
89 | */ | 86 | */ |
90 | @ApiModelProperty(name = "zjhm", value = "权利人证件号码") | 87 | @ApiModelProperty(name = "zjhm", value = "权利人证件号码") |
91 | private String zjhm; | 88 | private String zjhm; |
92 | |||
93 | /** | 89 | /** |
94 | * 义务人 | 90 | * 义务人 |
95 | */ | 91 | */ |
96 | @ApiModelProperty(name = "ywr", value = "义务人") | 92 | @ApiModelProperty(name = "ywr", value = "义务人") |
97 | private String ywr; | 93 | private String ywr; |
98 | |||
99 | /** | 94 | /** |
100 | * 坐落 | 95 | * 坐落 |
101 | */ | 96 | */ |
102 | @ApiModelProperty(name = "zl", value = "坐落") | 97 | @ApiModelProperty(name = "zl", value = "坐落") |
103 | private String zl; | 98 | private String zl; |
104 | |||
105 | /** | 99 | /** |
106 | * 登记时间 | 100 | * 登记时间 |
107 | */ | 101 | */ |
108 | @ApiModelProperty(name = "djsj", value = "登记时间") | 102 | @ApiModelProperty(name = "djsj", value = "登记时间") |
109 | private Date djsj; | 103 | private Date djsj; |
110 | |||
111 | /** | 104 | /** |
112 | * 接收时间 | 105 | * 接收时间 |
113 | */ | 106 | */ |
114 | @ApiModelProperty(name = "jssj", value = "接收时间") | 107 | @ApiModelProperty(name = "jssj", value = "接收时间") |
115 | private Date jssj; | 108 | private Date jssj; |
116 | |||
117 | /** | 109 | /** |
118 | * 推送机构编码 | 110 | * 推送机构编码 |
119 | */ | 111 | */ |
120 | @ApiModelProperty(name = "tsjgbm", value = "推送机构编码") | 112 | @ApiModelProperty(name = "tsjgbm", value = "推送机构编码") |
121 | private String tsjgbm; | 113 | private String tsjgbm; |
122 | |||
123 | /** | 114 | /** |
124 | * 归档方式(1:按业务归档,2:按单元归档,3:档案补充归档) | 115 | * 推送业务信息 |
125 | */ | 116 | */ |
126 | @ApiModelProperty(name = "gdfs", value = "归档方式(1:按业务归档,2:按单元归档,3:档案补充归档)") | 117 | @ApiModelProperty(name = "businessRequest", value = "推送业务信息") |
127 | private String gdfs; | 118 | private AddDgBusinessRequest businessRequest; |
128 | |||
129 | /** | ||
130 | * 归档时间 | ||
131 | */ | ||
132 | @ApiModelProperty(name = "gdsj", value = "归档时间") | ||
133 | private Date gdsj; | ||
134 | |||
135 | /** | 119 | /** |
136 | * 整理状态(0:待处理,1:已归档) | 120 | * 不动产单元信息 |
137 | */ | 121 | */ |
138 | @ApiModelProperty(name = "state", value = "整理状态(0:待处理,1:已归档)") | 122 | @ApiModelProperty(name = "businessRequest", value = "推送业务信息") |
139 | private String state; | 123 | private List<AddDgBdcdyRequest> bdcdyRequestList; |
140 | 124 | ||
141 | 125 | ||
142 | } | 126 | } | ... | ... |
1 | package com.pashanhoo.receive.service; | 1 | package com.pashanhoo.receive.service; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | import com.pashanhoo.common.Result; | ||
4 | import com.pashanhoo.receive.entity.DgReceiveDO; | 5 | import com.pashanhoo.receive.entity.DgReceiveDO; |
5 | import com.pashanhoo.receive.entity.vo.AddDgReceiveRequest; | 6 | import com.pashanhoo.receive.entity.vo.AddDgReceiveRequest; |
6 | import com.pashanhoo.receive.entity.vo.DgReceiveDetailVO; | 7 | import com.pashanhoo.receive.entity.vo.DgReceiveDetailVO; |
... | @@ -22,7 +23,7 @@ public interface DgReceiveService extends IService<DgReceiveDO> { | ... | @@ -22,7 +23,7 @@ public interface DgReceiveService extends IService<DgReceiveDO> { |
22 | * @param request | 23 | * @param request |
23 | * @return | 24 | * @return |
24 | */ | 25 | */ |
25 | boolean insertDgReceive(AddDgReceiveRequest request); | 26 | Result insertDgReceive(AddDgReceiveRequest request); |
26 | 27 | ||
27 | /** | 28 | /** |
28 | * 根据主键查询记录详情 | 29 | * 根据主键查询记录详情 | ... | ... |
1 | package com.pashanhoo.receive.service.impl; | 1 | package com.pashanhoo.receive.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.toolkit.IdWorker; | ||
3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 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.service.DgArchivesService; | ||
9 | import com.pashanhoo.bdcdy.entity.DgBdcdyConverter; | ||
10 | import com.pashanhoo.bdcdy.entity.DgBdcdyDO; | ||
11 | import com.pashanhoo.bdcdy.entity.vo.AddDgBdcdyRequest; | ||
12 | import com.pashanhoo.bdcdy.entity.vo.UpdateDgBdcdyRequest; | ||
13 | import com.pashanhoo.bdcdy.service.DgBdcdyService; | ||
14 | import com.pashanhoo.business.entity.DgBusinessDO; | ||
15 | import com.pashanhoo.business.entity.vo.AddDgBusinessRequest; | ||
16 | import com.pashanhoo.business.entity.vo.DgBusinessSearchRequest; | ||
17 | import com.pashanhoo.business.mapper.DgBusinessMapper; | ||
18 | import com.pashanhoo.business.service.DgBusinessService; | ||
19 | import com.pashanhoo.common.Result; | ||
4 | import com.pashanhoo.receive.entity.DgReceiveConverter; | 20 | import com.pashanhoo.receive.entity.DgReceiveConverter; |
5 | import com.pashanhoo.receive.entity.DgReceiveDO; | 21 | import com.pashanhoo.receive.entity.DgReceiveDO; |
6 | import com.pashanhoo.receive.entity.vo.AddDgReceiveRequest; | 22 | import com.pashanhoo.receive.entity.vo.AddDgReceiveRequest; |
... | @@ -9,12 +25,21 @@ import com.pashanhoo.receive.entity.vo.UpdateDgReceiveRequest; | ... | @@ -9,12 +25,21 @@ import com.pashanhoo.receive.entity.vo.UpdateDgReceiveRequest; |
9 | import com.pashanhoo.receive.entity.vo.DgReceiveSearchRequest; | 25 | import com.pashanhoo.receive.entity.vo.DgReceiveSearchRequest; |
10 | import com.pashanhoo.receive.mapper.DgReceiveMapper; | 26 | import com.pashanhoo.receive.mapper.DgReceiveMapper; |
11 | import com.pashanhoo.receive.service.DgReceiveService; | 27 | import com.pashanhoo.receive.service.DgReceiveService; |
28 | import com.pashanhoo.receiverelation.entity.DgReceiveRelationConverter; | ||
29 | import com.pashanhoo.receiverelation.entity.DgReceiveRelationDO; | ||
30 | import com.pashanhoo.receiverelation.entity.vo.AddDgReceiveRelationRequest; | ||
31 | import com.pashanhoo.receiverelation.service.DgReceiveRelationService; | ||
12 | import org.springframework.beans.factory.annotation.Autowired; | 32 | import org.springframework.beans.factory.annotation.Autowired; |
13 | import org.springframework.stereotype.Service; | 33 | import org.springframework.stereotype.Service; |
14 | 34 | ||
15 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 35 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
16 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 36 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
17 | 37 | ||
38 | import java.math.BigDecimal; | ||
39 | import java.util.ArrayList; | ||
40 | import java.util.Date; | ||
41 | import java.util.List; | ||
42 | |||
18 | /** | 43 | /** |
19 | * <p> | 44 | * <p> |
20 | * 档案接收记录 服务实现类 | 45 | * 档案接收记录 服务实现类 |
... | @@ -28,9 +53,24 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive | ... | @@ -28,9 +53,24 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive |
28 | 53 | ||
29 | @Autowired | 54 | @Autowired |
30 | private DgReceiveConverter dgreceiveConverter; | 55 | private DgReceiveConverter dgreceiveConverter; |
31 | 56 | @Autowired | |
57 | private DgBdcdyConverter bdcdyConverter; | ||
32 | @Autowired | 58 | @Autowired |
33 | private DgReceiveMapper dgreceiveMapper; | 59 | private DgReceiveMapper dgreceiveMapper; |
60 | @Autowired | ||
61 | private DgBusinessService businessService; | ||
62 | @Autowired | ||
63 | private DgBusinessMapper businessMapper; | ||
64 | @Autowired | ||
65 | private DgBdcdyService bdcdyService; | ||
66 | @Autowired | ||
67 | private DgArchivesService archivesService; | ||
68 | @Autowired | ||
69 | private DgArchivesConverter archivesConverter; | ||
70 | @Autowired | ||
71 | private DgReceiveRelationService relationService; | ||
72 | @Autowired | ||
73 | private DgReceiveRelationConverter relationConverter; | ||
34 | 74 | ||
35 | /** | 75 | /** |
36 | * 新增记录 | 76 | * 新增记录 |
... | @@ -38,9 +78,89 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive | ... | @@ -38,9 +78,89 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive |
38 | * @return | 78 | * @return |
39 | */ | 79 | */ |
40 | @Override | 80 | @Override |
41 | public boolean insertDgReceive(AddDgReceiveRequest request) { | 81 | public Result insertDgReceive(AddDgReceiveRequest request) { |
82 | //获取接收编码 | ||
83 | String receiveBsm= IdWorker.get32UUID(); | ||
84 | request.setBms_receive(receiveBsm); | ||
85 | //新增接收表信息=============start=========== | ||
42 | DgReceiveDO dgreceiveDO = dgreceiveConverter.addRequest2DO(request); | 86 | DgReceiveDO dgreceiveDO = dgreceiveConverter.addRequest2DO(request); |
43 | return this.save(dgreceiveDO); | 87 | //TODO获取归档方式 |
88 | if(dgreceiveDO.getGdfs()==null || "".equals(dgreceiveDO.getGdfs())){ | ||
89 | dgreceiveDO.setGdfs("1"); | ||
90 | } | ||
91 | this.save(dgreceiveDO); | ||
92 | //新增接收表信息=============end=========== | ||
93 | //获取登记传入的不动产单元List集合数据 | ||
94 | List<AddDgBdcdyRequest> bdcdyRequestList=request.getBdcdyRequestList(); | ||
95 | //获取登记传入的业务数据 | ||
96 | AddDgBusinessRequest businessRequest=request.getBusinessRequest(); | ||
97 | //归档方式(1:按业务归档,2:按单元归档,3:档案补充归档) | ||
98 | if("1".equals(dgreceiveDO.getGdfs())){ | ||
99 | //新增档案表基础信息 | ||
100 | AddDgArchivesRequest archivesRequest=new AddDgArchivesRequest(); | ||
101 | String bsm_archives= IdWorker.get32UUID(); | ||
102 | archivesRequest.setBsm_archives(bsm_archives); | ||
103 | archivesRequest.setDazt(new BigDecimal("1")); | ||
104 | archivesService.insertDgArchives(archivesRequest); | ||
105 | //新增接收表和档案表关联关系表 | ||
106 | AddDgReceiveRelationRequest relationRequest=new AddDgReceiveRelationRequest(); | ||
107 | relationRequest.setBmsReceive(receiveBsm); | ||
108 | relationRequest.setBsmArchives(bsm_archives); | ||
109 | relationService.insertDgReceiveRelation(relationRequest); | ||
110 | }else if("2".equals(dgreceiveDO.getGdfs())){ | ||
111 | List<AddDgReceiveRelationRequest> relationRequestList=new ArrayList<AddDgReceiveRelationRequest>(); | ||
112 | List<AddDgArchivesRequest> archivesRequest=new ArrayList<AddDgArchivesRequest>(bdcdyRequestList.size()); | ||
113 | AddDgArchivesRequest request1=null; | ||
114 | AddDgReceiveRelationRequest receiveRelationRequest=null; | ||
115 | for (int i = 0; i < bdcdyRequestList.size(); i++) { | ||
116 | //组装档案表基础信息 | ||
117 | String bsm_archives= IdWorker.get32UUID(); | ||
118 | request1=new AddDgArchivesRequest(); | ||
119 | request1.setBsm_archives(bsm_archives); | ||
120 | request1.setDazt(new BigDecimal("1")); | ||
121 | archivesRequest.add(request1); | ||
122 | //组装接收表和档案表关联关系表 | ||
123 | receiveRelationRequest=new AddDgReceiveRelationRequest(); | ||
124 | receiveRelationRequest.setBmsReceive(receiveBsm); | ||
125 | receiveRelationRequest.setBsmArchives(bsm_archives); | ||
126 | relationRequestList.add(receiveRelationRequest); | ||
127 | } | ||
128 | //批量新增接收表和档案表关联关系表 | ||
129 | List<DgReceiveRelationDO> receiveRelationDOList=relationConverter.addReceiveRelationList(relationRequestList); | ||
130 | relationService.saveBatch(receiveRelationDOList); | ||
131 | //批量新增档案表基础信息 | ||
132 | List<DgArchivesDO> archivesDOList=archivesConverter.addArchivesList(archivesRequest); | ||
133 | archivesService.saveBatch(archivesDOList); | ||
134 | }else if("3".equals(dgreceiveDO.getGdfs())){ | ||
135 | //通过业务号和注销业务号查询业务表是否有数据,有数据则修改 | ||
136 | DgBusinessSearchRequest request2=new DgBusinessSearchRequest(); | ||
137 | request2.setYwh(businessRequest.getYwh()); | ||
138 | request2.setZxywh(businessRequest.getZxywh()); | ||
139 | DgBusinessDO businessDO=businessService.searchDgBusiness(request2); | ||
140 | if(businessDO!=null){ | ||
141 | businessDO.setZxlx(businessRequest.getZxlx()); | ||
142 | //更新业务表中的注销类型 | ||
143 | businessMapper.updateById(businessDO); | ||
144 | Date zxsj=null; | ||
145 | for (int i = 0; i < bdcdyRequestList.size(); i++) { | ||
146 | if(businessDO.getBsmArchives().equals(bdcdyRequestList.get(i).getBsmArchives())){ | ||
147 | zxsj=bdcdyRequestList.get(i).getZxsj(); | ||
148 | break; | ||
149 | } | ||
150 | } | ||
151 | //更新不动产单元表中的注销时间 | ||
152 | UpdateDgBdcdyRequest updateDgBdcdyRequest=new UpdateDgBdcdyRequest(); | ||
153 | updateDgBdcdyRequest.setBsmArchives(businessDO.getBsmArchives()); | ||
154 | updateDgBdcdyRequest.setZxsj(zxsj); | ||
155 | bdcdyService.updateDgBdcdyByArchive(updateDgBdcdyRequest); | ||
156 | } | ||
157 | } | ||
158 | //新增业务表 | ||
159 | businessService.insertDgBusiness(businessRequest); | ||
160 | //新增不动产单元号表 | ||
161 | List<DgBdcdyDO> bdcdyDOList=bdcdyConverter.addRequestListDO(bdcdyRequestList); | ||
162 | bdcdyService.saveBatch(bdcdyDOList); | ||
163 | return Result.ok(); | ||
44 | } | 164 | } |
45 | 165 | ||
46 | /** | 166 | /** | ... | ... |
... | @@ -22,4 +22,6 @@ public interface DgReceiveRelationConverter{ | ... | @@ -22,4 +22,6 @@ public interface DgReceiveRelationConverter{ |
22 | DgReceiveRelationListVO do2ListVO(DgReceiveRelationDO dgreceiverelationDO); | 22 | DgReceiveRelationListVO do2ListVO(DgReceiveRelationDO dgreceiverelationDO); |
23 | 23 | ||
24 | List<DgReceiveRelationListVO> doList2ListVOList(List<DgReceiveRelationDO> dgreceiverelationDOList); | 24 | List<DgReceiveRelationListVO> doList2ListVOList(List<DgReceiveRelationDO> dgreceiverelationDOList); |
25 | |||
26 | List<DgReceiveRelationDO> addReceiveRelationList(List<AddDgReceiveRelationRequest> request); | ||
25 | } | 27 | } | ... | ... |
-
Please register or sign in to post a comment