Commit 815a5744 authored by liboyang's avatar liboyang

Merge remote-tracking branch 'origin/dev' into dev

parents ed89356f 247ca55a
...@@ -78,13 +78,14 @@ public class TaskListApi { ...@@ -78,13 +78,14 @@ public class TaskListApi {
/** /**
* 更改任务单状态 * 更改任务单状态
* (用于任务单下发) * (用于任务单下发)
* @param taskId * @param taskId 任务单ID
* @param name 下发人姓名
* @param process 下发人所在工序
* @return * @return
*/ */
@RequestMapping("updateState") @RequestMapping("updateState")
public boolean updateState(@RequestParam String taskId){ public boolean updateState(@RequestParam("taskId") String taskId,@RequestParam("process") String process,@RequestParam("name")String name){
taskListService.updateState(taskId); return taskListService.updateState(taskId,process,name);
return true;
} }
/** /**
...@@ -129,7 +130,6 @@ public class TaskListApi { ...@@ -129,7 +130,6 @@ public class TaskListApi {
public List<Object> queryByCountyAtAuxiliary(@RequestParam("process") String process, HttpServletResponse resp){ public List<Object> queryByCountyAtAuxiliary(@RequestParam("process") String process, HttpServletResponse resp){
List<Object> objects = taskListService.selectByCountyAtAuxiliary(process); List<Object> objects = taskListService.selectByCountyAtAuxiliary(process);
return objects; return objects;
} }
......
...@@ -2,42 +2,52 @@ package com.yxproject.start.entity; ...@@ -2,42 +2,52 @@ 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;
/**
* @auther zhangyusheng
* 2019/3/8 16:18
*/
@Entity @Entity
@Table(name = "TASK", schema = "YINGXIN", catalog = "") @Table(name = "TASK", schema = "YINGXIN", catalog = "")
public class TaskEntity { public class TaskEntity {
private long taskId; private long taskId;
private Long cardType; private Long cardType;
private Long oldCardType; private Long oldCardType;
private String countyCode; private String countyCode;
private Date submitDate; private Time submitDate;
private String submitName; private String submitName;
private Date issuedDate; private Time issuedDate;
private String issuedName; private String issuedName;
private Date downloadDate; private Time downloadDate;
private String downloadName; private String downloadName;
private Date printOutDate; private Time printOutDate;
private String printOutName; private String printOutName;
private Date positionDate; private Time positionDate;
private String positionName; private String positionName;
private Date outWorkshopDate; private Time outWorkshopDate;
private String outWorkshopName; private String outWorkshopName;
private String qualityTestName; private String qualityTestName;
private Date qualityTestDate; private Time qualityTestDate;
private String exceptionInformation; private String exceptionInformation;
private Date outStorageDate; private Time outStorageDate;
private String outStorageName; private String outStorageName;
private Date inStorageDate; private Time 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; private Time sortOutDate;
private Time concoraCrushDate;
private String concoraCrushName;
private Time punchingDate;
private String punchingName;
private Time sortingDate;
private String sortingName;
private Time connectDate;
private String connectName;
@Id @Id
@Column(name = "TASK_ID") @Column(name = "TASK_ID")
...@@ -81,11 +91,11 @@ public class TaskEntity { ...@@ -81,11 +91,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "SUBMIT_DATE") @Column(name = "SUBMIT_DATE")
public Date getSubmitDate() { public Time getSubmitDate() {
return submitDate; return submitDate;
} }
public void setSubmitDate(Date submitDate) { public void setSubmitDate(Time submitDate) {
this.submitDate = submitDate; this.submitDate = submitDate;
} }
...@@ -101,11 +111,11 @@ public class TaskEntity { ...@@ -101,11 +111,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "ISSUED_DATE") @Column(name = "ISSUED_DATE")
public Date getIssuedDate() { public Time getIssuedDate() {
return issuedDate; return issuedDate;
} }
public void setIssuedDate(Date issuedDate) { public void setIssuedDate(Time issuedDate) {
this.issuedDate = issuedDate; this.issuedDate = issuedDate;
} }
...@@ -121,11 +131,11 @@ public class TaskEntity { ...@@ -121,11 +131,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "DOWNLOAD_DATE") @Column(name = "DOWNLOAD_DATE")
public Date getDownloadDate() { public Time getDownloadDate() {
return downloadDate; return downloadDate;
} }
public void setDownloadDate(Date downloadDate) { public void setDownloadDate(Time downloadDate) {
this.downloadDate = downloadDate; this.downloadDate = downloadDate;
} }
...@@ -141,11 +151,11 @@ public class TaskEntity { ...@@ -141,11 +151,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "PRINT_OUT_DATE") @Column(name = "PRINT_OUT_DATE")
public Date getPrintOutDate() { public Time getPrintOutDate() {
return printOutDate; return printOutDate;
} }
public void setPrintOutDate(Date printOutDate) { public void setPrintOutDate(Time printOutDate) {
this.printOutDate = printOutDate; this.printOutDate = printOutDate;
} }
...@@ -161,11 +171,11 @@ public class TaskEntity { ...@@ -161,11 +171,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "POSITION_DATE") @Column(name = "POSITION_DATE")
public Date getPositionDate() { public Time getPositionDate() {
return positionDate; return positionDate;
} }
public void setPositionDate(Date positionDate) { public void setPositionDate(Time positionDate) {
this.positionDate = positionDate; this.positionDate = positionDate;
} }
...@@ -181,11 +191,11 @@ public class TaskEntity { ...@@ -181,11 +191,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "OUT_WORKSHOP_DATE") @Column(name = "OUT_WORKSHOP_DATE")
public Date getOutWorkshopDate() { public Time getOutWorkshopDate() {
return outWorkshopDate; return outWorkshopDate;
} }
public void setOutWorkshopDate(Date outWorkshopDate) { public void setOutWorkshopDate(Time outWorkshopDate) {
this.outWorkshopDate = outWorkshopDate; this.outWorkshopDate = outWorkshopDate;
} }
...@@ -211,11 +221,11 @@ public class TaskEntity { ...@@ -211,11 +221,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "QUALITY_TEST_DATE") @Column(name = "QUALITY_TEST_DATE")
public Date getQualityTestDate() { public Time getQualityTestDate() {
return qualityTestDate; return qualityTestDate;
} }
public void setQualityTestDate(Date qualityTestDate) { public void setQualityTestDate(Time qualityTestDate) {
this.qualityTestDate = qualityTestDate; this.qualityTestDate = qualityTestDate;
} }
...@@ -231,11 +241,11 @@ public class TaskEntity { ...@@ -231,11 +241,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "OUT_STORAGE_DATE") @Column(name = "OUT_STORAGE_DATE")
public Date getOutStorageDate() { public Time getOutStorageDate() {
return outStorageDate; return outStorageDate;
} }
public void setOutStorageDate(Date outStorageDate) { public void setOutStorageDate(Time outStorageDate) {
this.outStorageDate = outStorageDate; this.outStorageDate = outStorageDate;
} }
...@@ -251,11 +261,11 @@ public class TaskEntity { ...@@ -251,11 +261,11 @@ public class TaskEntity {
@Basic @Basic
@Column(name = "IN_STORAGE_DATE") @Column(name = "IN_STORAGE_DATE")
public Date getInStorageDate() { public Time getInStorageDate() {
return inStorageDate; return inStorageDate;
} }
public void setInStorageDate(Date inStorageDate) { public void setInStorageDate(Time inStorageDate) {
this.inStorageDate = inStorageDate; this.inStorageDate = inStorageDate;
} }
...@@ -318,13 +328,95 @@ public class TaskEntity { ...@@ -318,13 +328,95 @@ public class TaskEntity {
public void setFinishPageNumber(Long finishPageNumber) { public void setFinishPageNumber(Long finishPageNumber) {
this.finishPageNumber = finishPageNumber; this.finishPageNumber = finishPageNumber;
} }
@Basic @Basic
@Column(name = "SORT_OUT_DATE") @Column(name = "SORT_OUT_DATE")
public Date getSortOntDate() { public Time getSortOutDate() {
return sortOntDate; return sortOutDate;
}
public void setSortOutDate(Time sortOutDate) {
this.sortOutDate = sortOutDate;
}
@Basic
@Column(name = "CONCORA_CRUSH_DATE")
public Time getConcoraCrushDate() {
return concoraCrushDate;
}
public void setConcoraCrushDate(Time concoraCrushDate) {
this.concoraCrushDate = concoraCrushDate;
}
@Basic
@Column(name = "CONCORA_CRUSH_NAME")
public String getConcoraCrushName() {
return concoraCrushName;
}
public void setConcoraCrushName(String concoraCrushName) {
this.concoraCrushName = concoraCrushName;
}
@Basic
@Column(name = "PUNCHING_DATE")
public Time getPunchingDate() {
return punchingDate;
}
public void setPunchingDate(Time punchingDate) {
this.punchingDate = punchingDate;
}
@Basic
@Column(name = "PUNCHING_NAME")
public String getPunchingName() {
return punchingName;
} }
public void setSortOntDate(Date sortOntDate) {
this.sortOntDate = sortOntDate; public void setPunchingName(String punchingName) {
this.punchingName = punchingName;
}
@Basic
@Column(name = "SORTING_DATE")
public Time getSortingDate() {
return sortingDate;
}
public void setSortingDate(Time sortingDate) {
this.sortingDate = sortingDate;
}
@Basic
@Column(name = "SORTING_NAME")
public String getSortingName() {
return sortingName;
}
public void setSortingName(String sortingName) {
this.sortingName = sortingName;
}
@Basic
@Column(name = "CONNECT_DATE")
public Time getConnectDate() {
return connectDate;
}
public void setConnectDate(Time connectDate) {
this.connectDate = connectDate;
}
@Basic
@Column(name = "CONNECT_NAME")
public String getConnectName() {
return connectName;
}
public void setConnectName(String connectName) {
this.connectName = connectName;
} }
@Override @Override
...@@ -359,12 +451,20 @@ public class TaskEntity { ...@@ -359,12 +451,20 @@ 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); Objects.equals(sortOutDate, that.sortOutDate) &&
Objects.equals(concoraCrushDate, that.concoraCrushDate) &&
Objects.equals(concoraCrushName, that.concoraCrushName) &&
Objects.equals(punchingDate, that.punchingDate) &&
Objects.equals(punchingName, that.punchingName) &&
Objects.equals(sortingDate, that.sortingDate) &&
Objects.equals(sortingName, that.sortingName) &&
Objects.equals(connectDate, that.connectDate) &&
Objects.equals(connectName, that.connectName);
} }
@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, sortOntDate,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, inStorageDate, inStorageName, taskStateId, isException, printerId, beginPageNumber, finishPageNumber, sortOutDate, concoraCrushDate, concoraCrushName, punchingDate, punchingName, sortingDate, sortingName, connectDate, connectName);
} }
} }
...@@ -2,7 +2,6 @@ package com.yxproject.start.mapper; ...@@ -2,7 +2,6 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.TaskEntity; 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.TaskListEntity; import com.yxproject.start.entity.TaskList.TaskListEntity;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
...@@ -198,22 +197,75 @@ public interface TaskListMapper { ...@@ -198,22 +197,75 @@ public interface TaskListMapper {
public List<TaskListEntity> selectACCU(@Param("submitDate") String submitDate,@Param("countyCode") String countyCode,@Param("Gajg_dm") String Gajg); public List<TaskListEntity> selectACCU(@Param("submitDate") String submitDate,@Param("countyCode") String countyCode,@Param("Gajg_dm") String Gajg);
// /** /**
// * 生成任务单 *更改任务单状态
// * @param taskListEntityMap * 下发
// * @return * @param taskId
// */ * @return
// @Insert("INSERT INTO TASK (CARD_TYPE,OLD_CARD_TYPE,COUNTY_CODE,TASK_STATE_ID)VALUES(1,1,#{countyCode},0)") */
// public boolean createTaskList(List<TaskListEntity> taskListEntityMap); //todo 编写上传工序SQL
@Update("UPDATE TASK SET TASK_STATE_ID=#{process},ISSUED_NAME=#{name} WHERE TASK_ID = #{taskId} ")
public boolean updateState1(@Param("taskId") String taskId,@Param("process") String process,@Param("name") String name);
/**
*更改任务单状态
* 膜打印
* @param taskId
* @return
*/
//todo 编写上传工序SQL
@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);
/**
*更改任务单状态
* 预订位
* @param taskId
* @return
*/
//todo 编写上传工序SQL
@Update("UPDATE TASK SET TASK_STATE_ID=#{process},POSITION_NAME=#{name} WHERE TASK_ID = #{taskId} ")
public boolean updateState3(@Param("taskId") String taskId,@Param("process") String process,@Param("name") String name);
/**
*更改任务单状态
* 平压
* @param taskId
* @return
*/
//todo 编写上传工序SQL
@Update("UPDATE TASK SET TASK_STATE_ID=#{process},CONCORA_CRUSH_NAME=#{name} WHERE TASK_ID = #{taskId} ")
public boolean updateState4(@Param("taskId") String taskId,@Param("process") String process,@Param("name") String name);
/**
*更改任务单状态
* 冲切
* @param taskId
* @return
*/
//todo 编写上传工序SQL
@Update("UPDATE TASK SET TASK_STATE_ID=#{process},PUNCHING_NAME=#{name} WHERE TASK_ID = #{taskId} ")
public boolean updateState5(@Param("taskId") String taskId,@Param("process") String process,@Param("name") String name);
/**
*更改任务单状态
* 分拣
* @param taskId
* @return
*/
//todo 编写上传工序SQL
@Update("UPDATE TASK SET TASK_STATE_ID=#{process},SORTING_NAME=#{name} WHERE TASK_ID = #{taskId} ")
public boolean updateState6(@Param("taskId") String taskId,@Param("process") String process,@Param("name") String name);
/** /**
*更改任务单状态 *更改任务单状态
* 交接
* @param taskId * @param taskId
* @return * @return
*/ */
//todo 更改状态 //todo 编写上传工序SQL
@Update("UPDATE TASK SET TASK_STATE_ID=1 WHERE TASK_ID = #{taskId} ") @Update("UPDATE TASK SET TASK_STATE_ID=#{process},CONNECT_NAME=#{name} WHERE TASK_ID = #{taskId} ")
public boolean updateState(@Param("taskId") String taskId,@Param("process") String process,@Param("name") String name); public boolean updateState7(@Param("taskId") String taskId,@Param("process") String process,@Param("name") String name);
} }
...@@ -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); public boolean updateState(String taskId,String process,String name);
public List<Object> selectByCountyAtACCU(String date); public List<Object> selectByCountyAtACCU(String date);
......
...@@ -52,8 +52,32 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -52,8 +52,32 @@ public class TaskListServiceImpl implements TaskListService {
} }
@Override @Override
public boolean updateState(String taskId) { public boolean updateState(String taskId,String process,String name) {
// taskListMapper.updateState(taskId); switch (process){
case "1":
taskListMapper.updateState1(taskId,process,name);
break;
case "2":
taskListMapper.updateState2(taskId,process,name);
break;
case "3":
taskListMapper.updateState3(taskId,process,name);
break;
case "4":
taskListMapper.updateState4(taskId,process,name);
break;
case "5":
taskListMapper.updateState5(taskId,process,name);
break;
case "6":
taskListMapper.updateState6(taskId,process,name);
break;
case "7":
taskListMapper.updateState7(taskId,process,name);
break;
default:
break;
}
return true; return true;
} }
...@@ -312,19 +336,19 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -312,19 +336,19 @@ public class TaskListServiceImpl implements TaskListService {
typeMap.put(o.get("CARD_TYPE")+"",mapList); typeMap.put(o.get("CARD_TYPE")+"",mapList);
} }
} }
//将已按制证分好的Map 再次细化分为区县Map //将已按制证分好的Map 再次细化分为任务单Map
for (String type:typeMap.keySet()){ for (String type:typeMap.keySet()){
List<Map<String,Object>> mapList = (List<Map<String,Object>>)typeMap.get(type); List<Map<String,Object>> mapList = (List<Map<String,Object>>)typeMap.get(type);
Map<String,Object> typemap = new LinkedHashMap<>(); Map<String,Object> typemap = new LinkedHashMap<>();
for (Map<String,Object> o:mapList){ for (Map<String,Object> o:mapList){
if (typemap!=null&&typemap.containsKey(o.get("COUNTY_CODE")+"")){ if (typemap!=null&&typemap.containsKey(o.get("TASK_ID")+"")){
List<Map<String,Object>> maplist_county= (List<Map<String,Object>>)typemap.get(o.get("COUNTY_CODE")); List<Map<String,Object>> maplist_county= (List<Map<String,Object>>)typemap.get(o.get("TASK_ID"));
maplist_county.add(o); maplist_county.add(o);
typemap.put(o.get("COUNTY_CODE")+"",maplist_county); typemap.put(o.get("TASK_ID")+"",maplist_county);
}else { }else {
List<Map<String,Object>> maplist_county = new ArrayList<>(); List<Map<String,Object>> maplist_county = new ArrayList<>();
maplist_county.add(o); maplist_county.add(o);
typemap.put(o.get("COUNTY_CODE")+"",maplist_county); typemap.put(o.get("TASK_ID")+"",maplist_county);
} }
} }
typeMap.put(type,typemap); typeMap.put(type,typemap);
...@@ -336,17 +360,19 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -336,17 +360,19 @@ public class TaskListServiceImpl implements TaskListService {
String typeName=null; String typeName=null;
List<Map<String,Object>> countyList = new ArrayList<>(); List<Map<String,Object>> countyList = new ArrayList<>();
Map<String,List<Map<String, Object>>> mapList = (Map<String,List<Map<String, Object>>>)typeMap.get(type); Map<String,List<Map<String, Object>>> mapList = (Map<String,List<Map<String, Object>>>)typeMap.get(type);
for (String county:mapList.keySet()){ for (String taskId:mapList.keySet()){
Map<String,Object> countyMapGroup= new LinkedHashMap<>(); Map<String,Object> countyMapGroup= new LinkedHashMap<>();
int validCount =0; int validCount =0;
int invalidCount =0; int invalidCount =0;
int specialCount=0; int specialCount=0;
int faileCount=0; int faileCount=0;
String countyName =null; String countyName =null;
String countyCode =null;
Object submitDate = null; Object submitDate = null;
List<Map<String, Object>> countyMapList = mapList.get(county); List<Map<String, Object>> countyMapList = mapList.get(taskId);
for (Map<String,Object> countyMap:countyMapList){ for (Map<String,Object> countyMap:countyMapList){
submitDate = countyMap.get("SUBMIT_DATE"); submitDate = countyMap.get("SUBMIT_DATE");
countyCode = countyMap.get("COUNTY_CODE")+"";
countyName = countyMap.get("COUNTYNAME")+""; countyName = countyMap.get("COUNTYNAME")+"";
typeName = countyMap.get("CARD_TYPE_ID") + ""; typeName = countyMap.get("CARD_TYPE_ID") + "";
typeSum+=Integer.valueOf(countyMap.get("VALID_COUNT") + ""); typeSum+=Integer.valueOf(countyMap.get("VALID_COUNT") + "");
...@@ -378,7 +404,8 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -378,7 +404,8 @@ public class TaskListServiceImpl implements TaskListService {
} }
countyMapGroup.put("faileCount",faileCount); countyMapGroup.put("faileCount",faileCount);
countyMapGroup.put("specialCount",specialCount); countyMapGroup.put("specialCount",specialCount);
countyMapGroup.put("countyCode",county); countyMapGroup.put("countyCode",countyCode);
countyMapGroup.put("taskId",taskId);
countyMapGroup.put("groupList",countyMapList); countyMapGroup.put("groupList",countyMapList);
countyMapGroup.put("saveDate",submitDate); countyMapGroup.put("saveDate",submitDate);
countyMapGroup.put("countyName",countyName); countyMapGroup.put("countyName",countyName);
......
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