陈昶聿
3 天以前 5cbcb6cce6349c81defb99ef1c178affe38e81f8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java
@@ -4,6 +4,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.system.service.ISysConfigService;
import com.smartor.domain.*;
@@ -14,10 +15,7 @@
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.Date;
import java.util.HashMap;
@@ -86,8 +84,10 @@
        log.info("------serviceQueryInfo的入参为:{}", serviceQueryInfo);
        Map map = null;
        try {
            String url = configService.selectConfigByKey("token.360",serviceQueryInfo.getXiaoXiTou().getFaSongJGID());
            String url = configService.selectConfigByKey("token.360", serviceQueryInfo.getXiaoXiTou().getFaSongJGID());
            serviceQueryInfo.setUrl(url);
            String url360 = configService.selectConfigByKey("url.360", serviceQueryInfo.getXiaoXiTou().getFaSongJGID());
            serviceQueryInfo.setUrl360(url360);
            map = svyTaskSingleService.query360PatInfo(serviceQueryInfo);
        } catch (Exception e) {
            e.printStackTrace();
@@ -142,6 +142,24 @@
        } catch (Exception e) {
            e.printStackTrace();
            log.error("serviceExternal---addUserInfo出异常了:{}", e.getMessage());
            aBoolean = false;
        }
        return returnParam(aBoolean, dataMap);
    }
    /**
     * 新增科室信息
     */
    @ApiOperation("新增用户信息")
    @PostMapping("/addUserDeptInfo")
    public Map<String, Object> addUserDeptInfo(@RequestBody Map dataMap) {
        Boolean aBoolean = true;
        try {
            aBoolean = serviceExternalService.addUserDeptInfo(dataMap);
        } catch (Exception e) {
            e.printStackTrace();
            log.error("serviceExternal---addUserDeptInfo出异常了:{}", e.getMessage());
            aBoolean = false;
        }
        return returnParam(aBoolean, dataMap);
@@ -354,6 +372,21 @@
        return returnParam(aBoolean, dataMap);
    }
    /**
     * 360患者信息获取
     */
    @ApiOperation("360患者信息获取(来未来)")
    @GetMapping("/query360PatInfolwl/{patid}")
    public Map<String, Object> query360PatInfolwl(@PathVariable("patid") Long patid) {
        Map<String, Object> result = new HashMap<>();
        if (patid == null) {
            result.put("url", null);
            result.put("error", "患者id为空");
            return result;
        }
        LoginUser loginUser = getLoginUser();
        return serviceExternalService.query360PatInfolwl(patid, loginUser.getUser());
    }
    private Map<String, Object> returnParam(Boolean b, Map dataMap) {
@@ -375,9 +408,6 @@
        map.put("Data", map2);
        return map;
    }
}