Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
荆蔚杰
/
java.archive
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4d529b37
authored
2021-11-16 17:23:14 +0800
by
夏齐
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接收接口完善和新增校验功能
1 parent
1dbb1b9a
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
222 additions
and
37 deletions
src/main/java/com/pashanhoo/bdcdy/entity/DgBdcdyDO.java
src/main/java/com/pashanhoo/bdcdy/entity/vo/AddDgBdcdyRequest.java
src/main/java/com/pashanhoo/business/entity/DgBusinessDO.java
src/main/java/com/pashanhoo/business/entity/vo/AddDgBusinessRequest.java
src/main/java/com/pashanhoo/catalog/entity/DgArchivesCatalogConverter.java
src/main/java/com/pashanhoo/catalog/entity/vo/AddDgArchivesCatalogRequest.java
src/main/java/com/pashanhoo/file/entity/DgFileDO.java
src/main/java/com/pashanhoo/file/entity/vo/AddDgFileRequest.java
src/main/java/com/pashanhoo/receive/controller/DgReceiveController.java
src/main/java/com/pashanhoo/receive/entity/vo/AddDgReceiveRequest.java
src/main/java/com/pashanhoo/receive/service/DgReceiveService.java
src/main/java/com/pashanhoo/receive/service/impl/DgReceiveServiceImpl.java
src/main/resources/mapper/DgReceiveMapper.xml
src/main/java/com/pashanhoo/bdcdy/entity/DgBdcdyDO.java
View file @
4d529b3
...
...
@@ -95,6 +95,15 @@ public class DgBdcdyDO implements Serializable {
*/
@TableField
(
"ZXSJ"
)
private
Date
zxsj
;
/**
* 不动产单元类型
*/
@TableField
(
"BDCDYLX"
)
private
String
bdcdylx
;
/**
* 是否挂接
*/
@TableField
(
"SFGJ"
)
private
String
sfgj
;
}
...
...
src/main/java/com/pashanhoo/bdcdy/entity/vo/AddDgBdcdyRequest.java
View file @
4d529b3
...
...
@@ -7,6 +7,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotEmpty
;
/**
* <p>
* 档案不动产信息新增请求实体
...
...
@@ -32,36 +34,42 @@ public class AddDgBdcdyRequest implements Serializable {
/**
* 权利标识码
*/
@NotEmpty
(
message
=
"权利标识码【bsmQl】不能为空"
)
@ApiModelProperty
(
name
=
"bsmQl"
,
value
=
"权利标识码"
)
private
String
bsmQl
;
/**
* 不动产单元ID
*/
@NotEmpty
(
message
=
"不动产单元ID【bdcdyid】不能为空"
)
@ApiModelProperty
(
name
=
"bdcdyid"
,
value
=
"不动产单元ID"
)
private
String
bdcdyid
;
/**
* 不动产单元号
*/
@NotEmpty
(
message
=
"不动产单元号【bdcdyh】不能为空"
)
@ApiModelProperty
(
name
=
"bdcdyh"
,
value
=
"不动产单元号"
)
private
String
bdcdyh
;
/**
* 坐落
*/
@NotEmpty
(
message
=
"坐落【zl】不能为空"
)
@ApiModelProperty
(
name
=
"zl"
,
value
=
"坐落"
)
private
String
zl
;
/**
* 权利人
*/
@NotEmpty
(
message
=
"权利人【qlr】不能为空"
)
@ApiModelProperty
(
name
=
"qlr"
,
value
=
"权利人"
)
private
String
qlr
;
/**
* 权利人证件号
*/
@NotEmpty
(
message
=
"权利人证件号【zjhm】不能为空"
)
@ApiModelProperty
(
name
=
"zjhm"
,
value
=
"权利人证件号"
)
private
String
zjhm
;
...
...
@@ -74,12 +82,14 @@ public class AddDgBdcdyRequest implements Serializable {
/**
* 不动产权证号
*/
@NotEmpty
(
message
=
"不动产权证号【bdcqzh】不能为空"
)
@ApiModelProperty
(
name
=
"bdcqzh"
,
value
=
"不动产权证号"
)
private
String
bdcqzh
;
/**
* 登记时间
*/
@NotEmpty
(
message
=
"登记时间【djsj】不能为空"
)
@ApiModelProperty
(
name
=
"djsj"
,
value
=
"登记时间"
)
private
Date
djsj
;
...
...
@@ -88,6 +98,16 @@ public class AddDgBdcdyRequest implements Serializable {
*/
@ApiModelProperty
(
name
=
"zxsj"
,
value
=
"注销时间"
)
private
Date
zxsj
;
/**
* 不动产单元类型
*/
@NotEmpty
(
message
=
"不动产单元类型【bdcdylx】不能为空"
)
@ApiModelProperty
(
name
=
"bdcdylx"
,
value
=
"不动产单元类型"
)
private
String
bdcdylx
;
/**
* 是否挂接
*/
@ApiModelProperty
(
name
=
"sfgj"
,
value
=
"是否挂接"
)
private
String
sfgj
;
}
...
...
src/main/java/com/pashanhoo/business/entity/DgBusinessDO.java
View file @
4d529b3
...
...
@@ -90,7 +90,11 @@ public class DgBusinessDO implements Serializable {
*/
@TableField
(
"SJSJ"
)
private
Date
sjsj
;
/**
* 收件人员
*/
@TableField
(
"SJRY"
)
private
String
sjry
;
/**
* 原业务标识码
*/
...
...
src/main/java/com/pashanhoo/business/entity/vo/AddDgBusinessRequest.java
View file @
4d529b3
...
...
@@ -9,6 +9,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotEmpty
;
/**
* <p>
* 档案业务信息新增请求实体
...
...
@@ -34,30 +36,35 @@ public class AddDgBusinessRequest implements Serializable {
/**
* 业务号
*/
@NotEmpty
(
message
=
"业务号【ywh】不能为空"
)
@ApiModelProperty
(
name
=
"ywh"
,
value
=
"业务号"
)
private
String
ywh
;
/**
* 登记类型
*/
@NotEmpty
(
message
=
"登记类型【djlx】不能为空"
)
@ApiModelProperty
(
name
=
"djlx"
,
value
=
"登记类型"
)
private
String
djlx
;
/**
* 权利类型
*/
@NotEmpty
(
message
=
"权利类型【qllx】不能为空"
)
@ApiModelProperty
(
name
=
"qllx"
,
value
=
"权利类型"
)
private
String
qllx
;
/**
* 登记机构编码
*/
@NotEmpty
(
message
=
"登记机构编码【djjgbm】不能为空"
)
@ApiModelProperty
(
name
=
"djjgbm"
,
value
=
"登记机构编码"
)
private
String
djjgbm
;
/**
* 登记机构名称
*/
@NotEmpty
(
message
=
"登记机构名称【djjgmc】不能为空"
)
@ApiModelProperty
(
name
=
"djjgmc"
,
value
=
"登记机构名称"
)
private
String
djjgmc
;
/**
...
...
@@ -70,23 +77,24 @@ public class AddDgBusinessRequest implements Serializable {
*/
@ApiModelProperty
(
name
=
"zxlx"
,
value
=
"注销类型"
)
private
String
zxlx
;
/**
* 登记业务名称
*/
@ApiModelProperty
(
name
=
"djywmc"
,
value
=
"登记业务名称"
)
private
String
djywmc
;
/**
* 收件时间
*/
@NotEmpty
(
message
=
"收件时间【sjsj】不能为空"
)
@ApiModelProperty
(
name
=
"sjsj"
,
value
=
"收件时间"
)
private
Date
sjsj
;
/**
* 收件人员
*/
@NotEmpty
(
message
=
"收件人员【sjry】不能为空"
)
@ApiModelProperty
(
name
=
"sjry"
,
value
=
"收件人员"
)
private
String
sjry
;
/**
* 原业务标识码
*/
@NotEmpty
(
message
=
"原业务标识码【bsmYw】不能为空"
)
@ApiModelProperty
(
name
=
"bsmYw"
,
value
=
"原业务标识码"
)
private
String
bsmYw
;
}
...
...
src/main/java/com/pashanhoo/catalog/entity/DgArchivesCatalogConverter.java
View file @
4d529b3
...
...
@@ -23,4 +23,6 @@ public interface DgArchivesCatalogConverter{
DgArchivesCatalogListVO
do2ListVO
(
DgArchivesCatalogDO
dgarchivescatalogDO
);
List
<
DgArchivesCatalogListVO
>
doList2ListVOList
(
List
<
DgArchivesCatalogDO
>
dgarchivescatalogDOList
);
List
<
DgArchivesCatalogDO
>
addcataListDO
(
List
<
AddDgArchivesCatalogRequest
>
request
);
}
...
...
src/main/java/com/pashanhoo/catalog/entity/vo/AddDgArchivesCatalogRequest.java
View file @
4d529b3
...
...
@@ -23,7 +23,11 @@ public class AddDgArchivesCatalogRequest implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
/**
* 目录标识码
*/
@ApiModelProperty
(
name
=
"bsm_catalog"
,
value
=
"目录标识码"
)
private
String
bsm_catalog
;
/**
* 档案标识码
*/
...
...
src/main/java/com/pashanhoo/file/entity/DgFileDO.java
View file @
4d529b3
...
...
@@ -65,6 +65,11 @@ public class DgFileDO implements Serializable {
*/
@TableField
(
"FJSIZE"
)
private
String
fjsize
;
/**
* 附件来源(1:业务附件,2:补录附件)
*/
@TableField
(
"FJLY"
)
private
String
fjly
;
}
...
...
src/main/java/com/pashanhoo/file/entity/vo/AddDgFileRequest.java
View file @
4d529b3
...
...
@@ -58,6 +58,10 @@ public class AddDgFileRequest implements Serializable {
*/
@ApiModelProperty
(
name
=
"fjsize"
,
value
=
"附件大小"
)
private
String
fjsize
;
/**
* 附件来源(1:业务附件,2:补录附件)
*/
@ApiModelProperty
(
name
=
"fjly"
,
value
=
"附件来源(1:业务附件,2:补录附件)"
)
private
String
fjly
;
}
...
...
src/main/java/com/pashanhoo/receive/controller/DgReceiveController.java
View file @
4d529b3
...
...
@@ -8,8 +8,10 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.util.List
;
/**
...
...
@@ -29,8 +31,16 @@ public class DgReceiveController {
@PostMapping
(
"insertDgReceive"
)
@ApiOperation
(
"新增接收记录接口"
)
public
Result
insertDgReceive
(
@RequestBody
AddDgReceiveRequest
request
){
return
dgreceiveService
.
insertDgReceive
(
request
);
public
Result
insertDgReceive
(
@Valid
@RequestBody
AddDgReceiveRequest
request
,
BindingResult
bindingResult
)
{
if
(
bindingResult
.
hasErrors
()){
return
Result
.
checkError
(
bindingResult
.
getAllErrors
().
get
(
0
).
getDefaultMessage
());
}
try
{
dgreceiveService
.
insertDgReceive
(
request
);
}
catch
(
Exception
ex
){
return
Result
.
error
(
ex
.
getMessage
());
}
return
Result
.
ok
();
}
@PostMapping
(
"search"
)
@ApiOperation
(
value
=
"根据条件进行列表查询"
)
...
...
src/main/java/com/pashanhoo/receive/entity/vo/AddDgReceiveRequest.java
View file @
4d529b3
...
...
@@ -13,6 +13,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotEmpty
;
/**
* <p>
* 档案接收记录新增请求实体
...
...
@@ -35,56 +37,67 @@ public class AddDgReceiveRequest implements Serializable {
/**
* 业务来源编码
*/
@NotEmpty
(
message
=
"业务来源编码【ywlyjbm】不能为空"
)
@ApiModelProperty
(
name
=
"ywlyjbm"
,
value
=
"业务来源编码"
)
private
String
ywlyjbm
;
/**
* 权利类型
*/
@NotEmpty
(
message
=
"权利类型【qllx】不能为空"
)
@ApiModelProperty
(
name
=
"qllx"
,
value
=
"权利类型"
)
private
String
qllx
;
/**
* 登记类型
*/
@NotEmpty
(
message
=
"登记类型【djlx】不能为空"
)
@ApiModelProperty
(
name
=
"djlx"
,
value
=
"登记类型"
)
private
String
djlx
;
/**
* 收件人员
*/
@NotEmpty
(
message
=
"收件人员【sjry】不能为空"
)
@ApiModelProperty
(
name
=
"sjry"
,
value
=
"收件人员"
)
private
String
sjry
;
/**
* 收件时间
*/
@NotEmpty
(
message
=
"收件时间【sjsj】不能为空"
)
@ApiModelProperty
(
name
=
"sjsj"
,
value
=
"收件时间"
)
private
Date
sjsj
;
/**
* 业务号
*/
@NotEmpty
(
message
=
"业务号【ywh】不能为空"
)
@ApiModelProperty
(
name
=
"ywh"
,
value
=
"业务号"
)
private
String
ywh
;
/**
* 不动产单元号
*/
@NotEmpty
(
message
=
"不动产单元号【bdcdyh】不能为空"
)
@ApiModelProperty
(
name
=
"bdcdyh"
,
value
=
"不动产单元号"
)
private
String
bdcdyh
;
/**
* 单元总数
*/
@NotEmpty
(
message
=
"单元总数【dyzs】不能为空"
)
@ApiModelProperty
(
name
=
"dyzs"
,
value
=
"单元总数"
)
private
BigDecimal
dyzs
;
/**
* 不动产权证号
*/
@NotEmpty
(
message
=
"不动产权证号【bdcqzh】不能为空"
)
@ApiModelProperty
(
name
=
"bdcqzh"
,
value
=
"不动产权证号"
)
private
String
bdcqzh
;
/**
* 权利人
*/
@NotEmpty
(
message
=
"权利人【qlr】不能为空"
)
@ApiModelProperty
(
name
=
"qlr"
,
value
=
"权利人"
)
private
String
qlr
;
/**
* 权利人证件号码
*/
@NotEmpty
(
message
=
"权利人证件号码【zjhm】不能为空"
)
@ApiModelProperty
(
name
=
"zjhm"
,
value
=
"权利人证件号码"
)
private
String
zjhm
;
/**
...
...
@@ -95,24 +108,47 @@ public class AddDgReceiveRequest implements Serializable {
/**
* 坐落
*/
@NotEmpty
(
message
=
"坐落【zl】不能为空"
)
@ApiModelProperty
(
name
=
"zl"
,
value
=
"坐落"
)
private
String
zl
;
/**
* 登记时间
*/
@NotEmpty
(
message
=
"登记时间【djsj】不能为空"
)
@ApiModelProperty
(
name
=
"djsj"
,
value
=
"登记时间"
)
private
Date
djsj
;
/**
* 接收时间
*/
@NotEmpty
(
message
=
"接收时间【jssj】不能为空"
)
@ApiModelProperty
(
name
=
"jssj"
,
value
=
"接收时间"
)
private
Date
jssj
;
/**
* 推送机构编码
*/
@NotEmpty
(
message
=
"推送机构编码【tsjgbm】不能为空"
)
@ApiModelProperty
(
name
=
"tsjgbm"
,
value
=
"推送机构编码"
)
private
String
tsjgbm
;
/**
* 登记业务编码
*/
@NotEmpty
(
message
=
"登记业务编码【djywbm】不能为空"
)
@ApiModelProperty
(
name
=
"djywbm"
,
value
=
"登记业务编码"
)
private
String
djywbm
;
/**
* 登记业务名称
*/
@NotEmpty
(
message
=
"登记业务名称【djywmc】不能为空"
)
@ApiModelProperty
(
name
=
"djywmc"
,
value
=
"登记业务名称"
)
private
String
djywmc
;
/**
* 业务标识码
*/
@NotEmpty
(
message
=
"业务标识码【bsm_yw】不能为空"
)
@ApiModelProperty
(
name
=
"bsm_yw"
,
value
=
"业务标识码"
)
private
String
bsm_yw
;
/**
* 推送业务信息
*/
@ApiModelProperty
(
name
=
"businessRequest"
,
value
=
"推送业务信息"
)
...
...
src/main/java/com/pashanhoo/receive/service/DgReceiveService.java
View file @
4d529b3
...
...
@@ -39,7 +39,7 @@ public interface DgReceiveService extends IService<DgReceiveDO> {
* @param request
* @return
*/
Result
insertDgReceive
(
AddDgReceiveRequest
request
);
Result
insertDgReceive
(
AddDgReceiveRequest
request
)
throws
Exception
;
...
...
src/main/java/com/pashanhoo/receive/service/impl/DgReceiveServiceImpl.java
View file @
4d529b3
package
com
.
pashanhoo
.
receive
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pashanhoo.archive.entity.DgArchivesConverter
;
import
com.pashanhoo.archive.entity.DgArchivesDO
;
...
...
@@ -17,10 +19,22 @@ import com.pashanhoo.business.entity.vo.AddDgBusinessRequest;
import
com.pashanhoo.business.entity.vo.DgBusinessSearchRequest
;
import
com.pashanhoo.business.mapper.DgBusinessMapper
;
import
com.pashanhoo.business.service.DgBusinessService
;
import
com.pashanhoo.catalog.entity.DgArchivesCatalogConverter
;
import
com.pashanhoo.catalog.entity.DgArchivesCatalogDO
;
import
com.pashanhoo.catalog.entity.vo.AddDgArchivesCatalogRequest
;
import
com.pashanhoo.catalog.service.DgArchivesCatalogService
;
import
com.pashanhoo.common.Result
;
import
com.pashanhoo.common.util.fileupload.MinioUtil
;
import
com.pashanhoo.file.entity.DgFileConverter
;
import
com.pashanhoo.file.entity.DgFileDO
;
import
com.pashanhoo.file.entity.vo.FileAttribute
;
import
com.pashanhoo.file.service.DgFileService
;
import
com.pashanhoo.receive.entity.DgReceiveConverter
;
import
com.pashanhoo.receive.entity.DgReceiveDO
;
import
com.pashanhoo.receive.entity.vo.*
;
import
com.pashanhoo.receive.entity.vo.AddDgReceiveRequest
;
import
com.pashanhoo.receive.entity.vo.DgReceiveListVO
;
import
com.pashanhoo.receive.entity.vo.DgReceiveSearchRequest
;
import
com.pashanhoo.receive.entity.vo.DjywbmVO
;
import
com.pashanhoo.receive.mapper.DgReceiveMapper
;
import
com.pashanhoo.receive.service.DgReceiveService
;
import
com.pashanhoo.receiverelation.entity.DgReceiveRelationConverter
;
...
...
@@ -29,12 +43,12 @@ import com.pashanhoo.receiverelation.entity.vo.AddDgReceiveRelationRequest;
import
com.pashanhoo.receiverelation.service.DgReceiveRelationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
java.math.BigDecimal
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -72,6 +86,16 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive
private
DgReceiveRelationService
relationService
;
@Autowired
private
DgReceiveRelationConverter
relationConverter
;
@Autowired
private
DgArchivesCatalogConverter
catalogConverter
;
@Autowired
private
DgArchivesCatalogService
catalogService
;
@Autowired
private
DgFileConverter
fileConverter
;
@Autowired
private
DgFileService
fileService
;
@Autowired
private
MinioUtil
minioUtil
;
/**
* 新增记录
...
...
@@ -79,22 +103,31 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive
* @return
*/
@Override
public
Result
insertDgReceive
(
AddDgReceiveRequest
request
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
insertDgReceive
(
AddDgReceiveRequest
request
)
throws
Exception
{
long
starttime
=
System
.
currentTimeMillis
();
//TODO字段值校验
//新增接收表信息=============start===========
//获取接收编码
String
receiveBsm
=
IdWorker
.
get32UUID
();
request
.
setBms_receive
(
receiveBsm
);
//新增接收表信息=============start===========
DjywbmVO
djywbmVO
=
dgreceiveMapper
.
getDjywbmInfo
(
request
.
getDjywbm
());
DgReceiveDO
dgreceiveDO
=
dgreceiveConverter
.
addRequest2DO
(
request
);
//TODO获取归档方式
if
(
dgreceiveDO
.
getGdfs
()==
null
||
""
.
equals
(
dgreceiveDO
.
getGdfs
())){
dgreceiveDO
.
setGdfs
(
"1"
);
if
(
djywbmVO
!=
null
){
dgreceiveDO
.
setDjywbm
(
djywbmVO
.
getDjywbm
());
dgreceiveDO
.
setDjywmc
(
djywbmVO
.
getDjywmc
());
dgreceiveDO
.
setGdfs
(
djywbmVO
.
getGdfs
());
}
this
.
save
(
dgreceiveDO
);
//新增接收表信息=============end===========
//获取登记传入的不动产单元List集合数据
List
<
AddDgBdcdyRequest
>
bdcdyRequestList
=
request
.
getBdcdyRequestList
();
//获取登记传入的业务数据
AddDgBusinessRequest
businessRequest
=
request
.
getBusinessRequest
();
//获取目录信息
List
<
AddDgArchivesCatalogRequest
>
catalogRequestList
=
request
.
getCatalogRequests
();
//归档方式(1:按业务归档,2:按单元归档,3:档案补充归档)
if
(
"1"
.
equals
(
dgreceiveDO
.
getGdfs
())){
//新增档案表基础信息
...
...
@@ -108,23 +141,27 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive
relationRequest
.
setBmsReceive
(
receiveBsm
);
relationRequest
.
setBsmArchives
(
bsm_archives
);
relationService
.
insertDgReceiveRelation
(
relationRequest
);
//新增目录和文件信息
dealCatalogAndFile
(
catalogRequestList
,
bsm_archives
);
}
else
if
(
"2"
.
equals
(
dgreceiveDO
.
getGdfs
())){
List
<
AddDgReceiveRelationRequest
>
relationRequestList
=
new
ArrayList
<
AddDgReceiveRelationRequest
>();
List
<
AddDgArchivesRequest
>
archivesRequest
=
new
ArrayList
<
AddDgArchivesRequest
>(
bdcdyRequestList
.
size
());
AddDgArchivesRequest
r
equest1
=
null
;
AddDgArchivesRequest
archivesR
equest1
=
null
;
AddDgReceiveRelationRequest
receiveRelationRequest
=
null
;
for
(
int
i
=
0
;
i
<
bdcdyRequestList
.
size
();
i
++)
{
//组装档案表基础信息
String
bsm_archives
=
IdWorker
.
get32UUID
();
r
equest1
=
new
AddDgArchivesRequest
();
r
equest1
.
setBsmArchives
(
bsm_archives
);
r
equest1
.
setDazt
(
1
);
archivesRequest
.
add
(
r
equest1
);
archivesR
equest1
=
new
AddDgArchivesRequest
();
archivesR
equest1
.
setBsmArchives
(
bsm_archives
);
archivesR
equest1
.
setDazt
(
1
);
archivesRequest
.
add
(
archivesR
equest1
);
//组装接收表和档案表关联关系表
receiveRelationRequest
=
new
AddDgReceiveRelationRequest
();
receiveRelationRequest
.
setBmsReceive
(
receiveBsm
);
receiveRelationRequest
.
setBsmArchives
(
bsm_archives
);
relationRequestList
.
add
(
receiveRelationRequest
);
//新增目录和文件信息
dealCatalogAndFile
(
catalogRequestList
,
bsm_archives
);
}
//批量新增接收表和档案表关联关系表
List
<
DgReceiveRelationDO
>
receiveRelationDOList
=
relationConverter
.
addReceiveRelationList
(
relationRequestList
);
...
...
@@ -134,10 +171,10 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive
archivesService
.
saveBatch
(
archivesDOList
);
}
else
if
(
"3"
.
equals
(
dgreceiveDO
.
getGdfs
())){
//通过业务号和注销业务号查询业务表是否有数据,有数据则修改
DgBusinessSearchRequest
request2
=
new
DgBusinessSearchRequest
();
request2
.
setYwh
(
businessRequest
.
getYwh
());
request2
.
setZxywh
(
businessRequest
.
getZxywh
());
DgBusinessDO
businessDO
=
businessService
.
searchDgBusiness
(
request2
);
DgBusinessSearchRequest
searchRequest
=
new
DgBusinessSearchRequest
();
searchRequest
.
setYwh
(
businessRequest
.
getYwh
());
searchRequest
.
setZxywh
(
businessRequest
.
getZxywh
());
DgBusinessDO
businessDO
=
businessService
.
searchDgBusiness
(
searchRequest
);
if
(
businessDO
!=
null
){
businessDO
.
setZxlx
(
businessRequest
.
getZxlx
());
//更新业务表中的注销类型
...
...
@@ -158,11 +195,57 @@ public class DgReceiveServiceImpl extends ServiceImpl<DgReceiveMapper, DgReceive
}
//新增业务表
businessService
.
insertDgBusiness
(
businessRequest
);
//新增不动产单元号表
//
批量
新增不动产单元号表
List
<
DgBdcdyDO
>
bdcdyDOList
=
bdcdyConverter
.
addRequestListDO
(
bdcdyRequestList
);
bdcdyService
.
saveBatch
(
bdcdyDOList
);
long
endtime
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"===================该方法总共耗时:"
+(
endtime
-
starttime
)/
1000
+
"秒"
);
return
Result
.
ok
();
}
/**
* 公共增加目录表和文件表信息
* @param catalogRequestList
* @param bsm_archives
*/
private
void
dealCatalogAndFile
(
List
<
AddDgArchivesCatalogRequest
>
catalogRequestList
,
String
bsm_archives
)
throws
Exception
{
try
{
//批量组装文件信息=======start=========
List
<
DgFileDO
>
fileDOList
=
new
ArrayList
<
DgFileDO
>();
DgFileDO
fileDO
=
null
;
for
(
int
j
=
0
;
j
<
catalogRequestList
.
size
();
j
++)
{
catalogRequestList
.
get
(
j
).
setBsmArchives
(
bsm_archives
);
String
cataLogBsm
=
IdWorker
.
get32UUID
();
catalogRequestList
.
get
(
j
).
setBsm_catalog
(
cataLogBsm
);
List
<
String
>
fileList
=
catalogRequestList
.
get
(
j
).
getFileList
();
for
(
int
k
=
0
;
k
<
fileList
.
size
()
;
k
++)
{
fileDO
=
new
DgFileDO
();
File
file
=
new
File
(
fileList
.
get
(
k
));
InputStream
is
=
new
FileInputStream
(
file
);
String
filetype
=
file
.
getName
().
substring
(
file
.
getName
().
lastIndexOf
(
"."
));
//文件上传
FileAttribute
attribute
=
minioUtil
.
transferToMinio
(
is
,
file
.
getName
(),
filetype
,
String
.
valueOf
(
file
.
length
()));
fileDO
.
setBsmCatalog
(
cataLogBsm
);
fileDO
.
setKzm
(
attribute
.
getExpandName
());
fileDO
.
setScr
(
"admin"
);
fileDO
.
setFjurl
(
attribute
.
getSaveUrl
());
fileDO
.
setFjsize
(
attribute
.
getFileSize
());
fileDO
.
setFjly
(
"1"
);
fileDOList
.
add
(
fileDO
);
}
}
//批量组装文件信息=======end=========
//批量组装目录信息
List
<
DgArchivesCatalogDO
>
catalogDOList
=
catalogConverter
.
addcataListDO
(
catalogRequestList
);
//批量新增目录信息
catalogService
.
saveBatch
(
catalogDOList
);
//批量新增对应文件信息
fileService
.
saveBatch
(
fileDOList
);
}
catch
(
Exception
ex
){
throw
ex
;
}
}
/**
* 根据条件进行列表查询
* @param request
...
...
src/main/resources/mapper/DgReceiveMapper.xml
View file @
4d529b3
...
...
@@ -40,6 +40,6 @@
</foreach>
</update>
<select
id=
"getDjywbmInfo"
resultType=
"com.pashanhoo.receive.entity.vo.DjywbmVO"
>
select * from SYS_CONVERT_DJYWBM t where oncedjywbm=#{oncedjywbm,jdbcType=VARCHAR}
select * from SYS_CONVERT_DJYWBM t where oncedjywbm=#{oncedjywbm,jdbcType=VARCHAR}
and state='1'
</select>
</mapper>
...
...
Please
register
or
sign in
to post a comment