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
220e4483
Commit
220e4483
authored
Mar 12, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
交接单修改3.0
parent
90c70513
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
171 additions
and
46 deletions
+171
-46
ReceiptApi.java
src/main/java/com/yxproject/start/api/ReceiptApi.java
+74
-41
ReceiptMapper.java
src/main/java/com/yxproject/start/mapper/ReceiptMapper.java
+41
-3
ReceiptService.java
...main/java/com/yxproject/start/service/ReceiptService.java
+21
-1
ReceiptServiceImpl.java
.../com/yxproject/start/service/impl/ReceiptServiceImpl.java
+35
-1
No files found.
src/main/java/com/yxproject/start/api/ReceiptApi.java
View file @
220e4483
...
@@ -31,79 +31,107 @@ public class ReceiptApi {
...
@@ -31,79 +31,107 @@ public class ReceiptApi {
*/
*/
@RequestMapping
(
"createReceiptList"
)
@RequestMapping
(
"createReceiptList"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Map
<
String
,
Object
>>
createReceiptList
(
@RequestParam
(
"id"
)
String
id
)
{
public
boolean
createReceiptList
(
@RequestParam
(
"id"
)
String
id
)
{
//判断是否是特证
//判断是否是特证
if
(
receiptService
.
selectSpecialCardByAcceptNo
(
id
)==
1
){
if
(
receiptService
.
selectSpecialCardByAcceptNo
(
id
)
==
1
)
{
//查询这个受理号是否生成了交接单
int
countAccept
=
receiptService
.
selectCountById
(
id
);
//判断是否生成了交接单
if
(
countAccept
==
0
)
{
//查询特证交接单所需数据
//查询特证交接单所需数据
Map
<
String
,
Object
>
resultDate
=
receiptService
.
selectReceiptListDate
(
id
);
Map
<
String
,
Object
>
resultDate
=
receiptService
.
selectReceiptListDate
(
id
);
String
acceptNo
=
(
String
)
resultDate
.
get
(
"ACCEPT_NO"
);
String
acceptNo
=
(
String
)
resultDate
.
get
(
"ACCEPT_NO"
);
String
GAJG_DM
=
(
String
)
resultDate
.
get
(
"GAJG_DM"
);
String
GAJG_DM
=
(
String
)
resultDate
.
get
(
"GAJG_DM"
);
int
state
=
0
;
int
state
=
0
;
int
count
=
(
int
)
resultDate
.
get
(
"COUNT"
);
int
count
=
(
int
)
resultDate
.
get
(
"COUNT"
);
//生成特证交接单
//生成特证交接单
receiptService
.
createReceiptList
(
acceptNo
,
GAJG_DM
,
count
,
state
);
receiptService
.
createReceiptList
(
acceptNo
,
GAJG_DM
,
count
,
state
);
System
.
out
.
println
(
"6666666666666666666666666666666生成成功"
);
//查询特证详单所需数据
//查询特证详单所需数据
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
cardId
=
(
String
)
detailedData
.
get
(
"CARD_ID"
);
String
cardId
=
(
String
)
detailedData
.
get
(
"CARD_ID"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)+
""
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)
+
""
);
//生成特证详单
//生成特证详单
System
.
out
.
println
(
"22222222222222222222Name:"
+
name
);
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
);
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
);
}
else
{
}
else
{
//已经生成特证交接单,不做操作。
}
}
else
{
//查询交接单所需数据
//查询交接单所需数据
Map
<
String
,
Object
>
receiptListDate
=
receiptService
.
selectReceiptListDate
(
id
);
Map
<
String
,
Object
>
receiptListDate
=
receiptService
.
selectReceiptListDate
(
id
);
String
groupNo
=
(
String
)
receiptListDate
.
get
(
"GROUP_NO"
);
String
groupNo
=
(
String
)
receiptListDate
.
get
(
"GROUP_NO"
);
String
GAJG_DM
=
(
String
)
receiptListDate
.
get
(
"GAJG_DM"
);
String
GAJG_DM
=
(
String
)
receiptListDate
.
get
(
"GAJG_DM"
);
int
count
=
Integer
.
valueOf
(
receiptListDate
.
get
(
"VALID_COUNT"
).
toString
())
;
int
count
=
Integer
.
valueOf
(
receiptListDate
.
get
(
"VALID_COUNT"
).
toString
());
int
state
=
0
;
int
state
=
0
;
//查询这个组号是否生成了交接单
//查询这个组号是否生成了交接单
int
countGroup
=
receiptService
.
selectByGroupNo
(
groupNo
);
int
countGroup
=
receiptService
.
selectByGroupNo
(
groupNo
);
//没有生成交接单
if
(
countGroup
==
0
)
{
if
(
countGroup
==
0
)
{
receiptService
.
createReceiptList
(
groupNo
,
GAJG_DM
,
count
,
state
);
//生成交接单
System
.
out
.
println
(
"6666666666666666666666666666666生成成功"
);
receiptService
.
createReceiptList
(
groupNo
,
GAJG_DM
,
count
,
state
);
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
//查询这个身份证是否生成了详单
System
.
out
.
println
(
"555555555555555555555555detailedData"
+
detailedData
);
int
receiptCount
=
receiptService
.
selectReceiptById
(
id
);
//没有生成交接单详单
if
(
receiptCount
==
0
)
{
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
cardId
=
(
String
)
detailedData
.
get
(
"CARD_ID"
);
String
cardId
=
(
String
)
detailedData
.
get
(
"CARD_ID"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)+
""
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)
+
""
);
//生成特证详单
//生成特证详单
System
.
out
.
println
(
"22222222222222222222Name:"
+
name
);
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
);
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
);
}
else
{
//不做操作
}
}
else
{
}
else
{
//已生成交接单
//查询这个身份证是否生成了详单
int
receiptCount
=
receiptService
.
selectReceiptById
(
id
);
//未生成交接单详单
if
(
receiptCount
==
0
)
{
//查询交接单详单数据
//查询交接单详单数据
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
Map
<
String
,
Object
>
detailedData
=
receiptService
.
selectDetailedData
(
id
);
System
.
out
.
println
(
String
.
valueOf
(
"0000000000000000"
+
detailedData
));
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
uploadNo
=
(
String
)
detailedData
.
get
(
"UPLOAD_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
acceptNo2
=
(
String
)
detailedData
.
get
(
"ACCEPT_NO"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
name
=
(
String
)
detailedData
.
get
(
"NAME"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
String
gajg_dm
=
(
String
)
detailedData
.
get
(
"GAJG_DM"
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)+
""
);
int
receiptId
=
Integer
.
parseInt
((
BigDecimal
)
detailedData
.
get
(
"ID"
)
+
""
);
//生成特证详单
//生成特证详单
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
);
receiptService
.
createDetailedList
(
uploadNo
,
acceptNo2
,
name
,
id
,
gajg_dm
,
receiptId
);
System
.
out
.
println
(
receiptId
);
}
else
{
//已生成详单,不做操作。
}
}
//查询有几个
int
specialCardCount
=
receiptService
.
selectSpecialCard
(
groupNo
);
int
finishCount
=
receiptService
.
selectCount
(
groupNo
)
-
specialCardCount
;
System
.
out
.
println
(
"77777777777777777777777777777777"
+
finishCount
);
receiptService
.
updateFinishCount
(
groupNo
,
finishCount
);
System
.
out
.
println
(
"..............................................111111"
);
}
}
System
.
out
.
println
(
"9999999999999999999999999999999999999"
);
//查询有几个特证
List
<
Map
<
String
,
Object
>>
resultList
=
receiptService
.
selectReceiptListOfSpecialCard
();
int
specialCardCount
=
receiptService
.
selectSpecialCard
(
groupNo
);
System
.
out
.
println
(
"33333333333333333333resultList"
+
resultList
);
//减去特证个数
return
resultList
;
int
finishCount
=
receiptService
.
selectCount
(
groupNo
)
-
specialCardCount
;
receiptService
.
updateFinishCount
(
groupNo
,
finishCount
);
}
return
true
;
}
/**
* 查询交接单数据
* @return
*/
@RequestMapping
(
"selectRecriptData"
)
public
List
<
Map
<
String
,
Object
>>
selectRecriptData
(){
//返回交接单数据
List
<
Map
<
String
,
Object
>>
resultMap
=
receiptService
.
selectReceiptListOfSpecialCard
();
for
(
int
i
=
0
;
i
<
resultMap
.
size
();
i
++){
String
groupNo
=
(
String
)
resultMap
.
get
(
i
).
get
(
"QR_CODE"
);
Map
<
String
,
Object
>
map
=
receiptService
.
selectCountTime
(
groupNo
);
resultMap
.
get
(
i
).
put
(
"download"
,
map
.
get
(
"download"
));
resultMap
.
get
(
i
).
put
(
"checkerCount"
,
map
.
get
(
"checkerCount"
));
resultMap
.
get
(
i
).
put
(
"electricCount"
,
map
.
get
(
"electricCount"
));
}
return
resultMap
;
}
}
// /**
// /**
...
@@ -128,27 +156,32 @@ public class ReceiptApi {
...
@@ -128,27 +156,32 @@ public class ReceiptApi {
@RequestMapping
(
"selectDetailList"
)
@RequestMapping
(
"selectDetailList"
)
public
List
<
Map
<
String
,
Object
>>
selectDetailList
(
@RequestParam
(
"receiptId"
)
String
receiptId
){
public
List
<
Map
<
String
,
Object
>>
selectDetailList
(
@RequestParam
(
"receiptId"
)
String
receiptId
){
List
<
Map
<
String
,
Object
>>
resultList
=
receiptService
.
selectDetailList
(
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"
));
}
return
resultList
;
return
resultList
;
}
}
/**
/**
* 数据核验
* 数据核验
--更改交接单状态
* @param receiptId
* @param receiptId
* @param checkName
* @param checkName
* @return
* @return
*/
*/
@RequestMapping
(
"updateReceiptList"
)
@RequestMapping
(
"updateReceiptList"
)
public
boolean
updateReceiptList
(
@RequestParam
(
"receiptId"
)
int
receiptId
,
@RequestParam
(
"checkName"
)
String
checkName
){
public
boolean
updateReceiptList
(
@RequestParam
(
"receiptId"
)
String
receiptId
,
@RequestParam
(
"checkName"
)
String
checkName
){
SimpleDateFormat
dt
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
//设置日期格式
SimpleDateFormat
dt
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
//设置日期格式
try
{
try
{
Date
date
=
dt
.
parse
(
dt
.
format
(
new
Date
()));
Date
date
=
dt
.
parse
(
dt
.
format
(
new
Date
()));
receiptService
.
updateReceiptList
(
receiptId
,
checkName
,
date
);
receiptService
.
updateReceiptList
(
receiptId
,
checkName
,
date
);
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
true
;
return
true
;
}
}
}
}
src/main/java/com/yxproject/start/mapper/ReceiptMapper.java
View file @
220e4483
...
@@ -65,11 +65,10 @@ public interface ReceiptMapper {
...
@@ -65,11 +65,10 @@ public interface ReceiptMapper {
//
根据身份证号查询特证
交接单
//
查询未复核
交接单
@Select
(
"SELECT RECEIPT_LIST.* FROM RECEIPT_LIST where state=0\n"
)
@Select
(
"SELECT RECEIPT_LIST.* FROM RECEIPT_LIST where state=0\n"
)
public
List
<
Map
<
String
,
Object
>>
selectReceiptListOfSpecialCard
();
public
List
<
Map
<
String
,
Object
>>
selectReceiptListOfSpecialCard
();
//根据身份证号查询普通证交接单
//根据身份证号查询普通证交接单
@Select
(
"SELECT RECEIPT_LIST.* FROM RECEIPT_LIST \n"
+
@Select
(
"SELECT RECEIPT_LIST.* FROM RECEIPT_LIST \n"
+
"LEFT JOIN PROD_CARD_T@PROD_LINK ON subStr(PROD_CARD_T.ACCEPT_NO,0,8) =RECEIPT_LIST.QR_CODE\n"
+
"LEFT JOIN PROD_CARD_T@PROD_LINK ON subStr(PROD_CARD_T.ACCEPT_NO,0,8) =RECEIPT_LIST.QR_CODE\n"
+
...
@@ -87,9 +86,48 @@ public interface ReceiptMapper {
...
@@ -87,9 +86,48 @@ public interface ReceiptMapper {
"check_date = #{date},\n"
+
"check_date = #{date},\n"
+
"check_name=#{checkName} \n"
+
"check_name=#{checkName} \n"
+
"where id=#{receiptId}"
)
"where id=#{receiptId}"
)
public
boolean
updateReceiptList
(
int
receiptId
,
String
checkName
,
Date
date
);
public
boolean
updateReceiptList
(
String
receiptId
,
String
checkName
,
Date
date
);
//根据输入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
);
//根据输入id查询是否生成详单
@Select
(
"select count(*) from DETAIL_RECEIPT_LIST where ACCEPT_NO=(select accept_no from prod_card_t@prod_link where id_no=#{id})"
)
public
int
selectReceiptById
(
@Param
(
"id"
)
String
id
);
//复核一致,按交接单编号查询证件数量
@Select
(
"select FINISH_COUNT from RECEIPT_LIST WHERE ID=#{receiptId}"
)
public
int
selectCountByReceiptId
(
@Param
(
"receiptId"
)
String
receiptId
);
//符合一致,按交接单编号查询详单库数量
public
int
selectDetailCountByReceiptId
(
@Param
(
"receiptId"
)
String
receiptId
);
@Select
(
"SELECT RECEIPT_LIST.*FROM RECEIPT_LIST where state=0;\n"
+
"select \n"
+
"count(prod_trace_t.download_no)as download,\n"
+
"count(prod_trace_t.checker_no) as checkerCount,\n"
+
"count(prod_trace_t.ELECTRIC_WRITER_NO)as electricCount\n"
+
"from prod_trace_t@PROD_LINK \n"
+
"WHERE subStr(ACCEPT_NO,0,8) = #{groupNo} or ACCEPT_NO=#{groupNo}"
)
public
Map
<
String
,
Object
>
selectCountTime
(
String
groupNo
);
@Select
(
"SELECT RECEIPT_LIST.*FROM RECEIPT_LIST where state=0;\n"
+
"select \n"
+
"prod_trace_t.DOWNLOAD_DATE as downloadDate,\n"
+
"prod_trace_t.CHECK_DATE as checkDate,\n"
+
"prod_trace_t.ELECTRIC_WRITE_DATE as electricDate\n"
+
"from prod_trace_t@PROD_LINK \n"
+
"WHERE subStr(ACCEPT_NO,0,8) = #{groupNo} or ACCEPT_NO=#{groupNo}"
)
public
Map
<
String
,
Object
>
selectTimes
(
String
groupNo
);
}
}
src/main/java/com/yxproject/start/service/ReceiptService.java
View file @
220e4483
...
@@ -28,9 +28,29 @@ public interface ReceiptService {
...
@@ -28,9 +28,29 @@ public interface ReceiptService {
public
List
<
Map
<
String
,
Object
>>
selectDetailList
(
String
receiptId
);
public
List
<
Map
<
String
,
Object
>>
selectDetailList
(
String
receiptId
);
public
boolean
updateReceiptList
(
int
receiptId
,
String
checkName
,
Date
date
);
public
boolean
updateReceiptList
(
String
receiptId
,
String
checkName
,
Date
date
);
public
int
selectCount
(
String
GROUP_NO
);
public
int
selectCount
(
String
GROUP_NO
);
public
boolean
updateFinishCount
(
String
GROUP_NO
,
int
count
);
public
boolean
updateFinishCount
(
String
GROUP_NO
,
int
count
);
//特证查询是否生成交接单
public
int
selectCountById
(
@Param
(
"id"
)
String
id
);
//查询是否已生成交接单详单
public
int
selectReceiptById
(
@Param
(
"id"
)
String
id
);
//复核一致,按交接单编号查询证件数量
public
int
selectCountByReceiptId
(
@Param
(
"receiptId"
)
String
receiptId
);
//符合一致,按交接单编号查询详单库数量
public
int
selectDetailCountByReceiptId
(
@Param
(
"receiptId"
)
String
receiptId
);
public
Map
<
String
,
Object
>
selectCountTime
(
String
groupNo
);
public
Map
<
String
,
Object
>
selectTimes
(
String
groupNo
);
}
}
src/main/java/com/yxproject/start/service/impl/ReceiptServiceImpl.java
View file @
220e4483
...
@@ -77,7 +77,7 @@ public class ReceiptServiceImpl implements ReceiptService {
...
@@ -77,7 +77,7 @@ public class ReceiptServiceImpl implements ReceiptService {
}
}
@Override
@Override
public
boolean
updateReceiptList
(
int
receiptId
,
String
checkName
,
Date
date
)
{
public
boolean
updateReceiptList
(
String
receiptId
,
String
checkName
,
Date
date
)
{
receiptMapper
.
updateReceiptList
(
receiptId
,
checkName
,
date
);
receiptMapper
.
updateReceiptList
(
receiptId
,
checkName
,
date
);
return
true
;
return
true
;
}
}
...
@@ -94,5 +94,39 @@ public class ReceiptServiceImpl implements ReceiptService {
...
@@ -94,5 +94,39 @@ public class ReceiptServiceImpl implements ReceiptService {
return
true
;
return
true
;
}
}
@Override
public
int
selectCountById
(
String
id
)
{
int
countAccept
=
receiptMapper
.
selectCountById
(
id
);
return
countAccept
;
}
@Override
public
int
selectReceiptById
(
String
id
)
{
int
receiptCount
=
receiptMapper
.
selectReceiptById
(
id
);
return
receiptCount
;
}
@Override
public
int
selectCountByReceiptId
(
String
receiptId
)
{
int
finishCount
=
selectCountByReceiptId
(
receiptId
);
return
finishCount
;
}
@Override
public
int
selectDetailCountByReceiptId
(
String
receiptId
)
{
int
detailCount
=
selectDetailCountByReceiptId
(
receiptId
);
return
detailCount
;
}
@Override
public
Map
<
String
,
Object
>
selectCountTime
(
String
groupNo
)
{
Map
<
String
,
Object
>
maps
=
receiptMapper
.
selectCountTime
(
groupNo
);
return
maps
;
}
@Override
public
Map
<
String
,
Object
>
selectTimes
(
String
groupNo
)
{
Map
<
String
,
Object
>
maps
=
receiptMapper
.
selectTimes
(
groupNo
);
return
maps
;
}
}
}
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