Commit 3db27fa9 authored by 李苏's avatar 李苏 💬

Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes

parents 790bffde 0e083c72
......@@ -21,5 +21,5 @@ public interface GpfkcxDao extends BaseDao {
public List<Gpfk> queryByBetween(Date start, Date end);
public List<Gpfk> queryGpfk(Date date);
public List<Gpfk> queryGpfk(Date date,String[] gxbzs);
}
......@@ -132,7 +132,7 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
}
@Override
public List<Gpfk> queryGpfk(Date date) {
public List<Gpfk> queryGpfk(Date date,String[] gxbzs) {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKGX, ");
sqlMap.append(" GPFK_FKSJ,GPFK_FKR,GPFK_FKRID, GPFK_FKBX, GPFK_FKJSSJ,");
......@@ -140,10 +140,10 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap.append(" GPFK_LFSL,WOGYLX_GXBZ ");
sqlMap.append("from GPFK ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX ");
sqlMap.append("where (GPFK_FKSJ >= :pKsrq and GPFK_FKSJ < :pJsrq) and WOGYLX_GXBZ = :pGxbz ");//[a,b)
sqlMap.append("where ( GPFK_FKSJ >= :pKsrq and GPFK_FKSJ < :pJsrq ) ");
sqlMap.append(" and ").append("WOGYLX_GXBZ", gxbzs);
sqlMap.setParamValue("pKsrq", DateUtils.beginOfDay(date));
sqlMap.setParamValue("pJsrq", DateUtils.endOfDay(date));
sqlMap.setParamValue("pGxbz", GxlxGxbzEnum.FIRST.getId());
return sqlMap.query(Gpfk.class);
}
}
......
......@@ -129,9 +129,11 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
Date endDate = DateUtils.calcDate(DateUtils.getDate(),0,0,-1,0,0,0);
List<Date> dateList = DateCalculateUtil.findDates("D", beginDate, endDate);
List<GpfkHgVO> gpfkHgVOList = new ArrayList<>();
String gxbz = commonService.getStringOptionValue(KwellParamEnum.DASHBOARD_HGL.getId());
String[] gxbzs = gxbz.split(",");
for(Date date : dateList){
GpfkHgVO gpfkHgVO = new GpfkHgVO();
List<Gpfk> gpfks = gpfkcxDao.queryGpfk(date);
List<Gpfk> gpfks = gpfkcxDao.queryGpfk(date,gxbzs);
Double fksl = gpfks.stream().mapToDouble(Gpfk::getFksl).sum();
Double hgsl = gpfks.stream().mapToDouble(Gpfk::getHgsl).sum();
gpfkHgVO.setFkrq(date);
......
......@@ -9,7 +9,8 @@ import java.util.List;
@GavelParams("901000000")
public enum KwellParamEnum {
DASHBORAD_PDF("PDF", "配置大屏看板PDF文件路径", "B", "配置大屏看板PDF文件路径", "S", "", "D:\\projectinfo\\kwell-mes\\gavel\\src\\main\\resources\\static\\pdf\\dashboard.pdf", ""),
DASHBOARD_HGL("KWELL001","合格率按生产工序标志设置", "B", "合格率按生产工序标志设置", "E", "S:首工序;Z:中间工序;M:末工序;D:单道工序", "S", "首工序"),
DASHBORAD_PDF("PDF","配置大屏看板PDF文件路径", "B", "配置大屏看板PDF文件路径", "S", "", "D:\\projectinfo\\kwell-mes\\gavel\\src\\main\\resources\\static\\pdf\\dashboard.pdf", ""),
DASHBORAD_VIDEO("VIDEO","配置大屏看板视频路径" ,"B","配置大屏看板视频路径","S","","D:\\projectinfo\\kwell-mes\\gavel\\src\\main\\resources\\static\\video\\dashboard.mp4","");
private String id; // 参数ID
......
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