| | |
| | | import com.nanometer.smartlab.dao.SysLaboratoryContainerDao; |
| | | import com.nanometer.smartlab.dao.SysWarehouseContainerDao; |
| | | import com.nanometer.smartlab.entity.*; |
| | | import com.nanometer.smartlab.entity.dto.HazardousWasteUser; |
| | | import com.nanometer.smartlab.entity.dto.InWarehouseInfoDto; |
| | | import com.nanometer.smartlab.entity.dto.ReagentReceivingDto; |
| | | import com.nanometer.smartlab.entity.dto.SysWarehouseDto; |
| | | import com.nanometer.smartlab.entity.enumtype.ApiStatus; |
| | | import com.nanometer.smartlab.entity.enumtype.ArrivalStatus; |
| | | import com.nanometer.smartlab.entity.enumtype.ReplaceDictType; |
| | | import com.nanometer.smartlab.entity.enumtype.SeeFlag; |
| | | import com.nanometer.smartlab.entity.dto.*; |
| | | import com.nanometer.smartlab.entity.enumtype.*; |
| | | import com.nanometer.smartlab.exception.ApiException; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.exception.ExceptionEnumCode; |
| | |
| | | import org.apache.shiro.authc.UnknownAccountException; |
| | | import org.apache.shiro.authc.UsernamePasswordToken; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.primefaces.context.RequestContext; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | |
| | | private DangerousEncodeService dangerousEncodeService; |
| | | @Resource |
| | | private EncodeReplaceDictService encodeReplaceDictService; |
| | | @Resource |
| | | private SysLaboratoryService sysLaboratoryService; |
| | | @Resource |
| | | private HazardousWasteService hazardousWasteService; |
| | | @Value("${institute.url}") |
| | | String instituteUrl; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * @Description: 试剂转移到另一个柜子 |
| | | * @date 2020/12/24 14:19 |
| | | */ |
| | | // @ResponseBody |
| | | // @RequestMapping("reagentTransfer") |
| | | // public Object reagentReceiving(@RequestBody ReagentReceivingDto reagentReceiving) { |
| | | // try { |
| | | // if (this.selectedTmpList == null || this.selectedTmpList.size() == 0) { |
| | | // FacesUtils.warn("请选择申领试剂。"); |
| | | // return; |
| | | // } |
| | | // |
| | | // if (this.userId == null) { |
| | | // FacesUtils.warn("请选择申领人。"); |
| | | // return; |
| | | // } |
| | | // //领用单 |
| | | // printTable = null; |
| | | // printTable = new Hashtable(); |
| | | // List<ApplyListDto> applyList = new ArrayList<>(); |
| | | // Map applyPersonInfo = sysUserService.getUser(userId); |
| | | // printTable.put("head", instituteName); |
| | | // printTable.put("title", "领用单"); |
| | | // printTable.put("applyPerson", applyPersonInfo.get("name")); |
| | | // printTable.put("department", applyPersonInfo.get("meta_value")); |
| | | // printTable.put("date", Utils.now("yyyy-MM-dd")); |
| | | // printTable.put("phone", applyPersonInfo.get("phone")); |
| | | // |
| | | // //int size = 0; |
| | | // int sum = 0; |
| | | // List<OpeWarehouseReserve> list=new ArrayList<>(); |
| | | // List<OpeWarehouseReserve> list2=new ArrayList<>(); |
| | | // for (OpeWarehouseReserve selectWarehouseReserve : this.selectedTmpList) { |
| | | // if(selectWarehouseReserve.getFlag()==1){ |
| | | // list.add(selectWarehouseReserve); |
| | | // }else{ |
| | | // list2.add(selectWarehouseReserve); |
| | | // } |
| | | // } |
| | | // if(list.size()>0&&list!=null){ |
| | | // for (OpeWarehouseReserve selectWarehouseReserve : list) { |
| | | // List<String> reagentCodes = selectWarehouseReserve.getReagentCodes(); |
| | | // if (reagentCodes != null && reagentCodes.size() > 0) |
| | | // for (String opeReagentStatusId : reagentCodes) { |
| | | // OpeReagentStatus opeReagentStatus = this.opeReagentStatusService |
| | | // .getOpeReagentStatus(opeReagentStatusId); |
| | | // if (!this.opeReagentStatusService.isAllowWarehouseUse(opeReagentStatus)) { |
| | | // FacesUtils.warn("只能申领在仓库的试剂。"); |
| | | // return; |
| | | // }else { |
| | | // opeReagentStatus.setHouseId(laboratoryId); |
| | | // opeReagentStatus.setContainerId(laboratoryContainerId); |
| | | // this.opeReagentStatusDao.updateOpeReagentStatusDao(opeReagentStatus);//更新试剂状态表 |
| | | // OpeLaboratoryReserve lr=new OpeLaboratoryReserve(); |
| | | // lr.setReagentId(selectWarehouseReserve.getReagentId()); |
| | | // lr.setHouseId(laboratoryId); |
| | | // lr.setContainerId(laboratoryContainerId); |
| | | // lr.setReserve(selectWarehouseReserve.getSelectNum()); |
| | | // lr.setUserId(userId); |
| | | // lr.setValidFlag(ValidFlag.VALID); |
| | | // this.opeLaboratoryReserveService.insert(lr); |
| | | // } |
| | | // //else { |
| | | // //size++; |
| | | // //} |
| | | // } |
| | | // ApplyListDto lis = new ApplyListDto(); |
| | | // Map reagentDetail = sysReagentService.getReagentDetail(selectWarehouseReserve.getReagentId()); |
| | | // lis.setNum(String.valueOf(selectWarehouseReserve.getSelectNum())); //数量 |
| | | // lis.setMainMetering(String.format("%s%s", reagentDetail.get("main_metering"), reagentDetail.get("unit"))); |
| | | // lis.setControlProducts((String) reagentDetail.get("controlProducts")); |
| | | // lis.setProductName((String) reagentDetail.get("name")); |
| | | // lis.setReagentFormat((String) reagentDetail.get("reagentFormat")); |
| | | // lis.setProductCode((String)reagentDetail.get("productCode")); |
| | | // lis.setMemo((String)reagentDetail.get("memo")); |
| | | // applyList.add(lis); |
| | | // sum += selectWarehouseReserve.getSelectNum(); |
| | | // } |
| | | // |
| | | // //if (size == 0) { |
| | | // //FacesUtils.warn("未选择一个条形码。"); |
| | | // //return; |
| | | // //} |
| | | // this.opeWarehouseReserveService.claim(list, userId,projectNum); |
| | | // } |
| | | // if(list2.size()>0&&list2!=null){ |
| | | // List<OpeApply> opeList=new ArrayList<>(); |
| | | // //this.opeApplyService.getOpeApplyList(null,null,null,null,null) |
| | | // for(int i=0;i<list2.size();i++){ |
| | | // OpeApply opeApply=new OpeApply(); |
| | | // opeApply.setArticleNumber(list2.get(i).getArticleNumber()); |
| | | // opeApply.setHouseId(laboratoryId); |
| | | // opeApply.setContainerId(laboratoryContainerId); |
| | | // opeApply.setReagent(this.sysReagentService.getSysReagent(list2.get(i).getReagentId())); |
| | | // opeApply.setStartReagentCode(list2.get(i).getStartReagentCode2()); |
| | | // opeApply.setEndReagentCode(list2.get(i).getEndReagentCode2()); |
| | | // opeList.add(opeApply); |
| | | // OpeLaboratoryReserve lr=new OpeLaboratoryReserve(); |
| | | // lr.setReagentId(list2.get(i).getReagentId()); |
| | | // lr.setHouseId(laboratoryId); |
| | | // lr.setContainerId(laboratoryContainerId); |
| | | // lr.setReserve(list2.get(i).getSelectNum()); |
| | | // lr.setUserId(userId); |
| | | // lr.setValidFlag(ValidFlag.VALID); |
| | | // this.opeLaboratoryReserveService.insert(lr); |
| | | // //opeList.add(this.opeApplyService.getOpeApply(list2.get(i).getId())); |
| | | // ApplyListDto lis = new ApplyListDto(); |
| | | // Map reagentDetail = sysReagentService.getReagentDetail(list2.get(i).getReagentId()); |
| | | // |
| | | // lis.setNum(String.valueOf(list2.get(i).getSelectNum())); //数量 |
| | | // lis.setMainMetering(String.format("%s%s", reagentDetail.get("main_metering"), reagentDetail.get("unit"))); |
| | | // lis.setControlProducts((String) reagentDetail.get("controlProducts")); |
| | | // lis.setProductName((String) reagentDetail.get("name")); |
| | | // lis.setReagentFormat((String) reagentDetail.get("reagentFormat")); |
| | | // lis.setProductCode((String)reagentDetail.get("productCode")); |
| | | // lis.setMemo((String)reagentDetail.get("memo")); |
| | | // applyList.add(lis); |
| | | // |
| | | // sum += list2.get(i).getSelectNum(); |
| | | // } |
| | | // this.opeWarehouseReserveService.reagentDStore2(opeList,userId); |
| | | // for(int i=0;i<list2.size();i++){ |
| | | // list2.get(i).setReserve(list2.get(i).getReserve()-list2.get(i).getSelectNum()); |
| | | // opeWarehouseReserveDao.updateOpeWarehouseReserve(list2.get(i)); |
| | | // } |
| | | // |
| | | // |
| | | // //opeWarehouseReserve.setReserve(opeWarehouseReserve.getReserve()-opeWarehouseReserve.getSelectNum()); |
| | | // //opeWarehouseReserveDao.updateOpeWarehouseReserve(opeWarehouseReserve); |
| | | // //this.opeWarehouseReserveService.claim(list2, userId,projectNum); |
| | | // } |
| | | // |
| | | // //领用票最后一行 |
| | | // applyList.add(new ApplyListDto("合计", "", "", "", "", String.valueOf(sum), "")); |
| | | // printTable.put("applyList", applyList); |
| | | // |
| | | // FacesUtils.info("申领成功。"); |
| | | // RequestContext.getCurrentInstance().execute("PF('printDialog').show()"); |
| | | //// this.menuController.goToPage(Constants.PAGE_WAREHOUSE_STOCK_MNG, Constants.PAGE_WAREHOUSE_REAGENT_USE_NEW); |
| | | // } catch (Exception e) { |
| | | // logger.error(e.getMessage(), e); |
| | | // FacesUtils.warn("操作失败。"); |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * @Description: 危废登录 |
| | | * @date 2020/12/29 14:13 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("hazardousWaste/login") |
| | | public Object hazardousWaste(@RequestBody HazardousWasteUser user) { |
| | | |
| | | try { |
| | | String account = user.getAccount(); |
| | | if (StringUtils.isBlank(account)){ |
| | | return ResponseModel.getErrInstance("账户名为空"); |
| | | } |
| | | |
| | | SysUser sysUser = sysUserService.getUserByAccount(account); |
| | | HazardousWasteUser sysUser = sysUserService.getUserByAccount(account); |
| | | if (sysUser == null){ |
| | | return ResponseModel.getErrInstance("账户名不存在"); |
| | | }else{ |
| | | if (sysUser.getPassword().equals(MD5Utils.encode(user.getPassword()))){ |
| | | user.setId(sysUser.getId()); |
| | | user.setRoleName(sysUser.getRoleName()); |
| | | if (sysUser.getAdminFlag() != 0){ |
| | | user = sysUser; |
| | | }else{ |
| | | return ResponseModel.getErrInstance("用户不属于危废处理人员"); |
| | | } |
| | | return ResponseModel.getOkInstence(user); |
| | | }else{ |
| | | return ResponseModel.getErrInstance("密码错误"); |
| | |
| | | logger.info(e); |
| | | return ResponseModel.getErrInstance("系统出错"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 修改密码 |
| | | * |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("hazardousWaste/changePwd") |
| | | public Object changePwd(@RequestBody HazardousWasteUser user){ |
| | | try { |
| | | if (StringUtils.isBlank(user.getAccount())){ |
| | | return ResponseModel.getErrInstance("账户名为空"); |
| | | } |
| | | SysUser sysUser = sysUserService.getSysUserByAccount(user.getAccount()); |
| | | if (sysUser == null){ |
| | | return ResponseModel.getErrInstance("账户名不存在"); |
| | | }else{ |
| | | if (sysUser.getPassword().equals(MD5Utils.encode(user.getPassword()))){ |
| | | |
| | | SysUser newUser = new SysUser(); |
| | | newUser = sysUser; |
| | | String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}"; |
| | | if (!user.getNewpassword().matches(PW_PATTERN)){ |
| | | return ResponseModel.getErrInstance("密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上"); |
| | | }else { |
| | | newUser.setPassword(MD5Utils.encode(user.getNewpassword())); |
| | | sysUserService.updateSysUser(newUser); |
| | | return ResponseModel.getOkInstence("修改成功"); |
| | | } |
| | | }else{ |
| | | return ResponseModel.getErrInstance("原密码错误"); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | logger.info(e); |
| | | return ResponseModel.getErrInstance("系统出错"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据课题组名称获取部门、地址、所属人员 |
| | | * |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("hazardousWaste/getLabAndUser") |
| | | public Object getLabAndUser(@RequestParam(required=true) String project){ |
| | | try { |
| | | if (StringUtils.isBlank(project)){ |
| | | return ResponseModel.getErrInstance("课题组不能为空"); |
| | | } |
| | | LaboratoryVo laboratoryVo = new LaboratoryVo(); |
| | | List<LaboratoryVo.Laboratory> laboratoryList = sysLaboratoryService.getLaboratoryByProject(project); |
| | | List<LaboratoryVo.LaboratoryUser> laboratoryUserList = sysUserService.getUserByProject(project); |
| | | laboratoryVo.setLaboratoryList(laboratoryList); |
| | | laboratoryVo.setLaboratoryUsers(laboratoryUserList); |
| | | return ResponseModel.getOkInstence(laboratoryVo); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | logger.info(e); |
| | | return ResponseModel.getErrInstance("系统出错"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 录入危废信息 |
| | | * |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("hazardousWaste/putWasteInfo") |
| | | public Object putWasteInfo(@RequestBody HazardousWaste hazardousWaste){ |
| | | try { |
| | | if (StringUtils.isBlank(hazardousWaste.getDepartment()) || StringUtils.isBlank(hazardousWaste.getApplyPerson()) |
| | | || StringUtils.isBlank(hazardousWaste.getProject()) || StringUtils.isBlank(hazardousWaste.getUnit()) |
| | | || StringUtils.isBlank(hazardousWaste.getCreator())){ |
| | | return ResponseModel.getErrInstance("部门、单位、课题组、确认者、创建者、不能为空"); |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | hazardousWaste.setTid(sdf.format(new Date())); |
| | | hazardousWaste.setCreateTime(new Date()); |
| | | hazardousWaste.setStatus("待确认"); |
| | | if (hazardousWaste.getAcid()== null){ |
| | | hazardousWaste.setAcid(new BigDecimal(0)); |
| | | } |
| | | if (hazardousWaste.getAlkali()== null){ |
| | | hazardousWaste.setAlkali(new BigDecimal(0)); |
| | | } |
| | | if (hazardousWaste.getOrganic()== null){ |
| | | hazardousWaste.setOrganic(new BigDecimal(0)); |
| | | } |
| | | if (hazardousWaste.getSolid()== null){ |
| | | hazardousWaste.setSolid(new BigDecimal(0)); |
| | | } |
| | | if (hazardousWaste.getMedical()== null){ |
| | | hazardousWaste.setMedical(new BigDecimal(0)); |
| | | } |
| | | hazardousWaste.setUpdator(hazardousWaste.getCreator()); |
| | | hazardousWaste.setUpdatetime(new Date()); |
| | | hazardousWasteService.insertInfo(hazardousWaste); |
| | | return ResponseModel.getOkInstence("添加成功"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | logger.info(e); |
| | | return ResponseModel.getErrInstance("系统出错"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据用户名和危废角色获取危废列表 |
| | | * |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("hazardousWaste/getWasteInfo") |
| | | public Object getLabAndUser(@RequestParam(required=true) int adminFlag,@RequestParam(required=true) String name,@RequestParam(required=false) String status |
| | | ,@RequestParam(required=false) String starttime,@RequestParam(required=false) String endtime){ |
| | | try { |
| | | if (StringUtils.isBlank(name)){ |
| | | return ResponseModel.getErrInstance("姓名不能为空"); |
| | | } |
| | | List<HazardousWaste> hazardousWasters = new ArrayList<>(); |
| | | if (adminFlag == 2){ |
| | | hazardousWasters = hazardousWasteService.setAllWasters(starttime,endtime,status,null); |
| | | }else if (adminFlag == 1) { |
| | | hazardousWasters = hazardousWasteService.setAllWasters(starttime,endtime,status,name); |
| | | } |
| | | return ResponseModel.getOkInstence(hazardousWasters); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | logger.info(e); |
| | | return ResponseModel.getErrInstance("系统出错"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 更新订单状态(确认订单、拒绝订单) |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("hazardousWaste/changeStatus") |
| | | public Object getLabAndUser(@RequestParam(required=true) String tid,@RequestParam(required=true) String status, |
| | | @RequestParam(required=true) String updator){ |
| | | try { |
| | | if (StringUtils.isBlank(tid) || StringUtils.isBlank(status)){ |
| | | return ResponseModel.getErrInstance("单号、状态不能为空"); |
| | | } |
| | | HazardousWaste hazardousWaste = hazardousWasteService.selectByTid(tid); |
| | | if (hazardousWaste != null){ |
| | | if (!hazardousWaste.getStatus().equals("待确认")){ |
| | | return ResponseModel.getErrInstance("单据不为待确认无法修改"); |
| | | }else if (status.equals("已确认") || status.equals("已拒绝")){ |
| | | hazardousWaste.setStatus(status); |
| | | hazardousWaste.setUpdator(updator); |
| | | hazardousWaste.setUpdatetime(new Date()); |
| | | hazardousWasteService.updateWaste(hazardousWaste); |
| | | return ResponseModel.getOkInstence("修改成功"); |
| | | }else { |
| | | return ResponseModel.getErrInstance("单号状态不正确"); |
| | | } |
| | | }else { |
| | | return ResponseModel.getErrInstance("单号不存在"); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | logger.info(e); |
| | | return ResponseModel.getErrInstance("系统出错"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改危废信息 |
| | | * |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("hazardousWaste/editWasteInfo") |
| | | public Object editWasteInfo(@RequestBody HazardousWaste hazardousWaste){ |
| | | try { |
| | | if (StringUtils.isBlank(hazardousWaste.getTid()) ||StringUtils.isBlank(hazardousWaste.getUpdator())){ |
| | | return ResponseModel.getErrInstance("单号、更新人不能为空"); |
| | | } |
| | | HazardousWaste waste = hazardousWasteService.selectByTid(hazardousWaste.getTid()); |
| | | if (waste != null){ |
| | | if (!waste.getStatus().equals("已拒绝")){ |
| | | return ResponseModel.getErrInstance("单据不为已拒绝无法修改"); |
| | | }else { |
| | | waste.setStatus("待确认"); |
| | | if (hazardousWaste.getAcid()== null){ |
| | | waste.setAcid(new BigDecimal(0)); |
| | | }else { |
| | | waste.setAcid(hazardousWaste.getAcid()); |
| | | } |
| | | if (hazardousWaste.getAlkali()== null){ |
| | | waste.setAlkali(new BigDecimal(0)); |
| | | }else { |
| | | waste.setAlkali(hazardousWaste.getAlkali()); |
| | | } |
| | | if (hazardousWaste.getOrganic()== null){ |
| | | waste.setOrganic(new BigDecimal(0)); |
| | | }else { |
| | | waste.setOrganic(hazardousWaste.getOrganic()); |
| | | } |
| | | if (hazardousWaste.getSolid()== null){ |
| | | waste.setSolid(new BigDecimal(0)); |
| | | }else { |
| | | waste.setSolid(hazardousWaste.getSolid()); |
| | | } |
| | | if (hazardousWaste.getMedical()== null){ |
| | | waste.setMedical(new BigDecimal(0)); |
| | | }else { |
| | | waste.setMedical(hazardousWaste.getMedical()); |
| | | } |
| | | waste.setUpdator(hazardousWaste.getUpdator()); |
| | | waste.setUpdatetime(new Date()); |
| | | hazardousWasteService.updateWaste(waste); |
| | | return ResponseModel.getOkInstence("修改成功"); |
| | | } |
| | | }else { |
| | | return ResponseModel.getErrInstance("单号不存在"); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | logger.info(e); |
| | | return ResponseModel.getErrInstance("系统出错"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.nanometer.smartlab.entity.HazardousWaste; |
| | | import com.nanometer.smartlab.service.HazardousWasteService; |
| | | import com.nanometer.smartlab.util.FacesUtils; |
| | | import org.apache.log4j.Logger; |
| | | import org.primefaces.model.LazyDataModel; |
| | | import org.primefaces.model.SortOrder; |
| | |
| | | import org.springframework.stereotype.Controller; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.faces.event.ActionListener; |
| | | import java.util.*; |
| | | |
| | | @Controller |
| | | @Scope("session") |
| | |
| | | |
| | | private Date startTime; |
| | | private Date endTime; |
| | | |
| | | private boolean isSearch; |
| | | private String status; |
| | | private String applyPerson; |
| | | private String project; |
| | | private String department; |
| | | private String tid; |
| | | private List<String> statusList = new ArrayList<> (); |
| | | private boolean isSearch = false; |
| | | private boolean isAnalysSearch = false; |
| | | private LazyDataModel<HazardousWaste> analysisDataModel; |
| | | |
| | | @Resource |
| | | private HazardousWasteService hazardousWasteService; |
| | |
| | | |
| | | List<HazardousWaste> list = null; |
| | | try { |
| | | int pageCount = hazardousWasteService.countAll(startTime,endTime); |
| | | int pageCount = hazardousWasteService.countAll(startTime,endTime,status,applyPerson,project,department,tid); |
| | | |
| | | this.setRowCount(pageCount); |
| | | if (pageCount > 0) |
| | | list = hazardousWasteService.selectAll(startTime,endTime, isSearch ? 0 : first, pageSize); |
| | | list = hazardousWasteService.selectAll(startTime,endTime,status,applyPerson,project,department,tid,first, pageSize); |
| | | //查询更换模式 |
| | | if (isSearch) { |
| | | isSearch = false; |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | logger.error("error occured.", e); |
| | | } |
| | |
| | | this.isSearch = true; |
| | | } |
| | | |
| | | |
| | | |
| | | public void setDataModel(LazyDataModel<HazardousWaste> dataModel) { |
| | | this.dataModel = dataModel; |
| | | } |
| | | |
| | | public LazyDataModel<HazardousWaste> getAnalysisDataModel() { |
| | | if (this.analysisDataModel == null) { |
| | | this.analysisDataModel = new LazyDataModel<HazardousWaste>() { |
| | | |
| | | public List<HazardousWaste> load |
| | | (int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { |
| | | |
| | | List<HazardousWaste> list = null; |
| | | try { |
| | | int pageCount = hazardousWasteService.countStatistics(startTime,endTime,status,applyPerson,project,department); |
| | | |
| | | this.setRowCount(pageCount); |
| | | if (pageCount > 0) |
| | | list = hazardousWasteService.selectStatistics(startTime,endTime,status,applyPerson,project,department,first, pageSize); |
| | | |
| | | //查询更换模式 |
| | | if (isAnalysSearch) { |
| | | isAnalysSearch = false; |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error("error occured.", e); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public HazardousWaste getRowData(String rowKey) { |
| | | Iterator<HazardousWaste> iterator = this.iterator(); |
| | | HazardousWaste su = null; |
| | | while (iterator.hasNext()) { |
| | | su = iterator.next(); |
| | | if ( su.getId().equals(Long.parseLong(rowKey))) { |
| | | return su; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | }; |
| | | } |
| | | return analysisDataModel; |
| | | } |
| | | |
| | | public void modelAnalysisChange() { |
| | | this.isAnalysSearch = true; |
| | | } |
| | | |
| | | public void setAnalysisDataModel(LazyDataModel<HazardousWaste> dataModel) { |
| | | this.analysisDataModel = dataModel; |
| | | } |
| | | |
| | | public Date getStartTime() { |
| | |
| | | public void setSearch(boolean search) { |
| | | isSearch = search; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getApplyPerson() { |
| | | return applyPerson; |
| | | } |
| | | |
| | | public void setApplyPerson(String applyPerson) { |
| | | this.applyPerson = applyPerson; |
| | | } |
| | | |
| | | public String getProject() { |
| | | return project; |
| | | } |
| | | |
| | | public void setProject(String project) { |
| | | this.project = project; |
| | | } |
| | | |
| | | public String getDepartment() { |
| | | return department; |
| | | } |
| | | |
| | | public void setDepartment(String department) { |
| | | this.department = department; |
| | | } |
| | | |
| | | public List<String> getStatusList() { |
| | | statusList = new ArrayList<> (); |
| | | statusList.add("全部"); |
| | | statusList.add("待解决"); |
| | | statusList.add("已解决"); |
| | | statusList.add("已拒绝"); |
| | | return statusList; |
| | | } |
| | | |
| | | |
| | | public void export2Excel() { |
| | | List<Map> list = hazardousWasteService.exportList(startTime,endTime,status,applyPerson,project,department,tid); |
| | | try{ |
| | | hazardousWasteService.export2Excel(list); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | FacesUtils.warn("导出失败"); |
| | | } |
| | | } |
| | | |
| | | public void exportStatistics2Excel(){ |
| | | List<Map> list = hazardousWasteService.exportStatisticsList(startTime,endTime,status,applyPerson,project,department); |
| | | try{ |
| | | hazardousWasteService.exportStatistics2Excel(list); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | FacesUtils.warn("导出失败"); |
| | | } |
| | | } |
| | | |
| | | public String getTid() { |
| | | return tid; |
| | | } |
| | | |
| | | public void setTid(String tid) { |
| | | this.tid = tid; |
| | | } |
| | | } |
| | |
| | | import com.nanometer.smartlab.entity.enumtype.ApproverFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.SeeFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.Waster; |
| | | import com.nanometer.smartlab.service.BaseMetaService; |
| | | import com.nanometer.smartlab.service.BaseRoleService; |
| | | import com.nanometer.smartlab.service.SysUserService; |
| | |
| | | private String editPasswor; |
| | | private List<BaseMeta> codeList; |
| | | private List<BaseRole> roleList; |
| | | private List<Waster> wasterSelectList; |
| | | |
| | | public List<BaseRole> getRoleList() { |
| | | return roleList; |
| | |
| | | return seeFlagSelectList; |
| | | } |
| | | |
| | | public List<Waster> getWasterSelectList() { |
| | | if (this.wasterSelectList == null) { |
| | | this.wasterSelectList = Arrays.asList(Waster.values()); |
| | | } |
| | | |
| | | return wasterSelectList; |
| | | } |
| | | |
| | | public String getArp() { |
| | | return arp; |
| | | } |
对比新文件 |
| | |
| | | package com.nanometer.smartlab.converter; |
| | | |
| | | import com.nanometer.smartlab.entity.enumtype.Waster; |
| | | import org.apache.commons.lang.StringUtils; |
| | | |
| | | import javax.faces.component.UIComponent; |
| | | import javax.faces.context.FacesContext; |
| | | import javax.faces.convert.Converter; |
| | | import javax.faces.convert.FacesConverter; |
| | | |
| | | @FacesConverter("wasterConvert") |
| | | public class WasterConvert implements Converter { |
| | | |
| | | public Object getAsObject(FacesContext context, UIComponent component, String value) { |
| | | try { |
| | | if (StringUtils.isNotBlank(value)) { |
| | | return Waster.parse(Integer.parseInt(value)); |
| | | } |
| | | |
| | | return null; |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public String getAsString(FacesContext context, UIComponent component, Object value) { |
| | | try { |
| | | if (value != null && value instanceof Waster) { |
| | | Waster Waster = (Waster) value; |
| | | return String.valueOf(Waster.getKey()); |
| | | } |
| | | |
| | | return null; |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.nanometer.smartlab.dao; |
| | | |
| | | import com.nanometer.smartlab.entity.HazardousWaste; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | List<HazardousWaste> selectAll(Map params); |
| | | |
| | | int countAll(Map params); |
| | | } |
| | | |
| | | List<Map> selectExportList(Map params); |
| | | |
| | | int countStatistics(Map<String, Object> params); |
| | | |
| | | List<HazardousWaste> selectStatistics(Map<String, Object> params); |
| | | |
| | | List<Map> selectStatisticsExportList(Map<String, Object> params); |
| | | |
| | | List<HazardousWaste> setAllWasters(@Param("starttime") String starttime,@Param("endtime") String endtime,@Param("status") String status,@Param("applyPerson") String applyPerson); |
| | | |
| | | HazardousWaste selectByTid(@Param("tid") String tid); |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.nanometer.smartlab.dao.HazardousWasteMapper" > |
| | | <resultMap id="BaseResultMap" type="com.nanometer.smartlab.entity.HazardousWaste" > |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.nanometer.smartlab.dao.HazardousWasteMapper"> |
| | | <resultMap id="BaseResultMap" type="com.nanometer.smartlab.entity.HazardousWaste"> |
| | | <!-- --> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="acid" property="acid" jdbcType="REAL" /> |
| | | <result column="alkali" property="alkali" jdbcType="REAL" /> |
| | | <result column="organic" property="organic" jdbcType="REAL" /> |
| | | <result column="solid" property="solid" jdbcType="REAL" /> |
| | | <result column="medical" property="medical" jdbcType="REAL" /> |
| | | <result column="apply_person" property="applyPerson" jdbcType="VARCHAR" /> |
| | | <result column="project" property="project" jdbcType="VARCHAR" /> |
| | | <result column="department" property="department" jdbcType="VARCHAR" /> |
| | | <result column="unit" property="unit" jdbcType="VARCHAR" /> |
| | | <result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="acid" jdbcType="DECIMAL" property="acid" /> |
| | | <result column="alkali" jdbcType="DECIMAL" property="alkali" /> |
| | | <result column="organic" jdbcType="DECIMAL" property="organic" /> |
| | | <result column="solid" jdbcType="DECIMAL" property="solid" /> |
| | | <result column="medical" jdbcType="DECIMAL" property="medical" /> |
| | | <result column="apply_person" jdbcType="VARCHAR" property="applyPerson" /> |
| | | <result column="project" jdbcType="VARCHAR" property="project" /> |
| | | <result column="department" jdbcType="VARCHAR" property="department" /> |
| | | <result column="unit" jdbcType="VARCHAR" property="unit" /> |
| | | <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
| | | <result column="tid" jdbcType="VARCHAR" property="tid" /> |
| | | <result column="status" jdbcType="VARCHAR" property="status" /> |
| | | <result column="creator" jdbcType="VARCHAR" property="creator" /> |
| | | <result column="updator" jdbcType="VARCHAR" property="updator" /> |
| | | <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <sql id="Base_Column_List"> |
| | | <!-- --> |
| | | id, acid, alkali, organic, solid, medical, apply_person, project, department, unit, |
| | | create_time |
| | | id, acid, alkali, organic, solid, medical, apply_person, project, department, unit, |
| | | create_time, tid, status, creator, updator, updatetime |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" > |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!-- --> |
| | | select |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sys_hazardous_waste |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" > |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!-- --> |
| | | delete from sys_hazardous_waste |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.nanometer.smartlab.entity.HazardousWaste" > |
| | | <insert id="insert" parameterType="com.nanometer.smartlab.entity.HazardousWaste"> |
| | | <!-- --> |
| | | insert into sys_hazardous_waste (id, acid, alkali, organic, |
| | | solid, medical, apply_person, |
| | | project, department, unit, |
| | | create_time) |
| | | values (#{id,jdbcType=BIGINT}, #{acid,jdbcType=REAL}, #{alkali,jdbcType=REAL}, #{organic,jdbcType=REAL}, |
| | | #{solid,jdbcType=REAL}, #{medical,jdbcType=REAL}, #{applyPerson,jdbcType=VARCHAR}, |
| | | #{project,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, |
| | | #{createTime,jdbcType=TIMESTAMP}) |
| | | insert into sys_hazardous_waste (id, acid, alkali, organic, |
| | | solid, medical, apply_person, |
| | | project, department, unit, |
| | | create_time, tid, status, |
| | | creator,updator, updatetime) |
| | | values (#{id,jdbcType=BIGINT}, #{acid,jdbcType=DECIMAL}, #{alkali,jdbcType=DECIMAL}, #{organic,jdbcType=DECIMAL}, |
| | | #{solid,jdbcType=DECIMAL}, #{medical,jdbcType=DECIMAL}, #{applyPerson,jdbcType=VARCHAR}, |
| | | #{project,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, |
| | | #{createTime,jdbcType=TIMESTAMP}, #{tid,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, |
| | | #{creator,jdbcType=VARCHAR},#{updator,jdbcType=VARCHAR},#{updatetime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.nanometer.smartlab.entity.HazardousWaste" > |
| | | <insert id="insertSelective" parameterType="com.nanometer.smartlab.entity.HazardousWaste"> |
| | | <!-- --> |
| | | insert into sys_hazardous_waste |
| | | <trim prefix="(" suffix=")" suffixOverrides="," > |
| | | <if test="id != null" > |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="acid != null" > |
| | | <if test="acid != null"> |
| | | acid, |
| | | </if> |
| | | <if test="alkali != null" > |
| | | <if test="alkali != null"> |
| | | alkali, |
| | | </if> |
| | | <if test="organic != null" > |
| | | <if test="organic != null"> |
| | | organic, |
| | | </if> |
| | | <if test="solid != null" > |
| | | <if test="solid != null"> |
| | | solid, |
| | | </if> |
| | | <if test="medical != null" > |
| | | <if test="medical != null"> |
| | | medical, |
| | | </if> |
| | | <if test="applyPerson != null" > |
| | | <if test="applyPerson != null"> |
| | | apply_person, |
| | | </if> |
| | | <if test="project != null" > |
| | | <if test="project != null"> |
| | | project, |
| | | </if> |
| | | <if test="department != null" > |
| | | <if test="department != null"> |
| | | department, |
| | | </if> |
| | | <if test="unit != null" > |
| | | <if test="unit != null"> |
| | | unit, |
| | | </if> |
| | | <if test="createTime != null" > |
| | | <if test="createTime != null"> |
| | | create_time, |
| | | </if> |
| | | <if test="tid != null"> |
| | | tid, |
| | | </if> |
| | | <if test="status != null"> |
| | | status, |
| | | </if> |
| | | <if test="creator != null"> |
| | | creator, |
| | | </if> |
| | | <if test="updator != null"> |
| | | creator, |
| | | </if> |
| | | <if test="updatetime != null"> |
| | | updatetime, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | <if test="id != null" > |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="acid != null" > |
| | | #{acid,jdbcType=REAL}, |
| | | <if test="acid != null"> |
| | | #{acid,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="alkali != null" > |
| | | #{alkali,jdbcType=REAL}, |
| | | <if test="alkali != null"> |
| | | #{alkali,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="organic != null" > |
| | | #{organic,jdbcType=REAL}, |
| | | <if test="organic != null"> |
| | | #{organic,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="solid != null" > |
| | | #{solid,jdbcType=REAL}, |
| | | <if test="solid != null"> |
| | | #{solid,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="medical != null" > |
| | | #{medical,jdbcType=REAL}, |
| | | <if test="medical != null"> |
| | | #{medical,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="applyPerson != null" > |
| | | <if test="applyPerson != null"> |
| | | #{applyPerson,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="project != null" > |
| | | <if test="project != null"> |
| | | #{project,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="department != null" > |
| | | <if test="department != null"> |
| | | #{department,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="unit != null" > |
| | | <if test="unit != null"> |
| | | #{unit,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createTime != null" > |
| | | <if test="createTime != null"> |
| | | #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="tid != null"> |
| | | #{tid,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="status != null"> |
| | | #{status,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="creator != null"> |
| | | #{creator,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updator != null"> |
| | | #{updator,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updatetime != null"> |
| | | #{updatetime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.nanometer.smartlab.entity.HazardousWaste" > |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.nanometer.smartlab.entity.HazardousWaste"> |
| | | <!-- --> |
| | | update sys_hazardous_waste |
| | | <set > |
| | | <if test="acid != null" > |
| | | acid = #{acid,jdbcType=REAL}, |
| | | <set> |
| | | <if test="acid != null"> |
| | | acid = #{acid,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="alkali != null" > |
| | | alkali = #{alkali,jdbcType=REAL}, |
| | | <if test="alkali != null"> |
| | | alkali = #{alkali,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="organic != null" > |
| | | organic = #{organic,jdbcType=REAL}, |
| | | <if test="organic != null"> |
| | | organic = #{organic,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="solid != null" > |
| | | solid = #{solid,jdbcType=REAL}, |
| | | <if test="solid != null"> |
| | | solid = #{solid,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="medical != null" > |
| | | medical = #{medical,jdbcType=REAL}, |
| | | <if test="medical != null"> |
| | | medical = #{medical,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="applyPerson != null" > |
| | | <if test="applyPerson != null"> |
| | | apply_person = #{applyPerson,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="project != null" > |
| | | <if test="project != null"> |
| | | project = #{project,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="department != null" > |
| | | <if test="department != null"> |
| | | department = #{department,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="unit != null" > |
| | | <if test="unit != null"> |
| | | unit = #{unit,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createTime != null" > |
| | | <if test="createTime != null"> |
| | | create_time = #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="tid != null"> |
| | | tid = #{tid,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="creator != null"> |
| | | creator = #{creator,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updator != null"> |
| | | updator = #{updator,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updatetime != null"> |
| | | updatetime = #{updatetime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.nanometer.smartlab.entity.HazardousWaste" > |
| | | <update id="updateByPrimaryKey" parameterType="com.nanometer.smartlab.entity.HazardousWaste"> |
| | | <!-- --> |
| | | update sys_hazardous_waste |
| | | set acid = #{acid,jdbcType=REAL}, |
| | | alkali = #{alkali,jdbcType=REAL}, |
| | | organic = #{organic,jdbcType=REAL}, |
| | | solid = #{solid,jdbcType=REAL}, |
| | | medical = #{medical,jdbcType=REAL}, |
| | | set acid = #{acid,jdbcType=DECIMAL}, |
| | | alkali = #{alkali,jdbcType=DECIMAL}, |
| | | organic = #{organic,jdbcType=DECIMAL}, |
| | | solid = #{solid,jdbcType=DECIMAL}, |
| | | medical = #{medical,jdbcType=DECIMAL}, |
| | | apply_person = #{applyPerson,jdbcType=VARCHAR}, |
| | | project = #{project,jdbcType=VARCHAR}, |
| | | department = #{department,jdbcType=VARCHAR}, |
| | | unit = #{unit,jdbcType=VARCHAR}, |
| | | create_time = #{createTime,jdbcType=TIMESTAMP} |
| | | create_time = #{createTime,jdbcType=TIMESTAMP}, |
| | | tid = #{tid,jdbcType=VARCHAR}, |
| | | status = #{status,jdbcType=VARCHAR}, |
| | | creator = #{creator,jdbcType=VARCHAR}, |
| | | updator = #{updator,jdbcType=VARCHAR}, |
| | | updatetime = #{updatetime,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="selectAll" resultMap="BaseResultMap" parameterType="java.util.Map" > |
| | | <select id="setAllWasters" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sys_hazardous_waste |
| | | <where> |
| | | 1 = 1 |
| | | <if test="starttime != null and starttime != ''"> |
| | | and create_time > #{starttime} |
| | | </if> |
| | | <if test="endtime != null and endtime != ''"> |
| | | and create_time < #{endtime} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="applyPerson != null and applyPerson != ''"> |
| | | and apply_person = #{applyPerson} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | <select id="selectAll" parameterType="java.util.Map" resultMap="BaseResultMap"> |
| | | <!-- --> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sys_hazardous_waste |
| | | <where> |
| | | 1 = 1 |
| | | <if test="startTime != null and startTime != ''" > |
| | | <if test="startTime != null and startTime != ''"> |
| | | and create_time > #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''" > |
| | | <if test="endTime != null and endTime != ''"> |
| | | and create_time < #{endTime} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="applyPerson != null and applyPerson != ''"> |
| | | and apply_person = #{applyPerson} |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | <if test="department != null and department != ''"> |
| | | and department = #{department} |
| | | </if> |
| | | <if test="tid != null and tid != ''"> |
| | | and tid = #{tid} |
| | | </if> |
| | | </where> |
| | | <if test="first != null and pageSize != null" > |
| | | order by create_time desc |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first},#{pageSize} |
| | | </if> |
| | | order by create_time |
| | | </select> |
| | | |
| | | <select id="countAll" resultType="java.lang.Integer" > |
| | | <select id="countAll" resultType="java.lang.Integer"> |
| | | <!-- --> |
| | | select count(0) |
| | | from sys_hazardous_waste |
| | | <where> |
| | | 1 = 1 |
| | | <if test="startTime != null and startTime != ''" > |
| | | <if test="startTime != null and startTime != ''"> |
| | | and create_time > #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''" > |
| | | <if test="endTime != null and endTime != ''"> |
| | | and create_time < #{endTime} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="applyPerson != null and applyPerson != ''"> |
| | | and apply_person = #{applyPerson} |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | <if test="department != null and department != ''"> |
| | | and department = #{department} |
| | | </if> |
| | | <if test="tid != null and tid != ''"> |
| | | and tid = #{tid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | | <select id="selectExportList" resultType="java.util.Map"> |
| | | select |
| | | id, acid, alkali, organic, solid, medical, apply_person as applyPerson, project, department, unit, |
| | | create_time as createTime, tid, status, creator |
| | | from sys_hazardous_waste |
| | | <where> |
| | | 1 = 1 |
| | | <if test="startTime != null and startTime != ''"> |
| | | and create_time > #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and create_time < #{endTime} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="applyPerson != null and applyPerson != ''"> |
| | | and apply_person = #{applyPerson} |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | <if test="department != null and department != ''"> |
| | | and department = #{department} |
| | | </if> |
| | | <if test="tid != null and tid != ''"> |
| | | and tid = #{tid} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | <select id="countStatistics" resultType="java.lang.Integer"> |
| | | select count(0) |
| | | from sys_hazardous_waste |
| | | <where> |
| | | 1 = 1 |
| | | <if test="startTime != null and startTime != ''"> |
| | | and create_time > #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and create_time < #{endTime} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="applyPerson != null and applyPerson != ''"> |
| | | and apply_person = #{applyPerson} |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | <if test="department != null and department != ''"> |
| | | and department = #{department} |
| | | </if> |
| | | group by project,department,unit |
| | | </where> |
| | | </select> |
| | | <select id="selectStatistics" resultType="com.nanometer.smartlab.entity.HazardousWaste"> |
| | | select |
| | | id, sum(acid) as acid,sum(alkali) as alkali, sum(organic) as organic,sum(solid) as solid,sum(medical) as medical, |
| | | apply_person as applyPerson, project, department, unit,create_time as createTime, tid, status, creator |
| | | from sys_hazardous_waste |
| | | <where> |
| | | 1 = 1 |
| | | <if test="startTime != null and startTime != ''"> |
| | | and create_time > #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and create_time < #{endTime} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="applyPerson != null and applyPerson != ''"> |
| | | and apply_person = #{applyPerson} |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | <if test="department != null and department != ''"> |
| | | and department = #{department} |
| | | </if> |
| | | </where> |
| | | group by project,department,unit |
| | | order by create_time desc |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first},#{pageSize} |
| | | </if> |
| | | </select> |
| | | <select id="selectStatisticsExportList" resultType="java.util.Map"> |
| | | select |
| | | id, sum(acid) as acid,sum(alkali) as alkali, sum(organic) as organic,sum(solid) as solid,sum(medical) as medical, |
| | | apply_person as applyPerson, project, department, unit,create_time as createTime, tid, status, creator |
| | | from sys_hazardous_waste |
| | | <where> |
| | | 1 = 1 |
| | | <if test="startTime != null and startTime != ''"> |
| | | and create_time > #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and create_time < #{endTime} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="applyPerson != null and applyPerson != ''"> |
| | | and apply_person = #{applyPerson} |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | <if test="department != null and department != ''"> |
| | | and department = #{department} |
| | | </if> |
| | | </where> |
| | | group by project,department,unit |
| | | order by create_time desc |
| | | </select> |
| | | <select id="selectByTid" resultType="com.nanometer.smartlab.entity.HazardousWaste"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sys_hazardous_waste |
| | | <where> |
| | | 1 = 1 |
| | | and tid = #{tid} |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.nanometer.smartlab.dao; |
| | | |
| | | import com.nanometer.smartlab.entity.SysLaboratory; |
| | | import com.nanometer.smartlab.entity.dto.LaboratoryVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.dao.DataAccessException; |
| | | |
| | | import java.util.List; |
| | |
| | | public void updateLabExport(SysLaboratory sysLaboratory); |
| | | |
| | | List<Map> exportLabList(Map params); |
| | | |
| | | List<LaboratoryVo.Laboratory> getLaboratoryByProject(@Param("project") String project); |
| | | } |
| | |
| | | where bar_code = #{barCode} |
| | | and valid_flag=1 |
| | | </select> |
| | | |
| | | <select id="getLaboratoryByProject" resultType="com.nanometer.smartlab.entity.dto.LaboratoryVo$Laboratory"> |
| | | SELECT |
| | | CONCAT('楼号:',sl.location1,'-地址号:',sl.location2) as address, |
| | | bm.meta_value as department |
| | | FROM |
| | | sys_laboratory as sl |
| | | LEFT JOIN base_meta bm on bm.id = sl.department |
| | | WHERE |
| | | sl.project LIKE CONCAT('%',#{project},'%') |
| | | </select> |
| | | <update id="updateLabExport" parameterType="com.nanometer.smartlab.entity.SysLaboratory"> |
| | | update sys_laboratory set |
| | | type=#{type}, |
| | |
| | | package com.nanometer.smartlab.dao; |
| | | |
| | | import com.nanometer.smartlab.entity.SysUser; |
| | | import com.nanometer.smartlab.entity.dto.HazardousWasteUser; |
| | | import com.nanometer.smartlab.entity.dto.LaboratoryVo; |
| | | import com.nanometer.smartlab.entity.dto.SysUserDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.dao.DataAccessException; |
| | |
| | | |
| | | List<SysUserDto> selectUserInfo(); |
| | | |
| | | SysUser getUserByAccount(Map params); |
| | | HazardousWasteUser getUserByAccount(Map params); |
| | | |
| | | List<LaboratoryVo.LaboratoryUser> getUserByProject(@Param("project") String project); |
| | | } |
| | |
| | | <result property="roleName" column="roleName"></result> |
| | | <result property="containerCodeList" column="containerCodeList"></result> |
| | | <result property="project" column="project"></result> |
| | | <result property="waster" column="waster" typeHandler="com.nanometer.smartlab.entity.handler.WasterHandler"></result> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SysUserDto" type="com.nanometer.smartlab.entity.dto.SysUserDto"> |
| | |
| | | </if> |
| | | <if test="editId != null and editId != ''"> |
| | | and su.id != #{editId} |
| | | </if> |
| | | <if test="waster != null"> |
| | | and su.waster = #{waster} |
| | | </if> |
| | | </sql> |
| | | |
| | |
| | | </select> |
| | | |
| | | <insert id="insertSysUser" parameterType="com.nanometer.smartlab.entity.SysUser"> |
| | | insert into sys_user(id, arp, account, password, company, department, name, phone, email, memo, id_card, approver_flag, see_flag, role_id, valid_flag, create_time, update_time,project) |
| | | values (#{id}, #{arp}, #{account}, #{password}, #{company}, #{department}, #{name}, #{phone}, #{email}, #{memo}, #{idCard}, #{approverFlag}, #{seeFlag}, #{roleId}, 1, now(), now(),#{project}) |
| | | insert into sys_user(id, arp, account, password, company, department, name, phone, email, memo, id_card, approver_flag, see_flag, role_id, valid_flag, create_time, update_time,project,waster) |
| | | values (#{id}, #{arp}, #{account}, #{password}, #{company}, #{department}, #{name}, #{phone}, #{email}, #{memo}, #{idCard}, #{approverFlag}, #{seeFlag}, #{roleId}, 1, now(), now(),#{project},#{waster}) |
| | | </insert> |
| | | |
| | | <update id="updateSysUser" parameterType="com.nanometer.smartlab.entity.SysUser"> |
| | | update sys_user set arp=#{arp}, account=#{account}, password=#{password}, company=#{company}, department=#{department}, name=#{name}, phone=#{phone}, |
| | | email=#{email}, memo=#{memo}, id_card=#{idCard}, approver_flag=#{approverFlag}, see_flag=#{seeFlag}, role_id=#{roleId}, point=#{point},update_time=now(),project=#{project} |
| | | email=#{email}, memo=#{memo}, id_card=#{idCard}, approver_flag=#{approverFlag}, see_flag=#{seeFlag}, role_id=#{roleId}, point=#{point},update_time=now(),project=#{project},waster=#{waster} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | |
| | | select * from sys_user where valid_flag=1 and account=#{account} |
| | | </select> |
| | | <select id="selectUserInfo" resultMap="SysUserDto"> |
| | | SELECT |
| | | SELECT |
| | | su.id, |
| | | su.arp, |
| | | su.account, |
| | |
| | | sl.`name` sl_name, |
| | | slc.id slc_id, |
| | | slc.`name` slc_name |
| | | FROM |
| | | sys_user su |
| | | FROM sys_user su |
| | | LEFT JOIN base_meta bm1 on bm1.id = su.department |
| | | LEFT JOIN sys_laboratory sl on sl.department = su.department |
| | | LEFT JOIN sys_laboratory_container slc on slc.laboratory_id = sl.id |
| | | |
| | | |
| | | |
| | | WHERE su.valid_flag = 1 |
| | | and sl.valid_flag = 1 |
| | | and slc.valid_flag = 1 |
| | | |
| | | </select> |
| | | <select id="getUserByAccount" resultMap="SysUser"> |
| | | select su.*, br.name as roleName from sys_user as su |
| | | left join base_role as br on su.role_id = br.id |
| | | left join base_meta bm on su.department = bm.id |
| | | where su.valid_flag = 1 |
| | | and su.account = #{account} |
| | | </select> |
| | | <select id="getUserListByProject" parameterType="java.util.Map" resultMap="SysUser"> |
| | | SELECT u.name,u.see_flag,u.role_id,u.valid_flag,u.id_card,bm2.meta_value department,bm1.meta_value company,u.arp,u.point,u.project |
| | | from sys_user u |
| | | left join base_meta bm1 on bm1.id = u.company |
| | | left join base_meta bm2 on bm2.id = u.department |
| | | where |
| | | u.project = #{0} |
| | | and u.valid_flag = 1 |
| | | and u.update_time >= #{1} and #{2} > u.update_time |
| | | </select> |
| | | |
| | | <select id="getUserListByProject" parameterType="java.util.Map" resultMap="SysUser"> |
| | | SELECT u.name,u.see_flag,u.role_id,u.valid_flag,u.id_card,bm2.meta_value department,bm1.meta_value company,u.arp,u.point,u.project |
| | | from sys_user u |
| | | left join base_meta bm1 on bm1.id = u.company |
| | | left join base_meta bm2 on bm2.id = u.department |
| | | where |
| | | u.project = #{0} |
| | | and u.valid_flag = 1 |
| | | and u.update_time >= #{1} and #{2} > u.update_time |
| | | </select> |
| | | <select id="getUserByAccount" resultType="com.nanometer.smartlab.entity.dto.HazardousWasteUser"> |
| | | SELECT |
| | | su.id, |
| | | su.account, |
| | | su.`name`, |
| | | su.`password`, |
| | | su.waster as adminFlag, |
| | | su.project, |
| | | bm.meta_value as department, |
| | | com.meta_value as company |
| | | FROM sys_user AS su |
| | | LEFT JOIN base_meta bm ON su.department = bm.id |
| | | LEFT JOIN base_meta com on com.id = su.company |
| | | WHERE |
| | | su.valid_flag = 1 |
| | | AND su.account = #{account} |
| | | </select> |
| | | <select id="getUserByProject" resultType="com.nanometer.smartlab.entity.dto.LaboratoryVo$LaboratoryUser"> |
| | | SELECT |
| | | `name` as username |
| | | FROM sys_user |
| | | WHERE |
| | | valid_flag = '1' |
| | | AND waster = '1' |
| | | AND project = #{project}; |
| | | </select> |
| | | <update id="updateUserPointBySelective" parameterType="java.util.Map"> |
| | | update sys_user set point=#{point} |
| | | <where> |
| | | <if test="id != null"> |
| | | id = #{id} |
| | | </if> |
| | | </where> |
| | | update sys_user set point=#{point} |
| | | <where> |
| | | <if test="id != null"> |
| | | id = #{id} |
| | | </if> |
| | | </where> |
| | | </update> |
| | | </mapper> |
| | |
| | | package com.nanometer.smartlab.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | public class HazardousWaste implements Serializable { |
| | |
| | | private Long id; |
| | | |
| | | /** 酸 acid **/ |
| | | private Float acid; |
| | | private BigDecimal acid; |
| | | |
| | | /** 碱 alkali **/ |
| | | private Float alkali; |
| | | private BigDecimal alkali; |
| | | |
| | | /** 有机 organic **/ |
| | | private Float organic; |
| | | private BigDecimal organic; |
| | | |
| | | /** 固废 solid **/ |
| | | private Float solid; |
| | | private BigDecimal solid; |
| | | |
| | | /** 医疗 medical **/ |
| | | private Float medical; |
| | | private BigDecimal medical; |
| | | |
| | | /** 申请人 apply_person **/ |
| | | /** 确认者 apply_person **/ |
| | | private String applyPerson; |
| | | |
| | | /** 项目组 project **/ |
| | | /** 课题组 project **/ |
| | | private String project; |
| | | |
| | | /** 部门 department **/ |
| | |
| | | |
| | | /** 创建时间 create_time **/ |
| | | private Date createTime; |
| | | |
| | | /** 单号 tid **/ |
| | | private String tid; |
| | | |
| | | /** 状态 待解决、已解决、已拒绝 status **/ |
| | | private String status; |
| | | |
| | | /** 创建者 creator **/ |
| | | private String creator; |
| | | |
| | | /** 更新人 updator **/ |
| | | private String updator; |
| | | |
| | | /** 创建时间 updatetime **/ |
| | | private Date updatetime; |
| | | |
| | | /** id **/ |
| | | public Long getId() { |
| | |
| | | } |
| | | |
| | | /** 酸 acid **/ |
| | | public Float getAcid() { |
| | | public BigDecimal getAcid() { |
| | | return acid; |
| | | } |
| | | |
| | | /** 酸 acid **/ |
| | | public void setAcid(Float acid) { |
| | | public void setAcid(BigDecimal acid) { |
| | | this.acid = acid; |
| | | } |
| | | |
| | | /** 碱 alkali **/ |
| | | public Float getAlkali() { |
| | | public BigDecimal getAlkali() { |
| | | return alkali; |
| | | } |
| | | |
| | | /** 碱 alkali **/ |
| | | public void setAlkali(Float alkali) { |
| | | public void setAlkali(BigDecimal alkali) { |
| | | this.alkali = alkali; |
| | | } |
| | | |
| | | /** 有机 organic **/ |
| | | public Float getOrganic() { |
| | | public BigDecimal getOrganic() { |
| | | return organic; |
| | | } |
| | | |
| | | /** 有机 organic **/ |
| | | public void setOrganic(Float organic) { |
| | | public void setOrganic(BigDecimal organic) { |
| | | this.organic = organic; |
| | | } |
| | | |
| | | /** 固废 solid **/ |
| | | public Float getSolid() { |
| | | public BigDecimal getSolid() { |
| | | return solid; |
| | | } |
| | | |
| | | /** 固废 solid **/ |
| | | public void setSolid(Float solid) { |
| | | public void setSolid(BigDecimal solid) { |
| | | this.solid = solid; |
| | | } |
| | | |
| | | /** 医疗 medical **/ |
| | | public Float getMedical() { |
| | | public BigDecimal getMedical() { |
| | | return medical; |
| | | } |
| | | |
| | | /** 医疗 medical **/ |
| | | public void setMedical(Float medical) { |
| | | public void setMedical(BigDecimal medical) { |
| | | this.medical = medical; |
| | | } |
| | | |
| | |
| | | this.applyPerson = applyPerson == null ? null : applyPerson.trim(); |
| | | } |
| | | |
| | | /** 项目组 project **/ |
| | | /** 课题组 project **/ |
| | | public String getProject() { |
| | | return project; |
| | | } |
| | | |
| | | /** 项目组 project **/ |
| | | /** 课题组 project **/ |
| | | public void setProject(String project) { |
| | | this.project = project == null ? null : project.trim(); |
| | | } |
| | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | | |
| | | /** 单号 tid **/ |
| | | public String getTid() { |
| | | return tid; |
| | | } |
| | | |
| | | /** 单号 tid **/ |
| | | public void setTid(String tid) { |
| | | this.tid = tid == null ? null : tid.trim(); |
| | | } |
| | | |
| | | /** 状态 待解决、已解决、已拒绝 status **/ |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | /** 状态 待解决、已解决、已拒绝 status **/ |
| | | public void setStatus(String status) { |
| | | this.status = status == null ? null : status.trim(); |
| | | } |
| | | |
| | | /** 创建人 creator **/ |
| | | public String getCreator() { |
| | | return creator; |
| | | } |
| | | |
| | | /** 创建人 creator **/ |
| | | public void setCreator(String creator) { |
| | | this.creator = creator == null ? null : creator.trim(); |
| | | } |
| | | |
| | | public String getUpdator() { |
| | | return updator; |
| | | } |
| | | |
| | | public void setUpdator(String updator) { |
| | | this.updator = updator; |
| | | } |
| | | |
| | | public Date getUpdatetime() { |
| | | return updatetime; |
| | | } |
| | | |
| | | public void setUpdatetime(Date updatetime) { |
| | | this.updatetime = updatetime; |
| | | } |
| | | } |
| | |
| | | import com.nanometer.smartlab.entity.enumtype.ApproverFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.SeeFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.Waster; |
| | | |
| | | /** |
| | | * Created by johnny on 17/11/18. |
| | |
| | | private String containerCodeList; |
| | | private String roleName; |
| | | private String project; |
| | | private Waster waster; |
| | | |
| | | public String getId() { |
| | | return id; |
| | |
| | | public void setPoint(int point) { |
| | | this.point = point; |
| | | } |
| | | |
| | | |
| | | public String getArp() { |
| | | return arp; |
| | | } |
| | |
| | | public void setProject(String project) { |
| | | this.project = project; |
| | | } |
| | | |
| | | public Waster getWaster() { |
| | | return waster; |
| | | } |
| | | |
| | | public void setWaster(Waster waster) { |
| | | this.waster = waster; |
| | | } |
| | | } |
| | |
| | | import java.io.Serializable; |
| | | |
| | | public class HazardousWasteUser implements Serializable { |
| | | |
| | | private String id; |
| | | private String account; |
| | | private String name; |
| | | private String password; |
| | | private String roleName; |
| | | |
| | | /**1危废处理人员 2危废管理员**/ |
| | | private int adminFlag; |
| | | private String project; |
| | | private String department; |
| | | private String company; |
| | | private String newpassword; |
| | | |
| | | public String getAccount() { |
| | | return account; |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getRoleName() { |
| | | return roleName; |
| | | public int getAdminFlag() { |
| | | return adminFlag; |
| | | } |
| | | |
| | | public void setRoleName(String roleName) { |
| | | this.roleName = roleName; |
| | | public void setAdminFlag(int adminFlag) { |
| | | this.adminFlag = adminFlag; |
| | | } |
| | | |
| | | public String getProject() { |
| | | return project; |
| | | } |
| | | |
| | | public void setProject(String project) { |
| | | this.project = project; |
| | | } |
| | | |
| | | public String getDepartment() { |
| | | return department; |
| | | } |
| | | |
| | | public void setDepartment(String department) { |
| | | this.department = department; |
| | | } |
| | | |
| | | public String getCompany() { |
| | | return company; |
| | | } |
| | | |
| | | public void setCompany(String company) { |
| | | this.company = company; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getNewpassword() { |
| | | return newpassword; |
| | | } |
| | | |
| | | public void setNewpassword(String newpassword) { |
| | | this.newpassword = newpassword; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.nanometer.smartlab.entity.dto; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class LaboratoryVo { |
| | | private List<Laboratory> laboratoryList = new ArrayList<>(); |
| | | private List<LaboratoryUser> laboratoryUsers = new ArrayList<>(); |
| | | |
| | | public List<Laboratory> getLaboratoryList() { |
| | | return laboratoryList; |
| | | } |
| | | |
| | | public void setLaboratoryList(List<Laboratory> laboratoryList) { |
| | | this.laboratoryList = laboratoryList; |
| | | } |
| | | |
| | | public List<LaboratoryUser> getLaboratoryUsers() { |
| | | return laboratoryUsers; |
| | | } |
| | | |
| | | public void setLaboratoryUsers(List<LaboratoryUser> laboratoryUsers) { |
| | | this.laboratoryUsers = laboratoryUsers; |
| | | } |
| | | |
| | | public static class Laboratory{ |
| | | private String address; |
| | | private String department; |
| | | |
| | | public Laboratory(){ |
| | | } |
| | | |
| | | public String getAddress() { |
| | | return address; |
| | | } |
| | | |
| | | public void setAddress(String address) { |
| | | this.address = address; |
| | | } |
| | | |
| | | public String getDepartment() { |
| | | return department; |
| | | } |
| | | |
| | | public void setDepartment(String department) { |
| | | this.department = department; |
| | | } |
| | | } |
| | | |
| | | public static class LaboratoryUser{ |
| | | private String username; |
| | | |
| | | public LaboratoryUser(){ |
| | | } |
| | | |
| | | public String getUsername() { |
| | | return username; |
| | | } |
| | | |
| | | public void setUsername(String username) { |
| | | this.username = username; |
| | | } |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.nanometer.smartlab.entity.enumtype; |
| | | |
| | | import java.util.HashMap; |
| | | |
| | | public enum Waster { |
| | | NULL(0, ""),NORMAL(1, "危废处理人员"),MANAGE(2, "危废管理员"); |
| | | private int key; |
| | | |
| | | private String text; |
| | | |
| | | private Waster(int key, String text) { |
| | | this.key = key; |
| | | this.text = text; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | private static HashMap<Integer, Waster> map = new HashMap<Integer, Waster>(); |
| | | static { |
| | | for (Waster d : Waster.values()) { |
| | | map.put(d.key, d); |
| | | } |
| | | } |
| | | |
| | | public static Waster parse(Integer index) { |
| | | if (map.containsKey(index)) { |
| | | return map.get(index); |
| | | } |
| | | return null; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.nanometer.smartlab.entity.handler; |
| | | |
| | | import com.nanometer.smartlab.entity.enumtype.Waster; |
| | | import org.apache.ibatis.type.BaseTypeHandler; |
| | | import org.apache.ibatis.type.JdbcType; |
| | | |
| | | import java.sql.CallableStatement; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | |
| | | public class WasterHandler extends BaseTypeHandler<Waster> { |
| | | |
| | | @Override |
| | | public Waster getNullableResult(ResultSet rs, String index) throws SQLException { |
| | | return Waster.parse(rs.getInt(index)); |
| | | } |
| | | |
| | | @Override |
| | | public Waster getNullableResult(ResultSet rs, int index) throws SQLException { |
| | | return Waster.parse(rs.getInt(index)); |
| | | } |
| | | |
| | | @Override |
| | | public Waster getNullableResult(CallableStatement cs, int index) throws SQLException { |
| | | return Waster.parse(cs.getInt(index)); |
| | | } |
| | | |
| | | @Override |
| | | public void setNonNullParameter(PreparedStatement ps, int index, Waster val, JdbcType arg3) throws SQLException { |
| | | ps.setInt(index, val.getKey()); |
| | | } |
| | | } |
| | |
| | | |
| | | public interface HazardousWasteService { |
| | | |
| | | List<HazardousWaste> selectAll(Date startTime, Date endTime, Integer offset, Integer pageSize); |
| | | List<HazardousWaste> selectAll(Date startTime, Date endTime,String status,String applyPerson,String project,String department,String tid,Integer offset, Integer pageSize); |
| | | |
| | | int countAll(Date startTime, Date endTime); |
| | | int countAll(Date startTime, Date endTime,String status,String applyPerson,String project,String department,String tid); |
| | | |
| | | List<Map> exportList(Date startTime, Date endTime, String status, String applyPerson, String project, String department,String tid); |
| | | |
| | | void export2Excel(List<Map> list) throws Exception; |
| | | |
| | | int countStatistics(Date startTime, Date endTime, String status, String applyPerson, String project, String department); |
| | | |
| | | List<HazardousWaste> selectStatistics(Date startTime, Date endTime, String status, String applyPerson, String project, String department, int first, int pageSize); |
| | | |
| | | List<Map> exportStatisticsList(Date startTime, Date endTime, String status, String applyPerson, String project, String department); |
| | | |
| | | void exportStatistics2Excel(List<Map> list)throws Exception; |
| | | |
| | | void insertInfo(HazardousWaste hazardousWaste); |
| | | |
| | | List<HazardousWaste> setAllWasters(String starttime, String endtime, String status, String applyPerson); |
| | | |
| | | HazardousWaste selectByTid(String tid); |
| | | |
| | | void updateWaste(HazardousWaste hazardousWaste); |
| | | } |
| | |
| | | |
| | | import com.nanometer.smartlab.dao.HazardousWasteMapper; |
| | | import com.nanometer.smartlab.entity.HazardousWaste; |
| | | import com.nanometer.smartlab.util.ExcelUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | public class HazardousWasteServiceImpl implements HazardousWasteService{ |
| | |
| | | private HazardousWasteMapper hazardousWasteMapper; |
| | | |
| | | @Override |
| | | public List<HazardousWaste> selectAll(Date startTime, Date endTime, Integer offset, Integer pageSize) { |
| | | public List<HazardousWaste> selectAll(Date startTime, Date endTime,String status,String applyPerson,String project,String department, |
| | | String tid, Integer offset, Integer pageSize) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("startTime", startTime); |
| | | params.put("endTime", endTime); |
| | | params.put("first", offset); |
| | | params.put("pageSize", pageSize); |
| | | if (StringUtils.isNotBlank(status) && !status.equals("全部")){ |
| | | params.put("status", status); |
| | | } |
| | | params.put("applyPerson", applyPerson); |
| | | params.put("project", project); |
| | | params.put("department", department); |
| | | params.put("tid", tid); |
| | | return hazardousWasteMapper.selectAll(params); |
| | | } |
| | | |
| | | @Override |
| | | public int countAll(Date startTime, Date endTime) { |
| | | public int countAll(Date startTime, Date endTime,String status,String applyPerson,String project,String department,String tid) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("startTime", startTime); |
| | | params.put("endTime", endTime); |
| | | if (StringUtils.isNotBlank(status) && !status.equals("全部")){ |
| | | params.put("status", status); |
| | | } |
| | | params.put("applyPerson", applyPerson); |
| | | params.put("project", project); |
| | | params.put("department", department); |
| | | params.put("tid", tid); |
| | | return hazardousWasteMapper.countAll(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> exportList(Date startTime, Date endTime, String status, String applyPerson, String project, String department,String tid) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("startTime", startTime); |
| | | params.put("endTime", endTime); |
| | | if (StringUtils.isNotBlank(status) && !status.equals("全部")){ |
| | | params.put("status", status); |
| | | } |
| | | params.put("applyPerson", applyPerson); |
| | | params.put("project", project); |
| | | params.put("department", department); |
| | | params.put("tid", tid); |
| | | return hazardousWasteMapper.selectExportList(params); |
| | | } |
| | | |
| | | @Override |
| | | public void export2Excel(List<Map> list) throws Exception { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("tid", "单号"); |
| | | map.put("status", "状态"); |
| | | map.put("acid", "酸性废液"); |
| | | map.put("alkali", "碱性废液"); |
| | | map.put("organic", "有机废液"); |
| | | map.put("solid", "固体废弃物"); |
| | | map.put("medical", "医疗废弃物"); |
| | | map.put("applyPerson", "确认者"); |
| | | map.put("project", "课题组"); |
| | | map.put("department", "部门"); |
| | | map.put("unit", "单位"); |
| | | map.put("creator", "创建者"); |
| | | map.put("createTime", "创建时间"); |
| | | ExcelUtils.export2Excel(list,"危废列表",map); |
| | | } |
| | | |
| | | @Override |
| | | public int countStatistics(Date startTime, Date endTime, String status, String applyPerson, String project, String department) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("startTime", startTime); |
| | | params.put("endTime", endTime); |
| | | if (StringUtils.isNotBlank(status) && !status.equals("全部")){ |
| | | params.put("status", status); |
| | | } |
| | | params.put("applyPerson", applyPerson); |
| | | params.put("project", project); |
| | | params.put("department", department); |
| | | return hazardousWasteMapper.countStatistics(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<HazardousWaste> selectStatistics(Date startTime, Date endTime, String status, String applyPerson, String project, String department, int first, int pageSize) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("startTime", startTime); |
| | | params.put("endTime", endTime); |
| | | params.put("first", first); |
| | | params.put("pageSize", pageSize); |
| | | if (StringUtils.isNotBlank(status) && !status.equals("全部")){ |
| | | params.put("status", status); |
| | | } |
| | | params.put("applyPerson", applyPerson); |
| | | params.put("project", project); |
| | | params.put("department", department); |
| | | return hazardousWasteMapper.selectStatistics(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> exportStatisticsList(Date startTime, Date endTime, String status, String applyPerson, String project, String department) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("startTime", startTime); |
| | | params.put("endTime", endTime); |
| | | if (StringUtils.isNotBlank(status) && !status.equals("全部")){ |
| | | params.put("status", status); |
| | | } |
| | | params.put("applyPerson", applyPerson); |
| | | params.put("project", project); |
| | | params.put("department", department); |
| | | return hazardousWasteMapper.selectStatisticsExportList(params); |
| | | } |
| | | |
| | | @Override |
| | | public void exportStatistics2Excel(List<Map> list)throws Exception { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("status", "状态"); |
| | | map.put("acid", "酸性废液"); |
| | | map.put("alkali", "碱性废液"); |
| | | map.put("organic", "有机废液"); |
| | | map.put("solid", "固体废弃物"); |
| | | map.put("medical", "医疗废弃物"); |
| | | map.put("applyPerson", "确认者"); |
| | | map.put("project", "课题组"); |
| | | map.put("department", "部门"); |
| | | map.put("unit", "单位"); |
| | | ExcelUtils.export2Excel(list,"危废统计分析",map); |
| | | } |
| | | |
| | | @Override |
| | | public void insertInfo(HazardousWaste hazardousWaste) { |
| | | hazardousWasteMapper.insert(hazardousWaste); |
| | | } |
| | | |
| | | @Override |
| | | public List<HazardousWaste> setAllWasters(String starttime, String endtime, String status, String applyPerson) { |
| | | return hazardousWasteMapper.setAllWasters(starttime,endtime, status, applyPerson); |
| | | } |
| | | |
| | | @Override |
| | | public HazardousWaste selectByTid(String tid) { |
| | | return hazardousWasteMapper.selectByTid(tid); |
| | | } |
| | | |
| | | @Override |
| | | public void updateWaste(HazardousWaste hazardousWaste) { |
| | | hazardousWasteMapper.updateByPrimaryKeySelective(hazardousWaste); |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | public List<String> selectProjectsByContainerCode(String containerCode) { |
| | | String projects = sysLaboratoryContainerDao.selectProjectsByContainerCode(containerCode); |
| | | if (projects != null){ |
| | | if (projects != null){ |
| | | return Arrays.asList(projects.split(",")); |
| | | } |
| | | return null; |
| | |
| | | package com.nanometer.smartlab.service; |
| | | |
| | | import com.nanometer.smartlab.entity.SysLaboratory; |
| | | import com.nanometer.smartlab.entity.dto.LaboratoryVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | void exportLab2Excel(List<Map> list) throws Exception; |
| | | |
| | | List<Map> exportLabList(String type, String name); |
| | | |
| | | List<LaboratoryVo.Laboratory> getLaboratoryByProject(String project); |
| | | } |
| | |
| | | |
| | | import com.nanometer.smartlab.dao.SysLaboratoryDao; |
| | | import com.nanometer.smartlab.entity.SysLaboratory; |
| | | import com.nanometer.smartlab.entity.dto.LaboratoryVo; |
| | | import com.nanometer.smartlab.exception.AlarmCode; |
| | | import com.nanometer.smartlab.exception.AlarmException; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | |
| | | return sysLaboratoryDao.exportLabList(params); |
| | | } |
| | | |
| | | @Override |
| | | @Override |
| | | public List<LaboratoryVo.Laboratory> getLaboratoryByProject(String project) { |
| | | return sysLaboratoryDao.getLaboratoryByProject(project); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public List<SysLaboratory> getSysLaboratoryListByDep(String depId) { |
| | | try { |
| | |
| | | |
| | | import com.nanometer.smartlab.entity.SysReagent; |
| | | import com.nanometer.smartlab.entity.SysUser; |
| | | import com.nanometer.smartlab.entity.dto.HazardousWasteUser; |
| | | import com.nanometer.smartlab.entity.dto.LaboratoryVo; |
| | | import com.nanometer.smartlab.entity.dto.SysUserDto; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | List<SysUserDto> getUserInfo(); |
| | | |
| | | SysUser getUserByAccount(String account); |
| | | HazardousWasteUser getUserByAccount(String account); |
| | | |
| | | List<LaboratoryVo.LaboratoryUser> getUserByProject(String project); |
| | | } |
| | |
| | | import com.nanometer.smartlab.dao.SysUserDao; |
| | | import com.nanometer.smartlab.entity.SysReagent; |
| | | import com.nanometer.smartlab.entity.SysUser; |
| | | import com.nanometer.smartlab.entity.dto.HazardousWasteUser; |
| | | import com.nanometer.smartlab.entity.dto.LaboratoryVo; |
| | | import com.nanometer.smartlab.entity.dto.SysUserDto; |
| | | import com.nanometer.smartlab.entity.enumtype.ApproverFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.SeeFlag; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public SysUser getUserByAccount(String account) { |
| | | public HazardousWasteUser getUserByAccount(String account) { |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("account", account); |
| | | return sysUserDao.getUserByAccount(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<LaboratoryVo.LaboratoryUser> getUserByProject(String project) { |
| | | return sysUserDao.getUserByProject(project); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <typeHandler handler="com.nanometer.smartlab.entity.handler.DangerousFlagHandler"/> |
| | | <typeHandler handler="com.nanometer.smartlab.entity.handler.WarningLevelHandler"/> |
| | | <typeHandler handler="com.nanometer.smartlab.entity.handler.ReplaceDictTypeHandler"/> |
| | | <typeHandler handler="com.nanometer.smartlab.entity.handler.WasterHandler"/> |
| | | </typeHandlers> |
| | | |
| | | |
| | | </configuration> |
| | | |
| | | |
| | |
| | | converter="timestampConvert" |
| | | pattern="yyyy-MM-dd" locale="zh_CN"/> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form" actionListener="#{hazardousWasteController.modelChange}"/> |
| | | <p:outputLabel value="状态:"/> |
| | | <p:selectOneMenu value="#{hazardousWasteController.status}"> |
| | | <f:selectItems value="#{hazardousWasteController.statusList}" var="item" |
| | | itemLabel="#{item}" itemValue="#{item}"/> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:outputLabel value="确认者:"/> |
| | | <p:inputText value="#{hazardousWasteController.applyPerson}"/> |
| | | </p:panelGrid> |
| | | |
| | | <p:panelGrid styleClass="filter" columns="8"> |
| | | <p:outputLabel value="单号:"/> |
| | | <p:inputText value="#{hazardousWasteController.tid}"/> |
| | | <p:outputLabel value="课题组"></p:outputLabel> |
| | | <p:selectOneMenu value="#{hazardousWasteController.project}" filter="true" filterMatchMode="startsWith"> |
| | | <f:selectItem itemLabel="不选择课题组" /> |
| | | <f:selectItems value="#{sysProjectServiceImpl.getAll()}" |
| | | var="item" itemLabel="#{item.project}" itemValue="#{item.project}"/> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:outputLabel value="部门"></p:outputLabel> |
| | | <p:selectOneMenu value="#{hazardousWasteController.department}" requiredMessage="请选择部门"> |
| | | <f:selectItem itemLabel="不选择部门"/> |
| | | <f:selectItems value="#{baseMetaService.getBaseMetaList(constants.BASE_META_GROUP_USER_DEPARTMENT)}" |
| | | var="item" itemLabel="#{item.metaValue}" itemValue="#{item.metaValue}"/> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form" actionListener="#{hazardousWasteController.modelChange}"/> |
| | | </p:panelGrid> |
| | | </p:panel> |
| | | <p:panel styleClass="center-body"> |
| | | <p:panelGrid columns="5" styleClass="btn"> |
| | | <p:commandButton value="导出" styleClass="new-btn" ajax="false" actionListener="#{dangerousEncodeController.export2Excel}" /> |
| | | <p:commandButton value="导出" styleClass="new-btn" ajax="false" actionListener="#{hazardousWasteController.export2Excel}" /> |
| | | </p:panelGrid> |
| | | <p:dataTable id="hazardousWasteInfoMngDataTable" |
| | | styleClass="data-table" |
| | |
| | | rows="20" |
| | | selectionMode="single" |
| | | pageLinks="5"> |
| | | <p:column headerText="酸"> |
| | | <p:column headerText="单号" width="150"> |
| | | <h:outputText value="#{row.tid}"/> |
| | | </p:column> |
| | | <p:column headerText="状态"> |
| | | <h:outputText value="#{row.status}"/> |
| | | </p:column> |
| | | <p:column headerText="酸性废液"> |
| | | <h:outputText value="#{row.acid}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="碱"> |
| | | <p:column headerText="碱性废液"> |
| | | <h:outputText value="#{row.alkali}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="有机"> |
| | | <p:column headerText="有机废液"> |
| | | <h:outputText value="#{row.organic}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="固废"> |
| | | <p:column headerText="固体废弃物"> |
| | | <h:outputText value="#{row.solid}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="医疗"> |
| | | <p:column headerText="医疗废弃物"> |
| | | <h:outputText value="#{row.medical}"/> |
| | | </p:column> |
| | | <p:column headerText="确认者"> |
| | | <h:outputText value="#{row.applyPerson}"/> |
| | | </p:column> |
| | | <p:column headerText="课题组"> |
| | | <h:outputText value="#{row.project}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="部门"> |
| | | <h:outputText value="#{row.department}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="单位"> |
| | | <h:outputText value="#{row.unit}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="创建者"> |
| | | <h:outputText value="#{row.creator}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="创建时间"> |
| | | <h:outputText value="#{row.createTime}"> |
| | | <f:convertDateTime pattern="yyyy-MM-dd" locale="zh_CN"></f:convertDateTime> |
| | | </h:outputText> |
| | | </p:column> |
| | | |
| | | </p:dataTable> |
| | | </p:panel> |
| | | </h:form> |
| | | </p:tab> |
| | | <p:tab title="统计分析"> |
| | | <h:form id="hazardousWasteAnalysisForm"> |
| | | <p:panel styleClass="center-header"> |
| | | <p:outputLabel styleClass="title" value="危废处理信息"/> |
| | | |
| | | <p:panelGrid styleClass="filter" columns="15"> |
| | | <p:outputLabel value="开始时间:"/> |
| | | <p:calendar value="#{hazardousWasteController.startTime}" |
| | | converter="timestampConvert" |
| | | pattern="yyyy-MM-dd" locale="zh_CN"/> |
| | | |
| | | <p:outputLabel value="结束时间:"/> |
| | | <p:calendar value="#{hazardousWasteController.endTime}" |
| | | converter="timestampConvert" |
| | | pattern="yyyy-MM-dd" locale="zh_CN"/> |
| | | |
| | | <p:outputLabel value="状态:"/> |
| | | <p:selectOneMenu value="#{hazardousWasteController.status}"> |
| | | <f:selectItems value="#{hazardousWasteController.statusList}" var="item" |
| | | itemLabel="#{item}" itemValue="#{item}"/> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:outputLabel value="确认者:"/> |
| | | <p:inputText value="#{hazardousWasteController.applyPerson}"/> |
| | | |
| | | <p:outputLabel value="课题组"></p:outputLabel> |
| | | <p:selectOneMenu value="#{hazardousWasteController.project}" filter="true" filterMatchMode="startsWith"> |
| | | <f:selectItem itemLabel="不选择课题组" /> |
| | | <f:selectItems value="#{sysProjectServiceImpl.getAll()}" |
| | | var="item" itemLabel="#{item.project}" itemValue="#{item.project}"/> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:outputLabel value="部门"></p:outputLabel> |
| | | <p:selectOneMenu value="#{hazardousWasteController.department}" requiredMessage="请选择部门"> |
| | | <f:selectItem itemLabel="不选择部门"/> |
| | | <f:selectItems value="#{baseMetaService.getBaseMetaList(constants.BASE_META_GROUP_USER_DEPARTMENT)}" |
| | | var="item" itemLabel="#{item.metaValue}" itemValue="#{item.metaValue}"/> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form" actionListener="#{hazardousWasteController.modelAnalysisChange}"/> |
| | | |
| | | </p:panelGrid> |
| | | </p:panel> |
| | | <p:panel styleClass="center-body"> |
| | | <p:panelGrid columns="5" styleClass="btn"> |
| | | <p:commandButton value="导出" styleClass="new-btn" ajax="false" actionListener="#{hazardousWasteController.exportStatistics2Excel}" /> |
| | | </p:panelGrid> |
| | | <p:dataTable id="hazardousWasteInfoAnalysisDataTable" |
| | | styleClass="data-table" |
| | | paginator="true" |
| | | paginatorAlwaysVisible="false" |
| | | paginatorPosition="bottom" |
| | | lazy="true" value="#{hazardousWasteController.analysisDataModel}" |
| | | var="row" |
| | | rowKey="#{row.id}" |
| | | emptyMessage="无数据" |
| | | rows="20" |
| | | selectionMode="single" |
| | | pageLinks="5"> |
| | | |
| | | <p:column headerText="状态"> |
| | | <h:outputText value="#{row.status}"/> |
| | | </p:column> |
| | | <p:column headerText="酸性废液"> |
| | | <h:outputText value="#{row.acid}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="碱性废液"> |
| | | <h:outputText value="#{row.alkali}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="有机废液"> |
| | | <h:outputText value="#{row.organic}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="固体废弃物"> |
| | | <h:outputText value="#{row.solid}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="医疗废弃物"> |
| | | <h:outputText value="#{row.medical}"/> |
| | | </p:column> |
| | | <p:column headerText="确认者"> |
| | | <h:outputText value="#{row.applyPerson}"/> |
| | | </p:column> |
| | | <p:column headerText="课题组"> |
| | | <h:outputText value="#{row.project}"/> |
| | | </p:column> |
| | |
| | | </p:dataTable> |
| | | </p:panel> |
| | | </h:form> |
| | | </p:tab> |
| | | <p:tab title="统计分析"> |
| | | <h:form id="hazardousWasteAnalysisForm"> |
| | | <p:panel styleClass="center-header"> |
| | | <p:outputLabel styleClass="title" value="危废处理信息"/> |
| | | |
| | | <p:panelGrid styleClass="filter" columns="9"> |
| | | <p:outputLabel value="开始时间:"/> |
| | | <p:calendar value="#{hazardousWasteController.startTime}" |
| | | converter="timestampConvert" |
| | | pattern="yyyy-MM-dd" locale="zh_CN"/> |
| | | |
| | | <p:outputLabel value="结束时间:"/> |
| | | <p:calendar value="#{hazardousWasteController.endTime}" |
| | | converter="timestampConvert" |
| | | pattern="yyyy-MM-dd" locale="zh_CN"/> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form" actionListener="#{hazardousWasteController.modelChange}"/> |
| | | |
| | | </p:panelGrid> |
| | | </p:panel> |
| | | <p:panel styleClass="center-body"> |
| | | </p:panel> |
| | | </h:form> |
| | | |
| | | <p:dataTable id="hazardousWasteInfoAnalysisDataTable" |
| | | styleClass="data-table" |
| | | paginator="true" |
| | | paginatorAlwaysVisible="false" |
| | | paginatorPosition="bottom" |
| | | lazy="true" value="#{hazardousWasteController.dataModel}" |
| | | var="row" |
| | | rowKey="#{row.id}" |
| | | emptyMessage="无数据" |
| | | rows="20" |
| | | selectionMode="single" |
| | | pageLinks="5"> |
| | | <p:column headerText="酸"> |
| | | <h:outputText value="#{row.acid}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="碱"> |
| | | <h:outputText value="#{row.alkali}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="有机"> |
| | | <h:outputText value="#{row.organic}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="固废"> |
| | | <h:outputText value="#{row.solid}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="医疗"> |
| | | <h:outputText value="#{row.medical}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="课题组"> |
| | | <h:outputText value="#{row.project}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="部门"> |
| | | <h:outputText value="#{row.department}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="单位"> |
| | | <h:outputText value="#{row.unit}"/> |
| | | </p:column> |
| | | |
| | | </p:dataTable> |
| | | </p:tab> |
| | | |
| | | </p:tabView> |
| | |
| | | <h:outputText value="#{row.seeFlag!=null?row.seeFlag.text:''}"></h:outputText> |
| | | </p:column> |
| | | |
| | | <p:column headerText="危废人员"> |
| | | <h:outputText value="#{row.waster!=null?row.waster.text:''}"></h:outputText> |
| | | </p:column> |
| | | |
| | | <p:column headerText="更新时间"> |
| | | <h:outputText value="#{row.updateTime!=null?row.updateTime:''}"> |
| | | <f:convertDateTime pattern="yyyy-M-d HH:mm" /></h:outputText> |
| | |
| | | <p:inputTextarea autoResize="false" style="height: 80px" |
| | | value="#{userMngController.sysUser.memo}" |
| | | maxlength="200"></p:inputTextarea> |
| | | |
| | | <p:outputLabel value="危废角色"></p:outputLabel> |
| | | <p:selectOneMenu value="#{userMngController.sysUser.waster}" |
| | | required="true" requiredMessage="请选择危废角色"> |
| | | <f:converter converterId="wasterConvert"></f:converter> |
| | | <f:selectItems value="#{userMngController.wasterSelectList}" |
| | | var="item" itemLabel="#{item.text}" itemValue="#{item}"></f:selectItems> |
| | | </p:selectOneMenu> |
| | | </p:panelGrid> |
| | | <p:panel styleClass="btn"> |
| | | <p:commandButton value="保存" actionListener="#{userMngController.onSaveBtnClick}" |