Commit 19a4a5b4 authored by suichenguang's avatar suichenguang

搜索框

parent 26271c2f
package com.yxproject.start.api; package com.yxproject.start.api;
import com.yxproject.start.entity.resp.*;
import com.yxproject.start.service.SelectSerialNumberService; import com.yxproject.start.service.SelectSerialNumberService;
import com.yxproject.start.utils.YXJSONResponse; import com.yxproject.start.utils.YXJSONResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -8,7 +7,6 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -8,7 +7,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -28,8 +26,8 @@ public class SelectApi { ...@@ -28,8 +26,8 @@ public class SelectApi {
private SelectSerialNumberService selectSerialNumberService; private SelectSerialNumberService selectSerialNumberService;
@RequestMapping(value = "selectByCard") @RequestMapping(value = "selectByCard")
public String selectByCard(@RequestParam("id") String id, HttpServletResponse resp){ public String selectByCard(@RequestParam("id") String id){
resp.setCharacterEncoding("UTF-8"); // resp.setCharacterEncoding("UTF-8");
List<Map<String, Object>> resultList = new ArrayList<>(); List<Map<String, Object>> resultList = new ArrayList<>();
/*任务单*/ /*任务单*/
Map<String,Object> taskListMap = new HashMap<>(); Map<String,Object> taskListMap = new HashMap<>();
...@@ -38,56 +36,37 @@ public class SelectApi { ...@@ -38,56 +36,37 @@ public class SelectApi {
/*制证库*/ /*制证库*/
Map<String,Object> accreditationMap = new HashMap<>(); Map<String,Object> accreditationMap = new HashMap<>();
Map<String, Object> map = new HashMap<>();
if (id.length() ==11){ if (id.length() ==10){
SelectFromTaskListEntity specialCardInfo4 = selectSerialNumberService.selectByWorkOrderFromYX(id); Map<String,Object> workOrderData = selectSerialNumberService.selectByWorkOrderFromYX(id);
taskListMap.put("workOrderDate",specialCardInfo4); taskListMap.put("workOrderData", workOrderData);
resultList.add(taskListMap); resultList.add(taskListMap);
resultList.add(acceptMap); resultList.add(acceptMap);
resultList.add(accreditationMap); resultList.add(accreditationMap);
}else {
switch (id.length()) { }else if (id.length() ==8){
case 8:
SelectFromTaskListEntity specialCardInfo = selectSerialNumberService.selectByGroupNoFromYX(id); Map<String,Object> workOrderData = selectSerialNumberService.selectByGroupNo(id);
SelectFromProdEntity selectResult = selectSerialNumberService.selectByGroupNoFromProd(id); taskListMap.put("workOrderData", workOrderData);
SelectFromAccEntity specialCardInfo4 = selectSerialNumberService.selectByGroupNoFromAcc(id);
taskListMap.put("yxData",specialCardInfo);
accreditationMap.put("prodData",selectResult);
acceptMap.put("accData",specialCardInfo4);
resultList.add(taskListMap); resultList.add(taskListMap);
resultList.add(accreditationMap);
resultList.add(acceptMap); resultList.add(acceptMap);
break;
case 10:
SelectFromTaskListEntity specialCardInfo2 = selectSerialNumberService.selectByAcceptFromYX(id);
SelectFromProdEntity selectResult2 = selectSerialNumberService.selectByAcceptFromProd(id);
SelectFromAccEntity specialCardInfo5 = selectSerialNumberService.selectByAcceptFromAcc(id);
taskListMap.put("yxData",specialCardInfo2);
accreditationMap.put("prodData",selectResult2);
acceptMap.put("accData",specialCardInfo5);
resultList.add(taskListMap);
resultList.add(accreditationMap); resultList.add(accreditationMap);
resultList.add(acceptMap);
break; }else if (id.length()==11||id.length()==18){
case 18: Map<String,Object> workOrderData =selectSerialNumberService.selectByAcceptNoOrCardIdFromTaskList(id);
Map<String,Object> ACCdata = selectSerialNumberService.selectByAcceptNoOrCardIdFromACC(id);
SelectFromTaskListEntity specialCardInfo3 = selectSerialNumberService.selectByCardIdFromYX(id); Map<String,Object> PRODData = selectSerialNumberService.selectByAcceptNoOrCardIdFromPROD(id);
SelectFromProdEntity selectResult3 = selectSerialNumberService.selectByCardIdFromProd(id); taskListMap.put("workOrderDate", workOrderData);
SelectFromAccEntity specialCardInfo6 = selectSerialNumberService.selectByCardIdFromAcc(id); taskListMap.put("ACCdata", ACCdata);
taskListMap.put("yxData",specialCardInfo3); taskListMap.put("PRODData", PRODData);
accreditationMap.put("prodData",selectResult3);
acceptMap.put("accData",specialCardInfo6);
resultList.add(taskListMap); resultList.add(taskListMap);
resultList.add(accreditationMap);
resultList.add(acceptMap); resultList.add(acceptMap);
resultList.add(accreditationMap);
break; }else {
} return "数据错误";
} }
YXJSONResponse yxjsonResponse = new YXJSONResponse(); YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8"); // resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(resultList); yxjsonResponse.outPutSuccess(resultList);
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
......
package com.yxproject.start.entity.resp;
import javax.xml.crypto.Data;
public class SelectByAcceptedEntity {
private String cardType;
private String library;
private String accept_No;
private String name;
private String sex_No;
private String id_No;
private String birthday;
private String sign_Govt;
private String begin_Date;
private String expire_Date;
private String status_No;
private String taskState;
private String cityName;
private Data lastModifyTime;
public String getCardType() {
return cardType;
}
public void setCardType(String cardType) {
this.cardType = cardType;
}
public String getLibrary() {
return library;
}
public void setLibrary(String library) {
this.library = library;
}
public String getAccept_No() {
return accept_No;
}
public void setAccept_No(String accept_No) {
this.accept_No = accept_No;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex_No() {
return sex_No;
}
public void setSex_No(String sex_No) {
this.sex_No = sex_No;
}
public String getId_No() {
return id_No;
}
public void setId_No(String id_No) {
this.id_No = id_No;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getSign_Govt() {
return sign_Govt;
}
public void setSign_Govt(String sign_Govt) {
this.sign_Govt = sign_Govt;
}
public String getBegin_Date() {
return begin_Date;
}
public void setBegin_Date(String begin_Date) {
this.begin_Date = begin_Date;
}
public String getExpire_Date() {
return expire_Date;
}
public void setExpire_Date(String expire_Date) {
this.expire_Date = expire_Date;
}
public String getStatus_No() {
return status_No;
}
public void setStatus_No(String status_No) {
this.status_No = status_No;
}
public String getTaskState() {
return taskState;
}
public void setTaskState(String taskState) {
this.taskState = taskState;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public Data getLastModifyTime() {
return lastModifyTime;
}
public void setLastModifyTime(Data lastModifyTime) {
this.lastModifyTime = lastModifyTime;
}
}
package com.yxproject.start.entity.resp;
import java.util.Date;
public class SelectByGroupNumEntity {
private String library;
private String cityName;
private String cardType;
private String painterName;
private String taskId;
private String group_No;
private Date submit_Date;
private Date position_Date;
private String quality_People_Name;
private Date out_Storage_Date;
private Date in_Storage_Date;
private String exception_Information;
public String getLibrary() {
return library;
}
public void setLibrary(String library) {
this.library = library;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public String getCardType() {
return cardType;
}
public void setCardType(String cardType) {
this.cardType = cardType;
}
public String getPainterName() {
return painterName;
}
public void setPainterName(String painterName) {
this.painterName = painterName;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getGroup_No() {
return group_No;
}
public void setGroup_No(String group_No) {
this.group_No = group_No;
}
public Date getSubmit_Date() {
return submit_Date;
}
public void setSubmit_Date(Date submit_Date) {
this.submit_Date = submit_Date;
}
public Date getPosition_Date() {
return position_Date;
}
public void setPosition_Date(Date position_Date) {
this.position_Date = position_Date;
}
public String getQuality_People_Name() {
return quality_People_Name;
}
public void setQuality_People_Name(String quality_People_Name) {
this.quality_People_Name = quality_People_Name;
}
public Date getOut_Storage_Date() {
return out_Storage_Date;
}
public void setOut_Storage_Date(Date out_Storage_Date) {
this.out_Storage_Date = out_Storage_Date;
}
public Date getIn_Storage_Date() {
return in_Storage_Date;
}
public void setIn_Storage_Date(Date in_Storage_Date) {
this.in_Storage_Date = in_Storage_Date;
}
public String getException_Information() {
return exception_Information;
}
public void setException_Information(String exception_Information) {
this.exception_Information = exception_Information;
}
}
package com.yxproject.start.entity.resp;
import javax.xml.crypto.Data;
public class SelectByIdcardEntity {
private String cardType;
private String library;
private String accept_No;
private String name;
private String sex_No;
private String id_No;
private String birthday;
private String sign_Govt;
private String begin_Date;
private String expire_Date;
private String status_No;
private String taskState;
private String cityName;
private Data lastModifyTime;
public String getCardType() {
return cardType;
}
public void setCardType(String cardType) {
this.cardType = cardType;
}
public String getLibrary() {
return library;
}
public void setLibrary(String library) {
this.library = library;
}
public String getAccept_No() {
return accept_No;
}
public void setAccept_No(String accept_No) {
this.accept_No = accept_No;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex_No() {
return sex_No;
}
public void setSex_No(String sex_No) {
this.sex_No = sex_No;
}
public String getId_No() {
return id_No;
}
public void setId_No(String id_No) {
this.id_No = id_No;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getSign_Govt() {
return sign_Govt;
}
public void setSign_Govt(String sign_Govt) {
this.sign_Govt = sign_Govt;
}
public String getBegin_Date() {
return begin_Date;
}
public void setBegin_Date(String begin_Date) {
this.begin_Date = begin_Date;
}
public String getExpire_Date() {
return expire_Date;
}
public void setExpire_Date(String expire_Date) {
this.expire_Date = expire_Date;
}
public String getStatus_No() {
return status_No;
}
public void setStatus_No(String status_No) {
this.status_No = status_No;
}
public String getTaskState() {
return taskState;
}
public void setTaskState(String taskState) {
this.taskState = taskState;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public Data getLastModifyTime() {
return lastModifyTime;
}
public void setLastModifyTime(Data lastModifyTime) {
this.lastModifyTime = lastModifyTime;
}
}
\ No newline at end of file
package com.yxproject.start.entity.resp;
import java.util.Date;
public class SelectByWorkOrderEntity {
private String library;
private String cityName;
private String cardType;
private String painterName;
private long task_Id;
private Date submit_Date;
private Date position_Date;
private String quality_People_Name;
private Date out_Storage_Date;
private Date in_Storage_Date;
private String exception_Information;
public String getLibrary() {
return library;
}
public void setLibrary(String library) {
this.library = library;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public String getCardType() {
return cardType;
}
public void setCardType(String cardType) {
this.cardType = cardType;
}
public String getPainterName() {
return painterName;
}
public void setPainterName(String painterName) {
this.painterName = painterName;
}
public long getTask_Id() {
return task_Id;
}
public void setTask_Id(long task_Id) {
this.task_Id = task_Id;
}
public Date getSubmit_Date() {
return submit_Date;
}
public void setSubmit_Date(Date submit_Date) {
this.submit_Date = submit_Date;
}
public Date getPosition_Date() {
return position_Date;
}
public void setPosition_Date(Date position_Date) {
this.position_Date = position_Date;
}
public String getQuality_People_Name() {
return quality_People_Name;
}
public void setQuality_People_Name(String quality_People_Name) {
this.quality_People_Name = quality_People_Name;
}
public Date getOut_Storage_Date() {
return out_Storage_Date;
}
public void setOut_Storage_Date(Date out_Storage_Date) {
this.out_Storage_Date = out_Storage_Date;
}
public Date getIn_Storage_Date() {
return in_Storage_Date;
}
public void setIn_Storage_Date(Date in_Storage_Date) {
this.in_Storage_Date = in_Storage_Date;
}
public String getException_Information() {
return exception_Information;
}
public void setException_Information(String exception_Information) {
this.exception_Information = exception_Information;
}
}
package com.yxproject.start.entity.resp;
public class SelectFromAccEntity {
private String acceptNo;
private String county;
private String name;
private String cardType;
private String cardId;
private String sex;
private String signGovt;
private String beginDate;
private String endDate;
private String policeStation;
private String dataState;
private String time;
public String getAcceptNo() {
return acceptNo;
}
public void setAcceptNo(String acceptNo) {
this.acceptNo = acceptNo;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCardType() {
return cardType;
}
public void setCardType(String cardType) {
this.cardType = cardType;
}
public String getCardId() {
return cardId;
}
public void setCardId(String cardId) {
this.cardId = cardId;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getSignGovt() {
return signGovt;
}
public void setSignGovt(String signGovt) {
this.signGovt = signGovt;
}
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public String getPoliceStation() {
return policeStation;
}
public void setPoliceStation(String policeStation) {
this.policeStation = policeStation;
}
public String getDataState() {
return dataState;
}
public void setDataState(String dataState) {
this.dataState = dataState;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
}
package com.yxproject.start.entity.resp;
public class SelectFromProdEntity {
private String acceptNo;
private String county;
private String name;
private String cardType;
private String cardId;
private String sex;
private String signGovt;
private String beginDate;
private String endDate;
private String policeStation;
private String dataState;
private String time;
public String getAcceptNo() {
return acceptNo;
}
public void setAcceptNo(String acceptNo) {
this.acceptNo = acceptNo;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCardType() {
return cardType;
}
public void setCardType(String cardType) {
this.cardType = cardType;
}
public String getCardId() {
return cardId;
}
public void setCardId(String cardId) {
this.cardId = cardId;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getSignGovt() {
return signGovt;
}
public void setSignGovt(String signGovt) {
this.signGovt = signGovt;
}
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public String getPoliceStation() {
return policeStation;
}
public void setPoliceStation(String policeStation) {
this.policeStation = policeStation;
}
public String getDataState() {
return dataState;
}
public void setDataState(String dataState) {
this.dataState = dataState;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
}
package com.yxproject.start.entity.resp;
import java.util.Date;
/**
* 根据任务单查询结果实体
* 任务单流水号 区县 制证类型 日期 数据核验 膜打印 预定位 分拣 质检 仓库
*/
public class SelectFromTaskListEntity {
private String taskId;
private String county;
private Long cardType;
private Date issuedDate;
private Date dataCheckDate;
private Date printOutDate;
private Date positionDate;
private Date sortOutDate;
private Date qualityTestDate;
private Date outStorageDate;
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public Long getCardType() {
return cardType;
}
public void setCardType(Long cardType) {
this.cardType = cardType;
}
public Date getIssuedDate() {
return issuedDate;
}
public void setIssuedDate(Date issuedDate) {
this.issuedDate = issuedDate;
}
public Date getDataCheckDate() {
return dataCheckDate;
}
public void setDataCheckDate(Date dataCheckDate) {
this.dataCheckDate = dataCheckDate;
}
public Date getPrintOutDate() {
return printOutDate;
}
public void setPrintOutDate(Date printOutDate) {
this.printOutDate = printOutDate;
}
public Date getPositionDate() {
return positionDate;
}
public void setPositionDate(Date positionDate) {
this.positionDate = positionDate;
}
public Date getSortOutDate() {
return sortOutDate;
}
public void setSortOutDate(Date sortOutDate) {
this.sortOutDate = sortOutDate;
}
public Date getQualityTestDate() {
return qualityTestDate;
}
public void setQualityTestDate(Date qualityTestDate) {
this.qualityTestDate = qualityTestDate;
}
public Date getOutStorageDate() {
return outStorageDate;
}
public void setOutStorageDate(Date outStorageDate) {
this.outStorageDate = outStorageDate;
}
}
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.resp.SelectFromAccEntity;
import com.yxproject.start.entity.resp.SelectFromProdEntity;
import com.yxproject.start.entity.resp.SelectFromTaskListEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
...@@ -12,119 +10,53 @@ import java.util.Map; ...@@ -12,119 +10,53 @@ import java.util.Map;
@Mapper @Mapper
public interface SelectSerialNumberMapper { public interface SelectSerialNumberMapper {
@Select("select\n" + @Select("select TASK.TASK_ID,COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,TASK.ISSUED_DATE,TASK.DOWNLOAD_DATE,TASK.PRINT_OUT_DATE,TASK.POSITION_DATE,TASK.SORT_OUT_DATE,TASK.QUALITY_TEST_DATE,TASK.OUT_STORAGE_DATE\n" +
" TASK.TASK_ID,\n" + " from TASK \n" +
" GROUP_NO.GROUP_NO,\n" + " LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE\n" +
" CITY_DIC.CITYNAME,\n" + " LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
" CARD_TYPE_DIC.CARD_TYPE,\n" + " WHERE TASK_ID =#{id}")
" TASK.SUBMIT_DATE,\n" + public Map<String,Object> selectByWorkOrder(String id);
" PRINTER_DIC.PRINTER_NAME,\n" +
" TASK.POSITION_DATE,\n" + @Select("select GROUP_NO.TASK_ID,COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,TASK.ISSUED_DATE,TASK.DOWNLOAD_DATE,TASK.PRINT_OUT_DATE,TASK.POSITION_DATE,TASK.SORT_OUT_DATE,TASK.QUALITY_TEST_DATE,TASK.OUT_STORAGE_DATE\n" +
" TASK.QUALITY_PEOPLE_NAME,\n" + "from TASK\n" +
" TASK.OUT_STORAGE_DATE,\n" + "LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE\n" +
" TASK.IN_STORAGE_DATE,\n" + "LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
" TASK.EXCEPTION_INFORMATION\n" + "LEFT JOIN GROUP_NO ON TASK.TASK_ID=GROUP_NO.TASK_ID\n" +
" from GROUP_NO\n" + "WHERE GROUP_NO =#{id}")
" LEFT JOIN TASK ON (GROUP_NO.TASK_ID =TASK.TASK_ID)\n" + public Map<String,Object> selectByGroupNo(String id);
" LEFT JOIN TASK_STATE_DIC ON (TASK.TASK_STATE_ID = TASK_STATE_DIC.TASK_STATE_ID)\n" +
" LEFT JOIN CITY_DIC ON(TASK.CITYCODE = CITY_DIC.CITYCODE)\n" + @Select("select GROUP_NO.TASK_ID,COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,TASK.ISSUED_DATE,TASK.DOWNLOAD_DATE,TASK.PRINT_OUT_DATE,TASK.POSITION_DATE,TASK.SORT_OUT_DATE,TASK.QUALITY_TEST_DATE,TASK.OUT_STORAGE_DATE\n" +
" LEFT JOIN PRINTER_DIC ON (TASK.PRINTER_ID = PRINTER_DIC.PRINTER_ID)\n" + "from TASK\n" +
" LEFT JOIN CARD_TYPE_DIC ON (TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID)\n" + "LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE\n" +
" where GROUP_NO=#{id}") "LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
public Map<String,Object> selectByGroupNumber(String id); "LEFT JOIN GROUP_NO ON TASK.TASK_ID=GROUP_NO.TASK_ID \n" +
"LEFT JOIN ACC_CARD_T@ACCU_LINK ON subStr(ACC_CARD_T.ACCEPT_NO,0,8)=GROUP_NO.GROUP_NO;\n" +
@Select("SELECT\n" + "LEFT JOIN PREPRO_PERSON ON PREPRO_PERSON.GMSFHM=ACC_CARD_T@ACCU_LINK.ID_NO\n" +
" ACC_CARD_T.ACCEPT_NO,\n" + "WHERE PREPRO_PERSON.GMSFHM =#{id} OR ACC_CARD_T.ACCEPT_NO=#{id}")
" ACC_CARD_T.NAME,\n" + public Map<String,Object>selectByAcceptNoOrCardIdFromTaskList(String id);
" ACC_CARD_T.ID_NO,\n" +
" ACC_CARD_T.SEX_NO,\n" + @Select("SELECT ACC_CARD_T.ACCEPT_NO,COUNTY_DIC.COUNTYNAME,ACC_CARD_T.NAME,CARD_TYPE_DIC.CARD_TYPE,ACC_CARD_T.ID_NO,ACC_CARD_T.SEX_NO,\n" +
" ACC_CARD_T.BIRTHDAY,\n" + "GAJG_DM.GAJG_MC AS GAJG1,ACC_CARD_T.BEGIN_DATE,ACC_CARD_T.EXPIRE_DATE,ACC_CARD_T.SIGN_GOVT\n" +
" CARD_TYPE_DIC.CARD_TYPE,\n" + "FROM ACC_CARD_T@ACCU_LINK\n" +
" ACC_CARD_T.SIGN_GOVT,\n" + "LEFT JOIN COUNTY_DIC ON subStr(ACC_CARD_T.UPLOAD_NO,0,6)=COUNTY_DIC.COUNTY_CODE\n" +
" ACC_CARD_T.BEGIN_DATE,\n" + "LEFT JOIN GROUP_NO ON subStr(ACC_CARD_T.ACCEPT_NO,0,8)=GROUP_NO.GROUP_NO \n" +
" ACC_CARD_T.EXPIRE_DATE,\n" + "LEFT JOIN TASK ON TASK.TASK_ID = GROUP_NO.TASK_ID\n" +
" ACC_CARD_T.STATUS_NO,\n" + "LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
" TASK_STATE_DIC.TASK_STATE,\n" + "LEFT JOIN GAJG_DM ON subStr(ACC_CARD_T.upload_no,0,9)= GAJG_DM.GAJG_DM\n" +
" CITY_DIC.CITYNAME,\n" + "WHERE ACC_CARD_T.ACCEPT_NO =#{id} OR ACC_CARD_T.ID_NO =#{id}")
" decode(TASK.TASK_STATE_ID,2,TASK.submit_date,3,TASK.ISSUED_DATE,4,TASK.OUT_WORKSHOP_DATE,5,TASK.POSITION_DATE) lastModifyTime\n" + public Map<String,Object>selectByAcceptNoOrCardIdFromACC(String id);
" FROM acc_card_t@accu_dblink\n" +
" LEFT JOIN group_no ON (substr(accept_no,0,8) = group_no.GROUP_NO)\n" + @Select("SELECT PROD_CARD_T.ACCEPT_NO,COUNTY_DIC.COUNTYNAME,PROD_CARD_T.NAME,CARD_TYPE_DIC.CARD_TYPE,PROD_CARD_T.ID_NO,PROD_CARD_T.SEX_NO,\n" +
" LEFT JOIN task ON (task.task_id = group_no.TASK_ID)\n" + "GAJG_DM.GAJG_MC AS GAJG1,PROD_CARD_T.BEGIN_DATE,PROD_CARD_T.EXPIRE_DATE,PROD_CARD_T.SIGN_GOVT,\n" +
" LEFT JOIN CITY_DIC ON (TASK.CITYCODE = CITY_DIC.CITYCODE)\n" + "PROD_TRACE_T.PHOTO_DATE,PROD_TRACE_T.EXPORT_DATE,PROD_TRACE_T.DOWNLOAD_DATE,PROD_TRACE_T.ELECTRIC_WRITE_DATE,PROD_TRACE_T.CHECK_DATE,PROD_TRACE_T.MOVE_DATE\n" +
" LEFT JOIN TASK_STATE_DIC ON (TASK.TASK_STATE_ID = TASK_STATE_DIC.TASK_STATE_ID)\n" + "FROM PROD_CARD_T@PROD_LINK\n" +
" LEFT JOIN CARD_TYPE_DIC ON (TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID)\n" + "LEFT JOIN COUNTY_DIC ON subStr(PROD_CARD_T.UPLOAD_NO,0,6)=COUNTY_DIC.COUNTY_CODE\n" +
" where ACCEPT_NO=#{id}") "LEFT JOIN GROUP_NO ON subStr(PROD_CARD_T.ACCEPT_NO,0,8)=GROUP_NO.GROUP_NO \n" +
public Map<String,Object> selectByAccepted(String id); "LEFT JOIN TASK ON TASK.TASK_ID = GROUP_NO.TASK_ID\n" +
"LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID \n" +
@Select("SELECT\n" + "LEFT JOIN GAJG_DM ON subStr(PROD_CARD_T.upload_no,0,9)= GAJG_DM.GAJG_DM\n" +
" ACC_CARD_T.ACCEPT_NO,\n" + "LEFT JOIN PROD_TRACE_T@PROD_LINK ON PROD_TRACE_T.ACCEPT_NO =PROD_CARD_T.ACCEPT_NO\n" +
" ACC_CARD_T.NAME,\n" + "WHERE PROD_CARD_T.ACCEPT_NO ='0231245603' OR PROD_CARD_T.ID_NO ='0231245603';")
" ACC_CARD_T.ID_NO,\n" + public Map<String,Object>selectByAcceptNoOrCardIdFromPROD(String id);
" ACC_CARD_T.SEX_NO,\n" +
" ACC_CARD_T.BIRTHDAY,\n" +
" CARD_TYPE_DIC.CARD_TYPE,\n" +
" ACC_CARD_T.SIGN_GOVT,\n" +
" ACC_CARD_T.BEGIN_DATE,\n" +
" ACC_CARD_T.EXPIRE_DATE,\n" +
" ACC_CARD_T.STATUS_NO,\n" +
" TASK_STATE_DIC.TASK_STATE,\n" +
" CITY_DIC.CITYNAME,\n" +
" decode(TASK.TASK_STATE_ID,2,TASK.submit_date,3,TASK.ISSUED_DATE,4,TASK.OUT_WORKSHOP_DATE,5,TASK.POSITION_DATE) lastModifyTime\n" +
" FROM acc_card_t@accu_dblink\n" +
" LEFT JOIN group_no ON (substr(accept_no,0,8) = group_no.GROUP_NO)\n" +
" LEFT JOIN task ON (task.task_id = group_no.TASK_ID)\n" +
" LEFT JOIN CITY_DIC ON (TASK.CITYCODE = CITY_DIC.CITYCODE)\n" +
" LEFT JOIN TASK_STATE_DIC ON (TASK.TASK_STATE_ID = TASK_STATE_DIC.TASK_STATE_ID)\n" +
" LEFT JOIN CARD_TYPE_DIC ON (TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID)\n" +
" where ID_NO=#{id}")
public Map<String,Object> selectByIdCard(String id);
@Select("select\n" +
" TASK.TASK_ID,\n" +
" CITY_DIC.CITYNAME,\n" +
" CARD_TYPE_DIC.CARD_TYPE,\n" +
" TASK.SUBMIT_DATE,\n" +
" PRINTER_DIC.PRINTER_NAME,\n" +
" TASK.POSITION_DATE,\n" +
" TASK.QUALITY_PEOPLE_NAME,\n" +
" TASK.OUT_STORAGE_DATE,\n" +
" TASK.IN_STORAGE_DATE,\n" +
" TASK.EXCEPTION_INFORMATION\n" +
" from TASK\n" +
" LEFT JOIN TASK_STATE_DIC ON (TASK.TASK_STATE_ID = TASK_STATE_DIC.TASK_STATE_ID)\n" +
" LEFT JOIN CITY_DIC ON (TASK.CITYCODE = CITY_DIC.CITYCODE)\n" +
" LEFT JOIN PRINTER_DIC ON (TASK.PRINTER_ID = PRINTER_DIC.PRINTER_ID)\n" +
" LEFT JOIN CARD_TYPE_DIC ON (TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID)\n" +
" where TASK_ID =#{id}")
public Map<String,Object> selectByWorkOrderNumber(String id);
@Select("")
public Map<String,SelectFromTaskListEntity> selectByWorkOrderFromYX();
@Select("")
public Map<String, SelectFromAccEntity> selectByWorkOrderFromACC();
@Select("")
public Map<String,SelectFromTaskListEntity> selectByAcceptFromYX();
@Select("")
public Map<String,SelectFromAccEntity> selectByAcceptFromAcc();
@Select("")
public Map<String, SelectFromProdEntity>selectByAcceptFromProd();
@Select("")
public Map<String,SelectFromTaskListEntity> selectByGroupNoFromYX();
@Select("")
public Map<String,SelectFromProdEntity> selectByGroupNoFromProd();
@Select("")
public Map<String,SelectFromAccEntity> selectByGroupNoFromAcc();
@Select("")
public Map<String,SelectFromTaskListEntity>selectByCardIdFromYX();
@Select("")
public Map<String,SelectFromAccEntity> selectByCardIdFromAcc();
@Select("")
public Map<String,SelectFromProdEntity> selectByCardIdFromProd();
} }
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.resp.*;
import java.util.Map;
public interface SelectSerialNumberService { public interface SelectSerialNumberService {
/*根据任务单查询辅助库*/ /*根据任务单查询辅助库*/
SelectFromTaskListEntity selectByWorkOrderFromYX(String id); Map<String, Object> selectByWorkOrderFromYX(String id);
/*根据组号查询辅助库*/
/*根据受理号查询*/ Map<String,Object> selectByGroupNo(String id);
SelectFromTaskListEntity selectByAcceptFromYX(String id); /*根据身份证号或受理号查询辅助库*/
SelectFromAccEntity selectByAcceptFromAcc(String id); Map<String,Object>selectByAcceptNoOrCardIdFromTaskList(String id);
SelectFromProdEntity selectByAcceptFromProd(String id); /*根据身份证号或受理号查询受理库*/
Map<String,Object>selectByAcceptNoOrCardIdFromACC(String id);
/*根据组号查询*/ /*根据身份证号或受理号查询制证库*/
SelectFromTaskListEntity selectByGroupNoFromYX(String id); Map<String,Object>selectByAcceptNoOrCardIdFromPROD(String id);
SelectFromProdEntity selectByGroupNoFromProd(String id);
SelectFromAccEntity selectByGroupNoFromAcc(String id);
/*根据身份证号查询*/
SelectFromTaskListEntity selectByCardIdFromYX(String id);
SelectFromAccEntity selectByCardIdFromAcc(String id);
SelectFromProdEntity selectByCardIdFromProd(String id);
} }
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.resp.*;
import com.yxproject.start.mapper.SelectSerialNumberMapper; import com.yxproject.start.mapper.SelectSerialNumberMapper;
import com.yxproject.start.service.SelectSerialNumberService; import com.yxproject.start.service.SelectSerialNumberService;
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 javax.xml.crypto.Data;
import java.util.Date;
import java.util.Map; import java.util.Map;
@Service @Service
public class SelectSerialNumberServiceImpl implements SelectSerialNumberService { public class SelectSerialNumberServiceImpl implements SelectSerialNumberService{
@Autowired @Autowired
public SelectSerialNumberMapper selectSerialNumberMapper; public SelectSerialNumberMapper selectSerialNumberMapper;
@Override @Override
public SelectFromTaskListEntity selectByWorkOrderFromYX(String id) { public Map<String, Object> selectByWorkOrderFromYX(String id){
Map<String,Object> result = selectSerialNumberMapper.selectByWorkOrder(id);
return null; return result;
} }
@Override @Override
public SelectFromTaskListEntity selectByAcceptFromYX(String id) { public Map<String, Object> selectByGroupNo(String id) {
return null; System.out.println("impl");
Map<String,Object> result = selectSerialNumberMapper.selectByGroupNo(id);
System.out.println("查询结果:"+result);
return result;
} }
@Override @Override
public SelectFromAccEntity selectByAcceptFromAcc(String id) { public Map<String, Object> selectByAcceptNoOrCardIdFromTaskList(String id) {
return null; Map<String,Object> result = selectSerialNumberMapper.selectByAcceptNoOrCardIdFromTaskList(id);
return result;
} }
@Override @Override
public SelectFromProdEntity selectByAcceptFromProd(String id) { public Map<String, Object> selectByAcceptNoOrCardIdFromACC(String id) {
return null; Map<String,Object> result = selectSerialNumberMapper.selectByAcceptNoOrCardIdFromACC(id);
if (result.get("sex").equals("1")){
result.put("sex","男");
}else if(result.get("sex").equals("2")){
result.put("sex","女");
}else {
result.put("sex","未知");
} }
return result;
@Override
public SelectFromTaskListEntity selectByGroupNoFromYX(String id) {
return null;
} }
@Override @Override
public SelectFromProdEntity selectByGroupNoFromProd(String id) { public Map<String, Object> selectByAcceptNoOrCardIdFromPROD(String id) {
return null; Map<String,Object> result = selectSerialNumberMapper.selectByAcceptNoOrCardIdFromPROD(id);
} if (result.get("sex").equals("1")){
result.put("sex","男");
}else if(result.get("sex").equals("2")){
result.put("sex","女");
}else {
result.put("sex","未知");
@Override
public SelectFromAccEntity selectByGroupNoFromAcc(String id) {
return null;
} }
Object photoDate=result.get("");
@Override return result;
public SelectFromTaskListEntity selectByCardIdFromYX(String id) {
return null;
} }
@Override
public SelectFromAccEntity selectByCardIdFromAcc(String id) {
return null;
}
@Override
public SelectFromProdEntity selectByCardIdFromProd(String id) {
return null;
}
} }
package com.yxproject.start;
import com.yxproject.start.api.SelectApi;
public class test {
public static void main(String[] args){
SelectApi selectApi = new SelectApi();
selectApi.selectByCard("20190305001");
}
}
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