Selaa lähdekoodia

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/PrescriptionService.java
wangzhinan 4 vuotta sitten
vanhempi
commit
9d765bf111

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionDao.java

@ -21,6 +21,10 @@ public interface PrescriptionDao extends PagingAndSortingRepository<WlyyPrescrip
    @Query("update WlyyPrescriptionDO p set p.status=?2 where p.id=?1")
    void updateStatus(String id,Integer status);
    @Modifying
    @Query("update WlyyPrescriptionDO p set p.checkStatus=?2,p.checkReason=?3,p.status=?4 where p.id=?1")
    void updateCheckStatus(String id,Integer checkStatus,String reason,Integer status);
    @Modifying
    @Query("update WlyyPrescriptionDO p set p.status=?2 ,p.finishTime =?3 where p.id=?1")
    void updateStatus(String id, Integer status, Date date);

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/PrescriptionLogDao.java

@ -2,6 +2,7 @@ package com.yihu.jw.hospital.prescription.dao;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
@ -14,4 +15,7 @@ public interface PrescriptionLogDao extends PagingAndSortingRepository<WlyyPresc
    List<WlyyPrescriptionLogDO> findByOutpatientIdOrderByCreateTimeDesc(String outpatientId);
    List<WlyyPrescriptionLogDO> findByPrescriptionCodeOrderByCreateTimeDesc(String prescriptionCode);
    @Query("select a from WlyyPrescriptionLogDO a where a.prescriptionCode = ?1 and a.status in(20,30,10,100) order by createTime desc ")
    List<WlyyPrescriptionLogDO> findByPrescriptionCodeByStatus(String prescriptionCode);
}

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

@ -77,4 +77,9 @@ public class PrescriptionLogService  extends BaseJpaService<WlyyPrescriptionLogD
    public List<WlyyPrescriptionLogDO> findPrescriptionLogByPreId(String prescriptionCode){
        return logDao.findByPrescriptionCodeOrderByCreateTimeDesc(prescriptionCode);
    }
    public List<WlyyPrescriptionLogDO> findByPrescriptionCodeByStatus(String prescriptionCode){
        return logDao.findByPrescriptionCodeByStatus(prescriptionCode);
    }
}

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

