优化
This commit is contained in:
@@ -15,11 +15,8 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.modules.security.service.dto.JwtUserDto;
|
||||
import org.nl.pda.exception.PdaRequestException;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.wms.pdm.service.FactoryCalendarService;
|
||||
import org.nl.wms.pdm.service.ProductprocessrouteService;
|
||||
import org.nl.wms.pdm.service.dto.ProductprocessrouteDto;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.nl.wql.util.WqlUtil;
|
||||
@@ -47,7 +44,9 @@ public class FactoryCalendarServiceImpl implements FactoryCalendarService {
|
||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||
|
||||
map.put("flag", "1");
|
||||
if (StrUtil.isNotEmpty(search)) map.put("search", "%" + search + "%");
|
||||
if (StrUtil.isNotEmpty(search)) {
|
||||
map.put("search", "%" + search + "%");
|
||||
}
|
||||
|
||||
JSONObject json = WQL.getWO("QPDM_FACTORYCALENDAR").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
|
||||
return json;
|
||||
@@ -173,7 +172,7 @@ public class FactoryCalendarServiceImpl implements FactoryCalendarService {
|
||||
//查询是否存在已经启用的日历
|
||||
JSONObject mst = WQLObject.getWQLObject("PDM_BI_FactoryCalendar").query("is_active = '1' AND is_delete = '0' and device_id='"+whereJson.getString("device_id")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(mst)) {
|
||||
throw new PdaRequestException("同一个设备工厂日历只能启用一个!");
|
||||
throw new BadRequestException("同一个设备工厂日历只能启用一个!");
|
||||
}
|
||||
}
|
||||
WQLObject.getWQLObject("PDM_BI_FactoryCalendar").update(whereJson);
|
||||
|
||||
Reference in New Issue
Block a user