Commit b981eef2 authored by yff's avatar yff

提交修改

parent c1cf1588
......@@ -24,7 +24,7 @@ public interface GpfkcxDao extends BaseDao {
public List<Gpfkjg> queryGpfk(Date date,String[] gxbzs);
public List<Gpfkjg> queryGpfkForFirstJY(Date date,String[] gxbzs);
public List<Gpfk> queryGpfkForFirstJY(Date date,String[] gxbzs);
public Gpfkjg queryWeekGpfk(Date date,String woid);
......
......@@ -150,7 +150,7 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
}
@Override
public List<Gpfkjg> queryGpfkForFirstJY(Date date,String[] gxbzs) {
public List<Gpfk> queryGpfkForFirstJY(Date date,String[] gxbzs) {
SqlMap sqlMap = new SqlMap();
sqlMap.append(" select c.WOGYLX_BZGXID, b.GPFK_WOSNID, b.GPFK_FKLX, b.GPFK_FKGX, ");
sqlMap.append(" b.GPFK_FKSJ, b.GPFK_FKR, b.GPFK_FKRID, b.GPFK_FKBX, ");
......@@ -161,17 +161,18 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap.append(" select MIN(d.GPFK_FKSJ) as fksj,e.WOGYLX_BZGXID,e.WOGYLX_ID,d.GPFK_WOSNID ");
sqlMap.append(" FROM GPFK d left join WOGYLX e ");
sqlMap.append(" on e.WOGYLX_ID = d.GPFK_FKGX ");
sqlMap.append(" where 1=1 ");
sqlMap.append(" and ").append("e.WOGYLX_BZGXID", gxbzs);
sqlMap.append(" and ( d.GPFK_FKSJ >= :pKsrq and d.GPFK_FKSJ < :pJsrq ) ");
sqlMap.append(" GROUP BY e.WOGYLX_BZGXID,e.WOGYLX_ID,d.GPFK_WOSNID ");
sqlMap.append(" HAVING 1=1 ");
sqlMap.append(" and ").append("e.WOGYLX_BZGXID", gxbzs);
sqlMap.append(" and ( fksj >= :pKsrq and fksj < :pJsrq ) ");
sqlMap.append(" ) a ");
sqlMap.append(" on b.GPFK_WOSNID =a.GPFK_WOSNID and b.GPFK_FKSJ= a.fksj ");
sqlMap.append(" where 1=1 ");
sqlMap.append(" and c.WOGYLX_BZGXID = a.WOGYLX_BZGXID and c.wogylx_id = a.wogylx_id ");
sqlMap.setParamValue("pKsrq", DateUtils.beginOfDay(date));
sqlMap.setParamValue("pJsrq", DateUtils.endOfDay(date));
return sqlMap.query(Gpfkjg.class);
return sqlMap.query(Gpfk.class);
}
@Override
......
......@@ -10,6 +10,7 @@ import com.gavel.common.utils.NumberUtils;
import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.dao.GpfkcxDao;
import com.gavel.kwell.dao.KmesBoardDao;
import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.persistent.Gpfkjg;
import com.gavel.kwell.service.KmesBoardService;
import com.gavel.kwell.utils.DateCalculateUtil;
......@@ -172,12 +173,12 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
String[] gxbzs = gxbz.split(",");
for(Date date : dateList){
GpfkHgVO gpfkHgVO = new GpfkHgVO();
List<Gpfkjg> gpfks = gpfkcxDao.queryGpfkForFirstJY(date,gxbzs);
List<Gpfk> gpfks = gpfkcxDao.queryGpfkForFirstJY(date,gxbzs);
Double fksl =0.0;
Double hgsl =0.0;
if(CollectionUtils.isNotEmpty(gpfks)){
fksl = gpfks.stream().mapToDouble(Gpfkjg::getFksl).sum();
hgsl = gpfks.stream().mapToDouble(Gpfkjg::getHgsl).sum();
fksl = gpfks.stream().mapToDouble(Gpfk::getFksl).sum();
hgsl = gpfks.stream().mapToDouble(Gpfk::getHgsl).sum();
gpfkHgVO.setFksl(fksl);
gpfkHgVO.setHgsl(hgsl);
}else {
......
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