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
90d7ec9c
Commit
90d7ec9c
authored
Mar 01, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加按条件查询制证数据
添加按条件下载制证数据包
parent
8fec9558
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
14 deletions
+77
-14
ExportXMLApi.java
src/main/java/com/yxproject/start/api/ExportXMLApi.java
+18
-4
queryPreproPerson.java
src/main/java/com/yxproject/start/api/queryPreproPerson.java
+35
-0
PreproPersonMapper.java
...n/java/com/yxproject/start/mapper/PreproPersonMapper.java
+11
-8
PreproPersonService.java
...java/com/yxproject/start/service/PreproPersonService.java
+5
-1
PreproPersonServiceImpl.java
...yxproject/start/service/impl/PreproPersonServiceImpl.java
+8
-0
ExportXml.java
src/main/java/com/yxproject/start/utils/ExportXml.java
+0
-1
No files found.
src/main/java/com/yxproject/start/api/ExportXMLApi.java
View file @
90d7ec9c
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.entity.FilesEntity
;
import
com.yxproject.start.entity.PreproPersonEntity
;
import
com.yxproject.start.service.PreproPersonService
;
import
com.yxproject.start.utils.ExportXml
;
import
org.apache.commons.lang.time.DateFormatUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -12,7 +15,9 @@ import java.io.File;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
/**
* @auther zhangyusheng
...
...
@@ -29,15 +34,24 @@ public class ExportXMLApi {
*/
@RequestMapping
(
"printPostXmlData"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
byte
[]
printXmlData
(
@RequestParam
(
"
date"
)
String
d
ate
,
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
uploadD
ate
,
HttpServletResponse
response
){
response
.
setContentType
(
"application/x-download"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
String
dateTime
=
DateFormatUtils
.
format
(
new
Date
(),
"yyyyMMddHH"
);
// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String
fout
=
null
;
//TODO
// List<PersonPostAbnormalEntity> postAbnormalEntity = personPostService.getAllPersonPostAbnormalEntity(date);
// fout = ExportExcel.exportPersonPostAbnormalExcel(postAbnormalEntity);
List
<
PreproPersonEntity
>
preproPersonEntities
=
preproPersonService
.
selectPreproPerson
(
uploadNo
,
IDCard
,
oldFile
,
newFile
,
SSXQDM
,
cardType
,
state
,
uploadDate
);
FilesEntity
filesEntity
=
new
FilesEntity
();
filesEntity
.
setVersionCode
(
"3.00"
);
filesEntity
.
setDwdm
(
"410600000000"
);
filesEntity
.
setDwmc
(
"北京市公安局"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddhhmmss"
);
filesEntity
.
setCreatTime
(
simpleDateFormat
.
format
(
new
Date
()));
try
{
ExportXml
.
createToMakePackageXML
(
preproPersonEntities
,
filesEntity
,
"\\zhang\\"
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
String
outFile
=
dateTime
+
"制证数据包"
;
try
{
FileInputStream
fis
=
new
FileInputStream
(
new
File
(
fout
));
...
...
src/main/java/com/yxproject/start/api/queryPreproPerson.java
0 → 100644
View file @
90d7ec9c
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.entity.PreproPersonEntity
;
import
com.yxproject.start.service.PreproPersonService
;
import
com.yxproject.start.utils.YXJSONResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* @auther zhangyusheng
* 2019/3/1 13:34
*/
@RestController
@RequestMapping
(
"queryPreproPerson"
)
public
class
queryPreproPerson
{
@Autowired
private
PreproPersonService
preproPersonService
;
/**
* 查询制证数据
*/
@RequestMapping
(
"queryPreproPerson"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
String
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
){
List
<
PreproPersonEntity
>
preproPersonEntities
=
preproPersonService
.
selectPreproPerson
(
uploadNo
,
IDCard
,
oldFile
,
newFile
,
SSXQDM
,
cardType
,
state
,
uploadDate
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
response
.
setCharacterEncoding
(
"UTF-8"
);
yxjsonResponse
.
outPutSuccess
(
preproPersonEntities
);
return
yxjsonResponse
.
toJSONString
();
}
}
src/main/java/com/yxproject/start/mapper/PreproPersonMapper.java
View file @
90d7ec9c
package
com
.
yxproject
.
start
.
mapper
;
import
com.yxproject.start.entity.PreproPersonEntity
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Update
;
import
org.apache.ibatis.annotations.*
;
import
java.util.List
;
...
...
@@ -30,8 +27,14 @@ public interface PreproPersonMapper {
@Select
(
"select * from PREPRO_PERSON \n"
+
"left join files on PREPRO_PERSON.FILE_ID = files.ID\n"
+
"left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID "
+
"where PREPRO_PERSON.JMSFZSLH = #{uploadNo} and GMSFHM = #{IDCard}"
+
"and files.SOURCE_FILE_NAME =#{oldFile} and NEW_FILES.NEW_FILE_NAME = #{newFile}"
+
"and PREPRO_PERSON.SSXQDM =#{SSXQDM} and PREPRO_PERSON.state =#{} "
)
public
List
<
PreproPersonEntity
>
selectPreproPerson
(
String
uploadNo
,
String
IDCard
,
String
oldFile
,
String
newFile
,
String
SSXQDM
,
String
cardType
,
String
state
,
String
uploadDate
);
"where 1=1 "
+
"<when test='uploadNo!=null'> and PREPRO_PERSON.JMSFZSLH = #{uploadNo} </when>"
+
" <when test='IDCard!=null'> and GMSFHM = #{IDCard} </when> "
+
" <when test='oldFile!=null'> and files.SOURCE_FILE_NAME =#{oldFile} </when> "
+
" <when test='newFile!=null'> and NEW_FILES.NEW_FILE_NAME = #{newFile} </when> "
+
" <when test='SSXQDM!=null'> and PREPRO_PERSON.SSXQDM =#{SSXQDM} </when> "
+
" <when test='cardType!=null'> and PREPRO_PERSON.CARD_TYPE_ID =#{cardType} </when> "
+
" <when test='state!=null'> and PREPRO_PERSON.state = #{state} </when> "
+
" <when test='uploadDate!=null'> and files.CREAT_TIME = #{uploadDate} </when> "
)
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"
)
String
cardType
,
@Param
(
"state"
)
String
state
,
@Param
(
"uploadDate"
)
String
uploadDate
);
}
src/main/java/com/yxproject/start/service/PreproPersonService.java
View file @
90d7ec9c
package
com
.
yxproject
.
start
.
service
;
import
com.yxproject.start.entity.PreproPersonEntity
;
import
java.util.List
;
/**
* @auther zhangyusheng
* 2019/3/1 11:24
*/
public
interface
PreproPersonService
{
public
List
<
PreproPersonEntity
>
selectPreproPerson
(
String
uploadNo
,
String
IDCard
,
String
oldFile
,
String
newFile
,
String
SSXQDM
,
String
cardType
,
String
state
,
String
uploadDate
);
}
src/main/java/com/yxproject/start/service/impl/PreproPersonServiceImpl.java
View file @
90d7ec9c
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.entity.PreproPersonEntity
;
import
com.yxproject.start.mapper.PreproPersonMapper
;
import
com.yxproject.start.service.PreproPersonService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @auther zhangyusheng
* 2019/3/1 11:25
...
...
@@ -14,4 +17,9 @@ public class PreproPersonServiceImpl implements PreproPersonService {
@Autowired
private
PreproPersonMapper
preproPersonMapper
;
@Override
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
(
uploadNo
,
IDCard
,
oldFile
,
newFile
,
SSXQDM
,
cardType
,
state
,
uploadDate
);
return
preproPersonEntities
;
}
}
src/main/java/com/yxproject/start/utils/ExportXml.java
View file @
90d7ec9c
...
...
@@ -85,7 +85,6 @@ public class ExportXml {
SJR_TXDZ
.
setText
(
replaceNullString
(
preproPersonEntity
.
getSjrTxdz
()));
}
YXStringUtils
.
saveDom2File
(
document
,
url
+
"\\"
+
"ZAGL_ZZJH_"
+
".xml"
);
}
/**
...
...
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