Commit c9bf7319 authored by dahai's avatar dahai

push

parent 7948f25b
......@@ -45,30 +45,6 @@ public class MaterialManagementApi {
return result;
}
// /**
// * 查询耗材统计数据
// * @param beginDate
// * @param endDate
// * @return
// */
// @RequestMapping("selectMaterialManagement")
// public Map<String,Object> selectMaterialManagement(@Param("beginDate")String beginDate,@Param("endDate")String endDate,@Param("typeCode")String typeCode,@Param("name")String name){
// Map<String,Object> resultMap = new HashMap<>();
// List<CardBodyEntity> cardBodyEntities = materialManagementService.selectCardBody(replaceDate(beginDate),replaceDate(endDate));
// List<PlasticFilmEntity> plasticFilmEntities = materialManagementService.selectFilm(replaceDate(beginDate),replaceDate(endDate));
// String cardCount1 = materialManagementService.selectCardCount1(beginDate,endDate);
// String cardCount2 = materialManagementService.selectCardCount2(beginDate,endDate);
// String plasticFilmCount1=materialManagementService.selectFilmCount1(beginDate,endDate);
// String plasticFilmCount2=materialManagementService.selectFilmCount2(beginDate,endDate);
// resultMap.put("cardBody",cardBodyEntities);
// resultMap.put("cardCount1",cardCount1);
// resultMap.put("cardCount2",cardCount2);
// resultMap.put("plasticFilm",plasticFilmEntities);
// resultMap.put("plasticFilmCount1",plasticFilmCount1);
// resultMap.put("plasticFilmCount2",plasticFilmCount2);
// return resultMap;
//
// }
/**
* 查询卡机统计数据
......@@ -145,8 +121,8 @@ public class MaterialManagementApi {
* 查询未审核膜详情
*/
@RequestMapping("selectPlasticFilm")
public List<PlasticFilmEntity> selectPlasticFilm(){
return materialManagementService.selectPlasticFilm();
public List<PlasticFilmEntity> selectPlasticFilm(@Param("date")String date){
return materialManagementService.selectPlasticFilm(replaceDate(date));
}
......
......@@ -2,22 +2,24 @@ package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/4/28 15:12
* 2019/5/7 11:41
*/
@Entity
@Table(name = "PLASTIC_FILM", schema = "YINGXIN", catalog = "")
public class PlasticFilmEntity {
private long plasticFilmId;
private Time saveDate;
private Date saveDate;
private Long totalCount;
private Long plasticFilmType;
private String note;
private String name;
private long state;
private Date checkDate;
@Id
@Column(name = "PLASTIC_FILM_ID")
......@@ -31,11 +33,11 @@ public class PlasticFilmEntity {
@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;
}
......@@ -89,6 +91,16 @@ public class PlasticFilmEntity {
this.state = state;
}
@Basic
@Column(name = "CHECK_DATE")
public Date getCheckDate() {
return checkDate;
}
public void setCheckDate(Date checkDate) {
this.checkDate = checkDate;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
......@@ -100,11 +112,12 @@ public class PlasticFilmEntity {
Objects.equals(totalCount, that.totalCount) &&
Objects.equals(plasticFilmType, that.plasticFilmType) &&
Objects.equals(note, that.note) &&
Objects.equals(name, that.name);
Objects.equals(name, that.name) &&
Objects.equals(checkDate, that.checkDate);
}
@Override
public int hashCode() {
return Objects.hash(plasticFilmId, saveDate, totalCount, plasticFilmType, note, name, state);
return Objects.hash(plasticFilmId, saveDate, totalCount, plasticFilmType, note, name, state, checkDate);
}
}
......@@ -111,8 +111,10 @@ public interface MaterialManagementMapper {
"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();
@Select("select * from Plastic_Film where state = 0 \n" +
"UNION all \n" +
"select * from Plastic_Film where to_char(CHECK_DATE,'yyyyMMdd') = #{date}")
public List<PlasticFilmEntity> selectPlasticFilmByState(String date);
@Update("update card_body set state =1, check_date = sysdate where CARD_BODY_ID = #{id}")
public boolean updateCardBodyState(long id);
......
......@@ -31,7 +31,7 @@ public interface MaterialManagementService {
public boolean updatePlasticFilm(long id);
public List<PlasticFilmEntity> selectPlasticFilm();
public List<PlasticFilmEntity> selectPlasticFilm(String date);
public Map<String,Object> selectCardBodyReport(String beginDate, String endDate, String typeCode, String name, String cardBodyType,long start,long end);
......
......@@ -81,8 +81,8 @@ public class MaterialManagementServiceImpl implements MaterialManagementService
}
@Override
public List<PlasticFilmEntity> selectPlasticFilm() {
return materialManagementMapper.selectPlasticFilmByState();
public List<PlasticFilmEntity> selectPlasticFilm(String date) {
return materialManagementMapper.selectPlasticFilmByState(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