| | |
| | | import com.nanometer.smartlab.entity.SysReagent; |
| | | import com.nanometer.smartlab.entity.SysUser; |
| | | import com.nanometer.smartlab.entity.enumtype.ApplyStatus; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.service.*; |
| | | import com.nanometer.smartlab.util.Constants; |
| | |
| | | String applyUserId = getUserId(); |
| | | int count = 0; |
| | | if (StringUtils.isNotBlank(applyUserId)) { |
| | | count = opeApplyService.getOpeApplyTotalCount(null, null, null, null, applyUserId, null, null,applyCode,null,(byte)0); |
| | | count = opeApplyService.getOpeApplyTotalCount(null, null, null, null, applyUserId, null, null,applyCode,null,(byte)1); |
| | | } |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeApplyService.getOpeApplyList(null, null, null, null, applyUserId, null, null, first, pageSize,applyCode,null,(byte)0); |
| | | list = opeApplyService.getOpeApplyList(null, null, null, null, applyUserId, null, null, first, pageSize,applyCode,null,(byte)1); |
| | | } |
| | | selectedList = null; |
| | | } catch (Exception e) { |
| | |
| | | //申请一个申购编号 |
| | | String applyCode = this.sysSequenceService.getApplyCode(); |
| | | for (OpeApply opeApply : this.applyNewList) { |
| | | |
| | | if (opeApply.getReagent().getValidFlag() == null |
| | | ||opeApply.getReagent().getValidFlag().equals(ValidFlag.INVALID)){ |
| | | FacesUtils.warn(opeApply.getReagent().getName()+",该试剂已删除,请选择其他试剂"); |
| | | return; |
| | | } |
| | | if (opeApply.getReagent().getType() == 1 |
| | | && (opeApply.getReagent().getSupplierFlag() == null |
| | | || opeApply.getReagent().getSupplierFlag().equals(ValidFlag.INVALID))){ |
| | | FacesUtils.warn(opeApply.getReagent().getName()+",该试剂供应商已删除,请选择其他试剂"); |
| | | return; |
| | | } |
| | | opeApply.setId(IDUtils.uuid()); |
| | | opeApply.setApplyCode(applyCode); |
| | | opeApply.setApplyUserId(applyUser.getId()); |