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
a20cc3be
Commit
a20cc3be
authored
Mar 08, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改更改任务单状态API
parent
6f53b218
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
218 additions
and
13 deletions
+218
-13
TaskListApi.java
src/main/java/com/yxproject/start/api/TaskListApi.java
+208
-11
TaskListService.java
...ain/java/com/yxproject/start/service/TaskListService.java
+1
-1
TaskListServiceImpl.java
...com/yxproject/start/service/impl/TaskListServiceImpl.java
+9
-1
No files found.
src/main/java/com/yxproject/start/api/TaskListApi.java
View file @
a20cc3be
...
@@ -17,10 +17,8 @@ import sun.net.idn.StringPrep;
...
@@ -17,10 +17,8 @@ import sun.net.idn.StringPrep;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.transaction.Transactional
;
import
javax.transaction.Transactional
;
import
java.util.ArrayList
;
import
java.text.SimpleDateFormat
;
import
java.util.HashMap
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author Administrator
* @author Administrator
...
@@ -77,15 +75,21 @@ public class TaskListApi {
...
@@ -77,15 +75,21 @@ public class TaskListApi {
/**
/**
* 更改任务单状态
* 更改任务单状态
* (用于任务单下发)
* taskId 任务单ID
* @param taskId 任务单ID
* name 下发人姓名
* @param name 下发人姓名
* process 下发人所在工序
* @param process 下发人所在工序
* @return
* @return
*/
*/
@RequestMapping
(
"updateState"
)
@RequestMapping
(
"updateState"
)
public
boolean
updateState
(
@RequestParam
(
"taskId"
)
String
taskId
,
@RequestParam
(
"process"
)
String
process
,
@RequestParam
(
"name"
)
String
name
){
return
taskListService
.
updateState
(
taskId
,
process
,
name
);
public
boolean
updateState
(
@RequestBody
String
json
){
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
json
);
JSONArray
jsonArray
=(
JSONArray
)
jsonObject
.
get
(
"taskIdList"
);
String
process
=
jsonObject
.
get
(
"process"
).
toString
();
String
name
=
jsonObject
.
get
(
"name"
).
toString
();
Boolean
b
=
true
;
List
<
String
>
list
=
(
List
<
String
>)
jsonArray
;
return
taskListService
.
updateState
(
list
,
process
,
name
);
}
}
/**
/**
...
@@ -190,8 +194,201 @@ public class TaskListApi {
...
@@ -190,8 +194,201 @@ public class TaskListApi {
*/
*/
@RequestMapping
(
"createFastTask"
)
@RequestMapping
(
"createFastTask"
)
@Transactional
@Transactional
public
String
createFastTask
(
@Request
Body
String
str
,
HttpServletResponse
resp
){
public
String
createFastTask
(
@Request
Param
(
"acceptNo"
)
String
acceptNo
,
HttpServletResponse
resp
){
//todo
//todo
// JSONObject jsonObject = (JSONObject) object;
// String cardID = jsonObject.getString("cardID");
// String makeType = jsonObject.getString("makeType");
// String cityCode = jsonObject.getString("cityCode");
// if ("null".equals(cityCode.substring(0, 4))) {
// cityCode = "000000";
// }
// String createDate = df2.format(new Date());
// if ("null".equals(createDate + "")) {
// createDate = df2.format(new Date()).substring(0, 8);
// }
// List<Object[]> list = processinfoDao.querySpecialCardInfo(cardID.substring(0, 8));
// String queryGroupMakeType = groupinfoDao.queryGroupMakeType(cardID.substring(0, 8));
// /**
// * 未保存循环单 在受理库中添加快证
// */
// try {
// if (list.size() == 0) {
// //添加快证时保存派出所上传照片的情况
// ManagerACC managerACC = (ManagerACC) SpringBeanUtil.getContext().getBean("managerACC");
// List<String> stringList = new ArrayList<>();
// stringList.add("('" + cardID.substring(0, 8) + "')");
// List<Object[]> policeStationInfo = managerACC.getPoliceStationInfo(stringList);
// int i1 = 0;
// while (i1 == 0) {
// i1 = updatePoliceStationInfo(policeStationInfo);
// }
// //生成快证循环单
// String cycleid = updateCycleSheet(1 + "", df2.format(new Date()), cityCode.substring(0, 4) + "00", createDate, 1 + "", 0 + "", "", "", "1", Long.valueOf(queryGroupMakeType));
// //插入新的组
// GroupinfoEntity groupinfoEntity1 = new GroupinfoEntity();
// groupinfoEntity1.setGroupinfoid(groupinfoDao.findCount(GroupinfoEntity.class) + 1);
// groupinfoEntity1.setCyclesheetid(cycleid);
// groupinfoEntity1.setCount(Long.valueOf(1));
// groupinfoEntity1.setType(Long.valueOf(1));
// groupinfoEntity1.setGroupNo(cardID);
// groupinfoDao.update(groupinfoEntity1);
// //快证循环单添加工序
// ProcessinfoEntity processinfoEntity1 = new ProcessinfoEntity();
// processinfoEntity1.setCyclesheet(cycleid);
// processinfoEntity1.setProcessid(processinfoDao.queryProcessID() + 1);
// processinfoEntity1.setProcess(1 + "");
// processinfoEntity1.setCreatedate(df2.format(new Date()));
// processinfoDao.update(processinfoEntity1);
// String sql = "select DATA_VERIFICATION_SEQ.currval,DATA_VERIFICATION_SEQ.NEXTVAL from dual";
// List<Object[]> listWithSQL = dataVerificationEntityDao.findListWithSQL(sql);
// AutoCreateCycleID autoCreateCycleID = new AutoCreateCycleID();
// String dataVerificationID = autoCreateCycleID.createCycleID(listWithSQL.get(0)[0] + "");
// SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyyMMdd");
// DataVerificationEntity dataVerificationEntity = new DataVerificationEntity();
// dataVerificationEntity.setDataVerificationId(dataVerificationID);
// dataVerificationEntity.setCitycode(cityCode.substring(0, 4) + "00");
// dataVerificationEntity.setMaketype(Long.valueOf(queryGroupMakeType));
// dataVerificationEntity.setSaveDate(simpleDateFormat2.format(new Date()));
// dataVerificationEntity.setValidCount((long) 1);
// dataVerificationEntity.setInvalidCount((long) 0);
// dataVerificationEntityDao.update(dataVerificationEntity);
//
// List<Object[]> groupInfoList = groupinfoDao.queryGroupInfoAtAcc(cardID.substring(0, 8));
// int i = Integer.valueOf((groupInfoList.get(0)[1]).toString()) - 1;
// /**
// * 判断组内剩下的人数
// * 如果超过1人 则加入新的循环单
// *
// */
// if (i > 0) {
// String cycleid1 = updateCycleSheet(makeType, df2.format(new Date()), cityCode.substring(0, 4) + "00", createDate, i + "", groupInfoList.get(0)[2].toString(), "", "", "0", Long.valueOf(-1));
// GroupinfoEntity groupinfoEntity2 = new GroupinfoEntity();
// //插入组号原有的信息
//// long count = groupinfoDao.findCount(GroupinfoEntity.class);
// long count = groupinfoDao.queryGroupinfoCount();
// groupinfoEntity2.setGroupinfoid(count + 1);
// groupinfoEntity2.setCyclesheetid(cycleid1);
// groupinfoEntity2.setCount(Long.valueOf(groupInfoList.get(0)[1].toString()));
// groupinfoEntity2.setGroupNo(cardID.substring(0, 8));
// groupinfoDao.update(groupinfoEntity2);
// //插入快证的信息
// GroupinfoEntity groupinfoEntity3 = new GroupinfoEntity();
// groupinfoEntity3.setGroupinfoid(groupinfoDao.findCount(GroupinfoEntity.class) + 1);
// groupinfoEntity3.setCyclesheetid(cycleid1);
// groupinfoEntity3.setCount(Long.valueOf("-1"));
// groupinfoEntity3.setGroupNo(cardID);
// groupinfoEntity3.setType(Long.valueOf("1"));
// groupinfoDao.update(groupinfoEntity3);
// }
// yxresp.outPutSuccess("1");
// } else if (list.size() == 1) {
// /**]
// * 已保存循环单 在盈信库中 添加快证
// */
// //更新原来循环单数据核验数量
// cyclesheetinfoEntityDao.updateCycleSheetInfoVaild(list.get(0)[0].toString());
// GroupinfoEntity groupinfoEntity = new GroupinfoEntity();
// groupinfoEntity.setGroupNo(cardID);
// groupinfoEntity.setType((long) 1);
// groupinfoEntity.setCount(0 - Long.valueOf(1));
// groupinfoEntity.setCyclesheetid(list.get(0)[0].toString());
// groupinfoEntity.setGroupinfoid(groupinfoDao.findCount(GroupinfoEntity.class) + 1);
// groupinfoDao.update(groupinfoEntity);
// //插入新的循环单
//// CyclesheetinfoEntity findcyclesheetinfoEntity = cyclesheetinfoEntityDao.findCyclesheetinfoEntityByCycleID(groupinfoEntity.getCyclesheetid());
//// //在新的余证循环单中添加原有循环单的生成时间
//// String cycleid = updateCycleSheetBySQL(1 + "", findcyclesheetinfoEntity.getSubmitdate(), findcyclesheetinfoEntity.getCitycode(), findcyclesheetinfoEntity.getCreatedate(), 1 + "", 0 + "", findcyclesheetinfoEntity.getWorkshop(), findcyclesheetinfoEntity.getMachine(), "1");
//
//// 插入新的循环单
// String cycleid = updateCycleSheet(1 + "", df2.format(new Date()), list.get(0)[3].toString(), df2.format(new Date()), 1 + "", 0 + "", ((list.get(0)[7] == null) ? "" : list.get(0)[7].toString()), ((list.get(0)[8] == null) ? "" : list.get(0)[8].toString()), "1", Long.valueOf(queryGroupMakeType));
// //插入新的组
// GroupinfoEntity groupinfoEntity1 = new GroupinfoEntity();
// long count = groupinfoDao.findCount(GroupinfoEntity.class);
// groupinfoEntity1.setGroupinfoid(count + 1);
// groupinfoEntity1.setCyclesheetid(cycleid);
// groupinfoEntity1.setCount(Long.valueOf(1));
// groupinfoEntity1.setType(Long.valueOf(1));
// groupinfoEntity1.setGroupNo(cardID);
// groupinfoDao.update(groupinfoEntity1);
// //在未下发循环单中添加快证 工序为null设置为 1
// if (list.get(0)[11] == null) {
// ProcessinfoEntity processinfoEntity1 = new ProcessinfoEntity();
// processinfoEntity1.setCyclesheet(cycleid);
// processinfoEntity1.setProcessid(processinfoDao.queryProcessID() + 1);
// processinfoEntity1.setProcess("1");
// processinfoEntity1.setCreatedate(df2.format(new Date()));
// processinfoDao.update(processinfoEntity1);
// } else {
// int num = Integer.valueOf((list.get(0)[11] == null ? null : list.get(0)[11].toString()));
// for (int i = 1; i <= num; i++) {
// ProcessinfoEntity processinfoEntity1 = new ProcessinfoEntity();
// processinfoEntity1.setCyclesheet(cycleid);
// processinfoEntity1.setProcessid(processinfoDao.queryProcessID() + 1);
// processinfoEntity1.setProcess(i + "");
// processinfoEntity1.setCreatedate(df2.format(new Date()));
// processinfoDao.update(processinfoEntity1);
// }
// }
// yxresp.outPutSuccess("1");
// } else {
// /**
// * 已经成为余证或者废证 添加快证
// */
// List<GroupinfoEntity> groupinfoEntities = groupinfoDao.queryGroupInfoEntityList(cardID);
// /**
// * 判断是否是余证 添加快证
// */
// if (groupinfoEntities.get(0).getType() == 2) {
// for (GroupinfoEntity groupinfoEntity : groupinfoEntities) {
// /**
// * 修改组号表中 余证 改快证
// */
// groupinfoEntity.setType(Long.valueOf(1));
// groupinfoDao.update(groupinfoEntity);
// if (groupinfoEntity.getCount() == 1) {
// /**
// * 找到余证循环单 改为快证循环单
// */
// CyclesheetinfoEntity cyclesheetinfoEntity = cyclesheetinfoEntityDao.queryCyclesheetinfoEntityByCycleID(groupinfoEntity.getCyclesheetid());
// cyclesheetinfoEntity.setMktype(Long.valueOf(1));
// cyclesheetinfoEntity.setWorkshop(null);
// cyclesheetinfoEntityDao.update(cyclesheetinfoEntity);
// }
// }
// } else {
// /**
// * 废证 添加快证
// */
// for (GroupinfoEntity groupinfoEntity : groupinfoEntities) {
// /**
// * 修改组号表中 废证 改快证
// */
// groupinfoEntity.setType(Long.valueOf(1));
// groupinfoDao.update(groupinfoEntity);
// if (groupinfoEntity.getCount() == 1) {
// /**
// * 找到废证循环单 改为快证循环单
// */
// CyclesheetinfoEntity cyclesheetinfoEntity = cyclesheetinfoEntityDao.queryCyclesheetinfoEntityByCycleID(groupinfoEntity.getCyclesheetid());
// cyclesheetinfoEntity.setMktype(Long.valueOf(1));
// cyclesheetinfoEntity.setIsshow(Long.valueOf(1));
// cyclesheetinfoEntity.setWorkshop(null);
// cyclesheetinfoEntityDao.update(cyclesheetinfoEntity);
// }
// if (groupinfoEntity.getCount() == -1) {
// //更新原来循环单数据核验数量
// cyclesheetinfoEntityDao.updateCycleSheetInfoVaild(groupinfoEntity.getCyclesheetid());
// }
// }
// }
// yxresp.outPutSuccess("1");
// }
// } catch (Exception e) {
// logger.error("添加快证循环单在制证库异常 addQuickCyclesheetInfoImpl" + " cardID " + cardID + " makeType " + makeType + " cityCode " + cityCode + "createDate" + createDate);
// logger.error("", e.fillInStackTrace());
// throw e;
// }
return
null
;
return
null
;
}
}
...
...
src/main/java/com/yxproject/start/service/TaskListService.java
View file @
a20cc3be
...
@@ -18,7 +18,7 @@ public interface TaskListService {
...
@@ -18,7 +18,7 @@ public interface TaskListService {
public
boolean
createTaskList
(
List
<
TaskListEntity
>
resultMap
);
public
boolean
createTaskList
(
List
<
TaskListEntity
>
resultMap
);
public
boolean
updateState
(
String
taskId
,
String
process
,
String
name
);
public
boolean
updateState
(
List
<
String
>
list
,
String
process
,
String
name
);
public
List
<
Object
>
selectByCountyAtACCU
(
String
date
);
public
List
<
Object
>
selectByCountyAtACCU
(
String
date
);
...
...
src/main/java/com/yxproject/start/service/impl/TaskListServiceImpl.java
View file @
a20cc3be
...
@@ -12,6 +12,7 @@ import com.yxproject.start.service.TaskListService;
...
@@ -12,6 +12,7 @@ import com.yxproject.start.service.TaskListService;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.jws.Oneway
;
import
javax.jws.Oneway
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -52,7 +53,9 @@ public class TaskListServiceImpl implements TaskListService {
...
@@ -52,7 +53,9 @@ public class TaskListServiceImpl implements TaskListService {
}
}
@Override
@Override
public
boolean
updateState
(
String
taskId
,
String
process
,
String
name
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
updateState
(
List
<
String
>
list
,
String
process
,
String
name
)
{
for
(
String
taskId:
list
)
{
switch
(
process
){
switch
(
process
){
case
"1"
:
case
"1"
:
taskListMapper
.
updateState1
(
taskId
,
process
,
name
);
taskListMapper
.
updateState1
(
taskId
,
process
,
name
);
...
@@ -78,6 +81,8 @@ public class TaskListServiceImpl implements TaskListService {
...
@@ -78,6 +81,8 @@ public class TaskListServiceImpl implements TaskListService {
default
:
default
:
break
;
break
;
}
}
}
return
true
;
return
true
;
}
}
...
@@ -209,6 +214,7 @@ public class TaskListServiceImpl implements TaskListService {
...
@@ -209,6 +214,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return
* @return
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Object
>
selectByCountyAtAuxiliary
(
long
process
)
{
public
List
<
Object
>
selectByCountyAtAuxiliary
(
long
process
)
{
//查询普通组号列表 在辅助库中
//查询普通组号列表 在辅助库中
List
<
Map
<
String
,
Object
>>
mapList_common
=
taskListMapper
.
selectByCountyAtAuxiliary_common
(
process
);
List
<
Map
<
String
,
Object
>>
mapList_common
=
taskListMapper
.
selectByCountyAtAuxiliary_common
(
process
);
...
@@ -258,6 +264,7 @@ public class TaskListServiceImpl implements TaskListService {
...
@@ -258,6 +264,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return
* @return
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
saveTask
(
TaskEntity
taskEntity
)
{
public
boolean
saveTask
(
TaskEntity
taskEntity
)
{
return
taskListMapper
.
saveTask
(
taskEntity
);
return
taskListMapper
.
saveTask
(
taskEntity
);
}
}
...
@@ -268,6 +275,7 @@ public class TaskListServiceImpl implements TaskListService {
...
@@ -268,6 +275,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return
* @return
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
saveTask
(
List
<
Object
>
list
,
String
submitName
,
String
process
)
{
public
boolean
saveTask
(
List
<
Object
>
list
,
String
submitName
,
String
process
)
{
Map
<
String
,
Object
>
stringObjectMap
=(
Map
<
String
,
Object
>)
list
.
get
(
0
);
Map
<
String
,
Object
>
stringObjectMap
=(
Map
<
String
,
Object
>)
list
.
get
(
0
);
TaskEntity
taskEntity
=
new
TaskEntity
();
TaskEntity
taskEntity
=
new
TaskEntity
();
...
...
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