| | |
| | | import com.nanometer.smartlab.dao.SysLaboratoryContainerDao; |
| | | import com.nanometer.smartlab.dao.SysWarehouseContainerDao; |
| | | import com.nanometer.smartlab.entity.*; |
| | | import com.nanometer.smartlab.entity.dto.PersonUseDetail; |
| | | import com.nanometer.smartlab.entity.enumtype.OperateStatus; |
| | | import com.nanometer.smartlab.util.Constants; |
| | | import org.apache.commons.lang.StringUtils; |
| | |
| | | } |
| | | |
| | | if(opeUseFlow.getCreateTime()==null){ |
| | | opeUseFlow.setCreateTime(new Timestamp(System.currentTimeMillis())); |
| | | opeUseFlow.setCreateTime(new Timestamp(System.currentTimeMillis()+1000)); |
| | | } |
| | | |
| | | this.opeUseFlowDao.insertOpeUseFlow(opeUseFlow); |
| | |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public List<OpeUseFlow> getOpeUseFlowListByName(String houseName,String reagentId, String reagentCode, Integer status, String userId, |
| | | public List<OpeUseFlow> getOpeUseFlowListByName(String houseName,String reagentId, String reagentCode,String containerCode, Integer status, String userId, |
| | | Date startDate,Date endDate,Integer first, Integer pageSize) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | |
| | | |
| | | params.put("status", status); |
| | | params.put("houseName", houseName); |
| | | params.put("containerCode", containerCode); |
| | | addParamByUserId(userId, params); |
| | | |
| | | params.put("first", first); |
| | |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public int getOpeUseFlowTotalCountByName(String houseName,String reagentId, String reagentCode, Integer status, String userId,Date startDate,Date endDate) { |
| | | public int getOpeUseFlowTotalCountByName(String houseName,String reagentId, String reagentCode,String containerCode, Integer status, String userId,Date startDate,Date endDate) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("reagentName", reagentId); |
| | |
| | | } |
| | | |
| | | params.put("houseName", houseName); |
| | | params.put("containerCode", containerCode); |
| | | addParamByUserId(userId, params); |
| | | |
| | | params.put("status", status); |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int getPersonalUseInfoCount(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, |
| | | String department, String project,String applyPerson,String reagentName) { |
| | | Map<String,Object> params = new HashMap<>(); |
| | | params.put("userId", userId); |
| | | params.put("startTime", startTime); |
| | | params.put("endTime", endTime); |
| | | params.put("receiptNumber", receiptNumber); |
| | | params.put("department", department); |
| | | params.put("project", project); |
| | | params.put("reagentCode", reagentCode); |
| | | params.put("applyPerson", applyPerson); |
| | | if (StringUtils.isNotBlank(reagentName)) { |
| | | //根据试剂名获取单号 |
| | | |
| | | } |
| | | params.put("reagentName", reagentName); |
| | | //操作状态位仓库领取 |
| | | Map<String, String> metaMap2 = new HashMap<>(); |
| | | metaMap2.put("groupId", "operate_status"); |
| | | metaMap2.put("metaKey", String.valueOf(OperateStatus.WAREHOUSEOUT.getKey())); |
| | | List<BaseMeta> baseMetas = baseMetaDao.getBaseMetaList(metaMap2); |
| | | params.put("operatestate", baseMetas.get(0).getId()); |
| | | |
| | | addParamByUserId(userId, params); |
| | | return opeUseFlowDao.countPersonalUseInfo(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<OpeUseFlow> getPersonalUseInfoList(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, |
| | | String department, String project,String applyPerson,String reagentName, int first, int pageSize) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("userId", userId); |
| | | params.put("startTime", startTime); |
| | | params.put("endTime", endTime); |
| | | params.put("receiptNumber", receiptNumber); |
| | | params.put("department", department); |
| | | params.put("project", project); |
| | | params.put("reagentCode", reagentCode); |
| | | params.put("applyPerson", applyPerson); |
| | | params.put("reagentName", reagentName); |
| | | //操作状态位仓库领取 |
| | | Map<String, String> metaMap2 = new HashMap<>(); |
| | | metaMap2.put("groupId", "operate_status"); |
| | | metaMap2.put("metaKey", String.valueOf(OperateStatus.WAREHOUSEOUT.getKey())); |
| | | List<BaseMeta> baseMetas = baseMetaDao.getBaseMetaList(metaMap2); |
| | | params.put("operatestate", baseMetas.get(0).getId()); |
| | | params.put("first", first); |
| | | params.put("pageSize", pageSize); |
| | | |
| | | addParamByUserId(userId, params); |
| | | return opeUseFlowDao.selectPersonalUseInfo(params); |
| | | } |
| | | |
| | | @Override |
| | | public List<PersonUseDetail> getApplyInfo(String receiptNumber) { |
| | | Map<String,Object> params = new HashMap<>(); |
| | | Map<String, String> metaMap2 = new HashMap<>(); |
| | | metaMap2.put("groupId", "operate_status"); |
| | | metaMap2.put("metaKey", String.valueOf(OperateStatus.WAREHOUSEOUT.getKey())); |
| | | List<BaseMeta> baseMetas = baseMetaDao.getBaseMetaList(metaMap2); |
| | | params.put("operatestate", baseMetas.get(0).getId()); |
| | | params.put("receiptNumber", receiptNumber); |
| | | |
| | | return opeUseFlowDao.getApplyInfo(params); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getApplyInfoSize(String receiptNumber) { |
| | | Map<String,Object> params = new HashMap<>(); |
| | | Map<String, String> metaMap2 = new HashMap<>(); |
| | | metaMap2.put("groupId", "operate_status"); |
| | | metaMap2.put("metaKey", String.valueOf(OperateStatus.WAREHOUSEOUT.getKey())); |
| | | List<BaseMeta> baseMetas = baseMetaDao.getBaseMetaList(metaMap2); |
| | | params.put("operatestate", baseMetas.get(0).getId()); |
| | | params.put("receiptNumber", receiptNumber); |
| | | |
| | | return opeUseFlowDao.getApplyInfoSize(params); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int getOpeUseFlow(OpeUseFlow opeUseFlow) { |
| | | return opeUseFlowDao.countOpeUseFlow(opeUseFlow); |
| | | } |
| | | |
| | | } |