Commit 0e3fac99 authored by zhoumaotao's avatar zhoumaotao

代码调整

parent f1d7e94a
...@@ -122,10 +122,11 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao { ...@@ -122,10 +122,11 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap.append(" GPFK_LFSL,WOGYLX_GXBZ "); sqlMap.append(" GPFK_LFSL,WOGYLX_GXBZ ");
sqlMap.append("from GPFK "); sqlMap.append("from GPFK ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX "); sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX ");
sqlMap.append("where (GPFK_FKSJ >= :pStart and GPFK_FKSJ < :pEnd) and WOGYLX_GXBZ = :pGxbz ");//[a,b) sqlMap.append("where (GPFK_FKSJ >= :pStart and GPFK_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) ");//[a,b)
sqlMap.setParamValue("pStart", start); sqlMap.setParamValue("pStart", start);
sqlMap.setParamValue("pEnd", end); sqlMap.setParamValue("pEnd", end);
sqlMap.setParamValue("pGxbz", GxlxGxbzEnum.LAST.getId()); sqlMap.setParamValue("pDGxbz", GxlxGxbzEnum.ONLY.getId());
sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId());
return sqlMap.query(Gpfk.class); return sqlMap.query(Gpfk.class);
} }
......
...@@ -76,7 +76,7 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao { ...@@ -76,7 +76,7 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
sqlMap.append("where 1=1 and GPFK_CJSJ = (select max(GPFK_CJSJ) "); sqlMap.append("where 1=1 and GPFK_CJSJ = (select max(GPFK_CJSJ) ");
sqlMap.append(" from GPFK "); sqlMap.append(" from GPFK ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX "); sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX ");
sqlMap.append(" where WOGYLX_GXBZ = :pGxbz "); sqlMap.append(" where (WOGYLX_GXBZ = :pGxbz ");
sqlMap.setParamValue("pGxbz", GxlxGxbzEnum.FIRST.getId()); sqlMap.setParamValue("pGxbz", GxlxGxbzEnum.FIRST.getId());
sqlMap.append(" ) "); sqlMap.append(" ) ");
return sqlMap.queryEntity(UWoVO.class); return sqlMap.queryEntity(UWoVO.class);
......
...@@ -129,9 +129,6 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -129,9 +129,6 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
gpfkHgVO.setFkrq(date); gpfkHgVO.setFkrq(date);
gpfkHgVO.setFksl(fksl); gpfkHgVO.setFksl(fksl);
gpfkHgVO.setHgsl(hgsl); gpfkHgVO.setHgsl(hgsl);
if(!NumberUtils.isZero(fksl)){
gpfkHgVO.setHgl(NumberUtils.round(hgsl/fksl,2)*100);
}
gpfkHgVOList.add(gpfkHgVO); gpfkHgVOList.add(gpfkHgVO);
} }
return gpfkHgVOList; return gpfkHgVOList;
......
package com.gavel.kwell.service.impl; package com.gavel.kwell.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.base.entity.BaseEntity; import com.gavel.common.base.entity.BaseEntity;
import com.gavel.common.base.service.impl.BaseEditServiceImpl; import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.common.utils.NumberUtils;
import com.gavel.common.utils.RedisConnection; import com.gavel.common.utils.RedisConnection;
import com.gavel.common.utils.StringUtils; import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.dao.UpointDao; import com.gavel.kwell.dao.UpointDao;
...@@ -21,10 +19,8 @@ import org.springframework.stereotype.Service; ...@@ -21,10 +19,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service("upointService") @Service("upointService")
...@@ -79,7 +75,7 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ ...@@ -79,7 +75,7 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ
@Override @Override
public List<DataPointItem> queryringpoint() { public List<DataPointItem> queryringpoint() {
try { /* try {
List<Upoint> ponitList = upointDao.queryList(PointTypeEnum.RIGN.getId()); List<Upoint> ponitList = upointDao.queryList(PointTypeEnum.RIGN.getId());
if(ponitList==null || ponitList.size()==0){ if(ponitList==null || ponitList.size()==0){
logger.error("点位信息未配置,请检查!"); logger.error("点位信息未配置,请检查!");
...@@ -122,7 +118,18 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ ...@@ -122,7 +118,18 @@ public class UpointServiceImpl extends BaseEditServiceImpl implements UpointServ
} catch (Exception e) { } catch (Exception e) {
logger.error("数据点采集出错!", e); logger.error("数据点采集出错!", e);
} }
return Collections.EMPTY_LIST; return Collections.EMPTY_LIST;*/
List<DataPointItem> dataPointItems = new ArrayList<DataPointItem>();
dataPointItems.add(new DataPointItem("R1",new Date().getTime(),1,"R1",0));
dataPointItems.add(new DataPointItem("R2",new Date().getTime(),1,"R2",0));
dataPointItems.add(new DataPointItem("R3",new Date().getTime(),1,"R3",0));
dataPointItems.add(new DataPointItem("R4",new Date().getTime(),1,"R4",1));
dataPointItems.add(new DataPointItem("R5",new Date().getTime(),1,"R5",1));
dataPointItems.add(new DataPointItem("R6",new Date().getTime(),1,"R6",1));
dataPointItems.add(new DataPointItem("R7",new Date().getTime(),1,"R7",-1));
dataPointItems.add(new DataPointItem("R8",new Date().getTime(),1,"R8",-1));
return dataPointItems;
} }
} }
...@@ -36,6 +36,13 @@ public class DataPointItem implements Serializable { ...@@ -36,6 +36,13 @@ public class DataPointItem implements Serializable {
this.value = value; this.value = value;
} }
public DataPointItem(String itemId, long timestamp, Integer quality, String name, Object value) {
this.itemId = itemId;
this.timestamp = timestamp;
this.quality = quality;
this.name = name;
this.value = value;
}
public String getItemId() { public String getItemId() {
return itemId; return itemId;
......
...@@ -13,9 +13,6 @@ public class GpfkHgVO extends BaseEntity { ...@@ -13,9 +13,6 @@ public class GpfkHgVO extends BaseEntity {
private Double hgsl;//合格数量 private Double hgsl;//合格数量
private Double hgl;//合格率
public Date getFkrq() { public Date getFkrq() {
return fkrq; return fkrq;
} }
...@@ -40,11 +37,4 @@ public class GpfkHgVO extends BaseEntity { ...@@ -40,11 +37,4 @@ public class GpfkHgVO extends BaseEntity {
this.hgsl = hgsl; this.hgsl = hgsl;
} }
public Double getHgl() {
return hgl;
}
public void setHgl(Double hgl) {
this.hgl = hgl;
}
} }
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