Commit e6c856f0 authored by Administrator's avatar Administrator

查询简单证件信息,查询废证类型

parent 9bee2c92
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created by Administrator on 2018/12/26.
*/
@Entity
@Table(name = "PROD_CARD", schema = "DAHAI")
public class ProdCardEntity {
private String idNo;
private String name;
private String acceptNo;
private long specialType;
@Id
@Column(name = "idNo", nullable = false, precision = 0)
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo;
}
@Basic
@Column(name = "name", nullable = false, precision = 0)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Basic
@Column(name = "acceptNo", nullable = false, precision = 0)
public String getAcceptNo() {
return acceptNo;
}
public void setAcceptNo(String acceptNo) {
this.acceptNo = acceptNo;
}
@Basic
@Column(name = "specialType", nullable = false, precision = 0)
public long getSpecialType() {
return specialType;
}
public void setSpecialType(long specialType) {
this.specialType = specialType;
}
@Override
public boolean equals(Object o) {
if(this == o) return true;
if(o == null || getClass() != o.getClass()) return false;
ProdCardEntity that=(ProdCardEntity) o;
return Objects.equals(idNo, that.idNo) &&
Objects.equals(name, that.name) &&
Objects.equals(acceptNo, that.acceptNo) &&
Objects.equals(specialType, that.specialType);
}
@Override
public int hashCode() {
return Objects.hash(idNo, name, acceptNo, specialType);
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.FailedTypeEntity;
import com.yxproject.start.entity.ProdCardEntity;
import com.yxproject.start.entity.SpecialCardEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -20,6 +21,6 @@ public interface SpecialCardMapper {
public List <SpecialCardEntity> findSpecialCardList( String groupNo);
public List <SpecialCardEntity> addTuiZheng(String acceptNumber);
public List<SpecialCardEntity> addRemainingCard(String accept_Number);
public List<Map<String,Object>> getProdCard ( @Param("idNo")String idNo, @Param("acceptNo") String acceptNo);
public List<ProdCardEntity> getProdCard ( String idNo);
public List<FailedTypeEntity> getFailedType();
}
package com.yxproject.start.service;
import com.yxproject.start.entity.ProdCardEntity;
import java.util.List;
import java.util.Map;
/**
* Created by Administrator on 2018/12/26.
*/
public interface ProdCardService {
public List<ProdCardEntity> getProdCard ( List idNo);
}
......@@ -28,7 +28,6 @@ public interface TaskService {
public int addExceptionState(String taskId, String exceptionInformation);
public List<Map<String,Object>> getProdCard (String idNo,String acceptNo);
// public int updateStorageDate(String taskListId,String inStorageCount,String outStorageCount);
......
......@@ -434,15 +434,6 @@ public class TaskServiceImpl implements TaskService {
return i;
}
/**
* 查询废证
* @return
*/
@Override
public List<Map<String,Object>> getProdCard (String idNo,String acceptNo){
List<Map<String,Object>> getProdCard = specialCardMapper.getProdCard(idNo,acceptNo);
return getProdCard;
}
/**
* 测试查询
......
......@@ -42,10 +42,10 @@
INSERT INTO SPECIAL_CARD (ACCEPT_NO, TASK_ID, SPECIAL_TYPE,GROUP_NO) VALUES (#{accept_Number},(SELECT TASK_ID FROM GROUP_NO WHERE GROUP_NO.GROUP_NO=SUBSTR(#{accept_Number},1,8)),0,SUBSTR(#{accept_Number},1,8))
</select>
<select id="getProdCard" resultType="java.util.HashMap" parameterType="String">
SELECT NAME,ID_NO,PROD_CARD_T.ACCEPT_NO,SPECIAL_TYPE FROM (select ACCEPT_NO,NAME,ID_NO from prod_card_t@prod_link) PROD_CARD_T
<select id="getProdCard" resultType="com.yxproject.start.entity.ProdCardEntity" parameterType="String">
SELECT NAME,ID_NO AS idNo,PROD_CARD_T.ACCEPT_NO AS acceptNo,SPECIAL_TYPE AS specialType FROM (select ACCEPT_NO,NAME,ID_NO from prod_card_t@prod_link) PROD_CARD_T
LEFT JOIN (select ACCEPT_NO,SPECIAL_TYPE from SPECIAL_CARD)SPECIAL_CARD ON SPECIAL_CARD.ACCEPT_NO = PROD_CARD_T.ACCEPT_NO
WHERE PROD_CARD_T.ID_NO =#{idNo} OR PROD_CARD_T.ACCEPT_NO =#{acceptNo}
WHERE PROD_CARD_T.ID_NO =#{idNo} OR PROD_CARD_T.ACCEPT_NO =#{idNo}
</select>
<select id="getFailedType" resultType="com.yxproject.start.entity.FailedTypeEntity">
......
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