Преглед на файлове

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

chenyongxing преди 7 години
родител
ревизия
d188548711
променени са 13 файла, в които са добавени 96 реда и са изтрити 38 реда
  1. 9 3
      common/common-entity/src/main/java/com/yihu/wlyy/entity/zydict/ZyIvPhysicDict.java
  2. 1 1
      patient-co/patient-co-statistics/src/main/resources/application.yml
  3. BIN
      patient-co/patient-co-wlyy/doc/接口文档/对外接口文档/集美健康教育/集美健康教育对外接口文档.docx
  4. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java
  5. 4 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDispensaryCodeDao.java
  6. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java
  7. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/express/SFExpressService.java
  8. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java
  9. 6 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java
  10. 20 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/ZyDictService.java
  11. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionExpressageController.java
  12. 6 26
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/gateway/controller/GcUserController.java
  13. 42 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/gateway/controller/express/GcPatientController.java

+ 9 - 3
common/common-entity/src/main/java/com/yihu/wlyy/entity/zydict/ZyIvPhysicDict.java

@ -4,9 +4,6 @@ import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
/**
@ -35,6 +32,7 @@ public class ZyIvPhysicDict extends IdEntity implements java.io.Serializable {
	private String validFlag;//有效标志 0:无效;1:有效
	private String spellCode;//拼音首码
	private String wbzxCode;//五笔首码
	private String storageConditions;//2表示需要冷藏,其他表示不需要冷藏
	private Integer sequence;//排序号
	// Constructors
@ -222,4 +220,12 @@ public class ZyIvPhysicDict extends IdEntity implements java.io.Serializable {
		this.sequence = sequence;
	}
	@Column(name = "storage_conditions")
	public String getStorageConditions() {
		return storageConditions;
	}
	public void setStorageConditions(String storageConditions) {
		this.storageConditions = storageConditions;
	}
}

+ 1 - 1
patient-co/patient-co-statistics/src/main/resources/application.yml

@ -152,7 +152,7 @@ spring:
      username: ssgg
      password: ssgg
    im: #im库
      url: jdbc:mysql://172.17.110.160/wlyy?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
      url: jdbc:mysql://172.17.110.160/im_new?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
      username: ssgg
      password: ssgg

BIN
patient-co/patient-co-wlyy/doc/接口文档/对外接口文档/集美健康教育/集美健康教育对外接口文档.docx


+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java

@ -31,9 +31,9 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
        // 多个拦截器组成一个拦截器链
        // addPathPatterns 用于添加拦截规则
        // excludePathPatterns 用户排除拦截
        registry.addInterceptor(gateWayInterceptor).addPathPatterns("/wlyygc/**").excludePathPatterns("/wlyygc/doctor/**");
        registry.addInterceptor(gateWayInterceptor).addPathPatterns("/wlyygc/**").excludePathPatterns("/wlyygc/doctor/**","/wlyygc/patient/**");
        registry.addInterceptor(doctorInterceptor).addPathPatterns("/doctor/**", "/statistics/province/**", "/statistics/**", "wlyygc/doctor/**");
        registry.addInterceptor(patientInterceptor).addPathPatterns("/patient/**");
        registry.addInterceptor(patientInterceptor).addPathPatterns("/patient/**","/wlyygc/patient/**");
        super.addInterceptors(registry);
        logger.info("init doctorInterceptor,patientInterceptor");

+ 4 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDispensaryCodeDao.java

@ -4,6 +4,7 @@ import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionDispensaryCode;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
@ -32,10 +33,12 @@ public interface PrescriptionDispensaryCodeDao extends PagingAndSortingRepositor
    /**
     * 更新处方某一类型的编码为使用
     *
     * @param prescriptionCode
     * @param type
     */
    @Query(" update PrescriptionDispensaryCode a set a.isUse=1 where a.prescriptionCode= ?1 and a.type =?2 and a.isUse=0")
    @Modifying
    @Query("update PrescriptionDispensaryCode a set a.isUse=1 where a.prescriptionCode= ?1 and a.type = ?2 and a.isUse=0 ")
    void updateToUse(String prescriptionCode, Integer type);
    PrescriptionDispensaryCode findByCodeAndIsUse(String code, Integer isUse);

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -1155,6 +1155,7 @@ public class ConsultTeamService extends ConsultService {
            prescriptionInfo.setPhysicSkinTest(info.getString("physicSkinTest"));//注射地点名称
            prescriptionInfo.setPhysicSkinTestName(info.getString("physicSkinTestName"));//皮试类型名称
            prescriptionInfo.setRemark(info.getString("Remark"));//备注
            prescriptionInfo.setIsRefrigerate(zyDictService.getIsRefrigerate(prescriptionInfo.getDrugCode()));
            prescriptionInfoDao.save(prescriptionInfo);
        }

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/express/SFExpressService.java

