|
@@ -1,16 +1,20 @@
|
|
|
package com.phm.manage.common.controller;
|
|
|
|
|
|
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.common.enums.OrderEnum;
|
|
|
+import com.phm.manage.domain.Sortie;
|
|
|
+import com.phm.manage.service.ISortieService;
|
|
|
+import com.phm.system.service.ISysDictTypeService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.MediaType;
|
|
|
-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 org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import javax.validation.Valid;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 对外提供接口
|
|
@@ -20,18 +24,47 @@ import javax.validation.Valid;
|
|
|
*/
|
|
|
@RestController
|
|
|
@Anonymous
|
|
|
-@RequestMapping(value = "/publicservice", consumes = {MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_XML_VALUE},
|
|
|
- produces = MediaType.APPLICATION_XML_VALUE)
|
|
|
+@RequestMapping("/publicservice")
|
|
|
public class ExternalInterfaceController {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysDictTypeService dictTypeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISortieService sortieService;
|
|
|
+
|
|
|
/**
|
|
|
* 指令接受API
|
|
|
*
|
|
|
* @param orderXmlVO 入参
|
|
|
* @return res
|
|
|
*/
|
|
|
- @PostMapping("/receive")
|
|
|
- public CommonResultXML<OrderXmlVO> sss(@RequestBody @Valid OrderXmlVO orderXmlVO) {
|
|
|
+ @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);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据字典类型查询字典数据信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/type/{dictType}", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public CommonResult<List<SysDictData>> dictType(@PathVariable String dictType) {
|
|
|
+ List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
|
|
+ if (StringUtils.isNull(data)) {
|
|
|
+ data = new ArrayList<SysDictData>();
|
|
|
+ }
|
|
|
+ return CommonResult.success(data);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询架次信息
|
|
|
+ *
|
|
|
+ * @return 架次列表
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/sortieList", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public CommonResult<List<Sortie>> dictType() {
|
|
|
+ List<Sortie> data = sortieService.selectSortieList(null);
|
|
|
+ return CommonResult.success(data);
|
|
|
+ }
|
|
|
}
|