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
7c87b287
Commit
7c87b287
authored
Mar 13, 2019
by
dahai
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
d637c9f4
da894326
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
72 additions
and
56 deletions
+72
-56
FailedCardApi.java
src/main/java/com/yxproject/start/api/FailedCardApi.java
+32
-30
LogApi.java
src/main/java/com/yxproject/start/api/LogApi.java
+7
-4
LogMapper.java
src/main/java/com/yxproject/start/mapper/LogMapper.java
+7
-4
LogService.java
src/main/java/com/yxproject/start/service/LogService.java
+4
-2
LogServiceImpl.java
...java/com/yxproject/start/service/impl/LogServiceImpl.java
+10
-4
service.js
src/main/resources/static/js/service.js
+6
-6
xmlAndSearch.html
...ain/resources/static/views/xmlAndSearch/xmlAndSearch.html
+2
-2
xmlAndSearch.js
src/main/resources/static/views/xmlAndSearch/xmlAndSearch.js
+4
-4
No files found.
src/main/java/com/yxproject/start/api/FailedCardApi.java
View file @
7c87b287
...
@@ -81,8 +81,6 @@ public class FailedCardApi {
...
@@ -81,8 +81,6 @@ public class FailedCardApi {
return
resultList
;
return
resultList
;
}
}
/**
/**
* 生成余证(每个余证生成一个任务单)
* 生成余证(每个余证生成一个任务单)
* @param jsonStr
* @param jsonStr
...
@@ -140,36 +138,40 @@ public class FailedCardApi {
...
@@ -140,36 +138,40 @@ public class FailedCardApi {
@RequestMapping
(
"insertBackCard"
)
@RequestMapping
(
"insertBackCard"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
insertBackCard
(
@RequestBody
String
jsonStr
){
public
boolean
insertBackCard
(
@RequestBody
String
jsonStr
){
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
try
{
TaskEntity
taskEntity
=
new
TaskEntity
();
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
String
str2
=
null
;
TaskEntity
taskEntity
=
new
TaskEntity
();
for
(
int
i
=
0
;
i
<
jsonarray
.
size
();
i
++)
{
String
str2
=
null
;
JSONObject
jsonObject
=
(
JSONObject
)
jsonarray
.
get
(
i
);
for
(
int
i
=
0
;
i
<
jsonarray
.
size
();
i
++)
{
String
str
=
jsonObject
.
getString
(
"idCard"
);
JSONObject
jsonObject
=
(
JSONObject
)
jsonarray
.
get
(
i
);
if
(
i
!=
jsonarray
.
size
()
-
1
)
{
String
str
=
jsonObject
.
getString
(
"idCard"
);
str2
+=
"'"
+
str
+
"',"
;
if
(
i
!=
jsonarray
.
size
()
-
1
)
{
}
else
{
str2
+=
"'"
+
str
+
"',"
;
str2
+=
"'"
+
str
+
"'"
;
}
else
{
str2
+=
"'"
+
str
+
"'"
;
}
}
}
}
//查询制证库,拿到组号列表
//查询制证库,拿到组号列表
List
<
String
>
groupList
=
failedCardService
.
selectGroupNo
(
str2
);
List
<
String
>
groupList
=
failedCardService
.
selectGroupNo
(
str2
);
//生成任务单
for
(
int
i
=
0
;
i
<
groupList
.
size
();
i
++)
{
JSONObject
jsonObject
=
(
JSONObject
)
jsonarray
.
get
(
i
);
//查询生成任务单需要的数据
Map
<
String
,
Object
>
dataMap
=
failedCardService
.
selectTaskListById
(
jsonObject
.
getString
(
"idCard"
));
//TODO 会报空指针异常
String
countyCode
=
dataMap
.
get
(
"COUNTY_CODE"
).
toString
();
Long
cardType
=
(
Long
)
dataMap
.
get
(
"CARD_TYPE_ID"
);
taskEntity
.
setCountyCode
(
countyCode
);
taskEntity
.
setCardType
(
cardType
);
taskEntity
.
setTaskStateId
((
long
)
1
);
//生成任务单
//生成任务单
taskListService
.
saveTask
(
taskEntity
);
for
(
int
i
=
0
;
i
<
groupList
.
size
();
i
++)
{
//生成新组号列表
JSONObject
jsonObject
=
(
JSONObject
)
jsonarray
.
get
(
i
);
Map
<
String
,
Object
>
groupDataMap
=
failedCardService
.
selectGroupDate
(
groupList
.
get
(
i
));
//查询生成任务单需要的数据
failedCardService
.
insertGroupNo
(
String
.
valueOf
(
groupDataMap
.
get
(
"GROUP_NO"
)),
String
.
valueOf
(
groupDataMap
.
get
(
"TASK_ID"
)),(
Long
)
groupDataMap
.
get
(
"VALID_COUNT"
),(
Long
)
groupDataMap
.
get
(
"INVALID_COUNT"
));
Map
<
String
,
Object
>
dataMap
=
failedCardService
.
selectTaskListById
(
jsonObject
.
getString
(
"idCard"
));
//TODO 会报空指针异常
String
countyCode
=
dataMap
.
get
(
"COUNTY_CODE"
).
toString
();
Long
cardType
=
(
Long
)
dataMap
.
get
(
"CARD_TYPE_ID"
);
taskEntity
.
setCountyCode
(
countyCode
);
taskEntity
.
setCardType
(
cardType
);
taskEntity
.
setTaskStateId
((
long
)
1
);
//生成任务单
taskListService
.
saveTask
(
taskEntity
);
//生成新组号列表
Map
<
String
,
Object
>
groupDataMap
=
failedCardService
.
selectGroupDate
(
groupList
.
get
(
i
));
failedCardService
.
insertGroupNo
(
String
.
valueOf
(
groupDataMap
.
get
(
"GROUP_NO"
)),
String
.
valueOf
(
groupDataMap
.
get
(
"TASK_ID"
)),
(
Long
)
groupDataMap
.
get
(
"VALID_COUNT"
),
(
Long
)
groupDataMap
.
get
(
"INVALID_COUNT"
));
}
}
catch
(
NullPointerException
e
)
{
return
false
;
}
}
return
true
;
return
true
;
}
}
...
...
src/main/java/com/yxproject/start/api/LogApi.java
View file @
7c87b287
...
@@ -114,14 +114,17 @@ public class LogApi {
...
@@ -114,14 +114,17 @@ public class LogApi {
/**
/**
* 删除制证包及其数据
* 删除制证包及其数据
* @param
fileId
* @param
uploadTime
* @return true
* @return true
*/
*/
@RequestMapping
(
"deleteFiles"
)
@RequestMapping
(
"deleteFiles"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
deleteFiles
(
@RequestParam
(
"fileId"
)
String
fileId
){
public
boolean
deleteFiles
(
@RequestParam
(
"uploadTime"
)
String
uploadTime
){
logService
.
deleteFilesData
(
fileId
);
List
<
String
>
idList
=
logService
.
selectId
(
uploadTime
);
logService
.
deleteFile
(
fileId
);
for
(
int
i
=
0
;
i
<
idList
.
size
();
i
++){
logService
.
deleteFilesData
(
idList
.
get
(
i
));
logService
.
deleteFile
(
idList
.
get
(
i
));
}
return
true
;
return
true
;
}
}
...
...
src/main/java/com/yxproject/start/mapper/LogMapper.java
View file @
7c87b287
...
@@ -136,11 +136,14 @@ public interface LogMapper {
...
@@ -136,11 +136,14 @@ public interface LogMapper {
@
Delete
(
"delete from PREPRO_PERSON where file_id = #{fileId
}"
)
@
Select
(
"select id from files where TO_CHAR(UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss') = #{uploadTime
}"
)
public
boolean
deleteFilesData
(
@Param
(
"fileId"
)
String
fileId
);
public
List
<
String
>
selectId
(
@Param
(
"uploadTime"
)
String
uploadTime
);
@Delete
(
"delete from files where id=#{fileId}"
)
@Delete
(
"delete from PREPRO_PERSON where PREPRO_PERSON.sid = #{id}"
)
public
boolean
deleteFile
(
@Param
(
"fileId"
)
String
fileId
);
public
boolean
deleteFilesData
(
@Param
(
"uploadTime"
)
String
id
);
@Delete
(
"delete from files where id=#{id}"
)
public
boolean
deleteFile
(
@Param
(
"uploadTime"
)
String
id
);
...
...
src/main/java/com/yxproject/start/service/LogService.java
View file @
7c87b287
...
@@ -25,7 +25,9 @@ public interface LogService {
...
@@ -25,7 +25,9 @@ public interface LogService {
public
boolean
insertAnalysisDate
(
String
printDate
,
String
latticeMouthInformation
);
public
boolean
insertAnalysisDate
(
String
printDate
,
String
latticeMouthInformation
);
public
boolean
deleteFilesData
(
@Param
(
"
fileId"
)
String
fileI
d
);
public
boolean
deleteFilesData
(
@Param
(
"
id"
)
String
i
d
);
public
boolean
deleteFile
(
@Param
(
"fileId"
)
String
fileId
);
public
boolean
deleteFile
(
@Param
(
"id"
)
String
id
);
public
List
<
String
>
selectId
(
@Param
(
"uploadTime"
)
String
uploadTime
);
}
}
src/main/java/com/yxproject/start/service/impl/LogServiceImpl.java
View file @
7c87b287
...
@@ -63,14 +63,20 @@ public class LogServiceImpl implements LogService {
...
@@ -63,14 +63,20 @@ public class LogServiceImpl implements LogService {
}
}
@Override
@Override
public
boolean
deleteFilesData
(
String
fileI
d
)
{
public
boolean
deleteFilesData
(
String
i
d
)
{
logMapper
.
deleteFilesData
(
fileI
d
);
logMapper
.
deleteFilesData
(
i
d
);
return
true
;
return
true
;
}
}
@Override
@Override
public
boolean
deleteFile
(
String
fileI
d
)
{
public
boolean
deleteFile
(
String
i
d
)
{
logMapper
.
deleteFile
(
fileI
d
);
logMapper
.
deleteFile
(
i
d
);
return
true
;
return
true
;
}
}
@Override
public
List
<
String
>
selectId
(
String
uploadTime
)
{
List
<
String
>
id
=
logMapper
.
selectId
(
uploadTime
);
return
id
;
}
}
}
src/main/resources/static/js/service.js
View file @
7c87b287
...
@@ -662,13 +662,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
...
@@ -662,13 +662,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success
(
response
.
data
)
success
(
response
.
data
)
})
})
},
},
analyseData
:
function
(
id
,
success
){
analyseData
:
function
(
date
,
success
){
console
.
log
(
id
)
console
.
log
(
date
)
$http
({
$http
({
method
:
'GET'
,
method
:
'GET'
,
url
:
"../LogApi/selectAnalysisData"
+
urlTimeStamp
(),
url
:
"../LogApi/selectAnalysisData"
+
urlTimeStamp
(),
params
:{
params
:{
filesId
:
id
uploadDate
:
date
}
}
}).
then
(
function
successCallback
(
response
)
{
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
success
(
response
.
data
)
...
@@ -796,13 +796,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
...
@@ -796,13 +796,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success
(
response
.
data
)
success
(
response
.
data
)
})
})
},
},
deleteProdDataByFileId
:
function
(
id
,
success
){
deleteProdDataByFileId
:
function
(
uploadDate
,
success
){
console
.
log
(
id
)
console
.
log
(
uploadDate
)
$http
({
$http
({
method
:
'GET'
,
method
:
'GET'
,
url
:
"../LogApi/deleteFiles"
+
urlTimeStamp
(),
url
:
"../LogApi/deleteFiles"
+
urlTimeStamp
(),
params
:{
params
:{
fileId
:
id
uploadTime
:
uploadDate
}
}
}).
then
(
function
successCallback
(
response
)
{
}).
then
(
function
successCallback
(
response
)
{
success
(
response
.
data
)
success
(
response
.
data
)
...
...
src/main/resources/static/views/xmlAndSearch/xmlAndSearch.html
View file @
7c87b287
...
@@ -88,8 +88,8 @@
...
@@ -88,8 +88,8 @@
<td>
{{item.commonCount}}
</td>
<td>
{{item.commonCount}}
</td>
<td>
{{item.postCount}}
</td>
<td>
{{item.postCount}}
</td>
<td>
<td>
<button
class=
"btn btn-primary"
ng-click=
"analysis(item.
uploadDate,item.packageCount,item.fileId
)"
>
解析
</button>
<button
class=
"btn btn-primary"
ng-click=
"analysis(item.
date,item.packageCount
)"
>
解析
</button>
<button
class=
"btn btn-danger"
ng-click=
"deleteDataById(item.
uploadDate,item.packageCount,item.fileId
)"
>
删除
</button>
<button
class=
"btn btn-danger"
ng-click=
"deleteDataById(item.
date,item.packageCount
)"
>
删除
</button>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
...
...
src/main/resources/static/views/xmlAndSearch/xmlAndSearch.js
View file @
7c87b287
...
@@ -32,7 +32,7 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
...
@@ -32,7 +32,7 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
$scope
.
analysis
=
function
(
uploadDate
,
packageCount
,
id
)
{
$scope
.
analysis
=
function
(
uploadDate
,
packageCount
)
{
ngDialog
.
open
({
ngDialog
.
open
({
template
:
'dialogs/analysisDialog.html'
+
urlTimeStamp
(),
template
:
'dialogs/analysisDialog.html'
+
urlTimeStamp
(),
width
:
876
,
width
:
876
,
...
@@ -40,7 +40,7 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
...
@@ -40,7 +40,7 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
controller
:
[
'$scope'
,
'HttpService'
,
function
(
$scope
,
HttpService
)
{
controller
:
[
'$scope'
,
'HttpService'
,
function
(
$scope
,
HttpService
)
{
$scope
.
upDate
=
uploadDate
;
$scope
.
upDate
=
uploadDate
;
$scope
.
upCount
=
packageCount
;
$scope
.
upCount
=
packageCount
;
HttpService
.
analyseData
(
id
,
function
(
data
)
{
HttpService
.
analyseData
(
uploadDate
,
function
(
data
)
{
$scope
.
resultData
=
data
;
$scope
.
resultData
=
data
;
console
.
log
(
$scope
.
resultData
)
console
.
log
(
$scope
.
resultData
)
})
})
...
@@ -87,7 +87,7 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
...
@@ -87,7 +87,7 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
var
reGet
=
$scope
.
getXmlPackage
;
var
reGet
=
$scope
.
getXmlPackage
;
$scope
.
deleteDataById
=
function
(
uploadDate
,
packageCount
,
id
){
$scope
.
deleteDataById
=
function
(
uploadDate
,
packageCount
){
ngDialog
.
open
({
ngDialog
.
open
({
template
:
'dialogs/confirm.html'
+
urlTimeStamp
(),
template
:
'dialogs/confirm.html'
+
urlTimeStamp
(),
width
:
600
,
width
:
600
,
...
@@ -97,7 +97,7 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
...
@@ -97,7 +97,7 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
$scope
.
total
=
packageCount
;
$scope
.
total
=
packageCount
;
$scope
.
importDate
=
uploadDate
;
$scope
.
importDate
=
uploadDate
;
$scope
.
confirmDelete
=
function
()
{
$scope
.
confirmDelete
=
function
()
{
HttpService
.
deleteProdDataByFileId
(
id
,
function
(
data
)
{
HttpService
.
deleteProdDataByFileId
(
uploadDate
,
function
(
data
)
{
MessageService
.
showAlert
(
data
.
msg
);
MessageService
.
showAlert
(
data
.
msg
);
$scope
.
closeThisDialog
();
$scope
.
closeThisDialog
();
reGet
();
reGet
();
...
...
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