| | |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.hisDto.*; |
| | | import com.ltkj.hosp.service.ITjCustomerService; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import com.ltkj.web.wxUtils.HttpClientUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.sql.Connection; |
| | | import java.sql.DriverManager; |
| | | import java.sql.SQLException; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | /* @Authot:zjh |
| | | * @Date: 2024-05-28 |
| | | * */ |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class HisApiMethodService { |
| | | @Autowired |
| | | private ITjCustomerService tjCustomerService; |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | |
| | | private static String HIS_URL = ""; |
| | | |
| | | // 数据库配置文件路径 |
| | | // private static final String CONFIG_PATH = "/Users/chacca/开发相关/代码/ltkj_peis/ltkj-admin/src/main/resources/config.properties"; |
| | | // private static final String CONFIG_PATH = "D:\\ltkjprojectconf\\config.properties"; |
| | | |
| | | private static String CONFIG_PATH; |
| | | |
| | |
| | | |
| | | // @ApiOperation(value = "新增/修改门诊注册信息") |
| | | public AjaxResult Outpincreateapply (TjCustomer customer) { |
| | | String ysbm = configService.selectConfigByKey("request_default_ysbm"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | if (null != customer.getPationId () && !customer.getPationId().equals("0")) { |
| | | map.put ("Pationid", customer.getPationId ()); |
| | |
| | | map.put ("mz", null); |
| | | map.put ("zy","职员"); |
| | | map.put ("fbbm", null); |
| | | map.put ("czy", "00029"); |
| | | map.put ("czy", ysbm); |
| | | map.put ("jkkkh",null); |
| | | map.put ("mindex_id",null); |
| | | // map.put ("zybm","职员"); |
| | |
| | | map.put ("jcbw", dao.getJcbw ()); |
| | | map.put ("sfjz", dao.getSfjz ()); |
| | | map.put ("details", dao.getDetails ()); |
| | | log.info("HIS门诊检查申请 ->{},请求参数 ->{}",HIS_URL+"Outpinexamapply", JSONUtil.toJsonStr(map)); |
| | | String post = HttpClientUtils.sendPost (HIS_URL+"Outpinexamapply", map); |
| | | log.info("HIS门诊检查申请返回 ->{}",post); |
| | | return AjaxResult.success ().put ("data", post); |
| | | } |
| | | |
| | |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("his_registration_id", hisRegistrationId); |
| | | map.put ("czybm", czybm); |
| | | map.put ("zflxbm", sqdh); |
| | | map.put ("sqdh", sqdh); |
| | | String post = HttpClientUtils.sendPost (HIS_URL+"Outpindelmedicapply", map); |
| | | return AjaxResult.success ().put ("data", post); |
| | | } |