Commit 62730b26 authored by 黄自鹏's avatar 黄自鹏

调整bug

parent 96ea8cd2
......@@ -145,13 +145,13 @@ public class KmesBoardController extends BaseController {
FileInputStream fileInputStream = kmesBoardService.getVideo();
kmesBoardService.doAttachmentPreview(response, fileInputStream);
}
@RequestMapping(value = "/querySafeDays", method = RequestMethod.POST)
@ResponseBody
public Object querySafeDays(@RequestBody JSONObject param) {
return buildReturnData(kmesBoardService.querySafeDays());
}
@RequestMapping(value = "/queryCurProZtsl", method = RequestMethod.POST)
@ResponseBody
public Object queryCurProZtsl(@RequestBody JSONObject param) {
......
......@@ -125,8 +125,8 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap.append("from GPFKJG ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFKJG_FKGX ");
sqlMap.append("where (GPFKJG_FKSJ >= :pStart and GPFKJG_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) ");//[a,b)
sqlMap.setParamValue("pStart", start);
sqlMap.setParamValue("pEnd", end);
sqlMap.setParamValue("pStart", DateUtils.beginOfDay(start));
sqlMap.setParamValue("pEnd", DateUtils.endOfDay(end));
sqlMap.setParamValue("pDGxbz", GxlxGxbzEnum.ONLY.getId());
sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId());
return sqlMap.query(Gpfkjg.class);
......@@ -152,7 +152,7 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
@Override
public Gpfkjg queryWeekGpfk(Date date,String woid) {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select sum(GPFKJG_FKSL) as GPFK_FKSL ");
sqlMap.append("select sum(GPFKJG_FKSL) as GPFKJG_FKSL ");
sqlMap.append("from GPFKJG ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFKJG_FKGX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
......
......@@ -12,7 +12,6 @@ import com.gavel.kwell.service.KmesBoardService;
import com.gavel.kwell.utils.DateCalculateUtil;
import com.gavel.kwell.utils.KwellParamEnum;
import com.gavel.kwell.vo.*;
import com.gavel.wo.persistent.Pcjhmx;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -40,7 +39,7 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
@Autowired
private GpfkcxDao gpfkcxDao;
@Autowired
private CommonService commonService;
......@@ -96,25 +95,22 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
@Override
public List<PcslVO> queryWeekPcsl() {
Date beginDate = DateUtils.calcDate(DateUtils.getDate(),0,0,-7,0,0,0);
Date endDate = DateUtils.calcDate(DateUtils.getDate(),0,0,-1,0,0,0);
Date beginDate = DateUtils.calcDate(DateUtils.getDate(),0,0,-6,0,0,0);
Date endDate = DateUtils.calcDate(DateUtils.getDate(),0,0,0,0,0,0);
List<Date> dateList = DateCalculateUtil.findDates("D", beginDate, endDate);
List<PcslVO> pcslVOList = new ArrayList<>();
for(Date date : dateList){
PcslVO pcslVO = new PcslVO();
Pcjhmx pcjhmx = kmesBoardDao.queryWeekPcsl(date);
List<Gpfkjg> gpfks = queryByBetween(date,date);
double wgsl =0.0;
double hgsl =0.0;
if(gpfks != null && gpfks.size()>0){
wgsl = gpfks.stream().mapToDouble(Gpfkjg::getFksl).sum();//每一天
}
if(pcjhmx != null){
pcslVO.setJhsl(pcjhmx.getJhsl()==null?0.0:pcjhmx.getJhsl());
}else {
pcslVO.setJhsl(0.0);
hgsl = gpfks.stream().mapToDouble(Gpfkjg::getHgsl).sum();//每一天
}
pcslVO.setPcrq(date);
pcslVO.setWgsl(wgsl);
pcslVO.setJhsl(wgsl);//完工数量
pcslVO.setWgsl(hgsl);//合格数量
pcslVOList.add(pcslVO);
}
return pcslVOList;
......@@ -172,8 +168,8 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
public List<GpfkHgVO> queryGpfkHgl() {
//首到工序的工票反馈最近7天合格率
Date beginDate = DateUtils.calcDate(DateUtils.getDate(),0,0,-7,0,0,0);
Date endDate = DateUtils.calcDate(DateUtils.getDate(),0,0,-1,0,0,0);
Date beginDate = DateUtils.calcDate(DateUtils.getDate(),0,0,-6,0,0,0);
Date endDate = DateUtils.calcDate(DateUtils.getDate(),0,0,0,0,0,0);
List<Date> dateList = DateCalculateUtil.findDates("D", beginDate, endDate);
List<GpfkHgVO> gpfkHgVOList = new ArrayList<>();
String gxbz = commonService.getStringOptionValue(KwellParamEnum.DASHBOARD_HGL.getId());
......
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