模式修改优化处理

master
elliott 2 years ago
parent b4f33450f9
commit ca24aa9835

@ -6,11 +6,8 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.nacos.common.utils.CollectionUtils;
import com.flossom.common.core.domain.entity.SysTag;
import com.flossom.common.core.domain.entity.*;
import com.flossom.common.core.domain.R;
import com.flossom.common.core.domain.entity.WxMode;
import com.flossom.common.core.domain.entity.WxModeCombineInfo;
import com.flossom.common.core.domain.entity.WxModeTag;
import com.flossom.common.core.enums.TagTypeStatusEnum;
import com.flossom.common.core.utils.poi.ExcelUtil;
import com.flossom.common.core.web.controller.BaseController;
@ -19,9 +16,7 @@ import com.flossom.common.core.web.page.TableDataInfo;
import com.flossom.common.log.annotation.Log;
import com.flossom.common.log.enums.BusinessType;
import com.flossom.common.security.annotation.RequiresPermissions;
import com.flossom.system.service.ISysTagService;
import com.flossom.system.service.IWxModeCombineInfoService;
import com.flossom.system.service.IWxModeTagService;
import com.flossom.system.service.*;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -32,7 +27,6 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.flossom.system.service.IWxModeService;
/**
* Controller
@ -52,6 +46,8 @@ public class WxModeController extends BaseController
private ISysTagService sysTagService;
@Autowired
private IWxModeCombineInfoService wxModeCombineInfoService;
@Autowired
private IWxInstrumentModeService wxInstrumentModeService;
/**
*
*/
@ -169,7 +165,20 @@ public class WxModeController extends BaseController
}
}
if (delFlag) {
return error("删除的组合已经被占用,不支持删除");
return error("删除的模式已经被组合占用,不支持删除");
}
// 查看仪器是否被占用
Boolean delInstrumentFlag = false;
for (long id : ids) {
WxInstrumentMode wxInstrumentMode = new WxInstrumentMode();
wxInstrumentMode.setModeId(id);
List<WxInstrumentMode> wxInstrumentModes = wxInstrumentModeService.selectWxInstrumentModeList(wxInstrumentMode);
if (CollectionUtils.isNotEmpty(wxInstrumentModes)) {
delInstrumentFlag = true;
}
}
if (delInstrumentFlag) {
return error("删除的模式已经被仪器占用,不支持删除");
}
return toAjax(wxModeService.deleteWxModeByIds(ids));
}

@ -291,7 +291,7 @@
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="启动/暂停图片GIF" required label-width="130px" v-if="form.instrumentType == 2">
<el-form-item label="启动/暂停图片GIF" required label-width="135px" v-if="form.instrumentType == 2">
<el-button type="primary" @click="addService"></el-button>
<div v-for="(item,index) of serviceData">
<el-row style="margin-top: 10px">
@ -727,6 +727,9 @@ export default {
serverImageFlag = true;
}
})
} else {
this.$message.error("护理内容不能为空");
return;
}
if (flag) {
this.$message.error("护理时间不能为空");

Loading…
Cancel
Save