|
@@ -1,14 +1,15 @@
|
|
|
-package com.phm.manage.common.controller;
|
|
|
+package com.phm.manage.controller.externalInter;
|
|
|
|
|
|
import com.phm.common.annotation.Anonymous;
|
|
|
import com.phm.common.core.domain.entity.SysDictData;
|
|
|
import com.phm.common.utils.StringUtils;
|
|
|
-import com.phm.manage.common.domain.CommonResult;
|
|
|
-import com.phm.manage.common.domain.CommonResultXML;
|
|
|
-import com.phm.manage.common.domain.OrderXmlVO;
|
|
|
+import com.phm.manage.domain.common.CommonResult;
|
|
|
+import com.phm.manage.domain.common.CommonResultXML;
|
|
|
+import com.phm.manage.domain.common.OrderXmlVO;
|
|
|
import com.phm.manage.domain.Sortie;
|
|
|
import com.phm.manage.service.ISortieService;
|
|
|
import com.phm.system.service.ISysDictTypeService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -25,6 +26,7 @@ import java.util.List;
|
|
|
@RestController
|
|
|
@Anonymous
|
|
|
@RequestMapping("/publicservice")
|
|
|
+@Slf4j
|
|
|
public class ExternalInterfaceController {
|
|
|
|
|
|
@Autowired
|
|
@@ -34,7 +36,7 @@ public class ExternalInterfaceController {
|
|
|
private ISortieService sortieService;
|
|
|
|
|
|
/**
|
|
|
- * 指令接受API
|
|
|
+ * 指令接收API
|
|
|
*
|
|
|
* @param orderXmlVO 入参
|
|
|
* @return res
|
|
@@ -42,7 +44,8 @@ public class ExternalInterfaceController {
|
|
|
@PostMapping(value = "/receive", consumes = {MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_XML_VALUE},
|
|
|
produces = MediaType.APPLICATION_XML_VALUE)
|
|
|
public CommonResultXML<OrderXmlVO> receive(@RequestBody OrderXmlVO orderXmlVO) {
|
|
|
- return CommonResultXML.success(orderXmlVO);
|
|
|
+ log.info("指令入参:{}", orderXmlVO.toString());
|
|
|
+ return CommonResultXML.buildSuccess();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -50,6 +53,7 @@ public class ExternalInterfaceController {
|
|
|
*/
|
|
|
@GetMapping(value = "/type/{dictType}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public CommonResult<List<SysDictData>> dictType(@PathVariable String dictType) {
|
|
|
+ log.info("dictType:{}", dictType);
|
|
|
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
|
|
if (StringUtils.isNull(data)) {
|
|
|
data = new ArrayList<SysDictData>();
|
|
@@ -63,8 +67,20 @@ public class ExternalInterfaceController {
|
|
|
* @return 架次列表
|
|
|
*/
|
|
|
@GetMapping(value = "/sortieList", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- public CommonResult<List<Sortie>> dictType() {
|
|
|
+ public CommonResult<List<Sortie>> sortieList() {
|
|
|
List<Sortie> data = sortieService.selectSortieList(null);
|
|
|
return CommonResult.success(data);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 监测模块状态
|
|
|
+ *
|
|
|
+ * @param type 模块类型
|
|
|
+ * @return 模块状态信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/monitorModule/{type}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public CommonResult monitor(@PathVariable String type) {
|
|
|
+ log.info("monitor:{}", type);
|
|
|
+ return CommonResult.buildSuccess();
|
|
|
+ }
|
|
|
}
|