浏览代码

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangzhinan 1 年之前
父节点
当前提交
974b488698

+ 2 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -410,7 +410,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            String password = com.yihu.jw.security.utils.RSAUtils.decryptBase64(parameters.get("password"), keyPair);
            parameters.put("password", password);
            if (!testPwd(parameters.get("password"))) {
                throw new PwdException("密码强度低,请用验证码登录,或者修改密码后在重新登录!");
                throw new PwdException("密码强度低,请修改密码后再重新登录!");
            }
        }else if (StringUtils.isEmpty(parameters.get("captcha"))) {
            parameters.put("grant_type", "password");
@ -1438,7 +1438,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        }else if (e instanceof ImgCaptchaException) {
            return handleOAuth2Exception(new Oauth2Envelop("图片验证码错误", ResultStatus.IMG_CAPTCHA), e);
        }else if (e instanceof PwdException){
            return handleOAuth2Exception(new Oauth2Envelop("密码强度低,请用验证码登录,或者修改密码后在从新登录!", 1301), e);
            return handleOAuth2Exception(new Oauth2Envelop(e.getMessage(), 1301), e);
        }
        return handleOAuth2Exception(new Oauth2Envelop("请求失败", -1), e);
    }

+ 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);
    }
}