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