wangzhinan 4 years ago
parent
commit
a7b2b15052

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

@ -19,6 +19,10 @@ public interface WlyyInspectionDao extends PagingAndSortingRepository<WlyyInspec
    List<WlyyInspectionDO> findByPrescriptionId(String prescriptionId,Integer del);
    @Query("select a from WlyyInspectionDO a where a.prescriptionId = ?1 and a.code=?2 and a.del=?3 ")
    List<WlyyInspectionDO> findByPrescriptionIdAndCode(String prescriptionId,String code,Integer del);
    @Modifying
    @Query("update WlyyInspectionDO p set p.del=0 where p.id=?1")
    void deleteById(String id);

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

@ -11267,13 +11267,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param idcard 身份证
     * @param payStatus 支付状态
     * @param medicare 社保卡
     * @param createTime 创建时间
     * @param appointmentTime 预约时间
     * @param appointmentTimeStart
     * @param appointmentTimeEnd
     * @param page
     * @param pageSize
     * @param size
     * @return
     */
    public Envelop getNatAppointmentList(String realOrder, String name, String hospitalFlag, String mobile, String idcard, String payStatus, String medicare, String createTimeStart, String createTimeEnd, String appointmentTimeStart, String appointmentTimeEnd, Integer isSuccess, Integer page, Integer pageSize,String orderNo) {

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

@ -1902,6 +1902,7 @@ public class YkyyEntranceService {
        String admNo= null;
        String registNo=null;
        String deptNo = null;
        String prescriptionId=null;
        if (inspectionDOS!=null&&inspectionDOS.size()!=0){
            WlyyInspectionDO inspectionDO = inspectionDOS.get(0);
            WlyyOutpatientDO outpatientDO = outpatientDao.findById(inspectionDO.getOutpatientId());
@ -1910,6 +1911,7 @@ public class YkyyEntranceService {
            registNo = prescriptionDO.getRealOrder();
            doctor=outpatientDO.getDoctor();
            patient=outpatientDO.getPatient();
            prescriptionId=prescriptionDO.getId();
        }
        for (WlyyInspectionDO wlyyInspectionDO:inspectionDOS){
            YkEmrJcsqDO ykEmrJcsqDO = new YkEmrJcsqDO();
@ -1940,7 +1942,22 @@ public class YkyyEntranceService {
        System.out.println(message.get("code")+"-----"+message.get("msg"));
        if ("-1".equalsIgnoreCase(message.get("code").toString())){
           logger.info("同步检查检验失败,错误信息为:"+message.get("msg").toString());
        }else {
            String msg = message.get("msg").toString();
            JSONObject object = JSONObject.parseObject(msg);
            JSONArray array = object.getJSONArray("detailModelList");
            for (int i=0;i<array.size();i++){
                JSONObject jsonObject = array.getJSONObject(i);
                String xmid = jsonObject.getString("xmid");
                String yjxh = jsonObject.getString("yjxh");
                List<WlyyInspectionDO> inspectionDOList = wlyyInspectionDao.findByPrescriptionIdAndCode(prescriptionId,xmid,1);
                for (WlyyInspectionDO inspectionDO:inspectionDOList){
                    inspectionDO.setHisCode(yjxh);
                    wlyyInspectionDao.save(inspectionDO);
                }
            }
        }
        System.out.println(message.get("code")+"-----"+message.get("msg"));
    }

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

@ -134,6 +134,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
    private BaseSmsTemplateDao smsTemplateDao;
    @Autowired
    private YkyySMSService ykyySMSService;
    @Autowired
    private WlyyInspectionDao inspectionDao;
@ -880,6 +882,16 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                        wlyyPrescriptionDO.setPayStatus(1);
                        wlyyPrescriptionDO.setPayTime(new Date());
                        prescriptionDao.save(wlyyPrescriptionDO);
                        List<WlyyInspectionDO> inspectionDOList = inspectionDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
                        for (WlyyInspectionDO wlyyInspectionDO:inspectionDOList){
                            String updateMsYj01 = "update V_MS_YJ01 t set t.HLWJF=1 where t.yjxh='"+wlyyInspectionDO.getHisCode()+"'";
                            try {
                                ykyyEntranceService.updateHisStatus(updateMsYj01);
                            } catch (Exception e) {
                                e.printStackTrace();
                            }
                        }
                        prescriptionLogService.addPrescriptionLog(wlyyPrescriptionDO.getId(),30,1,wlyyPrescriptionDO.getPatientCode(),wlyyPrescriptionDO.getPatientName(),"",new Date());
                        try {
                            String sql = " update v_ms_dd01 SET FKZT=1 where CFSB = '"+wlyyPrescriptionDO.getRealOrder()+"'";

+ 10 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyInspectionDO.java

@ -56,6 +56,8 @@ public class WlyyInspectionDO extends UuidIdentityEntity {
    private Integer del;//1可用 0删除
    private String totalUnit;//单位
    private String hisCode;
    public String getTotalUnit() {
        return totalUnit;
    }
@ -306,4 +308,12 @@ public class WlyyInspectionDO extends UuidIdentityEntity {
    public void setDel(Integer del) {
        this.del = del;
    }
    public String getHisCode() {
        return hisCode;
    }
    public void setHisCode(String hisCode) {
        this.hisCode = hisCode;
    }
}