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
c38b59cc
Commit
c38b59cc
authored
Mar 02, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试接口
parent
7436c609
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
38 deletions
+103
-38
ReadExcelApi.java
src/main/java/com/yxproject/start/api/ReadExcelApi.java
+32
-29
PersonPostEntity.java
...ain/java/com/yxproject/start/entity/PersonPostEntity.java
+64
-6
PersonPostMapper.java
...ain/java/com/yxproject/start/mapper/PersonPostMapper.java
+4
-1
PersonPostServiceImpl.java
...m/yxproject/start/service/impl/PersonPostServiceImpl.java
+3
-2
~$调度系统—详细设计说明书.doc
~$调度系统—详细设计说明书.doc
+0
-0
No files found.
src/main/java/com/yxproject/start/api/ReadExcelApi.java
View file @
c38b59cc
...
...
@@ -22,9 +22,13 @@ import javax.servlet.http.HttpServletResponse;
import
javax.ws.rs.Consumes
;
import
javax.ws.rs.Produces
;
import
javax.ws.rs.core.MediaType
;
import
javax.xml.crypto.Data
;
import
java.io.File
;
import
java.io.IOException
;
import
java.sql.Time
;
import
java.sql.Timestamp
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
/**
...
...
@@ -49,6 +53,7 @@ public class ReadExcelApi {
public
boolean
ReadPersonPost
(
HttpServletResponse
resp
,
HttpServletRequest
requ
)
{
System
.
out
.
println
(
"进入api"
);
YXJSONResponse
yxresp
=
new
YXJSONResponse
();
DateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
resp
.
setCharacterEncoding
(
"UTF-8"
);
String
filename
=
""
;
DiskFileItemFactory
factory
=
new
DiskFileItemFactory
();
...
...
@@ -65,8 +70,6 @@ public class ReadExcelApi {
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
List
<
FileItem
>
list
=
null
;
try
{
//将当前上下文初始化给 CommonsMutipartResolver (多部分解析器)
CommonsMultipartResolver
multipartResolver
=
new
CommonsMultipartResolver
(
requ
.
getSession
().
getServletContext
());
...
...
@@ -107,8 +110,8 @@ public class ReadExcelApi {
fileNameDicEntity
.
setFileName
(
filename
);
fileNameDicEntity
.
setUploadDate
(
new
Date
());
//保存个人邮寄信息
long
fileID
=
fileNameDicService
.
saveFileNameDic
(
fileNameDicEntity
);
List
<
PersonPostEntity
>
entityList
=
new
ArrayList
<
PersonPostEntity
>();
//
long fileID = fileNameDicService.saveFileNameDic(fileNameDicEntity);
List
<
PersonPostEntity
>
entityList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
list1
.
size
();
i
++)
{
PersonPostEntity
personPostEntity
=
new
PersonPostEntity
();
List
list2
=
(
List
)
list1
.
get
(
i
);
...
...
@@ -116,33 +119,33 @@ public class ReadExcelApi {
if
(
list2
==
null
||
i
==
0
)
{
continue
;
}
personPostEntity
.
set
Back
WaybillNumber
((
String
)
list2
.
get
(
0
));
personPostEntity
.
set
Order
Number
((
String
)
list2
.
get
(
1
));
personPostEntity
.
set
CreateDate
((
Time
)
list2
.
get
(
2
));
personPostEntity
.
set
Openid
((
String
)
list2
.
get
(
3
));
personPostEntity
.
set
WcPlayOrderNumber
((
String
)
list2
.
get
(
4
));
personPostEntity
.
set
PlayState
((
String
)
list2
.
get
(
5
));
personPostEntity
.
set
Order
State
((
String
)
list2
.
get
(
6
));
personPostEntity
.
set
ApplicantNam
e
((
String
)
list2
.
get
(
7
));
personPostEntity
.
set
Sender
Name
((
String
)
list2
.
get
(
8
));
personPostEntity
.
setSender
Phon
e
((
String
)
list2
.
get
(
9
));
personPostEntity
.
setSender
Address
((
String
)
list2
.
get
(
10
));
personPostEntity
.
set
RecipientName
((
String
)
list2
.
get
(
11
));
personPostEntity
.
setRecipient
Phon
e
((
String
)
list2
.
get
(
12
));
personPostEntity
.
setRecipient
Address
((
String
)
list2
.
get
(
13
));
personPostEntity
.
set
OrderBlankNumber
((
String
)
list2
.
get
(
14
));
personPostEntity
.
set
GetToProvince
((
String
)
list2
.
get
(
15
));
personPostEntity
.
setGetTo
City
((
String
)
list2
.
get
(
16
));
personPostEntity
.
setGetToC
oun
ty
((
String
)
list2
.
get
(
17
));
personPostEntity
.
set
BusinessType
((
String
)
list2
.
get
(
18
));
personPostEntity
.
set
LatticeMouthInformation
((
String
)
list2
.
get
(
19
));
personPostEntity
.
set
NatureOfTheInternal
((
String
)
list2
.
get
(
20
));
personPostEntity
.
setNatureOfTheIn
formation
((
String
)
list2
.
get
(
21
));
personPostEntity
.
set
FirstWhite
((
String
)
list2
.
get
(
22
));
personPostEntity
.
setFi
leId
(
fileNameDicEntity
.
getFileId
(
));
personPostEntity
.
setWaybillNumber
((
String
)
list2
.
get
(
0
));
personPostEntity
.
set
BackWaybill
Number
((
String
)
list2
.
get
(
1
));
personPostEntity
.
set
OrderNumber
((
String
)
list2
.
get
(
2
));
personPostEntity
.
set
CreateDate
((
String
)
list2
.
get
(
3
));
personPostEntity
.
set
Openid
((
String
)
list2
.
get
(
4
));
personPostEntity
.
set
WcPlayOrderNumber
((
String
)
list2
.
get
(
5
));
personPostEntity
.
set
Play
State
((
String
)
list2
.
get
(
6
));
personPostEntity
.
set
OrderStat
e
((
String
)
list2
.
get
(
7
));
personPostEntity
.
set
Applicant
Name
((
String
)
list2
.
get
(
8
));
personPostEntity
.
setSender
Nam
e
((
String
)
list2
.
get
(
9
));
personPostEntity
.
setSender
Phone
((
String
)
list2
.
get
(
10
));
personPostEntity
.
set
SenderAddress
((
String
)
list2
.
get
(
11
));
personPostEntity
.
setRecipient
Nam
e
((
String
)
list2
.
get
(
12
));
personPostEntity
.
setRecipient
Phone
((
String
)
list2
.
get
(
13
));
personPostEntity
.
set
RecipientAddress
((
String
)
list2
.
get
(
14
));
personPostEntity
.
set
OrderBlankNumber
((
String
)
list2
.
get
(
15
));
personPostEntity
.
setGetTo
Province
((
String
)
list2
.
get
(
16
));
personPostEntity
.
setGetToC
i
ty
((
String
)
list2
.
get
(
17
));
personPostEntity
.
set
GetToCounty
((
String
)
list2
.
get
(
18
));
personPostEntity
.
set
BusinessType
((
String
)
list2
.
get
(
19
));
personPostEntity
.
set
LatticeMouthInformation
((
String
)
list2
.
get
(
20
));
personPostEntity
.
setNatureOfTheIn
ternal
((
String
)
list2
.
get
(
21
));
personPostEntity
.
set
NatureOfTheInformation
((
String
)
list2
.
get
(
22
));
personPostEntity
.
setFi
rstWhite
((
String
)
list2
.
get
(
23
));
entityList
.
add
(
personPostEntity
);
}
boolean
b
=
personPostService
.
savePersonPost
(
entityList
);
personPostService
.
savePersonPost
(
entityList
);
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/yxproject/start/entity/PersonPostEntity.java
View file @
c38b59cc
...
...
@@ -5,12 +5,12 @@ import java.sql.Time;
import
java.util.Objects
;
@Entity
@Table
(
name
=
"PERSON_POST"
,
schema
=
"Y
INGXIN
"
,
catalog
=
""
)
@Table
(
name
=
"PERSON_POST"
,
schema
=
"Y
X
"
,
catalog
=
""
)
public
class
PersonPostEntity
{
private
String
waybillNumber
;
private
String
backWaybillNumber
;
private
String
orderNumber
;
private
Time
createDate
;
private
String
createDate
;
private
String
openid
;
private
String
wcPlayOrderNumber
;
private
String
playState
;
...
...
@@ -37,7 +37,12 @@ public class PersonPostEntity {
private
Time
validPeriodEnd
;
private
String
note
;
private
Long
state
;
private
Time
uploadDate
;
private
Long
fileId
;
private
Time
analysisDate
;
private
Time
printDate
;
private
Time
formStartTime
;
private
Time
formDeadline
;
@Id
@Column
(
name
=
"WAYBILL_NUMBER"
)
...
...
@@ -71,11 +76,11 @@ public class PersonPostEntity {
@Basic
@Column
(
name
=
"CREATE_DATE"
)
public
Time
getCreateDate
()
{
public
String
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
Time
createDate
)
{
public
void
setCreateDate
(
String
createDate
)
{
this
.
createDate
=
createDate
;
}
...
...
@@ -339,6 +344,15 @@ public class PersonPostEntity {
this
.
state
=
state
;
}
@Basic
@Column
(
name
=
"UPLOAD_DATE"
)
public
Time
getUploadDate
()
{
return
uploadDate
;
}
public
void
setUploadDate
(
Time
uploadDate
)
{
this
.
uploadDate
=
uploadDate
;
}
@Basic
@Column
(
name
=
"FILE_ID"
)
...
...
@@ -350,6 +364,45 @@ public class PersonPostEntity {
this
.
fileId
=
fileId
;
}
@Basic
@Column
(
name
=
"ANALYSIS_DATE"
)
public
Time
getAnalysisDate
()
{
return
analysisDate
;
}
public
void
setAnalysisDate
(
Time
analysisDate
)
{
this
.
analysisDate
=
analysisDate
;
}
@Basic
@Column
(
name
=
"PRINT_DATE"
)
public
Time
getPrintDate
()
{
return
printDate
;
}
public
void
setPrintDate
(
Time
printDate
)
{
this
.
printDate
=
printDate
;
}
@Basic
@Column
(
name
=
"FORM_START_TIME"
)
public
Time
getFormStartTime
()
{
return
formStartTime
;
}
public
void
setFormStartTime
(
Time
formStartTime
)
{
this
.
formStartTime
=
formStartTime
;
}
@Basic
@Column
(
name
=
"FORM_DEADLINE"
)
public
Time
getFormDeadline
()
{
return
formDeadline
;
}
public
void
setFormDeadline
(
Time
formDeadline
)
{
this
.
formDeadline
=
formDeadline
;
}
@Override
public
boolean
equals
(
Object
o
)
{
...
...
@@ -386,11 +439,16 @@ public class PersonPostEntity {
Objects
.
equals
(
validPeriodEnd
,
that
.
validPeriodEnd
)
&&
Objects
.
equals
(
note
,
that
.
note
)
&&
Objects
.
equals
(
state
,
that
.
state
)
&&
Objects
.
equals
(
fileId
,
that
.
fileId
)
;
Objects
.
equals
(
uploadDate
,
that
.
uploadDate
)
&&
Objects
.
equals
(
fileId
,
that
.
fileId
)
&&
Objects
.
equals
(
analysisDate
,
that
.
analysisDate
)
&&
Objects
.
equals
(
printDate
,
that
.
printDate
)
&&
Objects
.
equals
(
formStartTime
,
that
.
formStartTime
)
&&
Objects
.
equals
(
formDeadline
,
that
.
formDeadline
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
waybillNumber
,
backWaybillNumber
,
orderNumber
,
createDate
,
openid
,
wcPlayOrderNumber
,
playState
,
orderState
,
applicantName
,
senderName
,
senderPhone
,
senderAddress
,
recipientName
,
recipientPhone
,
recipientAddress
,
orderBlankNumber
,
getToProvince
,
getToCity
,
getToCounty
,
businessType
,
latticeMouthInformation
,
natureOfTheInternal
,
natureOfTheInformation
,
firstWhite
,
idCard
,
acceptTheMatter
,
beginUsefulLife
,
validPeriodEnd
,
note
,
state
,
fileId
);
return
Objects
.
hash
(
waybillNumber
,
backWaybillNumber
,
orderNumber
,
createDate
,
openid
,
wcPlayOrderNumber
,
playState
,
orderState
,
applicantName
,
senderName
,
senderPhone
,
senderAddress
,
recipientName
,
recipientPhone
,
recipientAddress
,
orderBlankNumber
,
getToProvince
,
getToCity
,
getToCounty
,
businessType
,
latticeMouthInformation
,
natureOfTheInternal
,
natureOfTheInformation
,
firstWhite
,
idCard
,
acceptTheMatter
,
beginUsefulLife
,
validPeriodEnd
,
note
,
state
,
uploadDate
,
fileId
,
analysisDate
,
printDate
,
formStartTime
,
formDeadline
);
}
}
src/main/java/com/yxproject/start/mapper/PersonPostMapper.java
View file @
c38b59cc
...
...
@@ -12,7 +12,10 @@ import java.util.List;
*/
@Mapper
public
interface
PersonPostMapper
{
@Update
(
"insert into PERSON_POST ( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE,UPLOAD_DATE) values (#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite},#(uploadDate))"
)
@Update
(
"insert into PERSON_POST "
+
"( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE) "
+
"values "
+
"(#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite})"
)
public
boolean
savePersonPost
(
PersonPostEntity
personPostEntity
);
@Update
(
"update prepro_person p set IS_POST=9 where p.JMSFZSLH in ( select p.JMSFZSLH from prepro_person p left join files files on p.file_id=files.ID \n"
+
...
...
src/main/java/com/yxproject/start/service/impl/PersonPostServiceImpl.java
View file @
c38b59cc
...
...
@@ -9,6 +9,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.xml.crypto.Data
;
import
java.sql.Time
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -27,8 +29,7 @@ public class PersonPostServiceImpl implements PersonPostService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
savePersonPost
(
List
<
PersonPostEntity
>
personPostEntities
)
{
for
(
PersonPostEntity
personPostEntity:
personPostEntities
)
{
personPostEntity
.
setCreateDate
(
new
java
.
sql
.
Time
(
new
Date
().
getTime
()));
boolean
b
=
personPostMapper
.
savePersonPost
(
personPostEntity
);
personPostMapper
.
savePersonPost
(
personPostEntity
);
}
return
true
;
}
...
...
~$调度系统—详细设计说明书.doc
deleted
100644 → 0
View file @
7436c609
File deleted
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