Commit 970805ae authored by liboyang's avatar liboyang

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

parents 69868142 901a6f17
......@@ -124,8 +124,8 @@ public class MaterialManagementApi {
* 查询未审核卡体详情
*/
@RequestMapping("selectCardBody")
public List<CardBodyEntity> selectCardBody(){
return materialManagementService.selectCardBody();
public List<CardBodyEntity> selectCardBody(@Param("date")String date){
return materialManagementService.selectCardBody(replaceDate(date));
}
......
......@@ -2,6 +2,7 @@ package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
/**
......@@ -12,13 +13,14 @@ import java.util.Objects;
@Table(name = "CARD_BODY", schema = "YINGXIN", catalog = "")
public class CardBodyEntity {
private long cardBodyId;
private Time saveDate;
private Date saveDate;
private Long cardType;
private Long totalCount;
private String note;
private Long cardBodyType;
private String name;
private long state;
private Date checkDate;
@Id
@Column(name = "CARD_BODY_ID")
......@@ -32,11 +34,11 @@ public class CardBodyEntity {
@Basic
@Column(name = "SAVE_DATE")
public Time getSaveDate() {
public Date getSaveDate() {
return saveDate;
}
public void setSaveDate(Time saveDate) {
public void setSaveDate(Date saveDate) {
this.saveDate = saveDate;
}
......@@ -108,6 +110,7 @@ public class CardBodyEntity {
return cardBodyId == that.cardBodyId &&
state == that.state &&
Objects.equals(saveDate, that.saveDate) &&
Objects.equals(checkDate, that.checkDate) &&
Objects.equals(cardType, that.cardType) &&
Objects.equals(totalCount, that.totalCount) &&
Objects.equals(note, that.note) &&
......@@ -117,6 +120,16 @@ public class CardBodyEntity {
@Override
public int hashCode() {
return Objects.hash(cardBodyId, saveDate, cardType, totalCount, note, cardBodyType, name, state);
return Objects.hash(cardBodyId, saveDate, checkDate,cardType, totalCount, note, cardBodyType, name, state);
}
@Basic
@Column(name = "CHECK_DATE")
public Date getCheckDate() {
return checkDate;
}
public void setCheckDate(Date checkDate) {
this.checkDate = checkDate;
}
}
......@@ -106,13 +106,15 @@ public interface MaterialManagementMapper {
"</script>")
public String selectCardCount2(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name);
@Select("select * from card_body where state = 0")
public List<CardBodyEntity> selectCardBodyByState();
@Select("select * from card_body where state = 0\n" +
"UNION all \n" +
"select * from card_body where to_char(CHECK_DATE,'yyyyMMdd') = #{date}")
public List<CardBodyEntity> selectCardBodyByState(String date);
@Select("select * from Plastic_Film where state = 0")
public List<PlasticFilmEntity> selectPlasticFilmByState();
@Update("update card_body set state =1 where CARD_BODY_ID = #{id}")
@Update("update card_body set state =1, check_date = sysdate where CARD_BODY_ID = #{id}")
public boolean updateCardBodyState(long id);
@Update("update PLASTIC_FILM set state =1 where PLASTIC_FILM_ID = #{id}")
......
......@@ -27,7 +27,7 @@ public interface MaterialManagementService {
public boolean updateCardBodyState(long id);
public List<CardBodyEntity> selectCardBody();
public List<CardBodyEntity> selectCardBody(String date);
public boolean updatePlasticFilm(long id);
......
......@@ -71,8 +71,8 @@ public class MaterialManagementServiceImpl implements MaterialManagementService
}
@Override
public List<CardBodyEntity> selectCardBody() {
return materialManagementMapper.selectCardBodyByState();
public List<CardBodyEntity> selectCardBody(String date) {
return materialManagementMapper.selectCardBodyByState(date);
}
@Override
......
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