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
6aa5dbf5
Commit
6aa5dbf5
authored
Mar 04, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改下载XML
parent
31c8a440
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
428 additions
and
633 deletions
+428
-633
ExportXMLApi.java
src/main/java/com/yxproject/start/api/ExportXMLApi.java
+160
-26
NewFilesEntity.java
src/main/java/com/yxproject/start/entity/NewFilesEntity.java
+121
-0
PreproPersonEntity.java
...n/java/com/yxproject/start/entity/PreproPersonEntity.java
+19
-15
CountCountyEntity.java
...om/yxproject/start/entity/TaskList/CountCountyEntity.java
+3
-0
CountGajgEntity.java
.../com/yxproject/start/entity/TaskList/CountGajgEntity.java
+3
-0
TaskListEntity.java
...a/com/yxproject/start/entity/TaskList/TaskListEntity.java
+3
-0
NewFilesMapper.java
src/main/java/com/yxproject/start/mapper/NewFilesMapper.java
+20
-0
PreproPersonMapper.java
...n/java/com/yxproject/start/mapper/PreproPersonMapper.java
+26
-46
QuerySequenceMapper.java
.../java/com/yxproject/start/mapper/QuerySequenceMapper.java
+3
-2
NewFilesService.java
...ain/java/com/yxproject/start/service/NewFilesService.java
+12
-0
PersonPostService.java
...n/java/com/yxproject/start/service/PersonPostService.java
+1
-0
PreproPersonService.java
...java/com/yxproject/start/service/PreproPersonService.java
+2
-0
NewFilesServiceImpl.java
...com/yxproject/start/service/impl/NewFilesServiceImpl.java
+28
-0
PreproPersonServiceImpl.java
...yxproject/start/service/impl/PreproPersonServiceImpl.java
+23
-1
ExportXml.java
src/main/java/com/yxproject/start/utils/ExportXml.java
+0
-101
IDCardXmlUtils.java
src/main/java/com/yxproject/start/utils/IDCardXmlUtils.java
+0
-440
QuerySequenceSercive.java
.../java/com/yxproject/start/utils/QuerySequenceSercive.java
+2
-2
mybatis-config.xml
src/main/resources/mapper/config/mybatis-config.xml
+2
-0
No files found.
src/main/java/com/yxproject/start/api/ExportXMLApi.java
View file @
6aa5dbf5
package
com
.
yxproject
.
start
.
api
;
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.entity.FilesEntity
;
import
com.yxproject.start.entity.FilesEntity
;
import
com.yxproject.start.entity.NewFilesEntity
;
import
com.yxproject.start.entity.PreproPersonEntity
;
import
com.yxproject.start.entity.PreproPersonEntity
;
import
com.yxproject.start.service.NewFilesService
;
import
com.yxproject.start.service.PreproPersonService
;
import
com.yxproject.start.service.PreproPersonService
;
import
com.yxproject.start.utils.
ExportXml
;
import
com.yxproject.start.utils.
QuerySequenceSercive
;
import
org.apache.commons.lang.time.DateFormatUtils
;
import
org.apache.commons.lang.time.DateFormatUtils
;
import
org.dom4j.Document
;
import
org.dom4j.DocumentHelper
;
import
org.dom4j.Element
;
import
org.dom4j.io.OutputFormat
;
import
org.dom4j.io.XMLWriter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.*
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -28,43 +32,173 @@ import java.util.List;
...
@@ -28,43 +32,173 @@ import java.util.List;
public
class
ExportXMLApi
{
public
class
ExportXMLApi
{
@Autowired
@Autowired
private
PreproPersonService
preproPersonService
;
private
PreproPersonService
preproPersonService
;
@Autowired
private
NewFilesService
newFilesService
;
@Autowired
private
QuerySequenceSercive
querySequenceSercive
;
/**
/**
* 导出制证数据包
* 导出制证数据包
*/
*/
@RequestMapping
(
"printXmlData"
)
@RequestMapping
(
"printXmlData"
)
// @RequiresPermissions("userInfo.add")//权限管理;
// @RequiresPermissions("userInfo.add")//权限管理;
public
byte
[]
printXmlData
(
@RequestParam
(
"uploadNo"
)
String
uploadNo
,
@RequestParam
(
"IDCard"
)
String
IDCard
,
@RequestParam
(
"oldFile"
)
String
oldFile
,
@RequestParam
(
"newFile"
)
String
newFile
,
@RequestParam
(
"SSXQDM"
)
String
SSXQDM
,
@RequestParam
(
"cardType"
)
String
cardType
,
@RequestParam
(
"state"
)
String
state
,
@RequestParam
(
"uploadDate"
)
String
uploadDate
,
HttpServletResponse
response
){
public
byte
[]
printXmlData
(
@RequestParam
(
"uploadNo"
)
String
uploadNo
,
@RequestParam
(
"IDCard"
)
String
IDCard
,
@RequestParam
(
"oldFile"
)
String
oldFile
,
@RequestParam
(
"newFile"
)
String
newFile
,
@RequestParam
(
"SSXQDM"
)
String
SSXQDM
,
@RequestParam
(
"cardType"
)
String
cardType
,
@RequestParam
(
"state"
)
String
state
,
@RequestParam
(
"uploadDate"
)
String
uploadDate
,
HttpServletResponse
response
)
{
response
.
setContentType
(
"application/x-download"
);
response
.
setContentType
(
"application/x-download"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
String
dateTime
=
DateFormatUtils
.
format
(
new
Date
(),
"yyyyMMddHH"
);
String
dateTime
=
DateFormatUtils
.
format
(
new
Date
(),
"yyyyMMddHH"
);
//使用Servlet实现文件下载的时候,避免浏览器自动打开文件
//使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String
fout
=
null
;
String
fout
=
null
;
List
<
PreproPersonEntity
>
preproPersonEntities
=
preproPersonService
.
selectPreproPerson
(
uploadNo
,
IDCard
,
oldFile
,
newFile
,
SSXQDM
,
cardType
,
state
,
uploadDate
);
List
<
PreproPersonEntity
>
preproPersonEntities
=
preproPersonService
.
selectPreproPerson
(
uploadNo
,
IDCard
,
oldFile
,
newFile
,
SSXQDM
,
cardType
,
state
,
uploadDate
);
FilesEntity
filesEntity
=
new
FilesEntity
();
if
(
preproPersonEntities
.
size
()>
0
){
filesEntity
.
setVersionCode
(
"3.00"
);
FilesEntity
filesEntity
=
new
FilesEntity
();
filesEntity
.
setDwdm
(
"410600000000"
);
filesEntity
.
setVersionCode
(
"3.00"
);
filesEntity
.
setDwmc
(
"北京市公安局"
);
filesEntity
.
setDwdm
(
"410600000000"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddhhmmss"
);
filesEntity
.
setDwmc
(
"北京市公安局"
);
filesEntity
.
setCreatTime
(
simpleDateFormat
.
format
(
new
Date
()));
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddhhmmss"
);
try
{
filesEntity
.
setCreatTime
(
simpleDateFormat
.
format
(
new
Date
()));
ExportXml
.
createToMakePackageXML
(
preproPersonEntities
,
filesEntity
,
"\\zhang"
);
try
{
}
catch
(
IOException
e
)
{
fout
=
createToMakePackageXML
(
preproPersonEntities
,
filesEntity
,
"\\zhang"
);
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
String
outFile
=
dateTime
+
"制证数据包"
;
try
{
FileInputStream
fis
=
new
FileInputStream
(
new
File
(
fout
));
byte
[]
b
=
new
byte
[
fis
.
available
()];
fis
.
read
(
b
);
fis
.
close
();
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
outFile
+
".xml"
);
return
b
;
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
else
{
}
return
null
;
}
/**
* 生成单个可制证数据XML
*
* @throws IOException 可能出现文件写入不成功
*/
public
String
createToMakePackageXML
(
List
<
PreproPersonEntity
>
preproPersonEntities
,
FilesEntity
filesEntity
,
String
url
)
throws
IOException
{
//todo 添加生成新包 回写到个人制证信息表中
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
simpleDateFormat2
=
new
SimpleDateFormat
(
"yyyyMMddhhmmss"
);
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
(
simpleDateFormat2
.
format
(
new
Date
()));
NewFilesEntity
newFilesEntity
=
new
NewFilesEntity
();
newFilesEntity
.
setCreateDate
(
simpleDateFormat2
.
format
(
new
Date
()));
newFilesEntity
.
setDwdm
(
filesEntity
.
getDwdm
());
newFilesEntity
.
setDwmc
(
filesEntity
.
getDwmc
());
newFilesEntity
.
setVersionCode
(
filesEntity
.
getVersionCode
());
newFilesEntity
.
setRecordNumber
((
long
)
preproPersonEntities
.
size
());
long
l
=
newFilesService
.
saveNewFiles
(
newFilesEntity
);
newFilesEntity
.
setNewFileName
(
simpleDateFormat
.
format
(
new
Date
())+
"-"
+
l
);
newFilesService
.
updateNewFileName
(
newFilesEntity
);
int
NO
=
1
;
for
(
PreproPersonEntity
preproPersonEntity
:
preproPersonEntities
)
{
Element
RECORD
=
DATA
.
addElement
(
"RECORD"
);
RECORD
.
addAttribute
(
"no"
,
NO
+
""
);
RECORD
.
addAttribute
(
"sid"
,
preproPersonEntity
.
getSid
());
Element
JMSFZSLH
=
RECORD
.
addElement
(
"JMSFZSLH"
);
JMSFZSLH
.
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
YXQQSRQ
=
RECORD
.
addElement
(
"YXQQSRQ"
);
YXQQSRQ
.
setText
(
preproPersonEntity
.
getYxqqsrq
());
Element
YXQJZRQ
=
RECORD
.
addElement
(
"YXQJZRQ"
);
YXQJZRQ
.
setText
(
preproPersonEntity
.
getYxqjzrq
());
Element
JMSFZSLYYDM
=
RECORD
.
addElement
(
"JMSFZSLYYDM"
);
JMSFZSLYYDM
.
setText
(
preproPersonEntity
.
getJmsfzslyydm
());
Element
JMSFZZZLXDM
=
RECORD
.
addElement
(
"JMSFZZZLXDM"
);
JMSFZZZLXDM
.
setText
(
preproPersonEntity
.
getJmsfzzzlxdm
());
Element
JMSFZLZFSDM
=
RECORD
.
addElement
(
"JMSFZLZFSDM"
);
JMSFZLZFSDM
.
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
(
l
);
}
}
String
outFile
=
dateTime
+
"制证数据包"
;
preproPersonService
.
updatePreproPerson_NewFileName
(
preproPersonEntities
);
FileOutputStream
fout
=
null
;
try
{
try
{
FileInputStream
fis
=
new
FileInputStream
(
new
File
(
fout
));
FileOutputStream
fos
=
new
FileOutputStream
(
"D:\\XML\\"
+
simpleDateFormat
.
format
(
new
Date
())+
"-"
+
l
+
".xml"
);
byte
[]
b
=
new
byte
[
fis
.
available
()];
OutputStreamWriter
osw
=
new
OutputStreamWriter
(
fos
,
"UTF-8"
);
fis
.
read
(
b
);
OutputFormat
of
=
new
OutputFormat
();
fis
.
close
();
of
.
setEncoding
(
"UTF-8"
);
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
outFile
+
".xml"
);
of
.
setIndent
(
true
);
return
b
;
of
.
setIndent
(
" "
);
}
catch
(
FileNotFoundException
e
)
{
of
.
setNewlines
(
true
);
e
.
printStackTrace
();
of
.
setNewLineAfterDeclaration
(
false
);
XMLWriter
writer
=
new
XMLWriter
(
osw
,
of
);
writer
.
write
(
document
);
writer
.
close
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
null
;
System
.
out
.
println
(
"XML文件生成成功..."
+
new
Date
());
return
"D:\\XML\\"
+
simpleDateFormat
.
format
(
new
Date
())+
"-"
+
l
+
".xml"
;
}
/**
* 字符串去除空格
* @param str 原始字符串
* @return 返回新的字符串
*/
public
static
String
replaceNullString
(
String
str
)
{
if
(
str
==
null
)
return
""
;
else
return
str
;
}
}
}
}
src/main/java/com/yxproject/start/entity/NewFilesEntity.java
0 → 100644
View file @
6aa5dbf5
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.*
;
import
java.util.Objects
;
/**
* @auther zhangyusheng
* 2019/3/4 18:45
*/
@Entity
@Table
(
name
=
"NEW_FILES"
,
schema
=
"YINGXIN"
,
catalog
=
""
)
public
class
NewFilesEntity
{
private
String
versionCode
;
private
String
dwdm
;
private
String
dwmc
;
private
Long
recordNumber
;
private
String
createDate
;
private
String
newFileName
;
private
String
newTime
;
private
long
id
;
@Basic
@Column
(
name
=
"VERSION_CODE"
)
public
String
getVersionCode
()
{
return
versionCode
;
}
public
void
setVersionCode
(
String
versionCode
)
{
this
.
versionCode
=
versionCode
;
}
@Basic
@Column
(
name
=
"DWDM"
)
public
String
getDwdm
()
{
return
dwdm
;
}
public
void
setDwdm
(
String
dwdm
)
{
this
.
dwdm
=
dwdm
;
}
@Basic
@Column
(
name
=
"DWMC"
)
public
String
getDwmc
()
{
return
dwmc
;
}
public
void
setDwmc
(
String
dwmc
)
{
this
.
dwmc
=
dwmc
;
}
@Basic
@Column
(
name
=
"RECORD_NUMBER"
)
public
Long
getRecordNumber
()
{
return
recordNumber
;
}
public
void
setRecordNumber
(
Long
recordNumber
)
{
this
.
recordNumber
=
recordNumber
;
}
@Basic
@Column
(
name
=
"CREATE_DATE"
)
public
String
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
String
createDate
)
{
this
.
createDate
=
createDate
;
}
@Basic
@Column
(
name
=
"NEW_FILE_NAME"
)
public
String
getNewFileName
()
{
return
newFileName
;
}
public
void
setNewFileName
(
String
newFileName
)
{
this
.
newFileName
=
newFileName
;
}
@Basic
@Column
(
name
=
"NEW_TIME"
)
public
String
getNewTime
()
{
return
newTime
;
}
public
void
setNewTime
(
String
newTime
)
{
this
.
newTime
=
newTime
;
}
@Id
@Column
(
name
=
"ID"
)
public
long
getId
()
{
return
id
;
}
public
void
setId
(
long
id
)
{
this
.
id
=
id
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
NewFilesEntity
that
=
(
NewFilesEntity
)
o
;
return
id
==
that
.
id
&&
Objects
.
equals
(
versionCode
,
that
.
versionCode
)
&&
Objects
.
equals
(
dwdm
,
that
.
dwdm
)
&&
Objects
.
equals
(
dwmc
,
that
.
dwmc
)
&&
Objects
.
equals
(
recordNumber
,
that
.
recordNumber
)
&&
Objects
.
equals
(
createDate
,
that
.
createDate
)
&&
Objects
.
equals
(
newFileName
,
that
.
newFileName
)
&&
Objects
.
equals
(
newTime
,
that
.
newTime
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
versionCode
,
dwdm
,
dwmc
,
recordNumber
,
createDate
,
newFileName
,
newTime
,
id
);
}
}
src/main/java/com/yxproject/start/entity/PreproPersonEntity.java
View file @
6aa5dbf5
...
@@ -3,6 +3,10 @@ package com.yxproject.start.entity;
...
@@ -3,6 +3,10 @@ package com.yxproject.start.entity;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.util.Objects
;
import
java.util.Objects
;
/**
* @auther zhangyusheng
* 2019/3/4 20:09
*/
@Entity
@Entity
@Table
(
name
=
"PREPRO_PERSON"
,
schema
=
"YINGXIN"
,
catalog
=
""
)
@Table
(
name
=
"PREPRO_PERSON"
,
schema
=
"YINGXIN"
,
catalog
=
""
)
public
class
PreproPersonEntity
{
public
class
PreproPersonEntity
{
...
@@ -30,9 +34,9 @@ public class PreproPersonEntity {
...
@@ -30,9 +34,9 @@ public class PreproPersonEntity {
private
String
sjrYzbm
;
private
String
sjrYzbm
;
private
String
sjrTxdz
;
private
String
sjrTxdz
;
private
String
sid
;
private
String
sid
;
private
String
fileName
;
private
Long
fileId
;
private
Long
cardTypeId
;
private
Long
cardTypeId
;
private
String
newFileName
;
private
Long
newFileId
;
private
Long
state
;
private
Long
state
;
@Id
@Id
...
@@ -276,13 +280,13 @@ public class PreproPersonEntity {
...
@@ -276,13 +280,13 @@ public class PreproPersonEntity {
}
}
@Basic
@Basic
@Column
(
name
=
"FILE_
NAME
"
)
@Column
(
name
=
"FILE_
ID
"
)
public
String
getFileName
()
{
public
Long
getFileId
()
{
return
file
Name
;
return
file
Id
;
}
}
public
void
setFile
Name
(
String
fileName
)
{
public
void
setFile
Id
(
Long
fileId
)
{
this
.
file
Name
=
fileName
;
this
.
file
Id
=
fileId
;
}
}
@Basic
@Basic
...
@@ -296,13 +300,13 @@ public class PreproPersonEntity {
...
@@ -296,13 +300,13 @@ public class PreproPersonEntity {
}
}
@Basic
@Basic
@Column
(
name
=
"NEW_FILE_
NAME
"
)
@Column
(
name
=
"NEW_FILE_
ID
"
)
public
String
getNewFileName
()
{
public
Long
getNewFileId
()
{
return
newFile
Name
;
return
newFile
Id
;
}
}
public
void
setNewFile
Name
(
String
newFileName
)
{
public
void
setNewFile
Id
(
Long
newFileId
)
{
this
.
newFile
Name
=
newFileName
;
this
.
newFile
Id
=
newFileId
;
}
}
@Basic
@Basic
...
@@ -344,14 +348,14 @@ public class PreproPersonEntity {
...
@@ -344,14 +348,14 @@ public class PreproPersonEntity {
Objects
.
equals
(
sjrYzbm
,
that
.
sjrYzbm
)
&&
Objects
.
equals
(
sjrYzbm
,
that
.
sjrYzbm
)
&&
Objects
.
equals
(
sjrTxdz
,
that
.
sjrTxdz
)
&&
Objects
.
equals
(
sjrTxdz
,
that
.
sjrTxdz
)
&&
Objects
.
equals
(
sid
,
that
.
sid
)
&&
Objects
.
equals
(
sid
,
that
.
sid
)
&&
Objects
.
equals
(
file
Name
,
that
.
fileName
)
&&
Objects
.
equals
(
file
Id
,
that
.
fileId
)
&&
Objects
.
equals
(
cardTypeId
,
that
.
cardTypeId
)
&&
Objects
.
equals
(
cardTypeId
,
that
.
cardTypeId
)
&&
Objects
.
equals
(
newFile
Name
,
that
.
newFileName
)
&&
Objects
.
equals
(
newFile
Id
,
that
.
newFileId
)
&&
Objects
.
equals
(
state
,
that
.
state
);
Objects
.
equals
(
state
,
that
.
state
);
}
}
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
return
Objects
.
hash
(
jmsfzslh
,
gmsfhm
,
xm
,
xbdm
,
mzdm
,
csrq
,
ssxqdm
,
dzmc
,
sdxp
,
zwyZwtxsj
,
zwyZwtzsj
,
zweZwtxsj
,
zweZwtzsj
,
qfjgGajgmc
,
yxqqsrq
,
yxqjzrq
,
jmsfzslyydm
,
jmsfzzzlxdm
,
jmsfzlzfsdm
,
sjrXm
,
sjrLxdh
,
sjrYzbm
,
sjrTxdz
,
sid
,
file
Name
,
cardTypeId
,
newFileName
,
state
);
return
Objects
.
hash
(
jmsfzslh
,
gmsfhm
,
xm
,
xbdm
,
mzdm
,
csrq
,
ssxqdm
,
dzmc
,
sdxp
,
zwyZwtxsj
,
zwyZwtzsj
,
zweZwtxsj
,
zweZwtzsj
,
qfjgGajgmc
,
yxqqsrq
,
yxqjzrq
,
jmsfzslyydm
,
jmsfzzzlxdm
,
jmsfzlzfsdm
,
sjrXm
,
sjrLxdh
,
sjrYzbm
,
sjrTxdz
,
sid
,
file
Id
,
cardTypeId
,
newFileId
,
state
);
}
}
}
}
src/main/java/com/yxproject/start/entity/TaskList/CountCountyEntity.java
View file @
6aa5dbf5
package
com
.
yxproject
.
start
.
entity
.
TaskList
;
package
com
.
yxproject
.
start
.
entity
.
TaskList
;
import
org.springframework.stereotype.Component
;
@Component
public
class
CountCountyEntity
{
public
class
CountCountyEntity
{
private
String
countyName
;
private
String
countyName
;
private
Integer
countyCount
;
private
Integer
countyCount
;
...
...
src/main/java/com/yxproject/start/entity/TaskList/CountGajgEntity.java
View file @
6aa5dbf5
package
com
.
yxproject
.
start
.
entity
.
TaskList
;
package
com
.
yxproject
.
start
.
entity
.
TaskList
;
import
org.springframework.stereotype.Component
;
@Component
public
class
CountGajgEntity
{
public
class
CountGajgEntity
{
private
String
gajgName
;
private
String
gajgName
;
private
Integer
gajgCount
;
private
Integer
gajgCount
;
...
...
src/main/java/com/yxproject/start/entity/TaskList/TaskListEntity.java
View file @
6aa5dbf5
package
com
.
yxproject
.
start
.
entity
.
TaskList
;
package
com
.
yxproject
.
start
.
entity
.
TaskList
;
import
org.springframework.stereotype.Component
;
@Component
public
class
TaskListEntity
{
public
class
TaskListEntity
{
private
String
countyName
;
private
String
countyName
;
private
String
gajgName
;
private
String
gajgName
;
...
...
src/main/java/com/yxproject/start/mapper/NewFilesMapper.java
0 → 100644
View file @
6aa5dbf5
package
com
.
yxproject
.
start
.
mapper
;
import
com.yxproject.start.entity.NewFilesEntity
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Options
;
import
org.apache.ibatis.annotations.Update
;
/**
* @auther zhangyusheng
* 2019/3/4 18:46
*/
@Mapper
public
interface
NewFilesMapper
{
@Insert
(
"INSERT INTO NEW_FILES (VERSION_CODE,DWDM,DWMC,RECORD_NUMBER,CREATE_DATE) VALUES (#{versionCode},#{dwdm},#{dwmc},#{recordNumber},#{createDate})"
)
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"id"
,
keyColumn
=
"id"
)
public
long
saveNewFiles
(
NewFilesEntity
newFilesEntity
);
@Update
(
"UPDATE NEW_FILES SET NEW_FILE_NAME = #{newFileName} WHERE ID = #{id}"
)
public
boolean
updateNewFileName
(
NewFilesEntity
newFilesEntity
);
}
src/main/java/com/yxproject/start/mapper/PreproPersonMapper.java
View file @
6aa5dbf5
...
@@ -31,56 +31,35 @@ public interface PreproPersonMapper {
...
@@ -31,56 +31,35 @@ public interface PreproPersonMapper {
"<if test='uploadNo != null '>"
+
"<if test='uploadNo != null '>"
+
"and PREPRO_PERSON.JMSFZSLH = #{uploadNo}"
+
"and PREPRO_PERSON.JMSFZSLH = #{uploadNo}"
+
"</if>"
+
"</if>"
+
// "<if test='uploadNo != "''" '>"+
" <if test='IDCard != null '> "
,
// "and PREPRO_PERSON.JMSFZSLH = #{uploadNo}"+
"and GMSFHM = #{IDCard} "
,
// "</if>"+
"</if> "
,
" <if test='IDCard != null '> "
,
" <if test='oldFile != null '> "
,
"and GMSFHM = #{IDCard} "
,
"and files.SOURCE_FILE_NAME =#{oldFile} "
,
"</if> "
,
" </if> "
,
// " <if test='IDCard != '' '> ",
" <if test='newFile != null'> "
,
// "and GMSFHM = #{IDCard} ",
"and NEW_FILES.NEW_FILE_NAME = #{newFile}"
,
// "</if> " ,
" </if> "
,
" <if test='oldFile != null '> "
,
" <if test='SSXQDM != null '> "
,
"and files.SOURCE_FILE_NAME =#{oldFile} "
,
"and PREPRO_PERSON.SSXQDM =#{SSXQDM}"
,
" </if> "
,
" </if>"
,
// " <if test='oldFile != '' '> ",
" <if test='cardType != null '>"
,
// "and files.SOURCE_FILE_NAME =#{oldFile} ",
" and PREPRO_PERSON.CARD_TYPE_ID =#{cardType}"
,
// " </if> " ,
" </if> "
,
" <if test='newFile != null'> "
,
" <if test='state != null'>"
,
"and NEW_FILES.NEW_FILE_NAME = #{newFile}"
,
" and PREPRO_PERSON.state = #{state}"
,
" </if> "
,
" </if> "
,
// " <if test='newFile != '' '> ",
" <if test='uploadDate != null '>"
,
// "and NEW_FILES.NEW_FILE_NAME = #{newFile}",
" and files.CREAT_TIME = #{uploadDate}"
,
// " </if> " ,
" </if> "
,
" <if test='SSXQDM != null '> "
,
"and PREPRO_PERSON.SSXQDM =#{SSXQDM}"
,
" </if>"
,
// " <if test='SSXQDM != '' '> ",
// "and PREPRO_PERSON.SSXQDM =#{SSXQDM}",
// " </if> " ,
" <if test='cardType != null '>"
,
" and PREPRO_PERSON.CARD_TYPE_ID =#{cardType}"
,
" </if> "
,
// " <if test='cardType != '' '>",
// " and PREPRO_PERSON.CARD_TYPE_ID =#{cardType}",
// " </if> " ,
" <if test='state != null'>"
,
" and PREPRO_PERSON.state = #{state}"
,
" </if> "
,
// " <if test='state != '' '>",
// " and PREPRO_PERSON.state = #{state}",
// " </if> " ,
" <if test='uploadDate != null '>"
,
" and files.CREAT_TIME = #{uploadDate}"
,
" </if> "
,
// " <if test='uploadDate != '' '>",
// " and files.CREAT_TIME = #{uploadDate}",
// " </if> ",
"</where>"
+
"</where>"
+
"</script>"
})
"</script>"
})
public
List
<
PreproPersonEntity
>
selectPreproPerson
(
@Param
(
"uploadNo"
)
String
uploadNo
,
@Param
(
"IDCard"
)
String
IDCard
,
@Param
(
"oldFile"
)
String
oldFile
,
@Param
(
"newFile"
)
String
newFile
,
@Param
(
"SSXQDM"
)
String
SSXQDM
,
@Param
(
"cardType"
)
lo
ng
cardType
,
@Param
(
"state"
)
String
state
,
@Param
(
"uploadDate"
)
String
uploadDate
);
public
List
<
PreproPersonEntity
>
selectPreproPerson
(
@Param
(
"uploadNo"
)
String
uploadNo
,
@Param
(
"IDCard"
)
String
IDCard
,
@Param
(
"oldFile"
)
String
oldFile
,
@Param
(
"newFile"
)
String
newFile
,
@Param
(
"SSXQDM"
)
String
SSXQDM
,
@Param
(
"cardType"
)
Stri
ng
cardType
,
@Param
(
"state"
)
String
state
,
@Param
(
"uploadDate"
)
String
uploadDate
);
/*修改标记制证数据状态*/
/*修改标记制证数据状态*/
@Update
(
"UPDATE PREPRO_PERSON SET STATE = #{state} WHERE JMSFZSLH=#{acceptNo}"
)
@Update
(
"UPDATE PREPRO_PERSON SET STATE = #{state} WHERE JMSFZSLH=#{acceptNo}"
)
public
boolean
updateState
(
@Param
(
"state"
)
String
state
,
@Param
(
"acceptNo"
)
String
acceptNo
);
public
boolean
updateState
(
@Param
(
"state"
)
String
state
,
@Param
(
"acceptNo"
)
String
acceptNo
);
@Update
(
"UPDATE PREPRO_PERSON SET NEW_FILE_ID=#{newFileId} where JMSFZSLH=#{jmsfzslh}"
)
public
boolean
updateNewFileName
(
PreproPersonEntity
personEntity
);
}
}
\ No newline at end of file
src/main/java/com/yxproject/start/mapper/QuerySequenceMapper.java
View file @
6aa5dbf5
package
com
.
yxproject
.
start
.
mapper
;
package
com
.
yxproject
.
start
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
/**
/**
...
@@ -9,6 +10,6 @@ import org.apache.ibatis.annotations.Select;
...
@@ -9,6 +10,6 @@ import org.apache.ibatis.annotations.Select;
*/
*/
@Mapper
@Mapper
public
interface
QuerySequenceMapper
{
public
interface
QuerySequenceMapper
{
@Select
(
"select #{sequenceName} from dual"
)
@Select
(
"select #{sequenceName}
,#{sequenceName} as num2
from dual"
)
public
String
selectSequenceNextValue
(
String
sequenceName
);
public
Object
[]
selectSequenceNextValue
(
@Param
(
"sequenceName"
)
String
sequenceName
);
}
}
src/main/java/com/yxproject/start/service/NewFilesService.java
0 → 100644
View file @
6aa5dbf5
package
com
.
yxproject
.
start
.
service
;
import
com.yxproject.start.entity.NewFilesEntity
;
/**
* @auther zhangyusheng
* 2019/3/4 18:47
*/
public
interface
NewFilesService
{
public
long
saveNewFiles
(
NewFilesEntity
newFilesEntity
);
public
boolean
updateNewFileName
(
NewFilesEntity
newFilesEntity
);
}
src/main/java/com/yxproject/start/service/PersonPostService.java
View file @
6aa5dbf5
...
@@ -25,4 +25,5 @@ public interface PersonPostService {
...
@@ -25,4 +25,5 @@ public interface PersonPostService {
public
boolean
deletePersonalData
(
String
applicantName
,
String
orderNumber
,
String
state
,
String
latticeMouthInformation
,
List
<
String
>
getToCounty
,
String
uploadDate
);
public
boolean
deletePersonalData
(
String
applicantName
,
String
orderNumber
,
String
state
,
String
latticeMouthInformation
,
List
<
String
>
getToCounty
,
String
uploadDate
);
}
}
src/main/java/com/yxproject/start/service/PreproPersonService.java
View file @
6aa5dbf5
...
@@ -14,4 +14,6 @@ public interface PreproPersonService {
...
@@ -14,4 +14,6 @@ public interface PreproPersonService {
public
List
<
PreproPersonEntity
>
selectPreproPerson
(
String
uploadNo
,
String
IDCard
,
String
oldFile
,
String
newFile
,
String
SSXQDM
,
String
cardType
,
String
state
,
String
uploadDate
);
public
List
<
PreproPersonEntity
>
selectPreproPerson
(
String
uploadNo
,
String
IDCard
,
String
oldFile
,
String
newFile
,
String
SSXQDM
,
String
cardType
,
String
state
,
String
uploadDate
);
public
boolean
updatePreproPerson_NewFileName
(
List
<
PreproPersonEntity
>
preproPersonEntities
);
}
}
src/main/java/com/yxproject/start/service/impl/NewFilesServiceImpl.java
0 → 100644
View file @
6aa5dbf5
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.entity.NewFilesEntity
;
import
com.yxproject.start.mapper.NewFilesMapper
;
import
com.yxproject.start.service.NewFilesService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* @auther zhangyusheng
* 2019/3/4 18:52
*/
@Service
public
class
NewFilesServiceImpl
implements
NewFilesService
{
@Autowired
private
NewFilesMapper
newFilesMapper
;
@Override
public
long
saveNewFiles
(
NewFilesEntity
newFilesEntity
)
{
return
newFilesMapper
.
saveNewFiles
(
newFilesEntity
);
}
@Override
public
boolean
updateNewFileName
(
NewFilesEntity
newFilesEntity
)
{
return
newFilesMapper
.
updateNewFileName
(
newFilesEntity
);
}
}
src/main/java/com/yxproject/start/service/impl/PreproPersonServiceImpl.java
View file @
6aa5dbf5
...
@@ -24,7 +24,29 @@ public class PreproPersonServiceImpl implements PreproPersonService {
...
@@ -24,7 +24,29 @@ public class PreproPersonServiceImpl implements PreproPersonService {
}
}
@Override
@Override
public
List
<
PreproPersonEntity
>
selectPreproPerson
(
String
uploadNo
,
String
IDCard
,
String
oldFile
,
String
newFile
,
String
SSXQDM
,
String
cardType
,
String
state
,
String
uploadDate
)
{
public
List
<
PreproPersonEntity
>
selectPreproPerson
(
String
uploadNo
,
String
IDCard
,
String
oldFile
,
String
newFile
,
String
SSXQDM
,
String
cardType
,
String
state
,
String
uploadDate
)
{
List
<
PreproPersonEntity
>
preproPersonEntities
=
preproPersonMapper
.
selectPreproPerson
(
""
,
""
,
""
,
""
,
""
,
0
,
""
,
""
);
List
<
PreproPersonEntity
>
preproPersonEntities
=
preproPersonMapper
.
selectPreproPerson
(
replace
(
uploadNo
),
replace
(
IDCard
),
replace
(
oldFile
),
replace
(
newFile
),
replace
(
SSXQDM
),
replace
(
cardType
),
replace
(
state
),
replace
(
uploadDate
)
);
return
preproPersonEntities
;
return
preproPersonEntities
;
}
}
private
String
replace
(
String
str
){
if
(
""
.
equals
(
str
)){
return
null
;
}
else
{
return
str
;
}
}
/**
* 更新制证信息表中新文件名
* @param preproPersonEntities
* @return
*/
@Override
public
boolean
updatePreproPerson_NewFileName
(
List
<
PreproPersonEntity
>
preproPersonEntities
)
{
for
(
PreproPersonEntity
preproPersonEntity:
preproPersonEntities
)
{
preproPersonMapper
.
updateNewFileName
(
preproPersonEntity
);
}
return
true
;
}
}
}
src/main/java/com/yxproject/start/utils/ExportXml.java
deleted
100644 → 0
View file @
31c8a440
package
com
.
yxproject
.
start
.
utils
;
import
com.yxproject.start.entity.FilesEntity
;
import
com.yxproject.start.entity.PreproPersonEntity
;
import
org.dom4j.Document
;
import
org.dom4j.DocumentHelper
;
import
org.dom4j.Element
;
import
java.io.IOException
;
import
java.util.List
;
/**
* @auther zhangyusheng
* 2019/2/13 16:05
*/
public
class
ExportXml
{
/**
* 生成单个可制证数据XML
*
* @throws IOException 可能出现文件写入不成功
*/
public
static
void
createToMakePackageXML
(
List
<
PreproPersonEntity
>
preproPersonEntities
,
FilesEntity
filesEntity
,
String
url
)
throws
IOException
{
//todo
Document
document
=
DocumentHelper
.
createDocument
();
Element
PACKAGE
=
DocumentHelper
.
createElement
(
"PACKAGE"
);
document
.
setRootElement
(
PACKAGE
);
Element
PACKAGEHEAD
=
PACKAGE
.
addElement
(
"PACKAGEHEAD"
);
Element
DATA
=
PACKAGE
.
addElement
(
"DATA"
);
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
()+
""
);
int
NO
=
1
;
for
(
PreproPersonEntity
preproPersonEntity
:
preproPersonEntities
)
{
Element
RECORD
=
DATA
.
addElement
(
"RECORD"
);
RECORD
.
addAttribute
(
"no"
,
NO
+
""
);
RECORD
.
addAttribute
(
"sid"
,
preproPersonEntity
.
getSid
());
Element
JMSFZSLH
=
RECORD
.
addElement
(
"JMSFZSLH"
);
JMSFZSLH
.
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
YXQQSRQ
=
RECORD
.
addElement
(
"YXQQSRQ"
);
YXQQSRQ
.
setText
(
preproPersonEntity
.
getYxqqsrq
());
Element
YXQJZRQ
=
RECORD
.
addElement
(
"YXQJZRQ"
);
YXQJZRQ
.
setText
(
preproPersonEntity
.
getYxqjzrq
());
Element
JMSFZSLYYDM
=
RECORD
.
addElement
(
"JMSFZSLYYDM"
);
JMSFZSLYYDM
.
setText
(
preproPersonEntity
.
getJmsfzslyydm
());
Element
JMSFZZZLXDM
=
RECORD
.
addElement
(
"JMSFZZZLXDM"
);
JMSFZZZLXDM
.
setText
(
preproPersonEntity
.
getJmsfzzzlxdm
());
Element
JMSFZLZFSDM
=
RECORD
.
addElement
(
"JMSFZLZFSDM"
);
JMSFZLZFSDM
.
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
++;
}
YXStringUtils
.
saveDom2File
(
document
,
url
+
"\\"
+
"ZAGL_ZZJH_"
+
".xml"
);
}
/**
* 字符串去除空格
* @param str 原始字符串
* @return 返回新的字符串
*/
public
static
String
replaceNullString
(
String
str
)
{
if
(
str
==
null
)
return
""
;
else
return
str
;
}
}
src/main/java/com/yxproject/start/utils/IDCardXmlUtils.java
deleted
100644 → 0
View file @
31c8a440
//package com.yxproject.start.utils;
//
//
//import com.yingxin.framework.config.YXServerConfig;
//import com.yingxin.framework.utils.SpringBeanUtil;
//import com.yingxin.framework.utils.YXStringUtils;
//import com.yingxin.hibernate.domain.NewPackageInfoEntity;
//import com.yingxin.hibernate.domain.ProductionEntity;
//import com.yingxin.hibernate.domain.SpecialpackageEntity;
//import com.yingxin.hibernate.service.Manager;
//import org.dom4j.*;
//
//import java.io.*;
//import java.text.SimpleDateFormat;
//import java.util.*;
//
//public class IDCardXmlUtils {
// static Manager manager = (Manager) SpringBeanUtil.getContext().getBean("manager");
//
// /**
// * 生成单个可制证数据XML
// *
// * @throws IOException 可能出现文件写入不成功
// */
// public static void createToMakePackageXML(Map<String, Object> map ,String url) throws IOException {
// Map<String, Object> packageMap = (Map<String, Object>) map.get("package");
// List<Map<String, Object>> list = (List<Map<String, Object>>) map.get("list");
// 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(((String) packageMap.get("BBH")));
// Element DWDM = PACKAGEHEAD.addElement("DWDM");
// DWDM.setText(((String) packageMap.get("DWDM")));
// Element DWMC = PACKAGEHEAD.addElement("DWMC");
// DWMC.setText(((String) packageMap.get("DWMC")));
// Element JLS = PACKAGEHEAD.addElement("JLS");
// JLS.setText(packageMap.get("JLS").toString());
// Element SCSJ = PACKAGEHEAD.addElement("SCSJ");
// SCSJ.setText(((String) packageMap.get("SCSJ")));
// Element SJBBH = PACKAGEHEAD.addElement("SJBBH");
// SJBBH.setText(((String) packageMap.get("SJBBH")));
//
//
// NewPackageInfoEntity newPackageInfoEntity = new NewPackageInfoEntity();
// newPackageInfoEntity.setPackagenum(((String) packageMap.get("SJBBH")));
// newPackageInfoEntity.setCreatedata(((String) packageMap.get("SCSJ")));
// newPackageInfoEntity.setCreatename("2222222");
// manager.saveNewPackageNum(newPackageInfoEntity);
// for (Map<String, Object> map1 : list) {
// Element RECORD = DATA.addElement("RECORD");
// RECORD.addAttribute("no", map1.get("no") + "");
// RECORD.addAttribute("sid", ((String) map1.get("sid")).replaceAll(" ", ""));
// Element JMSFZSLH = RECORD.addElement("JMSFZSLH");
// JMSFZSLH.setText(((String) map1.get("JMSFZSLH")));
// Element GMSFHM = RECORD.addElement("GMSFHM");
// GMSFHM.setText(((String) map1.get("GMSFHM")));
// Element XM = RECORD.addElement("XM");
// XM.setText(replaceNullString((String) map1.get("XM")));
// Element XBDM = RECORD.addElement("XBDM");
// XBDM.setText(replaceNullString((String) map1.get("XBDM")));
// Element MZDM = RECORD.addElement("MZDM");
// MZDM.setText(replaceNullString((String) map1.get("MZDM")));
// Element CSRQ = RECORD.addElement("CSRQ");
// CSRQ.setText(replaceNullString((String) map1.get("CSRQ")));
// Element SSXQDM = RECORD.addElement("SSXQDM");
// SSXQDM.setText(replaceNullString((String) map1.get("SSXQDM")));
// Element DZMC = RECORD.addElement("DZMC");
// DZMC.setText(replaceNullString((String) map1.get("DZMC")));
// Element SDXP = RECORD.addElement("SDXP");
// SDXP.setText(replaceNullString((String) map1.get("SDXP")));
// Element ZWY_ZWTXSJ = RECORD.addElement("ZWY_ZWTXSJ");
// ZWY_ZWTXSJ.setText(replaceNullString((String) map1.get("ZWY_ZWTXSJ")));
// Element ZWY_ZWTZSJ = RECORD.addElement("ZWY_ZWTZSJ");
// ZWY_ZWTZSJ.setText(replaceNullString((String) map1.get("ZWY_ZWTZSJ")));
// Element ZWE_ZWTXSJ = RECORD.addElement("ZWE_ZWTXSJ");
// ZWE_ZWTXSJ.setText(replaceNullString((String) map1.get("ZWE_ZWTXSJ")));
// Element ZWE_ZWTZSJ = RECORD.addElement("ZWE_ZWTZSJ");
// ZWE_ZWTZSJ.setText(replaceNullString((String) map1.get("ZWE_ZWTZSJ")));
// Element QFJG_GAJGMC = RECORD.addElement("QFJG_GAJGMC");
// QFJG_GAJGMC.setText(replaceNullString((String) map1.get("QFJG_GAJGMC")));
// Element YXQQSRQ = RECORD.addElement("YXQQSRQ");
// YXQQSRQ.setText(replaceNullString((String) map1.get("YXQQSRQ")));
// Element YXQJZRQ = RECORD.addElement("YXQJZRQ");
// YXQJZRQ.setText(replaceNullString((String) map1.get("YXQJZRQ")).replaceAll(" ",""));
// Element JMSFZSLYYDM = RECORD.addElement("JMSFZSLYYDM");
// JMSFZSLYYDM.setText(replaceNullString((String) map1.get("JMSFZSLYYDM")));
// Element JMSFZZZLXDM = RECORD.addElement("JMSFZZZLXDM");
// JMSFZZZLXDM.setText(replaceNullString((String) map1.get("JMSFZZZLXDM")));
// Element JMSFZLZFSDM = RECORD.addElement("JMSFZLZFSDM");
// JMSFZLZFSDM.setText(replaceNullString((String) map1.get("JMSFZLZFSDM")));
// Element SJR_XM = RECORD.addElement("SJR_XM");
// SJR_XM.setText(replaceNullString((String) map1.get("SJR_XM")));
// Element SJR_LXDH = RECORD.addElement("SJR_LXDH");
// SJR_LXDH.setText(replaceNullString((String) map1.get("SJR_LXDH")));
// Element SJR_YZBM = RECORD.addElement("SJR_YZBM");
// SJR_YZBM.setText(replaceNullString((String) map1.get("SJR_YZBM")));
// Element SJR_TXDZ = RECORD.addElement("SJR_TXDZ");
// SJR_TXDZ.setText(replaceNullString((String) map1.get("SJR_TXDZ")));
// }
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
// String date = simpleDateFormat.format(new Date());
//
// YXStringUtils.saveDom2File(document, url + "\\" + "ZAGL_ZZJH_" + packageMap.get("SJBBH") + ".xml");
//
// }
//
//
// /**
// * 生成单个可制证军人证数据XML
// *
// * @throws IOException 可能出现文件写入不成功
// */
// public static void createToMakePackageSoldierXML(Map<String, Object> map,String url) throws IOException {
// Map<String, Object> packageMap = (Map<String, Object>) map.get("package");
// List<Map<String, Object>> list = (List<Map<String, Object>>) map.get("list");
// 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(((String) packageMap.get("BBH")));
// Element SJBBH = PACKAGEHEAD.addElement("SJBBH");
// SJBBH.setText(((String) packageMap.get("SJBBH")));
// Element SJBLX = PACKAGEHEAD.addElement("SJBLX");
// SJBLX.setText("63");
// Element DWDM = PACKAGEHEAD.addElement("DWDM");
// DWDM.setText(((String) packageMap.get("DWDM")));
// Element DWMC = PACKAGEHEAD.addElement("DWMC");
// DWMC.setText(((String) packageMap.get("DWMC")));
// Element SCSJ = PACKAGEHEAD.addElement("FSSJ");
// SCSJ.setText(((String) packageMap.get("SCSJ")));
// Element JLS = PACKAGEHEAD.addElement("JLS");
// JLS.setText(packageMap.get("JLS").toString());
// NewPackageInfoEntity newPackageInfoEntity = new NewPackageInfoEntity();
// newPackageInfoEntity.setPackagenum(((String) packageMap.get("SJBBH")));
// newPackageInfoEntity.setCreatedata(((String) packageMap.get("SCSJ")));
// newPackageInfoEntity.setCreatename("2222222");
// manager.saveNewPackageNum(newPackageInfoEntity);
// for (Map<String, Object> map1 : list) {
// Element RECORD = DATA.addElement("Record");
// Element JMSFZSLH = RECORD.addElement("CzrkSlh");
// JMSFZSLH.setText(((String) map1.get("JMSFZSLH")));
// Element GMSFHM = RECORD.addElement("CzrkGmsfhm");
// GMSFHM.setText(((String) map1.get("GMSFHM")));
// Element XM = RECORD.addElement("CzrkXm");
// XM.setText(replaceNullString((String) map1.get("XM")));
// Element XBDM = RECORD.addElement("CzrkXb");
// XBDM.setText(replaceNullString((String) map1.get("XBDM")));
// Element CSRQ = RECORD.addElement("CzrkCsrq");
// CSRQ.setText(replaceNullString((String) map1.get("CSRQ")));
// Element MZDM = RECORD.addElement("CzrkMz");
// MZDM.setText(replaceNullString((String) map1.get("MZDM")));
// Element SSXQDM = RECORD.addElement("CzrkSsqx");
// SSXQDM.setText(replaceNullString((String) map1.get("SSXQDM")));
// Element DZMC = RECORD.addElement("CzrkZz");
// DZMC.setText(replaceNullString((String) map1.get("DZMC")));
// Element QFJG_GAJGMC = RECORD.addElement("CzrkQfjg");
// QFJG_GAJGMC.setText(replaceNullString((String) map1.get("QFJG_GAJGMC")));
// Element YXQQSRQ = RECORD.addElement("CzrkYxqxqsrq");
// YXQQSRQ.setText(replaceNullString((String) map1.get("YXQQSRQ")));
// Element YXQJZRQ = RECORD.addElement("CzrkYxqxjzrq");
// YXQJZRQ.setText(replaceNullString((String) map1.get("YXQJZRQ")));
// Element JMSFZSLYYDM = RECORD.addElement("CzrkSlyy");
// JMSFZSLYYDM.setText(replaceNullString((String) map1.get("JMSFZSLYYDM")));
// Element JMSFZZZLXDM = RECORD.addElement("CzrkZzlx");
// JMSFZZZLXDM.setText(replaceNullString((String) map1.get("JMSFZZZLXDM")));
// Element JMSFZLZFSDM = RECORD.addElement("CzrkLzfs");
// JMSFZLZFSDM.setText(replaceNullString((String) map1.get("JMSFZLZFSDM")));
// Element SJR_XM = RECORD.addElement("CzrkSjrxm");
// SJR_XM.setText(replaceNullString((String) map1.get("SJR_XM")));
// Element SJR_LXDH = RECORD.addElement("CzrkSjrlxdh");
// SJR_LXDH.setText(replaceNullString((String) map1.get("SJR_LXDH")));
// Element SJR_YZBM = RECORD.addElement("CzrkSjryb");
// SJR_YZBM.setText(replaceNullString((String) map1.get("SJR_YZBM")));
// Element SJR_TXDZ = RECORD.addElement("CzrkSjrtxdz");
// SJR_TXDZ.setText(replaceNullString((String) map1.get("SJR_TXDZ")));
// Element SDXP = RECORD.addElement("CzrkSdzp");
// SDXP.setText(replaceNullString((String) map1.get("SDXP")));
//
// }
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
// String date = simpleDateFormat.format(new Date());
// YXStringUtils.saveDom2File(document, url + "\\" + "TEST_SOLDIER_" + packageMap.get("SJBBH") + ".xml");
//
// }
//
//
// /**
// * 生成单个质量回馈数据XML
// *
// * @param list 质量回馈数据
// * @param idx 数据包编号
// * @throws IOException
// */
// public static void createToBackPackageXML(List<ProductionEntity> list, int idx) throws IOException {
//
// 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("3.00");
// Element DWDM = PACKAGEHEAD.addElement("DWDM");
// DWDM.setText("410000000000");
// Element DWMC = PACKAGEHEAD.addElement("DWMC");
// DWMC.setText("河南省公安厅1");
// Element JLS = PACKAGEHEAD.addElement("JLS");
// JLS.setText(String.valueOf(list.size()));
//
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
// String date = simpleDateFormat.format(new Date());
//
// String zero = "00000";
// int len = String.valueOf(idx).length();
// String pkgNumber = "410000000000" + date + zero.substring(0, zero.length() - len) + String.valueOf(idx + 1);
// Element SCSJ = PACKAGEHEAD.addElement("SCSJ");
// SCSJ.setText(date);
// Element SJBBH = PACKAGEHEAD.addElement("SJBBH");
// SJBBH.setText(pkgNumber);
// for (int j = 0; j < list.size(); j++) {
//
// ProductionEntity production = list.get(j);
// Element RECORD = DATA.addElement("RECORD");
// RECORD.addAttribute("no", String.valueOf(j + 1));
// RECORD.addAttribute("sid", production.getSid().replaceAll(" ", ""));
// Element JMSFZSLH = RECORD.addElement("JMSFZSLH");
// JMSFZSLH.setText(replaceNullString(production.getJmsfzslh()));
// Element GMSFHM = RECORD.addElement("GMSFHM");
// GMSFHM.setText(replaceNullString(production.getGmsfhm()));
// Element XM = RECORD.addElement("XM");
// XM.setText(replaceNullString(production.getXm()));
// Element JMSFZZZXXCWLBDM = RECORD.addElement("JMSFZZZXXCWLBDM");
// JMSFZZZXXCWLBDM.setText(replaceNullString(production.getYxZpzlfk()));
// Element CWMS_JYQK = RECORD.addElement("CWMS_JYQK");
// CWMS_JYQK.setText("相片不合格");
// Element JYDW_GAJGJGDM = RECORD.addElement("JYDW_GAJGJGDM");
// JYDW_GAJGJGDM.setText("410000000000");
// Element JYDW_GAJGMC = RECORD.addElement("JYDW_GAJGMC");
// JYDW_GAJGMC.setText("河南省公安厅1");
// Element JYR_XM = RECORD.addElement("JYR_XM");
// JYR_XM.setText("yy");
// Element JYRQ = RECORD.addElement("JYRQ");
// JYRQ.setText(date);
//
//
// production.setYxLczt(-4);
// production.setNewpackagenum(pkgNumber);
// manager.updataSpecialpackageByProductionEntity(production);
//
// }
// String url = YXServerConfig.FILE_TEMP_FOLDER + "/" + date;
// YXStringUtils.saveDom2File(document, url + "\\" + "TEST_BACK_" + pkgNumber + ".xml");
//
// }
//
// /**
// * 循环生成数量为80的数组
// *
// * @param list 原始数组数据
// * @return
// */
// public static List<List<ProductionEntity>> splitPackage(List<ProductionEntity> list) {
//
// int packageNum = list.size() / 80 + (((list.size() % 80 > 0) ? 1 : 0));
//
// List<List<ProductionEntity>> ls = new ArrayList();
// for (int i = 0; i < packageNum; i++) {
// List<ProductionEntity> l = new ArrayList();
// for (int j = 80 * i; j < 80 * i + 80; j++) {
// if (j < list.size()) {
// l.add(list.get(j));
// } else {
// break;
// }
// }
// ls.add(l);
// }
//
// return ls;
// }
//
//
// /**
// * 生成单个可制证的XML
// *
// * @param list
// * @param specialpackage
// * @return
// * @throws IOException
// */
// public static File createToMakeXml(List<ProductionEntity> list, SpecialpackageEntity specialpackage) throws IOException {
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
// String date = simpleDateFormat.format(new Date());
// String url = YXServerConfig.FILE_TEMP_FOLDER + "/" + date;
// File file = new File(url);
// if (!file.exists()) {
// file.mkdirs();
// }
// List<List<ProductionEntity>> pkgarr = splitPackage(list);
// for (int i = 0; i < pkgarr.size(); i++) {
// List<ProductionEntity> pl = pkgarr.get(i);
// if (pl.get(0).getSjblx() != null) {
// createToMakePackageSoldierXML(createToMakeMap(pl, specialpackage, i),url);
// } else {
// createToMakePackageXML(createToMakeMap(pl, specialpackage, i),url);
// }
// }
// return null;
// }
//
// /**
// * 重新生成单个可制证的XML
// *
// * @param list
// * @param specialpackage
// * @return
// * @throws IOException
// */
// public static File createToMakeXmlAgain(List<ProductionEntity> list, SpecialpackageEntity specialpackage) throws IOException {
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
// String date = simpleDateFormat.format(new Date());
// String url = YXServerConfig.FILE_AGAIN_FOLDER + "/" + date;
// File file = new File(url);
// if (!file.exists()) {
// file.mkdirs();
// }
// List<List<ProductionEntity>> pkgarr = splitPackage(list);
// for (int i = 0; i < pkgarr.size(); i++) {
// List<ProductionEntity> pl = pkgarr.get(i);
// if (pl.get(0).getSjblx() != null) {
// createToMakePackageSoldierXML(createToMakeMap(pl, specialpackage, i),url);
// } else {
// createToMakePackageXML(createToMakeMap(pl, specialpackage, i),url);
// }
// }
// return null;
// }
//
//
// public static Map<String, Object> createToMakeMap(List<ProductionEntity> list, SpecialpackageEntity specialpackageEntity, int idex) {
// Map<String, Object> map = new HashMap<String, Object>();
// Map<String, Object> packageMap = new HashMap<String, Object>();
// packageMap.put("BBH", specialpackageEntity.getBbh());
// packageMap.put("DWDM", specialpackageEntity.getDwdm());
// packageMap.put("DWMC", specialpackageEntity.getDwmc());
// packageMap.put("JLS", list.size());
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
// String date = simpleDateFormat.format(new Date());
// String zero = "0000";
// int len = String.valueOf(idex).length();
// String pkgNumber = specialpackageEntity.getSjbbh().substring(0, 12) + date + specialpackageEntity.getSjbbh().substring(specialpackageEntity.getSjbbh().length() - 5, specialpackageEntity.getSjbbh().length() - 4) + zero.substring(0, zero.length() - len) + String.valueOf(idex + 1);
// SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss");
// String date1 = simpleDateFormat1.format(new Date());
// packageMap.put("SCSJ", date1);
// packageMap.put("SJBBH", pkgNumber);
// if (list.get(0).getSjblx() != null) {
// packageMap.put("SJBLX", list.get(0).getSjblx());
// }
// List<Map<String, Object>> personList = new ArrayList<Map<String, Object>>();
// for (int j = 0; j < list.size(); j++) {
// Map<String, Object> personMap = new HashMap<String, Object>();
// if (list.get(j).getSid() != null) {
// personMap.put("sid", list.get(j).getSid());
// personMap.put("no", j + 1);
// }
// personMap.put("JMSFZSLH", list.get(j).getJmsfzslh());
// personMap.put("GMSFHM", list.get(j).getGmsfhm());
// personMap.put("XM", list.get(j).getXm());
// personMap.put("XBDM", list.get(j).getXbdm());
// personMap.put("MZDM", list.get(j).getMzdm());
// personMap.put("CSRQ", list.get(j).getCsrq());
// personMap.put("SSXQDM", list.get(j).getSsxqdm());
// personMap.put("DZMC", list.get(j).getDzmc());
// personMap.put("SDXP", list.get(j).getSdxp());
// personMap.put("ZWY_ZWTXSJ", list.get(j).getZwyZwtxsj());
// personMap.put("ZWY_ZWTZSJ", list.get(j).getZwyZwtzsj());
// personMap.put("ZWE_ZWTXSJ", list.get(j).getZweZwtxsj());
// personMap.put("ZWE_ZWTZSJ", list.get(j).getZweZwtzsj());
// personMap.put("QFJG_GAJGMC", list.get(j).getQfjgGajgmc());
// personMap.put("YXQQSRQ", list.get(j).getYxqqsrq());
// personMap.put("YXQJZRQ", list.get(j).getYxqjzrq());
// personMap.put("JMSFZSLYYDM", list.get(j).getJmsfzslyydm());
// personMap.put("JMSFZZZLXDM", list.get(j).getJmsfzzzlxdm());
// personMap.put("JMSFZLZFSDM", list.get(j).getJmsfzlzfsdm());
// personMap.put("SJR_XM", list.get(j).getSjrXm());
// personMap.put("SJR_LXDH", list.get(j).getSjrLxdh());
// personMap.put("SJR_YZBM", list.get(j).getSjrYzbm());
// personMap.put("SJR_TXDZ", list.get(j).getSjrTxdz());
// personList.add(personMap);
// ProductionEntity production = list.get(j);
// production.setYxLczt(8);
// production.setNewpackagenum(pkgNumber);
// manager.updataSpecialpackageByProductionEntity(production);
// }
// map.put("list", personList);
// map.put("package", packageMap);
//
// return map;
// }
//
// /**
// * 生成质量回馈数据XML
// *
// * @param list 原始数据
// * @return
// * @throws IOException
// */
// public static File creakeToBackXML(List<ProductionEntity> list, int num) throws IOException {
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
// String date = simpleDateFormat.format(new Date());
// String url = YXServerConfig.FILE_TEMP_FOLDER + "/" + date;
// File file = new File(url);
// if (!file.exists()) {
// file.mkdirs();
// }
// createToBackPackageXML(list, num);
// return null;
// }
//
// /**
// * 字符串去除空格
// *
// * @param str 原始字符串
// * @return 返回新的字符串
// */
// public static String replaceNullString(String str) {
// if (str == null) return "";
// else return str;
// }
//
//
//}
src/main/java/com/yxproject/start/utils/QuerySequenceSercive.java
View file @
6aa5dbf5
...
@@ -13,8 +13,8 @@ public class QuerySequenceSercive {
...
@@ -13,8 +13,8 @@ public class QuerySequenceSercive {
@Autowired
@Autowired
private
QuerySequenceMapper
querySequenceMapper
;
private
QuerySequenceMapper
querySequenceMapper
;
public
String
selectSequenceNextValue
(
String
sequenceName
){
public
String
selectSequenceNextValue
(
String
sequenceName
){
String
s
=
querySequenceMapper
.
selectSequenceNextValue
(
sequenceName
+
".nextval()
"
);
Object
[]
objects
=
querySequenceMapper
.
selectSequenceNextValue
(
sequenceName
+
".nextval
"
);
return
s
;
return
""
;
}
}
...
...
src/main/resources/mapper/config/mybatis-config.xml
View file @
6aa5dbf5
...
@@ -5,5 +5,6 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
...
@@ -5,5 +5,6 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
<configuration>
<configuration>
<settings>
<settings>
<setting
name=
"mapUnderscoreToCamelCase"
value=
"true"
/>
<setting
name=
"mapUnderscoreToCamelCase"
value=
"true"
/>
<setting
name=
"logImpl"
value=
"STDOUT_LOGGING"
/>
</settings>
</settings>
</configuration>
</configuration>
\ No newline at end of file
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