| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.bstek.bdf2.core.model.DefaultDept; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.models.InoutContract; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | | import com.ld.igds.sh.dto.Dto1504; |
| | | import com.ld.igds.sh.param.ApiRequest; |
| | |
| | | import com.ld.igds.sh.util.RespCodeEnum; |
| | | 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.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; |
| | | |
| | | /** |
| | |
| | | private HApiShServiceImpl hApiShServiceImpl; |
| | | @Autowired |
| | | private InteStatusLogService inteStatusLogService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | @Override |
| | | public String getInterfaceId() { |
| | | return ApiShConst.API_SH_1504; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1504); |
| | | 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<InoutContract> dataList = hApiShServiceImpl.listContract(companyId, |
| | | startTime, param.getEndTime()); |
| | | param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if(dataList == null || dataList.isEmpty()){ |