Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
ea851a1b
Commit
ea851a1b
authored
Sep 28, 2024
by
xiachenqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0928
parent
a311b2cd
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
433 additions
and
23 deletions
+433
-23
pom.xml
pom.xml
+2
-2
ExportXMLApi.java
src/main/java/com/yxproject/start/api/ExportXMLApi.java
+140
-7
ExtensionApi.java
src/main/java/com/yxproject/start/api/ExtensionApi.java
+57
-0
PersonPostApi.java
src/main/java/com/yxproject/start/api/PersonPostApi.java
+1
-1
ExtensionGatAnalysisResultDto.java
...om/yxproject/start/dto/ExtensionGatAnalysisResultDto.java
+17
-0
ExtensionGatDto.java
src/main/java/com/yxproject/start/dto/ExtensionGatDto.java
+30
-0
ExtensionMapper.java
...main/java/com/yxproject/start/mapper/ExtensionMapper.java
+42
-0
TaskListMapper.java
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
+1
-1
ExtensionServiceImpl.java
...om/yxproject/start/service/impl/ExtensionServiceImpl.java
+129
-0
ImportXmlServiceImpl.java
...om/yxproject/start/service/impl/ImportXmlServiceImpl.java
+2
-2
application.yml
src/main/resources/application.yml
+1
-0
excelAndSearch.html
...resources/static/views/excelAndSearch/excelAndSearch.html
+2
-2
excelAndSearch.js
...n/resources/static/views/excelAndSearch/excelAndSearch.js
+3
-2
searchCardMsg.js
...ain/resources/static/views/searchCardMsg/searchCardMsg.js
+6
-6
No files found.
pom.xml
View file @
ea851a1b
...
...
@@ -62,12 +62,12 @@
<dependency>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
<version>
1.
3.3
</version>
<version>
1.
5
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml-schemas
</artifactId>
<version>
3.14
</version>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
net.sourceforge.jexcelapi
</groupId>
...
...
src/main/java/com/yxproject/start/api/ExportXMLApi.java
View file @
ea851a1b
...
...
@@ -78,7 +78,7 @@ public class ExportXMLApi {
for
(
Long
cardTypeId
:
cardTypeProPersonListMap
.
keySet
())
{
// 开始按证件类型遍历
//区分邮寄证和大批证件类型
//大批证
if
(
cardTypeId
==
0
||
cardTypeId
==
10
||
cardTypeId
==
5
||
cardTypeId
==
7
)
{
if
(
cardTypeId
==
0
||
cardTypeId
==
10
||
cardTypeId
==
5
||
cardTypeId
==
7
)
{
List
dwdmProPersonLists
=
new
ArrayList
();
// 得到某一种证件类型的entityList
List
<
PreproPersonDto
>
preproPersonEntityList
=
(
List
<
PreproPersonDto
>)
cardTypeProPersonListMap
.
get
(
cardTypeId
);
...
...
@@ -100,7 +100,7 @@ public class ExportXMLApi {
}
dwdmProPersonLists
.
add
(
dwdmProPersonListMap
);
// (这个层级似乎是多余的)把某种制证类型下 所有按单位代码划分的entityList集合的map写入一个list(这个list中只有一个元素)
cardTypeDwdmEntityLists
.
add
(
dwdmProPersonLists
);
}
else
{
}
else
if
(
cardTypeId
==
9
||
cardTypeId
==
11
||
cardTypeId
==
4
||
cardTypeId
==
6
)
{
//邮寄证
List
list
=
new
ArrayList
();
List
<
PreproPersonDto
>
preproPersonEntityList
=
(
List
<
PreproPersonDto
>)
cardTypeProPersonListMap
.
get
(
cardTypeId
);
...
...
@@ -138,9 +138,11 @@ public class ExportXMLApi {
List
<
PreproPersonDto
>
preproPersonEntityList1
=
(
List
<
PreproPersonDto
>)
list1
;
List
<
FilesEntity
>
filesEntities
=
filesService
.
selectFilesEntityById
(
preproPersonEntityList1
.
get
(
0
).
getFileId
().
toString
());
FilesEntity
filesEntity
=
new
FilesEntity
();
if
(
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
9
||
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
11
||
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
4
||
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
6
)
{
if
(
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
9
||
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
11
||
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
4
||
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
6
)
{
filesEntity
.
setVersionCode
(
"3.00"
);
filesEntity
.
setCreateTime
(
getCurrentDate2String
(
"yyyyMMddhhmmss"
));
filesEntity
.
setDwmc
(
"北京市公安局人口管理总队证件管理大队"
);
filesEntity
.
setDwdm
(
"110001580800"
);
}
else
{
...
...
@@ -151,9 +153,15 @@ public class ExportXMLApi {
String
xml
=
null
;
try
{
//生成XML制证包
xml
=
createToMakePackageXML
(
preproPersonEntityList1
,
finalFilesEntity
);
if
(
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
5
||
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
7
||
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
4
||
preproPersonEntityList1
.
get
(
0
).
getCardTypeId
()
==
6
)
{
xml
=
createToGatMakePackageXML
(
preproPersonEntityList1
,
filesEntity
);
}
else
{
//生成XML制证包
xml
=
createToMakePackageXML
(
preproPersonEntityList1
,
finalFilesEntity
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"个人上传受理号:"
+
uploadNo
+
"个人身份证号:"
+
IDCard
+
"包号:"
+
oldFile
+
"新文件名:"
+
newFile
+
"签发机关:"
+
SSXQDM
+
"制证类型:"
+
cardType
+
"是否有效(1有效,0无效):"
+
state
+
"下载时间:"
+
uploadDate2
+
"下载状态(0未下载,1已下载):"
+
downloadState
);
...
...
@@ -353,6 +361,131 @@ public class ExportXMLApi {
return
"D:\\XML\\"
+
"ZAGL_YDZZ_"
+
filesEntity
.
getDwdm
()
+
getCurrentDate2String
(
"yyyyMMdd"
)
+
cardType
+
files_seq
+
".xml"
;
}
/**
* 创建港澳台 制证xml
*
* @param preproPersonEntities person实体List
* @param filesEntity 文件实体
* @return {@link String }
*/
private
String
createToGatMakePackageXML
(
List
<
PreproPersonDto
>
preproPersonEntities
,
FilesEntity
filesEntity
)
{
long
cardTypeTem
=
preproPersonEntities
.
get
(
0
).
getCardTypeId
();
Document
document
=
DocumentHelper
.
createDocument
();
Element
PACKAGE
=
DocumentHelper
.
createElement
(
"PACKAGE"
);
document
.
setRootElement
(
PACKAGE
);
Element
PACKAGEHEAD
=
PACKAGE
.
addElement
(
"PACKAGEHEAD"
);
Element
DATA
=
PACKAGE
.
addElement
(
"DATA"
);
Element
BBH
=
PACKAGEHEAD
.
addElement
(
"BBH"
);
BBH
.
setText
(
filesEntity
.
getVersionCode
());
Element
DWDM
=
PACKAGEHEAD
.
addElement
(
"DWDM"
);
DWDM
.
setText
(
filesEntity
.
getDwdm
());
Element
DWMC
=
PACKAGEHEAD
.
addElement
(
"DWMC"
);
DWMC
.
setText
(
filesEntity
.
getDwmc
());
Element
JLS
=
PACKAGEHEAD
.
addElement
(
"JLS"
);
JLS
.
setText
(
preproPersonEntities
.
size
()
+
""
);
Element
SCSJ
=
PACKAGEHEAD
.
addElement
(
"SCSJ"
);
SCSJ
.
setText
(
getCurrentDate2String
(
"yyyyMMddhhmmss"
));
NewFilesEntity
newFilesEntity
=
new
NewFilesEntity
();
newFilesEntity
.
setCreateDate
(
getCurrentDate2String
(
"yyyyMMddhhmmss"
));
newFilesEntity
.
setDwdm
(
filesEntity
.
getDwdm
());
newFilesEntity
.
setDwmc
(
filesEntity
.
getDwmc
());
newFilesEntity
.
setVersionCode
(
filesEntity
.
getVersionCode
());
newFilesEntity
.
setRecordNumber
((
long
)
preproPersonEntities
.
size
());
long
l
=
newFilesService
.
saveNewFiles
(
newFilesEntity
);
String
xml_seq
=
querySequenceSercive
.
selectSequenceNextValue
(
"XML_SEQ"
);
String
files_seq
=
autoGenericCode
(
xml_seq
,
4
);
newFilesEntity
.
setNewFileName
(
"ZAGL_GATZZ_"
+
filesEntity
.
getDwdm
()
+
getCurrentDate2String
(
"yyyyMMdd"
)
+
cardTypeTem
+
files_seq
);
newFilesService
.
updateNewFileName
(
newFilesEntity
);
Element
SJBBH
=
PACKAGEHEAD
.
addElement
(
"SJBBH"
);
SJBBH
.
setText
(
filesEntity
.
getDwdm
()
+
getCurrentDate2String
(
"yyyyMMdd"
)
+
cardTypeTem
+
files_seq
);
int
NO
=
1
;
long
cardType
=
0
;
for
(
PreproPersonDto
preproPersonEntity
:
preproPersonEntities
)
{
Element
RECORD
=
DATA
.
addElement
(
"RECORD"
);
RECORD
.
addAttribute
(
"no"
,
NO
+
""
);
RECORD
.
addAttribute
(
"sid"
,
preproPersonEntity
.
getSid
());
Element
GATJMJZZSLH
=
RECORD
.
addElement
(
"GATJMJZZSLH"
);
GATJMJZZSLH
.
setText
(
preproPersonEntity
.
getJmsfzslh
());
Element
GMSFHM
=
RECORD
.
addElement
(
"GMSFHM"
);
GMSFHM
.
setText
(
preproPersonEntity
.
getGmsfhm
());
Element
XM
=
RECORD
.
addElement
(
"XM"
);
XM
.
setText
(
replaceNullString
(
preproPersonEntity
.
getXm
()));
Element
XBDM
=
RECORD
.
addElement
(
"XBDM"
);
XBDM
.
setText
(
replaceNullString
(
preproPersonEntity
.
getXbdm
()));
// Element MZDM = RECORD.addElement("MZDM");
// MZDM.setText(replaceNullString(preproPersonEntity.getMzdm()));
Element
CSRQ
=
RECORD
.
addElement
(
"CSRQ"
);
CSRQ
.
setText
(
replaceNullString
(
preproPersonEntity
.
getCsrq
()));
Element
SSXQDM
=
RECORD
.
addElement
(
"SSXQDM"
);
SSXQDM
.
setText
(
replaceNullString
(
preproPersonEntity
.
getSsxqdm
()));
Element
DZMC
=
RECORD
.
addElement
(
"DZMC"
);
DZMC
.
setText
(
replaceNullString
(
preproPersonEntity
.
getDzmc
()));
Element
SDXP
=
RECORD
.
addElement
(
"SDXP"
);
SDXP
.
setText
(
replaceNullString
(
preproPersonEntity
.
getSdxp
()));
Element
ZWY_ZWTXSJ
=
RECORD
.
addElement
(
"ZWY_ZWTXSJ"
);
ZWY_ZWTXSJ
.
setText
(
replaceNullString
(
preproPersonEntity
.
getZwyZwtxsj
()));
Element
ZWY_ZWTZSJ
=
RECORD
.
addElement
(
"ZWY_ZWTZSJ"
);
ZWY_ZWTZSJ
.
setText
(
replaceNullString
(
preproPersonEntity
.
getZwyZwtzsj
()));
Element
ZWE_ZWTXSJ
=
RECORD
.
addElement
(
"ZWE_ZWTXSJ"
);
ZWE_ZWTXSJ
.
setText
(
replaceNullString
(
preproPersonEntity
.
getZweZwtxsj
()));
Element
ZWE_ZWTZSJ
=
RECORD
.
addElement
(
"ZWE_ZWTZSJ"
);
ZWE_ZWTZSJ
.
setText
(
replaceNullString
(
preproPersonEntity
.
getZweZwtzsj
()));
Element
QFJG_GAJGMC
=
RECORD
.
addElement
(
"QFJG_GAJGMC"
);
QFJG_GAJGMC
.
setText
(
replaceNullString
(
preproPersonEntity
.
getQfjgGajgmc
()));
Element
GATJMJZZYXQQSRQ
=
RECORD
.
addElement
(
"GATJMJZZYXQQSRQ"
);
GATJMJZZYXQQSRQ
.
setText
(
preproPersonEntity
.
getYxqqsrq
());
Element
GATJMJZZYXQJZRQ
=
RECORD
.
addElement
(
"GATJMJZZYXQJZRQ"
);
GATJMJZZYXQJZRQ
.
setText
(
preproPersonEntity
.
getYxqjzrq
());
Element
QFCS
=
RECORD
.
addElement
(
"QFCS"
);
// 签发次数保存在身份证的 性别民族文字 字段
QFCS
.
setText
(
preproPersonEntity
.
getXbmzwz
());
Element
TXZHM
=
RECORD
.
addElement
(
"TXZHM"
);
// 通行证号码保存在 姓名民族文字 字段
TXZHM
.
setText
(
preproPersonEntity
.
getXmmzwz
());
Element
GATJMJZZSLYYDM
=
RECORD
.
addElement
(
"GATJMJZZSLYYDM"
);
GATJMJZZSLYYDM
.
setText
(
preproPersonEntity
.
getJmsfzslyydm
());
Element
GATJMJZZZZLXDM
=
RECORD
.
addElement
(
"GATJMJZZZZLXDM"
);
GATJMJZZZZLXDM
.
setText
(
preproPersonEntity
.
getJmsfzzzlxdm
());
Element
GATJMJZZLZFSDM
=
RECORD
.
addElement
(
"GATJMJZZLZFSDM"
);
GATJMJZZLZFSDM
.
setText
(
preproPersonEntity
.
getJmsfzlzfsdm
());
Element
SJR_XM
=
RECORD
.
addElement
(
"SJR_XM"
);
SJR_XM
.
setText
(
replaceNullString
(
preproPersonEntity
.
getSjrXm
()));
Element
SJR_LXDH
=
RECORD
.
addElement
(
"SJR_LXDH"
);
SJR_LXDH
.
setText
(
replaceNullString
(
preproPersonEntity
.
getSjrLxdh
()));
Element
SJR_YZBM
=
RECORD
.
addElement
(
"SJR_YZBM"
);
SJR_YZBM
.
setText
(
replaceNullString
(
preproPersonEntity
.
getSjrYzbm
()));
Element
SJR_TXDZ
=
RECORD
.
addElement
(
"SJR_TXDZ"
);
SJR_TXDZ
.
setText
(
replaceNullString
(
preproPersonEntity
.
getSjrTxdz
()));
NO
++;
preproPersonEntity
.
setNewFileId
(
newFilesEntity
.
getId
());
cardType
=
preproPersonEntity
.
getCardTypeId
();
}
threadPool
.
execute
(()
->
{
try
{
preproPersonService
.
updatePreproPerson_NewFileName
(
preproPersonEntities
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
});
try
{
// 受理层中已经有6了 所以包号使用3作为台湾邮寄证的标识
if
(
cardType
==
6
)
cardType
=
3
;
FileOutputStream
fos
=
new
FileOutputStream
(
"D:\\XML\\"
+
"ZAGL_GATZZ_"
+
filesEntity
.
getDwdm
()
+
getCurrentDate2String
(
"yyyyMMdd"
)
+
cardType
+
files_seq
+
".xml"
);
OutputStreamWriter
osw
=
new
OutputStreamWriter
(
fos
,
"UTF-8"
);
OutputFormat
of
=
new
OutputFormat
();
of
.
setEncoding
(
"UTF-8"
);
of
.
setIndent
(
true
);
of
.
setNewlines
(
true
);
of
.
setNewLineAfterDeclaration
(
false
);
XMLWriter
writer
=
new
XMLWriter
(
osw
,
of
);
writer
.
write
(
document
);
writer
.
close
();
}
catch
(
IOException
e
)
{
logger
.
error
(
"IOException XML文件生成异常"
,
e
);
e
.
printStackTrace
();
}
logger
.
info
(
"XML文件生成成功..."
+
new
Date
());
return
"D:\\XML\\"
+
"ZAGL_GATZZ_"
+
filesEntity
.
getDwdm
()
+
getCurrentDate2String
(
"yyyyMMdd"
)
+
cardType
+
files_seq
+
".xml"
;
}
/**
* 字符串去除空格
*
...
...
src/main/java/com/yxproject/start/api/ExtensionApi.java
0 → 100644
View file @
ea851a1b
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.service.impl.ExtensionServiceImpl
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestPart
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.ws.rs.core.MediaType
;
/**
* 扩展api
*
* @author xia79
* @date 2024/09/27
*/
@RestController
@RequestMapping
(
"extensionApi"
)
public
class
ExtensionApi
{
private
final
ExtensionServiceImpl
extensionService
;
public
ExtensionApi
(
ExtensionServiceImpl
extensionService
)
{
this
.
extensionService
=
extensionService
;
}
/**
* 解析港澳台购车人信息,判断是否办理过港澳台居住证
*/
@PostMapping
(
value
=
"analysisGAT"
,
consumes
=
MediaType
.
MULTIPART_FORM_DATA
)
public
ResponseEntity
<
byte
[]>
analysisGAT
(
@RequestPart
(
"file"
)
MultipartFile
file
)
{
// 检查文件是否为空
if
(
file
.
isEmpty
())
{
throw
new
RuntimeException
(
"No file uploaded"
);
}
// 获取文件名
String
fileName
=
file
.
getOriginalFilename
();
if
(!
fileName
.
endsWith
(
"xls"
)
&&
!
fileName
.
endsWith
(
"xlsx"
))
{
throw
new
RuntimeException
(
"Only .xls or .xlsx files are supported"
);
}
// 处理文件并生成新的Excel
byte
[]
newExcelData
=
extensionService
.
analysisGAT
(
file
);
// 设置响应头
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
org
.
springframework
.
http
.
MediaType
.
APPLICATION_OCTET_STREAM
);
headers
.
setContentDispositionFormData
(
"attachment"
,
"processed_"
+
fileName
);
return
new
ResponseEntity
<>(
newExcelData
,
headers
,
HttpStatus
.
OK
);
}
}
src/main/java/com/yxproject/start/api/PersonPostApi.java
View file @
ea851a1b
...
...
@@ -362,7 +362,7 @@ public class PersonPostApi {
logger
.
error
(
"Exception 刷身份证查询邮寄单信息详情异常"
,
e
);
}
for
(
PersonPostEntity
entity
:
list
)
{
if
(
entity
.
getLatticeMouthInformation
().
trim
().
equals
(
"调用新一代接口批量获取四级分拣码失败"
))
{
if
(
entity
.
getLatticeMouthInformation
()
==
null
||
entity
.
getLatticeMouthInformation
()
.
trim
().
equals
(
"调用新一代接口批量获取四级分拣码失败"
))
{
entity
.
setLatticeMouthInformation
(
"获取分拣码失败"
);
}
}
...
...
src/main/java/com/yxproject/start/dto/ExtensionGatAnalysisResultDto.java
0 → 100644
View file @
ea851a1b
package
com
.
yxproject
.
start
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
ExtensionGatAnalysisResultDto
{
private
boolean
result
;
private
String
message
;
private
List
<
ExtensionGatDto
>
extensionGatRecords
;
}
src/main/java/com/yxproject/start/dto/ExtensionGatDto.java
0 → 100644
View file @
ea851a1b
package
com
.
yxproject
.
start
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Column
;
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
ExtensionGatDto
{
@Column
(
name
=
"NAME"
)
private
String
name
;
@Column
(
name
=
"BIRTHDAY"
)
private
String
birthday
;
@Column
(
name
=
"ID_NO"
)
private
String
idNo
;
@Column
(
name
=
"BEGIN_DATE"
)
private
String
beginDate
;
@Column
(
name
=
"EXPIRE_DATE"
)
private
String
expireDate
;
@Column
(
name
=
"SIGN_TIMES"
)
private
String
signTimes
;
}
src/main/java/com/yxproject/start/mapper/ExtensionMapper.java
0 → 100644
View file @
ea851a1b
package
com
.
yxproject
.
start
.
mapper
;
import
com.yxproject.start.dto.ExtensionGatDto
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
@Mapper
public
interface
ExtensionMapper
{
@Select
(
"SELECT\n"
+
" PROD_CARD_T.NAME,\n"
+
" PROD_CARD_T.BIRTHDAY,\n"
+
" PROD_CARD_T.ID_NO,\n"
+
" PROD_CARD_T.BEGIN_DATE,\n"
+
" PROD_CARD_T.EXPIRE_DATE,\n"
+
" PROD_CARD_T.SIGN_TIMES\n"
+
"FROM\n"
+
" PRODYD_DBA.PROD_CARD_T@PRODYD_LINK\n"
+
"WHERE\n"
+
" PROD_CARD_T.CARD_NO = #{cardNo}\n"
+
"ORDER BY\n"
+
" PROD_CARD_T.SIGN_TIMES DESC"
)
List
<
ExtensionGatDto
>
getProdGatCardList
(
@Param
(
"cardNo"
)
String
cardNo
);
@Select
(
"SELECT\n"
+
" HIS_CARD_T.NAME,\n"
+
" HIS_CARD_T.BIRTHDAY,\n"
+
" HIS_CARD_T.ID_NO,\n"
+
" HIS_CARD_T.BEGIN_DATE,\n"
+
" HIS_CARD_T.EXPIRE_DATE,\n"
+
" HIS_CARD_T.SIGN_TIMES\n"
+
"FROM\n"
+
" HISYD_DBA.HIS_CARD_T@HISYD_LINK\n"
+
"WHERE\n"
+
" HIS_CARD_T.CARD_NO = #{cardNo}\n"
+
"ORDER BY\n"
+
" HIS_CARD_T.SIGN_TIMES DESC"
)
List
<
ExtensionGatDto
>
getHisGatCardList
(
@Param
(
"cardNo"
)
String
cardNo
);
}
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
View file @
ea851a1b
...
...
@@ -25,7 +25,7 @@ public interface TaskListMapper {
@Select
(
"select DISTINCT CARD_TYPE_DIC.*, ACC_GROUP_T.* ,'000000' COUNTY_CODE,'0000' COUNTYNAME from ACCYD_DBA.ACC_CARD_T@ACCUYD_LINK \n"
+
"left join ACCYD_DBA.ACC_GROUP_T@ACCUYD_LINK on substr(acc_card_t.accept_no,0,8) = ACC_GROUP_T.group_no\n"
+
"left join ACCYD_DBA.ACC_GROUP_RELATION_T@ACCUYD_LINK on ACC_GROUP_RELATION_T.group_no =ACC_GROUP_T.group_no\n"
+
"left join CARD_TYPE_DIC on decode(substr(ORIGINAL_NO,21,1),6,5,substr(ORIGINAL_NO,21,1)) = CARD_TYPE_DIC.CARD_TYPE_ID\n"
+
"left join CARD_TYPE_DIC on decode(substr(ORIGINAL_NO,21,1),6,5,
3,6,
substr(ORIGINAL_NO,21,1)) = CARD_TYPE_DIC.CARD_TYPE_ID\n"
+
"where "
+
"ACC_GROUP_T.group_no not in (select group_no from group_no)\n"
+
"and to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')=#{submitDate} \n"
+
...
...
src/main/java/com/yxproject/start/service/impl/ExtensionServiceImpl.java
0 → 100644
View file @
ea851a1b
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.dto.ExtensionGatAnalysisResultDto
;
import
com.yxproject.start.dto.ExtensionGatDto
;
import
com.yxproject.start.mapper.ExtensionMapper
;
import
org.apache.poi.ss.usermodel.*
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 扩展服务impl
*
* @author xia79
* @date 2024/09/27
*/
@Service
public
class
ExtensionServiceImpl
{
private
final
ExtensionMapper
extensionMapper
;
public
ExtensionServiceImpl
(
ExtensionMapper
extensionMapper
)
{
this
.
extensionMapper
=
extensionMapper
;
}
/**
* 解析港澳台购车人信息,判断是否办理过港澳台居住证
*
* @param file 文件
*/
public
byte
[]
analysisGAT
(
MultipartFile
file
)
{
try
(
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
))
{
Sheet
hkSheet
=
workbook
.
getSheetAt
(
0
);
Sheet
twSheet
=
workbook
.
getSheetAt
(
1
);
// 分析和更新Sheet
// analysisSheet(hkSheet);
analysisSheet
(
twSheet
);
// 将更新后的工作簿保存到字节数组
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
workbook
.
write
(
outputStream
);
return
outputStream
.
toByteArray
();
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
/**
* 分析表
*
* @param sheet 工作表
*/
public
Sheet
analysisSheet
(
Sheet
sheet
)
{
for
(
Row
row
:
sheet
)
{
if
(
row
.
getRowNum
()
==
10
)
{
break
;
}
ExtensionGatAnalysisResultDto
resultDto
=
new
ExtensionGatAnalysisResultDto
(
false
,
""
,
null
);
if
(
row
.
getRowNum
()
==
0
)
continue
;
String
name
=
""
;
Cell
cell
=
row
.
getCell
(
4
);
if
(
cell
!=
null
&&
cell
.
getCellType
()
==
CellType
.
STRING
)
{
name
=
cell
.
getStringCellValue
();
}
String
birthday
=
""
;
cell
=
row
.
getCell
(
6
);
if
(
cell
!=
null
&&
cell
.
getCellType
()
==
CellType
.
STRING
)
{
birthday
=
cell
.
getStringCellValue
();
}
String
card_no
=
row
.
getCell
(
9
).
getStringCellValue
();
List
<
ExtensionGatDto
>
prodRecords
=
extensionMapper
.
getProdGatCardList
(
card_no
);
System
.
out
.
println
(
"cardNO:"
+
card_no
);
List
<
ExtensionGatDto
>
hisRecords
=
extensionMapper
.
getHisGatCardList
(
card_no
);
List
<
ExtensionGatDto
>
combinedRecords
=
new
ArrayList
<>();
combinedRecords
.
addAll
(
prodRecords
);
combinedRecords
.
addAll
(
hisRecords
);
for
(
ExtensionGatDto
prodRecord
:
combinedRecords
)
{
System
.
out
.
println
(
prodRecord
);
}
if
(!
combinedRecords
.
isEmpty
())
{
resultDto
.
setResult
(
true
);
for
(
ExtensionGatDto
record
:
combinedRecords
)
{
if
(!
name
.
isEmpty
())
{
if
(!
record
.
getName
().
equals
(
name
))
{
String
message
=
resultDto
.
getMessage
();
resultDto
.
setMessage
(
message
+
"姓名不一致 "
);
}
}
if
(!
birthday
.
isEmpty
())
{
if
(!
record
.
getBirthday
().
equals
(
birthday
))
{
String
message
=
resultDto
.
getMessage
();
resultDto
.
setMessage
(
message
+
"出生日期不一致 "
);
}
}
}
resultDto
.
setExtensionGatRecords
(
combinedRecords
);
}
String
resultStr
=
resultDto
.
isResult
()
?
"已匹配"
:
"未找到"
;
row
.
createCell
(
11
,
CellType
.
STRING
).
setCellValue
(
resultStr
);
row
.
createCell
(
12
,
CellType
.
STRING
).
setCellValue
(
resultDto
.
getMessage
());
int
indexStart
=
13
;
if
(
resultDto
.
getExtensionGatRecords
()
!=
null
&&
!
resultDto
.
getExtensionGatRecords
().
isEmpty
())
{
for
(
ExtensionGatDto
dto
:
resultDto
.
getExtensionGatRecords
())
{
row
.
createCell
(
indexStart
++,
CellType
.
STRING
).
setCellValue
(
dto
.
getName
());
row
.
createCell
(
indexStart
++,
CellType
.
STRING
).
setCellValue
(
dto
.
getBirthday
());
row
.
createCell
(
indexStart
++,
CellType
.
STRING
).
setCellValue
(
dto
.
getBeginDate
());
row
.
createCell
(
indexStart
++,
CellType
.
STRING
).
setCellValue
(
dto
.
getExpireDate
());
row
.
createCell
(
indexStart
++,
CellType
.
STRING
).
setCellValue
(
dto
.
getSignTimes
());
}
}
}
Row
row
=
sheet
.
getRow
(
0
);
row
.
createCell
(
11
,
CellType
.
STRING
).
setCellValue
(
"比对结果"
);
row
.
createCell
(
12
,
CellType
.
STRING
).
setCellValue
(
"备注"
);
row
.
createCell
(
13
,
CellType
.
STRING
).
setCellValue
(
"证件姓名"
);
row
.
createCell
(
14
,
CellType
.
STRING
).
setCellValue
(
"证件出生日期"
);
row
.
createCell
(
15
,
CellType
.
STRING
).
setCellValue
(
"证件起始日期"
);
row
.
createCell
(
16
,
CellType
.
STRING
).
setCellValue
(
"证件截止日期"
);
row
.
createCell
(
17
,
CellType
.
STRING
).
setCellValue
(
"办理次数"
);
return
sheet
;
}
}
src/main/java/com/yxproject/start/service/impl/ImportXmlServiceImpl.java
View file @
ea851a1b
...
...
@@ -71,8 +71,8 @@ public class ImportXmlServiceImpl implements ImportXmlService {
Element
ZWE_ZWTZSJ
=
PACKAGE
.
addElement
(
"ZWE_ZWTZSJ"
);
ZWE_ZWTZSJ
.
setText
(
preproPersonDto
.
getZweZwtzsj
());
boolean
isGAT
=
personIsHk
(
filesEntity
.
getSourceFileName
())
||
personIsTw
(
filesEntity
.
getSourceFileName
());
String
url
=
isGAT
?
"
C
:\\TP_PATH_YD\\"
+
uploadDate
+
"\\"
+
"ZAGL_GATZZ_"
+
filesEntity
.
getSourceFileName
()
+
preproPersonDto
.
getNo
()
+
".xml"
:
"
C
:\\TP_PATH_YD\\"
+
uploadDate
+
"\\"
+
"ZAGL_YDZZ_"
+
filesEntity
.
getSourceFileName
()
+
preproPersonDto
.
getNo
()
+
".xml"
;
String
url
=
isGAT
?
"
D
:\\TP_PATH_YD\\"
+
uploadDate
+
"\\"
+
"ZAGL_GATZZ_"
+
filesEntity
.
getSourceFileName
()
+
preproPersonDto
.
getNo
()
+
".xml"
:
"
D
:\\TP_PATH_YD\\"
+
uploadDate
+
"\\"
+
"ZAGL_YDZZ_"
+
filesEntity
.
getSourceFileName
()
+
preproPersonDto
.
getNo
()
+
".xml"
;
try
{
File
file
=
new
File
(
url
);
if
(!
file
.
exists
()){
...
...
src/main/resources/application.yml
View file @
ea851a1b
...
...
@@ -7,6 +7,7 @@ spring:
url
:
jdbc:oracle:thin:@192.168.1.16:1521:yingxin
username
:
yingxinyd
password
:
yingxinyd
# url: jdbc:oracle:thin:@192.168.2.164:1521:orcl
servlet
:
multipart
:
enabled
:
true
...
...
src/main/resources/static/views/excelAndSearch/excelAndSearch.html
View file @
ea851a1b
...
...
@@ -140,14 +140,14 @@
type=
"radio"
ng-model=
"isGAT"
name=
"type"
value=
"
2
"
value=
"
1
"
/>
是
<input
style=
"margin-left: 10px"
type=
"radio"
ng-model=
"isGAT"
name=
"type"
value=
"
1
"
value=
"
0
"
ng-checked=
"true"
/>
否
</td>
...
...
src/main/resources/static/views/excelAndSearch/excelAndSearch.js
View file @
ea851a1b
...
...
@@ -105,8 +105,9 @@ angular
var
files
=
document
.
querySelector
(
"input#id_file_photo_for_check"
).
files
var
isGAT
=
$scope
.
isGAT
==
"1"
?
false
:
true
console
.
log
(
"isGAT:"
+
$scope
.
isGAT
)
var
isGAT
=
$scope
.
isGAT
==
"1"
console
.
log
(
"isGAT:"
+
isGAT
)
if
(
files
.
length
==
0
)
{
MessageService
.
showAlert
(
"请选择上传的文件..."
)
}
else
{
...
...
src/main/resources/static/views/searchCardMsg/searchCardMsg.js
View file @
ea851a1b
...
...
@@ -171,14 +171,14 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
if (ret == 1 || ret == 3) {
myform.name.value = document.getElementById("
aaa
").sName;
myform.sex.value = document.getElementById("
aaa
").sSex == 1 ? '男' : '女';
myform.national.value = parseInt(document.getElementById("
aaa
").sNation);
//
myform.national.value = parseInt(document.getElementById("
aaa
").sNation);
var flag = false;
if(myform.national.value>56||myform.national.value<1){
MessageService.showAlert("
民族代码异常
:
"+myform.national.value);
}else{
myform.national.value = nation_data[(parseInt(document.getElementById("
aaa
").sNation)) - 1].name;
//
if(myform.national.value>56||myform.national.value<1){
//
MessageService.showAlert("
民族代码异常
:
"+myform.national.value);
//
}else{
//
myform.national.value = nation_data[(parseInt(document.getElementById("
aaa
").sNation)) - 1].name;
flag=true;
}
//
}
myform.birthday.value = document.getElementById("
aaa
").sBornDate;
myform.address.value = document.getElementById("
aaa
").sAddress;
myform.id.value = document.getElementById("
aaa
").sIDNo;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment