Explorar o código

修改挂号号废弃接口的BUG

huangwenjie %!s(int64=7) %!d(string=hai) anos
pai
achega
44e2de6489

+ 6 - 6
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionReasonDict.java

@ -15,8 +15,8 @@ public class PrescriptionReasonDict extends IdEntity {
    private String code;//编码code
    private String value;//原因内容
    private String type;//类型:0 审核原因标签;1 调整原因标签
    private String sort;//排序号
    private Integer type;//类型:0 审核原因标签;1 调整原因标签
    private Integer sort;//排序号
    private Date createTime;//创建时间
    private Date updateTime;//修改时间
@ -36,19 +36,19 @@ public class PrescriptionReasonDict extends IdEntity {
        this.value = value;
    }
    public String getType() {
    public Integer getType() {
        return type;
    }
    public void setType(String type) {
    public void setType(Integer type) {
        this.type = type;
    }
    public String getSort() {
    public Integer getSort() {
        return sort;
    }
    public void setSort(String sort) {
    public void setSort(Integer sort) {
        this.sort = sort;
    }

+ 16 - 16
patient-co-service/wlyy_service/src/main/resources/system.properties

@ -1,20 +1,20 @@
###基卫测试环境服务
#gateway_url = http://117.25.173.18:18280/
#gateway_licence = 5YGl5bq45LmL7Lev
#gateway_public_key = PublicKeyTest.key
#jw_hospital = 350211B1013
#jw_licence = 5YGl5bq45LmL7Lev
#ca_url = http://117.29.183.114:8081/XMCAService?wsdl
#ca_namespace = http://platfomservice.xmca.com/
gateway_url = http://117.25.173.18:18280/
gateway_licence = 5YGl5bq45LmL7Lev
gateway_public_key = PublicKeyTest.key
jw_hospital = 350211B1013
jw_licence = 5YGl5bq45LmL7Lev
ca_url = http://117.29.183.114:8081/XMCAService?wsdl
ca_namespace = http://platfomservice.xmca.com/
##基卫服务
guahao_url =  http://10.95.18.10/urp.service/urp.open.service/ReservationPulic.asmx
guahao_namespace = http://www.zysoft.com.cn/
gateway_url = http://10.95.21.21:18280/
gateway_licence = 5YGl5bq45LmL7Lev
gateway_public_key = PublicGov.key
jw_hospital = 350211B1004
jw_licence = 5YGl5bq35LmL6LevMzUwMjExQjEwMDQ=
ca_url = http://10.95.21.21:18280/base/XMCA6_UnifiedCallInterface
ca_namespace = http://platfomservice.xmca.com/
#guahao_url =  http://10.95.18.10/urp.service/urp.open.service/ReservationPulic.asmx
#guahao_namespace = http://www.zysoft.com.cn/
#gateway_url = http://10.95.21.21:18280/
#gateway_licence = 5YGl5bq45LmL7Lev
#gateway_public_key = PublicGov.key
#jw_hospital = 350211B1004
#jw_licence = 5YGl5bq35LmL6LevMzUwMjExQjEwMDQ=
#ca_url = http://10.95.21.21:18280/base/XMCA6_UnifiedCallInterface
#ca_namespace = http://platfomservice.xmca.com/

+ 1 - 1
patient-co/patient-co-wlyy-job/pom.xml

@ -450,7 +450,7 @@
                    <target>1.8</target>
                    <compilerArguments>
                        <verbose/>
                        <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
                        <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>
                    </compilerArguments>
                </configuration>
                <version>3.1</version>

+ 1 - 1
patient-co/patient-co-wlyy/pom.xml

@ -434,7 +434,7 @@
                    <target>1.8</target>
                    <compilerArguments>
                        <verbose/>
                        <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
                        <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>
                    </compilerArguments>
                </configuration>
                <version>3.1</version>

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

@ -110,7 +110,7 @@ public class PrescriptionInfoService extends BaseService {
    }
    public JSONObject getPrescriptionFilter(Integer teamCode) {
    public JSONObject getPrescriptionFilter(Integer teamCode,String patient) {
        JSONObject rs = new JSONObject();
        List<SystemDict> sdict = systemDictDao.findByDictName("PRESCRIPTION_STATE");
@ -119,7 +119,7 @@ public class PrescriptionInfoService extends BaseService {
            Map<String,Object> m = new HashedMap();
            m.put("code",sd.getCode());
            m.put("value",sd.getValue());
            m.put("count",getPresCountByState(teamCode,sd.getCode()));
            m.put("count",getPresCountByState(teamCode,sd.getCode(),patient));
            states.add(m);
        }
        rs.put("states", states);
@ -137,7 +137,7 @@ public class PrescriptionInfoService extends BaseService {
        return rs;
    }
    public int getPresCountByState(Integer teamCode,String states){
    public int getPresCountByState(Integer teamCode,String states,String patient){
        String sql = "SELECT " +
                " COUNT(1) AS count " +
                " FROM " +
@ -145,6 +145,9 @@ public class PrescriptionInfoService extends BaseService {
                " WHERE " +
                " p.admin_team_id =" +teamCode+
                " AND p.`status` in ("+states+")";
        if(StringUtils.isNotBlank(patient)){
            sql = sql+ " AND p.patient = '"+patient+"'";
        }
        List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql);
        if(rs!=null&&rs.size()>0){
            Long r = (Long) rs.get(0).get("count");
@ -1367,8 +1370,11 @@ public class PrescriptionInfoService extends BaseService {
    }
    public List<PrescriptionReasonDict> getReasonByType(Integer type){
        List<PrescriptionReasonDict> list =  prescriptionReasonDictDao.findByTypeOrderBySortAsc(type);
        return list;
    public JSONArray getReasonByType(Integer type){
        String sql = "SELECT t.value,t.code FROM wlyy_prescription_reason_dict t WHERE t.type = "+type+" ORDER BY t.sort ASC ";
        List<Map<String,Object>> list =  jdbcTemplate.queryForList(sql);
        //System.out.println("list:"+list.size());
        return  new JSONArray(list);
    }
}

+ 29 - 30
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java

@ -89,15 +89,15 @@ public class JwPrescriptionService {
        params.add(new BasicNameValuePair("applyTimeFrom", applyTimeFrom));
        params.add(new BasicNameValuePair("applyTimeEnd", applyTimeEnd));
    //    String response = httpClientUtil.post(url, params, "UTF-8");
        String sql = "SELECT h.response from wlyy_http_log h WHERE h.id = 806287";
        List<Map<String ,Object>> list = jdbcTemplate.queryForList(sql);
        String response = list.get(0).get("response").toString();
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("status",200);
        jsonObject.put("data",response);
        response = jsonObject.toString();
        String response = httpClientUtil.post(url, params, "UTF-8");
//        String sql = "SELECT h.response from wlyy_http_log h WHERE h.id = 806287";
//        List<Map<String ,Object>> list = jdbcTemplate.queryForList(sql);
//        String response = list.get(0).get("response").toString();
//        JSONObject jsonObject = new JSONObject();
//        jsonObject.put("status",200);
//        jsonObject.put("data",response);
//        response = jsonObject.toString();
        return response;
    }
@ -253,30 +253,29 @@ public class JwPrescriptionService {
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
        if(StringUtils.isBlank(prescription.getVisitNo())
                || StringUtils.isBlank(prescription.getRecipeNo())){
            throw new Exception("参数错误,挂号号或者处方号卫空!");
        }
        String url = jwUrl + "/third/prescription/fadeRecipe";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("visitNo", prescription.getVisitNo()));//挂号号
        params.add(new BasicNameValuePair("fadeDept", prescription.getJwDeptCode()));//作废科室编码
        params.add(new BasicNameValuePair("fadeOperator", prescription.getJwDoctorCode()));//作废人员编码
        params.add(new BasicNameValuePair("recipeNo", prescription.getRecipeNo()));//基卫处方号
        String response = httpClientUtil.post(url, params, "UTF-8");
        if(StringUtils.isNotBlank(response)){
            JSONObject reobj =  JSON.parseObject(response);
            Integer status = reobj.getInteger("status");
            String errmsg = reobj.getString("msg");
            if(0 != status){
                throw new Exception("基卫接口(挂号作废)请求失败,"+errmsg);
        if(StringUtils.isNotBlank(prescription.getVisitNo())){
            String url = jwUrl + "/third/prescription/fadeRecipe";
            List<NameValuePair> params = new ArrayList<>();
            params.add(new BasicNameValuePair("visitNo", prescription.getVisitNo()));//挂号号
            params.add(new BasicNameValuePair("fadeDept", prescription.getJwDeptCode()));//作废科室编码
            params.add(new BasicNameValuePair("fadeOperator", prescription.getJwDoctorCode()));//作废人员编码
            params.add(new BasicNameValuePair("recipeNo", prescription.getRecipeNo()));//基卫处方号
            String response = httpClientUtil.post(url, params, "UTF-8");
            if(StringUtils.isNotBlank(response)){
                JSONObject reobj =  JSON.parseObject(response);
                Integer status = reobj.getInteger("status");
                String errmsg = reobj.getString("msg");
                if(-1 == status){
                    throw new Exception("基卫接口(挂号作废)请求失败,"+errmsg);
                }
            }else{
                throw new Exception("基卫接口(挂号作废)请求失败,无数据返回!");
            }
        }else{
            throw new Exception("基卫接口(挂号作废)请求失败,无数据返回!");
            return response;
        }
        return response;
        return "";
    }
    /**

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

@ -52,9 +52,10 @@ public class PrescriptionInfoController extends BaseController {
    @RequestMapping(value = "/getPrescriptionFilter", method = RequestMethod.GET)
    @ApiOperation(value = "获取过滤规则信息列表")
    public String getPrescriptionFilter(Integer teamCode) {
    public String getPrescriptionFilter(@RequestParam(required = true) @ApiParam(value = "团队code", name = "teamCode")Integer teamCode,
                                        @RequestParam(required = false) @ApiParam(value = "居民code", name = "patient")String patient) {
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescriptionFilter(teamCode));
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescriptionFilter(teamCode,patient));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");

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

@ -364,7 +364,7 @@ images:
  sign_path: /usr/local/apache-tomcat-8.0.26/webapps/wlyy/images/familycontract.png
sign:
  check_upload: http://172.19.103.87:8011/wlyy_service
  check_upload: http://127.0.0.1:8011/wlyy_service
ylzpay:

+ 10 - 10
patient-co/patient-co-wlyy/src/main/resources/logback.xml

@ -10,9 +10,9 @@
    </appender>
    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/tmp/logs/wlyy.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/tmp/logs/wlyy.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/tmp/logs/wlyy.%d{yyyy-MM-dd}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/tmp/logs/wlyy.%d{yyyy-MM-dd}.log</fileNamePattern>
        </rollingPolicy>
        <encoder>
            <pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
@ -21,9 +21,9 @@
    </appender>
    <appender name="business_m" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/datadisk/wlyy_logs/business_m.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/wlyy_logs/business_m.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/datadisk/wlyy_logs/rolling/business_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/wlyy_logs/rolling/business_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
        </rollingPolicy>
        <encoder>
            <pattern>%msg%n</pattern>
@ -31,9 +31,9 @@
        </encoder>
    </appender>
    <appender name="business_d" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/datadisk/wlyy_logs/business.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/wlyy_logs/business.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/datadisk/wlyy_logs/dayLogs/business.%d{yyyy-MM-dd}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/wlyy_logs/dayLogs/business.%d{yyyy-MM-dd}.log</fileNamePattern>
        </rollingPolicy>
        <encoder>
            <pattern>%msg%n</pattern>
@ -41,9 +41,9 @@
        </encoder>
    </appender>
    <appender name="interface_call_m" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/datadisk/wlyy_logs/interface_call_m.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/wlyy_logs/interface_call_m.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/datadisk/wlyy_logs/rolling/interface_call_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/wlyy_logs/rolling/interface_call_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
        </rollingPolicy>
        <encoder>
            <pattern>%msg%n</pattern>
@ -51,9 +51,9 @@
        </encoder>
    </appender>
    <appender name="interface_call_d" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/datadisk/wlyy_logs/interface_call.log</file>
        <file>/Users/Mewtwo/ideaSpace/log/wlyy_logs/interface_call.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>/datadisk/wlyy_logs/dayLogs/interface_call.%d{yyyy-MM-dd}.log</fileNamePattern>
            <fileNamePattern>/Users/Mewtwo/ideaSpace/log/wlyy_logs/dayLogs/interface_call.%d{yyyy-MM-dd}.log</fileNamePattern>
        </rollingPolicy>
        <encoder>
            <pattern>%msg%n</pattern>

+ 1 - 1
pom.xml

@ -570,7 +570,7 @@
                        <target>1.8</target>
                        <compilerArguments>
                            <verbose/>
                            <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
                            <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>
                        </compilerArguments>
                    </configuration>
                    <version>3.1</version>