|
@ -17,6 +17,7 @@ |
|
|
|
|
|
|
|
|
package com.elink.esua.epdc.modules.events.service.impl; |
|
|
package com.elink.esua.epdc.modules.events.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
@ -42,14 +43,15 @@ import com.elink.esua.epdc.modules.events.service.ItemHotlineService; |
|
|
import com.elink.esua.epdc.modules.feign.OssFeignClient; |
|
|
import com.elink.esua.epdc.modules.feign.OssFeignClient; |
|
|
import com.elink.esua.epdc.modules.item.service.impl.PushToCityGridServiceImpl; |
|
|
import com.elink.esua.epdc.modules.item.service.impl.PushToCityGridServiceImpl; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
|
import org.jsoup.helper.DataUtil; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.time.DayOfWeek; |
|
|
import java.util.Arrays; |
|
|
import java.time.LocalDate; |
|
|
import java.util.List; |
|
|
import java.time.ZoneId; |
|
|
import java.util.Map; |
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 12345热线数据 |
|
|
* 12345热线数据 |
|
@ -137,6 +139,7 @@ public class ItemHotlineServiceImpl extends BaseServiceImpl<ItemHotlineDao, Item |
|
|
baseDao.insert(itemHotlineEntity); |
|
|
baseDao.insert(itemHotlineEntity); |
|
|
// 存入之后 告知市里
|
|
|
// 存入之后 告知市里
|
|
|
appealSendDTO.setSqid(item.getSqid()); |
|
|
appealSendDTO.setSqid(item.getSqid()); |
|
|
|
|
|
appealSendDTO.setJzrq(getData()); |
|
|
String result = pushToCityGridServiceImpl.sendAppealState(appealSendDTO); |
|
|
String result = pushToCityGridServiceImpl.sendAppealState(appealSendDTO); |
|
|
JSONObject res = JSONObject.parseObject(result); |
|
|
JSONObject res = JSONObject.parseObject(result); |
|
|
if (NumConstant.ZERO_STR.equals(res.get("code").toString())) { |
|
|
if (NumConstant.ZERO_STR.equals(res.get("code").toString())) { |
|
@ -163,4 +166,26 @@ public class ItemHotlineServiceImpl extends BaseServiceImpl<ItemHotlineDao, Item |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Date getData(){ |
|
|
|
|
|
// 获取今天的日期
|
|
|
|
|
|
LocalDate today = LocalDate.now(); |
|
|
|
|
|
|
|
|
|
|
|
// 初始化一个计数器,用于记录工作日的天数
|
|
|
|
|
|
int workingDaysToAdd = 5; |
|
|
|
|
|
|
|
|
|
|
|
// 从今天开始依次计算下一个工作日
|
|
|
|
|
|
LocalDate futureDate = today; |
|
|
|
|
|
while (workingDaysToAdd > 0) { |
|
|
|
|
|
// 将日期向后推一天
|
|
|
|
|
|
futureDate = futureDate.plusDays(1); |
|
|
|
|
|
|
|
|
|
|
|
// 如果推到的这一天是工作日,则减少工作日计数器
|
|
|
|
|
|
if (futureDate.getDayOfWeek() != DayOfWeek.SATURDAY && futureDate.getDayOfWeek() != DayOfWeek.SUNDAY) { |
|
|
|
|
|
workingDaysToAdd--; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
Date date = Date.from(futureDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
|
|
|
|
|
return date; |
|
|
|
|
|
} |
|
|
} |
|
|
} |