Merge remote-tracking branch 'origin/master' into master
| | |
| | | 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; |
| | | @Resource |
| | | private OpeLaboratoryReserveService opeLaboratoryReserveService; |
| | | @Resource |
| | | private OpeUseFlowService opeUseFlowService; |
| | | @Value("${institute.url}") |
| | | String instituteUrl; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * @Description: 试剂转移到另一个柜子 |
| | | * ope_reagent_status 根据reagent_code修改houseid containerid userid updatetime |
| | | * OpeLaboratoryReserve 根据ope_reagent_status信息查出旧数据删除 再插入新数据 |
| | | * OpeUseFlow 插入试剂流向追踪表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("reagentTransfer") |
| | | public Object reagentTransfer(@RequestBody ReagentReceivingDto reagentReceiving) { |
| | | try { |
| | | if (reagentReceiving.getReagentCode() == null || reagentReceiving.getReagentCode().size() == 0) { |
| | | return ResponseModel.getErrInstance("请选择申领试剂"); |
| | | } |
| | | if (StringUtils.isBlank(reagentReceiving.getApplyUserId())|| StringUtils.isBlank(reagentReceiving.getLabContainerId()) |
| | | || StringUtils.isBlank(reagentReceiving.getLabId())){ |
| | | FacesUtils.warn("请选择申领人、实验室、货柜"); |
| | | } |
| | | for (String reagentCode : reagentReceiving.getReagentCode()) { |
| | | OpeReagentStatus opeReagentStatus = opeReagentStatusService |
| | | .getOpeReagentStatusByReagentCode(reagentCode); |
| | | if (opeReagentStatus == null){ |
| | | return ResponseModel.getErrInstance(reagentCode+",该试剂在库存中不存在"); |
| | | } |
| | | } |
| | | for (String reagentCode : reagentReceiving.getReagentCode()) { |
| | | OpeReagentStatus opeReagentStatus = opeReagentStatusService |
| | | .getOpeReagentStatusByReagentCode(reagentCode); |
| | | opeLaboratoryReserveService.updateByReagent(opeReagentStatus.getReagentId(), opeReagentStatus.getHouseId(), |
| | | opeReagentStatus.getContainerId(), opeReagentStatus.getUserId()); |
| | | OpeLaboratoryReserve lr = new OpeLaboratoryReserve(); |
| | | lr.setReagentId(opeReagentStatus.getReagentId()); |
| | | lr.setHouseId(reagentReceiving.getLabId()); |
| | | lr.setContainerId(reagentReceiving.getLabContainerId()); |
| | | lr.setReserve(1); |
| | | lr.setUserId(reagentReceiving.getApplyUserId()); |
| | | lr.setValidFlag(ValidFlag.VALID); |
| | | opeLaboratoryReserveService.insert(lr); |
| | | |
| | | opeReagentStatus.setStatus(ArrivalStatus.NOREGISTER); |
| | | opeReagentStatus.setUserId(reagentReceiving.getApplyUserId()); |
| | | opeReagentStatus.setHouseId(reagentReceiving.getLabId()); |
| | | opeReagentStatus.setContainerId(reagentReceiving.getLabContainerId()); |
| | | opeReagentStatusService.updateOpeReagentStatus(opeReagentStatus);//更新试剂状态表 |
| | | |
| | | OpeUseFlow opeUseFlowExist = opeUseFlowService.getOpeUseFlowByCode(opeReagentStatus.getReagentCode()); |
| | | OpeUseFlow opeUseFlow = new OpeUseFlow(); |
| | | opeUseFlow.setReagentCode(opeReagentStatus.getReagentCode()); |
| | | opeUseFlow.setStatus(opeReagentStatus.getStatus()); |
| | | opeUseFlow.setHouseId(opeReagentStatus.getHouseId()); |
| | | opeUseFlow.setContainerId(opeReagentStatus.getContainerId()); |
| | | opeUseFlow.setUserId(opeReagentStatus.getUserId()); |
| | | opeUseFlow.setPlace(opeReagentStatus.getPlace()); |
| | | opeUseFlow.setStoreType(StoreType.DIRECTSTORE); |
| | | opeUseFlow.setRemainder(opeUseFlowExist.getRemainder()); |
| | | BaseMeta baseMeta = baseMetaService.getBaseMeta("operate_status",String.valueOf(OperateStatus.TRANSFER.getKey()),"转移"); |
| | | opeUseFlow.setOperateState(baseMeta.getId()); |
| | | opeUseFlowService.insertOpeUseFlow(opeUseFlow); |
| | | } |
| | | return ResponseModel.getOkInstence("转移成功"); |
| | | } catch (Exception e) { |
| | | logger.error(e.getMessage(), e); |
| | | return ResponseModel.getErrInstance("操作失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @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,null); |
| | | 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.getCreator())){ |
| | | return ResponseModel.getErrInstance("部门、课题组、确认者、创建者、不能为空"); |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | hazardousWaste.setTid(sdf.format(new Date())); |
| | | hazardousWaste.setCreateTime(new Date()); |
| | | hazardousWaste.setStatus("待确认"); |
| | | HazardousWasteUser sysUser = sysUserService.getUserByAccount(null,hazardousWaste.getApplyPerson()); |
| | | hazardousWaste.setUnit(sysUser.getCompany()); |
| | | 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; |
| | | } |
| | | } |
| | |
| | | private String cas; |
| | | private List<SysSupplier> supplierSelectList; |
| | | private List<Type> typeList; |
| | | private String productSn; |
| | | |
| | | public List<Type> getTypeList() { |
| | | if (this.typeList == null) { |
| | |
| | | public List<SysReagent> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { |
| | | List<SysReagent> list = null; |
| | | try { |
| | | int count = sysReagentService.getSysReagentTotalCountNew(name, cas, supplierId,getType()); |
| | | int count = sysReagentService.getSysReagentTotalCountNew(name, cas, supplierId,getType(),productSn); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = sysReagentService.getSysReagentListNew(name, cas, supplierId,getType(), first, pageSize); |
| | | list = sysReagentService.getSysReagentListNew(name, cas, supplierId,getType(), first, pageSize,productSn); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | |
| | | public void setDangerousFlagSelectList(List<DangerousFlag> dangerousFlagSelectList) { |
| | | this.dangerousFlagSelectList = dangerousFlagSelectList; |
| | | } |
| | | |
| | | public String getProductSn() { |
| | | return productSn; |
| | | } |
| | | |
| | | public void setProductSn(String productSn) { |
| | | this.productSn = productSn; |
| | | } |
| | | } |
| | |
| | | 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.SysProjectService; |
| | |
| | | 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; |
| | | } |
| | |
| | | import com.nanometer.smartlab.dao.OpeWarehouseReserveDao; |
| | | import com.nanometer.smartlab.entity.*; |
| | | import com.nanometer.smartlab.entity.dto.ApplyListDto; |
| | | import com.nanometer.smartlab.entity.enumtype.ApplyStatusVo; |
| | | import com.nanometer.smartlab.entity.enumtype.ArrivalStatus; |
| | | import com.nanometer.smartlab.entity.enumtype.SeeFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | |
| | | private OpeApply reagentDStore; |
| | | private String applyNewReagentName; |
| | | private String applyNewCas; |
| | | private String productSn; |
| | | private String applyCode; |
| | | private Integer status; |
| | | private List<ApplyStatusVo> statusSelectList; |
| | | |
| | | private List<SysWarehouse> warehouseList; |
| | | private List<SysWarehouseContainer> warehouseContainerList; |
| | |
| | | Map<String, Object> filters) { |
| | | List<OpeWarehouseReserve> list = null; |
| | | try { |
| | | int count = opeWarehouseReserveService.getOpeWarehouseReserveTotalCountByName(reagentId, supplierId); |
| | | int count = opeWarehouseReserveService.getOpeWarehouseReserveTotalCountByName(reagentId, supplierId,productSn); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeWarehouseReserveService.getOpeWarehouseReserveListByName(reagentId, supplierId, first, |
| | | pageSize); |
| | | pageSize,productSn); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | |
| | | } |
| | | |
| | | try { |
| | | |
| | | int count = opeApplyService.getOpeApplyReserveTotalCountByNameFor(id,reagentId, userName); |
| | | int count = opeApplyService.getOpeApplyReserveTotalCountByNameFor(id,reagentId, userName,productSn,applyCode,status); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeApplyService.getOpeApplyReserveListByNameFor(id,reagentId, userName, first, |
| | | pageSize); |
| | | pageSize,productSn,applyCode,status); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | |
| | | } |
| | | return reagentStatusDataModel; |
| | | } |
| | | |
| | | public void onExportFileBtnClickOrder(){ |
| | | ServletOutputStream out = null; |
| | | InputStream is = null; |
| | | try { |
| | | FacesContext ctx = FacesContext.getCurrentInstance(); |
| | | ctx.responseComplete(); |
| | | String contentType = "application/x-download"; |
| | | HttpServletResponse response = (HttpServletResponse) ctx |
| | | .getExternalContext().getResponse(); |
| | | response.setContentType(contentType); |
| | | StringBuffer contentDisposition = new StringBuffer(); |
| | | contentDisposition.append("attachment;"); |
| | | contentDisposition.append("filename=\""); |
| | | contentDisposition.append("订单领取导出.xls"); |
| | | contentDisposition.append("\""); |
| | | response.setHeader( |
| | | "Content-Disposition", |
| | | new String(contentDisposition.toString().getBytes( |
| | | System.getProperty("file.encoding")), "ISO8859-1")); |
| | | out = response.getOutputStream(); |
| | | Map<String, Integer> tempMap = new HashMap<String,Integer>(); |
| | | List<OpeApplyReserve> realDataList = new ArrayList<>(); |
| | | //map=null; |
| | | SysUser loginUser = getUser(); |
| | | String id=""; |
| | | if(loginUser.getSeeFlag()==SeeFlag.MANAGE){ |
| | | |
| | | }else { |
| | | //userName=loginUser.getName(); |
| | | id=loginUser.getId(); |
| | | } |
| | | if(selectedListForPerson!=null&&selectedListForPerson.size()>0){ |
| | | realDataList=selectedListForPerson; |
| | | }else { |
| | | realDataList = opeApplyService.getOpeApplyReserveListByNameFor(id,reagentId, userName, null, |
| | | null,productSn,applyCode,status); |
| | | } |
| | | List<String> headerList = new ArrayList<>(); |
| | | headerList.add("申购编号"); |
| | | headerList.add("产品编号"); |
| | | headerList.add("试剂名称"); |
| | | headerList.add("管制品"); |
| | | headerList.add("规格型号"); |
| | | headerList.add("包装"); |
| | | headerList.add("价格"); |
| | | headerList.add("CAS"); |
| | | headerList.add("危险性质"); |
| | | headerList.add("厂家"); |
| | | headerList.add("申请数量"); |
| | | headerList.add("已领用数量"); |
| | | headerList.add("申领人"); |
| | | headerList.add("订单状态"); |
| | | headerList.add("课题组"); |
| | | headerList.add("课题组负责人"); |
| | | HSSFWorkbook hssfWorkbook =exportExcelOrder(headerList, realDataList); |
| | | hssfWorkbook.write(out); |
| | | out.flush(); |
| | | ctx.responseComplete(); |
| | | |
| | | }catch (Exception e) { |
| | | if(is!=null){ |
| | | try { |
| | | is.close(); |
| | | } catch (IOException e1) { |
| | | e1.printStackTrace(); |
| | | } |
| | | } |
| | | if(out!=null){ |
| | | try { |
| | | out.close(); |
| | | } catch (IOException e1) { |
| | | e1.printStackTrace(); |
| | | } |
| | | } |
| | | e.printStackTrace(); |
| | | }finally { |
| | | if (is != null) { |
| | | try { |
| | | is.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | if (out != null) { |
| | | try { |
| | | out.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public HSSFWorkbook exportExcelOrder(List<String> headerList, List<OpeApplyReserve> dataList){ |
| | | HSSFWorkbook hssfWorkbook = new HSSFWorkbook(); |
| | | Integer total = null; |
| | | HSSFSheet sheet = hssfWorkbook.createSheet("订单领取导出"); |
| | | HSSFRow titlerRow = sheet.createRow(0); |
| | | for(int i = 0; i < headerList.size(); i++) { |
| | | titlerRow.createCell(i).setCellValue(headerList.get(i)); |
| | | } |
| | | for (int i = 0; i < dataList.size(); i++) { |
| | | HSSFRow dataRow = sheet.createRow(i + 1); |
| | | dataRow.createCell(0).setCellValue(dataList.get(i).getApplyCode()== null ? "": String.valueOf(dataList.get(i).getApplyCode())); |
| | | dataRow.createCell(1).setCellValue(dataList.get(i).getReagent().getProductSn()== null ? "": String.valueOf(dataList.get(i).getReagent().getProductSn())); |
| | | dataRow.createCell(2).setCellValue(dataList.get(i).getReagent().getName()== null ? "": String.valueOf(dataList.get(i).getReagent().getName())); |
| | | dataRow.createCell(3).setCellValue(dataList.get(i).getReagent().getControlProducts()== null ? "": String.valueOf(dataList.get(i).getReagent().getControlProducts())); |
| | | dataRow.createCell(4).setCellValue(dataList.get(i).getReagent().getReagentFormat()== null ? "": String.valueOf(dataList.get(i).getReagent().getReagentFormat())); |
| | | dataRow.createCell(5).setCellValue(dataList.get(i).getReagent().getMainMetering()== null ? "": String.valueOf(dataList.get(i).getReagent().getMainMetering())); |
| | | dataRow.createCell(6).setCellValue(dataList.get(i).getReagent().getPrice()== null ? "": String.valueOf(dataList.get(i).getReagent().getPrice())); |
| | | dataRow.createCell(7).setCellValue(dataList.get(i).getReagent().getCas()== null ? "": String.valueOf(dataList.get(i).getReagent().getCas())); |
| | | dataRow.createCell(8).setCellValue(dataList.get(i).getReagent().getReagentCharacter()== null ? "": String.valueOf(dataList.get(i).getReagent().getReagentCharacter())); |
| | | dataRow.createCell(9).setCellValue(dataList.get(i).getReagent().getProductHomeName()== null ? "": String.valueOf(dataList.get(i).getReagent().getProductHomeName())); |
| | | dataRow.createCell(10).setCellValue(dataList.get(i).getNum()== null ? "": String.valueOf(dataList.get(i).getNum())); |
| | | dataRow.createCell(11).setCellValue(dataList.get(i).getUsed()== null ? "": String.valueOf(dataList.get(i).getUsed())); |
| | | dataRow.createCell(12).setCellValue(dataList.get(i).getApplyUserId()== null ? "": String.valueOf(dataList.get(i).getApplyUserId())); |
| | | dataRow.createCell(13).setCellValue(dataList.get(i).getStatus()== null ? "": String.valueOf(dataList.get(i).getStatus().getText())); |
| | | dataRow.createCell(14).setCellValue(dataList.get(i).getProject()== null ? "": String.valueOf(dataList.get(i).getProject())); |
| | | dataRow.createCell(15).setCellValue(dataList.get(i).getProjectManage()== null ? "": String.valueOf(dataList.get(i).getProjectManage())); |
| | | } |
| | | return hssfWorkbook; |
| | | } |
| | | |
| | | public void onExportFileBtnClickNew(){ |
| | | ServletOutputStream out = null; |
| | | InputStream is = null; |
| | |
| | | realDataList=selectedList; |
| | | }else { |
| | | realDataList = opeWarehouseReserveService.getOpeWarehouseReserveListByName(reagentId, supplierId, null, |
| | | null); |
| | | null,productSn); |
| | | } |
| | | List<String> headerList = new ArrayList<>(); |
| | | headerList.add("试剂名称"); |
| | | headerList.add("产品编号"); |
| | | headerList.add("cas"); |
| | | headerList.add("厂家"); |
| | | headerList.add("供应商"); |
| | |
| | | |
| | | public HSSFWorkbook exportExcelNew(List<String> headerList, List<OpeWarehouseReserve> dataList) { |
| | | HSSFWorkbook hssfWorkbook = new HSSFWorkbook(); |
| | | |
| | | |
| | | Integer total = null; |
| | | HSSFSheet sheet = hssfWorkbook.createSheet("仓库库存"); |
| | | HSSFRow titlerRow = sheet.createRow(0); |
| | |
| | | for (int i = 0; i < dataList.size(); i++) { |
| | | HSSFRow dataRow = sheet.createRow(i + 1); |
| | | dataRow.createCell(0).setCellValue(dataList.get(i).getReagent().getName()== null ? "": String.valueOf(dataList.get(i).getReagent().getName())); |
| | | dataRow.createCell(1).setCellValue(dataList.get(i).getReagent().getCas()== null ? "": String.valueOf(dataList.get(i).getReagent().getCas())); |
| | | dataRow.createCell(2).setCellValue(dataList.get(i).getReagent().getProductHomeName()== null ? "": String.valueOf(dataList.get(i).getReagent().getProductHomeName())); |
| | | dataRow.createCell(3).setCellValue(dataList.get(i).getReagent().getSupplierName()== null ? "": String.valueOf(dataList.get(i).getReagent().getSupplierName())); |
| | | dataRow.createCell(4).setCellValue(dataList.get(i).getReagent().getReagentFormat()== null ? "": String.valueOf(baseMetaService.getBaseMetaValue(dataList.get(i).getReagent().getReagentFormat()))); |
| | | dataRow.createCell(5).setCellValue(dataList.get(i).getReagent().getMainMetering()== null ? "": String.valueOf(dataList.get(i).getReagent().getMainMetering())+baseMetaService.getBaseMetaValue(dataList.get(i).getReagent().getReagentUnit())); |
| | | dataRow.createCell(6).setCellValue(dataList.get(i).getReagent().getPrice()== null ? "": String.valueOf(dataList.get(i).getReagent().getPrice())); |
| | | dataRow.createCell(7).setCellValue(dataList.get(i).getArticleNumber()== null ? "": String.valueOf(dataList.get(i).getArticleNumber())); |
| | | dataRow.createCell(8).setCellValue(dataList.get(i).getReserve()== null ? "": String.valueOf(dataList.get(i).getReserve())); |
| | | dataRow.createCell(9).setCellValue(dataList.get(i).getWarehouseName()== null ? "": String.valueOf(dataList.get(i).getWarehouseName())); |
| | | dataRow.createCell(1).setCellValue(dataList.get(i).getReagent().getProductSn()== null ? "": String.valueOf(dataList.get(i).getReagent().getProductSn())); |
| | | dataRow.createCell(2).setCellValue(dataList.get(i).getReagent().getCas()== null ? "": String.valueOf(dataList.get(i).getReagent().getCas())); |
| | | dataRow.createCell(3).setCellValue(dataList.get(i).getReagent().getProductHomeName()== null ? "": String.valueOf(dataList.get(i).getReagent().getProductHomeName())); |
| | | dataRow.createCell(4).setCellValue(dataList.get(i).getReagent().getSupplierName()== null ? "": String.valueOf(dataList.get(i).getReagent().getSupplierName())); |
| | | dataRow.createCell(5).setCellValue(dataList.get(i).getReagent().getReagentFormat()== null ? "": String.valueOf(baseMetaService.getBaseMetaValue(dataList.get(i).getReagent().getReagentFormat()))); |
| | | dataRow.createCell(6).setCellValue(dataList.get(i).getReagent().getMainMetering()== null ? "": String.valueOf(dataList.get(i).getReagent().getMainMetering())+baseMetaService.getBaseMetaValue(dataList.get(i).getReagent().getReagentUnit())); |
| | | dataRow.createCell(7).setCellValue(dataList.get(i).getReagent().getPrice()== null ? "": String.valueOf(dataList.get(i).getReagent().getPrice())); |
| | | dataRow.createCell(8).setCellValue(dataList.get(i).getArticleNumber()== null ? "": String.valueOf(dataList.get(i).getArticleNumber())); |
| | | dataRow.createCell(9).setCellValue(dataList.get(i).getReserve()== null ? "": String.valueOf(dataList.get(i).getReserve())); |
| | | dataRow.createCell(10).setCellValue(dataList.get(i).getWarehouseName()== null ? "": String.valueOf(dataList.get(i).getWarehouseName())); |
| | | |
| | | } |
| | | return hssfWorkbook; |
| | |
| | | public List<SysReagent> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { |
| | | List<SysReagent> list = null; |
| | | try { |
| | | int count = sysReagentService.getSysReagentTotalCountNew(applyNewReagentName, applyNewCas, null,null); |
| | | int count = sysReagentService.getSysReagentTotalCountNew(applyNewReagentName, applyNewCas, null,null,productSn); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = sysReagentService.getSysReagentListNew(applyNewReagentName, applyNewCas, null,null, first, pageSize); |
| | | list = sysReagentService.getSysReagentListNew(applyNewReagentName, applyNewCas, null,null, first, pageSize,productSn); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | |
| | | public void setTabValue(Integer tabValue) { |
| | | this.tabValue = tabValue; |
| | | } |
| | | |
| | | public void setProductSn(String productSn) { |
| | | this.productSn = productSn; |
| | | } |
| | | |
| | | public String getProductSn() { |
| | | return productSn; |
| | | } |
| | | |
| | | public String getApplyCode() { |
| | | return applyCode; |
| | | } |
| | | |
| | | public void setApplyCode(String applyCode) { |
| | | this.applyCode = applyCode; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public List<ApplyStatusVo> getStatusSelectList() { |
| | | if (this.statusSelectList == null) { |
| | | this.statusSelectList = Arrays.asList(ApplyStatusVo.values()); |
| | | } |
| | | return statusSelectList; |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | 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> |
| | |
| | | <result property="used" column="used"></result> |
| | | <result property="status" column="status" typeHandler="com.nanometer.smartlab.entity.handler.ApplyStatusHandler"></result> |
| | | <result property="applyUserId" column="apply_user_id"></result> |
| | | <result property="projectManage" column="projectManage"/> |
| | | <result property="project" column="project"/> |
| | | <association property="reagent" javaType="com.nanometer.smartlab.entity.SysReagent"> |
| | | <id property="id" column="reagent_id"></id> |
| | | <result property="name" column="reagentName"></result> |
| | |
| | | <if test="status != null and status != ''"> |
| | | and oa.status =#{status} |
| | | </if> |
| | | <if test="productSn != null and productSn != ''"> |
| | | and sr.product_sn like concat('%',#{productSn},'%') |
| | | </if> |
| | | <if test="applyCode != null and applyCode != ''"> |
| | | and oa.apply_code = #{applyCode} |
| | | </if> |
| | | </sql> |
| | | |
| | | <select id="getOpeApplyReserveTotalCount" parameterType="java.util.Map" |
| | |
| | | <select id="getOpeApplyReserveTotalCountFor" parameterType="java.util.Map" |
| | | resultType="int"> |
| | | select count(1) |
| | | from |
| | | (select count(1) |
| | | from ope_apply as oa |
| | | <include refid="getOpeApplyReserveList_queryJoins1" /> |
| | | LEFT JOIN sys_reagent sr ON sr.id = oa.reagent_id |
| | | LEFT JOIN sys_user su ON su.id = oa.apply_user_id |
| | | LEFT JOIN base_meta AS bm2 ON sr.control_products = bm2.id |
| | | LEFT JOIN base_meta AS bm3 ON sr.reagent_format = bm3.id |
| | | LEFT JOIN base_meta AS bm4 ON sr.reagent_character = bm4.id |
| | | LEFT JOIN base_meta AS bm1 ON sr.product_home = bm1.id |
| | | LEFT JOIN sys_project as project on project.project = su.project |
| | | LEFT JOIN sys_user as su1 on su1.id = project.sys_user_id |
| | | where oa.valid_flag = 1 and (oa.status=4 or oa.status=6) |
| | | <include refid="getOpeApplyReserveList_queryWhereSql" /> |
| | | GROUP BY oa.id |
| | | )as oaa |
| | | </select> |
| | | |
| | | <select id="getOpeApplyReserveList" parameterType="java.util.Map" |
| | |
| | | <include refid="getOpeApplyReserveList_queryJoins2" /> |
| | | where oa.valid_flag = 1 |
| | | <include refid="getOpeApplyReserveList_queryWhereSql" /> |
| | | |
| | | GROUP BY oa.id |
| | | order by oa.update_time desc |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | |
| | | |
| | | <select id="getOpeApplyReserveListFor" parameterType="java.util.Map" |
| | | resultMap="OpeApplyReserve"> |
| | | <include refid="getOpeApplyReserveList_queryColumns" /> |
| | | from ope_apply as oa |
| | | <include refid="getOpeApplyReserveList_queryJoins1" /> |
| | | <include refid="getOpeApplyReserveList_queryJoins2" /> |
| | | SELECT |
| | | oa.id, |
| | | oa.apply_code, |
| | | sr.id reagent_id, |
| | | oa. STATUS, |
| | | sr.product_sn reagentProductSn, |
| | | sr.`name` reagentName, |
| | | bm2.meta_value controlProducts, |
| | | bm3.meta_value reagentFormat, |
| | | sr.main_metering reagentMainMetering, |
| | | sr.price reagentPrice, |
| | | sr.cas reagentCas, |
| | | oa.article_number articleNumber, |
| | | bm4.meta_value reagentCharacter, |
| | | bm1.meta_value productHome, |
| | | sr.dangerous_flag, |
| | | oa.num, |
| | | oa.used, |
| | | su.`name` apply_user_id, |
| | | su.project, |
| | | su1.`name` as projectManage |
| | | FROM |
| | | ope_apply AS oa |
| | | LEFT JOIN sys_reagent sr ON sr.id = oa.reagent_id |
| | | LEFT JOIN sys_user su ON su.id = oa.apply_user_id |
| | | LEFT JOIN base_meta AS bm2 ON sr.control_products = bm2.id |
| | | LEFT JOIN base_meta AS bm3 ON sr.reagent_format = bm3.id |
| | | LEFT JOIN base_meta AS bm4 ON sr.reagent_character = bm4.id |
| | | LEFT JOIN base_meta AS bm1 ON sr.product_home = bm1.id |
| | | LEFT JOIN sys_project as project on project.project = su.project |
| | | LEFT JOIN sys_user as su1 on su1.id = project.sys_user_id |
| | | where oa.valid_flag = 1 and (oa.status=4 or oa.status=6) |
| | | <include refid="getOpeApplyReserveList_queryWhereSql" /> |
| | | |
| | | GROUP BY oa.id |
| | | order by oa.update_time desc |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | |
| | | public void insertOpeLaboratoryReserve(OpeLaboratoryReserve opeLaboratoryReserve) throws DataAccessException; |
| | | List<OpeLaboratoryReserve> selectByReId(String id); |
| | | public int updateByReId(Map params); |
| | | void updateByReagent(Map<String, Object> params); |
| | | } |
| | |
| | | <update id="updateByReId" parameterType="java.util.Map"> |
| | | update ope_laboratory_reserve set reagent_id=#{newReId} where reagent_id=#{oldReId} |
| | | </update> |
| | | |
| | | |
| | | <update id="updateByReagent"> |
| | | update ope_laboratory_reserve |
| | | set valid_flag = 0 |
| | | where reagent_id=#{reagentId} |
| | | and house_id = #{houseId} |
| | | and container_id = #{containerId} |
| | | and user_id = #{userId} |
| | | and valid_flag = 1 |
| | | </update> |
| | | </mapper> |
| | |
| | | package com.nanometer.smartlab.dao; |
| | | |
| | | import com.nanometer.smartlab.entity.OpeUseFlow; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.dao.DataAccessException; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | int updateTimeByCode(Map params); |
| | | |
| | | OpeUseFlow getOpeUseFlowByCode(@Param("reagentCode") String reagentCode); |
| | | } |
| | |
| | | where oa.valid_flag = 1 |
| | | <include refid="queryWhereSql"/> |
| | | </select> |
| | | |
| | | <select id="getOpeUseFlowByCode" resultType="com.nanometer.smartlab.entity.OpeUseFlow"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | ope_use_flow |
| | | WHERE |
| | | reagent_code = #{reagentCode} |
| | | ORDER BY create_time DESC |
| | | LIMIT 1 |
| | | </select> |
| | | <insert id="insertOpeUseFlow" parameterType="com.nanometer.smartlab.entity.OpeUseFlow"> |
| | | insert into ope_use_flow(id, reagent_code, status, house_id, container_id, user_id, remainder, place, store_type, valid_flag, create_time, realstatus, operatestate) |
| | | values (#{id}, #{reagentCode}, #{status}, #{houseId}, #{containerId}, #{userId}, #{remainder}, #{place}, #{storeType}, 1, #{createTime}, #{realstatus},#{operateState}) |
| | |
| | | <result property="updateTime" column="update_time"></result> |
| | | <result property="supplierName" column="supplierName"></result> |
| | | <result property="productHome" column="product_home"></result> |
| | | <result property="productHomeName" column="productHomeName"></result> |
| | | <result property="productHomeName" column="productHomeName"></result> |
| | | <result property="productSn" column="product_sn"/> |
| | | </association> |
| | | </resultMap> |
| | | |
| | |
| | | <if test="reagentName != null and reagentName != ''"> |
| | | and sr.name like concat('%',#{reagentName},'%') |
| | | </if> |
| | | <if test="warehouseId != null and warehouseId != ''"> |
| | | and oa.warehouseId=#{warehouseId} |
| | | </if> |
| | | <if test="warehouseId != null and warehouseId != ''"> |
| | | and oa.warehouseId=#{warehouseId} |
| | | </if> |
| | | <if test="productSn != null and productSn != ''"> |
| | | and sr.product_sn like concat('%',#{productSn},'%') |
| | | </if> |
| | | </sql> |
| | | |
| | | <sql id="queryColumns"> |
| | |
| | | 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}, |
| | |
| | | <if test="type != null"> |
| | | and sr.type = #{type} |
| | | </if> |
| | | <if test="productSn != null and productSn != ''"> |
| | | and sr.product_sn like concat("%", #{productSn} ,"%") |
| | | </if> |
| | | ORDER BY sr.create_time desc |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | |
| | | <if test="type != null"> |
| | | and sr.type = #{type} |
| | | </if> |
| | | |
| | | <if test="productSn != null and productSn != ''"> |
| | | and sr.product_sn like concat("%", #{productSn} ,"%") |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getReagentUnitByReagentId" parameterType="java.lang.String" resultType="java.lang.String"> |
| | |
| | | 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 |
| | | ORDER BY su.`name` asc |
| | | </select> |
| | | |
| | | </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 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 |
| | | <if test="account != null and account !=''"> |
| | | AND su.account = #{account} |
| | | </if> |
| | | <if test="name != null and name !=''"> |
| | | AND su.name = #{name} |
| | | </if> |
| | | </where> |
| | | </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; |
| | | } |
| | | } |
| | |
| | | private Integer flag; |
| | | private ApplyStatus status; |
| | | |
| | | private String project; |
| | | private String projectManage; |
| | | |
| | | public ApplyStatus getStatus() { |
| | | return status; |
| | | } |
| | |
| | | public void setSelectNum(Integer selectNum) { |
| | | this.selectNum = selectNum; |
| | | } |
| | | |
| | | public String getProject() { |
| | | return project; |
| | | } |
| | | |
| | | public void setProject(String project) { |
| | | this.project = project; |
| | | } |
| | | |
| | | public String getProjectManage() { |
| | | return projectManage; |
| | | } |
| | | |
| | | public void setProjectManage(String projectManage) { |
| | | this.projectManage = projectManage; |
| | | } |
| | | } |
| | |
| | | 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 ApplyStatusVo { |
| | | STORAGE(4, "已入库"),SUPPLIER_CONFIRM(6,"已确认"); |
| | | private int key; |
| | | |
| | | private String text; |
| | | |
| | | private ApplyStatusVo(int key, String text) { |
| | | this.key = key; |
| | | this.text = text; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | private static HashMap<Integer,ApplyStatusVo> map = new HashMap<Integer,ApplyStatusVo>(); |
| | | static { |
| | | for(ApplyStatusVo d : ApplyStatusVo.values()){ |
| | | map.put(d.key, d); |
| | | } |
| | | } |
| | | |
| | | public static ApplyStatusVo parse(Integer index) { |
| | | if(map.containsKey(index)){ |
| | | return map.get(index); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import java.util.HashMap; |
| | | |
| | | public enum OperateStatus { |
| | | WAREHOUSEIN(10, "仓库入库"), WAREHOUSEOUT(11, "仓库领用"), LABORATORYIN(0, "试剂柜入库"); |
| | | WAREHOUSEIN(10, "仓库入库"), WAREHOUSEOUT(11, "仓库领用"), LABORATORYIN(0, "试剂柜入库"), TRANSFER(6,"转移"); |
| | | private int key; |
| | | |
| | | private String text; |
| | |
| | | map.put(d.key, d); |
| | | } |
| | | } |
| | | |
| | | |
| | | public static OperateStatus parse(Integer index) { |
| | | if(map.containsKey(index)){ |
| | | return map.get(index); |
对比新文件 |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
| | |
| | | int getOpeApplyReserveTotalCountByName(String id,String reagentName, String personName); |
| | | List<OpeApplyReserve> getOpeApplyReserveListByName(String id,String reagentName, String personName, Integer first, |
| | | Integer pageSize); |
| | | int getOpeApplyReserveTotalCountByNameFor(String id,String reagentName, String personName); |
| | | int getOpeApplyReserveTotalCountByNameFor(String id,String reagentName, String personName,String productSn,String applyCode,Integer status); |
| | | List<OpeApplyReserve> getOpeApplyReserveListByNameFor(String id,String reagentName, String personName, Integer first, |
| | | Integer pageSize); |
| | | Integer pageSize,String productSn,String applyCode,Integer status); |
| | | public boolean updaetOpeApplyPrice(BigDecimal applyPrice,String id); |
| | | public boolean updaetOpeApplyStockFlag(int stockFlag,String id); |
| | | public boolean cancelApply(ApplyStatus status,String id); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int getOpeApplyReserveTotalCountByNameFor(String id,String reagentName, String personName) { |
| | | public int getOpeApplyReserveTotalCountByNameFor(String id,String reagentName, String personName,String productSn,String applyCode,Integer status) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("reagentName", reagentName); |
| | | params.put("personName", personName); |
| | | params.put("userId",id); |
| | | params.put("productSn",productSn); |
| | | params.put("applyCode",applyCode); |
| | | params.put("status",status); |
| | | return this.opeApplyDao.getOpeApplyReserveTotalCountFor(params); |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | } |
| | | @Override |
| | | public List<OpeApplyReserve> getOpeApplyReserveListByNameFor(String id,String reagentName, String personName, Integer first, |
| | | Integer pageSize) { |
| | | Integer pageSize,String productSn,String applyCode,Integer status) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("reagentName", reagentName); |
| | |
| | | params.put("userId",id); |
| | | params.put("first", first); |
| | | params.put("pageSize", pageSize); |
| | | params.put("productSn",productSn); |
| | | params.put("applyCode",applyCode); |
| | | params.put("status",status); |
| | | return this.opeApplyDao.getOpeApplyReserveListFor(params); |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | package com.nanometer.smartlab.service; |
| | | |
| | | import com.nanometer.smartlab.entity.OpeLaboratoryReserve; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | void insert(OpeLaboratoryReserve opeLaboratoryReserve); |
| | | |
| | | public List<OpeLaboratoryReserve> selectByReId(String id); |
| | | |
| | | public void updateByReId(String newReId,String oldReId); |
| | | |
| | | void updateByReagent(String reagentId, String houseId, String containerId, String userId); |
| | | } |
| | |
| | | import com.nanometer.smartlab.dao.OpeLaboratoryReserveDao; |
| | | import com.nanometer.smartlab.dao.SysLaboratoryDao; |
| | | import com.nanometer.smartlab.entity.*; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | import com.nanometer.smartlab.exception.AlarmCode; |
| | | import com.nanometer.smartlab.exception.AlarmException; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | |
| | | this.opeLaboratoryReserveDao.updateByReId(params); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByReagent(String reagentId, String houseId, String containerId, String userId) { |
| | | Map<String, Object> params=new HashMap(); |
| | | params.put("reagentId",reagentId); |
| | | params.put("houseId",houseId); |
| | | params.put("containerId",containerId); |
| | | params.put("userId",userId); |
| | | this.opeLaboratoryReserveDao.updateByReagent(params); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | List<String> getReagentCodes(String reagentId); |
| | | |
| | | void updateOpeReagentStatus(OpeReagentStatus opeReagentStatus); |
| | | } |
| | |
| | | return opeReagentStatusDao.selectReagentCodesByReId(reagentId); |
| | | } |
| | | |
| | | @Override |
| | | public void updateOpeReagentStatus(OpeReagentStatus opeReagentStatus) { |
| | | opeReagentStatusDao.updateOpeReagentStatusDao(opeReagentStatus); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | void updateTimeByCode(String code); |
| | | |
| | | OpeUseFlow getOpeUseFlowByCode(String reagentCode); |
| | | } |
| | |
| | | import com.nanometer.smartlab.entity.*; |
| | | import com.nanometer.smartlab.util.Constants; |
| | | import com.nanometer.smartlab.util.Utils; |
| | | import com.sun.org.apache.regexp.internal.RE; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.apache.log4j.Logger; |
| | |
| | | params.put("status",-1); |
| | | opeUseFlowDao.updateTimeByCode(params); |
| | | } |
| | | |
| | | @Override |
| | | public OpeUseFlow getOpeUseFlowByCode(String reagentCode) { |
| | | return opeUseFlowDao.getOpeUseFlowByCode(reagentCode); |
| | | } |
| | | } |
| | |
| | | Integer pageSize); |
| | | int getOpeWarehouseReserveTotalCount(String reagentId, String supplierId); |
| | | List<OpeWarehouseReserve> getOpeWarehouseReserveListByName(String reagentId, String supplierId, Integer first, |
| | | Integer pageSize); |
| | | int getOpeWarehouseReserveTotalCountByName(String reagentId, String supplierId); |
| | | Integer pageSize,String productSn); |
| | | int getOpeWarehouseReserveTotalCountByName(String reagentId, String supplierId,String productSn); |
| | | OpeWarehouseReserve getOpeWarehouseReserve(String reagentId, String articleNumber); |
| | | OpeWarehouseReserve getOpeWarehouseReserve2(String reagentId, String articleNumber,String warehouseId); |
| | | OpeWarehouseReserve getOpeWarehouseReserveBy(String reagentId, String articleNumber); |
| | |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public List<OpeWarehouseReserve> getOpeWarehouseReserveListByName(String reagentId, String supplierId, Integer first, |
| | | Integer pageSize) { |
| | | Integer pageSize,String productSn) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("reagentName", reagentId); |
| | | params.put("supplierId", supplierId); |
| | | params.put("first", first); |
| | | params.put("pageSize", pageSize); |
| | | params.put("productSn", productSn); |
| | | return this.opeWarehouseReserveDao.getOpeWarehouseReserveList(params); |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public int getOpeWarehouseReserveTotalCountByName(String reagentId, String supplierId) { |
| | | public int getOpeWarehouseReserveTotalCountByName(String reagentId, String supplierId,String productSn) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("reagentName", reagentId); |
| | | params.put("supplierId", supplierId); |
| | | params.put("productSn", productSn); |
| | | return this.opeWarehouseReserveDao.getOpeWarehouseReserveTotalCount(params); |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | for (int i = 0; i < len; i++) { |
| | | temp += "0"; |
| | | } |
| | | for (BigInteger i = startReagentCode; i.compareTo(endReagentCode) < 1; i = i.add(BigInteger.ONE)) { |
| | | for (BigInteger i = startReagentCode; i.compareTo(endReagentCode) < 1; i = i.add(BigInteger.ONE)) { |
| | | reagentCode = temp + String.valueOf(i); |
| | | if (this.opeReagentStatusService.isOpeReagentStatusExist(reagentCode)) {//条码存在 |
| | | //throw new BusinessException(ExceptionEnumCode.REAGENT_CODE_EXIST, "入库试剂:" + opeApply.getReagent().getName() + "的试剂条形码[" + reagentCode + "]已存在。"); |
| | |
| | | @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 { |
| | |
| | | public int insertSysReagentList(List<SysReagent> sysReagentList); |
| | | public int insertSysReagentList2(List<SysReagent> sysReagentList); |
| | | |
| | | int getSysReagentTotalCountNew(String name, String cas, String supplierId, Integer type); |
| | | int getSysReagentTotalCountNew(String name, String cas, String supplierId, Integer type,String productSn); |
| | | public List<SysReagent> query(); |
| | | |
| | | Map getReagentDetail(String id); |
| | | |
| | | public List<SysReagent> getSysReagentListNew(String name, String cas, String supplierId, Integer type, Integer first, Integer pageSize); |
| | | public List<SysReagent> getSysReagentListNew(String name, String cas, String supplierId, Integer type, Integer first, Integer pageSize,String productSn); |
| | | |
| | | int favorCount(SysUser user, String name, String cas, String supplierId, String productSn,Integer favorFlag); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public List<SysReagent> getSysReagentListNew(String name, String cas, String supplierId,Integer type, Integer first, Integer pageSize) { |
| | | public List<SysReagent> getSysReagentListNew(String name, String cas, String supplierId,Integer type, Integer first, Integer pageSize,String productSn) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("name", name); |
| | |
| | | params.put("type", type); |
| | | params.put("first", first); |
| | | params.put("pageSize", pageSize); |
| | | params.put("productSn", productSn); |
| | | return this.sysReagentDao.getSysReagentListNew(params); |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | } |
| | | |
| | | |
| | | public int getSysReagentTotalCountNew(String name, String cas, String supplierId,Integer type) { |
| | | public int getSysReagentTotalCountNew(String name, String cas, String supplierId,Integer type,String productSn) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("name", name); |
| | | params.put("cas", cas); |
| | | params.put("type", type); |
| | | params.put("supplierId", supplierId); |
| | | params.put("productSn", productSn); |
| | | return this.sysReagentDao.getSysReagentTotalCountNew(params); |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | |
| | | 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,String name); |
| | | |
| | | 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,String name) { |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("account", account); |
| | | params.put("name", name); |
| | | return sysUserDao.getUserByAccount(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<LaboratoryVo.LaboratoryUser> getUserByProject(String project) { |
| | | return sysUserDao.getUserByProject(project); |
| | | } |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | /* |
| | | * Licensed to the Apache Software Foundation (ASF) under one |
| | | * or more contributor license agreements. See the NOTICE file |
| | | * distributed with this work for additional information |
| | | * regarding copyright ownership. The ASF licenses this file |
| | | * to you under the Apache License, Version 2.0 (the |
| | | * "License"); you may not use this file except in compliance |
| | | * with the License. You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, |
| | | * software distributed under the License is distributed on an |
| | | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | * KIND, either express or implied. See the License for the |
| | | * specific language governing permissions and limitations |
| | | * under the License. |
| | | */ |
| | | |
| | | package org.apache.shiro.web.filter; |
| | | |
| | | import org.apache.shiro.web.util.WebUtils; |
| | | |
| | | import javax.servlet.ServletRequest; |
| | | import javax.servlet.ServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * A request filter that blocks malicious requests. Invalid request will respond with a 400 response code. |
| | | * |
| | | |
| | | |
| | | * This filter checks and blocks the request if the following characters are found in the request URI: |
| | | * |
| | | |
| | | |
| | | * |
| | | Semicolon - can be disabled by setting {@code blockSemicolon = false} |
| | | |
| | | * |
| | | Backslash - can be disabled by setting {@code blockBackslash = false} |
| | | |
| | | * |
| | | Non-ASCII characters - can be disabled by setting {@code blockNonAscii = false}, the ability to disable this check will be removed in future version. |
| | | |
| | | * |
| | | |
| | | |
| | | * |
| | | * @see class was inspired by Spring Security StrictHttpFirewall |
| | | * @since 1.6 |
| | | */ |
| | | public class InvalidRequestFilter extends AccessControlFilter { |
| | | |
| | | private static final List<String> SEMICOLON = Collections.unmodifiableList(Arrays.asList(";", "%3b", "%3B")); |
| | | |
| | | private static final List<String> BACKSLASH = Collections.unmodifiableList(Arrays.asList("\\", "%5c", "%5C")); |
| | | |
| | | private boolean blockSemicolon = true; |
| | | |
| | | private boolean blockBackslash = true; |
| | | |
| | | private boolean blockNonAscii = true; |
| | | |
| | | @Override |
| | | protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception { |
| | | String uri = WebUtils.toHttp(request).getRequestURI(); |
| | | return !containsSemicolon(request,uri) |
| | | && !containsBackslash(uri) |
| | | && !containsNonAsciiCharacters(uri); |
| | | } |
| | | |
| | | @Override |
| | | protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { |
| | | String uri = WebUtils.toHttp(request).getRequestURI(); |
| | | WebUtils.toHttp(response).sendError(400, "Invalid request"); |
| | | return false; |
| | | } |
| | | |
| | | private String ctx=null; |
| | | private boolean containsSemicolon(ServletRequest request,String uri) { |
| | | if (isBlockSemicolon()) { |
| | | if(ctx == null) { |
| | | ctx = WebUtils.toHttp(request).getContextPath(); |
| | | } |
| | | // 登录url拼接的jsessionId进行放行 |
| | | if(uri.startsWith(ctx + this.getLoginUrl() + ";jsessionid=") || |
| | | uri.startsWith(ctx + this.getLoginUrl() + "%3bjsessionid=") || |
| | | uri.startsWith(ctx + this.getLoginUrl() + "%3Bjsessionid=") || |
| | | uri.startsWith(ctx + "/javax.faces.resource/mybootstrap.css.xhtml;jsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/mybootstrap.css.xhtml%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/mybootstrap.css.xhtml%3Bjsessionid=")|| |
| | | |
| | | uri.startsWith(ctx + "/javax.faces.resource/default.css.xhtml;jsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/default.css.xhtml%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/default.css.xhtml%3Bjsessionid=")|| |
| | | |
| | | uri.startsWith(ctx + "/javax.faces.resource/components.css.xhtml;jsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/components.css.xhtml%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/components.css.xhtml%3Bjsessionid=")|| |
| | | |
| | | uri.startsWith(ctx + "/javax.faces.resource/jquery/jquery-plugins.js.xhtml;jsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/jquery/jquery-plugins.js.xhtml%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/jquery/jquery-plugins.js.xhtml%3Bjsessionid=")|| |
| | | |
| | | uri.startsWith(ctx + "/javax.faces.resource/jquery/jquery.js.xhtml;jsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/jquery/jquery.js.xhtml%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/jquery/jquery.js.xhtml%3Bjsessionid=")|| |
| | | |
| | | uri.startsWith(ctx + "/javax.faces.resource/core.js.xhtml;jsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/core.js.xhtml%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/core.js.xhtml%3Bjsessionid=")|| |
| | | |
| | | uri.startsWith(ctx + "/javax.faces.resource/extra.js.xhtml;jsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/extra.js.xhtml%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/extra.js.xhtml%3Bjsessionid=")|| |
| | | |
| | | uri.startsWith(ctx + "/resources/images/logo1.png;jsessionid=")|| |
| | | uri.startsWith(ctx + "/resources/images/logo1.png%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/resources/images/logo1.png%3Bjsessionid=")|| |
| | | |
| | | uri.startsWith(ctx + "/javax.faces.resource/components.js.xhtml;jsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/components.js.xhtml%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/javax.faces.resource/components.js.xhtml%3Bjsessionid=")|| |
| | | |
| | | uri.startsWith(ctx + "/resources/images/logo.png;jsessionid=")|| |
| | | uri.startsWith(ctx + "/resources/images/logo.png%3bjsessionid=")|| |
| | | uri.startsWith(ctx + "/resources/images/logo.png%3Bjsessionid=")) { |
| | | return false; |
| | | } |
| | | return SEMICOLON.stream().anyMatch(uri::contains); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private boolean containsBackslash(String uri) { |
| | | if (isBlockBackslash()) { |
| | | return BACKSLASH.stream().anyMatch(uri::contains); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private boolean containsNonAsciiCharacters(String uri) { |
| | | if (isBlockNonAscii()) { |
| | | return !containsOnlyPrintableAsciiCharacters(uri); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private static boolean containsOnlyPrintableAsciiCharacters(String uri) { |
| | | int length = uri.length(); |
| | | for (int i = 0; i < length; i++) { |
| | | char c = uri.charAt(i); |
| | | if (c < '\u0020' || c > '\u007e') { |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public boolean isBlockSemicolon() { |
| | | return blockSemicolon; |
| | | } |
| | | |
| | | public void setBlockSemicolon(boolean blockSemicolon) { |
| | | this.blockSemicolon = blockSemicolon; |
| | | } |
| | | |
| | | public boolean isBlockBackslash() { |
| | | return blockBackslash; |
| | | } |
| | | |
| | | public void setBlockBackslash(boolean blockBackslash) { |
| | | this.blockBackslash = blockBackslash; |
| | | } |
| | | |
| | | public boolean isBlockNonAscii() { |
| | | return blockNonAscii; |
| | | } |
| | | |
| | | public void setBlockNonAscii(boolean blockNonAscii) { |
| | | this.blockNonAscii = blockNonAscii; |
| | | } |
| | | } |
| | |
| | | <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> |
| | | |
| | | |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ehcache updateCheck="false" dynamicConfig="false"> |
| | | <diskStore path="java.io.tmpdir"/> |
| | | |
| | | <cache name="authorizationCache" |
| | | maxEntriesLocalHeap="2000" |
| | | eternal="false" |
| | | timeToIdleSeconds="43200" |
| | | timeToLiveSeconds="43200" |
| | | overflowToDisk="false" |
| | | statistics="true"> |
| | | </cache> |
| | | |
| | | <cache name="authenticationCache" |
| | | maxEntriesLocalHeap="2000" |
| | | eternal="false" |
| | | timeToIdleSeconds="43200" |
| | | timeToLiveSeconds="43200" |
| | | overflowToDisk="false" |
| | | statistics="true"> |
| | | </cache> |
| | | |
| | | <cache name="activeSessionCache" |
| | | maxEntriesLocalHeap="2000" |
| | | eternal="false" |
| | | timeToIdleSeconds="43200" |
| | | timeToLiveSeconds="43200" |
| | | overflowToDisk="false" |
| | | statistics="true"> |
| | | </cache> |
| | | |
| | | <!-- 缓存5min --> |
| | | <cache name="fivMin" |
| | | maxElementsInMemory="10000" |
| | | maxElementsOnDisk="100000" |
| | | eternal="false" |
| | | timeToIdleSeconds="300" |
| | | timeToLiveSeconds="300" |
| | | overflowToDisk="false" |
| | | diskPersistent="false" /> |
| | | |
| | | <!-- 缓存半小时 --> |
| | | <cache name="halfHour" |
| | | maxElementsInMemory="10000" |
| | | maxElementsOnDisk="100000" |
| | | eternal="false" |
| | | timeToIdleSeconds="1800" |
| | | timeToLiveSeconds="1800" |
| | | overflowToDisk="false" |
| | | diskPersistent="false" /> |
| | | |
| | | <!-- 缓存一小时 --> |
| | | <cache name="hour" |
| | | maxElementsInMemory="10000" |
| | | maxElementsOnDisk="100000" |
| | | eternal="false" |
| | | timeToIdleSeconds="3600" |
| | | timeToLiveSeconds="3600" |
| | | overflowToDisk="false" |
| | | diskPersistent="false" /> |
| | | |
| | | <!-- 缓存一天 --> |
| | | <cache name="oneDay" |
| | | maxElementsInMemory="10000" |
| | | maxElementsOnDisk="100000" |
| | | eternal="false" |
| | | timeToIdleSeconds="43200" |
| | | timeToLiveSeconds="43200" |
| | | overflowToDisk="false" |
| | | diskPersistent="false" /> |
| | | |
| | | <!-- |
| | | name:缓存名称。 |
| | | maxElementsInMemory:缓存最大个数。 |
| | | eternal:对象是否永久有效,一但设置了,timeout将不起作用。 |
| | | timeToIdleSeconds:设置对象在失效前的允许闲置时间(单位:秒)。仅当eternal=false对象不是永久有效时使用,可选属性,默认值是0,也就是可闲置时间无穷大。 |
| | | timeToLiveSeconds:设置对象在失效前允许存活时间(单位:秒)。最大时间介于创建时间和失效时间之间。仅当eternal=false对象不是永久有效时使用,默认是0.,也就是对象存活时间无穷大。 |
| | | overflowToDisk:当内存中对象数量达到maxElementsInMemory时,Ehcache将会对象写到磁盘中。 |
| | | diskSpoolBufferSizeMB:这个参数设置DiskStore(磁盘缓存)的缓存区大小。默认是30MB。每个Cache都应该有自己的一个缓冲区。 |
| | | maxElementsOnDisk:硬盘最大缓存个数。 |
| | | diskPersistent:是否缓存虚拟机重启期数据 Whether the disk store persists between restarts of the Virtual Machine. The default value is false. |
| | | diskExpiryThreadIntervalSeconds:磁盘失效线程运行时间间隔,默认是120秒。 |
| | | memoryStoreEvictionPolicy:当达到maxElementsInMemory限制时,Ehcache将会根据指定的策略去清理内存。默认策略是LRU(最近最少使用)。你可以设置为FIFO(先进先出)或是LFU(较少使用)。 |
| | | clearOnFlush:内存数量最大时是否清除。 |
| | | --> |
| | | <defaultCache name="defaultCache" |
| | | maxElementsInMemory="10000" |
| | | eternal="false" |
| | | timeToIdleSeconds="120" |
| | | timeToLiveSeconds="120" |
| | | overflowToDisk="false" |
| | | maxElementsOnDisk="100000" |
| | | diskPersistent="false" |
| | | diskExpiryThreadIntervalSeconds="120" |
| | | memoryStoreEvictionPolicy="LRU"/> |
| | | |
| | | </ehcache> |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <beans xmlns="http://www.springframework.org/schema/beans" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xmlns:cache="http://www.springframework.org/schema/cache" |
| | | xsi:schemaLocation="http://www.springframework.org/schema/beans |
| | | http://www.springframework.org/schema/beans/spring-beans.xsd |
| | | http://www.springframework.org/schema/cache |
| | | http://www.springframework.org/schema/cache/spring-cache.xsd"> |
| | | <!-- Spring提供的基于的Ehcache实现的缓存管理器 --> |
| | | |
| | | <!-- 如果有多个ehcacheManager要在bean加上p:shared="true" --> |
| | | |
| | | <bean id="cacheManager1" class="org.springframework.cache.ehcache.EhCacheCacheManager"> |
| | | <property name="cacheManager" ref="ehcacheManager"/> |
| | | <property name="transactionAware" value="true"/> |
| | | </bean> |
| | | |
| | | <!-- cache注解,和spring-redis.xml中的只能使用一个 --> |
| | | <cache:annotation-driven cache-manager="cacheManager1" proxy-target-class="true"/> |
| | | </beans> |
| | |
| | | </bean> |
| | | |
| | | <!-- Cache Manager --> |
| | | <bean id="cacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager"></bean> |
| | | <bean id="cacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager"> |
| | | <property name="cacheManager" ref="ehcacheManager"/> |
| | | </bean> |
| | | |
| | | <!-- 如果有多个ehcacheManager要在bean加上p:shared="true" --> |
| | | <bean id="ehcacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> |
| | | <property name="configLocation" value="WEB-INF/ehcache.xml"/> |
| | | </bean> |
| | | |
| | | <!--session manager--> |
| | | <bean id="sessionManager" |
| | |
| | | <!--自定义 Realm--> |
| | | <bean id="authorizationRealm" class="com.nanometer.smartlab.realm.AuthorizationRealm"> |
| | | <property name="credentialsMatcher" ref="md5Matcher"/> |
| | | |
| | | <!-- 启用身份验证缓存,即缓存AuthenticationInfo信息,默认false --> |
| | | <property name="authenticationCachingEnabled" value="true"/> |
| | | <!-- 缓存AuthenticationInfo信息的缓存名称 --> |
| | | <property name="authenticationCacheName" value="authenticationCache"/> |
| | | <!-- 缓存AuthorizationInfo信息的缓存名称 --> |
| | | <property name="authorizationCacheName" value="authorizationCache"/> |
| | | </bean> |
| | | |
| | | <!-- Security Manager --> |
| | |
| | | <property name="securityManager" ref="securityManager"/> |
| | | </bean> |
| | | |
| | | </beans> |
| | | </beans> |
| | |
| | | <p:panel styleClass="center-header"> |
| | | <p:outputLabel styleClass="title" value="试剂管理"></p:outputLabel> |
| | | |
| | | <p:panelGrid styleClass="filter" columns="9"> |
| | | <p:panelGrid styleClass="filter" columns="12"> |
| | | <p:outputLabel value="名称:"></p:outputLabel> |
| | | <p:inputText value="#{reagentMngController.name}"></p:inputText> |
| | | <p:outputLabel value="CAS:"></p:outputLabel> |
| | |
| | | <f:selectItems value="#{reagentMngController.typeList}" var="item" |
| | | itemLabel="#{item.text}" itemValue="#{item.key}"></f:selectItems> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:outputLabel value="产品编号:"></p:outputLabel> |
| | | <p:inputText value="#{reagentMngController.productSn}"></p:inputText> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink> |
| | | </p:panelGrid> |
| | | </p:panel> |
| | |
| | | <p:confirm header="确认" message="确认操作?"></p:confirm> |
| | | </p:commandButton> |
| | | <p:commandButton value="试剂导入" styleClass="import-btn" onclick="importReagent()" |
| | | ></p:commandButton> |
| | | ></p:commandButton> |
| | | <p:commandButton value="耗材导入" styleClass="import-btn" onclick="importReagent2()" |
| | | ></p:commandButton> |
| | | <script> |
| | |
| | | <p:column headerText="名称"> |
| | | <h:outputText value="#{row.name}"></h:outputText> |
| | | </p:column> |
| | | <p:column headerText="产品编号"> |
| | | <h:outputText value="#{row.productSn}"></h:outputText> |
| | | </p:column> |
| | | <p:column headerText="CAS"> |
| | | <h:outputText value="#{row.cas}"></h:outputText> |
| | | </p:column> |
| | |
| | | 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}" |
| | |
| | | <h:outputText value="#{row.reagent!=null?row.reagent.name:''}"></h:outputText> |
| | | </p:column> |
| | | |
| | | <p:column headerText="产品编号"> |
| | | <h:outputText value="#{row.reagent.productSn}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="CAS" width="80"> |
| | | <h:outputText value="#{row.reagent!=null?row.reagent.cas:''}"></h:outputText> |
| | | </p:column> |
| | |
| | | <p:column headerText="试剂名称"> |
| | | <h:outputText value="#{row.name}"></h:outputText> |
| | | </p:column> |
| | | <p:column headerText="产品编号"> |
| | | <h:outputText value="#{row.productSn}"/> |
| | | </p:column> |
| | | <p:column headerText="CAS"> |
| | | <h:outputText value="#{row.cas}"></h:outputText> |
| | | </p:column> |
| | |
| | | <h:outputText value="#{row.reagent.name}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="产品编号"> |
| | | <h:outputText value="#{row.reagent.productSn}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="CAS"> |
| | | <h:outputText value="#{row.reagent.cas}"/> |
| | | </p:column> |
| | |
| | | <br/> |
| | | <h:form id="warehouseStockMngForm"> |
| | | <p:panel styleClass="center-header"> |
| | | <p:panelGrid styleClass="filter" columns="5"> |
| | | <p:panelGrid styleClass="filter" columns="7"> |
| | | |
| | | <p:outputLabel value="试剂名称:"></p:outputLabel> |
| | | <p:inputText value="#{warehouseStockMngController.reagentId}"></p:inputText> |
| | |
| | | <f:selectItems value="#{warehouseStockMngController.supplierSelectList}" |
| | | var="item" itemLabel="#{item.name}" itemValue="#{item.id}"></f:selectItems> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:outputLabel value="产品编号:"></p:outputLabel> |
| | | <p:inputText value="#{warehouseStockMngController.productSn}"></p:inputText> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink> |
| | | </p:panelGrid> |
| | |
| | | <p:column selectionMode="multiple" style="width: 30px;text-align: center;" /> |
| | | <p:column headerText="试剂名称"> |
| | | <h:outputText value="#{row.reagent.name}"></h:outputText> |
| | | </p:column> |
| | | |
| | | <p:column headerText="产品编号"> |
| | | <h:outputText value="#{row.reagent.productSn}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="CAS"> |
| | |
| | | </div> |
| | | <h:form id="warehouseStockMngFormForPerson"> |
| | | <p:panel styleClass="center-header" style="border-bottom:none;"> |
| | | <p:panelGrid styleClass="filter" columns="5"> |
| | | <p:panelGrid styleClass="filter" columns="12"> |
| | | |
| | | <p:outputLabel value="试剂名称:"></p:outputLabel> |
| | | <p:inputText value="#{warehouseStockMngController.reagentId}"></p:inputText> |
| | | <p:outputLabel value="申领人:"></p:outputLabel> |
| | | <p:inputText value="#{warehouseStockMngController.userName}"></p:inputText> |
| | | <p:outputLabel value="申购编号:"></p:outputLabel> |
| | | <p:inputText value="#{warehouseStockMngController.applyCode}"></p:inputText> |
| | | <p:outputLabel value="产品编号:"></p:outputLabel> |
| | | <p:inputText value="#{warehouseStockMngController.productSn}"></p:inputText> |
| | | <p:outputLabel value="状态:"></p:outputLabel> |
| | | <p:selectOneMenu value="#{warehouseStockMngController.status}"> |
| | | <f:selectItem itemLabel="全部" noSelectionOption="true"></f:selectItem> |
| | | <f:selectItems value="#{warehouseStockMngController.statusSelectList}" var="item" |
| | | itemLabel="#{item.text}" itemValue="#{item.key}"></f:selectItems> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink> |
| | | </p:panelGrid> |
| | |
| | | oncomplete="$('#showTabOrder').css('display','block');" |
| | | update="@(.tmpOrder)" |
| | | ></p:commandButton> |
| | | <p:commandButton update=":centerRootPanel" actionListener="#{warehouseStockMngController.onExportFileBtnClickOrder}" |
| | | ajax="false" value="导出" styleClass="new-btn" /> |
| | | </p:panelGrid> |
| | | |
| | | <p:dataTable id="warehouseStockMngDataTableForPerson" styleClass="data-table" |
| | |
| | | <p:column headerText="订单状态"> |
| | | <h:outputText value="#{row.status!=null?row.status.text:''}"></h:outputText> |
| | | </p:column> |
| | | <p:column headerText="课题组"> |
| | | <h:outputText value="#{row.project}" /> |
| | | </p:column> |
| | | <p:column headerText="课题组负责人"> |
| | | <h:outputText value="#{row.projectManage}" /> |
| | | </p:column> |
| | | </p:dataTable> |
| | | </p:panel> |
| | | </h:form> |