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
df1b4385
Commit
df1b4385
authored
Mar 12, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
交接单4.5
parent
c86d6e1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
85 deletions
+94
-85
ReceiptApi.java
src/main/java/com/yxproject/start/api/ReceiptApi.java
+94
-85
No files found.
src/main/java/com/yxproject/start/api/ReceiptApi.java
View file @
df1b4385
...
...
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -32,58 +33,25 @@ public class ReceiptApi {
@RequestMapping
(
"createReceiptList"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
createReceiptList
(
@RequestParam
(
"id"
)
String
id
)
{
//判断是否是特证
if
(
receiptService
.
selectSpecialCardByAcceptNo
(
id
)
==
1
)
{
//查询这个受理号是否生成了交接单
int
countAccept
=
receiptService
.
selectCountById
(
id
);
//判断是否生成了交接单
if
(
countAccept
==
0
)
{
//查询特证交接单所需数据
Map
<
String
,
Object
>
resultDate
=
receiptService
.
selectReceiptListDate
(
id
);
String
acceptNo
=
(
String
)
resultDate
.
get
(
"ACCEPT_NO"
);
String
GAJG_DM
=
(
String
)
resultDate
.
get
(
"GAJG_DM"
);
String
GAJG_MC
=
(
String
)
resultDate
.
get
(
"GAJG_MC"
);
String
cardType
=
(
String
)
resultDate
.
get
(
"CARD_TYPE"
);
String
oldCardType
=
(
String
)
resultDate
.
get
(
"OLD_CARD_TYPE"
);
int
state
=
0
;
int
count
=
(
int
)
resultDate
.
get
(
"COUNT"
);
//生成特证交接单
receiptService
.
createReceiptList
(
acceptNo
,
GAJG_DM
,
count
,
state
,
cardType
,
oldCardType
,
GAJG_MC
);
//查询特证详单所需数据
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
sex
=
(
String
)
detailedData
.
get
(
"SEX"
);
String
cardId
=
(
String
)
detailedData
.
get
(
"CARD_ID"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)
+
""
);
//生成特证详单
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
,
sex
);
}
else
{
//已经生成特证交接单,不做操作。
}
}
else
{
//查询交接单所需数据
Map
<
String
,
Object
>
receiptListDate
=
receiptService
.
selectReceiptListDate
(
id
);
System
.
out
.
println
(
"111111111111111111111"
+
receiptListDate
);
String
groupNo
=
(
String
)
receiptListDate
.
get
(
"GROUP_NO"
);
String
GAJG_DM
=
(
String
)
receiptListDate
.
get
(
"GAJG_DM"
);
String
GAJG_MC
=
(
String
)
receiptListDate
.
get
(
"GAJG_MC"
);
String
cardType
=
(
String
)
receiptListDate
.
get
(
"CARD_TYPE"
);
String
oldCardType
=
(
String
)
receiptListDate
.
get
(
"OLD_CARD_TYPE"
);
int
count
=
Integer
.
valueOf
(
receiptListDate
.
get
(
"VALID_COUNT"
).
toString
());
int
state
=
0
;
//查询这个组号是否生成了交接单
int
countGroup
=
receiptService
.
selectByGroupNo
(
groupNo
);
//没有生成交接单
if
(
countGroup
==
0
)
{
//生成交接单
receiptService
.
createReceiptList
(
groupNo
,
GAJG_DM
,
count
,
state
,
cardType
,
oldCardType
,
GAJG_MC
);
//查询这个身份证是否生成了详单
int
receiptCount
=
receiptService
.
selectReceiptById
(
id
);
//没有生成交接单详单
if
(
receiptCount
==
0
)
{
try
{
//判断是否是特证
if
(
receiptService
.
selectSpecialCardByAcceptNo
(
id
)
==
1
)
{
//查询这个受理号是否生成了交接单
int
countAccept
=
receiptService
.
selectCountById
(
id
);
//判断是否生成了交接单
if
(
countAccept
==
0
)
{
//查询特证交接单所需数据
Map
<
String
,
Object
>
resultDate
=
receiptService
.
selectReceiptListDate
(
id
);
String
acceptNo
=
(
String
)
resultDate
.
get
(
"ACCEPT_NO"
);
String
GAJG_DM
=
(
String
)
resultDate
.
get
(
"GAJG_DM"
);
String
GAJG_MC
=
(
String
)
resultDate
.
get
(
"GAJG_MC"
);
String
cardType
=
(
String
)
resultDate
.
get
(
"CARD_TYPE"
);
String
oldCardType
=
(
String
)
resultDate
.
get
(
"OLD_CARD_TYPE"
);
int
state
=
0
;
int
count
=
(
int
)
resultDate
.
get
(
"COUNT"
);
//生成特证交接单
receiptService
.
createReceiptList
(
acceptNo
,
GAJG_DM
,
count
,
state
,
cardType
,
oldCardType
,
GAJG_MC
);
//查询特证详单所需数据
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
...
...
@@ -91,38 +59,76 @@ public class ReceiptApi {
String
sex
=
(
String
)
detailedData
.
get
(
"SEX"
);
String
cardId
=
(
String
)
detailedData
.
get
(
"CARD_ID"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
System
.
out
.
println
(
"1111111111111111"
+
gajg_dm
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)
+
""
);
//生成详单
//生成
特证
详单
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
,
sex
);
}
else
{
//
不做操作
//
已经生成特证交接单,不做操作。
}
}
else
{
//已生成交接单
//查询这个身份证是否生成了详单
int
receiptCount
=
receiptService
.
selectReceiptById
(
id
);
//未生成交接单详单
if
(
receiptCount
==
0
)
{
//查询交接单详单数据
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
sex
=
(
String
)
detailedData
.
get
(
"SEX"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)
+
""
);
//生成详单
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
,
sex
);
//查询交接单所需数据
Map
<
String
,
Object
>
receiptListDate
=
receiptService
.
selectReceiptListDate
(
id
);
System
.
out
.
println
(
"111111111111111111111"
+
receiptListDate
);
String
groupNo
=
(
String
)
receiptListDate
.
get
(
"GROUP_NO"
);
String
GAJG_DM
=
(
String
)
receiptListDate
.
get
(
"GAJG_DM"
);
String
GAJG_MC
=
(
String
)
receiptListDate
.
get
(
"GAJG_MC"
);
String
cardType
=
(
String
)
receiptListDate
.
get
(
"CARD_TYPE"
);
String
oldCardType
=
(
String
)
receiptListDate
.
get
(
"OLD_CARD_TYPE"
);
int
count
=
Integer
.
valueOf
(
receiptListDate
.
get
(
"VALID_COUNT"
).
toString
());
int
state
=
0
;
//查询这个组号是否生成了交接单
int
countGroup
=
receiptService
.
selectByGroupNo
(
groupNo
);
//没有生成交接单
if
(
countGroup
==
0
)
{
//生成交接单
receiptService
.
createReceiptList
(
groupNo
,
GAJG_DM
,
count
,
state
,
cardType
,
oldCardType
,
GAJG_MC
);
//查询这个身份证是否生成了详单
int
receiptCount
=
receiptService
.
selectReceiptById
(
id
);
//没有生成交接单详单
if
(
receiptCount
==
0
)
{
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
sex
=
(
String
)
detailedData
.
get
(
"SEX"
);
String
cardId
=
(
String
)
detailedData
.
get
(
"CARD_ID"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
System
.
out
.
println
(
"1111111111111111"
+
gajg_dm
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)
+
""
);
//生成详单
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
,
sex
);
}
else
{
//不做操作
}
}
else
{
//已生成详单,不做操作。
//已生成交接单
//查询这个身份证是否生成了详单
int
receiptCount
=
receiptService
.
selectReceiptById
(
id
);
//未生成交接单详单
if
(
receiptCount
==
0
)
{
//查询交接单详单数据
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
sex
=
(
String
)
detailedData
.
get
(
"SEX"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)
+
""
);
//生成详单
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
,
sex
);
}
else
{
//已生成详单,不做操作。
}
}
//查询有几个特证
int
specialCardCount
=
receiptService
.
selectSpecialCard
(
groupNo
);
//减去特证个数
int
finishCount
=
receiptService
.
selectCount
(
groupNo
)
-
specialCardCount
;
receiptService
.
updateFinishCount
(
groupNo
,
finishCount
);
}
//查询有几个特证
int
specialCardCount
=
receiptService
.
selectSpecialCard
(
groupNo
);
//减去特证个数
int
finishCount
=
receiptService
.
selectCount
(
groupNo
)
-
specialCardCount
;
receiptService
.
updateFinishCount
(
groupNo
,
finishCount
);
}
catch
(
NullPointerException
e
){
return
false
;
}
return
true
;
}
...
...
@@ -137,11 +143,8 @@ public class ReceiptApi {
List
<
Map
<
String
,
Object
>>
resultMap
=
receiptService
.
selectReceiptListOfSpecialCard
();
for
(
int
i
=
0
;
i
<
resultMap
.
size
();
i
++){
String
groupNo
=
(
String
)
resultMap
.
get
(
i
).
get
(
"QR_CODE"
);
System
.
out
.
println
(
"1111111111111111111111111111"
+
groupNo
);
Map
<
String
,
Object
>
map
=
receiptService
.
selectCountTime
(
groupNo
);
System
.
out
.
println
(
"22222222222222222222222222222"
+
map
.
get
(
"download"
));
resultMap
.
get
(
i
).
put
(
"download"
,
map
.
get
(
"download"
));
// resultMap.get(i).put("",map.get(""));
resultMap
.
get
(
i
).
put
(
"checkerCount"
,
map
.
get
(
"checkerCount"
));
resultMap
.
get
(
i
).
put
(
"electricCount"
,
map
.
get
(
"electricCount"
));
}
...
...
@@ -170,14 +173,20 @@ public class ReceiptApi {
@RequestMapping
(
"selectDetailList"
)
public
List
<
Map
<
String
,
Object
>>
selectDetailList
(
@RequestParam
(
"receiptId"
)
String
receiptId
){
List
<
Map
<
String
,
Object
>>
resultList
=
receiptService
.
selectDetailList
(
receiptId
);
for
(
int
i
=
0
;
i
<
resultList
.
size
();
i
++){
String
groupNo
=
(
String
)
resultList
.
get
(
i
).
get
(
"QR_CODE"
);
Map
<
String
,
Object
>
map
=
receiptService
.
selectTimes
(
groupNo
);
resultList
.
get
(
i
).
put
(
"downloadDate"
,
map
.
get
(
"downloadDate"
));
resultList
.
get
(
i
).
put
(
"checkDate"
,
map
.
get
(
"checkDate"
));
resultList
.
get
(
i
).
put
(
"electricDate"
,
map
.
get
(
"electricDate"
));
try
{
for
(
int
i
=
0
;
i
<
resultList
.
size
();
i
++){
String
groupNo
=
(
String
)
resultList
.
get
(
i
).
get
(
"QR_CODE"
);
Map
<
String
,
Object
>
map
=
receiptService
.
selectTimes
(
groupNo
);
resultList
.
get
(
i
).
put
(
"downloadDate"
,
map
.
get
(
"downloadDate"
));
resultList
.
get
(
i
).
put
(
"checkDate"
,
map
.
get
(
"checkDate"
));
resultList
.
get
(
i
).
put
(
"electricDate"
,
map
.
get
(
"electricDate"
));
}
}
catch
(
NullPointerException
e
){
return
new
ArrayList
<>();
}
return
resultList
;
}
/**
...
...
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