| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.Gas; |
| | | import com.ld.igds.models.InteStatusLog; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | import com.ld.igds.sh.service.impl.HApiShServiceImpl; |
| | | import com.ld.igds.sh.util.ApiShConst; |
| | | import com.ld.igds.sh.util.ApiShUtil; |
| | | import com.ld.igds.sh.util.RespCodeEnum; |
| | | import com.ld.igds.sh.util.RespUtil; |
| | | import com.ld.igds.util.ContextUtil; |
| | |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1408); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -100); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询气体信息 |
| | | List<Gas> dataList = hApiShServiceImpl.listGas(companyId, |
| | | param.getDepotId(), startTime, param.getEndTime()); |
| | | param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | dto = new Dto1408(); |
| | | dto.setQtndjcdh(data.getBatchId()); |
| | | dto.setJcsj(DateFormatUtils.format(data.getReceiveDate(), "yyyy-MM-dd HH:mm:ss")); |
| | | dto.setHwdm(data.getDepotId()); |
| | | dto.setHwdm(ApiShUtil.getGbDepotId(data.getDepotId()) + "01"); |
| | | dto.setYqhlzjh(getPointByType(data.getPoints(), 2)); |
| | | dto.setLhqndzjh(getPointByType(data.getPoints(), 3)); |
| | | |