Procházet zdrojové kódy

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
wangzhinan před 5 roky
rodič
revize
33cea9eb17

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

@ -39,6 +39,7 @@ import com.yihu.jw.hospital.mapping.service.PatientMappingService;
import com.yihu.jw.hospital.message.service.SystemMessageService;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.BaseDoctorPatientFollowDao;
@ -167,6 +168,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private BaseDoctorInfoService baseDoctorService;
    @Autowired
    private BusinessOrderDao businessOrderDao;
    @Autowired
    private YkyyEntranceService ykyyEntranceService;
    @Value("${demo.flag}")
@ -1919,7 +1922,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            prescription.setRegFee(getChargeFee(outpatientDO.getDoctor()));
            //保存费用
            prescriptionDao.save(prescription);
    
            if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                ykyyEntranceService.findByRealOrder(prescription.getId());
            }
            if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
                outpatientDO.setStatus("2");
                outpatientDao.save(outpatientDO);
@ -1930,6 +1935,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                //上传his开方
                return sendHisDiagnosis(jsonData, outpatientDO, prescription);
            }
        } else {
            outpatientDO.setStatus("2");
            outpatientDao.save(outpatientDO);
@ -1938,6 +1944,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            return result;
        }
    }

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

@ -140,6 +140,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        businessOrderDO.setRelationCode(outpatient.getId());
        businessOrderDO.setRelationName("复诊-诊查费");
        businessOrderDO.setDescription("复诊-诊查费");
        businessOrderDO.setRematk(outpatient.getDescription());
        businessOrderDO.setPatient(outpatient.getPatient());
        businessOrderDO.setPatientName(outpatient.getPatientName());
        businessOrderDO.setDoctor(outpatient.getDoctor());

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

