소스 검색

上传文件 处方药品记录查询修改

wangjun 4 년 전
부모
커밋
dfb0c5d22c

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -770,7 +770,7 @@ public class YkyyEntranceService {
                "\td.GUID as \"guid\",\n" +
                "\td.JZKH as \"jzkh\"\n" +
                "FROM\n" +
                "\tV_MS_DD01 d\n" +
                "\tV_MS_CF01 d\n" +
                "WHERE\n" +
                "\td.JZXH = '"+admNo+"'";
@ -846,7 +846,7 @@ public class YkyyEntranceService {
                        "\td.YYTS as \"yyts\",\n" +
                        "\td.YFGG as \"yfgg\"\n" +
                        "FROM\n" +
                        "\tV_MS_DD02 d  \n" +
                        "\tV_MS_CF02 d  \n" +
                        "WHERE\n" +
                        "\td.cfsb = '"+wlyyPrescriptionVO.getRealOrder()+"'";

+ 7 - 2
common/common-util/src/main/java/com/yihu/jw/util/common/FileUtil.java

@ -11,6 +11,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Logger;
/**
 * 文件处理工具类
@ -80,16 +81,20 @@ public class FileUtil {
	 * @throws Exception
	 */
	public String copyTempImage(String files,String tempPath) throws Exception {
		System.out.println("files====="+files);
		System.out.println("tempPath====="+tempPath);
		// 文件保存的临时路径
		String[] fileArray = files.split(",");
		String fileUrls = "";
		for (String file : fileArray) {
			File f = new File(tempPath + file);
			File fs = new File(tempPath + file + "_small");
			System.out.println("file+++"+file);
			File f = new File(tempPath + "/"+file);
			File fs = new File(tempPath +"/"+ file + "_small");
			if (f.exists()) {
				String fileName = f.getName();
				InputStream in = new FileInputStream(f);
				ObjectNode result = fastDFSHelper.upload(in, fileName.substring(fileName.lastIndexOf(".") + 1), "");
				System.out.println(result.toString());
				in.close();
				if (result != null) {
					//1.3.7去掉前缀

+ 5 - 5
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/PrescriptionStatusUpdateService.java

@ -340,7 +340,7 @@ public class PrescriptionStatusUpdateService {
                }
            }
            outpatientDao.save(outpatientDOs);
            //退费
            /*//退费
            for (WlyyOutpatientDO outpatientDO:outpatientDOs){
                long currentTime = new Date().getTime();
                Date temp = new Date();
@ -356,17 +356,17 @@ public class PrescriptionStatusUpdateService {
                        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(outpatientDO.getId());
                        if (businessOrderDO!=null){
                            if (businessOrderDO.getPayType()==1){
                                businessOrderService.orderRefund(wechatId,businessOrderDO.getPatient(),businessOrderDO.getOrderNo(),businessOrderDO.getPayPrice(),businessOrderDO.getDescription());
                                //businessOrderService.orderRefund(wechatId,businessOrderDO.getPatient(),businessOrderDO.getOrderNo(),businessOrderDO.getPayPrice(),businessOrderDO.getDescription());
                            }else if (businessOrderDO.getPayType()==3){
    /*
    *//*
                        businessOrderService.ylzOrderRefund(wechatId,businessOrderDO.getPatient(),businessOrderDO.getOrderNo(),businessOrderDO.getPayPrice(),businessOrderDO.getDescription());
    */
    *//*
                            }
                        } } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
            }*/
            logger.info("setOutPatientOver count :"+outpatientDOs.size());
        }else {
            logger.info("setOutPatientOver count :"+0);

+ 5 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -205,6 +205,8 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    private FileUtil fileUtil;
    @Value("${fastDFS.fastdfs_file_url}")
    private String fastdfs_file_url;
    @Value("${FileTempPath.upload_temp_path}")
    private String upload_temp_path;
    @Autowired
    private ConsultTeamDao consultTeamDao;
@ -1670,12 +1672,14 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                        imgeUrl = fileUploadService.uploadWxImage(imagepath);
//					uploadVO.setFullUri(map.get("accessory").toString());
                    }else{
                        imgeUrl = fileUtil.copyTempVoice(imagepath,fastdfs_file_url);
                        imgeUrl = fileUtil.copyTempImage(imagepath,upload_temp_path);
                    }
                    logger.info("imgeUrl"+imgeUrl);
                    object.put("path",imgeUrl);
                }
            }else{}
        }
        logger.info("object"+object.toString());
        return success(object);
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.testJpush)