新增档案修改查询数据接口
Showing
18 changed files
with
280 additions
and
282 deletions
... | @@ -3,7 +3,7 @@ package com.pashanhoo.archive.mapper; | ... | @@ -3,7 +3,7 @@ package com.pashanhoo.archive.mapper; |
3 | 3 | ||
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
5 | import com.pashanhoo.archive.entity.DgArchivesDO; | 5 | import com.pashanhoo.archive.entity.DgArchivesDO; |
6 | import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest; | 6 | import org.apache.ibatis.annotations.Param; |
7 | 7 | ||
8 | import java.util.List; | 8 | import java.util.List; |
9 | 9 | ||
... | @@ -17,5 +17,6 @@ import java.util.List; | ... | @@ -17,5 +17,6 @@ import java.util.List; |
17 | */ | 17 | */ |
18 | public interface DgArchivesMapper extends BaseMapper<DgArchivesDO> { | 18 | public interface DgArchivesMapper extends BaseMapper<DgArchivesDO> { |
19 | 19 | ||
20 | boolean updateArchivesInfoByReceiveIdList(@Param("idList") List<String> idList,@Param("dazt") String dazt); | ||
20 | 21 | ||
21 | } | 22 | } | ... | ... |
1 | package com.pashanhoo.common.util.SysCode; | ||
2 | |||
3 | import com.baomidou.mybatisplus.annotation.IdType; | ||
4 | import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | import com.baomidou.mybatisplus.annotation.TableId; | ||
6 | import com.baomidou.mybatisplus.annotation.TableName; | ||
7 | import lombok.Data; | ||
8 | import lombok.EqualsAndHashCode; | ||
9 | |||
10 | import java.io.Serializable; | ||
11 | @Data | ||
12 | @EqualsAndHashCode(callSuper = false) | ||
13 | @TableName("SYS_CODE") | ||
14 | public class SysCodeDO implements Serializable { | ||
15 | private static final long serialVersionUID = 1L; | ||
16 | |||
17 | /** | ||
18 | * 主键 | ||
19 | */ | ||
20 | @TableId(value = "CID", type = IdType.UUID) | ||
21 | private String cid; | ||
22 | /** | ||
23 | * 类型 | ||
24 | */ | ||
25 | @TableField("CTYPE") | ||
26 | private String ctype; | ||
27 | /** | ||
28 | * 任务编码 | ||
29 | */ | ||
30 | @TableField("TASKNO") | ||
31 | private String taskno; | ||
32 | /** | ||
33 | * 任务名称 | ||
34 | */ | ||
35 | @TableField("TASKNAME") | ||
36 | private String taskname; | ||
37 | /** | ||
38 | * 状态 | ||
39 | */ | ||
40 | @TableField("STATE") | ||
41 | private String state; | ||
42 | /** | ||
43 | * 任务值 | ||
44 | */ | ||
45 | @TableField("TASKVALUE") | ||
46 | private String taskvalue; | ||
47 | /** | ||
48 | * 任务子类 | ||
49 | */ | ||
50 | @TableField("TASKCHILD") | ||
51 | private String taskchild; | ||
52 | } |
1 | package com.pashanhoo.common.util.SysCode; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
4 | import org.springframework.beans.factory.annotation.Autowired; | ||
5 | import org.springframework.stereotype.Component; | ||
6 | |||
7 | import java.util.ArrayList; | ||
8 | import java.util.List; | ||
9 | |||
10 | @Component | ||
11 | public class SysCodeUtil { | ||
12 | @Autowired | ||
13 | private SysCodeMapper sysCodeMapper; | ||
14 | @Autowired | ||
15 | private SysCodeConverter converter; | ||
16 | /** | ||
17 | * 编号生成规则 | ||
18 | * @param sysCodeVO | ||
19 | * @return | ||
20 | */ | ||
21 | public String getSequence(SysCodeVO sysCodeVO){ | ||
22 | //1、查询数据是否存在 | ||
23 | SysCodeDO sysCodeDO=queryInfoByCondition(sysCodeVO); | ||
24 | String taskvalue=""; | ||
25 | if(sysCodeDO!=null){ | ||
26 | //2、如果存在在修改编号值 | ||
27 | taskvalue=Integer.valueOf(sysCodeDO.getTaskvalue())+1+""; | ||
28 | sysCodeDO.setTaskvalue(taskvalue); | ||
29 | sysCodeMapper.updateById(sysCodeDO); | ||
30 | }else { | ||
31 | //3、不存在则新增 | ||
32 | taskvalue= getTaskValue(Integer.valueOf(sysCodeVO.getTaskchild())); | ||
33 | sysCodeVO.setTaskvalue(taskvalue); | ||
34 | sysCodeVO.setTaskname("自动生成序列号"); | ||
35 | SysCodeDO sysCodeDO1=converter.addRequest2DO(sysCodeVO); | ||
36 | sysCodeMapper.insert(sysCodeDO1); | ||
37 | } | ||
38 | return taskvalue; | ||
39 | } | ||
40 | |||
41 | private SysCodeDO queryInfoByCondition(SysCodeVO sysCodeVO){ | ||
42 | QueryWrapper<SysCodeDO> wrapper = new QueryWrapper<>(); | ||
43 | wrapper.eq(sysCodeVO.getCtype()!=null && !"".equals(sysCodeVO.getCtype()),"CTYPE",sysCodeVO.getCtype()); | ||
44 | wrapper.eq(sysCodeVO.getTaskno()!=null && !"".equals(sysCodeVO.getTaskno()),"TASKNO",sysCodeVO.getTaskno()); | ||
45 | wrapper.eq("STATE","1"); | ||
46 | wrapper.eq(sysCodeVO.getTaskchild()!=null && !"".equals(sysCodeVO.getTaskchild()),"TASKCHILD",sysCodeVO.getTaskchild()); | ||
47 | SysCodeDO sysCodeDO=sysCodeMapper.selectOne(wrapper); | ||
48 | return sysCodeDO; | ||
49 | |||
50 | } | ||
51 | private String getTaskValue(int length){ | ||
52 | List<String> list=new ArrayList<String>(length-1); | ||
53 | String num=""; | ||
54 | for (int i = 0; i <list.size() ; i++) { | ||
55 | num+="0"; | ||
56 | } | ||
57 | num=num+1; | ||
58 | return num; | ||
59 | } | ||
60 | |||
61 | |||
62 | } |
1 | package com.pashanhoo.common.util.SysCode; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | import lombok.EqualsAndHashCode; | ||
7 | |||
8 | import java.io.Serializable; | ||
9 | @Data | ||
10 | @EqualsAndHashCode(callSuper = false) | ||
11 | @ApiModel(value="编号公共类VO实体") | ||
12 | public class SysCodeVO implements Serializable { | ||
13 | private static final long serialVersionUID = 1L; | ||
14 | /** | ||
15 | * 类型 | ||
16 | */ | ||
17 | @ApiModelProperty(name = "ctype", value = "类型") | ||
18 | private String ctype; | ||
19 | /** | ||
20 | * 任务编码 | ||
21 | */ | ||
22 | @ApiModelProperty(name = "taskno", value = "任务编码") | ||
23 | private String taskno; | ||
24 | /** | ||
25 | * 任务名称 | ||
26 | */ | ||
27 | @ApiModelProperty(name = "taskname", value = "任务名称") | ||
28 | private String taskname; | ||
29 | /** | ||
30 | * 状态 | ||
31 | */ | ||
32 | @ApiModelProperty(name = "state", value = "状态") | ||
33 | private String state; | ||
34 | /** | ||
35 | * 任务值 | ||
36 | */ | ||
37 | @ApiModelProperty(name = "taskvalue", value = "任务值") | ||
38 | private String taskvalue; | ||
39 | /** | ||
40 | * 任务子类 | ||
41 | */ | ||
42 | @ApiModelProperty(name = "taskchild", value = "任务子类") | ||
43 | private String taskchild; | ||
44 | } |
1 | package com.pashanhoo.common.util; | ||
2 | |||
3 | public class SysCodeUtil { | ||
4 | |||
5 | /** | ||
6 | * 获取编号 | ||
7 | * @param ctype | ||
8 | * @param taskNo | ||
9 | * @param taskChild | ||
10 | */ | ||
11 | public static String getSequence(String ctype,String taskNo,String taskChild){ | ||
12 | //1、查询数据是否存在 | ||
13 | //2、如果存在在修改编号值 | ||
14 | //3、不存在则新增 | ||
15 | return ""; | ||
16 | } | ||
17 | |||
18 | |||
19 | |||
20 | } |
... | @@ -2,15 +2,14 @@ package com.pashanhoo.receive.controller; | ... | @@ -2,15 +2,14 @@ package com.pashanhoo.receive.controller; |
2 | 2 | ||
3 | import com.pashanhoo.common.Result; | 3 | import com.pashanhoo.common.Result; |
4 | import com.pashanhoo.receive.entity.vo.AddDgReceiveRequest; | 4 | import com.pashanhoo.receive.entity.vo.AddDgReceiveRequest; |
5 | import com.pashanhoo.receive.entity.vo.UpdateDgReceiveRequest; | ||
6 | import com.pashanhoo.receive.entity.vo.DgReceiveSearchRequest; | 5 | import com.pashanhoo.receive.entity.vo.DgReceiveSearchRequest; |
7 | import com.pashanhoo.receive.service.DgReceiveService; | 6 | import com.pashanhoo.receive.service.DgReceiveService; |
8 | import org.springframework.web.bind.annotation.RestController; | ||
9 | import org.springframework.web.bind.annotation.*; | ||
10 | import io.swagger.annotations.Api; | 7 | import io.swagger.annotations.Api; |
11 | import io.swagger.annotations.ApiOperation; | 8 | import io.swagger.annotations.ApiOperation; |
12 | import io.swagger.annotations.ApiParam; | 9 | import io.swagger.annotations.ApiParam; |
13 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
11 | import org.springframework.web.bind.annotation.*; | ||
12 | |||
14 | import java.util.List; | 13 | import java.util.List; |
15 | 14 | ||
16 | /** | 15 | /** |
... | @@ -29,40 +28,23 @@ public class DgReceiveController { | ... | @@ -29,40 +28,23 @@ public class DgReceiveController { |
29 | private DgReceiveService dgreceiveService; | 28 | private DgReceiveService dgreceiveService; |
30 | 29 | ||
31 | @PostMapping("insertDgReceive") | 30 | @PostMapping("insertDgReceive") |
32 | @ApiOperation("新增档案接收记录") | 31 | @ApiOperation("新增接收记录接口") |
33 | public Result insertDgReceive(@RequestBody AddDgReceiveRequest request){ | 32 | public Result insertDgReceive(@RequestBody AddDgReceiveRequest request){ |
34 | return dgreceiveService.insertDgReceive(request); | 33 | return dgreceiveService.insertDgReceive(request); |
35 | } | 34 | } |
36 | |||
37 | @DeleteMapping("deleteDgReceiveByIds") | ||
38 | @ApiOperation(value = "批量删除档案接收记录") | ||
39 | public Result deleteDgReceiveByIds(@ApiParam("档案接收记录ID列表") @RequestParam(value = "idList") List<String> idList) { | ||
40 | if(dgreceiveService.removeByIds(idList)) { | ||
41 | return Result.ok("删除成功"); | ||
42 | } | ||
43 | return Result.error("删除失败"); | ||
44 | } | ||
45 | |||
46 | @PutMapping("updateDgReceive") | ||
47 | @ApiOperation("修改档案接收记录") | ||
48 | public Result updateDgReceive(@RequestBody UpdateDgReceiveRequest request){ | ||
49 | if(dgreceiveService.updateDgReceive(request)) { | ||
50 | return Result.ok("修改成功"); | ||
51 | } | ||
52 | return Result.error("修改失败"); | ||
53 | } | ||
54 | |||
55 | @GetMapping("getDgReceiveDetailById") | ||
56 | @ApiOperation(value = "读取明细") | ||
57 | public Result getDgReceiveDetailById(@ApiParam("档案接收记录ID") @RequestParam String id){ | ||
58 | return Result.ok(dgreceiveService.getDgReceiveDetailById(id)); | ||
59 | } | ||
60 | |||
61 | @PostMapping("search") | 35 | @PostMapping("search") |
62 | @ApiOperation(value = "根据条件进行列表查询") | 36 | @ApiOperation(value = "根据条件进行列表查询") |
63 | public Result searchDgReceiveList(@RequestBody DgReceiveSearchRequest request) { | 37 | public Result searchDgReceiveList(@RequestBody DgReceiveSearchRequest request) { |
64 | //TODO 默认排序条件设置 | 38 | return dgreceiveService.searchDgReceiveList(request); |
65 | request.defaultFillPageProp("",""); | ||
66 | return Result.ok(dgreceiveService.searchDgReceiveList(request)); | ||
67 | } | 39 | } |
40 | @PostMapping("addBatchArchies") | ||
41 | @ApiOperation("批量归档") | ||
42 | public Result addBatchArchies(@ApiParam("接收记录ID列表") @RequestParam(value = "idList") List<String> idList){ | ||
43 | return dgreceiveService.addBatchArchies(idList); | ||
44 | } | ||
45 | |||
46 | |||
47 | |||
48 | |||
49 | |||
68 | } | 50 | } | ... | ... |
... | @@ -154,5 +154,10 @@ public class DgReceiveDO implements Serializable { | ... | @@ -154,5 +154,10 @@ public class DgReceiveDO implements Serializable { |
154 | */ | 154 | */ |
155 | @TableField("DJYWMC") | 155 | @TableField("DJYWMC") |
156 | private String djywmc; | 156 | private String djywmc; |
157 | /** | ||
158 | * 业务标识码 | ||
159 | */ | ||
160 | @TableField("BSM_YW") | ||
161 | private String bsm_yw; | ||
157 | 162 | ||
158 | } | 163 | } | ... | ... |
1 | package com.pashanhoo.receive.entity.vo; | 1 | package com.pashanhoo.receive.entity.vo; |
2 | 2 | ||
3 | import java.math.BigDecimal; | 3 | import com.pashanhoo.common.PageInfo; |
4 | import java.util.Date; | ||
5 | import java.io.Serializable; | ||
6 | import io.swagger.annotations.ApiModel; | 4 | import io.swagger.annotations.ApiModel; |
7 | import io.swagger.annotations.ApiModelProperty; | 5 | import io.swagger.annotations.ApiModelProperty; |
8 | import lombok.Data; | 6 | import lombok.Data; |
9 | import lombok.EqualsAndHashCode; | 7 | import lombok.EqualsAndHashCode; |
10 | import com.pashanhoo.common.PageInfo; | 8 | |
9 | import java.io.Serializable; | ||
11 | 10 | ||
12 | /** | 11 | /** |
13 | * <p> | 12 | * <p> |
... | @@ -20,139 +19,33 @@ import com.pashanhoo.common.PageInfo; | ... | @@ -20,139 +19,33 @@ import com.pashanhoo.common.PageInfo; |
20 | @Data | 19 | @Data |
21 | @EqualsAndHashCode(callSuper = false) | 20 | @EqualsAndHashCode(callSuper = false) |
22 | @ApiModel(value="档案接收记录列表查询请求实体") | 21 | @ApiModel(value="档案接收记录列表查询请求实体") |
23 | //TODO 初始查询条件是全部,需要根据情况自行删减 | ||
24 | public class DgReceiveSearchRequest extends PageInfo implements Serializable { | 22 | public class DgReceiveSearchRequest extends PageInfo implements Serializable { |
25 | 23 | ||
26 | private static final long serialVersionUID = 1L; | 24 | private static final long serialVersionUID = 1L; |
27 | |||
28 | /** | ||
29 | * 接收标识码 | ||
30 | */ | ||
31 | @ApiModelProperty(name = "bmsReceive", value = "接收标识码") | ||
32 | private String bmsReceive; | ||
33 | |||
34 | /** | 25 | /** |
35 | * 业务来源编码 | 26 | * 业务号 |
36 | */ | 27 | */ |
37 | @ApiModelProperty(name = "ywlyjbm", value = "业务来源编码") | 28 | @ApiModelProperty(name = "ywh", value = "业务号") |
38 | private String ywlyjbm; | 29 | private String ywh; |
39 | |||
40 | /** | 30 | /** |
41 | * 权利类型 | 31 | * 权利类型 |
42 | */ | 32 | */ |
43 | @ApiModelProperty(name = "qllx", value = "权利类型") | 33 | @ApiModelProperty(name = "qllx", value = "权利类型") |
44 | private String qllx; | 34 | private String qllx; |
45 | |||
46 | /** | 35 | /** |
47 | * 登记类型 | 36 | * 登记类型 |
48 | */ | 37 | */ |
49 | @ApiModelProperty(name = "djlx", value = "登记类型") | 38 | @ApiModelProperty(name = "djlx", value = "登记类型") |
50 | private String djlx; | 39 | private String djlx; |
51 | |||
52 | /** | ||
53 | * 收件人员 | ||
54 | */ | ||
55 | @ApiModelProperty(name = "sjry", value = "收件人员") | ||
56 | private String sjry; | ||
57 | |||
58 | /** | ||
59 | * 收件时间 | ||
60 | */ | ||
61 | @ApiModelProperty(name = "sjsj", value = "收件时间") | ||
62 | private Date sjsj; | ||
63 | |||
64 | /** | ||
65 | * 业务号 | ||
66 | */ | ||
67 | @ApiModelProperty(name = "ywh", value = "业务号") | ||
68 | private String ywh; | ||
69 | |||
70 | /** | ||
71 | * 不动产单元号 | ||
72 | */ | ||
73 | @ApiModelProperty(name = "bdcdyh", value = "不动产单元号") | ||
74 | private String bdcdyh; | ||
75 | |||
76 | /** | ||
77 | * 单元总数 | ||
78 | */ | ||
79 | @ApiModelProperty(name = "dyzs", value = "单元总数") | ||
80 | private BigDecimal dyzs; | ||
81 | |||
82 | /** | ||
83 | * 不动产权证号 | ||
84 | */ | ||
85 | @ApiModelProperty(name = "bdcqzh", value = "不动产权证号") | ||
86 | private String bdcqzh; | ||
87 | |||
88 | /** | ||
89 | * 权利人 | ||
90 | */ | ||
91 | @ApiModelProperty(name = "qlr", value = "权利人") | ||
92 | private String qlr; | ||
93 | |||
94 | /** | ||
95 | * 权利人证件号码 | ||
96 | */ | ||
97 | @ApiModelProperty(name = "zjhm", value = "权利人证件号码") | ||
98 | private String zjhm; | ||
99 | |||
100 | /** | ||
101 | * 义务人 | ||
102 | */ | ||
103 | @ApiModelProperty(name = "ywr", value = "义务人") | ||
104 | private String ywr; | ||
105 | |||
106 | /** | ||
107 | * 坐落 | ||
108 | */ | ||
109 | @ApiModelProperty(name = "zl", value = "坐落") | ||
110 | private String zl; | ||
111 | |||
112 | /** | 40 | /** |
113 | * 登记时间 | 41 | * 业务来源编码 |
114 | */ | 42 | */ |
115 | @ApiModelProperty(name = "djsj", value = "登记时间") | 43 | @ApiModelProperty(name = "ywlyjbm", value = "业务来源编码") |
116 | private Date djsj; | 44 | private String ywlyjbm; |
117 | 45 | ||
118 | /** | ||
119 | * 接收时间 | ||
120 | */ | ||
121 | @ApiModelProperty(name = "jssj", value = "接收时间") | ||
122 | private Date jssj; | ||
123 | 46 | ||
124 | /** | ||
125 | * 推送机构编码 | ||
126 | */ | ||
127 | @ApiModelProperty(name = "tsjgbm", value = "推送机构编码") | ||
128 | private String tsjgbm; | ||
129 | 47 | ||
130 | /** | ||
131 | * 归档方式(1:按业务归档,2:按单元归档,3:档案补充归档) | ||
132 | */ | ||
133 | @ApiModelProperty(name = "gdfs", value = "归档方式(1:按业务归档,2:按单元归档,3:档案补充归档)") | ||
134 | private String gdfs; | ||
135 | 48 | ||
136 | /** | ||
137 | * 归档时间 | ||
138 | */ | ||
139 | @ApiModelProperty(name = "gdsj", value = "归档时间") | ||
140 | private Date gdsj; | ||
141 | 49 | ||
142 | /** | ||
143 | * 整理状态(0:待处理,1:已归档) | ||
144 | */ | ||
145 | @ApiModelProperty(name = "state", value = "整理状态(0:待处理,1:已归档)") | ||
146 | private String state; | ||
147 | /** | ||
148 | * 登记业务编码 | ||
149 | */ | ||
150 | @ApiModelProperty(name = "djywbm", value = "登记业务编码") | ||
151 | private String djywbm; | ||
152 | /** | ||
153 | * 登记业务名称 | ||
154 | */ | ||
155 | @ApiModelProperty(name = "djywmc", value = "登记业务名称") | ||
156 | private String djywmc; | ||
157 | 50 | ||
158 | } | 51 | } | ... | ... |
... | @@ -2,6 +2,9 @@ package com.pashanhoo.receive.mapper; | ... | @@ -2,6 +2,9 @@ package com.pashanhoo.receive.mapper; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
4 | import com.pashanhoo.receive.entity.DgReceiveDO; | 4 | import com.pashanhoo.receive.entity.DgReceiveDO; |
5 | import org.apache.ibatis.annotations.Param; | ||
6 | |||
7 | import java.util.List; | ||
5 | 8 | ||
6 | /** | 9 | /** |
7 | * <p> | 10 | * <p> |
... | @@ -13,4 +16,6 @@ import com.pashanhoo.receive.entity.DgReceiveDO; | ... | @@ -13,4 +16,6 @@ import com.pashanhoo.receive.entity.DgReceiveDO; |
13 | */ | 16 | */ |
14 | public interface DgReceiveMapper extends BaseMapper<DgReceiveDO> { | 17 | public interface DgReceiveMapper extends BaseMapper<DgReceiveDO> { |
15 | 18 | ||
19 | boolean updateReceiveBatch(@Param("idList") List<String> idList,@Param("state") String state); | ||
20 | |||
16 | } | 21 | } | ... | ... |
... | @@ -9,6 +9,8 @@ import com.pashanhoo.receive.entity.vo.UpdateDgReceiveRequest; | ... | @@ -9,6 +9,8 @@ import com.pashanhoo.receive.entity.vo.UpdateDgReceiveRequest; |
9 | import com.pashanhoo.receive.entity.vo.DgReceiveSearchRequest; | 9 | import com.pashanhoo.receive.entity.vo.DgReceiveSearchRequest; |
10 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 10 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
11 | 11 | ||
12 | import java.util.List; | ||
13 | |||
12 | /** | 14 | /** |
13 | * <p> | 15 | * <p> |
14 | * 档案接收记录 服务类 | 16 | * 档案接收记录 服务类 |
... | @@ -18,31 +20,28 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ... | @@ -18,31 +20,28 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
18 | * @since 2021-11-05 | 20 | * @since 2021-11-05 |
19 | */ | 21 | */ |
20 | public interface DgReceiveService extends IService<DgReceiveDO> { | 22 | public interface DgReceiveService extends IService<DgReceiveDO> { |
21 | /** | 23 | |
22 | * 新增记录 | 24 | |
25 | /** | ||
26 | * 根据条件进行列表查询 | ||
23 | * @param request | 27 | * @param request |
24 | * @return | 28 | * @return |
25 | */ | 29 | */ |
26 | Result insertDgReceive(AddDgReceiveRequest request); | 30 | Result searchDgReceiveList(DgReceiveSearchRequest request); |
27 | 31 | /** | |
28 | /** | 32 | * 批量归档 |
29 | * 根据主键查询记录详情 | 33 | * @param idList |
30 | * @param id | ||
31 | * @return | 34 | * @return |
32 | */ | 35 | */ |
33 | DgReceiveDetailVO getDgReceiveDetailById(String id); | 36 | Result addBatchArchies(List<String> idList); |
34 | |||
35 | /** | 37 | /** |
36 | * 修改单条记录 | 38 | * 新增接收记录接口 |
37 | * @param request | 39 | * @param request |
38 | * @return | 40 | * @return |
39 | */ | 41 | */ |
40 | boolean updateDgReceive(UpdateDgReceiveRequest request); | 42 | Result insertDgReceive(AddDgReceiveRequest request); |
43 | |||
44 | |||
45 | |||
41 | 46 | ||
42 | /** | ||
43 | * 根据条件进行列表查询 | ||
44 | * @param request | ||
45 | * @return | ||
46 | */ | ||
47 | Result searchDgReceiveList(DgReceiveSearchRequest request); | ||
48 | } | 47 | } | ... | ... |
... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
5 | import com.pashanhoo.archive.entity.DgArchivesConverter; | 5 | import com.pashanhoo.archive.entity.DgArchivesConverter; |
6 | import com.pashanhoo.archive.entity.DgArchivesDO; | 6 | import com.pashanhoo.archive.entity.DgArchivesDO; |
7 | import com.pashanhoo.archive.entity.vo.AddDgArchivesRequest; | 7 | import com.pashanhoo.archive.entity.vo.AddDgArchivesRequest; |
8 | import com.pashanhoo.archive.mapper.DgArchivesMapper; | ||
8 | import com.pashanhoo.archive.service.DgArchivesService; | 9 | import com.pashanhoo.archive.service.DgArchivesService; |
9 | import com.pashanhoo.bdcdy.entity.DgBdcdyConverter; | 10 | import com.pashanhoo.bdcdy.entity.DgBdcdyConverter; |
10 | import com.pashanhoo.bdcdy.entity.DgBdcdyDO; | 11 | import com.pashanhoo.bdcdy.entity.DgBdcdyDO; |
... | @@ -31,6 +32,7 @@ import org.springframework.stereotype.Service; | ... | @@ -31,6 +32,7 @@ import org.springframework.stereotype.Service; |
31 | 32 | ||
32 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 33 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
33 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 34 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
35 | import org.springframework.transaction.annotation.Transactional; | ||
34 | 36 | ||
35 | import java.math.BigDecimal; | 37 | import java.math.BigDecimal; |
36 | import java.util.ArrayList; | 38 | import java.util.ArrayList; |
... | @@ -63,6 +65,8 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive | ... | @@ -63,6 +65,8 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive |
63 | @Autowired | 65 | @Autowired |
64 | private DgArchivesService archivesService; | 66 | private DgArchivesService archivesService; |
65 | @Autowired | 67 | @Autowired |
68 | private DgArchivesMapper dgarchivesMapper; | ||
69 | @Autowired | ||
66 | private DgArchivesConverter archivesConverter; | 70 | private DgArchivesConverter archivesConverter; |
67 | @Autowired | 71 | @Autowired |
68 | private DgReceiveRelationService relationService; | 72 | private DgReceiveRelationService relationService; |
... | @@ -159,29 +163,6 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive | ... | @@ -159,29 +163,6 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive |
159 | bdcdyService.saveBatch(bdcdyDOList); | 163 | bdcdyService.saveBatch(bdcdyDOList); |
160 | return Result.ok(); | 164 | return Result.ok(); |
161 | } | 165 | } |
162 | |||
163 | /** | ||
164 | * 根据主键查询记录详情 | ||
165 | * @param id | ||
166 | * @return | ||
167 | */ | ||
168 | @Override | ||
169 | public DgReceiveDetailVO getDgReceiveDetailById(String id) { | ||
170 | DgReceiveDO dgreceiveDO = this.getById(id); | ||
171 | return dgreceiveConverter.do2DetailVO(dgreceiveDO); | ||
172 | } | ||
173 | |||
174 | /** | ||
175 | * 修改单条记录 | ||
176 | * @param request | ||
177 | * @return | ||
178 | */ | ||
179 | @Override | ||
180 | public boolean updateDgReceive(UpdateDgReceiveRequest request) { | ||
181 | DgReceiveDO dgreceiveDO = dgreceiveConverter.updateRequest2DO(request); | ||
182 | return this.updateById(dgreceiveDO); | ||
183 | } | ||
184 | |||
185 | /** | 166 | /** |
186 | * 根据条件进行列表查询 | 167 | * 根据条件进行列表查询 |
187 | * @param request | 168 | * @param request |
... | @@ -192,12 +173,28 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive | ... | @@ -192,12 +173,28 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive |
192 | Page<DgReceiveDO> pageParam = new Page<DgReceiveDO>(request.getCurrentPage(), request.getPageSize()); | 173 | Page<DgReceiveDO> pageParam = new Page<DgReceiveDO>(request.getCurrentPage(), request.getPageSize()); |
193 | QueryWrapper<DgReceiveDO> wrapper = new QueryWrapper<>(); | 174 | QueryWrapper<DgReceiveDO> wrapper = new QueryWrapper<>(); |
194 | wrapper.eq(request.getYwh()!=null && !"".equals(request.getYwh()),"YWH",request.getYwh()); | 175 | wrapper.eq(request.getYwh()!=null && !"".equals(request.getYwh()),"YWH",request.getYwh()); |
195 | wrapper.eq(request.getDjywbm()!=null && !"".equals(request.getDjywbm()),"DJYWBM",request.getDjywbm()); | 176 | wrapper.eq(request.getQllx()!=null && !"".equals(request.getQllx()),"QLLX",request.getQllx()); |
196 | wrapper.eq(request.getDjlx()!=null && !"".equals(request.getDjlx()),"DJLX",request.getDjlx()); | 177 | wrapper.eq(request.getDjlx()!=null && !"".equals(request.getDjlx()),"DJLX",request.getDjlx()); |
197 | wrapper.eq(request.getYwlyjbm()!=null && !"".equals(request.getYwlyjbm()),"YWLYJBM",request.getYwlyjbm()); | 178 | wrapper.eq(request.getYwlyjbm()!=null && !"".equals(request.getYwlyjbm()),"YWLYJBM",request.getYwlyjbm()); |
179 | wrapper.eq("STATE","0"); | ||
198 | Page page = this.page(pageParam, wrapper); | 180 | Page page = this.page(pageParam, wrapper); |
199 | List<DgReceiveListVO> list=dgreceiveConverter.doList2ListVOList(page.getRecords()); | 181 | List<DgReceiveListVO> list=dgreceiveConverter.doList2ListVOList(page.getRecords()); |
200 | return Result.ok(list); | 182 | return Result.ok(list); |
201 | } | 183 | } |
202 | 184 | ||
185 | @Override | ||
186 | @Transactional(rollbackFor = Exception.class) | ||
187 | public Result addBatchArchies(List<String> idList) { | ||
188 | //更新接收表归档时间和归档状态 | ||
189 | boolean receiveFlag=dgreceiveMapper.updateReceiveBatch(idList,"1");//整理状态(0:待处理,1:已归档) | ||
190 | //查询接收表和档案表的关联关系表找出对应的档案 | ||
191 | //档案状态(1:正在接收;2:正在补录;3:正在修改;4:在库;5:正在销毁;6:已销毁;7:正在借阅;8:已借阅) | ||
192 | boolean archivesFlag=dgarchivesMapper.updateArchivesInfoByReceiveIdList(idList,"4"); | ||
193 | if(receiveFlag && archivesFlag){ | ||
194 | return Result.ok("操作成功"); | ||
195 | }else{ | ||
196 | return Result.ok("操作失败"); | ||
197 | } | ||
198 | } | ||
199 | |||
203 | } | 200 | } | ... | ... |
src/main/java/com/pashanhoo/receiverelation/controller/DgReceiveRelationController.java
deleted
100644 → 0
1 | package com.pashanhoo.receiverelation.controller; | ||
2 | |||
3 | import com.pashanhoo.common.Result; | ||
4 | import com.pashanhoo.receiverelation.entity.vo.AddDgReceiveRelationRequest; | ||
5 | import com.pashanhoo.receiverelation.entity.vo.UpdateDgReceiveRelationRequest; | ||
6 | import com.pashanhoo.receiverelation.entity.vo.DgReceiveRelationSearchRequest; | ||
7 | import com.pashanhoo.receiverelation.service.DgReceiveRelationService; | ||
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-10 | ||
23 | */ | ||
24 | @RestController | ||
25 | @RequestMapping("/system/dgReceiveRelation/") | ||
26 | @Api(tags = "档案接收关联表接口") | ||
27 | public class DgReceiveRelationController { | ||
28 | @Autowired | ||
29 | private DgReceiveRelationService dgreceiverelationService; | ||
30 | |||
31 | @PostMapping("insertDgReceiveRelation") | ||
32 | @ApiOperation("新增档案接收关联表") | ||
33 | public Result insertDgReceiveRelation(@RequestBody AddDgReceiveRelationRequest request){ | ||
34 | if(dgreceiverelationService.insertDgReceiveRelation(request)){ | ||
35 | return Result.ok(); | ||
36 | } | ||
37 | return Result.error("新增失败"); | ||
38 | } | ||
39 | |||
40 | @DeleteMapping("deleteDgReceiveRelationByIds") | ||
41 | @ApiOperation(value = "批量删除档案接收关联表") | ||
42 | public Result deleteDgReceiveRelationByIds(@ApiParam("档案接收关联表ID列表") @RequestParam(value = "idList") List<String> idList) { | ||
43 | if(dgreceiverelationService.removeByIds(idList)) { | ||
44 | return Result.ok("删除成功"); | ||
45 | } | ||
46 | return Result.error("删除失败"); | ||
47 | } | ||
48 | |||
49 | @PutMapping("updateDgReceiveRelation") | ||
50 | @ApiOperation("修改档案接收关联表") | ||
51 | public Result updateDgReceiveRelation(@RequestBody UpdateDgReceiveRelationRequest request){ | ||
52 | if(dgreceiverelationService.updateDgReceiveRelation(request)) { | ||
53 | return Result.ok("修改成功"); | ||
54 | } | ||
55 | return Result.error("修改失败"); | ||
56 | } | ||
57 | |||
58 | @GetMapping("getDgReceiveRelationDetailById") | ||
59 | @ApiOperation(value = "读取明细") | ||
60 | public Result getDgReceiveRelationDetailById(@ApiParam("档案接收关联表ID") @RequestParam String id){ | ||
61 | return Result.ok(dgreceiverelationService.getDgReceiveRelationDetailById(id)); | ||
62 | } | ||
63 | |||
64 | @PostMapping("search") | ||
65 | @ApiOperation(value = "根据条件进行列表查询") | ||
66 | public Result searchDgReceiveRelationList(@RequestBody DgReceiveRelationSearchRequest request) { | ||
67 | //TODO 默认排序条件设置 | ||
68 | request.defaultFillPageProp("",""); | ||
69 | return Result.ok(dgreceiverelationService.searchDgReceiveRelationList(request)); | ||
70 | } | ||
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 DgReceiveRelationSearchRequest extends PageInfo implements Serializable { | 21 | public class DgReceiveRelationSearchRequest extends PageInfo implements Serializable { |
23 | 22 | ||
24 | private static final long serialVersionUID = 1L; | 23 | private static final long serialVersionUID = 1L; | ... | ... |
... | @@ -33,5 +33,15 @@ | ... | @@ -33,5 +33,15 @@ |
33 | <sql id="Base_Column_List"> | 33 | <sql id="Base_Column_List"> |
34 | BSM_ARCHIVES, AJBT, ZTC, FLH, MLH, AJH, ND, JS, YS, BGQX, QSRQ, ZZRQ, MJ, HH, CFWZ, CJR, CJRQ, HCR, BZ, SMZT, DAZT, CDJGBM, DALY | 34 | BSM_ARCHIVES, AJBT, ZTC, FLH, MLH, AJH, ND, JS, YS, BGQX, QSRQ, ZZRQ, MJ, HH, CFWZ, CJR, CJRQ, HCR, BZ, SMZT, DAZT, CDJGBM, DALY |
35 | </sql> | 35 | </sql> |
36 | <update id="updateArchivesInfoByReceiveIdList"> | ||
37 | update DG_ARCHIVES a set a.dazt=#{dazt,jdbcType=VARCHAR} where exists ( | ||
38 | select 1 from dg_receive_relation b where a.BSM_ARCHIVES=b.BSM_ARCHIVES | ||
39 | and b.bms_receive in | ||
40 | <foreach collection="idList" index="index" item="item" | ||
41 | separator="," open="(" close=")"> | ||
42 | #{item,jdbcType=VARCHAR} | ||
43 | </foreach> | ||
44 | ) | ||
45 | </update> | ||
36 | 46 | ||
37 | </mapper> | 47 | </mapper> | ... | ... |
... | @@ -30,4 +30,13 @@ | ... | @@ -30,4 +30,13 @@ |
30 | <sql id="Base_Column_List"> | 30 | <sql id="Base_Column_List"> |
31 | BMS_RECEIVE, YWLYJBM, QLLX, DJLX, SJRY, SJSJ, YWH, BDCDYH, DYZS, BDCQZH, QLR, ZJHM, YWR, ZL, DJSJ, JSSJ, TSJGBM, GDFS, GDSJ, STATE | 31 | BMS_RECEIVE, YWLYJBM, QLLX, DJLX, SJRY, SJSJ, YWH, BDCDYH, DYZS, BDCQZH, QLR, ZJHM, YWR, ZL, DJSJ, JSSJ, TSJGBM, GDFS, GDSJ, STATE |
32 | </sql> | 32 | </sql> |
33 | <update id="updateReceiveBatch"> | ||
34 | update dg_receive b | ||
35 | set b.state = #{state,jdbcType=VARCHAR},b.gdsj=sysdate | ||
36 | where BMS_RECEIVE in | ||
37 | <foreach collection="idList" index="index" item="item" | ||
38 | separator="," open="(" close=")"> | ||
39 | #{item,jdbcType=VARCHAR} | ||
40 | </foreach> | ||
41 | </update> | ||
33 | </mapper> | 42 | </mapper> | ... | ... |
src/main/resources/mapper/SysCodeMapper.xml
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8" ?> | ||
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | <mapper namespace="com.pashanhoo.common.util.SysCode.SysCodeMapper"> | ||
4 | |||
5 | |||
6 | </mapper> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or sign in to post a comment