This commit is contained in:
liuchengqian 2023-03-02 14:01:09 +08:00
parent 0acc7c8c1f
commit b9efcffed4
3 changed files with 4 additions and 49 deletions

View File

@ -6,7 +6,10 @@ import com.xkrs.straw.service.DispatchFirePointService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Locale; import java.util.Locale;
@ -22,11 +25,6 @@ public class DispatchFirePointController {
@Resource @Resource
private DispatchFirePointService firePointService; private DispatchFirePointService firePointService;
@GetMapping("/debug")
public String debug() {
return firePointService.debug();
}
/** /**
* 普通渠道推送火点到秸秆系统 * 普通渠道推送火点到秸秆系统
*/ */

View File

@ -4,8 +4,6 @@ import com.xkrs.straw.model.qo.AllFirePointQo;
public interface DispatchFirePointService { public interface DispatchFirePointService {
String debug();
/** /**
* 普通渠道推送火点到秸秆系统 * 普通渠道推送火点到秸秆系统
*/ */

View File

@ -6,13 +6,10 @@ import com.xkrs.straw.dao.FirePointOrdinaryDao;
import com.xkrs.straw.dao.FirePointPreciseDao; import com.xkrs.straw.dao.FirePointPreciseDao;
import com.xkrs.straw.dao.SysUserDao; import com.xkrs.straw.dao.SysUserDao;
import com.xkrs.straw.helper.GeoCodeHelper; import com.xkrs.straw.helper.GeoCodeHelper;
import com.xkrs.straw.model.bean.FirePointQueryResultBean;
import com.xkrs.straw.model.entity.FirePointChannelConfigEntity; import com.xkrs.straw.model.entity.FirePointChannelConfigEntity;
import com.xkrs.straw.model.entity.FirePointOrdinaryEntity; import com.xkrs.straw.model.entity.FirePointOrdinaryEntity;
import com.xkrs.straw.model.entity.FirePointPreciseEntity; import com.xkrs.straw.model.entity.FirePointPreciseEntity;
import com.xkrs.straw.model.entity.SysUserEntity;
import com.xkrs.straw.model.qo.AllFirePointQo; import com.xkrs.straw.model.qo.AllFirePointQo;
import com.xkrs.straw.model.vo.AllFirePointVo;
import com.xkrs.straw.service.DispatchFirePointService; import com.xkrs.straw.service.DispatchFirePointService;
import com.xkrs.straw.utils.DispatchFirePointUtils; import com.xkrs.straw.utils.DispatchFirePointUtils;
import com.xkrs.straw.utils.FirePointQueryManager; import com.xkrs.straw.utils.FirePointQueryManager;
@ -27,7 +24,6 @@ import java.time.LocalDateTime;
import java.time.ZoneOffset; import java.time.ZoneOffset;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Optional;
import static com.xkrs.common.encapsulation.OutputEncapsulation.outputEncapsulationObject; import static com.xkrs.common.encapsulation.OutputEncapsulation.outputEncapsulationObject;
@ -53,43 +49,6 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
@Resource @Resource
private FirePointQueryManager firePointQueryManager; private FirePointQueryManager firePointQueryManager;
@Override
public String debug() {
Optional<SysUserEntity> sysUser = sysUserDao.findById(1120L);
FirePointQueryResultBean firePointQueryResultBean = firePointQueryManager.queryFirePointBelongToUser(sysUser.get(), "2022-04-10 00:47:11", null, null, "耕地");
boolean success = firePointQueryResultBean.isSuccess();
String errorMessage = firePointQueryResultBean.getErrorMessage();
List<AllFirePointVo> list = firePointQueryResultBean.getList();
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, list, locale);
// FirePointChannelConfigBean firePointChannelConfigBean = new FirePointChannelConfigBean();
// firePointChannelConfigBean.setChannelName(FirePointChannelConfigBean.Ordinary);
// List<FirePointChannelConfigBean.ChannelConfig> configList = new ArrayList<>();
//
// FirePointChannelConfigBean.ChannelConfig channelConfig1 = new FirePointChannelConfigBean.ChannelConfig();
// channelConfig1.setStartTime("");
// channelConfig1.setEndTime("");
// configList.add(channelConfig1);
//
//// FirePointChannelConfigBean.ChannelConfig channelConfig1 = new FirePointChannelConfigBean.ChannelConfig();
//// channelConfig1.setStartTime("2022-01-01 00:00:00");
//// channelConfig1.setEndTime("2022-09-01 00:00:00");
//// configList.add(channelConfig1);
//
//// FirePointChannelConfigBean.ChannelConfig channelConfig2 = new FirePointChannelConfigBean.ChannelConfig();
//// channelConfig2.setStartTime("2022-10-01 00:00:00");
//// channelConfig2.setEndTime("2022-11-01 00:00:00");
//// configList.add(channelConfig2);
//
// firePointChannelConfigBean.setConfigList(configList);
// String serialize = JsonUtils.<FirePointChannelConfigBean>serialize(firePointChannelConfigBean);
// FirePointChannelConfigEntity firePointChannelConfigEntity = new FirePointChannelConfigEntity();
// firePointChannelConfigEntity.setJsonContent(serialize);
// channelConfigDao.save(firePointChannelConfigEntity);
// return "null";
}
/** /**
* 普通渠道推送火点到秸秆系统 * 普通渠道推送火点到秸秆系统
*/ */