Forráskód Böngészése

康复管理修改

LAPTOP-KB9HII50\70708 1 éve
szülő
commit
17bec726ea

+ 2 - 4
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java

@ -12,7 +12,6 @@ import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.specialist.SpecialistMapping;
import com.yihu.jw.service.rehabilitation.RehabilitationPlanService;
import com.yihu.jw.util.ImUtill;
import com.yihu.jw.util.date.DateUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -24,7 +23,6 @@ import org.springframework.cloud.sleuth.Tracer;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -415,10 +413,10 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
            String hospitalServiceItemId = json.getString("hospitalServiceItemId");
            //删除该服务项目今日之后未完成的计划
            if(StringUtils.isBlank(updateStatus)||updateStatus.equals("0")){//单个服务的修改
                rehabilitationPlanService.deleteDetailByPlanIdAndHospitalServiceItemId(planId, hospitalServiceItemId, DateUtil.getDateShort(new Date()));
                rehabilitationPlanService.deleteDetailByPlanIdAndHospitalServiceItemId(planId, hospitalServiceItemId);
            }
            else{
                rehabilitationPlanService.deleteDetailByPlanId(planId, DateUtil.getDateShort(new Date()));
                rehabilitationPlanService.deleteDetailByPlanId(planId);
            }
            JSONArray array = new JSONArray();
            for(Object planDetail : json.getJSONArray("detail")) {

+ 4 - 4
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/rehabilitation/RehabilitationDetailDao.java

@ -82,12 +82,12 @@ public interface RehabilitationDetailDao extends PagingAndSortingRepository<Reha
    int updateExecuteTime(Date executeTime,String id);
    @Modifying
    @Query("delete from RehabilitationDetailDO t where t.planId = ?1 and t.hospitalServiceItemId = ?2 and (t.executeTime > ?3 OR t.executeTime is null OR t.executeTime<>'')  and t.status <> 1 ")
    void deleteDetailByPlanIdAndHospitalServiceItemId(String planId, String hospitalServiceItemId, Date dateShort);
    @Query("delete from RehabilitationDetailDO t where t.planId = ?1 and t.hospitalServiceItemId = ?2  and t.status <> 1 ")
    void deleteDetailByPlanIdAndHospitalServiceItemId(String planId, String hospitalServiceItemId);
    @Modifying
    @Query("delete from RehabilitationDetailDO t where t.planId = ?1 and (t.executeTime > ?2 OR t.executeTime is null OR t.executeTime<>'')  and t.status <> 1 ")
    void deleteDetailByPlanId(String planId, Date dateShort);
    @Query("delete from RehabilitationDetailDO t where t.planId = ?1  and t.status <> 1 ")
    void deleteDetailByPlanId(String planId);
    @Query("select d from RehabilitationDetailDO d where d.planId = ?1 and d.type=?2 and d.doctor=?3 and d.status<>?4 ")
    List<RehabilitationDetailDO> findByPlanIdAndTypeAndDoctorAndStatusNot(String planId,Integer type,String doctor,Integer status);

+ 4 - 4
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationPlanService.java

@ -443,11 +443,11 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
        return Envelop.getError("更新失败!");
    }
    public void deleteDetailByPlanIdAndHospitalServiceItemId(String planId, String hospitalServiceItemId, Date dateShort) {
        rehabilitationDetailDao.deleteDetailByPlanIdAndHospitalServiceItemId(planId, hospitalServiceItemId, dateShort);
    public void deleteDetailByPlanIdAndHospitalServiceItemId(String planId, String hospitalServiceItemId) {
        rehabilitationDetailDao.deleteDetailByPlanIdAndHospitalServiceItemId(planId, hospitalServiceItemId);
    }
    public void deleteDetailByPlanId(String planId, Date dateShort) {
        rehabilitationDetailDao.deleteDetailByPlanId(planId, dateShort);
    public void deleteDetailByPlanId(String planId) {
        rehabilitationDetailDao.deleteDetailByPlanId(planId);
    }
}