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
e76bebe6
Commit
e76bebe6
authored
May 28, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加并修改 添加、查询、删除重做返回证 API
parent
a8cde0fe
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
115 additions
and
8 deletions
+115
-8
TaskListApi.java
src/main/java/com/yxproject/start/api/TaskListApi.java
+67
-0
FailedCardMapper.java
...ain/java/com/yxproject/start/mapper/FailedCardMapper.java
+10
-8
GroupNoMapper.java
src/main/java/com/yxproject/start/mapper/GroupNoMapper.java
+8
-0
TaskListMapper.java
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
+14
-0
TaskListService.java
...ain/java/com/yxproject/start/service/TaskListService.java
+4
-0
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+12
-0
No files found.
src/main/java/com/yxproject/start/api/TaskListApi.java
View file @
e76bebe6
...
...
@@ -337,6 +337,73 @@ public class TaskListApi {
return
map
;
}
/**
* 生成重做返回证任务单
* name 提交人姓名
* acceptNo 受理组号
* countyCode 区县代码
*
* @return
*/
@RequestMapping
(
"createRedoTask"
)
@Transactional
public
Map
<
String
,
Object
>
createRedoTask
(
@RequestBody
String
object
)
{
// JSONObject jsonObject = JSONObject.fromObject(object);
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
object
);
for
(
Object
o
:
jsonArray
){
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
o
);
String
acceptNo
=
jsonObject
.
getString
(
"acceptNo"
);
String
countyCode
=
jsonObject
.
getString
(
"countyCode"
);
String
name
=
jsonObject
.
getString
(
"name"
);
if
(
"null"
.
equals
(
countyCode
.
substring
(
0
,
4
)))
{
countyCode
=
"000000"
;
}
//添加重做返回证任务单
TaskEntity
taskEntity
=
new
TaskEntity
();
taskEntity
.
setCardType
((
long
)
1
);
taskEntity
.
setCountyCode
(
countyCode
);
taskEntity
.
setTaskStateId
((
long
)
0
);
taskEntity
.
setSubmitName
(
name
);
taskListService
.
saveTask
(
taskEntity
);
GroupNoEntity
groupNoEntity
=
new
GroupNoEntity
();
groupNoEntity
.
setGroupNo
(
acceptNo
);
groupNoEntity
.
setInvalidCount
((
long
)
0
);
groupNoEntity
.
setValidCount
((
long
)
1
);
groupNoEntity
.
setSpecialCardCount
((
long
)
0
);
groupNoEntity
.
setTaskId
(
taskEntity
.
getTaskId
());
groupNoService
.
saveGroupNo
(
groupNoEntity
);
}
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"msg"
,
"成功添加重做返回证任务单"
);
return
map
;
}
/**
* 查询重做返回登记任务单
* @param date
* @return
*/
@RequestMapping
(
"queryRedoTask"
)
public
List
<
Map
<
String
,
Object
>>
queryRedoTask
(
@RequestParam
(
"date"
)
String
date
){
List
<
Map
<
String
,
Object
>>
maps
=
taskListService
.
selectRedoTask
(
replaceDate
(
date
));
return
maps
;
}
/**
* 删除重做返回登记任务单
* @param taskId 任务单ID
* @return
*/
@RequestMapping
(
"deleteRedoTask"
)
public
boolean
deleteRedoTask
(
@RequestParam
(
"taskId"
)
String
taskId
){
return
taskListService
.
deleteRedoTask
(
Long
.
valueOf
(
taskId
));
}
/**
* 生成退证
* name 提交人姓名
...
...
src/main/java/com/yxproject/start/mapper/FailedCardMapper.java
View file @
e76bebe6
...
...
@@ -41,11 +41,13 @@ public interface FailedCardMapper {
/**
* 生成废证
* @param failedCardReasonId
* @param acceptNo
* @param taskId
* @param initiator
* @param note
* @param failedCardReasonId 废证原因
* @param acceptNo 受理组号
* @param taskId 任务单ID
* @param initiator 发起工序
* @param note 备注
* @param workGroup 工作组
* @param name 提交人姓名
* @return
*/
@Insert
(
"INSERT INTO FAILED_CARD (FAILED_CARD_REASON_ID,ACCEPT_NO,TASK_ID,STATE,INITIATOR,NOTE,work_group,name) VALUES (#{failedCardReasonId},#{acceptNo},#{taskId},0,#{initiator},#{note},#{workGroup},#{name})\n"
)
...
...
@@ -125,9 +127,9 @@ public interface FailedCardMapper {
@Update
(
"update FAILED_CARD set ALLOT_DATE =sysdate ,state =#{state} where FAILED_CARD_ID = #{failedCardId}"
)
public
boolean
updateFailedState3
(
FailedCardEntity
failedCardEntity
);
@Update
(
"update FAILED_CARD set FINISH_DATE =sysdate ,state =#{state} where FAILED_CARD_ID = #{failedCardId}"
)
public
boolean
updateFailedState4
(
FailedCardEntity
failedCardEntity
);
@Update
(
"update FAILED_CARD set FINISH_DATE =sysdate ,state =#{state} where FAILED_CARD_ID = #{failedCardId}"
)
public
boolean
updateFailedState5
(
FailedCardEntity
failedCardEntity
);
//
public boolean updateFailedState4(FailedCardEntity failedCardEntity);
//
@Update("update FAILED_CARD set FINISH_DATE =sysdate ,state =#{state} where FAILED_CARD_ID = #{failedCardId}")
//
public boolean updateFailedState5(FailedCardEntity failedCardEntity);
/**
...
...
src/main/java/com/yxproject/start/mapper/GroupNoMapper.java
View file @
e76bebe6
...
...
@@ -68,4 +68,12 @@ public interface GroupNoMapper {
"UNION ALL \n"
+
"SELECT ID_NO,ACCEPT_NO FROM PROD_CARD_T@PRODYD_LINK WHERE ID_NO =#{idCard} OR ACCEPT_NO =#{idCard}"
)
public
List
<
Map
<
String
,
Object
>>
selectAcceptNo
(
String
idCard
);
/**
* 删除重做登记的任务单
* @param taskId 任务单编号
* @return
*/
@Delete
(
"delete group_no where task_id = ${taskId}"
)
public
boolean
deleteGroupNoByTaskId
(
@Param
(
"taskId"
)
long
taskId
);
}
src/main/java/com/yxproject/start/mapper/TaskListMapper.java
View file @
e76bebe6
...
...
@@ -1525,6 +1525,20 @@ public interface TaskListMapper {
@Update
(
"update failed_card set work_group = ${workGroup} where failed_card_ID = ${taskId}"
)
public
boolean
updateFailedCardWorkGroup
(
@Param
(
"taskId"
)
String
taskId
,
@Param
(
"workGroup"
)
long
workGroup
);
/**
* 查询重做返回登记证件
* @param date 查询登记时间
* @return
*/
@Select
(
"select * from task left join group_no on task.task_id = group_no.task_id where card_type = 2 and to_char(submit_date,'yyyyMMdd') = #{date} order by task.task_id"
)
public
List
<
Map
<
String
,
Object
>>
selectRedoTask
(
@Param
(
"date"
)
String
date
);
/**
* 删除重做返回任务单
* @param taskId 任务单编号
* @return
*/
@Delete
(
"delete task where task_id = ${taskId}"
)
public
boolean
deleteTaskByTaskId
(
@Param
(
"taskId"
)
long
taskId
);
}
src/main/java/com/yxproject/start/service/TaskListService.java
View file @
e76bebe6
...
...
@@ -105,4 +105,8 @@ public interface TaskListService {
public
List
<
Map
<
String
,
Object
>>
selectRemainderCardInfo
(
String
date
,
String
name
);
public
boolean
updateFailedCardWorkGroup
(
List
<
String
>
list
,
String
workGroup
);
public
List
<
Map
<
String
,
Object
>>
selectRedoTask
(
String
date
);
public
boolean
deleteRedoTask
(
long
taskId
);
}
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
e76bebe6
...
...
@@ -993,6 +993,18 @@ public class TaskListServiceImpl implements TaskListService {
return
true
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
selectRedoTask
(
String
date
)
{
return
taskListMapper
.
selectRedoTask
(
date
);
}
@Override
public
boolean
deleteRedoTask
(
long
taskId
)
{
groupNoMapper
.
deleteGroupNoByTaskId
(
taskId
);
taskListMapper
.
deleteTaskByTaskId
(
taskId
);
return
true
;
}
private
String
createGroupNo
(
List
<
Integer
>
c
,
List
<
Integer
>
nsList
)
{
try
{
String
groupNo
=
""
;
...
...
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