New file |
| | |
| | | package com.ltkj.web.controller.callback; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.mapper.TjSamplingMapper; |
| | | import com.ltkj.hosp.service.*; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 对接其他平台提供的回调服务 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("callBack") |
| | | public class CallBackController { |
| | | @Autowired |
| | | private HisSyncDictService hisSyncDictService; |
| | | @Autowired |
| | | private ITjFlowingWaterService tjFlowingWaterService; |
| | | @Autowired |
| | | private ITjOrderRemarkService remarkService; |
| | | @Autowired |
| | | private ITjOrderDetailService tjOrderDetailService; |
| | | @Autowired |
| | | private ITbTransitionService transitionService; |
| | | @Autowired |
| | | private TjSamplingMapper tjSamplingMapper; |
| | | @Autowired |
| | | private TjProBlService blService; |
| | | @Autowired |
| | | private ITjOrderService tjOrderService; |
| | | @Autowired |
| | | private ITjCustomerService tjCustomerService; |
| | | @Autowired |
| | | private ITjOrderService orderService; |
| | | |
| | | /** |
| | | * 收退费回调接口 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | @PostMapping("pushZhiFuMsg") |
| | | public AjaxResult pushZhiFuMsg(@RequestBody Map<String ,Object> params){ |
| | | log.info("回调 ->{}", JSONUtil.toJsonStr(params)); |
| | | String type = params.get("type").toString(); |
| | | // type 1为煤机医院传参 |
| | | // feiYongId 费用Id |
| | | // yeWuLx 业务类型,1-收费;2-退费/作废 |
| | | if (type.equals("1")){ |
| | | String feiYongId = params.get("feiYongId").toString(); |
| | | String yeWuLx = params.get("yeWuLx").toString(); |
| | | // 收费 |
| | | if (yeWuLx.equals("1")){ |
| | | LambdaQueryWrapper<TjFlowingWater> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjFlowingWater::getHisWaterId, feiYongId); |
| | | TjFlowingWater water = tjFlowingWaterService.getOne(wrapper); |
| | | water.setPayStasus(1L); |
| | | tjFlowingWaterService.updateById(water); |
| | | }else { |
| | | LambdaQueryWrapper<TjFlowingWater> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjFlowingWater::getHisTfWaterId, feiYongId).or().eq(TjFlowingWater::getHisWaterId, feiYongId); |
| | | TjFlowingWater water = tjFlowingWaterService.getOne(wrapper); |
| | | TjOrder order = orderService.getById(water.getOrderId()); |
| | | if (order != null){ |
| | | // 退费 |
| | | String bldh = water.getJxbz(); |
| | | if (bldh != null){ |
| | | remarkService.deleteTjOrderDetailByjxbz(bldh); |
| | | tjOrderDetailService.deleteTjOrderDetailByjxbz(bldh); |
| | | tjFlowingWaterService.deleteTjOrderDetailByjxbz(bldh); |
| | | transitionService.deleteTjOrderDetailByjxbz(bldh); |
| | | blService.remove(new LambdaQueryWrapper<TjProBl>().eq(TjProBl::getTjh, order.getTjNumber()).eq(TjProBl::getBldh, bldh)); |
| | | tjSamplingMapper.deleteByTjNumAndCusIdAndJxbzo(order.getTjNumber(), order.getUserId(),bldh); |
| | | }else { |
| | | tjOrderService.deleteTjOrderByOrderId(order.getOrderId()); |
| | | tjOrderDetailService.deleteTjOrderDetailByOrderDetailId(String.valueOf(order.getOrderId())); |
| | | remarkService.deletedOrderRemarkByTjNum(order.getTjNumber()); |
| | | tjFlowingWaterService.deleteTjFlowingWaterByOrderId(String.valueOf(order.getOrderId())); |
| | | transitionService.deletedTbTransitionByTjNum(order.getTjNumber()); |
| | | |
| | | TjCustomer customer = tjCustomerService.getById(order.getUserId()); |
| | | customer.setCardId("0"); |
| | | tjCustomerService.updateById(customer); |
| | | tjSamplingMapper.deleteByTjNumAndCusId(order.getTjNumber(), order.getUserId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("getZdList") |
| | | public AjaxResult getZdList(@RequestBody Map<String ,Object> params){ |
| | | String hosp = params.get("hosp").toString(); |
| | | LambdaQueryWrapper<HisSyncDict> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(HisSyncDict::getHospId,hosp); |
| | | List<HisSyncDict> list = hisSyncDictService.list(wrapper); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ltkj.system.service.ISysDictDataService; |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import com.ltkj.web.config.pdfutils.PdfUtils; |
| | | import com.ltkj.web.controller.system.SysDeptController; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private TjOrderRemarkMapper tjOrderRemarkMapper; |
| | | @Autowired |
| | | private TjOrderDetailMapper tjOrderDetailMapper; |
| | | @Autowired |
| | | private SysDeptController sysDeptController; |
| | | |
| | | private Integer pdfPage = 0; |
| | | |
| | |
| | | private static int DEFAULT_LITTLE_TITLE_FONT_SIZE = 11; |
| | | private static int DEFAULT_TITLE_FONT_SIZE = 12; |
| | | private static int DEFAULT_ZONGJIAN_FONT_SIZE = 15; |
| | | private static String HOSP_NAME; |
| | | |
| | | private List<Map<String, Object>> makePDFInfo(HashMap<String, Object> map, AjaxResult ajaxResult, String key) { |
| | | List<Map<String, Object>> data = null; |
| | |
| | | int pageSize = 0; |
| | | try { |
| | | pdfWriter = PdfWriter.getInstance(document1, byteArrayOutputStream1); |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (true){ |
| | | String sex = ""; |
| | | if (customer.getCusSex() != null) { |
| | | for (SysDictData userSex : sysUserSex) { |
| | |
| | | } |
| | | } |
| | | if (StrUtil.isBlank(sex)) sex = "未知"; |
| | | pdfWriter.setPageEvent(new FooterHeaderPageEvent("澄合矿务局中心医院",customer.getCusName(),tjOrder.getTjNumber(),sex,String.valueOf(DateUtil.ageOfNow(customer.getCusBrithday())),null)); |
| | | // pdfWriter.setPageEvent(new FooterHeaderPageEvent("澄合矿务局中心医院",customer.getCusName(),tjOrder.getTjNumber(),sex,String.valueOf(DateUtil.ageOfNow(customer.getCusBrithday())),null)); |
| | | pdfWriter.setPageEvent(new FooterHeaderPageEvent(dictHosp.getHospName(),customer.getCusName(),tjOrder.getTjNumber(),sex,String.valueOf(DateUtil.ageOfNow(customer.getCusBrithday())),null)); |
| | | pageSize = pdfWriter.getPageNumber(); |
| | | } |
| | | } catch (DocumentException e) { |
| | |
| | | document1.setMargins(70, 70, 40, 40); |
| | | document1.open(); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (true){ |
| | | // 组装体检检查项目报告 |
| | | Map<TjOrderRemark, List<TjPdfVO>> printReport = new HashMap<>(); |
| | | notHuaYanData(tjOrder.getTjNumber(), printReport, tjOrder, customer); |
| | |
| | | copy.addPage(page); |
| | | } |
| | | |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!true){ |
| | | List<ByteArrayOutputStream> jianchas = makeHisJianChaTable(tjOrder); |
| | | // List<ByteArrayOutputStream> jianchas = makeCcgcHisJianChaTable(tjOrder); |
| | | try { |
| | |
| | | int pages = pdfReader.getNumberOfPages(); |
| | | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
| | | PdfStamper pdfStamper = new PdfStamper(pdfReader, outputStream); |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!true){ |
| | | PdfContentByte contentByte; |
| | | BaseFont baseFont = PdfUtils.createBaseFont(null); |
| | | for (int i = 2; i <= pages; i++) { |
| | |
| | | String s2 = sysConfigService.selectConfigByKey("tjreport_font_size_second_page_title"); |
| | | String s3 = sysConfigService.selectConfigByKey("tjreport_font_size_result_title"); |
| | | String s4 = sysConfigService.selectConfigByKey("tjreport_font_size_zongjian"); |
| | | // String hospName = sysDeptController.getdangqiandengluyuanqu().get("msg").toString(); |
| | | if (StrUtil.isNotBlank(s1) && Integer.parseInt(s1) > 10) DEFAULT_FONT_SIZE = Integer.parseInt(s1); |
| | | else DEFAULT_FONT_SIZE = 10; |
| | | if (StrUtil.isNotBlank(s2) && Integer.parseInt(s2) > 10) DEFAULT_LITTLE_TITLE_FONT_SIZE = Integer.parseInt(s2); |
| | |
| | | else DEFAULT_ZONGJIAN_FONT_SIZE = 10; |
| | | pdfPage = 0; |
| | | DictHosp dictHosp = dictHospService.list().get(0); |
| | | HOSP_NAME = dictHosp.getHospName(); |
| | | String color = sysConfigService.selectConfigByKey("report_title_color"); |
| | | List<SysDictData> sysUserSex = sysDictDataService.list(new LambdaQueryWrapper<SysDictData>().eq(SysDictData::getDictType, "sys_user_sex")); |
| | | // 检验数据 |
| | |
| | | } |
| | | } |
| | | //分割线 |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | LineSeparator objectName = new LineSeparator(); |
| | | objectName.setOffset(-5); |
| | | document1.add(objectName); |
| | |
| | | Font titleFonts = PdfUtils.setFont(9); |
| | | Paragraph paragraph = PdfUtils.setParagraph(titleFonts, titleName); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (true) { |
| | | Font titleFont = PdfUtils.setFont(DEFAULT_TITLE_FONT_SIZE); |
| | | titleFont.setStyle(Font.BOLD); |
| | | PdfPCell cellTitle = new PdfPCell(PdfUtils.setParagraph(titleFont, titleName)); |
| | |
| | | // PdfPTable table = PdfUtils.setTable2(headFont, textFont, titles, value,dictHosp.getHospName().equals("澄合矿务局中心医院")); |
| | | // document1.add(table); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | if (true && !value.isEmpty()){ |
| | | if (value.size()>1){ |
| | | if (value.get(0).getPid().equals("1862852701533012001")){ |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | if (entry.getKey().getRemark() == null) { |
| | | entry.getKey().setRemark(""); |
| | | } |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!true){ |
| | | String remark = "备注:" + entry.getKey().getRemark(); |
| | | if (entry.getKey().getRemark().length() > 50) { |
| | | int j = 0; |
| | |
| | | //判断主检医师是否为空 空不能显示null |
| | | zhuJianYiShi(document1, entry,orderRemark.getCreateTime(),dictHosp); |
| | | //分割线 |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | LineSeparator objectName = new LineSeparator(); |
| | | document1.add(objectName); |
| | | } |
| | |
| | | Font titleFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph paragraph = PdfUtils.setParagraph(titleFonts, titleName); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (true) { |
| | | if (StrUtil.isBlank(value.get(0).getProResult()) && (StrUtil.isBlank(value.get(0).getTs()) && StrUtil.isBlank(value.get(0).getSj()))){ |
| | | continue; |
| | | } |
| | |
| | | // PdfPTable table = PdfUtils.setTable(headFont, textFont, titles, value,dictHosp.getHospName().equals("澄合矿务局中心医院")); |
| | | // document1.add(table); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | if (true && !value.isEmpty()){ |
| | | if (value.size()>1){ |
| | | if (value.get(0).getPid().equals("1862852701533012001")){ |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | if (entry.getKey().getRemark() == null) { |
| | | entry.getKey().setRemark(""); |
| | | } |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!true){ |
| | | String remark = "备注:" + entry.getKey().getRemark(); |
| | | if (entry.getKey().getRemark().length() > 50) { |
| | | int j = 0; |
| | |
| | | } |
| | | //判断主检医师是否为空 空不能显示null |
| | | zhuJianYiShi(document1, entry,orderRemark.getCreateTime(),dictHosp); |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | //分割线 |
| | | LineSeparator objectName = new LineSeparator(); |
| | | document1.add(objectName); |
| | |
| | | * @throws DocumentException |
| | | */ |
| | | private void zhuJianYiShi(Document document1, Map.Entry<TjOrderRemark, List<TjPdfVO>> entry,Date createTime,DictHosp dictHosp) throws DocumentException { |
| | | if ((null != entry.getKey().getDoctorName() && null != userService.getById(entry.getKey().getDoctorName())) || dictHosp.getHospName().equals("澄合矿务局中心医院") ) { |
| | | // if ((null != entry.getKey().getDoctorName() && null != userService.getById(entry.getKey().getDoctorName())) || dictHosp.getHospName().equals("澄合矿务局中心医院") ) { |
| | | if ((null != entry.getKey().getDoctorName() && null != userService.getById(entry.getKey().getDoctorName())) || true ) { |
| | | //主检医师 |
| | | String key = sysConfigService.selectConfigByKey("is_report_pdf_use_ysqm"); |
| | | SysUser sysUser = userService.getById(entry.getKey().getDoctorName()); |
| | | String doctorNameDefault = "无"; |
| | | if (sysUser != null)doctorNameDefault = sysUser.getNickName(); |
| | | if (!entry.getValue().isEmpty() && StrUtil.isNotBlank(entry.getValue().get(0).getShys()) && dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!entry.getValue().isEmpty() && StrUtil.isNotBlank(entry.getValue().get(0).getShys()) && dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!entry.getValue().isEmpty() && StrUtil.isNotBlank(entry.getValue().get(0).getShys()) && true){ |
| | | doctorNameDefault = entry.getValue().get(0).getShys(); |
| | | } |
| | | Font doctorFonts = PdfUtils.setFont(9); |
| | |
| | | } |
| | | //拼接重大阳性结果 |
| | | StringBuffer str = new StringBuffer(); |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | str.append("【重大阳性项目】\n"); |
| | | LambdaQueryWrapper<TjBigPositive> bigPositiveLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | bigPositiveLambdaQueryWrapper.eq(TjBigPositive::getTjNumber, tjNumber); |
| | |
| | | } |
| | | //拼接异常项目 |
| | | str.append("【异常情况项目】\n"); |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | if (list.size() > 0) { |
| | | for (int i = 0; i < list.size(); i++) { |
| | | if (list.get(i).getExceptionDesc() == 1) { |
| | |
| | | private static void addJianYanTable(Document document, String titleName, String[] titles, float[] titlesWidth, ArrayList<List<String>> lists,DictHosp dictHosp,String colorStr) throws DocumentException { |
| | | // 大项标题 |
| | | Font titleFont = PdfUtils.setFont(DEFAULT_TITLE_FONT_SIZE); |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (true) { |
| | | titleFont.setSize(DEFAULT_TITLE_FONT_SIZE); |
| | | titleFont.setStyle(Font.BOLD); |
| | | } |
| | |
| | | paragraph.setSpacingBefore(10f); |
| | | // 设置段落下空白 |
| | | paragraph.setSpacingAfter(10f); |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (true) { |
| | | // 行间距 |
| | | paragraph.setLeading(7f); |
| | | // 设置段落上空白 |
| | |
| | | for (List<String> list : lists) { |
| | | boolean isYc = false; |
| | | textFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (true){ |
| | | if (list.contains("↓") || list.contains("↑")){ |
| | | isYc = true; |
| | | } |
| | |
| | | table1.setSpacingAfter(10f); |
| | | |
| | | Font titleFont = PdfUtils.setFont(12); |
| | | PdfPCell mergedCell = new PdfPCell(new Phrase("陕健医澄合矿务局中心医院", titleFont)); |
| | | // PdfPCell mergedCell = new PdfPCell(new Phrase("陕健医澄合矿务局中心医院", titleFont)); |
| | | PdfPCell mergedCell = new PdfPCell(new Phrase(HOSP_NAME, titleFont)); |
| | | mergedCell.setBorder(Rectangle.NO_BORDER); |
| | | mergedCell.setColspan(10); |
| | | mergedCell.setHorizontalAlignment(Element.ALIGN_CENTER); |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import javax.xml.soap.*; |
| | | |
| | | /** |
| | | * @Company: 西安路泰科技有限公司 |
| | |
| | | * xml传递 |
| | | */ |
| | | public boolean OrderAdd(TjCustomer customer,TjOrder tjOrder){ |
| | | String hospbm = configService.selectConfigByKey("common_api_service_hospbm"); |
| | | |
| | | List<TbTransition> detailList = transitionService.getTbTransitionListByCusId(customer.getCusIdcard(), tjOrder.getCardId()); |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | |
| | | HashMap<String, Object> root = new HashMap<>(); |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | |
| | | HashMap<String, Object> patientInfo = new HashMap<>(); |
| | | patientInfo.put("PatientId",customer.getCusId()); |
| | | patientInfo.put("VisitNo",tjOrder.getTjNumber()); |
| | | patientInfo.put("PatType","P"); |
| | | patientInfo.put("PatientName",customer.getCusName()); |
| | | if (customer.getCusSex() == 0) patientInfo.put("PatientSex","M"); |
| | | else if (customer.getCusSex() == 1) patientInfo.put("PatientSex","F"); |
| | | else patientInfo.put("PatientSex","O"); |
| | | patientInfo.put("PatBirthday",new SimpleDateFormat("yyyy-MM-dd").format(customer.getCusBrithday())); |
| | | patientInfo.put("IdCard",customer.getCusIdcard()); |
| | | patientInfo.put("hospitalid","chkwyy"); |
| | | String xmlRequest = ""; |
| | | |
| | | // String examItems = ""; |
| | | HashMap<String, Object> examItem = new HashMap<>(); |
| | | List<Map<String,Object>> list = new ArrayList<>(); |
| | | String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); |
| | | for (TjProject project : projects) { |
| | | HashMap<String, Object> examItems = new HashMap<>(); |
| | | // 申请单号规则:体检号_project.getProId()后四位 |
| | | examItems.put("HisID", tjOrder.getTjNumber() + String.valueOf(project.getProId()).substring(String.valueOf(project.getProId()).length() - 4)); |
| | | examItems.put("EmergencyFlag", "0"); |
| | | examItems.put("ExamItemID", project.getHisXmbm()); |
| | | examItems.put("ExamItemName", project.getHisXmmc()); |
| | | examItems.put("OrderDT", date); |
| | | SysDept dept = deptService.getById(project.getDeptId()); |
| | | examItems.put("Modality", dept.getModality()); |
| | | // TODO 收费标识 1是收费 和 0未收费 |
| | | examItems.put("ChargeFlag",""); |
| | | // examItems += "<ExamItem>"+ |
| | | // XmlUtil.mapToXmlStr(examItem) |
| | | // .replace("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>","") |
| | | //// .replaceAll("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>","") |
| | | // .replace("<xml>","") |
| | | // .replace("</xml>","") |
| | | // +"</ExamItem>"; |
| | | list.add(examItems); |
| | | MessageFactory messageFactory = null; |
| | | try { |
| | | // 创建SOAP消息 |
| | | messageFactory = MessageFactory.newInstance(); |
| | | SOAPMessage soapMessage = messageFactory.createMessage(); |
| | | // 创建SOAP Envelope |
| | | SOAPPart soapPart = soapMessage.getSOAPPart(); |
| | | SOAPEnvelope envelope = soapPart.getEnvelope(); |
| | | envelope.addNamespaceDeclaration("xmlns", "http://tempuri.org/"); |
| | | |
| | | // 创建SOAP Body |
| | | SOAPBody soapBody = envelope.getBody(); |
| | | SOAPElement rootElement = soapBody.addChildElement("OrderAdd", "xmlns"); |
| | | rootElement.addChildElement("dataSourceName").addTextNode("hisDataSource"); |
| | | |
| | | // PatientInfor 部分 |
| | | SOAPElement patientInfor = rootElement.addChildElement("PatientInfor"); |
| | | if (customer.getCusSex() == 0) patientInfor.addChildElement("PatientSex").addTextNode("M"); |
| | | else if (customer.getCusSex() == 1) patientInfor.addChildElement("PatientSex").addTextNode("F"); |
| | | else patientInfor.addChildElement("PatientSex").addTextNode("O"); |
| | | patientInfor.addChildElement("PatBirthday").addTextNode(new SimpleDateFormat("yyyy-MM-dd").format(customer.getCusBrithday())); |
| | | patientInfor.addChildElement("VisitNo").addTextNode(tjOrder.getTjNumber()); |
| | | patientInfor.addChildElement("PatientId").addTextNode(String.valueOf(customer.getCusId())); |
| | | patientInfor.addChildElement("HospitalID").addTextNode("shanxiqinxamjyy"); |
| | | patientInfor.addChildElement("IdCard").addTextNode(customer.getCusIdcard()); |
| | | patientInfor.addChildElement("PatientName").addTextNode(customer.getCusName()); |
| | | patientInfor.addChildElement("PatType").addTextNode("P"); |
| | | |
| | | // ExamItemList 部分 |
| | | SOAPElement examItemList = rootElement.addChildElement("ExamItemList"); |
| | | |
| | | String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); |
| | | for (TjProject project : projects) { |
| | | SOAPElement examItem = examItemList.addChildElement("ExamItem"); |
| | | examItem.addChildElement("HisID").addTextNode(tjOrder.getTjNumber() + String.valueOf(project.getProId()).substring(String.valueOf(project.getProId()).length() - 4)); |
| | | examItem.addChildElement("EmergencyFlag").addTextNode("0"); |
| | | examItem.addChildElement("ExamItemID").addTextNode(project.getHisXmbm()); |
| | | examItem.addChildElement("ExamItemName").addTextNode(project.getHisXmmc()); |
| | | examItem.addChildElement("OrderDT").addTextNode(date); |
| | | SysDept dept = deptService.getById(project.getDeptId()); |
| | | examItem.addChildElement("Modality").addTextNode(dept.getModality()); |
| | | examItem.addChildElement("ChargeFlag").addTextNode("1"); |
| | | } |
| | | |
| | | // 保存SOAP消息 |
| | | soapMessage.saveChanges(); |
| | | |
| | | // 打印生成的SOAP请求 |
| | | System.out.println("生成的SOAP请求内容:"); |
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); |
| | | soapMessage.writeTo(byteArrayOutputStream); |
| | | xmlRequest = byteArrayOutputStream.toString("UTF-8"); |
| | | } catch (SOAPException | IOException e) { |
| | | log.error("SOAP异常 ->{}",String.valueOf(e)); |
| | | } |
| | | examItem.put("ExamItem",list); |
| | | hashMap.put("PatientInfor",patientInfo); |
| | | hashMap.put("ExamItemList",examItem); |
| | | root.put("Root",hashMap); |
| | | String result = HttpRequest.post("http://10.100.100.222:8000/WebInterfaceService.asmx") |
| | | .body(XmlUtil.mapToXmlStr(root)).contentType("application/xml;charset:utf-8;").execute().body(); |
| | | String s = XmlUtil.mapToXmlStr(root); |
| | | log.info("调用pacs传递参数的值为: "+s); |
| | | |
| | | |
| | | // HashMap<String, Object> patientInfo = new HashMap<>(); |
| | | // patientInfo.put("PatientId",customer.getCusId()); |
| | | // patientInfo.put("VisitNo",tjOrder.getTjNumber()); |
| | | // patientInfo.put("PatType","P"); |
| | | // patientInfo.put("PatientName",customer.getCusName()); |
| | | // if (customer.getCusSex() == 0) patientInfo.put("PatientSex","M"); |
| | | // else if (customer.getCusSex() == 1) patientInfo.put("PatientSex","F"); |
| | | // else patientInfo.put("PatientSex","O"); |
| | | // patientInfo.put("PatBirthday",new SimpleDateFormat("yyyy-MM-dd").format(customer.getCusBrithday())); |
| | | // patientInfo.put("IdCard",customer.getCusIdcard()); |
| | | // patientInfo.put("hospitalid","chkwyy"); |
| | | // patientInfo.put("HospitalID",hospbm); |
| | | // |
| | | // HashMap<String, Object> examItemList = new HashMap<>(); |
| | | // List<Map<String, Object>> examItemsList = new ArrayList<>(); |
| | | String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); |
| | | // |
| | | // for (TjProject project : projects) { |
| | | // HashMap<String, Object> examItem = new HashMap<>(); |
| | | // // 申请单号规则:体检号_project.getProId()后四位 |
| | | // examItem.put("HisID", tjOrder.getTjNumber() + String.valueOf(project.getProId()).substring(String.valueOf(project.getProId()).length() - 4)); |
| | | // examItem.put("EmergencyFlag", "0"); |
| | | // examItem.put("ExamItemID", project.getHisXmbm()); |
| | | // examItem.put("ExamItemName", project.getHisXmmc()); |
| | | // examItem.put("OrderDT", date); |
| | | // |
| | | // SysDept dept = deptService.getById(project.getDeptId()); |
| | | // examItem.put("Modality", dept.getModality()); |
| | | // // 收费标识:1 是收费,0 未收费 |
| | | // examItem.put("ChargeFlag", "1"); |
| | | // |
| | | // examItemsList.add(examItem); // 将每个ExamItem添加到集合 |
| | | // } |
| | | // |
| | | // // 构造最终的ExamItemList |
| | | // examItemList.put("ExamItem", examItemsList); |
| | | // hashMap.put("ExamItemList", examItemList); |
| | | // |
| | | // hashMap.put("PatientInfor", patientInfo); |
| | | // |
| | | // // 将数据封装到根节点 |
| | | // root.put("Root", hashMap); |
| | | // |
| | | // // 使用Hutool将Map转换为XML字符串 |
| | | // String xmlRequest = XmlUtil.mapToXmlStr(root); |
| | | |
| | | String result = "1"; |
| | | log.info("调用pacs传递参数的值为: "+xmlRequest); |
| | | Map<String, Object> map = XmlUtil.xmlToMap(result); |
| | | if (map.get("Code").toString().equals("1")){ |
| | | for (TjProject project : projects) { |
| | |
| | | import com.sun.org.apache.xpath.internal.operations.Bool; |
| | | import jodd.util.StringUtil; |
| | | 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.security.PrivateKey; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | private LtkjExamJcsqdService ltkjExamJcsqdService; |
| | | @Autowired |
| | | private LtkjExamJcbgdService ltkjExamJcbgdService; |
| | | @Autowired |
| | | private PacsApiMethodService pacsApiMethodService; |
| | | |
| | | // 体检开检查申请单调用此接口推送给pacs服务 |
| | | public boolean OrderAdd(String tjNumber) |
| | |
| | | return XmlUtil.mapToXmlStr(hashMap); |
| | | } |
| | | |
| | | //@PostMapping("QueryOrder") |
| | | // @PostMapping("QueryOrder") |
| | | private String queryOrder(@RequestBody String json){ |
| | | Map<String, Object> map = XmlUtil.xmlToMap(json); |
| | | JSONObject parseObj = JSONUtil.parseObj(map); |
| | |
| | | return XmlUtil.mapToXmlStr(hashMap) |
| | | .replaceAll("<","<").replaceAll(">",">"); |
| | | } |
| | | |
| | | @GetMapping("test") |
| | | public String test(){ |
| | | TjCustomer tjCustomer = customerService.getById(1870373229901938690L); |
| | | LambdaQueryWrapper<TjOrder> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjOrder::getUserId,tjCustomer.getCusId()); |
| | | TjOrder order = tjOrderService.getOne(wrapper); |
| | | pacsApiMethodService.OrderAdd(tjCustomer,order); |
| | | return "1111"; |
| | | } |
| | | } |
| | |
| | | @Override |
| | | // @Async("async") |
| | | // @Transactional |
| | | public Boolean iundividualCharges(TjFlowingWater tjFlowingWater, TjOrder order, TjCustomer customer, SysUser sysUser) { |
| | | public Boolean iundividualCharges(TjFlowingWater tjFlowingWater, TjOrder order, TjCustomer customer, SysUser sysUser,String jxbz) { |
| | | Date dates = new Date(); |
| | | final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | String jxbz = DateUtil.format(dates, "yyyyMMddHHmmss")+order.getOrderId(); |
| | | |
| | | tjFlowingWater.setJxbz(jxbz); |
| | | tjFlowingWaterService.updateById(tjFlowingWater); |
| | |
| | | import com.ltkj.system.domain.SysUserPost; |
| | | import com.ltkj.system.service.*; |
| | | import com.ltkj.web.controller.his.HisApiGetMethodService; |
| | | import com.ltkj.web.wxUtils.HttpClientUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | return AjaxResult.error("未查询到缴费记录"); |
| | | } |
| | | } |
| | | String s = configService.selectConfigByKey("is_request_common_his_api"); |
| | | if (null != s && s.equals("Y")) { |
| | | LambdaQueryWrapper<TjFlowingWater> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.eq(TjFlowingWater::getOrderId,tjOrder.getOrderId()); |
| | | wrapper1.eq(TjFlowingWater::getPayStasus,0L); |
| | | List<TjFlowingWater> list = tjFlowingWaterService.list(wrapper1); |
| | | if (!list.isEmpty()){ |
| | | return AjaxResult.error("存在未缴费项目"); |
| | | } |
| | | } |
| | | } |
| | | }else { |
| | | log.error("路泰科技--- "+DateUtil.date()+" 未对接his接口 "+" 体检号 "+tjOrder.getTjNumber()); |
| | |
| | | import com.ltkj.web.controller.his.HisApiGetMethodService; |
| | | import com.ltkj.web.controller.his.HisApiMethod; |
| | | import com.ltkj.web.controller.his.HisApiMethodService; |
| | | import com.ltkj.web.wxUtils.HttpClientUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | import com.ltkj.common.utils.poi.ExcelUtil; |
| | | import com.ltkj.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | |
| | | AjaxResult tjCustomer1 = suijieHisXinXi(tjCustomer, date); |
| | | if (tjCustomer1 != null) return tjCustomer1; |
| | | } else { |
| | | if (tjCustomerService.save(tjCustomer)) { |
| | | return AjaxResult.success(tjCustomer); |
| | | String s = sysConfigService.selectConfigByKey("is_request_common_his_api"); |
| | | if (null != s && s.equals("Y")){ |
| | | String apiUrl = sysConfigService.selectConfigByKey("common_api_url"); |
| | | String hospbm = sysConfigService.selectConfigByKey("common_api_service_hospbm"); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("cardId",""); |
| | | map.put("cusName",tjCustomer.getCusName()); |
| | | map.put("cusSex",tjCustomer.getCusSex()); |
| | | map.put("cusIdCard",tjCustomer.getCusIdcard()); |
| | | map.put("compId",tjCustomer.getCompId()); |
| | | map.put("cusBrithday",tjCustomer.getCusBrithday() != null ? DateUtil.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd") : ""); |
| | | map.put("cusAddr",tjCustomer.getCusAddr()); |
| | | map.put("cusPhone",tjCustomer.getCusPhone()); |
| | | map.put("compName",tjCustomer.getCompName()); |
| | | String post = HttpClientUtils.sendPost(apiUrl+"/api/his/"+hospbm+"/creat", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("code").equals("200")){ |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | tjCustomer.setPationId(data.getStr("pationId")); |
| | | tjCustomer.setCardId(data.getStr("cardId")); |
| | | tjCustomer.setHisJzkh(data.getStr("cardId")); |
| | | if (tjCustomerService.save(tjCustomer)) { |
| | | return AjaxResult.success(tjCustomer); |
| | | } |
| | | }else return AjaxResult.error(); |
| | | }else { |
| | | if (tjCustomerService.save(tjCustomer)) { |
| | | return AjaxResult.success(tjCustomer); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.error(); |
| | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.extra.pinyin.PinyinUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.common.annotation.RepeatSubmit; |
| | | import com.ltkj.common.core.domain.entity.SysDept; |
| | | import com.ltkj.common.core.domain.entity.SysUser; |
| | | import com.ltkj.common.utils.SecurityUtils; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | |
| | | import com.ltkj.hosp.vodomain.TjCollectFeesVo; |
| | | import com.ltkj.hosp.vodomain.TjRefundProInfoVo; |
| | | import com.ltkj.hosp.vodomain.TjRefundVo; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import com.ltkj.system.service.ISysDeptService; |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import com.ltkj.web.wxUtils.HttpClientUtils; |
| | | 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.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | |
| | | private IJimuOnlineReportService reportService; |
| | | @Resource |
| | | private ITjPackageProjectService tjPackageProjectService; |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | @Autowired |
| | | private ISysDeptService sysDeptService; |
| | | @Autowired |
| | | private TjFlowingWaterHisService tjFlowingWaterHisService; |
| | | |
| | | /** |
| | | * 查询该体检号对应的订单流水列表 |
| | |
| | | tjFlowingWater.setWaterId(PinyinUtil.getFirstLetter(customer.getCusName(), "").toUpperCase() +SecurityUtils.getUsername() + DateUtil.format(new Date(), "yyMMddHHmmssSSS")); |
| | | tjFlowingWater.setIsAddition("Y"); |
| | | if (tjFlowingWaterService.save(tjFlowingWater)) { |
| | | |
| | | Date dates = new Date(); |
| | | String jxbz = DateUtil.format(dates, "yyyyMMddHHmmss")+order.getOrderId(); |
| | | //异步单项收费明细 |
| | | Boolean b = asyncService.iundividualCharges(tjFlowingWater, order, customer, sysUser); |
| | | Boolean b = asyncService.iundividualCharges(tjFlowingWater, order, customer, sysUser,jxbz); |
| | | if (!b){ |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | String s = configService.selectConfigByKey("is_request_common_his_api"); |
| | | if (null != s && s.equals("Y") && order.getTjType().equals("2")) { |
| | | String apiUrl = configService.selectConfigByKey("common_api_url"); |
| | | String hospbm = configService.selectConfigByKey("common_api_service_hospbm"); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("pationId",customer.getPationId()); |
| | | map.put("cardId",customer.getHisJzkh()); |
| | | map.put("tjNum",tjFlowingWater.getTjSerialNumber()); |
| | | map.put("kaiDanKs","7805"); |
| | | // 收费标志 1待售费 2待退费 |
| | | map.put("shouTuiStatus","1"); |
| | | |
| | | JSONArray array = JSONUtil.createArray(); |
| | | LambdaQueryWrapper<TbTransition> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TbTransition::getTjNum,order.getTjNumber()); |
| | | wrapper.eq(TbTransition::getCusId,customer.getCusIdcard()); |
| | | wrapper.eq(TbTransition::getCardId,customer.getCardId()); |
| | | wrapper.eq(TbTransition::getJxbz,jxbz); |
| | | wrapper.isNotNull(TbTransition::getOrdPrice); |
| | | wrapper.gt(TbTransition::getOrdPrice,0); |
| | | |
| | | List<TbTransition> list = transitionService.list(wrapper); |
| | | for (TbTransition transition : list) { |
| | | LambdaQueryWrapper<TjProject> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.eq(TjProject::getProId,transition.getProId()); |
| | | TjProject project = projectService.getOne(wrapper1); |
| | | |
| | | LambdaQueryWrapper<SysDept> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(SysDept::getDeptId,project.getDeptId()); |
| | | SysDept dept = sysDeptService.getOne(wrapper2); |
| | | |
| | | JSONObject obj = JSONUtil.createObj(); |
| | | BigDecimal danjia = transition.getOrdPrice(); |
| | | Integer sl = project.getSl(); |
| | | BigDecimal allPrice = danjia.multiply(new BigDecimal(sl)); |
| | | obj.putOpt("danJia",danjia); |
| | | obj.putOpt("jieSuanJe",allPrice); |
| | | obj.putOpt("shuliang",sl); |
| | | obj.putOpt("zhiXingKs",dept.getDeptId()); |
| | | obj.putOpt("zhiXingKsMc",dept.getDeptName()); |
| | | obj.putOpt("shouFeiXmId",project.getHisXmbm()); |
| | | obj.putOpt("shouFeiXmMc",project.getHisXmmc()); |
| | | |
| | | // obj.putOpt("zhiXingKs","7805"); |
| | | // obj.putOpt("zhiXingKsMc","体检科"); |
| | | // obj.putOpt("shouFeiXmId","4735346"); |
| | | // obj.putOpt("shouFeiXmMc","体检费"); |
| | | array.add(obj); |
| | | } |
| | | map.put("feiYongInfoList",array); |
| | | |
| | | String post = HttpClientUtils.sendPost(apiUrl + "/api/his/"+hospbm+"/creatCostInfo", map); |
| | | JSONObject object = JSONUtil.parseObj(post); |
| | | if (object.getInt("code") == 200) { |
| | | JSONObject data = object.getJSONObject("data"); |
| | | tjFlowingWater.setHisWaterId(data.getStr("feiYongId")); |
| | | JSONArray mxList = data.getJSONArray("mxList"); |
| | | if (mxList != null && mxList.size() > 0) { |
| | | List<TjFlowingWaterHis> his = mxList.toList(TjFlowingWaterHis.class); |
| | | tjFlowingWaterHisService.saveBatch(his); |
| | | } |
| | | tjFlowingWaterService.updateById(tjFlowingWater); |
| | | }else { |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | // if(!b){ |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | // } |
| | |
| | | import com.ltkj.web.controller.lis.LisApiMethod; |
| | | import com.ltkj.web.controller.pacs.PacsApiMethodService; |
| | | import com.ltkj.web.controller.service.TjSysAsyncServiceImpl; |
| | | import com.ltkj.web.wxUtils.HttpClientUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | private LisJyflhbService lisJyflhbService; |
| | | @Autowired |
| | | private ISysDictDataService sysDictDataService; |
| | | @Autowired |
| | | private TjFlowingWaterHisService tjFlowingWaterHisService; |
| | | |
| | | //将方法返回值解析成json格式 |
| | | public JSONObject getJSONObject(String builder) { |
| | |
| | | newSaveextracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater); |
| | | List<TjOrderDetail> detailList = tjOrderDetailService.getCaiYangDengJi(tjOrder.getOrderId()); |
| | | addCaiYangDengJi(detailList, !detailList.isEmpty(), tjOrder, sysUser, null); |
| | | |
| | | |
| | | String s = configService.selectConfigByKey("is_request_common_his_api"); |
| | | if (null != s && s.equals("Y")) { |
| | | String apiUrl = configService.selectConfigByKey("common_api_url"); |
| | | String hospbm = configService.selectConfigByKey("common_api_service_hospbm"); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("pationId",tjCustomer.getPationId()); |
| | | map.put("cardId",tjCustomer.getHisJzkh()); |
| | | map.put("tjNum",tjFlowingWater.getTjSerialNumber()); |
| | | map.put("kaiDanKs","7805"); |
| | | // 收费标志 1待售费 2待退费 |
| | | map.put("shouTuiStatus","1"); |
| | | |
| | | JSONArray array = JSONUtil.createArray(); |
| | | LambdaQueryWrapper<TbTransition> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TbTransition::getTjNum,tjOrder.getTjNumber()); |
| | | wrapper.eq(TbTransition::getCusId,tjCustomer.getCusIdcard()); |
| | | wrapper.eq(TbTransition::getCardId,tjCustomer.getCardId()); |
| | | wrapper.isNotNull(TbTransition::getOrdPrice); |
| | | wrapper.gt(TbTransition::getOrdPrice,0); |
| | | |
| | | List<TbTransition> list = tbTransitionService.list(wrapper); |
| | | for (TbTransition transition : list) { |
| | | LambdaQueryWrapper<TjProject> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.eq(TjProject::getProId,transition.getProId()); |
| | | TjProject project = projectService.getOne(wrapper1); |
| | | |
| | | LambdaQueryWrapper<SysDept> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(SysDept::getDeptId,project.getDeptId()); |
| | | SysDept dept = sysDeptService.getOne(wrapper2); |
| | | |
| | | JSONObject obj = JSONUtil.createObj(); |
| | | Integer sl = project.getSl(); |
| | | BigDecimal danjia = transition.getOrdPrice(); |
| | | BigDecimal allPrice = danjia.multiply(new BigDecimal(sl)); |
| | | obj.putOpt("danJia",danjia); |
| | | obj.putOpt("jieSuanJe",allPrice); |
| | | obj.putOpt("shuliang",sl); |
| | | obj.putOpt("zhiXingKs",dept.getDeptId()); |
| | | obj.putOpt("zhiXingKsMc",dept.getDeptName()); |
| | | obj.putOpt("shouFeiXmId",project.getHisXmbm()); |
| | | obj.putOpt("shouFeiXmMc",project.getHisXmmc()); |
| | | |
| | | // obj.putOpt("zhiXingKs","7805"); |
| | | // obj.putOpt("zhiXingKsMc","体检科"); |
| | | // obj.putOpt("shouFeiXmId","4735346"); |
| | | // obj.putOpt("shouFeiXmMc","体检费"); |
| | | array.add(obj); |
| | | } |
| | | map.put("feiYongInfoList",array); |
| | | |
| | | String post = HttpClientUtils.sendPost(apiUrl + "/api/his/"+hospbm+"/creatCostInfo", map); |
| | | JSONObject object = JSONUtil.parseObj(post); |
| | | if (object.getInt("code") == 200) { |
| | | JSONObject data = object.getJSONObject("data"); |
| | | tjFlowingWater.setHisWaterId(data.getStr("feiYongId")); |
| | | JSONArray mxList = data.getJSONArray("mxList"); |
| | | if (mxList != null && mxList.size() > 0) { |
| | | List<TjFlowingWaterHis> his = mxList.toList(TjFlowingWaterHis.class); |
| | | tjFlowingWaterHisService.saveBatch(his); |
| | | } |
| | | tjFlowingWaterService.updateById(tjFlowingWater); |
| | | }else { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | } |
| | | // 查询 对接Lis、Pacs申请如果类型包含在配置内则使用对接lis、pacs |
| | | if (lisApiMethod.isUseLisAndPacsRegister(tjOrder)) { |
| | |
| | | // return AjaxResult.error("该用户已收费不可撤销签到!"); |
| | | // } |
| | | if (null != order.getFinishTime()) return AjaxResult.error("该人员已签离,不可撤销!!!"); |
| | | tjOrderService.deleteTjOrderByOrderId(order.getOrderId()); |
| | | tjOrderDetailService.deleteTjOrderDetailByOrderDetailId(String.valueOf(order.getOrderId())); |
| | | remarkService.deletedOrderRemarkByTjNum(tjNum); |
| | | tjFlowingWaterService.deleteTjFlowingWaterByOrderId(String.valueOf(order.getOrderId())); |
| | | transitionService.deletedTbTransitionByTjNum(tjNum); |
| | | |
| | | TjCustomer customer = tjCustomerService.getById(order.getUserId()); |
| | | customer.setCardId("0"); |
| | | tjCustomerService.updateById(customer); |
| | | String s = configService.selectConfigByKey("is_request_common_his_api"); |
| | | if (null != s && s.equals("Y") && "2".equals(order.getTjType())){ |
| | | String apiUrl = configService.selectConfigByKey("common_api_url"); |
| | | String hospbm = configService.selectConfigByKey("common_api_service_hospbm"); |
| | | |
| | | ArrayList<TjFlowingWater> weizhifu = new ArrayList<>(); |
| | | ArrayList<TjFlowingWater> yizhifu = new ArrayList<>(); |
| | | LambdaQueryWrapper<TjFlowingWater> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.eq(TjFlowingWater::getOrderId, order.getOrderId()); |
| | | List<TjFlowingWater> list = tjFlowingWaterService.list(wrapper1); |
| | | LambdaQueryWrapper<TjCustomer> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjCustomer::getCusId,order.getUserId()); |
| | | TjCustomer tjCustomer = tjCustomerService.getOne(wrapper); |
| | | |
| | | for (TjFlowingWater water : list) { |
| | | if (water.getPayStasus() == 0L){ |
| | | weizhifu.add(water); |
| | | }else { |
| | | yizhifu.add(water); |
| | | } |
| | | } |
| | | |
| | | AjaxResult error = zuofeiWeiZhifu(weizhifu, tjCustomer, apiUrl, hospbm, order,true,tjNum); |
| | | if (error != null && !error.get("code").toString().equals("200")) return error; |
| | | |
| | | AjaxResult error1 = zuofeiYiZhifu(yizhifu, tjCustomer, order, apiUrl, hospbm,false,tjNum); |
| | | if (error1 != null && !error.get("code").toString().equals("200")) return error1; |
| | | }else { |
| | | tjOrderService.deleteTjOrderByOrderId(order.getOrderId()); |
| | | tjOrderDetailService.deleteTjOrderDetailByOrderDetailId(String.valueOf(order.getOrderId())); |
| | | remarkService.deletedOrderRemarkByTjNum(tjNum); |
| | | tjFlowingWaterService.deleteTjFlowingWaterByOrderId(String.valueOf(order.getOrderId())); |
| | | transitionService.deletedTbTransitionByTjNum(tjNum); |
| | | |
| | | TjCustomer customer = tjCustomerService.getById(order.getUserId()); |
| | | customer.setCardId("0"); |
| | | tjCustomerService.updateById(customer); |
| | | |
| | | tjSamplingMapper.deleteByTjNumAndCusId(tjNum, order.getUserId()); |
| | | } |
| | | |
| | | String configByKey = configService.selectConfigByKey("sfkqdyhis"); |
| | | tjSamplingMapper.deleteByTjNumAndCusId(tjNum, order.getUserId()); |
| | | if (configByKey.equals("Y")) { |
| | | |
| | | HashMap<String, Object> hisRequestParams = new HashMap<>(); |
| | |
| | | return AjaxResult.error("撤销失败,调用作废出现失败"); |
| | | } |
| | | } |
| | | try { |
| | | extracted(dto, order); |
| | | } catch (Exception e) { |
| | | log.info("撤销失败,删除表失败"); |
| | | return AjaxResult.error("撤销失败,删除表失败!"); |
| | | String s = configService.selectConfigByKey("is_request_common_his_api"); |
| | | if (null != s && s.equals("Y") && "2".equals(order.getTjType())) { |
| | | ArrayList<TjFlowingWater> weizhifu = new ArrayList<>(); |
| | | ArrayList<TjFlowingWater> yizhifu = new ArrayList<>(); |
| | | for (String bldh : dto.getBldhs()) { |
| | | LambdaQueryWrapper<TjFlowingWater> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjFlowingWater::getJxbz,bldh); |
| | | TjFlowingWater water = tjFlowingWaterService.getOne(wrapper); |
| | | if (water.getPayStasus() == 0L){ |
| | | weizhifu.add(water); |
| | | }else { |
| | | yizhifu.add(water); |
| | | } |
| | | } |
| | | String apiUrl = configService.selectConfigByKey("common_api_url"); |
| | | String hospbm = configService.selectConfigByKey("common_api_service_hospbm"); |
| | | LambdaQueryWrapper<TjCustomer> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjCustomer::getCusId,order.getUserId()); |
| | | TjCustomer tjCustomer = tjCustomerService.getOne(wrapper); |
| | | AjaxResult error = zuofeiWeiZhifu(weizhifu, tjCustomer, apiUrl, hospbm, order,true,dto.getTjh()); |
| | | if (error != null && !error.get("code").toString().equals("200")) return error; |
| | | |
| | | AjaxResult error1 = zuofeiYiZhifu(yizhifu, tjCustomer, order, apiUrl, hospbm,false,dto.getTjh()); |
| | | if (error1 != null && !error.get("code").toString().equals("200")) return error1; |
| | | return AjaxResult.success(); |
| | | }else { |
| | | try { |
| | | extracted(dto, order); |
| | | } catch (Exception e) { |
| | | log.info("撤销失败,删除表失败"); |
| | | return AjaxResult.error("撤销失败,删除表失败!"); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | private AjaxResult zuofeiYiZhifu(ArrayList<TjFlowingWater> yizhifu, TjCustomer tjCustomer, TjOrder order, String apiUrl, String hospbm,Boolean isDelete,String tjNum) { |
| | | if (!yizhifu.isEmpty()){ |
| | | for (TjFlowingWater water : yizhifu) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("pationId", tjCustomer.getPationId()); |
| | | map.put("cardId", tjCustomer.getHisJzkh()); |
| | | map.put("tjNum", water.getTjSerialNumber()); |
| | | map.put("kaiDanKs","7805"); |
| | | // 收费标志 1待售费 2待退费 |
| | | map.put("shouTuiStatus","2"); |
| | | JSONArray array = JSONUtil.createArray(); |
| | | String bldh = water.getJxbz(); |
| | | List<TbTransition> list; |
| | | if (bldh != null){ |
| | | LambdaQueryWrapper<TbTransition> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.eq(TbTransition::getJxbz,bldh); |
| | | wrapper1.gt(TbTransition::getOrdPrice,0); |
| | | list = tbTransitionService.list(wrapper1); |
| | | }else { |
| | | LambdaQueryWrapper<TbTransition> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.isNull(TbTransition::getJxbz); |
| | | wrapper1.eq(TbTransition::getTjNum,tjNum); |
| | | wrapper1.gt(TbTransition::getOrdPrice,0); |
| | | list = tbTransitionService.list(wrapper1); |
| | | } |
| | | for (TbTransition transition : list) { |
| | | LambdaQueryWrapper<TjProject> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(TjProject::getProId,transition.getProId()); |
| | | TjProject project = projectService.getOne(queryWrapper); |
| | | LambdaQueryWrapper<TjFlowingWaterHis> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(TjFlowingWaterHis::getParentId,water.getHisWaterId()); |
| | | wrapper2.eq(TjFlowingWaterHis::getXmId,project.getHisXmbm()); |
| | | List<TjFlowingWaterHis> list1 = tjFlowingWaterHisService.list(wrapper2); |
| | | for (TjFlowingWaterHis waterHis : list1) { |
| | | LambdaQueryWrapper<SysDept> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(SysDept::getDeptId,project.getDeptId()); |
| | | SysDept dept = sysDeptService.getOne(wrapper); |
| | | JSONObject obj = JSONUtil.createObj(); |
| | | BigDecimal danjia = transition.getOrdPrice(); |
| | | Integer sl = project.getSl(); |
| | | BigDecimal allPrice = danjia.multiply(new BigDecimal(sl)); |
| | | obj.putOpt("danJia",danjia); |
| | | obj.putOpt("jieSuanJe",allPrice.negate()); |
| | | obj.putOpt("shuliang",Math.negateExact(sl)); |
| | | obj.putOpt("feiYongMxId",waterHis.getCurrentId()); |
| | | obj.putOpt("feiYongId",water.getHisWaterId()); |
| | | obj.putOpt("zhiXingKs",dept.getDeptId()); |
| | | obj.putOpt("zhiXingKsMc",dept.getDeptName()); |
| | | obj.putOpt("shouFeiXmId",project.getHisXmbm()); |
| | | obj.putOpt("shouFeiXmMc",project.getHisXmmc()); |
| | | |
| | | // obj.putOpt("zhiXingKs","7805"); |
| | | // obj.putOpt("zhiXingKsMc","体检科"); |
| | | // obj.putOpt("shouFeiXmId","4735346"); |
| | | // obj.putOpt("shouFeiXmMc","体检费"); |
| | | array.add(obj); |
| | | } |
| | | |
| | | } |
| | | map.put("feiYongInfoList",array); |
| | | log.info("退费申请 入参 -> {}",JSONUtil.toJsonStr(map)); |
| | | String post = HttpClientUtils.sendPost(apiUrl + "/api/his/"+ hospbm +"/creatCostInfo", map); |
| | | log.info("退费申请 返回 -> {}",JSONUtil.toJsonStr(post)); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("code").equals("200")) { |
| | | // hisTfWaterId |
| | | String tfid = jsonObject.getJSONObject("data").getStr("feiYongId"); |
| | | water.setHisTfWaterId(tfid); |
| | | tjFlowingWaterService.updateById(water); |
| | | if (isDelete) { |
| | | for (TjFlowingWater water1 : yizhifu) { |
| | | String bldh1 = water1.getJxbz(); |
| | | remarkService.deleteTjOrderDetailByjxbz(bldh1); |
| | | tjOrderDetailService.deleteTjOrderDetailByjxbz(bldh1); |
| | | tjFlowingWaterService.deleteTjOrderDetailByjxbz(bldh1); |
| | | transitionService.deleteTjOrderDetailByjxbz(bldh1); |
| | | blService.remove(new LambdaQueryWrapper<TjProBl>().eq(TjProBl::getTjh, tjNum).eq(TjProBl::getBldh, bldh1)); |
| | | tjSamplingMapper.deleteByTjNumAndCusIdAndJxbzo(tjNum, order.getUserId(), bldh1); |
| | | } |
| | | } |
| | | }else return AjaxResult.error(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private AjaxResult zuofeiWeiZhifu(ArrayList<TjFlowingWater> weizhifu, TjCustomer tjCustomer, String apiUrl, String hospbm, TjOrder order,Boolean isDelete,String tjNum) { |
| | | if (!weizhifu.isEmpty()){ |
| | | HashMap<String, Object> chexiaoMap = new HashMap<>(); |
| | | chexiaoMap.put("pationId", tjCustomer.getPationId()); |
| | | chexiaoMap.put("cardId", tjCustomer.getHisJzkh()); |
| | | String feiyongList = weizhifu.stream().map(TjFlowingWater::getHisWaterId).collect(Collectors.joining(",")); |
| | | chexiaoMap.put("feiYongIdList",feiyongList.trim().replaceAll(" ","")); |
| | | |
| | | String post = HttpClientUtils.sendPost(apiUrl + "/api/his/"+ hospbm +"/revokeCost", chexiaoMap); |
| | | if (JSONUtil.parseObj(post).getStr("code").equals("200")) { |
| | | if (isDelete) { |
| | | for (TjFlowingWater water : weizhifu) { |
| | | String bldh = water.getJxbz(); |
| | | remarkService.deleteTjOrderDetailByjxbz(bldh); |
| | | tjOrderDetailService.deleteTjOrderDetailByjxbz(bldh); |
| | | tjFlowingWaterService.deleteTjOrderDetailByjxbz(bldh); |
| | | transitionService.deleteTjOrderDetailByjxbz(bldh); |
| | | blService.remove(new LambdaQueryWrapper<TjProBl>().eq(TjProBl::getTjh, tjNum).eq(TjProBl::getBldh, bldh)); |
| | | tjSamplingMapper.deleteByTjNumAndCusIdAndJxbzo(tjNum, order.getUserId(), bldh); |
| | | } |
| | | } |
| | | } else return AjaxResult.error(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // @Transactional(propagation =Propagation.REQUIRES_NEW) |
| | | public void extracted(TjProBlDto dto, TjOrder order) { |
| | | for (String bldh : dto.getBldhs()) { |
| | |
| | | // 静态资源,可匿名访问 |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() |
| | | .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | | .antMatchers("/jmreport/**","/lis/**","/pacs/**").anonymous() |
| | | .antMatchers("/jmreport/**","/lis/**","/pacs/**","/callBack/**").anonymous() |
| | | // 除上面外的所有请求全部需要鉴权认证 |
| | | .anyRequest().authenticated() |
| | | .and() |
| | |
| | | "/cus/package/getPackageList", |
| | | "/cus/package/projectListByPacId/**", |
| | | "/cus/hospital/getHospList", |
| | | "/lis/**","/api/His/**","/pacs/**" |
| | | "/lis/**","/api/His/**","/pacs/**", |
| | | "/callBack/**" |
| | | }); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ltkj.hosp.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * his字典同步表 |
| | | * @TableName his_sync_dict |
| | | */ |
| | | @TableName(value ="his_sync_dict") |
| | | @Data |
| | | public class HisSyncDict implements Serializable { |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 字典参数 |
| | | */ |
| | | private String dictName; |
| | | |
| | | /** |
| | | * 是否分页 0否1是 |
| | | */ |
| | | private Integer isLimit; |
| | | |
| | | /** |
| | | * 请求地址 |
| | | */ |
| | | private String url; |
| | | |
| | | /** |
| | | * 请求参数 |
| | | */ |
| | | private String params; |
| | | |
| | | /** |
| | | * 院区id |
| | | */ |
| | | private String hospId; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| | |
| | | |
| | | private String compName; |
| | | |
| | | private String hisJzkh; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| | |
| | | .append("dwPhone", getDwPhone()) |
| | | .append("compId", getDictCompId()) |
| | | .append("compName", getCompName()) |
| | | .append("hisJzkh", getHisJzkh()) |
| | | .toString(); |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value = "加项标志") |
| | | private String jxbz; |
| | | |
| | | /** |
| | | * 收费id |
| | | */ |
| | | private String hisWaterId; |
| | | |
| | | /** |
| | | * 退费id |
| | | */ |
| | | private String hisTfWaterId; |
| | | |
| | | |
| | | @Override |
| | | public String toString() { |
| | |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("deleted", getDeleted()) |
| | | .append("hisWaterId", getHisWaterId()) |
| | | .toString(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ltkj.hosp.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * his订单流水关联 |
| | | * @TableName tj_flowing_water_his |
| | | */ |
| | | @TableName(value ="tj_flowing_water_his") |
| | | @Data |
| | | public class TjFlowingWaterHis implements Serializable { |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @TableId |
| | | private Long id; |
| | | |
| | | /** |
| | | * 总开单id |
| | | */ |
| | | private String parentId; |
| | | |
| | | /** |
| | | * 当前项目订单id |
| | | */ |
| | | private String currentId; |
| | | |
| | | /** |
| | | * his项目id |
| | | */ |
| | | private String xmId; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
New file |
| | |
| | | package com.ltkj.hosp.mapper; |
| | | |
| | | import com.ltkj.hosp.domain.HisSyncDict; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author 10845 |
| | | * @description 针对表【his_sync_dict(his字典同步表)】的数据库操作Mapper |
| | | * @createDate 2024-12-23 10:58:51 |
| | | * @Entity com.ltkj.hosp.domain.HisSyncDict |
| | | */ |
| | | public interface HisSyncDictMapper extends BaseMapper<HisSyncDict> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.ltkj.hosp.mapper; |
| | | |
| | | import com.ltkj.hosp.domain.TjFlowingWaterHis; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author 10845 |
| | | * @description 针对表【tj_flowing_water_his(his订单流水关联)】的数据库操作Mapper |
| | | * @createDate 2024-12-23 10:52:23 |
| | | * @Entity com.ltkj.hosp.domain.TjFlowingWaterHis |
| | | */ |
| | | public interface TjFlowingWaterHisMapper extends BaseMapper<TjFlowingWaterHis> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | int deleteByTjNumAndCusIdAndJxbz(@Param("tjNum") String tjNum,@Param("userId") Long userId,@Param("ids")List<String> ids); |
| | | |
| | | |
| | | @Delete("DELETE FROM tj_sampling WHERE tj_num = #{tjNum} AND cus_id = #{userId} and jxbz = #{jxbz} ") |
| | | int deleteByTjNumAndCusIdAndJxbzo(@Param("tjNum") String tjNum,@Param("userId") Long userId,@Param("jxbz")String jxbz); |
| | | |
| | | |
| | | @Select({"<script>","SELECT\n" + |
| | | " IFNULL(GROUP_CONCAT( aa.pro_name SEPARATOR ' ; ' ),NULL)\n" + |
| | | "FROM\n" + |
New file |
| | |
| | | package com.ltkj.hosp.service; |
| | | |
| | | import com.ltkj.hosp.domain.HisSyncDict; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @author 10845 |
| | | * @description 针对表【his_sync_dict(his字典同步表)】的数据库操作Service |
| | | * @createDate 2024-12-23 10:58:51 |
| | | */ |
| | | public interface HisSyncDictService extends IService<HisSyncDict> { |
| | | |
| | | } |
| | |
| | | void updateOrdeltile2(TjOrderDetail tjOrderDetail, SysUser sysUser); |
| | | |
| | | //单项收费 |
| | | Boolean iundividualCharges(TjFlowingWater tjFlowingWater, TjOrder order, TjCustomer customer, SysUser sysUser); |
| | | Boolean iundividualCharges(TjFlowingWater tjFlowingWater, TjOrder order, TjCustomer customer, SysUser sysUser,String jxbz); |
| | | |
| | | |
| | | //医生检查向缓存中添加数据(整体存入) |
New file |
| | |
| | | package com.ltkj.hosp.service; |
| | | |
| | | import com.ltkj.hosp.domain.TjFlowingWaterHis; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @author 10845 |
| | | * @description 针对表【tj_flowing_water_his(his订单流水关联)】的数据库操作Service |
| | | * @createDate 2024-12-23 10:52:23 |
| | | */ |
| | | public interface TjFlowingWaterHisService extends IService<TjFlowingWaterHis> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ltkj.hosp.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ltkj.hosp.domain.HisSyncDict; |
| | | import com.ltkj.hosp.service.HisSyncDictService; |
| | | import com.ltkj.hosp.mapper.HisSyncDictMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author 10845 |
| | | * @description 针对表【his_sync_dict(his字典同步表)】的数据库操作Service实现 |
| | | * @createDate 2024-12-23 10:58:51 |
| | | */ |
| | | @Service |
| | | public class HisSyncDictServiceImpl extends ServiceImpl<HisSyncDictMapper, HisSyncDict> |
| | | implements HisSyncDictService{ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.ltkj.hosp.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ltkj.hosp.domain.TjFlowingWaterHis; |
| | | import com.ltkj.hosp.service.TjFlowingWaterHisService; |
| | | import com.ltkj.hosp.mapper.TjFlowingWaterHisMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author 10845 |
| | | * @description 针对表【tj_flowing_water_his(his订单流水关联)】的数据库操作Service实现 |
| | | * @createDate 2024-12-23 10:52:23 |
| | | */ |
| | | @Service |
| | | public class TjFlowingWaterHisServiceImpl extends ServiceImpl<TjFlowingWaterHisMapper, TjFlowingWaterHis> |
| | | implements TjFlowingWaterHisService{ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ltkj.hosp.mapper.HisSyncDictMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ltkj.hosp.domain.HisSyncDict"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="dictName" column="dict_name" jdbcType="VARCHAR"/> |
| | | <result property="isLimit" column="is_limit" jdbcType="TINYINT"/> |
| | | <result property="url" column="url" jdbcType="VARCHAR"/> |
| | | <result property="params" column="params" jdbcType="VARCHAR"/> |
| | | <result property="hospId" column="hosp_id" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,dict_name,is_limit, |
| | | url,params,hosp_id, |
| | | remark |
| | | </sql> |
| | | </mapper> |
| | |
| | | <result property="pym" column="pym"/> |
| | | <result property="dictCompId" column="dict_comp_id"/> |
| | | <result property="compName" column="comp_name"/> |
| | | <result property="hisJzkh" column="his_jzkh"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTjCustomerVo"> |
| | |
| | | age_unit, |
| | | career, |
| | | dw_phone, |
| | | pym,dict_comp_id,comp_name |
| | | pym,dict_comp_id,comp_name,his_jzkh |
| | | from tj_customer |
| | | </sql> |
| | | |
| | |
| | | <if test="pym != null">pym,</if> |
| | | <if test="dictCompId != null">dict_comp_id,</if> |
| | | <if test="compName != null">comp_name,</if> |
| | | <if test="hisJzkh != null">his_jzkh,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cusName != null and cusName != ''">#{cusName},</if> |
| | |
| | | <if test="pym != null">#{pym},</if> |
| | | <if test="dictCompId != null">#{dictCompId},</if> |
| | | <if test="compName != null">#{compName},</if> |
| | | <if test="hisJzkh != null">#{hisJzkh},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="pym != null">pym = #{pym},</if> |
| | | <if test="dictCompId != null">dict_comp_id = #{dictCompId},</if> |
| | | <if test="compName != null">comp_name = #{compName},</if> |
| | | <if test="hisJzkh != null">his_jzkh = #{hisJzkh},</if> |
| | | </trim> |
| | | where cus_id = #{cusId} |
| | | </update> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ltkj.hosp.mapper.TjFlowingWaterHisMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ltkj.hosp.domain.TjFlowingWaterHis"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="parentId" column="parent_id" jdbcType="VARCHAR"/> |
| | | <result property="currentId" column="current_id" jdbcType="VARCHAR"/> |
| | | <result property="xmId" column="xm_id" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,parent_id,current_id,xm_id |
| | | </sql> |
| | | </mapper> |
| | |
| | | <result property="refundTime" column="refund_time"/> |
| | | <result property="refundPrice" column="refund_price"/> |
| | | <result property="deleted" column="deleted"/> |
| | | <result property="hisWaterId" column="his_water_id"/> |
| | | <result property="hisTfWaterId" column="his_tf_water_id"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTjFlowingWaterVo"> |
| | |
| | | refund_person_id, |
| | | refund_time, |
| | | refund_price, |
| | | deleted |
| | | deleted,his_water_id,his_tf_water_id |
| | | from tj_flowing_water |
| | | </sql> |
| | | |
| | |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="deleted != null">deleted,</if> |
| | | <if test="hisWaterId != null">his_water_id,</if> |
| | | <if test="hisTfWaterId != null">his_tf_water_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="tjSerialNumber != null">#{tj_serial_number},</if> |
| | |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="deleted != null">#{deleted},</if> |
| | | <if test="hisWaterId != null">#{hisWaterId},</if> |
| | | <if test="hisTfWaterId != null">#{hisTfWaterId},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="deleted != null">deleted = #{deleted},</if> |
| | | <if test="hisWaterId != null">his_water_id = #{hisWaterId},</if> |
| | | <if test="hisTfWaterId != null">his_tf_water_id = #{hisTfWaterId},</if> |
| | | </trim> |
| | | where tj_serial_number = #{tj_serial_number} |
| | | </update> |