Sfoglia il codice sorgente

【疫情防控代码】

wangzhinan 3 anni fa
parent
commit
c3d812171c

+ 5 - 2
business/base-service/src/main/java/com/yihu/jw/file_upload/FileManageService.java

@ -41,12 +41,15 @@ public class FileManageService {
     * @return
     * @return
     * @throws IOException
     * @throws IOException
     */
     */
    public String chunkUploadByMappedByteBuffer(MutilFileInfo param) throws IOException {
    public String chunkUploadByMappedByteBuffer(MutilFileInfo param,Integer chunkSize) throws IOException {
        if(param.getTaskId() == null || "".equals(param.getTaskId())){
        if(param.getTaskId() == null || "".equals(param.getTaskId())){
            param.setTaskId(UUID.randomUUID().toString());
            param.setTaskId(UUID.randomUUID().toString());
        }
        }
        boolean copflag =false;
        boolean copflag =false;
        long chunkFileSize = 5 * 1024 * 1024;
        if (chunkSize==null){
            chunkSize=2;
        }
        long chunkFileSize = chunkSize * 1024 * 1024;
        /**
        /**
         * basePath是我的路径,可以替换为你的
         * basePath是我的路径,可以替换为你的
         * 1:原文件名改为UUID
         * 1:原文件名改为UUID

+ 19 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -25,6 +25,7 @@ import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.utils.security.MD5;
import net.sf.json.JSONArray;
import net.sf.json.JSONArray;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
@ -398,10 +399,26 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                                }else {
                                }else {
                                    patientDO= basePatientDao.findByIdcard(jsonObject1.getString("IDCARD"));
                                    patientDO= basePatientDao.findByIdcard(jsonObject1.getString("IDCARD"));
                                }
                                }
                                patientDO.setMobile(jsonObject1.getString("TEL"));
                                if (patientDO==null){
                                    patientDO = new BasePatientDO();
                                }
                                if (StringUtils.isNotBlank(jsonObject1.getString("TEL"))){
                                    patientDO.setMobile(jsonObject1.getString("TEL"));
                                }
                                if(StringUtils.isNotBlank(jsonObject1.getString("BIRTHDAY"))){
                                if(StringUtils.isNotBlank(jsonObject1.getString("BIRTHDAY"))){
                                    patientDO.setBirthday(DateUtil.strToDate(jsonObject1.getString("BIRTHDAY")));
                                    patientDO.setBirthday(DateUtil.strToDate(jsonObject1.getString("BIRTHDAY")));
                                }
                                }
                                String pw = null;
                                String salt = UUID.randomUUID().toString().substring(0,5);
                                String mobile = jsonObject1.getString("TEL");
                                String idcard = jsonObject1.getString("IDCARD");
                                if(org.apache.commons.lang3.StringUtils.isNotBlank(mobile)){
                                    pw = mobile.substring(mobile.length()-6);
                                }else{
                                    pw = idcard.substring(idcard.length()-6);
                                }
                                patientDO.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                                patientDO.setSalt(salt);
                                patientDO.setIdcard(jsonObject1.getString("IDCARD"));
                                patientDO.setIdcard(jsonObject1.getString("IDCARD"));
                                patientDO.setName(jsonObject1.getString("NAME"));
                                patientDO.setName(jsonObject1.getString("NAME"));
                                if(jsonObject1.getInteger("SEX")!=null){
                                if(jsonObject1.getInteger("SEX")!=null){
@ -417,6 +434,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                                patientDO.setEnabled(1);
                                patientDO.setEnabled(1);
                                patientDO.setLocked(0);
                                patientDO.setLocked(0);
                                patientDO.setCreateTime(new Date());
                                patientDO.setCreateTime(new Date());
                                patientDO.setUpdateTime(new Date());
                                patientDO = basePatientDao.save(patientDO);
                                patientDO = basePatientDao.save(patientDO);
                                //取his中的病人code
                                //取his中的病人code
                                JSONArray hisArray = ykyyEntranceService.findHisPatientBymMedicare(jsonObject1.getString("MEDICALCARD"),jsonObject1.getString("CLINICID"),false);
                                JSONArray hisArray = ykyyEntranceService.findHisPatientBymMedicare(jsonObject1.getString("MEDICALCARD"),jsonObject1.getString("CLINICID"),false);

+ 3 - 23
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -11383,32 +11383,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        }
        return null;
        return null;
    }
    }
    public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
    public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
                                   String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushChannel,String pushFlag,String cardNoType,String consumer,String preNo) throws Exception {
                                   String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushFlag,String cardNoType,String consumer,
                                  String checkPart,String chargeFlag,String chargeCode,String icdCode) throws Exception {
        Map returnMap = new HashMap();
        Map returnMap = new HashMap();
        List<WlyyHospitalSysDictDO> natConfigList = wlyyHospitalSysDictDao.findByDictName("natConfigList");
        String checkPart = "鼻/咽拭子";
        String chargeFlag = "2";
        String chargeCode = "361322";
        String icdCode = "Z00.000";
        Integer winNo = 6;
        Integer winNo = 6;
        for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:natConfigList){
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"checkPart".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                checkPart = wlyyHospitalSysDictDO.getDictValue();
            }
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeFlag".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                chargeFlag = wlyyHospitalSysDictDO.getDictValue();
            }
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"chargeCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                chargeCode = wlyyHospitalSysDictDO.getDictValue();
            }
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"icdCode".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                icdCode = wlyyHospitalSysDictDO.getDictValue();
            }
            if (StringUtils.isNoneBlank(wlyyHospitalSysDictDO.getDictValue())&&"winNo".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
                winNo = Integer.parseInt(wlyyHospitalSysDictDO.getDictValue());
            }
        }
        if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
        if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
            net.sf.json.JSONObject jsondate = new JSONObject();
            net.sf.json.JSONObject jsondate = new JSONObject();
            jsondate.put("checkPart",checkPart);
            jsondate.put("checkPart",checkPart);

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

@ -333,8 +333,10 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     */
     */
    public WlyyOutpatientDO appointmentRevisit(String outpatientJson, String expressageJson, String registerJson, String chargeType) throws Exception {
    public WlyyOutpatientDO appointmentRevisit(String outpatientJson, String expressageJson, String registerJson, String chargeType) throws Exception {
        System.out.print("outpatientJson::"+outpatientJson);
        //1.保存就诊实体
        //1.保存就诊实体
        WlyyOutpatientDO outpatientDO = objectMapper.readValue(outpatientJson, WlyyOutpatientDO.class);
        WlyyOutpatientDO outpatientDO = objectMapper.readValue(outpatientJson, WlyyOutpatientDO.class);
        System.out.print("getDescription::"+outpatientDO.getDescription());
        BasePatientDO patientDO = basePatientDao.findById(outpatientDO.getPatient());
        BasePatientDO patientDO = basePatientDao.findById(outpatientDO.getPatient());
        BaseDoctorDO doctorDO = doctorDao.findById(outpatientDO.getDoctor());
        BaseDoctorDO doctorDO = doctorDao.findById(outpatientDO.getDoctor());
        outpatientDO.setMjz("mz");
        outpatientDO.setMjz("mz");

+ 1 - 1
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -3936,7 +3936,7 @@ public class ImService {
	public void doctorReplyUpdateYktState(String consult,String doctor,String wxId){
	public void doctorReplyUpdateYktState(String consult,String doctor,String wxId){
		if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
		if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
			String sql ="SELECT * FROM im_internet_hospital.topics t where " +
			String sql ="SELECT * FROM topics t where " +
					"t.id='"+consult+"' and t.reply_user='"+doctor+"' and t.reply=1 and t.status IN(0,1) ";
					"t.id='"+consult+"' and t.reply_user='"+doctor+"' and t.reply=1 and t.status IN(0,1) ";
			List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql);
			List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql);
			logger.info("sql======"+sql);
			logger.info("sql======"+sql);

+ 4 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/common/FileUploadController.java

@ -193,7 +193,9 @@ public class FileUploadController extends EnvelopRestEndpoint {
                                                  @ApiParam(value = "chunkTotal", required = false)
                                                  @ApiParam(value = "chunkTotal", required = false)
                                                  @RequestParam(value = "chunkTotal", required = false) Integer chunkTotal,
                                                  @RequestParam(value = "chunkTotal", required = false) Integer chunkTotal,
                                                  @ApiParam(value = "objectType", required = false)
                                                  @ApiParam(value = "objectType", required = false)
                                                  @RequestParam(value = "objectType", required = false) Integer objectType
                                                  @RequestParam(value = "objectType", required = false) Integer objectType,
                                                  @ApiParam(value = "chunkSize", required = false)
                                                      @RequestParam(value = "chunkSize", required = false) Integer  chunkSize
    ) throws Exception{
    ) throws Exception{
        UploadVO uploadVO = new UploadVO();
        UploadVO uploadVO = new UploadVO();
        MutilFileInfo files = new MutilFileInfo();
        MutilFileInfo files = new MutilFileInfo();
@ -204,7 +206,7 @@ public class FileUploadController extends EnvelopRestEndpoint {
        files.setSize(file.getSize());
        files.setSize(file.getSize());
        logger.info("file size"+file.getSize());
        logger.info("file size"+file.getSize());
        files.setTaskId(taskId);
        files.setTaskId(taskId);
        String taskid = fileManageService.chunkUploadByMappedByteBuffer(files);
        String taskid = fileManageService.chunkUploadByMappedByteBuffer(files,chunkSize);
        logger.info("taskid"+taskid);
        logger.info("taskid"+taskid);
        if ("unCompelete".equalsIgnoreCase(taskid)){
        if ("unCompelete".equalsIgnoreCase(taskid)){
            System.out.println("第"+files.getChunk());
            System.out.println("第"+files.getChunk());

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/config/MvcConfig.java

@ -39,7 +39,7 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
    public FilterRegistrationBean testFilterRegistration() {
    public FilterRegistrationBean testFilterRegistration() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(new CrosXssFilter());
        registration.setFilter(new CrosXssFilter());
        registration.addUrlPatterns("/*");
        registration.addUrlPatterns("/open/gc/**");
        registration.setName("CrosXssFilter");
        registration.setName("CrosXssFilter");
        registration.setOrder(1);
        registration.setOrder(1);
        return registration;
        return registration;

+ 4 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/file_upload/FileUploadEndpoint.java

@ -150,7 +150,9 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
                                                  @ApiParam(value = "chunkTotal", required = false)
                                                  @ApiParam(value = "chunkTotal", required = false)
                                                      @RequestParam(value = "chunkTotal", required = false) Integer chunkTotal,
                                                      @RequestParam(value = "chunkTotal", required = false) Integer chunkTotal,
                                                  @ApiParam(value = "objectType", required = false)
                                                  @ApiParam(value = "objectType", required = false)
                                                      @RequestParam(value = "objectType", required = false) Integer objectType
                                                      @RequestParam(value = "objectType", required = false) Integer objectType,
                                                  @ApiParam(value = "chunkSize", required = false)
                                                      @RequestParam(value = "chunkSize", required = false) Integer  chunkSize
                                             ) throws Exception{
                                             ) throws Exception{
        UploadVO uploadVO = new UploadVO();
        UploadVO uploadVO = new UploadVO();
        MutilFileInfo files = new MutilFileInfo();
        MutilFileInfo files = new MutilFileInfo();
@ -160,7 +162,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
        files.setObjectType(objectType);
        files.setObjectType(objectType);
        files.setSize(file.getSize());
        files.setSize(file.getSize());
        files.setTaskId(taskId);
        files.setTaskId(taskId);
        String taskid = fileManageService.chunkUploadByMappedByteBuffer(files);
        String taskid = fileManageService.chunkUploadByMappedByteBuffer(files,chunkSize);
        if ("unCompelete".equalsIgnoreCase(taskid)){
        if ("unCompelete".equalsIgnoreCase(taskid)){
            System.out.println("第"+files.getChunk());
            System.out.println("第"+files.getChunk());
            return success("未传完",uploadVO);
            return success("未传完",uploadVO);

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

@ -2431,16 +2431,22 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                      @RequestParam(value = "streetName",required = false)String streetName,
                                      @RequestParam(value = "streetName",required = false)String streetName,
                                      @ApiParam(name = "pm", value = "pm")
                                      @ApiParam(name = "pm", value = "pm")
                                      @RequestParam(value = "pm",required = false)String pm,
                                      @RequestParam(value = "pm",required = false)String pm,
                                      @ApiParam(name = "pushChannel", value = "pushChannel")
                                      @RequestParam(value = "pushChannel",required = false)String pushChannel,
                                      @ApiParam(name = "checkPart", value = "checkPart")
                                      @RequestParam(value = "checkPart",required = false)String checkPart,
                                      @ApiParam(name = "pushFlag", value = "pushFlag")
                                      @ApiParam(name = "pushFlag", value = "pushFlag")
                                      @RequestParam(value = "pushFlag",required = false)String pushFlag,
                                      @RequestParam(value = "pushFlag",required = false)String pushFlag,
                                      @ApiParam(name = "cardNoType", value = "cardNoType")
                                      @ApiParam(name = "cardNoType", value = "cardNoType")
                                      @RequestParam(value = "cardNoType",required = false)String cardNoType,
                                      @RequestParam(value = "cardNoType",required = false)String cardNoType,
                                      @ApiParam(name = "preNo", value = "preNo")
                                      @RequestParam(value = "preNo",required = false)String preNo){
                                      @ApiParam(name = "chargeFlag", value = "chargeFlag")
                                      @RequestParam(value = "chargeFlag",required = false)String chargeFlag,
                                      @ApiParam(name = "chargeCode", value = "chargeCode")
                                          @RequestParam(value = "chargeCode",required = false)String chargeCode,
                                      @ApiParam(name = "icdCode", value = "icdCode")
                                          @RequestParam(value = "icdCode",required = false)String icdCode){
        try {
        try {
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,cityName,townName,streetName,pm,pushChannel,pushFlag,cardNoType,getUID(),preNo));
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,
                    cityName,townName,streetName,pm,pushFlag,cardNoType,getUID(),checkPart,chargeFlag,chargeCode,icdCode));
        } catch (Exception e) {
        } catch (Exception e) {
            return Envelop.getError(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
        }

+ 11 - 6
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -3051,16 +3051,21 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                          @RequestParam(value = "streetName",required = false)String streetName,
                                          @RequestParam(value = "streetName",required = false)String streetName,
                                      @ApiParam(name = "pm", value = "pm")
                                      @ApiParam(name = "pm", value = "pm")
                                          @RequestParam(value = "pm",required = false)String pm,
                                          @RequestParam(value = "pm",required = false)String pm,
                                      @ApiParam(name = "pushChannel", value = "pushChannel")
                                          @RequestParam(value = "pushChannel",required = false)String pushChannel,
                                      @ApiParam(name = "checkPart", value = "checkPart")
                                          @RequestParam(value = "checkPart",required = false)String checkPart,
                                      @ApiParam(name = "pushFlag", value = "pushFlag")
                                      @ApiParam(name = "pushFlag", value = "pushFlag")
                                          @RequestParam(value = "pushFlag",required = false)String pushFlag,
                                          @RequestParam(value = "pushFlag",required = false)String pushFlag,
                                      @ApiParam(name = "cardNoType", value = "cardNoType")
                                      @ApiParam(name = "cardNoType", value = "cardNoType")
                                          @RequestParam(value = "cardNoType",required = false)String cardNoType,
                                          @RequestParam(value = "cardNoType",required = false)String cardNoType,
                                      @ApiParam(name = "preNo", value = "preNo")
                                          @RequestParam(value = "preNo",required = false)String preNo){
        try {
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,cityName,townName,streetName,pm,pushChannel,pushFlag,cardNoType,getUID(),preNo));
                                      @ApiParam(name = "chargeFlag", value = "chargeFlag")
                                          @RequestParam(value = "chargeFlag",required = false)String chargeFlag,
                                      @ApiParam(name = "chargeCode", value = "chargeCode")
                                          @RequestParam(value = "chargeCode",required = false)String chargeCode,
                                      @ApiParam(name = "icdCode", value = "icdCode")
                                          @RequestParam(value = "icdCode",required = false)String icdCode){
        try {
            return success(prescriptionService.saveNatAppointment(chargeAmount,inspectionName,mediaCard,patientId,name,cardNo,cardType,mobile,firstJobCode,firstJobName,secondJobCode,secondJobName,natTime,address,provinceName,
                    cityName,townName,streetName,pm,pushFlag,cardNoType,getUID(),checkPart,chargeFlag,chargeCode,icdCode));
        } catch (Exception e) {
        } catch (Exception e) {
            return Envelop.getError(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
        }