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
7550fcb8
Commit
7550fcb8
authored
Mar 09, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加并修改添加退证API
parent
0c011dae
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
121 additions
and
17 deletions
+121
-17
TaskListApi.java
src/main/java/com/yxproject/start/api/TaskListApi.java
+62
-16
PersonPostEntity.java
...ain/java/com/yxproject/start/entity/PersonPostEntity.java
+2
-0
PreproPersonEntity.java
...n/java/com/yxproject/start/entity/PreproPersonEntity.java
+12
-1
PreproPersonMapper.java
...n/java/com/yxproject/start/mapper/PreproPersonMapper.java
+20
-0
PreproPersonService.java
...java/com/yxproject/start/service/PreproPersonService.java
+3
-0
PreproPersonServiceImpl.java
...yxproject/start/service/impl/PreproPersonServiceImpl.java
+22
-0
No files found.
src/main/java/com/yxproject/start/api/TaskListApi.java
View file @
7550fcb8
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.entity.GroupNoEntity
;
import
com.yxproject.start.entity.PreproPersonEntity
;
import
com.yxproject.start.entity.SpecialCardEntity
;
import
com.yxproject.start.entity.TaskEntity
;
import
com.yxproject.start.entity.TaskList.CountCountyEntity
;
import
com.yxproject.start.entity.TaskList.CountGajgEntity
;
import
com.yxproject.start.entity.TaskList.TaskListEntity
;
import
com.yxproject.start.service.GroupNoService
;
import
com.yxproject.start.service.PreproPersonService
;
import
com.yxproject.start.service.SpecialCardService
;
import
com.yxproject.start.service.TaskListService
;
import
com.yxproject.start.utils.YXJSONResponse
;
...
...
@@ -38,6 +40,8 @@ public class TaskListApi {
private
SpecialCardService
specialCardService
;
@Autowired
private
GroupNoService
groupNoService
;
@Autowired
private
PreproPersonService
preproPersonService
;
/**
* 查询以区为单位的制证数量
...
...
@@ -204,8 +208,9 @@ public class TaskListApi {
* 生成快证任务单
* <p>
* name 提交人姓名
* groupList 组号列表
* countyList 区县列表 {typeCode:1,countyCode:'123456'}
* acceptNo 受理组号
* cardType 制证类型(原有)
* countyCode 区县代码
*
* @return
*/
...
...
@@ -224,40 +229,40 @@ public class TaskListApi {
//查询快证是否存在受理库
List
<
Object
>
objects
=
taskListService
.
selectFastCardAtACCU
(
acceptNo
.
substring
(
0
,
8
));
//存在受理库
if
(
objects
.
size
()
==
1
)
{
taskListService
.
saveFastTask
(
objects
,
name
,
acceptNo
,
Long
.
valueOf
(
cardType
));
}
else
{
if
(
objects
.
size
()
==
1
)
{
taskListService
.
saveFastTask
(
objects
,
name
,
acceptNo
,
Long
.
valueOf
(
cardType
));
}
else
{
//存在任务单(余证任务单 普通证任务单)
//1 存在余证任务单
List
<
SpecialCardEntity
>
specialCardEntities
=
specialCardService
.
selectSpecialCardAtSpecialCard
(
acceptNo
);
if
(
specialCardEntities
.
size
()
>
0
)
{
for
(
SpecialCardEntity
specialCardEntity
:
specialCardEntities
)
{
specialCardEntity
.
setSpecialType
((
long
)
2
);
if
(
specialCardEntities
.
size
()
>
0
)
{
for
(
SpecialCardEntity
specialCardEntity
:
specialCardEntities
)
{
specialCardEntity
.
setSpecialType
((
long
)
2
);
specialCardService
.
updateSpecialCardSpecialType
(
specialCardEntity
);
}
}
else
{
}
else
{
//2 存在普通证任务单
//更改组号详情的特证数量+1
List
<
GroupNoEntity
>
groupNoEntities
=
groupNoService
.
selectGroupNoEntityByGroupNo
(
acceptNo
.
substring
(
0
,
8
));
if
(
groupNoEntities
.
size
()
>
0
)
{
for
(
GroupNoEntity
groupNoEntity
:
groupNoEntities
)
{
groupNoEntity
.
setSpecialCardCount
(
groupNoEntity
.
getSpecialCardCount
()
+
1
);
if
(
groupNoEntities
.
size
()
>
0
)
{
for
(
GroupNoEntity
groupNoEntity
:
groupNoEntities
)
{
groupNoEntity
.
setSpecialCardCount
(
groupNoEntity
.
getSpecialCardCount
()
+
1
);
groupNoService
.
updateGroupNoSpecialCount
(
groupNoEntity
);
}
List
<
TaskEntity
>
taskEntities
=
taskListService
.
selectTaskEntityByTaskId
(
groupNoEntities
.
get
(
0
).
getTaskId
());
//添加快证任务单
TaskEntity
taskEntity
=
new
TaskEntity
();
taskEntity
.
setOldCardType
(
Long
.
valueOf
(
cardType
));
taskEntity
.
setCardType
((
long
)
1
);
taskEntity
.
setCardType
((
long
)
1
);
taskEntity
.
setCountyCode
(
countyCode
);
taskEntity
.
setSubmitName
(
name
);
taskEntity
.
setTaskStateId
(
taskEntities
.
get
(
0
).
getTaskStateId
());
taskListService
.
saveFastTask
(
taskEntity
);
SpecialCardEntity
specialCardEntity
=
new
SpecialCardEntity
();
specialCardEntity
.
setSpecialType
((
long
)
2
);
specialCardEntity
.
setSpecialType
((
long
)
2
);
specialCardEntity
.
setInitiator
(
name
);
specialCardEntity
.
setAcceptNo
(
acceptNo
);
specialCardEntity
.
setGroupNo
(
acceptNo
.
substring
(
0
,
8
));
specialCardEntity
.
setGroupNo
(
acceptNo
.
substring
(
0
,
8
));
specialCardEntity
.
setTaskId
(
taskEntity
.
getTaskId
());
specialCardService
.
saveSpecialCard
(
specialCardEntity
);
}
...
...
@@ -267,9 +272,50 @@ public class TaskListApi {
}
return
null
;
return
"成功添加快证任务单"
;
}
/**
* 生成退证
* name 提交人姓名
* acceptNo 受理组号
* taskId 任务单流水号
*
* @return
*/
@RequestMapping
(
"addBackCard"
)
@Transactional
public
String
addBackCard
(
@RequestBody
String
object
,
HttpServletResponse
resp
)
{
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
object
);
String
acceptNo
=
jsonObject
.
getString
(
"acceptNo"
);
String
taskId
=
jsonObject
.
getString
(
"taskId"
);
String
name
=
jsonObject
.
getString
(
"name"
);
List
<
Object
>
objects
=
preproPersonService
.
selectUploadNoByAcceptNo
(
acceptNo
);
for
(
Object
o
:
objects
){
PreproPersonEntity
preproPersonEntity
=
new
PreproPersonEntity
();
Map
<
String
,
Object
>
map
=(
Map
<
String
,
Object
>)
o
;
preproPersonEntity
.
setJmsfzslh
(
map
.
get
(
"UPLOAD_NO"
).
toString
());
preproPersonEntity
.
setIsValid
(
0
);
preproPersonService
.
updatePreproPersonIsValid
(
preproPersonEntity
);
}
//存在任务单
//更改组号详情的特证数量+1
List
<
GroupNoEntity
>
groupNoEntities
=
groupNoService
.
selectGroupNoEntityByGroupNo
(
acceptNo
.
substring
(
0
,
8
));
if
(
groupNoEntities
.
size
()
>
0
)
{
for
(
GroupNoEntity
groupNoEntity
:
groupNoEntities
)
{
groupNoEntity
.
setSpecialCardCount
(
groupNoEntity
.
getSpecialCardCount
()
+
1
);
groupNoService
.
updateGroupNoSpecialCount
(
groupNoEntity
);
}
SpecialCardEntity
specialCardEntity
=
new
SpecialCardEntity
();
specialCardEntity
.
setSpecialType
((
long
)
3
);
specialCardEntity
.
setInitiator
(
name
);
specialCardEntity
.
setAcceptNo
(
acceptNo
);
specialCardEntity
.
setGroupNo
(
acceptNo
.
substring
(
0
,
8
));
specialCardEntity
.
setTaskId
(
Long
.
valueOf
(
taskId
));
specialCardService
.
saveSpecialCard
(
specialCardEntity
);
}
return
"成功添加退证"
;
}
/**
* 字符串去除空格
...
...
src/main/java/com/yxproject/start/entity/PersonPostEntity.java
View file @
7550fcb8
...
...
@@ -419,6 +419,7 @@ public class PersonPostEntity {
this
.
formDeadline
=
formDeadline
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
...
...
@@ -460,6 +461,7 @@ public class PersonPostEntity {
Objects
.
equals
(
printDate
,
that
.
printDate
)
&&
Objects
.
equals
(
formStartTime
,
that
.
formStartTime
)
&&
Objects
.
equals
(
id
,
that
.
id
)
&&
Objects
.
equals
(
formDeadline
,
that
.
formDeadline
);
}
...
...
src/main/java/com/yxproject/start/entity/PreproPersonEntity.java
View file @
7550fcb8
...
...
@@ -39,6 +39,8 @@ public class PreproPersonEntity {
private
Long
newFileId
;
private
Long
state
;
private
long
id
;
private
long
isValid
;
@Id
@Column
(
name
=
"ID"
)
public
long
getId
()
{
...
...
@@ -328,7 +330,15 @@ public class PreproPersonEntity {
public
void
setState
(
Long
state
)
{
this
.
state
=
state
;
}
@Basic
@Column
(
name
=
"IS_VALID"
)
public
long
getIsValid
()
{
return
isValid
;
}
public
void
setIsValid
(
long
isValid
)
{
this
.
isValid
=
isValid
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
...
...
@@ -362,11 +372,12 @@ public class PreproPersonEntity {
Objects
.
equals
(
cardTypeId
,
that
.
cardTypeId
)
&&
Objects
.
equals
(
newFileId
,
that
.
newFileId
)
&&
Objects
.
equals
(
id
,
that
.
id
)
&&
Objects
.
equals
(
isValid
,
that
.
isValid
)
&&
Objects
.
equals
(
state
,
that
.
state
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
id
,
jmsfzslh
,
gmsfhm
,
xm
,
xbdm
,
mzdm
,
csrq
,
ssxqdm
,
dzmc
,
sdxp
,
zwyZwtxsj
,
zwyZwtzsj
,
zweZwtxsj
,
zweZwtzsj
,
qfjgGajgmc
,
yxqqsrq
,
yxqjzrq
,
jmsfzslyydm
,
jmsfzzzlxdm
,
jmsfzlzfsdm
,
sjrXm
,
sjrLxdh
,
sjrYzbm
,
sjrTxdz
,
sid
,
fileId
,
cardTypeId
,
newFileId
,
state
);
return
Objects
.
hash
(
id
,
jmsfzslh
,
gmsfhm
,
xm
,
xbdm
,
mzdm
,
isValid
,
csrq
,
ssxqdm
,
dzmc
,
sdxp
,
zwyZwtxsj
,
zwyZwtzsj
,
zweZwtxsj
,
zweZwtzsj
,
qfjgGajgmc
,
yxqqsrq
,
yxqjzrq
,
jmsfzslyydm
,
jmsfzzzlxdm
,
jmsfzlzfsdm
,
sjrXm
,
sjrLxdh
,
sjrYzbm
,
sjrTxdz
,
sid
,
fileId
,
cardTypeId
,
newFileId
,
state
);
}
}
src/main/java/com/yxproject/start/mapper/PreproPersonMapper.java
View file @
7550fcb8
...
...
@@ -62,4 +62,23 @@ public interface PreproPersonMapper {
@Update
(
"UPDATE PREPRO_PERSON SET NEW_FILE_ID=#{newFileId} where JMSFZSLH=#{jmsfzslh}"
)
public
boolean
updateNewFileName
(
PreproPersonEntity
personEntity
);
/**
* 更新制证数据是否有效
* @param personEntity
* @return
*/
@Update
(
"UPDATE PREPRO_PERSON SET IS_VALID=#{isValid} where JMSFZSLH=#{jmsfzslh}"
)
public
boolean
updatePreproPersonIsValid
(
PreproPersonEntity
personEntity
);
/**
* 查询制证信息的上传受理号
* 受理库和制证库
* @param acceptNo 受理组号
* @return
*/
@Select
(
"select UPLOAD_NO,ACCEPT_NO from ACC_CARD_T@ACCU_LINK WHERE ACCEPT_NO =#{acceptNo}\n"
+
"UNION all \n"
+
"select UPLOAD_NO,ACCEPT_NO from PROD_CARD_T@PROD_LINK WHERE ACCEPT_NO =#{acceptNo}"
)
public
List
<
Object
>
selectUploadNoByAcceptNo
(
String
acceptNo
);
}
\ No newline at end of file
src/main/java/com/yxproject/start/service/PreproPersonService.java
View file @
7550fcb8
...
...
@@ -12,6 +12,9 @@ public interface PreproPersonService {
public
boolean
uploadState
(
String
acceptNo
,
String
state
);
public
List
<
Object
>
selectUploadNoByAcceptNo
(
String
acceptNo
);
public
boolean
updatePreproPersonIsValid
(
PreproPersonEntity
preproPersonEntity
);
public
List
<
PreproPersonEntity
>
selectPreproPerson
(
String
uploadNo
,
String
IDCard
,
String
oldFile
,
String
newFile
,
String
SSXQDM
,
String
cardType
,
String
state
,
String
uploadDate
);
...
...
src/main/java/com/yxproject/start/service/impl/PreproPersonServiceImpl.java
View file @
7550fcb8
...
...
@@ -27,6 +27,18 @@ public class PreproPersonServiceImpl implements PreproPersonService {
List
<
PreproPersonEntity
>
preproPersonEntities
=
preproPersonMapper
.
selectPreproPerson
(
replace
(
uploadNo
),
replace
(
IDCard
),
replace
(
oldFile
),
replace
(
newFile
),
replace
(
SSXQDM
),
replace
(
cardType
),
replace
(
state
),
replace
(
uploadDate
));
return
preproPersonEntities
;
}
/**
* 更新制证数据是否有效
* @param preproPersonEntity
* @return
*/
@Override
public
boolean
updatePreproPersonIsValid
(
PreproPersonEntity
preproPersonEntity
)
{
return
preproPersonMapper
.
updatePreproPersonIsValid
(
preproPersonEntity
);
}
private
String
replace
(
String
str
){
if
(
""
.
equals
(
str
)){
return
null
;
...
...
@@ -49,4 +61,14 @@ public class PreproPersonServiceImpl implements PreproPersonService {
return
true
;
}
/**
* 查询制证信息中
* @param acceptNo
* @return
*/
@Override
public
List
<
Object
>
selectUploadNoByAcceptNo
(
String
acceptNo
)
{
return
preproPersonMapper
.
selectUploadNoByAcceptNo
(
acceptNo
);
}
}
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