Преглед на файлове

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 години
родител
ревизия
1b4535a601

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

@ -16,6 +16,6 @@ public interface PrescriptionLogDao extends PagingAndSortingRepository<WlyyPresc
    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 ")
    @Query("select a from WlyyPrescriptionLogDO a where a.prescriptionCode = ?1 and a.status in(20,30,10,100) order by createTime asc ")
    List<WlyyPrescriptionLogDO> findByPrescriptionCodeByStatus(String prescriptionCode);
}

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

@ -5496,8 +5496,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                inspectionVOList.add(inspectionVO);
            }
            prescriptionVO.setInspectionVOs(inspectionVOList);
            prescriptionVO.setAge(IdCardUtil.getAgeForIdcard(wlyyPrescriptionDO.getIdcard())+"");
            prescriptionVO.setSex(IdCardUtil.getSexForIdcard_new(wlyyPrescriptionDO.getIdcard())+"");
            prescriptionVO.setAge(StringUtils.isNoneBlank(wlyyPrescriptionDO.getIdcard())?IdCardUtil.getAgeForIdcard(wlyyPrescriptionDO.getIdcard())+"":null);
            prescriptionVO.setSex(StringUtils.isNoneBlank(wlyyPrescriptionDO.getIdcard())?IdCardUtil.getSexForIdcard_new(wlyyPrescriptionDO.getIdcard()):null);
            return prescriptionVO;
        }
        return null;

+ 25 - 0
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/PrescriptionStatusUpdateService.java

@ -3,9 +3,12 @@ package com.yihu.jw.service.channel;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.PrescriptionLogService;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionDiagnosisVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
@ -38,6 +41,8 @@ public class PrescriptionStatusUpdateService {
    private static Logger logger = LoggerFactory.getLogger(PrescriptionStatusUpdateService.class);
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Value("${wechat.id}")
    private String wechatId;
    @Value("${hlwyyEntrance.url}")
    private String hlwyyEntranceUrl;
    @Autowired
@ -51,6 +56,10 @@ public class PrescriptionStatusUpdateService {
    @Autowired
    private ImService imService;
    @Autowired
    private BusinessOrderDao businessOrderDao;
    @Autowired
    private BusinessOrderService businessOrderService;
    @Autowired
    private PrescriptionLogService prescriptionLogService;
    public void autoPush() throws Exception {
@ -291,6 +300,22 @@ public class PrescriptionStatusUpdateService {
                    }
                }
                outpatientDao.save(outpatientDOs);
                if (wechatId.equalsIgnoreCase(""))
                //退费
                for (WlyyOutpatientDO outpatientDO:outpatientDOs){
                    BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(outpatientDO.getId());
                    if (businessOrderDO!=null){
                        try {
                            if (businessOrderDO.getPayType()==1){
                                businessOrderService.orderRefund(wechatId,businessOrderDO.getPatient(),businessOrderDO.getOrderNo(),businessOrderDO.getPayPrice(),businessOrderDO.getDescription());
                            }else if (businessOrderDO.getPayType()==3){
                                businessOrderService.ylzOrderRefund(wechatId,businessOrderDO.getPatient(),businessOrderDO.getOrderNo(),businessOrderDO.getPayPrice(),businessOrderDO.getDescription());
                            }
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    }
                }
                logger.info("setOutPatientOver count :"+outpatientDOs.size());