修改超声保存方法 重置选中图片状态
This commit is contained in:
parent
5cafa7c6ac
commit
5e1dc8b042
@ -75,13 +75,6 @@ public class CommonResult<T> implements Serializable {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> CommonResult<T> success( String msg) {
|
|
||||||
CommonResult<T> result = new CommonResult<>();
|
|
||||||
result.code = GlobalErrorCodeConstants.SUCCESS.getCode();
|
|
||||||
result.data = null;
|
|
||||||
result.msg = msg;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
public static boolean isSuccess(Integer code) {
|
public static boolean isSuccess(Integer code) {
|
||||||
return Objects.equals(code, GlobalErrorCodeConstants.SUCCESS.getCode());
|
return Objects.equals(code, GlobalErrorCodeConstants.SUCCESS.getCode());
|
||||||
}
|
}
|
||||||
|
@ -280,6 +280,7 @@ public class ultrasonicController {
|
|||||||
//如果他是选择 则先进行更新成0 在进行更新1 会存在多次保存 审核只有一次
|
//如果他是选择 则先进行更新成0 在进行更新1 会存在多次保存 审核只有一次
|
||||||
demedicalimgDO.setRegId(updateReqVO.get(0).getRegid());
|
demedicalimgDO.setRegId(updateReqVO.get(0).getRegid());
|
||||||
demedicalimgDO.setSelected("0");
|
demedicalimgDO.setSelected("0");
|
||||||
|
demedicalimgDO.setId(s.getId());
|
||||||
}
|
}
|
||||||
if(demedicalimgDO.getRegId()!=null)
|
if(demedicalimgDO.getRegId()!=null)
|
||||||
{
|
{
|
||||||
@ -290,7 +291,8 @@ public class ultrasonicController {
|
|||||||
}
|
}
|
||||||
//先进行更新
|
//先进行更新
|
||||||
if (!dedoList.isEmpty()) {
|
if (!dedoList.isEmpty()) {
|
||||||
medicalimgService.updateBatchById(dedoList);
|
// medicalimgService.updateBatchById(dedoList);
|
||||||
|
medicalimgService.updateimageselect(dedoList.get(0).getRegId());
|
||||||
}
|
}
|
||||||
if (!doList.isEmpty()) {
|
if (!doList.isEmpty()) {
|
||||||
|
|
||||||
|
@ -21,4 +21,8 @@ public interface medicalimgService extends IService<medicalimgDO> {
|
|||||||
int insimage(medicalimgDO medicalimgDO);
|
int insimage(medicalimgDO medicalimgDO);
|
||||||
|
|
||||||
String GetImagevideo(String orgId,String regId);
|
String GetImagevideo(String orgId,String regId);
|
||||||
|
/*
|
||||||
|
* 更新患者的所有图片选中标识 置为0
|
||||||
|
* */
|
||||||
|
void updateimageselect(String regid);
|
||||||
}
|
}
|
||||||
|
@ -4,15 +4,13 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|||||||
import cn.iocoder.yudao.module.ultrasoniccom.controller.admin.ultrasonic.medicalimg.medicalimgVO;
|
import cn.iocoder.yudao.module.ultrasoniccom.controller.admin.ultrasonic.medicalimg.medicalimgVO;
|
||||||
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.medicalimg.medicalimgDO;
|
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.medicalimg.medicalimgDO;
|
||||||
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.medicalimg.medicalimgMapper;
|
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.medicalimg.medicalimgMapper;
|
||||||
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicDO;
|
|
||||||
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicMapper;
|
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Validated
|
@Validated
|
||||||
@ -43,4 +41,14 @@ public class medicalimgServiceImpl extends ServiceImpl<medicalimgMapper, medical
|
|||||||
public String GetImagevideo(String orgId,String regId) {
|
public String GetImagevideo(String orgId,String regId) {
|
||||||
return medicalimgMapper.GetImageVideo(orgId,regId);
|
return medicalimgMapper.GetImageVideo(orgId,regId);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public void updateimageselect(String regid){
|
||||||
|
// 创建 UpdateWrapper 对象
|
||||||
|
UpdateWrapper<medicalimgDO> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.eq("regid", regid) // 设置更新条件
|
||||||
|
.set("selected", "0"); // 设置要更新的字段
|
||||||
|
|
||||||
|
// 执行更新操作
|
||||||
|
medicalimgMapper.update(null, updateWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user