Commit 104a2742 authored by dahai's avatar dahai

修改打印转出任务单

parent a50ac197
......@@ -93,11 +93,9 @@ public class TaskListApi {
* taskId 任务单ID
* name 下发人姓名
* process 下发人所在工序
*
* @return
*/
@RequestMapping("updateState")
public boolean updateState(@RequestBody String json) {
JSONObject jsonObject = JSONObject.fromObject(json);
JSONArray jsonArray = (JSONArray) jsonObject.get("taskIdList");
......@@ -108,6 +106,27 @@ public class TaskListApi {
return taskListService.updateState(list, process, name);
}
/**
* 更改任务单状态
* taskId 任务单ID
* name 打印转出人姓名
* process 打印转出人所在工序
* printer 打印机编号
* @return
*/
@RequestMapping("updateState2")
public boolean updateState2(@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();
String printer = jsonObject.get("printer").toString();
Boolean b = true;
List<String> list = (List<String>) jsonArray;
return taskListService.updateState2(list, process, name,Long.valueOf(printer));
}
/**
* 查询任务单详情
* (受理库)
......@@ -141,7 +160,6 @@ public class TaskListApi {
}
/**
* 查询任务单详情
* (辅助库)
......@@ -156,6 +174,34 @@ public class TaskListApi {
return objects;
}
/**
* 查询任务单详情
* (辅助库)
*
* @param process 工序
* @param resp
* @return
*/
@RequestMapping("queryByCountyAtAuxiliaryState1")
public List<Object> queryByCountyAtAuxiliaryState1(@RequestParam("process") String process, HttpServletResponse resp) {
List<Object> objects = taskListService.selectByCountyAtAuxiliary(Long.valueOf(process) - 1);
return objects;
}
/**
* 查询任务单详情
* (辅助库)
*
* @param process 工序
* @param resp
* @return
*/
@RequestMapping("queryByCountyAtAuxiliaryState2")
public List<Object> queryByCountyAtAuxiliaryState2(@RequestParam("process") String process, HttpServletResponse resp) {
List<Object> objects = taskListService.selectByCountyAtAuxiliary(Long.valueOf(process) - 1);
return objects;
}
/**
* 生成任务单
......
......@@ -146,13 +146,13 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select task.task_id,CARD_TYPE_DIC.CARD_TYPE,CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
@Select("select task.submit_date, task.task_id,CARD_TYPE_DIC.CARD_TYPE,CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,group_no.SPECIAL_CARD_COUNT,group_no.GROUP_NO, nvl(fc.faileCount,0) faileCount\n" +
"from group_no left join task on group_no.task_id= task.TASK_ID\n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n" +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"left join (select task_id, nvl(count(*),0) faileCount from FAILED_CARD group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n" +
"where task.TASK_STATE_ID = #{process}")
"where task.TASK_STATE_ID = #{process} order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common(@Param("process") long process);
/**
......@@ -161,13 +161,13 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO, nvl(fc.faileCount,0) faileCount\n" +
@Select("select task.submit_date, SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount\n" +
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n" +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"left join (select task_id,nvl(count(*),0) faileCount from FAILED_CARD group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID = #{process}")
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID = #{process} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast(@Param("process") long process);
/**
......@@ -176,13 +176,13 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO, nvl(fc.faileCount,0) faileCount\n" +
@Select("select task.submit_date, SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount\n" +
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n" +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"left join (select task_id,nvl(count(*),0) faileCount from FAILED_CARD group by task_id ) fc on fc.TASK_ID = task.TASK_ID\n" +
"where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID = #{process}")
"where SPECIAL_CARD.SPECIAL_TYPE =1 and task.TASK_STATE_ID = #{process} order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind(@Param("process") long process);
......@@ -221,8 +221,8 @@ public interface TaskListMapper {
* @param taskId
* @return
*/
@Update("UPDATE TASK SET TASK_STATE_ID=#{process},PRINT_OUT_NAME=#{name} WHERE TASK_ID = #{taskId} ")
public boolean updateState2(@Param("taskId") String taskId,@Param("process") String process,@Param("name") String name);
@Update("UPDATE TASK SET TASK_STATE_ID=#{process},PRINT_OUT_NAME=#{name},PRINTER_ID =#{printer} WHERE TASK_ID = #{taskId} ")
public boolean updateState2(@Param("taskId") String taskId,@Param("process") String process,@Param("name") String name,@Param("printer") long printer);
/**
*更改任务单状态
......
......@@ -21,6 +21,8 @@ public interface TaskListService {
public boolean updateState(List<String> list,String process,String name);
public boolean updateState2(List<String> list,String process,String name,long printer);
public List<Object> selectByCountyAtACCU(String date);
public Map<String ,Object> selectByGroupNoAtACCU(String date, String typeCode, String countyCode,long currPage, long pageSize);
......
......@@ -61,9 +61,6 @@ public class TaskListServiceImpl implements TaskListService {
case "1":
taskListMapper.updateState1(taskId,process,name);
break;
case "2":
taskListMapper.updateState2(taskId,process,name);
break;
case "3":
taskListMapper.updateState3(taskId,process,name);
break;
......@@ -87,6 +84,15 @@ public class TaskListServiceImpl implements TaskListService {
return true;
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateState2(List<String> list,String process,String name,long printer) {
for (String taskId: list) {
taskListMapper.updateState2(taskId,process,name,printer);
}
return true;
}
/**
* 查询任务单详情
* 受理库
......@@ -225,8 +231,8 @@ public class TaskListServiceImpl implements TaskListService {
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind(process);
List list = new ArrayList();
list = formateMap(mapList_common);
list.addAll(mapList_fast);
list.addAll(mapList_remaind);
list.addAll(formateMap(mapList_fast));
list.addAll(formateMap(mapList_remaind));
return list;
}
......@@ -460,6 +466,7 @@ public class TaskListServiceImpl implements TaskListService {
countyName = countyMap.get("COUNTYNAME")+"";
typeName = countyMap.get("CARD_TYPE_ID") + "";
typeSum+=Integer.valueOf(countyMap.get("VALID_COUNT") + "");
typeSum-=Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + "");
validCount+=Integer.valueOf(countyMap.get("VALID_COUNT") + "");
invalidCount+=Integer.valueOf(countyMap.get("INVALID_COUNT") + "");
specialCount+=Integer.valueOf(countyMap.get("SPECIAL_CARD_COUNT") + "");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment