gdg
2021-01-18 b02535c9a99324823812f6c2d08f066d8e1ba75f
Merge remote-tracking branch 'origin/master' into master
已修改50个文件
已添加8个文件
2618 ■■■■ 文件已修改
src/main/java/com/nanometer/smartlab/api/ApiAction.java 321 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/controller/HazardousWasteController.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/controller/ReagentMngController.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/controller/UserMngController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/controller/WarehouseStockMngController.java 198 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/converter/WasterConvert.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/HazardousWasteMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/HazardousWasteMapper.xml 422 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/OpeApplyDao.xml 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/OpeLaboratoryReserveDao.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/OpeLaboratoryReserveDao.xml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/OpeUseFlowDao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/OpeUseFlowDao.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/OpeWarehouseReserveDao.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/SysLaboratoryDao.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/SysLaboratoryDao.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/SysReagentDao.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/SysUserDao.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/dao/SysUserDao.xml 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/entity/HazardousWaste.java 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/entity/OpeApplyReserve.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/entity/SysUser.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/entity/dto/HazardousWasteUser.java 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/entity/dto/LaboratoryVo.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/entity/enumtype/ApplyStatusVo.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/entity/enumtype/OperateStatus.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/entity/enumtype/Waster.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/entity/handler/WasterHandler.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/HazardousWasteService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/HazardousWasteServiceImpl.java 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeApplyService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeApplyServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeLaboratoryReserveService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeLaboratoryReserveServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeReagentStatusService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeReagentStatusServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeUseFlowService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeUseFlowServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeWarehouseReserveService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/OpeWarehouseReserveServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/SysLaboratoryContainerServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/SysLaboratoryService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/SysLaboratoryServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/SysReagentService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/SysReagentServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/SysUserService.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/service/SysUserServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/org/apache/shiro/web/filter/InvalidRequestFilter.java 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/config-mybatis.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/ehcache.xml 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/spring-ehcache.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/WEB-INF/spring-shiro.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/reagent_mng.xhtml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/sys_hazardous_waste.xhtml 229 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/user_mng.xhtml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/warehouse_reagent_direct_store.xhtml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/warehouse_stock_mng.xhtml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
智慧实验室接口.docx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/nanometer/smartlab/api/ApiAction.java
@@ -11,14 +11,8 @@
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;
@@ -32,6 +26,7 @@
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.*;
@@ -41,6 +36,7 @@
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.*;
@@ -87,6 +83,14 @@
    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;
@@ -1359,26 +1363,93 @@
    }
    /**
     * @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("密码错误");
@@ -1390,7 +1461,231 @@
            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("系统出错");
        }
    }
}
src/main/java/com/nanometer/smartlab/controller/HazardousWasteController.java
@@ -3,6 +3,7 @@
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;
@@ -10,10 +11,8 @@
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")
@@ -25,8 +24,15 @@
    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;
@@ -40,16 +46,15 @@
                    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);
                    }
@@ -77,10 +82,58 @@
        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() {
@@ -106,4 +159,74 @@
    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;
    }
}
src/main/java/com/nanometer/smartlab/controller/ReagentMngController.java
@@ -67,6 +67,7 @@
    private String cas;
    private List<SysSupplier> supplierSelectList;
    private List<Type> typeList;
    private String productSn;
    public List<Type> getTypeList() {
        if (this.typeList == null) {
@@ -798,10 +799,10 @@
                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);
@@ -897,4 +898,12 @@
    public void setDangerousFlagSelectList(List<DangerousFlag> dangerousFlagSelectList) {
        this.dangerousFlagSelectList = dangerousFlagSelectList;
    }
    public String getProductSn() {
        return productSn;
    }
    public void setProductSn(String productSn) {
        this.productSn = productSn;
    }
}
src/main/java/com/nanometer/smartlab/controller/UserMngController.java
@@ -7,6 +7,7 @@
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;
@@ -69,6 +70,7 @@
    private String editPasswor;
    private List<BaseMeta> codeList;
    private List<BaseRole> roleList;
    private List<Waster> wasterSelectList;
    public List<BaseRole> getRoleList() {
        return roleList;
@@ -552,6 +554,14 @@
        return seeFlagSelectList;
    }
    public List<Waster> getWasterSelectList() {
        if (this.wasterSelectList == null) {
            this.wasterSelectList = Arrays.asList(Waster.values());
        }
        return wasterSelectList;
    }
    public String getArp() {
        return arp;
    }
src/main/java/com/nanometer/smartlab/controller/WarehouseStockMngController.java
@@ -5,6 +5,7 @@
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;
@@ -204,6 +205,10 @@
    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;
@@ -1204,11 +1209,11 @@
                        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);
@@ -1254,12 +1259,11 @@
                    }
                    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);
@@ -1328,6 +1332,130 @@
        }
        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;
@@ -1355,10 +1483,11 @@
                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("供应商");
@@ -1409,8 +1538,6 @@
    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);
@@ -1420,15 +1547,16 @@
        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;
@@ -1966,10 +2094,10 @@
                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);
@@ -2231,4 +2359,36 @@
    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;
    }
}
src/main/java/com/nanometer/smartlab/converter/WasterConvert.java
对比新文件
@@ -0,0 +1,38 @@
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;
        }
    }
}
src/main/java/com/nanometer/smartlab/dao/HazardousWasteMapper.java
@@ -1,6 +1,7 @@
package com.nanometer.smartlab.dao;
import com.nanometer.smartlab.entity.HazardousWaste;
import org.apache.ibatis.annotations.Param;
import java.util.*;
@@ -20,4 +21,16 @@
    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);
}
src/main/java/com/nanometer/smartlab/dao/HazardousWasteMapper.xml
@@ -1,207 +1,441 @@
<?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 &gt; #{starttime}
      </if>
      <if test="endtime != null and endtime != ''">
        and create_time &lt; #{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 &gt; #{startTime}
      </if>
      <if test="endTime != null and endTime != ''" >
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{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 &gt; #{startTime}
      </if>
      <if test="endTime != null and endTime != ''" >
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{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 &gt; #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{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 &gt; #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{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 &gt; #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{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 &gt; #{startTime}
      </if>
      <if test="endTime != null and endTime != ''">
        and create_time &lt; #{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>
src/main/java/com/nanometer/smartlab/dao/OpeApplyDao.xml
@@ -62,6 +62,8 @@
    <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>
@@ -322,6 +324,12 @@
        <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"
@@ -336,10 +344,21 @@
    <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"
@@ -350,7 +369,7 @@
        <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}
@@ -359,13 +378,40 @@
    <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}
src/main/java/com/nanometer/smartlab/dao/OpeLaboratoryReserveDao.java
@@ -10,4 +10,5 @@
    public void insertOpeLaboratoryReserve(OpeLaboratoryReserve opeLaboratoryReserve) throws DataAccessException;
    List<OpeLaboratoryReserve> selectByReId(String id);
    public int updateByReId(Map params);
    void updateByReagent(Map<String, Object> params);
}
src/main/java/com/nanometer/smartlab/dao/OpeLaboratoryReserveDao.xml
@@ -24,6 +24,13 @@
    <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>
src/main/java/com/nanometer/smartlab/dao/OpeUseFlowDao.java
@@ -1,6 +1,7 @@
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;
@@ -27,4 +28,5 @@
    int updateTimeByCode(Map params);
    OpeUseFlow getOpeUseFlowByCode(@Param("reagentCode") String reagentCode);
}
src/main/java/com/nanometer/smartlab/dao/OpeUseFlowDao.xml
@@ -128,7 +128,16 @@
    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})
src/main/java/com/nanometer/smartlab/dao/OpeWarehouseReserveDao.xml
@@ -29,7 +29,8 @@
        <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>
@@ -49,9 +50,12 @@
    <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">
src/main/java/com/nanometer/smartlab/dao/SysLaboratoryDao.java
@@ -1,6 +1,8 @@
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;
@@ -29,4 +31,6 @@
    public  void updateLabExport(SysLaboratory sysLaboratory);
    List<Map> exportLabList(Map params);
    List<LaboratoryVo.Laboratory> getLaboratoryByProject(@Param("project") String project);
}
src/main/java/com/nanometer/smartlab/dao/SysLaboratoryDao.xml
@@ -112,7 +112,16 @@
    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},
src/main/java/com/nanometer/smartlab/dao/SysReagentDao.xml
@@ -261,6 +261,9 @@
    <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}
@@ -321,7 +324,9 @@
    <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">
src/main/java/com/nanometer/smartlab/dao/SysUserDao.java
@@ -1,6 +1,8 @@
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;
@@ -46,5 +48,7 @@
    List<SysUserDto> selectUserInfo();
    SysUser getUserByAccount(Map params);
    HazardousWasteUser getUserByAccount(Map params);
    List<LaboratoryVo.LaboratoryUser> getUserByProject(@Param("project") String project);
}
src/main/java/com/nanometer/smartlab/dao/SysUserDao.xml
@@ -23,6 +23,7 @@
    <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">
@@ -69,6 +70,9 @@
    </if>
    <if test="editId != null and editId != ''">
      and su.id != #{editId}
    </if>
    <if test="waster != null">
        and su.waster = #{waster}
    </if>
  </sql>
@@ -155,13 +159,13 @@
  </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>
@@ -196,7 +200,7 @@
    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,
@@ -207,43 +211,64 @@
    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>
src/main/java/com/nanometer/smartlab/entity/HazardousWaste.java
@@ -1,6 +1,7 @@
package com.nanometer.smartlab.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class HazardousWaste implements Serializable {
@@ -8,24 +9,24 @@
    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 **/
@@ -36,6 +37,21 @@
    /** 创建时间  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() {
@@ -48,52 +64,52 @@
    }
    /**   酸  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;
    }
@@ -107,12 +123,12 @@
        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();
    }
@@ -146,4 +162,50 @@
    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;
    }
}
src/main/java/com/nanometer/smartlab/entity/OpeApplyReserve.java
@@ -32,6 +32,9 @@
    private Integer flag;
    private ApplyStatus status;
    private String project;
    private String projectManage;
    public ApplyStatus getStatus() {
        return status;
    }
@@ -165,4 +168,20 @@
    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;
    }
}
src/main/java/com/nanometer/smartlab/entity/SysUser.java
@@ -6,6 +6,7 @@
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.
@@ -33,6 +34,7 @@
    private String containerCodeList;
    private String roleName;
    private String project;
    private Waster waster;
    public String getId() {
        return id;
@@ -49,7 +51,7 @@
    public void setPoint(int point) {
        this.point = point;
    }
    public String getArp() {
        return arp;
    }
@@ -201,4 +203,12 @@
    public void setProject(String project) {
        this.project = project;
    }
    public Waster getWaster() {
        return waster;
    }
    public void setWaster(Waster waster) {
        this.waster = waster;
    }
}
src/main/java/com/nanometer/smartlab/entity/dto/HazardousWasteUser.java
@@ -3,12 +3,16 @@
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;
@@ -34,11 +38,51 @@
        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;
    }
}
src/main/java/com/nanometer/smartlab/entity/dto/LaboratoryVo.java
对比新文件
@@ -0,0 +1,65 @@
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;
        }
    }
}
src/main/java/com/nanometer/smartlab/entity/enumtype/ApplyStatusVo.java
对比新文件
@@ -0,0 +1,39 @@
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;
    }
}
src/main/java/com/nanometer/smartlab/entity/enumtype/OperateStatus.java
@@ -3,7 +3,7 @@
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;
@@ -27,7 +27,7 @@
            map.put(d.key, d);
        }
    }
    public static OperateStatus parse(Integer index) {
        if(map.containsKey(index)){
            return map.get(index);
src/main/java/com/nanometer/smartlab/entity/enumtype/Waster.java
对比新文件
@@ -0,0 +1,37 @@
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;
    }
}
src/main/java/com/nanometer/smartlab/entity/handler/WasterHandler.java
对比新文件
@@ -0,0 +1,33 @@
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());
    }
}
src/main/java/com/nanometer/smartlab/service/HazardousWasteService.java
@@ -8,8 +8,27 @@
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);
}
src/main/java/com/nanometer/smartlab/service/HazardousWasteServiceImpl.java
@@ -2,13 +2,12 @@
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{
@@ -17,20 +16,150 @@
    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);
    }
}
src/main/java/com/nanometer/smartlab/service/OpeApplyService.java
@@ -53,9 +53,9 @@
    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);
src/main/java/com/nanometer/smartlab/service/OpeApplyServiceImpl.java
@@ -519,12 +519,15 @@
    }
    @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);
@@ -534,7 +537,7 @@
    }
    @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);
@@ -542,6 +545,9 @@
            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);
src/main/java/com/nanometer/smartlab/service/OpeLaboratoryReserveService.java
@@ -1,6 +1,7 @@
package com.nanometer.smartlab.service;
import com.nanometer.smartlab.entity.OpeLaboratoryReserve;
import com.nanometer.smartlab.entity.enumtype.ValidFlag;
import java.util.List;
@@ -9,5 +10,8 @@
    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);
}
src/main/java/com/nanometer/smartlab/service/OpeLaboratoryReserveServiceImpl.java
@@ -3,6 +3,7 @@
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;
@@ -64,5 +65,15 @@
        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);
    }
}
src/main/java/com/nanometer/smartlab/service/OpeReagentStatusService.java
@@ -94,4 +94,6 @@
    List<String> getReagentCodes(String reagentId);
    void updateOpeReagentStatus(OpeReagentStatus opeReagentStatus);
}
src/main/java/com/nanometer/smartlab/service/OpeReagentStatusServiceImpl.java
@@ -806,5 +806,10 @@
        return opeReagentStatusDao.selectReagentCodesByReId(reagentId);
    }
    @Override
    public void updateOpeReagentStatus(OpeReagentStatus opeReagentStatus) {
        opeReagentStatusDao.updateOpeReagentStatusDao(opeReagentStatus);
    }
}
src/main/java/com/nanometer/smartlab/service/OpeUseFlowService.java
@@ -33,4 +33,5 @@
    void updateTimeByCode(String code);
    OpeUseFlow getOpeUseFlowByCode(String reagentCode);
}
src/main/java/com/nanometer/smartlab/service/OpeUseFlowServiceImpl.java
@@ -15,6 +15,7 @@
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;
@@ -357,4 +358,9 @@
        params.put("status",-1);
        opeUseFlowDao.updateTimeByCode(params);
    }
    @Override
    public OpeUseFlow getOpeUseFlowByCode(String reagentCode) {
        return opeUseFlowDao.getOpeUseFlowByCode(reagentCode);
    }
}
src/main/java/com/nanometer/smartlab/service/OpeWarehouseReserveService.java
@@ -15,8 +15,8 @@
                                                         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);
src/main/java/com/nanometer/smartlab/service/OpeWarehouseReserveServiceImpl.java
@@ -88,13 +88,14 @@
    @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);
@@ -104,11 +105,12 @@
    }
    @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);
@@ -325,7 +327,7 @@
            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 + "]已存在。");
src/main/java/com/nanometer/smartlab/service/SysLaboratoryContainerServiceImpl.java
@@ -283,7 +283,7 @@
    @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;
src/main/java/com/nanometer/smartlab/service/SysLaboratoryService.java
@@ -1,6 +1,7 @@
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;
@@ -35,4 +36,6 @@
    void exportLab2Excel(List<Map> list) throws  Exception;
    List<Map> exportLabList(String type, String name);
    List<LaboratoryVo.Laboratory> getLaboratoryByProject(String project);
}
src/main/java/com/nanometer/smartlab/service/SysLaboratoryServiceImpl.java
@@ -2,6 +2,7 @@
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;
@@ -251,7 +252,12 @@
        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 {
src/main/java/com/nanometer/smartlab/service/SysReagentService.java
@@ -20,12 +20,12 @@
    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);
src/main/java/com/nanometer/smartlab/service/SysReagentServiceImpl.java
@@ -61,7 +61,7 @@
        }
    }
    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);
@@ -70,6 +70,7 @@
            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);
@@ -176,13 +177,14 @@
    }
    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);
src/main/java/com/nanometer/smartlab/service/SysUserService.java
@@ -2,6 +2,8 @@
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;
@@ -39,6 +41,7 @@
    List<SysUserDto> getUserInfo();
    SysUser getUserByAccount(String account);
    HazardousWasteUser getUserByAccount(String account,String name);
    List<LaboratoryVo.LaboratoryUser> getUserByProject(String project);
}
src/main/java/com/nanometer/smartlab/service/SysUserServiceImpl.java
@@ -4,6 +4,8 @@
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;
@@ -351,11 +353,17 @@
    }
    @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);
    }
}
src/main/java/org/apache/shiro/web/filter/InvalidRequestFilter.java
对比新文件
@@ -0,0 +1,186 @@
/*
 * 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;
    }
}
src/main/webapp/WEB-INF/config-mybatis.xml
@@ -30,8 +30,9 @@
        <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>
src/main/webapp/WEB-INF/ehcache.xml
对比新文件
@@ -0,0 +1,97 @@
<?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>
src/main/webapp/WEB-INF/spring-ehcache.xml
对比新文件
@@ -0,0 +1,20 @@
<?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>
src/main/webapp/WEB-INF/spring-shiro.xml
@@ -60,7 +60,14 @@
    </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"
@@ -77,6 +84,13 @@
    <!--自定义 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 -->
@@ -95,4 +109,4 @@
        <property name="securityManager" ref="securityManager"/>
    </bean>
</beans>
</beans>
src/main/webapp/reagent_mng.xhtml
@@ -15,7 +15,7 @@
        <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>
@@ -31,6 +31,10 @@
                    <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>
@@ -52,7 +56,7 @@
                    <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>
@@ -86,6 +90,9 @@
                <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>
src/main/webapp/sys_hazardous_waste.xhtml
@@ -28,13 +28,39 @@
                                    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"
@@ -48,26 +74,145 @@
                                 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>
@@ -83,76 +228,6 @@
                    </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>
src/main/webapp/user_mng.xhtml
@@ -128,6 +128,10 @@
                    <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>
@@ -225,6 +229,14 @@
                <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}"
src/main/webapp/warehouse_reagent_direct_store.xhtml
@@ -51,6 +51,10 @@
                        <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>
@@ -199,6 +203,9 @@
                        <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>
src/main/webapp/warehouse_stock_mng.xhtml
@@ -37,6 +37,10 @@
                                <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>
@@ -75,7 +79,7 @@
            <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>
@@ -86,6 +90,9 @@
                            <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>
@@ -131,6 +138,10 @@
                        <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">
@@ -245,12 +256,22 @@
            </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>
@@ -266,6 +287,8 @@
                                         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"
@@ -331,6 +354,12 @@
                        <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>
智慧实验室接口.docx
Binary files differ