|  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.ld.igds.constant.RedisConst; | 
|---|
|  |  |  | import com.ld.igds.log.service.InteStatusLogService; | 
|---|
|  |  |  | import com.ld.igds.models.InoutVarietyChange; | 
|---|
|  |  |  | import com.ld.igds.models.InteStatusLog; | 
|---|
|  |  |  | import com.ld.igds.models.MVarietyChange; | 
|---|
|  |  |  | import com.ld.igds.sh.dto.ApiResponse; | 
|---|
|  |  |  | import com.ld.igds.sh.dto.Dto1312; | 
|---|
|  |  |  | import com.ld.igds.sh.param.ApiRequest; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.ld.igds.sh.util.RespUtil; | 
|---|
|  |  |  | import com.ld.igds.util.ContextUtil; | 
|---|
|  |  |  | import com.ld.igds.util.RedisUtil; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.apache.commons.lang3.time.DateFormatUtils; | 
|---|
|  |  |  | import org.apache.commons.lang3.time.DateUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | redisUtil.set(key, param.getEndTime()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //查询温湿度信息,即粮情信息 | 
|---|
|  |  |  | List<MVarietyChange> dataList = hApiShServiceImpl.listFoodVarietyChange(companyId, | 
|---|
|  |  |  | List<InoutVarietyChange> dataList = hApiShServiceImpl.listFoodVarietyChange(companyId, | 
|---|
|  |  |  | param.getDepotId(), startTime, param.getEndTime()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //响应数据为空则直接返回响应码2000 | 
|---|
|  |  |  | 
|---|
|  |  |  | InteStatusLog log; | 
|---|
|  |  |  | InteStatusLog addLog; | 
|---|
|  |  |  | //封装数据信息 | 
|---|
|  |  |  | for (MVarietyChange variety : dataList) { | 
|---|
|  |  |  | for (InoutVarietyChange variety : dataList) { | 
|---|
|  |  |  | dto1312 = new Dto1312(); | 
|---|
|  |  |  | dto1312.setXzzbdbh(variety.getId()); | 
|---|
|  |  |  | dto1312.setHwbm(variety.getDepotId()); | 
|---|