Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_REFACTORING
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_REFACTORING
Commits
44f67834
Commit
44f67834
authored
Dec 24, 2018
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加异常状态从写死的改为动态的
parent
367a9b41
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
15 deletions
+18
-15
UserApi.java
src/main/java/com/yxproject/start/api/UserApi.java
+2
-5
TaskMapper.java
src/main/java/com/yxproject/start/mapper/TaskMapper.java
+2
-1
TaskService.java
src/main/java/com/yxproject/start/service/TaskService.java
+1
-1
TaskServiceImpl.java
...ava/com/yxproject/start/service/impl/TaskServiceImpl.java
+7
-6
TaskMapper.xml
src/main/resources/mapper/TaskMapper.xml
+6
-2
No files found.
src/main/java/com/yxproject/start/api/UserApi.java
View file @
44f67834
...
@@ -505,13 +505,10 @@ public class UserApi {
...
@@ -505,13 +505,10 @@ public class UserApi {
*/
*/
@RequestMapping
(
"addExceptionState"
)
@RequestMapping
(
"addExceptionState"
)
// @RequiresPermissions("userInfo.add")//权限管理;
// @RequiresPermissions("userInfo.add")//权限管理;
public
String
addExceptionState
(
@RequestParam
(
"exception_Information"
)
String
exception_Information
,
HttpServletResponse
resp
)
{
public
String
addExceptionState
(
@RequestParam
(
"taskId"
)
String
taskId
,
@RequestParam
(
"exceptionInformation"
)
String
exceptionInformation
,
HttpServletResponse
resp
)
{
String
map
=
"{\"task_Id\":\"20181016001\",\"exception_Information\":0} "
;
int
i
=
taskService
.
addExceptionState
(
taskId
,
exceptionInformation
);
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
TaskEntity
taskEntity
=
(
TaskEntity
)
JSONObject
.
toBean
(
jsonObject
,
TaskEntity
.
class
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
taskService
.
addExceptionState
(
taskEntity
);
yxjsonResponse
.
outPutSuccess
(
i
+
"更新成功"
);
yxjsonResponse
.
outPutSuccess
(
i
+
"更新成功"
);
return
yxjsonResponse
.
toJSONString
();
return
yxjsonResponse
.
toJSONString
();
}
}
...
...
src/main/java/com/yxproject/start/mapper/TaskMapper.java
View file @
44f67834
...
@@ -17,7 +17,8 @@ public interface TaskMapper {
...
@@ -17,7 +17,8 @@ public interface TaskMapper {
public
int
updateTaskEntity
(
TaskEntity
taskEntity
);
public
int
updateTaskEntity
(
TaskEntity
taskEntity
);
public
List
<
TaskEntity
>
findTaskEntityByAcceptNo
(
String
acceptNo
);
public
List
<
TaskEntity
>
findTaskEntityByAcceptNo
(
String
acceptNo
);
public
List
<
TaskEntity
>
findTaskEntityByState
(
int
state
);
public
List
<
TaskEntity
>
findTaskEntityByState
(
int
state
);
public
int
replaceExceptionInformation
(
TaskEntity
taskEntity
);
public
int
updateTaskIsException
(
@Param
(
"taskId"
)
String
taskId
,
@Param
(
"exceptionInformation"
)
String
exceptionInformation
,
@Param
(
"isException"
)
String
isException
);
public
int
replaceExceptionInformation
(
@Param
(
"taskId"
)
String
taskId
,
@Param
(
"isException"
)
String
isException
);
public
List
<
TypeListEntity
>
findTypeListByTaskStateId
(
String
taskStateId
);
public
List
<
TypeListEntity
>
findTypeListByTaskStateId
(
String
taskStateId
);
public
List
<
CityListEntity
>
findCityList
(
@Param
(
"taskStateId"
)
String
taskStateId
,
@Param
(
"cardType"
)
String
cardType
);
public
List
<
CityListEntity
>
findCityList
(
@Param
(
"taskStateId"
)
String
taskStateId
,
@Param
(
"cardType"
)
String
cardType
);
public
int
updateOutStorageDate
(
String
taskId
);
public
int
updateOutStorageDate
(
String
taskId
);
...
...
src/main/java/com/yxproject/start/service/TaskService.java
View file @
44f67834
...
@@ -26,7 +26,7 @@ public interface TaskService {
...
@@ -26,7 +26,7 @@ public interface TaskService {
public
List
<
Map
<
String
,
Object
>>
findProductionTaskListEntityByState
(
int
state
);
public
List
<
Map
<
String
,
Object
>>
findProductionTaskListEntityByState
(
int
state
);
public
int
addExceptionState
(
TaskEntity
state
);
public
int
addExceptionState
(
String
taskId
,
String
exceptionInformation
);
// public int updateStorageDate(String taskListId,String inStorageCount,String outStorageCount);
// public int updateStorageDate(String taskListId,String inStorageCount,String outStorageCount);
...
...
src/main/java/com/yxproject/start/service/impl/TaskServiceImpl.java
View file @
44f67834
...
@@ -420,15 +420,16 @@ public class TaskServiceImpl implements TaskService {
...
@@ -420,15 +420,16 @@ public class TaskServiceImpl implements TaskService {
* @return
* @return
*/
*/
@Override
@Override
public
int
addExceptionState
(
TaskEntity
taskEntity
)
{
public
int
addExceptionState
(
String
taskId
,
String
exceptionInformation
)
{
int
i
=
0
;
int
i
=
0
;
if
(
taskEntity
.
getException_Information
()!=
null
)
{
String
isException
;
taskEntity
.
setIs_Exception
((
long
)
1
);
if
(
Integer
.
parseInt
(
exceptionInformation
)
!=
0
)
{
i
=
taskMapper
.
updateTaskEntity
(
taskEntity
);
isException
=
String
.
valueOf
(
1
);
i
=
taskMapper
.
updateTaskIsException
(
taskId
,
exceptionInformation
,
isException
);
}
else
{
}
else
{
taskEntity
.
setIs_Exception
((
long
)
0
);
isException
=
String
.
valueOf
(
0
);
i
=
taskMapper
.
replaceExceptionInformation
(
task
Entity
);
i
=
taskMapper
.
replaceExceptionInformation
(
task
Id
,
isException
);
}
}
return
i
;
return
i
;
}
}
...
...
src/main/resources/mapper/TaskMapper.xml
View file @
44f67834
...
@@ -68,8 +68,12 @@
...
@@ -68,8 +68,12 @@
select * from TASK where TASK_STATE_ID =#{task_State_Id}
select * from TASK where TASK_STATE_ID =#{task_State_Id}
</select>
</select>
<update
id=
"replaceExceptionInformation"
parameterType=
"com.yxproject.start.entity.TaskEntity"
>
<update
id=
"updateTaskIsException"
parameterType=
"String"
>
update TASK set exception_Information = NULL and IS_EXCEPTION =#{is_Exception} where TASK_ID =#{task_Id}
update TASK set EXCEPTION_INFORMATION = #{exceptionInformation},IS_EXCEPTION = #{isException} where TASK_ID =#{taskId}
</update>
<update
id=
"replaceExceptionInformation"
parameterType=
"String"
>
update TASK set EXCEPTION_INFORMATION = NULL,IS_EXCEPTION = #{isException} where TASK_ID =#{taskId}
</update>
</update>
<update
id=
"updateOutStorageDate"
>
<update
id=
"updateOutStorageDate"
>
...
...
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