From 1cbac7aa20a183a9a893651bf0cef24b1909eb5c Mon Sep 17 00:00:00 2001 From: gdg <764716047@qq.com> Date: 星期一, 01 二月 2021 10:19:43 +0800 Subject: [PATCH] Merge remote-tracking branch 'remotes/origin/yufei' into master --- src/main/java/com/nanometer/smartlab/api/ApiAction.java | 66 ++++++++++++++++++++++++++++----- 1 files changed, 56 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/nanometer/smartlab/api/ApiAction.java b/src/main/java/com/nanometer/smartlab/api/ApiAction.java index c13f87d..c5fbc8c 100644 --- a/src/main/java/com/nanometer/smartlab/api/ApiAction.java +++ b/src/main/java/com/nanometer/smartlab/api/ApiAction.java @@ -28,6 +28,7 @@ import org.apache.shiro.subject.Subject; import org.primefaces.context.RequestContext; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -49,46 +50,55 @@ public class ApiAction extends BaseAction { private static Logger logger = Logger.getLogger(ApiAction.class); - + @Lazy @Resource private SysUserService sysUserService; + @Lazy @Resource private OpeReagentStatusService opeReagentStatusService; - @Resource - private SysReagentService sysReagentService; + @Lazy @Resource private SysWarehouseContainerService sysWarehouseContainerService; + @Lazy @Resource private SysLaboratoryContainerService sysLaboratoryContainerService; + @Lazy @Resource private BaseMetaService baseMetaService; + @Lazy @Resource private InterfaceService interfaceService; + @Lazy @Resource private SysWarehouseService sysWarehouseService; - - @Resource - private SysWarningService sysWarningService; - + @Lazy @Resource private TempSensorsService tempSensorsService; - + @Lazy @Resource private SysFileService sysFileService; + @Lazy @Resource private SysLaboratoryContainerDao sysLaboratoryContainerDao; + @Lazy @Resource private SysWarehouseContainerDao sysWarehouseContainerDao; + @Lazy @Resource private DangerousEncodeService dangerousEncodeService; + @Lazy @Resource private EncodeReplaceDictService encodeReplaceDictService; + @Lazy @Resource private SysLaboratoryService sysLaboratoryService; + @Lazy @Resource private HazardousWasteService hazardousWasteService; + @Lazy @Resource private OpeLaboratoryReserveService opeLaboratoryReserveService; + @Lazy @Resource private OpeUseFlowService opeUseFlowService; @Value("${institute.url}") @@ -567,7 +577,7 @@ logger.info("getUserInfo start..."); List<SysUser> userList = sysUserService.getSysUserInfoList(startTime, endTime); - List<SysLaboratoryContainer> allLaboratoryContainerList = sysLaboratoryContainerService.getSysLaboratoryContainerList(null,null,null,null,null); + List<SysLaboratoryContainer> allLaboratoryContainerList = sysLaboratoryContainerService.getSysLaboratoryContainerList(null,null,null,null,null,null,null); List<SysWarehouseContainer> allWarehouseContainerList = sysWarehouseContainerService.getSysWarehouseContainerList(null,null,null,null,null); List<String> containerCodeList = new ArrayList<String>(); @@ -1559,7 +1569,7 @@ hazardousWaste.setMedical(new BigDecimal(0)); } hazardousWaste.setUpdator(hazardousWaste.getCreator()); - hazardousWaste.setUpdatetime(new Date()); +// hazardousWaste.setUpdatetime(new Date()); hazardousWasteService.insertInfo(hazardousWaste); return ResponseModel.getOkInstence("添加成功"); }catch (Exception e){ @@ -1717,4 +1727,40 @@ return ResponseModel.getErrInstance("系统出错"); } } + + // 处理人员违规预警接口 + @ResponseBody + @RequestMapping(value = "/delalarmperson") + public String delalarmperson(HttpServletRequest request) throws IOException { + logger.info("/api/service/delalarmperson"); + BufferedReader br = request.getReader(); + String str, data = ""; + while((str = br.readLine()) != null){ + data += str; + } + logger.info("delalarmperson" + data); +// String userId = request.getHeader("userId"); + JSONObject retJSON = new JSONObject(); + try { + interfaceService.delalarmperson(JSONObject.parseObject(data)); + + retJSON.put("code", ApiStatus.OK.getRetCode()); + retJSON.put("message", ApiStatus.OK.getRetMsg()); + } catch (ApiException e) { + retJSON.put("code", e.getApiStatus().getRetCode()); + retJSON.put("message", e.getErrorMessage()); + } catch (Exception e) { + retJSON.put("code", ApiStatus.SYS_ERR.getRetCode()); + StackTraceElement[] stackTraceElements = e.getStackTrace(); + + StringBuilder sb = new StringBuilder(); + sb.append(e.toString()); + for (StackTraceElement stackTraceElement : stackTraceElements) { + sb.append("\n"); + sb.append(stackTraceElement.toString()); + } + retJSON.put("message", ApiStatus.SYS_ERR.getRetMsg() + "--" + sb.toString()); + } + return retJSON.toJSONString(); + } } -- Gitblit v1.9.2