@ -219,7 +219,7 @@ public class SFExpressService extends BaseService {
                filter_result = e.attributeValue("filter_result");
                orderid = e.attributeValue("orderid");
                mailno = e.attributeValue("mailno");
                destCode = e.attributeValue("destCode");
                destCode = e.attributeValue("destcode");
            }
            if(StringUtils.isNotBlank(filter_result) && "3".equals(filter_result)){
                logger.info("顺丰快递下订单失败:派送地址不可派送,处方编号:"+sfexpress_obj.getPrescriptionCode());

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -275,7 +275,9 @@ public class PrescriptionExpressageService {
     * @param prescriptionExpressage
     * @throws Exception
     */
    @Transactional
    public void updatePrescriptionExpressage(PrescriptionExpressage prescriptionExpressage) throws Exception {
        //修改处方状态为配送配送中
        prescriptionDao.updateStatus(prescriptionExpressage.getPrescriptionCode(), 65);

+ 6 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java

@ -217,8 +217,9 @@ public class PrescriptionService extends BaseService {
            JSONObject jwobj =  JSON.parseObject(result);
            JSONObject zyCfinfo = jwobj.getJSONObject("data");
            Integer code = zyCfinfo.getInteger("CODE");
            Integer status = jwobj.getInteger("status");
            if( 1 == code){
            if(200 == status && 1 == code){
                JSONArray zyCfinfoListReturnData = zyCfinfo.getJSONArray("returnData");
                JSONArray zyCfinfoList = zyCfinfoListReturnData.getJSONArray(0);
@ -311,7 +312,7 @@ public class PrescriptionService extends BaseService {
                }
                json.put("mxlist",cfInfo);
            }else{
                String errormessage = zyCfinfo.getString("MESSAGE");
                String errormessage = jwobj.getString("MESSAGE");
                throw new Exception(errormessage);
            }
        }
@ -337,8 +338,9 @@ public class PrescriptionService extends BaseService {
                JSONObject jwobj =  JSON.parseObject(result);
                JSONObject zyCfinfo = jwobj.getJSONObject("data");
                Integer code = zyCfinfo.getInteger("CODE");
                Integer status = jwobj.getInteger("status");
                if( 1 == code){
                if(200 == status && 1 == code){
                    JSONArray zyCfinfoListReturnData = zyCfinfo.getJSONArray("returnData");
                    JSONArray zyCfinfoList = zyCfinfoListReturnData.getJSONArray(0);
@ -359,7 +361,7 @@ public class PrescriptionService extends BaseService {
                        }
                    }
                }else{
                    String errormessage = zyCfinfo.getString("MESSAGE");
                    String errormessage = jwobj.getString("MESSAGE");
                    throw new Exception(errormessage);
                }
            }else {

+ 20 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/ZyDictService.java

@ -106,6 +106,26 @@ public class ZyDictService {
        return null;
    }
    /**
     * 是否冷藏
     * @param physicCode
     * @return
     */
    public Integer getIsRefrigerate(String physicCode){
        Integer isRefrigerate = 0;
        StringBuffer sqlbuf = new StringBuffer("SELECT storage_conditions from zy_iv_physic_dict WHERE physic_code = '"+physicCode+"'");
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sqlbuf.toString());
        if(list!=null&&list.size()>0){
            Object storage_conditions = list.get(0).get("storage_conditions");
            if(storage_conditions!=null){
                String storageConditions = storage_conditions.toString();
                isRefrigerate = "2".equals(storageConditions)?1:isRefrigerate;
            }
        }
        return isRefrigerate;
    }
    /**
     * 获取药品字典
     * @param doctor

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionExpressageController.java

@ -45,6 +45,7 @@ public class PrescriptionExpressageController extends WeixinBaseController {
            expressageService.updateExpressageJGS(code, prescriptionCode, getUID());
            return success("修改成功");
        } catch (Exception e) {
            error(e);
            return error(-1, "获取失败");
        }
    }
@ -69,6 +70,7 @@ public class PrescriptionExpressageController extends WeixinBaseController {
            expressageService.expressage2Hospital(hospital, hospitalName, hospitalAddress, userCode, userName, mobile, prescriptionCode);
            return success("接受成功");
        } catch (Exception e) {
            error(e);
            return error(-1, "获取失败");
        }
    }

+ 6 - 26
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/gateway/controller/GcUserController.java

@ -1,41 +1,21 @@
package com.yihu.wlyy.web.gateway.controller;
package com.yihu.wlyy.web.gateway.controller.doctor;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.login.LoginLog;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.security.Token;
import com.yihu.wlyy.service.common.SMSService;
import com.yihu.wlyy.service.common.account.DoctorService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.common.account.RoleService;
import com.yihu.wlyy.service.common.account.TokenService;
import com.yihu.wlyy.service.common.login.LoginLogService;
import com.yihu.wlyy.util.MD5;
import com.yihu.wlyy.util.RSAUtils;
import com.yihu.wlyy.web.common.account.LoginController;
import com.yihu.wlyy.web.gateway.vo.DoctorModel;
import com.yihu.wlyy.web.gateway.vo.LoginModel;
import com.yihu.wlyy.web.gateway.vo.PatientModel;
import com.yihu.wlyy.web.gateway.vo.base.BaseResultModel;
import com.yihu.wlyy.web.gateway.vo.base.ResultOneModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by chenweida on 2017/8/17.
@ -43,7 +23,7 @@ import java.util.concurrent.ExecutionException;
@RestController
@RequestMapping("/wlyygc/doctor/user")
@Api(description = "用户相关服务")
public class GcUserController {
public class GcDoctorController {
    @Autowired
    private PatientService patientService;
    @Autowired

+ 42 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/gateway/controller/express/GcPatientController.java

@ -0,0 +1,42 @@
package com.yihu.wlyy.web.gateway.controller.express;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.service.common.account.DoctorService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.web.gateway.vo.DoctorModel;
import com.yihu.wlyy.web.gateway.vo.PatientModel;
import com.yihu.wlyy.web.gateway.vo.base.ResultOneModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by chenweida on 2017/8/17.
 */
@RestController
@RequestMapping("/wlyygc/patient/user")
@Api(description = "用户相关服务")
public class GcPatientController {
    @Autowired
    private PatientService patientService;
    @RequestMapping(value = "/patient", method = RequestMethod.GET)
    @ApiOperation("根据患者code查询患者信息")
    public ResultOneModel<PatientModel> patient(
            @ApiParam(name = "code", value = "患者code", required = true) @RequestParam(value = "code", required = true) String code
    ) {
        Patient patient = patientService.findByCode(code);
        PatientModel patientModel = new PatientModel();
        BeanUtils.copyProperties(patient, patientModel);
        return new ResultOneModel(patientModel);
    }
}