@ -38,6 +38,7 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.utils.network.HttpResponse;
@ -72,6 +73,8 @@ public class YkyyEntranceService {
    private final static String updateUrl="http://192.168.20.55:10023/ykyy/updateBySql";
    private final static String updateEntityUrl="http://192.168.20.55:10023/ykyy/update";
    private final static String orgCode ="350211A5004";
    private final static String orgName ="厦门大学附属厦门眼科中心";
@ -103,9 +106,6 @@ public class YkyyEntranceService {
    @Autowired
    private PrescriptionDao prescriptionDao;
    @Autowired
    private PrescriptionInfoDao prescriptionInfoDao;
    @Autowired
    private BaseEvaluateScoreDao baseEvaluateScoreDao;
@ -116,11 +116,14 @@ public class YkyyEntranceService {
    private HibenateUtils hibenateUtils;
    @Autowired
    private ObjectMapper objectMapper;
    private HttpClientUtil httpClientUtil;
    @Autowired
    private YkDictIcd10Dao ykDictIcd10Dao;
    @Autowired
    private PrescriptionInfoDao prescriptionInfoDao;
    public List<Map<String, Object>> createSQLQuery(String sql, Map<String, Object> params, Integer page, Integer size){
        return hibenateUtils.createSQLQuery(sql,params,page,size);
@ -131,8 +134,8 @@ public class YkyyEntranceService {
        hibenateUtils.save(object);
    }
    public void update(String id,Integer status){
        hibenateUtils.update(id,status);
    public void update(Object object){
        hibenateUtils.update(object);
    }
    public void updateBySql(String sql){
@ -439,6 +442,130 @@ public class YkyyEntranceService {
        return "success";
    }
    public String updateYkTDoctor()throws Exception{
        String response="";
        String url = "http://www.yanketong.com:133/api/doc_jkzl/doctor_list_had_bind_account?hospital_code=sb&page=1";
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject rs = JSON.parseObject(response);
        Integer status = rs.getInteger("code");
        if(status!=null&&status == 200){
            JSONObject object = rs.getJSONObject("data");
            JSONArray array = object.getJSONArray("list");
            logger.info("doctor size:"+array.size());
            if(array!=null&&array.size()>0) {
                for (int i = 0; i < array.size(); i++) {
                    JSONObject doctorJson = array.getJSONObject(i);
                    String idcard = doctorJson.getString("idcard");
                    //过滤身份证脏数据
                    if(idcard.length()>=15){
                        List<BaseDoctorDO> doctorDOs = baseDoctorDao.findByIdcard(idcard);
                        if(doctorDOs!=null&&doctorDOs.size()>0){
                            BaseDoctorDO doctor = doctorDOs.get(0);
                            String salt = randomString(5);
                            String pw = idcard.substring(idcard.length() - 6);
                            doctor.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                            doctor.setSalt(salt);
                            doctor.setJobTitleCode(doctorJson.getString("jobtitlecode"));
                            doctor.setJobTitleName(doctorJson.getString("jobTitleName"));
//                            doctor.setExpertise(doctorJson.getString("expertise"));
//                            doctor.setIntroduce(doctorJson.getString("introduce"));
//                            doctor.setMobile(doctorJson.getString("mobile"));
                            BaseDoctorDO temp = baseDoctorDao.save(doctor);
                            List<BaseDoctorHospitalDO> hospitalDOs = baseDoctorHospitalDao.findByOrgCodeAndDeptCodeAndDoctorCode(orgCode,doctorJson.getString("dept"),doctor.getId());
                            if(hospitalDOs!=null&&hospitalDOs.size()>0){
                                //机构信息部门信息
                                BaseDoctorHospitalDO hospitalDO = hospitalDOs.get(0);
                                hospitalDO.setDeptCode(doctorJson.getString("dept"));
                                hospitalDO.setDeptName(doctorJson.getString("deptName"));
                                hospitalDO.setDel("1");
                                baseDoctorHospitalDao.save(hospitalDO);
                            }
                        }else{
                            //新增医生
                            BaseDoctorDO doctor = new BaseDoctorDO();
                            doctor.setName(doctorJson.getString("name"));
                            doctor.setIdcard(idcard);
                            doctor.setSex(Integer.parseInt(IdCardUtil.getSexForIdcard_new(idcard)));
                            doctor.setBirthday(IdCardUtil.getBirthdayForIdcard(idcard));
                            doctor.setProvinceCode("350000");
                            doctor.setProvinceName("福建省");
                            doctor.setTownCode("350203");
                            doctor.setTownName("思明区");
                            doctor.setCityCode("350200");
                            doctor.setCityName("厦门市");
//                            doctor.setExpertise(doctorJson.getString("expertise"));
//                            doctor.setIntroduce(doctorJson.getString("introduce"));
//                            doctor.setMobile(doctorJson.getString("mobile"));
                            //认证信息设置
                            String salt = randomString(5);
                            String pw = idcard.substring(idcard.length() - 6);
                            doctor.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                            doctor.setSalt(salt);
                            doctor.setDel("1");
                            doctor.setEnabled(1);
                            doctor.setLocked(0);
                            doctor.setCreateTime(new Date());
                            doctor.setJobTitleCode(doctorJson.getString("jobtitlecode"));
                            doctor.setJobTitleName(doctorJson.getString("jobTitleName"));
                            BaseDoctorDO temp = baseDoctorDao.save(doctor);
                            //机构信息部门信息
                            BaseDoctorHospitalDO hospitalDO = new BaseDoctorHospitalDO();
                            hospitalDO.setDoctorCode(temp.getId());
                            hospitalDO.setOrgCode(orgCode);
                            hospitalDO.setOrgName(orgName);
                            hospitalDO.setDeptCode(doctorJson.getString("dept"));
                            hospitalDO.setDeptName(doctorJson.getString("deptName"));
                            hospitalDO.setDel("1");
                            baseDoctorHospitalDao.save(hospitalDO);
                            //保存角色
                            BaseDoctorRoleDO role = new BaseDoctorRoleDO();
                            role.setDoctorCode(temp.getId());
                            role.setRoleCode("specialist");
                            baseDoctorRoleDao.save(role);
                            //保存mapping
                            DoctorMappingDO mappingDO = new DoctorMappingDO();
                            mappingDO.setIdcard(idcard);
                            mappingDO.setDoctor(temp.getId());
                            mappingDO.setDoctorName(temp.getName());
                            mappingDO.setOrgCode(orgCode);
                            mappingDO.setOrgName(orgName);
                            mappingDO.setMappingCode(doctorJson.getString("code"));
                            mappingDO.setMappingName(temp.getName());
                            mappingDO.setCreateTime(new Date());
                            doctorMappingDao.save(mappingDO);
                        }
                    }
                }
            }
        }
        return "success";
    }
    public String randomString(int length) {
        String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        StringBuffer buffer = new StringBuffer();
@ -1052,6 +1179,12 @@ public class YkyyEntranceService {
                hlwCf01DO.setSJLY(1);
                hlwCf01DO.setJZXH(Integer.parseInt(wlyyPrescriptionVO.getAdmNo()));
               /* hibenateUtils.save(hlwCf01DO);*/
                if (StringUtils.isNoneBlank(wlyyPrescriptionVO.getRealOrder())){
                    hlwCf01DO.setCFSB(Integer.parseInt(wlyyPrescriptionVO.getRealOrder()));
                }
                if (StringUtils.isNoneBlank(wlyyPrescriptionVO.getOriginRealOrder())){
                    hlwCf01DO.setCFHM(wlyyPrescriptionVO.getOriginRealOrder());
                }
                String jsonString = JSONObject.toJSONString(hlwCf01DO);
                Map<String,Object> params = new HashedMap();
@ -1062,28 +1195,44 @@ public class YkyyEntranceService {
                 {"message":null,"status":200,"obj":{"cfhm":1898356,"cfsb":5390518}}
                 */
                HttpResponse response = HttpUtils.doGet(saveUrl,params);
                String cfsb = null;
                if (response.getStatus()==200){
                    logger.info("content"+response.getContent());
                    String content = response.getContent();
                    JSONObject jsonObject = JSONObject.parseObject(content);
                    JSONObject object = jsonObject.getJSONObject("obj");
                    if (object!=null){
                        cfsb = object.getString("cfsb");
                        logger.info("kaishi=========="+cfsb);
                        List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findById(code);
                        if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
                            WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
                            wlyyPrescriptionDO.setRealOrder(cfsb);
                            prescriptionDao.save(wlyyPrescriptionDO);
                String cfhm = null;
                if (!StringUtils.isNoneBlank(wlyyPrescriptionVO.getRealOrder())){
                    HttpResponse response = HttpUtils.doGet(saveUrl,params);
                    if (response.getStatus()==200){
                        logger.info("content"+response.getContent());
                        String content = response.getContent();
                        JSONObject jsonObject = JSONObject.parseObject(content);
                        JSONObject object = jsonObject.getJSONObject("obj");
                        if (object!=null){
                            cfsb = object.getString("cfsb");
                            cfhm = object.getString("cfhm");
                            logger.info("kaishi=========="+cfsb);
                            List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findById(code);
                            if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
                                WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
                                wlyyPrescriptionDO.setRealOrder(cfsb);
                                wlyyPrescriptionDO.setOriginRealOrder(cfhm);
                                prescriptionDao.save(wlyyPrescriptionDO);
                            }
                        }
                    }
                    logger.info("表HLW_CF01同步成功!");
                        logger.info("表HLW_CF01同步成功!");
                    }else {
                        logger.info("表HLW_CF01同步失败!"+response.getErrorMsg());
                    }
                }else {
                    logger.info("表HLW_CF01同步失败!"+response.getErrorMsg());
                    cfsb = wlyyPrescriptionVO.getRealOrder();
                    HttpResponse response = HttpUtils.doGet(updateEntityUrl,params);
                    if (response.getStatus()==200){
                        logger.info("content"+response.getContent());
                        logger.info("表HLW_CF01更新成功!");
                    }else {
                        logger.info("表HLW_CF01更新失败!"+response.getErrorMsg());
                    }
                }
                logger.info("处方:"+cfsb);
                if (StringUtils.isEmpty(cfsb)){
                    throw new Exception("添加失败");
@ -1113,6 +1262,9 @@ public class YkyyEntranceService {
                    hlwCf02DO.setGYTJ(wlyyPrescriptionInfoVO.getYpyf());
                    hlwCf02DO.setPSPB(0);
                    hlwCf02DO.setYYTS(1);
                    if (wlyyPrescriptionInfoVO.getHisCode()!=null){
                        hlwCf02DO.setSBXH(wlyyPrescriptionInfoVO.getHisCode());
                    }
                    /*hlwCf02DO.setYPZH(Integer.parseInt(wlyyPrescriptionInfoVO.getFrequency()));*/
                    hlwCf02DO.setYFGG(wlyyPrescriptionInfoVO.getSpecification());
                  /*  hibenateUtils.save(hlwCf02DO);*/
@ -1122,12 +1274,37 @@ public class YkyyEntranceService {
                    params1.put("json",jsonString1);
                    params1.put("table","HLW_CF02");
                    logger.info("HLW_CF02:"+jsonString1);
                    HttpResponse response1 = HttpUtils.doGet(saveUrl,params1);
                    if (response1.getStatus()==200){
                        logger.info("表HLW_CF02同步成功!");
                    if (wlyyPrescriptionInfoVO.getHisCode()==null){
                        HttpResponse response1 = HttpUtils.doGet(saveUrl,params1);
                        Integer sbxh = null;
                        if (response1.getStatus()==200){
                            logger.info("content"+response1.getContent());
                            String content = response1.getContent();
                            JSONObject jsonObject = JSONObject.parseObject(content);
                            JSONObject object = jsonObject.getJSONObject("obj");
                            if (object!=null){
                                sbxh = object.getInteger("sbxh");
                                logger.info("kaishi=========="+cfsb);
                                WlyyPrescriptionInfoDO wlyyPrescriptionInfoDO = prescriptionInfoDao.findOne(wlyyPrescriptionInfoVO.getId());
                                if (wlyyPrescriptionInfoDO!=null){
                                    wlyyPrescriptionInfoDO.setHisCode(sbxh);
                                    prescriptionInfoDao.save(wlyyPrescriptionInfoDO);
                                }
                            }
                            logger.info("表HLW_CF02同步成功!");
                        }else {
                            logger.info("表HLW_CF02同步失败!"+response1.getErrorMsg());
                        }
                    }else {
                        logger.info("表HLW_CF02同步失败!"+response1.getErrorMsg());
                        HttpResponse response1 = HttpUtils.doGet(updateEntityUrl,params1);
                        if (response1.getStatus()==200){
                            logger.info("content"+response1.getContent());
                            logger.info("表HLW_CF02更新成功!");
                        }else {
                            logger.info("表HLW_CF02更新失败!"+response1.getErrorMsg());
                        }
                    }
                    }catch (Exception e){
                        e.printStackTrace();
                        e.getMessage();

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -136,8 +136,8 @@ public class BusinessOrderService {
        }else {
            throw new Exception("医生映射表不存在!");
        }
        String response=ykyyService.addYktOrder(orderNo,patientId,orderAmout,description,state,orderType,yktDoctor,payType,null,patientTel,orderCatagrate,pcCallBack,appCallBack);
        String remark = businessOrderDO.getRematk();
        String response=ykyyService.addYktOrder(orderNo,patientId,orderAmout,remark,state,orderType,yktDoctor,payType,null,patientTel,orderCatagrate,pcCallBack,appCallBack);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("code")==200){
            businessOrderDO.setUploadStatus(1);
@ -493,7 +493,7 @@ public class BusinessOrderService {
                        WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
                        wlyyPrescriptionDO.setPayStatus(1);
                        prescriptionDao.save(wlyyPrescriptionDO);
                        String sql = " update hlw_cf01 SET FKZT=1 where CFSB = '"+wlyyPrescriptionDO.getRealOrder()+"'";
                        String sql = " update v_ms_dd01 SET FKZT=1 where CFSB = '"+wlyyPrescriptionDO.getRealOrder()+"'";
                        try {
                            ykyyEntranceService.updateHisStatus(sql);
                        } catch (Exception e) {

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/HlwCf01DO.java

@ -12,7 +12,7 @@ import java.util.Date;
 * */
//@ApiModel(value = "HlwCf01VO", description = "眼科处方表1数据")
@Entity
@Table(name = "HLW_CF01",  catalog = "model")
@Table(name = "v_ms_dd01")
public class HlwCf01DO {
    private Integer cFSB;//	NUMBER(18)	N			处方识别
    private String cFHM;//	VARCHAR2(10)	Y			处方号码

+ 1 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/HlwCf02DO.java

@ -10,8 +10,7 @@ import java.util.Date;
 *
 * */
@Entity
@Table(name = "HLW_CF02")
@SequenceGenerator(name="id_generated", sequenceName="SEQ_HLW_CF02")
@Table(name = "v_ms_dd02")
public class HlwCf02DO {
    private Integer sBXH;//NUMBER(18)   N注释
    private Integer cFSB;//NUMBER(18)   N识别序号
@ -58,7 +57,6 @@ public class HlwCf02DO {
    private String tHYY;//VARCHAR2(200) Y退回原因
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
    @Id
    @Column(name = "SBXH")
    public Integer getSBXH() {

+ 15 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionInfoDO.java

@ -153,6 +153,12 @@ public class WlyyPrescriptionInfoDO extends UuidIdentityEntity {
    private Integer ypyf;
    /**
     * 眼科hiscode
     */
    private Integer HisCode;
    @Column(name = "prescription_id")
    public String getPrescriptionId() {
        return prescriptionId;
@ -384,4 +390,13 @@ public class WlyyPrescriptionInfoDO extends UuidIdentityEntity {
    public void setYpyf(Integer ypyf) {
        this.ypyf = ypyf;
    }
    @Column(name = "his_code")
    public Integer getHisCode() {
        return HisCode;
    }
    public void setHisCode(Integer hisCode) {
        HisCode = hisCode;
    }
}

+ 10 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/order/BusinessOrderDO.java

@ -28,6 +28,7 @@ public class BusinessOrderDO extends IntegerIdentityEntity {
    private String relationCode;//业务关联code
    private String relationName;//业务关联名称
    private String description;//支付备注
    private String rematk;//病人描述
    private Integer payType;//支付类型1微信2支付宝
    private Double payPrice;//支付金额
    private Date payTime;//支付时间
@ -246,4 +247,13 @@ public class BusinessOrderDO extends IntegerIdentityEntity {
    public void setUploadStatus(Integer uploadStatus) {
        this.uploadStatus = uploadStatus;
    }
    @Column(name = "remark")
    public String getRematk() {
        return rematk;
    }
    public void setRematk(String rematk) {
        this.rematk = rematk;
    }
}

+ 11 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyPrescriptionInfoVO.java

@ -152,6 +152,9 @@ public class WlyyPrescriptionInfoVO extends UuidIdentityVOWithOperator {
    @ApiModelProperty(value = "给药途径", example = "给药途径")
    private Integer ypyf;
    @ApiModelProperty(value = "眼科hisCode", example = "眼科hisCode")
    private Integer HisCode;
    private String comm;
@ -360,4 +363,12 @@ public class WlyyPrescriptionInfoVO extends UuidIdentityVOWithOperator {
    public void setYpyf(Integer ypyf) {
        this.ypyf = ypyf;
    }
    public Integer getHisCode() {
        return HisCode;
    }
    public void setHisCode(Integer hisCode) {
        HisCode = hisCode;
    }
}

+ 22 - 8
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/YkyyController.java

@ -14,10 +14,12 @@ import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.axis.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -68,12 +70,21 @@ public class YkyyController extends EnvelopRestEndpoint {
    @GetMapping(value = "/update")
    @ApiOperation(value = "更新支付")
    public ObjEnvelop udapte(@ApiParam(name = "id", value = "sql语句", required = true)
                                      @RequestParam(value = "id",required = true)String id,
                                      @ApiParam(name = "status", value = "状态", required = true)
                                      @RequestParam(value = "status",required = false)Integer status){
    public ObjEnvelop udapte(@ApiParam(name = "json", value = "json", required = true)
                                 @RequestParam(value = "json",required = true)String json,
                             @ApiParam(name = "table", value = "table", required = true)
                                 @RequestParam(value = "table",required = true)String table){
        ObjEnvelop envelop = new ObjEnvelop();
        ykyyEntranceService.update(id,status);
        JSONObject object = JSONObject.parseObject(json);
        if (table.equalsIgnoreCase("HLW_CF01")){
            HlwCf01DO hlwCf01VO =  JSONObject.toJavaObject(object,HlwCf01DO.class);
            ykyyEntranceService.update(hlwCf01VO);
            envelop.setObj(hlwCf01VO);
        } else if (table.equalsIgnoreCase("HLW_CF02")) {
            HlwCf02DO hlwCf02VO =  JSONObject.toJavaObject(object,HlwCf02DO.class);
            ykyyEntranceService.update(hlwCf02VO);
            envelop.setObj(hlwCf02VO);
        }
        return success(envelop);
    }
@ -122,15 +133,18 @@ public class YkyyController extends EnvelopRestEndpoint {
            ykyyEntranceService.save(hlwCf01VO);
            envelop.setObj(object1);
        }else if (table.equalsIgnoreCase("HLW_CF02")){
            HlwCf02DO hlwCf01VO =  JSONObject.toJavaObject(object,HlwCf02DO.class);
            HlwCf02DO hlwCf02VO =  JSONObject.toJavaObject(object,HlwCf02DO.class);
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'MS_CF02'";
            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql);
            Long sbxh = 0L;
            if (sbxhList!=null&&sbxhList.size()!=0){
                sbxh = Long.parseLong(sbxhList.get(0).get("total").toString());
            }
            hlwCf01VO.setSBXH(sbxh.intValue());
            ykyyEntranceService.save(hlwCf01VO);
            JSONObject object1 = new JSONObject();
            object1.put("sbxh",sbxh);
            envelop.setObj(object1);
            hlwCf02VO.setSBXH(sbxh.intValue());
            ykyyEntranceService.save(hlwCf02VO);
        }
        return envelop;

+ 1 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -427,6 +427,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
				if (wxId.equalsIgnoreCase("xm_ykyy_wx")){
					BusinessOrderDO businessOrderDO = new BusinessOrderDO();
					businessOrderDO.setDoctor(doctor);
					businessOrderDO.setRematk(symptoms);
					businessOrderDO.setPatient(patient);
					businessOrderDO.setPatientName(re.getString("patientName"));
					businessOrderDO.setDescription("专家咨询费");