@ -54,7 +54,6 @@ import com.yihu.jw.restmodel.hospital.consult.WlyyHospitalSysDictVO;
import com.yihu.jw.restmodel.hospital.doctor.WlyyDoctorWorkTimeVO;
import com.yihu.jw.restmodel.hospital.prescription.*;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.util.common.IdCardUtil;
@ -72,7 +71,6 @@ import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -5208,7 +5206,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public List<Map<String,Object>> selectByCondition(String hospital, String dept, String status, String startTime, String endTime, String nameInfo, Integer page, Integer pagesize, String wxId){
    public List<Map<String,Object>> selectByCondition(String hospital, String dept, String checkStatus, String startTime, String endTime, String nameInfo, Integer page, Integer pagesize, String wxId){
        List<Map<String,Object>> maps = new ArrayList<>();
        String sql = "SELECT\n" +
                "\tp.doctor as \"doctor\",\n" +
@ -5227,7 +5225,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }else{
            sql = sql + "date_format(p.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"createTime\",";
        }
                sql +="\tp.`status` as \"status\"\n" +
                sql +="\tp.status as \"status\",\n" +
                        "\tp.check_status as \"checkStatus\",\n" +
                        "\tp.check_reason as \"checkReason\"\n" +
                "FROM\n" +
                "\twlyy_prescription P\n" +
                "WHERE\n" +
@ -5241,9 +5241,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            sql +=" and p.dept =:dept";
            params.put("dept",dept);
        }
        if (StringUtils.isNoneBlank(status)){
            sql +=" and p.status =:status";
            params.put("status",status);
        if (StringUtils.isNoneBlank(checkStatus)){
            sql +=" and p.check_status =:checkStatus";
            params.put("checkStatus",checkStatus);
        }
        if (StringUtils.isNoneBlank(startTime)){
            sql +=" and p.create_time >=:startTime";
@ -5270,9 +5270,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            sqlTotal +=" and p.dept =:dept";
            params1.put("dept",dept);
        }
        if (StringUtils.isNoneBlank(status)){
            sqlTotal +=" and p.status =:status";
            params1.put("status",status);
        if (StringUtils.isNoneBlank(checkStatus)){
            sqlTotal +=" and p.check_status =:checkStatus";
            params1.put("checkStatus",checkStatus);
        }
        if (StringUtils.isNoneBlank(startTime)){
            sqlTotal +=" and p.create_time >=:startTime";
@ -5340,16 +5340,20 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        prescriptionCheckDO.setCreateUserName(operateName);
        prescriptionCheckDO.setReason(reason);
        prescriptionCheckDO.setStatus(status);
        prescriptionCheckDO.setPrescriptionId(prescriptionId);
        prescriptionCheckDO = prescriptionCheckDao.save(prescriptionCheckDO);
        if (status==4){
            prescriptionDao.updateStatus(prescriptionId,12);
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
        if (status==2){
            prescriptionDao.updateCheckStatus(prescriptionId,4,reason,12);
        }else{
            WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
            wlyyPrescriptionDO.setMkTime(new Date());
            wlyyPrescriptionDO.setMkFailReason(reason);
            wlyyPrescriptionDO.setCheckStatus(status);
            wlyyPrescriptionDO.setCheckReason(reason);
            wlyyPrescriptionDO.setStatus(11);
            prescriptionDao.save(wlyyPrescriptionDO);
        }
        if (status==2||status==1){
            sendCheckMessage(status,wlyyPrescriptionDO,operate,operateName);
        }
        return prescriptionCheckDO;
    }
@ -5362,4 +5366,90 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public List<WlyyPrescriptionCheckDO> findPrescriptionCheck(String prescriptionId){
        return  prescriptionCheckDao.findByPrescriptionId(prescriptionId);
    }
    /**
     * 发送处方审核消息
     * @param status
     * @param prescriptionDO
     * @param operate
     * @param operateName
     * @return
     */
    public SystemMessageDO sendCheckMessage(Integer status,WlyyPrescriptionDO prescriptionDO,String operate,String operateName){
        SystemMessageDO systemMessageDO = new SystemMessageDO();
        try{
            systemMessageDO.setType("5");
            systemMessageDO.setReceiver(prescriptionDO.getDoctor());
            systemMessageDO.setReceiverName(prescriptionDO.getDoctorName());
            systemMessageDO.setRelationCode(prescriptionDO.getId());
            systemMessageDO.setSender(operate);
            systemMessageDO.setSenderName(operateName);
            JSONObject data = new JSONObject();
            data.put("name",prescriptionDO.getPatientName());
            data.put("age",IdCardUtil.getAgeForIdcard(prescriptionDO.getIdcard()));
            data.put("gender",IdCardUtil.getSexForIdcard(prescriptionDO.getIdcard()));
            if (status==2){
                systemMessageDO.setTitle("审方通过");
                data.put("message","审方通过");
                data.put("message","您为"+prescriptionDO.getPatientName()+"("+IdCardUtil.getAgeForIdcard(prescriptionDO.getIdcard())+"岁 "+IdCardUtil.getSexForIdcard_new(prescriptionDO.getIdcard())+")开具的处方已审核通过。");
            } else if (status==1) {
                systemMessageDO.setTitle("审方退回");
                data.put("message","审方退回");
                data.put("message","您为"+prescriptionDO.getPatientName()+"("+IdCardUtil.getAgeForIdcard(prescriptionDO.getIdcard())+"岁 "+IdCardUtil.getSexForIdcard_new(prescriptionDO.getIdcard())+")开具的处方被审方退回,请尽快处理");
            }
            systemMessageDO.setData(data.toString());
            systemMessageService.saveMessage(systemMessageDO);
        }catch (Exception e){
            logger.error("sendPatientGetDrugMes :"+e.toString());
        }
        return systemMessageDO;
    }
    /**
     * 查询单条处方记录
     * @param prescriptionId
     * @return
     * @throws Exception
     */
    public WlyyPrescriptionVO selectByPrescriptionId(String prescriptionId) throws Exception {
        WlyyPrescriptionDO  wlyyPrescriptionDO= prescriptionDao.findOne(prescriptionId);
        if (wlyyPrescriptionDO!=null){
            com.alibaba.fastjson.JSONObject objectString = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(wlyyPrescriptionDO);
            WlyyPrescriptionVO prescriptionVO =  com.alibaba.fastjson.JSONObject.toJavaObject(objectString,WlyyPrescriptionVO.class);
            List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId);
            List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOS = new ArrayList<>();
            for (WlyyPrescriptionInfoDO wlyyPrescriptionInfoDO:wlyyPrescriptionInfoDOS){
                com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(wlyyPrescriptionInfoDO);
                logger.info("wlyyPrescriptionInfoDO参数入参"+object.toJSONString());
                WlyyPrescriptionInfoVO prescriptionInfoVO = com.alibaba.fastjson.JSONObject.toJavaObject(object,WlyyPrescriptionInfoVO.class);
                wlyyPrescriptionInfoVOS.add(prescriptionInfoVO);
            }
            prescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
            List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS = prescriptionDiagnosisDao.findByPrescriptionId(prescriptionId);
            List<WlyyPrescriptionDiagnosisVO> wlyyPrescriptionDiagnosisVOS = new ArrayList<>();
            for (WlyyPrescriptionDiagnosisDO prescriptionDiagnosisDO:wlyyPrescriptionDiagnosisDOS){
                com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(prescriptionDiagnosisDO);
                logger.info("prescriptionDiagnosisDO参数入参"+object.toJSONString());
                WlyyPrescriptionDiagnosisVO prescriptionDiagnosisVO = com.alibaba.fastjson.JSONObject.toJavaObject(object,WlyyPrescriptionDiagnosisVO.class);
                wlyyPrescriptionDiagnosisVOS.add(prescriptionDiagnosisVO);
            }
            prescriptionVO.setDiagnosisVOs(wlyyPrescriptionDiagnosisVOS);
            List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId);
            List<WlyyInspectionVO> inspectionVOList = new ArrayList<>();
            for (WlyyInspectionDO inspectionDO:inspectionDOS){
                com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(inspectionDO);
                logger.info("prescriptionDiagnosisDO参数入参"+object.toJSONString());
                WlyyInspectionVO inspectionVO = com.alibaba.fastjson.JSONObject.toJavaObject(object,WlyyInspectionVO.class);
                inspectionVOList.add(inspectionVO);
            }
            prescriptionVO.setInspectionVOs(inspectionVOList);
            prescriptionVO.setAge(IdCardUtil.getAgeForIdcard(wlyyPrescriptionDO.getIdcard())+"");
            prescriptionVO.setSex(IdCardUtil.getSexForIdcard_new(wlyyPrescriptionDO.getIdcard())+"");
            return prescriptionVO;
        }
        return null;
    }
}

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

