Browse Source

代码修改

LAPTOP-KB9HII50\70708 1 year ago
parent
commit
6df266336a

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/rehabilitation/ServiceItemPlanDao.java

@ -29,4 +29,8 @@ public interface ServiceItemPlanDao extends PagingAndSortingRepository<ServiceIt
    @Modifying
    @Query(value ="UPDATE  base_service_item_plan SET status='1' ,complete_time=?3 WHERE status='0' AND plan_id=?1 AND plan_detail_id=?2 ORDER BY plan_time DESC LIMIT 1", nativeQuery = true)
    void updateState(String planId, String planDetailId, Date date);
    @Modifying
    @Query(value ="UPDATE  base_service_item_plan SET status='1' ,complete_time=?2 WHERE id=?1 ", nativeQuery = true)
    void updateState(String id, Date date);
}

+ 5 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/controller/DoorOrderController.java

@ -625,9 +625,10 @@ public class DoorOrderController extends EnvelopRestEndpoint {
    ) {
        try {
            WlyyDoorServiceOrderDO orderDO = doorOrderService.savePatientSignOrCertificate(orderId, finishWay, finishImg, level);
            return success("获取成功", orderDO);
            return success("保存成功", orderDO);
        } catch (Exception e) {
            return failed(e.getMessage());
            e.printStackTrace();
            return Envelop.getError("保存失败");
        }
    }
@ -643,7 +644,8 @@ public class DoorOrderController extends EnvelopRestEndpoint {
        try {
            return success("获取成功", doorOrderService.saveExamPaperInfo(orderId, examPaperWay, examPaperTime, examPaperImg, level));
        } catch (Exception e) {
            return failed(e.getMessage());
            e.printStackTrace();
            return Envelop.getError("保存失败");
        }
    }

+ 2 - 4
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/DoorOrderService.java

@ -1365,6 +1365,7 @@ public class DoorOrderService {
     * @param level
     * @return
     */
    @Transactional
    public WlyyDoorServiceOrderDO savePatientSignOrCertificate(String orderId, Integer finishWay, String finishImg, Integer level) throws Exception {
        WlyyDoorServiceOrderDO one = doorServiceOrderDao.findById(orderId).orElse(null);
        one.setPatientConfirmFinishWay(finishWay);
@ -1381,12 +1382,9 @@ public class DoorOrderService {
//        one.setTotalFee(cashPrice);
        doorServiceOrderDao.save(one);
        //
        String planId = one.getPlanId();//计划id
        String planItemDetailId = one.getPlanItemDetailId();//计划服务项id
        Date date = new Date();
        //更新计划状态为完成
        serviceItemPlanDao.updateState(planId, planItemDetailId, date);
        serviceItemPlanDao.updateState(one.getRelationCode(), date);
        WlyyDoorServiceOrderDO doorServiceOrderDO = this.getDoorServiceOrderById(orderId, level);