|
@ -0,0 +1,67 @@
|
|
|
package com.yihu.jw.entrance.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.jw.doctor.dao.BaseDoctorDao;
|
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
|
import com.yihu.jw.entity.hospital.prescription.*;
|
|
|
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.DsyyEntranceService;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
|
|
|
import com.yihu.jw.im.service.ImService;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.restmodel.web.ListEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
|
import com.yihu.jw.utils.EntityUtils;
|
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* Created by Trick on 2020/1/19.
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping(value ="/dsyy")
|
|
|
@Api(value = "第三医院视图解析", description = "第三医院视图解析", tags = {"第三医院视图解析"})
|
|
|
public class DsyyController extends EnvelopRestEndpoint {
|
|
|
|
|
|
@Autowired
|
|
|
private DsyyEntranceService dsyyEntranceService;
|
|
|
|
|
|
@GetMapping(value = "/createSQLQuery")
|
|
|
@ApiOperation(value = "视图统一查询")
|
|
|
public ListEnvelop createSQLQuery(@ApiParam(name = "sql", value = "sql语句", required = true)
|
|
|
@RequestParam(value = "sql",required = true)String sql,
|
|
|
@ApiParam(name = "params", value = "入参", required = false)
|
|
|
@RequestParam(value = "params",required = false)Map<String, Object> params,
|
|
|
@ApiParam(name = "page", value = "第几页", required = false)
|
|
|
@RequestParam(value = "page",required = false)Integer page,
|
|
|
@ApiParam(name = "size", value = "分页大小", required = false)
|
|
|
@RequestParam(value = "size",required = false)Integer size){
|
|
|
return success(dsyyEntranceService.createSQLQuery(sql,params,page,size));
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/jdbcSQLQuery")
|
|
|
@ApiOperation(value = "视图统一查询")
|
|
|
public ListEnvelop jdbcSQLQuery(@ApiParam(name = "sql", value = "sql语句", required = true)
|
|
|
@RequestParam(value = "sql",required = true)String sql){
|
|
|
return success(dsyyEntranceService.jdbcSQLQuery(sql));
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|