Commit a1349869 authored by dahai's avatar dahai

添加保存任务单、组号详情信息

添加查询受理库任务单详情信息
parent 3340e6c1
...@@ -98,22 +98,44 @@ public class TaskListApi { ...@@ -98,22 +98,44 @@ public class TaskListApi {
} }
/** /**
* 查询派出所列表详情 * 生成任务单
*
* @param process 工序
* @param date 查询时间 * @param date 查询时间
* @param typeCode 制证类型 * @param groupList 组号列表
* @param countyCode 区县代码 * @param countyList 区县列表 {typeCode:1,countyCode:'123456'}
* @param resp * @param resp
* @return * @return
*/ */
@RequestMapping("queryByPoliceAtACCU") @RequestMapping("createTask")
public List<Object> queryByPoliceAtACCU(@RequestParam("state") String date,@RequestParam("typeCode") String typeCode,@RequestParam("countyCode") String countyCode, HttpServletResponse resp){ public String queryByCountyAtACCU(@RequestParam("process") String process,@RequestParam("date") String date,@RequestParam("groupList") List<String> groupList,@RequestParam("countyList") String countyList, HttpServletResponse resp){
List<Object> objects = taskListService.selectByPoliceAtACCU(date, typeCode, countyCode); // taskListService.selectGrouoAtACCU()
return objects; return null;
} }
// /**
// * 查询派出所列表详情
// * @param date 查询时间
// * @param typeCode 制证类型
// * @param countyCode 区县代码
// * @param resp
// * @return
// */
// @RequestMapping("queryByPoliceAtACCU")
// public List<Object> queryByPoliceAtACCU(@RequestParam("state") String date,@RequestParam("typeCode") String typeCode,@RequestParam("countyCode") String countyCode, HttpServletResponse resp){
// List<Object> objects = taskListService.selectByPoliceAtACCU(date, typeCode, countyCode);
// return objects;
//
// }
/** /**
* 字符串去除空格 * 字符串去除空格
* @param str 原始字符串 * @param str 原始字符串
......
...@@ -2,6 +2,7 @@ package com.yxproject.start.entity; ...@@ -2,6 +2,7 @@ package com.yxproject.start.entity;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Time; import java.sql.Time;
import java.util.Date;
import java.util.Objects; import java.util.Objects;
@Entity @Entity
...@@ -12,30 +13,31 @@ public class TaskEntity { ...@@ -12,30 +13,31 @@ public class TaskEntity {
private Long cardType; private Long cardType;
private Long oldCardType; private Long oldCardType;
private String countyCode; private String countyCode;
private Time submitDate; private Date submitDate;
private String submitName; private String submitName;
private Time issuedDate; private Date issuedDate;
private String issuedName; private String issuedName;
private Time downloadDate; private Date downloadDate;
private String downloadName; private String downloadName;
private Time printOutDate; private Date printOutDate;
private String printOutName; private String printOutName;
private Time positionDate; private Date positionDate;
private String positionName; private String positionName;
private Time outWorkshopDate; private Date outWorkshopDate;
private String outWorkshopName; private String outWorkshopName;
private String qualityTestName; private String qualityTestName;
private Time qualityTestDate; private Date qualityTestDate;
private String exceptionInformation; private String exceptionInformation;
private Time outStorageDate; private Date outStorageDate;
private String outStorageName; private String outStorageName;
private Time inStorageDate; private Date inStorageDate;
private String inStorageName; private String inStorageName;
private Long taskStateId; private Long taskStateId;
private Long isException; private Long isException;
private Long printerId; private Long printerId;
private Long beginPageNumber; private Long beginPageNumber;
private Long finishPageNumber; private Long finishPageNumber;
private Date sortOntDate;
@Id @Id
@Column(name = "TASK_ID") @Column(name = "TASK_ID")
...@@ -79,11 +81,11 @@ public class TaskEntity { ...@@ -79,11 +81,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "SUBMIT_DATE") @Column(name = "SUBMIT_DATE")
public Time getSubmitDate() { public Date getSubmitDate() {
return submitDate; return submitDate;
} }
public void setSubmitDate(Time submitDate) { public void setSubmitDate(Date submitDate) {
this.submitDate = submitDate; this.submitDate = submitDate;
} }
...@@ -99,11 +101,11 @@ public class TaskEntity { ...@@ -99,11 +101,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "ISSUED_DATE") @Column(name = "ISSUED_DATE")
public Time getIssuedDate() { public Date getIssuedDate() {
return issuedDate; return issuedDate;
} }
public void setIssuedDate(Time issuedDate) { public void setIssuedDate(Date issuedDate) {
this.issuedDate = issuedDate; this.issuedDate = issuedDate;
} }
...@@ -119,11 +121,11 @@ public class TaskEntity { ...@@ -119,11 +121,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "DOWNLOAD_DATE") @Column(name = "DOWNLOAD_DATE")
public Time getDownloadDate() { public Date getDownloadDate() {
return downloadDate; return downloadDate;
} }
public void setDownloadDate(Time downloadDate) { public void setDownloadDate(Date downloadDate) {
this.downloadDate = downloadDate; this.downloadDate = downloadDate;
} }
...@@ -139,11 +141,11 @@ public class TaskEntity { ...@@ -139,11 +141,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "PRINT_OUT_DATE") @Column(name = "PRINT_OUT_DATE")
public Time getPrintOutDate() { public Date getPrintOutDate() {
return printOutDate; return printOutDate;
} }
public void setPrintOutDate(Time printOutDate) { public void setPrintOutDate(Date printOutDate) {
this.printOutDate = printOutDate; this.printOutDate = printOutDate;
} }
...@@ -159,11 +161,11 @@ public class TaskEntity { ...@@ -159,11 +161,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "POSITION_DATE") @Column(name = "POSITION_DATE")
public Time getPositionDate() { public Date getPositionDate() {
return positionDate; return positionDate;
} }
public void setPositionDate(Time positionDate) { public void setPositionDate(Date positionDate) {
this.positionDate = positionDate; this.positionDate = positionDate;
} }
...@@ -179,11 +181,11 @@ public class TaskEntity { ...@@ -179,11 +181,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "OUT_WORKSHOP_DATE") @Column(name = "OUT_WORKSHOP_DATE")
public Time getOutWorkshopDate() { public Date getOutWorkshopDate() {
return outWorkshopDate; return outWorkshopDate;
} }
public void setOutWorkshopDate(Time outWorkshopDate) { public void setOutWorkshopDate(Date outWorkshopDate) {
this.outWorkshopDate = outWorkshopDate; this.outWorkshopDate = outWorkshopDate;
} }
...@@ -209,11 +211,11 @@ public class TaskEntity { ...@@ -209,11 +211,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "QUALITY_TEST_DATE") @Column(name = "QUALITY_TEST_DATE")
public Time getQualityTestDate() { public Date getQualityTestDate() {
return qualityTestDate; return qualityTestDate;
} }
public void setQualityTestDate(Time qualityTestDate) { public void setQualityTestDate(Date qualityTestDate) {
this.qualityTestDate = qualityTestDate; this.qualityTestDate = qualityTestDate;
} }
...@@ -229,11 +231,11 @@ public class TaskEntity { ...@@ -229,11 +231,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "OUT_STORAGE_DATE") @Column(name = "OUT_STORAGE_DATE")
public Time getOutStorageDate() { public Date getOutStorageDate() {
return outStorageDate; return outStorageDate;
} }
public void setOutStorageDate(Time outStorageDate) { public void setOutStorageDate(Date outStorageDate) {
this.outStorageDate = outStorageDate; this.outStorageDate = outStorageDate;
} }
...@@ -249,11 +251,11 @@ public class TaskEntity { ...@@ -249,11 +251,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "IN_STORAGE_DATE") @Column(name = "IN_STORAGE_DATE")
public Time getInStorageDate() { public Date getInStorageDate() {
return inStorageDate; return inStorageDate;
} }
public void setInStorageDate(Time inStorageDate) { public void setInStorageDate(Date inStorageDate) {
this.inStorageDate = inStorageDate; this.inStorageDate = inStorageDate;
} }
...@@ -316,6 +318,14 @@ public class TaskEntity { ...@@ -316,6 +318,14 @@ public class TaskEntity {
public void setFinishPageNumber(Long finishPageNumber) { public void setFinishPageNumber(Long finishPageNumber) {
this.finishPageNumber = finishPageNumber; this.finishPageNumber = finishPageNumber;
} }
@Basic
@Column(name = "SORT_OUT_DATE")
public Date getSortOntDate() {
return sortOntDate;
}
public void setSortOntDate(Date sortOntDate) {
this.sortOntDate = sortOntDate;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
...@@ -349,11 +359,12 @@ public class TaskEntity { ...@@ -349,11 +359,12 @@ public class TaskEntity {
Objects.equals(isException, that.isException) && Objects.equals(isException, that.isException) &&
Objects.equals(printerId, that.printerId) && Objects.equals(printerId, that.printerId) &&
Objects.equals(beginPageNumber, that.beginPageNumber) && Objects.equals(beginPageNumber, that.beginPageNumber) &&
Objects.equals(sortOntDate, that.sortOntDate) &&
Objects.equals(finishPageNumber, that.finishPageNumber); Objects.equals(finishPageNumber, that.finishPageNumber);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(taskId, cardType, oldCardType, countyCode, submitDate, submitName, issuedDate, issuedName, downloadDate, downloadName, printOutDate, printOutName, positionDate, positionName, outWorkshopDate, outWorkshopName, qualityTestName, qualityTestDate, exceptionInformation, outStorageDate, outStorageName, inStorageDate, inStorageName, taskStateId, isException, printerId, beginPageNumber, finishPageNumber); return Objects.hash(taskId, cardType, oldCardType, countyCode, submitDate, submitName, issuedDate, issuedName, downloadDate, downloadName, printOutDate, printOutName, positionDate, positionName, outWorkshopDate, outWorkshopName, qualityTestName, qualityTestDate, exceptionInformation, outStorageDate, outStorageName, sortOntDate,inStorageDate, inStorageName, taskStateId, isException, printerId, beginPageNumber, finishPageNumber);
} }
} }
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.GroupNoEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.Update;
...@@ -12,4 +14,13 @@ public interface GroupNoMapper { ...@@ -12,4 +14,13 @@ public interface GroupNoMapper {
*/ */
@Update("UPDATE GROUP_NO SET SPECIAL_CARD_COUNT =SPECIAL_CARD_COUNT+1 WHERE TASK_ID = #{taskId}") @Update("UPDATE GROUP_NO SET SPECIAL_CARD_COUNT =SPECIAL_CARD_COUNT+1 WHERE TASK_ID = #{taskId}")
public boolean createFastCard (@Param("acceptNo")String accept); public boolean createFastCard (@Param("acceptNo")String accept);
/**
* 保存组号列表
* @param groupNoEntity 组号信息
* @return
*/
@Insert("insert into group_no (GROUP_NO,TASK_ID,VALID_COUNT,INVALID_COUNT,SPECIAL_CARD_COUNT) " +
"values(#{groupNo},#{taskId},#{validCount},#{invalidCount},#{specialCardCount})")
public boolean saveGroupNo (GroupNoEntity groupNoEntity);
} }
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.TaskList.CountCountyEntity; import com.yxproject.start.entity.TaskList.CountCountyEntity;
import com.yxproject.start.entity.TaskList.CountGajgEntity; import com.yxproject.start.entity.TaskList.CountGajgEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity; import com.yxproject.start.entity.TaskList.TaskListEntity;
...@@ -29,7 +30,7 @@ public interface TaskListMapper { ...@@ -29,7 +30,7 @@ public interface TaskListMapper {
public List<CountCountyEntity> selectByCounty(@Param("submitDate") String submitDate); public List<CountCountyEntity> selectByCounty(@Param("submitDate") String submitDate);
/** /**
* 循环单查询 * 任务单查询
* 受理库 * 受理库
* @param submitDate * @param submitDate
* @return * @return
...@@ -44,14 +45,44 @@ public interface TaskListMapper { ...@@ -44,14 +45,44 @@ public interface TaskListMapper {
/** /**
* 查询派出所列表 * 查询组号列表
* 受理库 * 受理库
* @param submitDate * @param date 查询时间
* @param countyCount * @param typeCode 制证类型
* @param countyCode 区县代码
* @return
*/
@Select("select DISTINCT CARD_TYPE_DIC.card_type_id, ACC_GROUP_T.group_no ,ACC_GROUP_T.valid_count,ACC_GROUP_T.invalid_count, county_dic.county_code\n" +
"from ACC_CARD_T@ACCU_LINK \n" +
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH = acc_card_t.upload_no \n" +
"left join ACC_GROUP_T@ACCU_LINK on substr(acc_card_t.accept_no,0,8) = ACC_GROUP_T.group_no\n" +
"left join CARD_TYPE_DIC on PREPRO_PERSON.card_type_id = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"left join county_dic on substr(PREPRO_PERSON.JMSFZSLH,0,6)= county_dic.COUNTY_CODE\n" +
"where county_dic.COUNTY_CODE is not null and ACC_GROUP_T.deal_flag =3 and to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')= #{date}\n" +
"and PREPRO_PERSON.card_type_id =#{typeCode} and substr(PREPRO_PERSON.JMSFZSLH,0,6) =#{countyCode}")
public List<Map<String,Object>> selectGrouoAtACCU(@Param("date") String date,@Param("typeCode") String typeCode,@Param("countyCode") String countyCode);
/**
* 生成任务单
* @param taskEntity 任务单
* @return
*/
@Insert("insert into task (CARD_TYPE,COUNTY_CODE,SUBMIT_DATE,SUBMIT_NAME) values(#{cardType},#{countyCode},#{submitDate},#{submitName})")
@Options(useGeneratedKeys=true, keyProperty="taskId", keyColumn="TASK_ID")
public boolean saveTask(TaskEntity taskEntity);
/**
* 循环单查询
* 辅助库
* @param date 查询时间
* @param process 工序
* @return * @return
*/ */
@Select("") @Select("")
public List<CountGajgEntity> selectByGajg(@Param("submitDate") String submitDate,@Param("countyCode") String countyCount); public List<Map<String,Object>> selectByCountyAtAuxiliary(@Param("date") String date,@Param("process") String process);
/** /**
......
package com.yxproject.start.service;
import com.yxproject.start.entity.GroupNoEntity;
/**
* @auther zhangyusheng
* 2019/3/6 21:12
*/
public interface GroupNoService {
public boolean saveGroupNo(GroupNoEntity groupNoEntity);
}
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.TaskList.CountCountyEntity; import com.yxproject.start.entity.TaskList.CountCountyEntity;
import com.yxproject.start.entity.TaskList.CountGajgEntity; import com.yxproject.start.entity.TaskList.CountGajgEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity; import com.yxproject.start.entity.TaskList.TaskListEntity;
...@@ -21,5 +22,7 @@ public interface TaskListService { ...@@ -21,5 +22,7 @@ public interface TaskListService {
public List<Object> selectByCountyAtACCU(String date); public List<Object> selectByCountyAtACCU(String date);
public List<Object> selectByPoliceAtACCU(String date,String typeCode,String countyCode); public List<Object> selectGrouoAtACCU(String date,String typeCode,String countyCode);
public boolean saveTask(TaskEntity taskEntity);
} }
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.service.GroupNoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @auther zhangyusheng
* 2019/3/6 21:12
*/
@Service
public class GroupNoServiceImpl implements GroupNoService {
@Autowired
private GroupNoMapper groupNoMapper;
/**
* 保存组号详情
* @param groupNoEntity
* @return
*/
@Override
public boolean saveGroupNo(GroupNoEntity groupNoEntity) {
return groupNoMapper.saveGroupNo(groupNoEntity);
}
}
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.TaskList.CountCountyEntity; import com.yxproject.start.entity.TaskList.CountCountyEntity;
import com.yxproject.start.entity.TaskList.CountGajgEntity; import com.yxproject.start.entity.TaskList.CountGajgEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity; import com.yxproject.start.entity.TaskList.TaskListEntity;
...@@ -28,8 +29,9 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -28,8 +29,9 @@ public class TaskListServiceImpl implements TaskListService {
@Override @Override
public List<CountGajgEntity> selectByGajg(String submitDate, String countyCode) { public List<CountGajgEntity> selectByGajg(String submitDate, String countyCode) {
List <CountGajgEntity> resultList= taskListMapper.selectByGajg(submitDate,countyCode); // List <CountGajgEntity> resultList= taskListMapper.selectByGajg(submitDate,countyCode);
return resultList; // return resultList;
return null;
} }
@Override @Override
...@@ -50,6 +52,12 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -50,6 +52,12 @@ public class TaskListServiceImpl implements TaskListService {
return true; return true;
} }
/**
* 查询任务单详情
* 受理库
* @param date
* @return
*/
@Override @Override
public List<Object> selectByCountyAtACCU(String date) { public List<Object> selectByCountyAtACCU(String date) {
List<Map<String, Object>> maps = taskListMapper.selectByCountyAtACCU(date); List<Map<String, Object>> maps = taskListMapper.selectByCountyAtACCU(date);
...@@ -125,7 +133,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -125,7 +133,7 @@ public class TaskListServiceImpl implements TaskListService {
} }
countyMap.put("groupNum",createGroupNo(c, nsList)); countyMap.put("groupNum",createGroupNo(c, nsList));
} }
countyMap.remove("groupList"); // countyMap.remove("groupList");
typeList.add(countyMap); typeList.add(countyMap);
} }
typeMapList.put("typeName",type); typeMapList.put("typeName",type);
...@@ -137,12 +145,28 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -137,12 +145,28 @@ public class TaskListServiceImpl implements TaskListService {
return list; return list;
} }
/**
* 查询组号信息
* 受理库
* @param date
* @param typeCode
* @param countyCode
* @return
*/
@Override @Override
public List<Object> selectByPoliceAtACCU(String date,String typeCode,String countyCode) { public List selectGrouoAtACCU(String date,String typeCode,String countyCode) {
// taskListMapper.; return taskListMapper.selectGrouoAtACCU(date,typeCode,countyCode);
return null;
} }
/**
* 保存任务单详情
* @param taskEntity
* @return
*/
@Override
public boolean saveTask(TaskEntity taskEntity) {
return taskListMapper.saveTask(taskEntity);
}
private String createGroupNo(List<Integer> c, List<Integer> nsList) { private String createGroupNo(List<Integer> c, List<Integer> nsList) {
try { try {
......
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