| | |
| | | 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.m.InoutManageUtil; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.models.InoutPlan; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | | import com.ld.igds.sh.dto.Dto1501; |
| | | import com.ld.igds.sh.param.ApiRequest; |
| | |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 轮换计划信息数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1501); |
| | | 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<InoutPlan> dataList = hApiShServiceImpl.listPlan(companyId, |
| | | InoutManageUtil.PLAN_TYPE_3, startTime, param.getEndTime()); |
| | | InoutManageUtil.PLAN_TYPE_3, param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if(dataList == null || dataList.isEmpty()){ |