路泰机电科技体检——数据平台后端
zjh
2024-12-24 cffd87559f2e9343ce3e5dcc5d2953272a244253
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.example.controller;
 
import cn.hutool.core.util.XmlUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.example.constant.ApiParamsConstants;
import com.example.factory.ServiceFactory;
import com.example.service.HisService;
import com.example.service.PacsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.Map;
 
@RestController
@RequestMapping("/api/pacs")
public class PacsController {
 
    private final ServiceFactory serviceFactory;
 
    @Autowired
    public PacsController(ServiceFactory serviceFactory) {
        this.serviceFactory = serviceFactory;
    }
 
 
    /**
     * 3.2.2.申请单推送接口
     * @return
     */
    @PostMapping("/{hospName}/orderAll")
    public String queryOrder(@PathVariable String hospName, @RequestBody String xml){
        PacsService pacsService = serviceFactory.getPacsService(hospName);
        return pacsService.orderAdd(xml);
    }
}