李宇
2021-11-12 43ee95fbdcb6fe0a9d548d0935c23c232d5ffeaa
src/main/java/com/nanometer/smartlab/service/OpeApplyServiceImpl.java
@@ -67,9 +67,11 @@
    SysSequenceService sysSequenceService;
   @Resource
   private SysUserService sysUserService;
    @Resource
    private BaseMetaService baseMetaService;
    @Transactional(propagation = Propagation.REQUIRED)
    public List<OpeApply> getOpeApplyList(String reagentName, Timestamp startDeadline, Timestamp endDeadline, Integer status,
    public List<OpeApply> getOpeApplyList(String reagentName, Timestamp startDeadline, String controlProduct,Timestamp endDeadline, Integer status,
                                          String applyUserId, String approveUserId, String queryCas,
                                          Integer first, Integer pageSize,String applyCode,String applyUserName,Byte isShow) {
        try {
@@ -81,6 +83,7 @@
            params.put("endDeadline", endDeadline);
            params.put("status", status);
            params.put("isShow", isShow);
            params.put("controlProduct", controlProduct);
            if (StringUtils.isNotBlank(applyUserId)) {
             SysUser sysUser = sysUserService.getSysUser(applyUserId);
@@ -192,7 +195,7 @@
    }
    @Transactional(propagation = Propagation.REQUIRED)
    public int getOpeApplyTotalCount(String reagentName, Timestamp startDeadline, Timestamp endDeadline, Integer status,
    public int getOpeApplyTotalCount(String reagentName, Timestamp startDeadline,String controlProduct, Timestamp endDeadline, Integer status,
                                     String applyUserId, String approveUserId, String queryCas,String applyCode,String applyUserName,Byte isShow) {
        try {
            Map<String, Object> params = new HashMap<String, Object>();
@@ -203,6 +206,7 @@
            params.put("endDeadline", endDeadline);
            params.put("status", status);
            params.put("isShow", isShow);
            params.put("controlProduct", controlProduct);
          if (StringUtils.isNotBlank(applyUserId)) {
             SysUser sysUser = sysUserService.getSysUser(applyUserId);
@@ -886,4 +890,39 @@
        return opeApplyDao.getOpeApplyReserveListByNameForRowData(rowKey);
    }
    @Override
    public int getOpeApplySupplerRequireMngTotalCount(SysUser user,String reagentName, Timestamp startDeadline, Timestamp endDeadline, int status, byte isShow) {
        Map<String, Object> params = new HashMap<>();
        params.put("reagentName",reagentName );
        params.put("startDeadline", startDeadline);
        params.put("endDeadline", endDeadline);
        params.put("status", status);
        params.put("isShow", isShow);
        //看到供应商是自己的单位的数据
        String company = baseMetaService.getBaseMetaValue(user.getCompany());
        if (user.getSeeFlag().getKey() != SeeFlag.MANAGE.getKey()
                && user.getSeeFlag().getKey() != SeeFlag.LEADING.getKey()) {
            params.put("company", company);
        }
        return this.opeApplyDao.getOpeApplySupplerRequireMngTotalCount(params);
    }
    @Override
    public List<OpeApply> getOpeApplySupplerRequireMngList(SysUser user,String reagentName, Timestamp startDeadline, Timestamp endDeadline, int status, int first, int pageSize, byte isShow) {
        Map<String, Object> params = new HashMap<>();
        params.put("reagentName", reagentName);
        params.put("startDeadline", startDeadline);
        params.put("endDeadline", endDeadline);
        params.put("status", status);
        params.put("isShow", isShow);
        //看到供应商是自己的单位的数据
        String company = baseMetaService.getBaseMetaValue(user.getCompany());
        if (user.getSeeFlag().getKey() != SeeFlag.MANAGE.getKey()
                && user.getSeeFlag().getKey() != SeeFlag.LEADING.getKey()) {
            params.put("company", company);
        }
        return this.opeApplyDao.getOpeApplySupplerRequireMngList(params);
    }
}