|
|
@ -48,12 +48,14 @@ 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.entity.ItemEntity; |
|
|
import com.elink.esua.epdc.modules.item.entity.ItemEntity; |
|
|
import com.elink.esua.epdc.modules.item.service.impl.PushToCityGridServiceImpl; |
|
|
import com.elink.esua.epdc.modules.item.service.impl.PushToCityGridServiceImpl; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.jsoup.helper.DataUtil; |
|
|
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.text.SimpleDateFormat; |
|
|
import java.time.DayOfWeek; |
|
|
import java.time.DayOfWeek; |
|
|
import java.time.LocalDate; |
|
|
import java.time.LocalDate; |
|
|
import java.time.LocalDateTime; |
|
|
import java.time.LocalDateTime; |
|
|
@ -68,6 +70,7 @@ import java.util.*; |
|
|
* @since v1.0.0 2024-06-26 |
|
|
* @since v1.0.0 2024-06-26 |
|
|
*/ |
|
|
*/ |
|
|
@Service |
|
|
@Service |
|
|
|
|
|
@Slf4j |
|
|
public class ItemHotlineServiceImpl extends BaseServiceImpl<ItemHotlineDao, ItemHotlineEntity> implements ItemHotlineService { |
|
|
public class ItemHotlineServiceImpl extends BaseServiceImpl<ItemHotlineDao, ItemHotlineEntity> implements ItemHotlineService { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
@ -143,6 +146,7 @@ public class ItemHotlineServiceImpl extends BaseServiceImpl<ItemHotlineDao, Item |
|
|
for (CenterData item : centerHotLine) { |
|
|
for (CenterData item : centerHotLine) { |
|
|
ItemHotlineEntity itemHotlineEntity = ConvertUtils.sourceToTarget(item, ItemHotlineEntity.class); |
|
|
ItemHotlineEntity itemHotlineEntity = ConvertUtils.sourceToTarget(item, ItemHotlineEntity.class); |
|
|
itemHotlineEntity.setDjrxm("12345热线:" + itemHotlineEntity.getDjrxm()); |
|
|
itemHotlineEntity.setDjrxm("12345热线:" + itemHotlineEntity.getDjrxm()); |
|
|
|
|
|
itemHotlineEntity.setSjnr("登记时间:"+item.getDjsj()+"内容:"+item.getSjnr()); |
|
|
// 存入12345表
|
|
|
// 存入12345表
|
|
|
baseDao.insert(itemHotlineEntity); |
|
|
baseDao.insert(itemHotlineEntity); |
|
|
// 存入之后 告知市里
|
|
|
// 存入之后 告知市里
|
|
|
@ -177,12 +181,11 @@ public class ItemHotlineServiceImpl extends BaseServiceImpl<ItemHotlineDao, Item |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Date getData(){ |
|
|
public String getData(){ |
|
|
// 获取今天的日期
|
|
|
// 获取今天的日期
|
|
|
LocalDate today = LocalDate.now(); |
|
|
LocalDate today = LocalDate.now(); |
|
|
|
|
|
|
|
|
// 初始化一个计数器,用于记录工作日的天数
|
|
|
// 初始化一个计数器,用于记录工作日的天数
|
|
|
int workingDaysToAdd = 5; |
|
|
int workingDaysToAdd = 6; |
|
|
|
|
|
|
|
|
// 从今天开始依次计算下一个工作日
|
|
|
// 从今天开始依次计算下一个工作日
|
|
|
LocalDate futureDate = today; |
|
|
LocalDate futureDate = today; |
|
|
@ -195,8 +198,14 @@ public class ItemHotlineServiceImpl extends BaseServiceImpl<ItemHotlineDao, Item |
|
|
workingDaysToAdd--; |
|
|
workingDaysToAdd--; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
log.info("4444444444"+futureDate); |
|
|
Date date = Date.from(futureDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
|
|
Date date = Date.from(futureDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
|
|
return date; |
|
|
|
|
|
|
|
|
// 创建 SimpleDateFormat 对象,指定输出格式
|
|
|
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
|
// 格式化 Date 对象
|
|
|
|
|
|
String formattedDate = formatter.format(date); |
|
|
|
|
|
return formattedDate; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|