@ -3,8 +3,6 @@ package com.yihu.jw.hospital.prescription.service.entrance;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.webkit.dom.CSSStyleRuleImpl;
import com.yihu.jw.dict.dao.DictDoctorDutyDao;
import com.yihu.jw.dict.dao.DictHospitalDeptDao;
import com.yihu.jw.doctor.dao.BaseDoctorDao;

+ 3 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -19,13 +19,13 @@ public abstract class IntegerIdentityEntity implements Serializable {
    @Id
//==========mysql 环境 id策略======================================================
/*    @GeneratedValue(generator = "generator")
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "identity")
    @Column(name = "id", unique = true, nullable = false)*/
    @Column(name = "id", unique = true, nullable = false)
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
    /*@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 36 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionCheckDO.java

@ -25,6 +25,10 @@ public class WlyyPrescriptionCheckDO extends UuidIdentityEntityWithOperator {
    private String reason;
    private String operate;
    private String operateName;
    private String dept;
    private String deptName;
    private String job;
    private String jobName;
    public String getPrescriptionId() {
        return prescriptionId;
@ -66,4 +70,36 @@ public class WlyyPrescriptionCheckDO extends UuidIdentityEntityWithOperator {
    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getDept() {
        return dept;
    }
    public void setDept(String dept) {
        this.dept = dept;
    }
    public String getDeptName() {
        return deptName;
    }
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }
    public String getJob() {
        return job;
    }
    public void setJob(String job) {
        this.job = job;
    }
    public String getJobName() {
        return jobName;
    }
    public void setJobName(String jobName) {
        this.jobName = jobName;
    }
}

+ 56 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionDO.java

@ -238,6 +238,26 @@ public class WlyyPrescriptionDO extends UuidIdentityEntity {
     */
    private String orderId;
    /**
     * 审核状态0未审核1审核退回4审核通过
     */
    private Integer checkStatus;
    /**
     * 审方原因
     */
    private String checkReason;
    /**
     * 处理状态 1处方修改2执行处方
     */
    private Integer dealStatus;
    /**
     * 处理原因
     */
    private String dealReason;
    @Column(name = "outpatient_id")
    public String getOutpatientId() {
        return outpatientId;
@ -582,4 +602,40 @@ public class WlyyPrescriptionDO extends UuidIdentityEntity {
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    @Column(name = "check_status")
    public Integer getCheckStatus() {
        return checkStatus;
    }
    public void setCheckStatus(Integer checkStatus) {
        this.checkStatus = checkStatus;
    }
    @Column(name = "check_reason")
    public String getCheckReason() {
        return checkReason;
    }
    public void setCheckReason(String checkReason) {
        this.checkReason = checkReason;
    }
    @Column(name = "deal_status")
    public Integer getDealStatus() {
        return dealStatus;
    }
    public void setDealStatus(Integer dealStatus) {
        this.dealStatus = dealStatus;
    }
    @Column(name = "deal_reason")
    public String getDealReason() {
        return dealReason;
    }
    public void setDealReason(String dealReason) {
        this.dealReason = dealReason;
    }
}

+ 4 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -340,6 +340,8 @@ public class BaseHospitalRequestMapping {
        public static final String findPrescriptionLogByPreId = "/findPrescriptionLogByPreId";
        public static final String findByPrescriptionCodeByStatus = "/findByPrescriptionCodeByStatus";
        public static final String findByPartsCode = "/findByPartsCode";
        public static final String findDictByName = "/findDictByName";
@ -397,6 +399,8 @@ public class BaseHospitalRequestMapping {
        public static final  String prescriptionCheckList = "/prescriptionCheckList";
        public static final  String selectByPrescriptionId = "/selectByPrescriptionId";
    }

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

@ -324,6 +324,43 @@ public class WlyyPrescriptionVO extends UuidIdentityVOWithOperator {
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date dispDate;
    /**
     * 审核状态0未审核1审核退回4审核通过
     */
    @ApiModelProperty(value = "审核状态", example = "模块1")
    private Integer checkStatus;
    /**
     * 审方原因
     */
    @ApiModelProperty(value = "审方原因", example = "模块1")
    private String checkReason;
    /**
     * 处理状态 1处方修改2执行处方
     */
    @ApiModelProperty(value = "处理状态", example = "模块1")
    private Integer dealStatus;
    /**
     * 处理原因
     */
    @ApiModelProperty(value = "处理原因", example = "模块1")
    private String dealReason;
    /**
     * 年龄
     */
    @ApiModelProperty(value = "年龄", example = "模块1")
    private String age;//年龄
    /**
     * 性别
     */
    @ApiModelProperty(value = "性别", example = "模块1")
    private String sex;//性别
    @ApiModelProperty(value = "检查检验", example = "模块1")
    private List<WlyyInspectionVO> inspectionVOs;
@ -724,4 +761,52 @@ public class WlyyPrescriptionVO extends UuidIdentityVOWithOperator {
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public Integer getCheckStatus() {
        return checkStatus;
    }
    public void setCheckStatus(Integer checkStatus) {
        this.checkStatus = checkStatus;
    }
    public String getCheckReason() {
        return checkReason;
    }
    public void setCheckReason(String checkReason) {
        this.checkReason = checkReason;
    }
    public Integer getDealStatus() {
        return dealStatus;
    }
    public void setDealStatus(Integer dealStatus) {
        this.dealStatus = dealStatus;
    }
    public String getDealReason() {
        return dealReason;
    }
    public void setDealReason(String dealReason) {
        this.dealReason = dealReason;
    }
    public String getAge() {
        return age;
    }
    public void setAge(String age) {
        this.age = age;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
}

+ 37 - 0
common/common-util/src/main/java/com/yihu/jw/util/common/IdCardUtil.java

@ -188,4 +188,41 @@ public class IdCardUtil {
        }
        return sex;
    }
    /**
     * 根据身份证的号码算出当前身份证持有者的性别
     * 1 男 2 女 3未知
     *
     * @return
     * @throws Exception
     */
    public static String getSexForIdcard(String CardCode)
            throws Exception {
        String sex = level_sex_3_name;
        try {
            if (CardCode.length() == 18) {
                if (Integer.parseInt(CardCode.substring(16).substring(0, 1)) % 2 == 0) {// 判断性别
                    // modifid by lyr 2016-09-29
                    sex = level_sex_2_name;
                    // modifid by lyr 2016-09-29
                } else {
                    // modifid by lyr 2016-09-29
                    sex = level_sex_1_name;
                    // modifid by lyr 2016-09-29
                }
            } else if (CardCode.length() == 15) {
                String usex = CardCode.substring(14, 15);// 用户的性别
                if (Integer.parseInt(usex) % 2 == 0) {
                    sex = level_sex_2_name;
                } else {
                    sex = level_sex_1_name;
                }
            }
            return sex;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return sex;
    }
}

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

@ -827,6 +827,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        return success(prescriptionLogService.findPrescriptionLogByPreId(prescriptionCode));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findByPrescriptionCodeByStatus)
    @ApiOperation(value = "查询处方流程", notes = "查询处方流程")
    public ListEnvelop findByPrescriptionCodeByStatus(@ApiParam(name = "prescriptionCode", value = "处方code")
                                                  @RequestParam(value = "prescriptionCode", required = true)String prescriptionCode)throws Exception{
        return success(prescriptionLogService.findByPrescriptionCodeByStatus(prescriptionCode));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findByPartsCode)
    @ApiOperation(value = "查询部位字典", notes = "查询部位字典")
    public ListEnvelop findByPartsCode(@ApiParam(name = "parentCode", value = "父节点ID,第一层为0")
@ -1299,4 +1306,24 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    }
    /**
     * 查询单条处方记录
     * @param prescriptionId
     * @return
     * @throws Exception
     */
    @GetMapping(value= BaseHospitalRequestMapping.Prescription.selectByPrescriptionId)
    @ApiOperation("查询单条处方记录")
    public ObjEnvelop selectByPrescriptionId(
            @ApiParam(name = "prescriptionId", value = "prescriptionId", required = true)
            @RequestParam(required = true)String prescriptionId) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",prescriptionService.selectByPrescriptionId(prescriptionId));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
}

+ 11 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/ylz/YlzNotifyController.java

@ -14,8 +14,12 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.order.BusinessOrderService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StreamUtils;
import org.springframework.web.bind.annotation.RequestMapping;
@ -38,6 +42,9 @@ import com.ylzinfo.onepay.sdk.utils.StringUtil;
public class YlzNotifyController<T> {
	private static final Logger LOGGER = LoggerFactory.getLogger(YlzNotifyController.class);
	@Autowired
	private BusinessOrderService businessOrderService;
	/**
	 * 商户页面跳转(模拟测试)
	 * @param request
@ -157,6 +164,10 @@ public class YlzNotifyController<T> {
				if (!isVerify) {
					response.getWriter().write("FAILURE");
				} else {
					String param = JSON.toJSONString(decryptRes.getParam());
					JSONObject object = JSONObject.parseObject(param);
					String orderNo = object.getString("outChargeNo");
					businessOrderService.updatePayStatus(orderNo);
					response.getWriter().write("SUCCESS");
				}
			}