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
b6981d1b
Commit
b6981d1b
authored
Apr 09, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
5f62b562
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
30 deletions
+49
-30
ReceiptApi.java
src/main/java/com/yxproject/start/api/ReceiptApi.java
+33
-14
ReceiptMapper.java
src/main/java/com/yxproject/start/mapper/ReceiptMapper.java
+5
-5
ReceiptService.java
...main/java/com/yxproject/start/service/ReceiptService.java
+3
-3
ReceiptServiceImpl.java
.../com/yxproject/start/service/impl/ReceiptServiceImpl.java
+8
-8
No files found.
src/main/java/com/yxproject/start/api/ReceiptApi.java
View file @
b6981d1b
...
...
@@ -14,10 +14,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
;
import
java.util.*
;
@RestController
@RequestMapping
(
"ReceiptApi"
)
...
...
@@ -37,13 +34,13 @@ public class ReceiptApi {
*/
@RequestMapping
(
"createReceiptList"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
createReceiptList
(
@RequestParam
(
"id"
)
String
id
)
{
public
Map
<
String
,
Object
>
createReceiptList
(
@RequestParam
(
"id"
)
String
id
)
{
//判断是否是特证
if
(
receiptService
.
selectSpecialCardByAcceptNo
(
id
)
==
1
)
{
//查询这个受理号是否生成了交接单
int
countAccep
t
=
receiptService
.
selectCountById
(
id
);
List
<
Map
<
String
,
Object
>>
mapLis
t
=
receiptService
.
selectCountById
(
id
);
//判断是否生成了交接单
if
(
countAccept
==
0
)
{
if
(
mapList
.
size
()
==
0
)
{
//查询特证交接单所需数据
Map
<
String
,
Object
>
resultDate
=
receiptService
.
selectReceiptListDate
(
id
);
ReceiptListEntity
receiptListEntity
=
new
ReceiptListEntity
();
...
...
@@ -57,7 +54,7 @@ public class ReceiptApi {
receiptListEntity
.
setQrCode
(
resultDate
.
get
(
"ACCEPT_NO"
).
toString
());
receiptListEntity
.
setState
((
long
)
0
);
//生成特证交接单
Boolean
S
=
receiptService
.
createReceiptList
(
receiptListEntity
);
long
S
=
receiptService
.
createReceiptList
(
receiptListEntity
);
//查询特证详单所需数据
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData2
(
id
);
...
...
@@ -70,13 +67,23 @@ public class ReceiptApi {
Long
receiptId
=
receiptListEntity
.
getId
();
//生成特证详单
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
,
sex
,
signGovt
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"show"
,
true
);
map
.
put
(
"msg"
,
"生成交接单"
);
map
.
put
(
"id"
,
S
);
return
map
;
}
else
{
//已经生成特证交接单,不做操作。
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"show"
,
false
);
map
.
put
(
"msg"
,
"已生成交接单"
);
map
.
put
(
"id"
,
mapList
.
get
(
0
).
get
(
"ID"
));
return
map
;
}
}
else
{
//根据身份证号查组号
String
groupNo
=
receiptService
.
selectGroupNoById
(
id
);
//查询
交接
单所需数据
//查询
详
单所需数据
List
<
Map
<
String
,
Object
>>
receiptListDate
=
receiptService
.
selectReceiptListDate2
(
groupNo
);
for
(
int
i
=
0
;
i
<
receiptListDate
.
size
();
i
++)
{
...
...
@@ -94,13 +101,12 @@ public class ReceiptApi {
// 状态0未复核
receiptListEntity
.
setState
((
long
)
0
);
//查询这个组号是否生成了交接单
int
countGroup
=
receiptService
.
selectByGroupNo
(
receiptListDate
.
get
(
i
).
get
(
"GROUP_NO"
).
toString
());
List
<
Map
<
String
,
Object
>>
mapList
=
receiptService
.
selectByGroupNo
(
receiptListDate
.
get
(
i
).
get
(
"GROUP_NO"
).
toString
());
//没有生成交接单
if
(
countGroup
==
0
)
{
if
(
mapList
.
size
()
==
0
)
{
//生成交接单
receiptService
.
createReceiptList
(
receiptListEntity
);
long
receiptList
=
receiptService
.
createReceiptList
(
receiptListEntity
);
for
(
int
n
=
0
;
n
<
receiptListDate
.
size
();
n
++)
{
// receiptService.
//查询这个身份证是否生成了详单
int
receiptCount
=
receiptService
.
selectReceiptById
(
receiptListDate
.
get
(
n
).
get
(
"ID_NO"
).
toString
());
//没有生成交接单详单
...
...
@@ -119,12 +125,25 @@ public class ReceiptApi {
//不做操作
}
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"show"
,
true
);
map
.
put
(
"id"
,
receiptList
);
return
map
;
}
else
{
//已生成交接单
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"show"
,
false
);
map
.
put
(
"msg"
,
"已生成交接单"
);
map
.
put
(
"id"
,
mapList
.
get
(
0
).
get
(
"ID"
));
return
map
;
}
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"show"
,
false
);
map
.
put
(
"msg"
,
"未查询出对应的信息"
);
return
map
;
}
return
true
;
}
...
...
src/main/java/com/yxproject/start/mapper/ReceiptMapper.java
View file @
b6981d1b
...
...
@@ -42,8 +42,8 @@ public interface ReceiptMapper {
public
List
<
Map
<
String
,
Object
>>
selectReceiptListDate2
(
String
id
);
//查询这个组号是否已经生成交接单
@Select
(
"select
count(*)
from receipt_list where QR_CODE=#{groupNo}"
)
public
int
selectByGroupNo
(
String
groupNo
);
@Select
(
"select
id
from receipt_list where QR_CODE=#{groupNo}"
)
public
List
<
Map
<
String
,
Object
>>
selectByGroupNo
(
String
groupNo
);
//生成交接单
@Insert
(
"<script>"
+
...
...
@@ -57,7 +57,7 @@ public interface ReceiptMapper {
"</if> "
+
") </script>"
)
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"id"
,
keyColumn
=
"ID"
)
public
boolean
createReceiptList
(
ReceiptListEntity
receiptListEntity
);
public
long
createReceiptList
(
ReceiptListEntity
receiptListEntity
);
//根据身份证号查询交接单详单信息
@Select
(
"select prod_card_t.upload_no,"
+
...
...
@@ -142,8 +142,8 @@ public interface ReceiptMapper {
public
boolean
updateReceiptDateByReceiptId
(
@Param
(
"receiptId"
)
String
receiptId
);
//根据输入id查询交接单是否生成
@Select
(
"select
count(*) from RECEIPT_LIST where QR_CODE=(select accept_no from prod_card_t@prod_link where id_no=#{id})
"
)
public
int
selectCountById
(
@Param
(
"id"
)
String
id
);
@Select
(
"select
id from RECEIPT_LIST where QR_CODE=(select accept_no from prod_card_t@prod_link where id_no=#{id})
"
)
public
List
<
Map
<
String
,
Object
>>
selectCountById
(
@Param
(
"id"
)
String
id
);
//根据输入id查询是否生成详单
@Select
(
"select count(*) from DETAIL_RECEIPT_LIST where ACCEPT_NO=(select accept_no from prod_card_t@prod_link where id_no=#{id})"
)
...
...
src/main/java/com/yxproject/start/service/ReceiptService.java
View file @
b6981d1b
...
...
@@ -12,7 +12,7 @@ public interface ReceiptService {
public
Map
<
String
,
Object
>
selectReceiptListDate
(
String
id
);
public
boolean
createReceiptList
(
ReceiptListEntity
receiptListEntity
);
public
long
createReceiptList
(
ReceiptListEntity
receiptListEntity
);
public
Map
<
String
,
Object
>
selectDetailedData
(
String
id
);
...
...
@@ -20,7 +20,7 @@ public interface ReceiptService {
public
int
selectSpecialCard
(
String
GROUP_NO
);
public
int
selectByGroupNo
(
String
groupNo
);
public
List
<
Map
<
String
,
Object
>>
selectByGroupNo
(
String
groupNo
);
public
int
selectSpecialCardByAcceptNo
(
String
id
);
...
...
@@ -42,7 +42,7 @@ public interface ReceiptService {
//特证查询是否生成交接单
public
int
selectCountById
(
@Param
(
"id"
)
String
id
);
public
List
<
Map
<
String
,
Object
>>
selectCountById
(
@Param
(
"id"
)
String
id
);
//查询是否已生成交接单详单
public
int
selectReceiptById
(
@Param
(
"id"
)
String
id
);
...
...
src/main/java/com/yxproject/start/service/impl/ReceiptServiceImpl.java
View file @
b6981d1b
...
...
@@ -21,9 +21,9 @@ public class ReceiptServiceImpl implements ReceiptService {
}
@Override
public
boolean
createReceiptList
(
ReceiptListEntity
receiptListEntity
)
{
receiptMapper
.
createReceiptList
(
receiptListEntity
);
return
true
;
public
long
createReceiptList
(
ReceiptListEntity
receiptListEntity
)
{
return
receiptMapper
.
createReceiptList
(
receiptListEntity
)
;
}
@Override
...
...
@@ -47,8 +47,8 @@ public class ReceiptServiceImpl implements ReceiptService {
@Override
public
int
selectByGroupNo
(
String
groupNo
)
{
int
countGroup
=
receiptMapper
.
selectByGroupNo
(
groupNo
);
public
List
<
Map
<
String
,
Object
>>
selectByGroupNo
(
String
groupNo
)
{
List
<
Map
<
String
,
Object
>>
countGroup
=
receiptMapper
.
selectByGroupNo
(
groupNo
);
return
countGroup
;
}
...
...
@@ -100,9 +100,9 @@ public class ReceiptServiceImpl implements ReceiptService {
}
@Override
public
int
selectCountById
(
String
id
)
{
int
countAccept
=
receiptMapper
.
selectCountById
(
id
);
return
countAccep
t
;
public
List
<
Map
<
String
,
Object
>>
selectCountById
(
String
id
)
{
List
<
Map
<
String
,
Object
>>
mapList
=
receiptMapper
.
selectCountById
(
id
);
return
mapLis
t
;
}
@Override
...
...
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