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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
293 additions
and
16 deletions
+293
-16
pom.xml
pom.xml
+2
-2
ExportXMLApi.java
src/main/java/com/yxproject/start/api/ExportXMLApi.java
+0
-0
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
This diff is collapsed.
Click to expand it.
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