package com.thhy.mobile.modules.biz.checkhistory.service.impl; import com.thhy.mobile.modules.biz.checkhistory.entity.*; import com.thhy.mobile.modules.biz.checkhistory.service.CheckHistoryService; import com.thhy.mobile.modules.biz.pipeinfo.entity.PipeCheckHistoryListVo; import com.thhy.mobile.modules.biz.pipeinfo.entity.PipeInfo; import com.thhy.mobile.modules.biz.pipeinfo.mapper.PipeInfoMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.HashMap; import java.util.List; import java.util.Map; @Service public class CheckHistoryServiceImpl implements CheckHistoryService { @Autowired private PipeInfoMapper pipeInfoMapper; @Override public List pipeCheckHistory(CheckHisDto checkHisDto) { return pipeInfoMapper.checkHistoryList(checkHisDto); } @Override public Map history(CheckHisDto checkHisDto) { Map map = new HashMap<>(); PipeInfo pipeInfo = pipeInfoMapper.queryByPipeNum(checkHisDto.getPipeNum()); SteelInfoVo steelInfoVo = pipeInfoMapper.hisSteelInfo(pipeInfo.getProduceNumber()); List mixStationList = pipeInfoMapper.leastMixStation(); WaterCulInfoVo waterCulInfoVo = pipeInfoMapper.queryWaterByRingNum(pipeInfo.getRingNum()); List steelVo = pipeInfoMapper.querySteelByPRSB(pipeInfo); map.put("steelInfo",steelInfoVo); //钢筋信息 map.put("mixInfos",mixStationList); //搅拌站信息 map.put("steel",steelVo); //钢筋过程信息 map.put("waterExist",false); map.put("repoExist",false); map.put("outExist",false); if(waterCulInfoVo!=null){ map.put("waterExist",true); map.put("waterCulInfo",waterCulInfoVo); } int repoCount = pipeInfoMapper.RepoRecordCountByPipeNum(checkHisDto.getPipeNum()); if(repoCount>0){ map.put("repoExist",true); RepoInfoVo repoInfoVo = pipeInfoMapper.RepoRecordByPipeNum(checkHisDto.getPipeNum()); map.put("repoInfo",repoInfoVo); if(repoInfoVo.getOutRepo()==1){ //出库 map.put("outExist",true); OutInfoVo outInfoVo = pipeInfoMapper.PipeOutInfo(pipeInfo.getPipeId()); map.put("outInfo",outInfoVo); } } return map; } }