Browse Source

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

yeshijie 8 năm trước cách đây
mục cha
commit
2f49e962e3

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

@ -87,6 +87,8 @@ public class Prescription extends IdEntity {
    private String prescribeReason; //开方失败/成功原因
    private Date prescribeTime ;//开方失败、成功时间
    private String dispensaryTypeName; //类型翻译
    @Column(name = "code", unique = true, nullable = false)
    public String getCode() {
        return code;
@ -641,4 +643,8 @@ public class Prescription extends IdEntity {
    public void setPrescribeTime(Date prescribeTime) {
        this.prescribeTime = prescribeTime;
    }
    public void setDispensaryTypeName(String dispensaryTypeName) {
        this.dispensaryTypeName = dispensaryTypeName;
    }
}

+ 32 - 11
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/controller/medicine/PhysicalExaminationController.java

@ -4,8 +4,11 @@ import com.yihu.mm.controller.BaseController;
import com.yihu.mm.entity.Patient;
import com.yihu.mm.service.PatientService;
import com.yihu.mm.service.PhysicalExaminationService;
import com.yihu.mm.util.HttpClientUtil;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
@ -13,6 +16,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@RestController
@RequestMapping(value = "/medicine/physicalExamination")
public class PhysicalExaminationController extends BaseController {
@ -20,6 +26,9 @@ public class PhysicalExaminationController extends BaseController {
    @Value("${examCode}")
    private String examCode;
    @Value(("${yuerenApi}"))
    private String yuerenApi;
    @Autowired
    private PatientService patientService;
@ -30,28 +39,38 @@ public class PhysicalExaminationController extends BaseController {
    @ApiOperation(value = "获取试卷列表")
    @RequestMapping(value = "/findExames",produces="application/json;charset=UTF-8")
    @ResponseBody
    public String findExames(@ApiParam(name = "tp_type", value = "'问卷类型',(备选值:1,2,4)1:初筛问卷,2:助理问卷,4:现场问卷", required = true)@RequestParam(required = false, name = "tp_type") String tp_type) {
        physicalExaminationService.findExames(tp_type,examCode);
        return null;
    public String findExames(@ApiParam(name = "tp_type", value = "'问卷类型',(备选值:1,2,4)1:初筛问卷,2:助理问卷,4:现场问卷", required = true)@RequestParam(required = false, name = "tp_type") String tp_type,
                             HttpServletRequest req
                             ) {
        HttpSession session = req.getSession();
        String key = (String) session.getAttribute("key");
        if(StringUtils.isBlank(key)){
            key = HttpClientUtil.postBody(yuerenApi + "/phonekey", new JSONObject());
            session.setMaxInactiveInterval(60*60*4);
            session.setAttribute("key",key);
        }
        return physicalExaminationService.findExames(key,tp_type, examCode);
    }
    @ApiOperation(value = "新增预约单/获取咨询编号等信息")
    @RequestMapping(value = "/insertslip",produces="application/json;charset=UTF-8")
    @ResponseBody
    public String insertslip(@ApiParam(name = "patientCode", value = "居民code", required = true)@RequestParam(required = true, name = "patientCode") String patientCode){
    public String insertslip(@ApiParam(name = "patientCode", value = "居民code", required = true)@RequestParam(required = true, name = "patientCode") String patientCode, HttpServletRequest req){
        String key = (String) req.getSession().getAttribute("key");
        Patient patient = patientService.findByCode(patientCode);
        return physicalExaminationService.insertslip(patient);
        return physicalExaminationService.insertslip(key,patient);
    }
    @ApiOperation(value = "获取试题")
    @RequestMapping(value = "/findExames",produces="application/json;charset=UTF-8")
    @RequestMapping(value = "/findQuestion",produces="application/json;charset=UTF-8")
    @ResponseBody
    public String findQuestion(@ApiParam(name = "tp_id", value = "试卷id", required = true)@RequestParam(required = false, name = "tp_id") String tp_id,
                               @ApiParam(name = "pb_id", value = "问卷编号,第一题为0", required = true)@RequestParam(required = false, name = "pb_id") String pb_id,
                               @ApiParam(name = "pb_id", value = "咨询编号", required = true)@RequestParam(required = false, name = "pb_id") String ct_id){
        return null;
                               @ApiParam(name = "ct_id", value = "咨询编号", required = true)@RequestParam(required = false, name = "ct_id") String ct_id,
                               HttpServletRequest req){
        String key = (String) req.getSession().getAttribute("key");
        return physicalExaminationService.findQuestion(key,tp_id,pb_id,ct_id);
    }
    @ApiOperation(value = "提交试卷答案")
@ -60,9 +79,11 @@ public class PhysicalExaminationController extends BaseController {
    public String handleExam(@ApiParam(name = "tp_id", value = "试卷id", required = true)@RequestParam(required = true, name = "tp_id") String tp_id,
                               @ApiParam(name = "pb_id", value = "问卷编号,第一题为0", required = true)@RequestParam(required = true, name = "pb_id") String pb_id,
                               @ApiParam(name = "dc_answer", value = "问题答案", required = true)@RequestParam(required = true, name = "dc_answer") String dc_answer,
                             @ApiParam(name = "ct_id", value = "咨询编号", required = true)@RequestParam(required = true, name = "ct_id") String ct_id){
                             @ApiParam(name = "ct_id", value = "咨询编号", required = true)@RequestParam(required = true, name = "ct_id") String ct_id,
                            HttpServletRequest req){
        String key = (String) req.getSession().getAttribute("key");
        return physicalExaminationService.handleExam(key,tp_id,pb_id,dc_answer,ct_id);
        return null;
    }
    @ApiOperation(value = "四诊资料采集")

+ 64 - 3
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PhysicalExaminationService.java

@ -1,20 +1,81 @@
package com.yihu.mm.service;
import com.yihu.mm.entity.Patient;
import com.yihu.mm.util.HttpClientUtil;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Date;
@Service
public class PhysicalExaminationService {
    @Value(("${yuerenApi}"))
    private String yuerenApi;
    public String findExames(String key,String type, String examCode) {
        //先获取key值
        JSONObject params = new JSONObject();
        params.put("key",key);
        params.put("tp_type", type);
        params.put("sh_id", examCode);
        return HttpClientUtil.postBody(yuerenApi + "/findtest", params);
    public void findExames(String type, String examCode) {
    }
    public String insertslip(String key,Patient patient) {
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("sl_date", sdf.format(date));
        params.put("sl_state", "未签到");
        params.put("u_tel", patient.getMobile());
        params.put("u_name", patient.getName());
        Integer sex = patient.getSex();
        String sexStr = "";
        if(sex==1){
            sexStr="男";
        }else if(sex==2){
            sexStr="女";
        }
        params.put("u_sex",sexStr );
        //todo    sh_id 需要从数据库获取   wlyy_medicine_strores_no
        params.put("sh_id", "");
        params.put("u_idnum", patient.getIdcard());
        //params.put("u_native", u_native);//籍贯
        params.put("u_birthday", patient.getBirthday());
        params.put("u_province", patient.getProvinceName());
        params.put("u_city", patient.getCityName());
        params.put("u_area", patient.getTownName());
        params.put("u_address", patient.getAddress());
        //params.put("sl_pass", );//报告单是否审核通过
        return HttpClientUtil.postBody(yuerenApi + "/findtest", params);
    }
    public String insertslip(Patient patient) {
    public String findQuestion(String key, String tp_id, String pb_id, String ct_id) {
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("ct_id", ct_id);
        params.put("tp_id", tp_id);
        params.put("pb_id", pb_id);
        String postStr = HttpClientUtil.postBody("/yueren/giveproblem", params);
        return postStr;
    }
    public String handleExam(String key, String tp_id, String pb_id, String dc_answer, String ct_id) {
        return null;
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("ct_id", ct_id);
        params.put("tp_id", tp_id);
        params.put("pb_id", pb_id);
        params.put("dc_answer", dc_answer);
        return HttpClientUtil.postBody("/yueren/handleproblem", params);
    }
}

+ 1 - 0
patient-co-customization/patient-co-modern-medicine/src/main/resources/application.yml

@ -2,6 +2,7 @@ server:
  port: 8080
examCode:         #越人试卷题目code
yuerenApi: http://192.168.131.123:8180/wlyy_admin/yueren       #越人api调用地址
security:
  basic:

+ 14 - 14
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/yueren/YueRenController.java

@ -12,8 +12,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Map;
/**
 * Created by Administrator on 2017/8/14.
@ -33,7 +31,7 @@ public class YueRenController extends BaseController {
     * 获取每个接口需要传递的key值
     * @return
     */
    @RequestMapping(value = "/phonekey", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "/phonekey", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String getPhoneKey() {
        String postStr = remoteCall("/yueren/phonekey", new JSONObject());
@ -66,7 +64,7 @@ public class YueRenController extends BaseController {
     * @param sl_pass 报告单是否审核通过
     * @return
     */
    @RequestMapping(value = "insertslip", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "insertslip", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String insertSlip(String key, String sl_date,String sl_state,String u_tel, String u_name, String u_sex,
                             String sh_id, String u_idnum, String u_native, String u_birthday, String u_province,
@ -98,7 +96,7 @@ public class YueRenController extends BaseController {
     * @param file 附件
     * @return
     */
    @RequestMapping(value = "/uploadattachment", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "/uploadattachment", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String uploadAttachment(String file, String e_no) {
        JSONObject params = new JSONObject();
@ -117,7 +115,7 @@ public class YueRenController extends BaseController {
     * @param object_type 对象类型,备选数值(1,2,3)1脸型,2舌像,3录音
     * @return
     */
    @RequestMapping(value = "dillphoneimgdata", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "dillphoneimgdata", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String inserTemp(String key, String at_id, String answer, String answer_type, String ct_id, String object_type) {
        JSONObject params = new JSONObject();
@ -140,9 +138,11 @@ public class YueRenController extends BaseController {
     * @param sh_id 所属门店编号
     * @return
     */
    @RequestMapping(value = "findtest", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "findtest", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String findTest(String key, String tp_type, String sh_id) {
        String key1 = request.getParameter("key");
        System.out.println(key1);
        JSONObject params = new JSONObject();
        params.put("key", key);
        params.put("tp_type", tp_type);
@ -159,7 +159,7 @@ public class YueRenController extends BaseController {
     * @param pb_id 问题编号
     * @return
     */
    @RequestMapping(value = "giveproblem", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "giveproblem", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String giveproblem(String key,String ct_id, String tp_id, String pb_id) {
        JSONObject params = new JSONObject();
@ -180,7 +180,7 @@ public class YueRenController extends BaseController {
     * @param dc_answer 答案数组
     * @return 将用户提交的试卷题目的答案进行保存
     */
    @RequestMapping(value = "handleproblem", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "handleproblem", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String handleproblem(String key, String ct_id, String tp_id,String pb_id, String[] dc_answer) {
        JSONObject params = new JSONObject();
@ -199,7 +199,7 @@ public class YueRenController extends BaseController {
     * @param ct_id 咨询编号
     * @return
     */
    @RequestMapping(value = "centralizedproblem", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "centralizedproblem", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String centralizedproblem(String key, String ct_id) {
        JSONObject params = new JSONObject();
@ -215,7 +215,7 @@ public class YueRenController extends BaseController {
     * @param ct_id 咨询编号
     * @return
     */
    @RequestMapping(value = "conclusionfactor", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "conclusionfactor", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String conclusionFactor(String key, String ct_id) {
        JSONObject params = new JSONObject();
@ -233,7 +233,7 @@ public class YueRenController extends BaseController {
     * @param ct_id 咨询编号
     * @return
     */
    @RequestMapping(value = "insertconconhealth", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "insertconconhealth", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String insertConsultConclusionHealth(String key, String ct_id) {
        JSONObject params = new JSONObject();
@ -250,7 +250,7 @@ public class YueRenController extends BaseController {
     * @param reqtype 请求类型(备选数值1)
     * @return
     */
    @RequestMapping(value = "findconconhealth", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "findconconhealth", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String insertConsultConclusion(String key, String ct_id, String reqtype) {
        JSONObject params = new JSONObject();
@ -267,7 +267,7 @@ public class YueRenController extends BaseController {
     * @param ct_id 咨询编号
     * @return
     */
    @RequestMapping(value = "findintegral", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")
    @RequestMapping(value = "findintegral", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ResponseBody
    public String findIntegral(String key, String ct_id) {
        JSONObject params = new JSONObject();

+ 1 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -640,7 +640,7 @@ public class PrescriptionService extends ZysoftBaseService{
        params.put("cardNo",cardNo);
        params.put("visitNo",visitNo);
        String response = postSecond("getDispUnSettleFeeList","查询处方结算结果列表",params,null,header,false,2);
        String response = postSecond("getDispUnSettleFeeInfoList","查询处方结算结果列表",params,null,header,false,2);
        return response;
    }

+ 98 - 10
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/job/ZyDictJob.java

@ -16,7 +16,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
 * Created by chenweida on 2017/8/10.
@ -87,6 +88,7 @@ public class ZyDictJob implements Job {
            //清空表
            zyIvDiagnoseDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_diagnose_dict  ,size:" + zyIvDiagnoseDicts.size());
            zyIvDiagnoseDictDao.save(zyIvDiagnoseDicts);
        }
        logger.info("synchronized zy_iv_diagnose_dict end");
@ -104,6 +106,7 @@ public class ZyDictJob implements Job {
            //清空表
            zyIvSubjectClassDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_subject_class_dict  ,size:" + zyIvSubjectClassDicts.size());
            zyIvSubjectClassDictDao.save(zyIvSubjectClassDicts);
            logger.info("synchronized zy_iv_subject_class_dict end");
        }
@ -116,10 +119,10 @@ public class ZyDictJob implements Job {
        List<ZyIvStaffRegTypeAllotDict> zyIvStaffRegTypeAllotDicts = new ArrayList<>();
        //得到list
        commonGetOneDict(zyIvStaffRegTypeAllotDicts, ZyIvStaffRegTypeAllotDict.class, dictName);
        //清空表
        zyIvStaffRegTypeAllotDictDao.deleteAll();
        //新增数据
        logger.info("save table zy_iv_staff_reg_type_allot_dict  ,size:" + zyIvStaffRegTypeAllotDicts.size());
        zyIvStaffRegTypeAllotDictDao.save(zyIvStaffRegTypeAllotDicts);
        logger.info("synchronized zy_iv_staff_reg_type_allot_dict end");
    }
@ -134,6 +137,7 @@ public class ZyDictJob implements Job {
        //清空表
        zyIvStaffDictDao.deleteAll();
        //新增数据
        logger.info("save table zy_iv_staff_dict  ,size:" + zyIvStaffDicts.size());
        zyIvStaffDictDao.save(zyIvStaffDicts);
        logger.info("synchronized zy_iv_staff_dict end");
    }
@ -145,10 +149,10 @@ public class ZyDictJob implements Job {
        List<ZyIvPhysicDict> zyIvPhysicDicts = new ArrayList<>();
        //得到list
        commonGetOneDict(zyIvPhysicDicts, ZyIvPhysicDict.class, dictName);
        //清空表
        zyIvPhysicDictDao.deleteAll();
        //新增数据
        logger.info("save table zy_iv_physic_dict  ,size:" + zyIvPhysicDicts.size());
        zyIvPhysicDictDao.save(zyIvPhysicDicts);
        logger.info("synchronized zy_iv_physic_dict end");
    }
@ -164,6 +168,7 @@ public class ZyDictJob implements Job {
            //清空表
            zyIvOrgPhysicAllotDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_org_physic_allot_dict  ,size:" + zyIvOrgPhysicAllotDicts.size());
            zyIvOrgPhysicAllotDictDao.save(zyIvOrgPhysicAllotDicts);
        }
        logger.info("synchronized zy_iv_org_physic_allot_dict end");
@ -180,6 +185,8 @@ public class ZyDictJob implements Job {
            //清空表
            zyIvDiagnoseClassDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_diagnose_class_dict  ,size:" + zIvDiagnoseClassDicts.size());
            zyIvDiagnoseClassDictDao.save(zIvDiagnoseClassDicts);
        }
        logger.info("synchronized zy_iv_diagnose_class_dict end");
@ -197,6 +204,7 @@ public class ZyDictJob implements Job {
            //清空表
            zyIvDeptStaffAllotDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_dept_staff_allot_dict  ,size:" + syIvDeptStaffAllotDictz.size());
            zyIvDeptStaffAllotDictDao.save(syIvDeptStaffAllotDictz);
        }
        logger.info("synchronized zy_iv_dept_staff_allot_dict end");
@ -222,16 +230,34 @@ public class ZyDictJob implements Job {
                    throw new Exception("zy dict error status not 200");
                }
                if (returnJson.containsKey("data")) {
                    JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
                    String dataString = returnJson.getString("data");
                    JSONArray dataJSONArray = JSONObject.fromObject(dataString).getJSONArray("returnData");
                    logger.info("zy dict data size " + dataJSONArray.size() + ",dictname:" + dictName);
                    if (dataJSONArray.size() == 0) {
                        throw new Exception("zy dict error data size 0");
                        continue;
                    }
                    ZyCommonDict[] zyCommonDictArrays = (ZyCommonDict[]) JSONArray.toArray(dataJSONArray, ZyCommonDict.class);
                    //下划线转驼峰
                    JSONArray newJA = new JSONArray();
                    JSONArray jsonArrayTemp = dataJSONArray.getJSONArray(0);
                    for (int i = 0; i < jsonArrayTemp.size(); i++) {
                        JSONObject jo = jsonArrayTemp.getJSONObject(i);
                        JSONObject newJO = new JSONObject();
                        jo.keySet().stream().forEach(key -> {
                            Object value = jo.get(key);
                            String newKey = Tool.lineToHump(key.toString());
                            newJO.put(newKey, value);
                        });
                        newJA.add(newJO);
                    }
                    ZyCommonDict[] zyCommonDictArrays = (ZyCommonDict[]) JSONArray.toArray(newJA, ZyCommonDict.class);
                    zyCommonDictz.addAll(Arrays.asList(zyCommonDictArrays));
                } else {
                    throw new Exception("zy dict error no contain data");
                }
            } catch (Exception e) {
                e.printStackTrace();
                isFlush = false; //设置状态不能更新
                logger.error("dictName:" + dictName);
                logger.error("returnJson:" + json);
@ -245,6 +271,7 @@ public class ZyDictJob implements Job {
                //清空表
                zyCommonDictDao.deleteAll();
                //新增数据
                logger.info("save table zy_common_dict  ,size:" + zyCommonDictz.size());
                zyCommonDictDao.save(zyCommonDictz);
            }
        }
@ -263,6 +290,7 @@ public class ZyDictJob implements Job {
            //清空表
            zyIvDeptDictDao.deleteAll();
            //新增数据
            logger.info("save table zy_iv_dept_dict  ,size:" + zyIvDeptDicts.size());
            zyIvDeptDictDao.save(zyIvDeptDicts);
        }
        logger.info("synchronized zy_iv_dept_dict end");
@ -285,11 +313,24 @@ public class ZyDictJob implements Job {
                throw new Exception("zy dict error status not 200");
            }
            if (returnJson.containsKey("data")) {
                JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
                if (dataJSONArray.size() == 0) {
                    throw new Exception("zy dict error data size 0");
                JSONArray dataJSONArray = JSONObject.fromObject(returnJson.getString("data")).getJSONArray("returnData");
                logger.info("zy dict data size " + dataJSONArray.size() + ",dictname:" + dictName);
                //下划线转驼峰
                JSONArray newJA = new JSONArray();
                for (int i = 0; i < dataJSONArray.getJSONArray(0).size(); i++) {
                    JSONObject jo = dataJSONArray.getJSONArray(0).getJSONObject(i);
                    JSONObject newJO = new JSONObject();
                    jo.keySet().stream().forEach(key -> {
                        Object value = jo.get(key);
                        String newKey = Tool.lineToHump(key.toString());
                        newJO.put(newKey, value);
                    });
                    newJA.add(newJO);
                }
                tList.addAll(Arrays.asList(JSONArray.toArray(dataJSONArray, clazz)));
                tList.addAll(Arrays.asList(JSONArray.toArray(newJA, clazz)));
            } else {
                throw new Exception("zy dict error no contain data");
            }
@ -434,4 +475,51 @@ public class ZyDictJob implements Job {
        }
        return "";
    }
    public static class Tool {
        private static Pattern linePattern = Pattern.compile("_(\\w)");
        /**
         * 下划线转驼峰
         */
        public static String lineToHump(String str) {
            str = str.toLowerCase();
            Matcher matcher = linePattern.matcher(str);
            StringBuffer sb = new StringBuffer();
            while (matcher.find()) {
                matcher.appendReplacement(sb, matcher.group(1).toUpperCase());
            }
            matcher.appendTail(sb);
            return sb.toString();
        }
        /**
         * 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)})
         */
        public static String humpToLine(String str) {
            return str.replaceAll("[A-Z]", "_$0").toLowerCase();
        }
        private static Pattern humpPattern = Pattern.compile("[A-Z]");
        /**
         * 驼峰转下划线,效率比上面高
         */
        public static String humpToLine2(String str) {
            Matcher matcher = humpPattern.matcher(str);
            StringBuffer sb = new StringBuffer();
            while (matcher.find()) {
                matcher.appendReplacement(sb, "_" + matcher.group(0).toLowerCase());
            }
            matcher.appendTail(sb);
            return sb.toString();
        }
        public static void main(String[] args) {
            String lineToHump = lineToHump("f_parent_no_leader");
            System.out.println(lineToHump);//fParentNoLeader
            System.out.println(humpToLine(lineToHump));//f_parent_no_leader
            System.out.println(humpToLine2(lineToHump));//f_parent_no_leader
        }
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionInfoController.java

@ -47,7 +47,7 @@ public class PatientPrescriptionInfoController extends BaseController {
                                       @RequestParam(required = false)@ApiParam(name="page",value="起始页")Integer page,
                                       @RequestParam(required = false)@ApiParam(name="size",value="每页记录数")Integer size){
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescriptionInfos(type,diagnosisCode,startDate,endDate,"915ccc97-5b1d-11e6-8344-fa163e8aee56",isRenewal,page,size));
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescriptionInfos(type,diagnosisCode,startDate,endDate,getRepUID(),isRenewal,page,size));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionPayController.java

@ -78,8 +78,8 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
        try {
            String accessToken = getAccessToken();
            String patient = getUID();
            payService.charge(type,addressJson,orgCode, prescriptionCode, totalAmount, patient, accessToken,returnUrl);
            return write(200, "支付成功!");
            String result = payService.charge(type,addressJson,orgCode, prescriptionCode, totalAmount, patient, accessToken,returnUrl);
            return write(200, "支付成功!","data",result);
        } catch (Exception e) {
            return error(-1, "支付失败!");
        }

+ 6 - 6
patient-co/patient-co-wlyy/src/main/resources/wechat/weixin_menu_jimei.txt

@ -59,6 +59,11 @@
   {
	  "name":"我的",
	  "sub_button":[
		{
		   "type":"view",
		   "name":"专属服务",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fdist%2fhtml%2fexclusive-service.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		},
		{
		   "type":"view",
		   "name":"我的资料",
@ -74,14 +79,9 @@
		   "name":"我的设备",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdsb%2fhtml%2fmy-equipments.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		},
        {
         	"type":"click",
         	"name":"操作说明",
         	"key":"caozuoshuoming"
        },
        {
        	 "type":"view",
        	 "name":"集美反馈",
        	 "name":"意见反馈",
        	 "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fyjfk%2fhtml%2ffeedback.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
        }
	 ]