| | |
| | | import com.google.common.collect.ImmutableMap; |
| | | import com.nanometer.smartlab.dao.*; |
| | | import com.nanometer.smartlab.entity.*; |
| | | import com.nanometer.smartlab.entity.dto.PersonUseDetail; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.log4j.Logger; |
| | |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public void batchUpdateStatusByCode(List<OpeReagentStatus> list) throws Exception { |
| | | if(list == null || list.size() <1){ |
| | | throw new Exception("没有选择试剂"); |
| | | } |
| | | public void batchUpdateStatusByCode(List<PersonUseDetail> applyList) throws Exception { |
| | | |
| | | for (OpeReagentStatus opeReagentStatus : list) { |
| | | |
| | | |
| | | for (PersonUseDetail pu : applyList) { |
| | | |
| | | //变更试剂状态为入库 |
| | | Map<String, Object> params1 = new HashMap<>(); |
| | | String reagentCode = opeReagentStatus.getReagentCode(); |
| | | String reagentCode = pu.getReagentCode(); |
| | | params1.put("code", reagentCode); |
| | | params1.put("status",ArrivalStatus.WAREHOUSE); |
| | | opeReagentStatusDao.updateStatusByCode(params1); |
| | |
| | | |
| | | //增加数据库存 |
| | | Map<String, Object> params3 = new HashMap<>(); |
| | | String reagentId = opeReagentStatus.getReagentId(); |
| | | String articleNumber = opeReagentStatus.getArticleNumber(); |
| | | String reagentId = pu.getReagentId(); |
| | | String articleNumber = pu.getArticleNumber(); |
| | | params3.put("reagentId", reagentId); |
| | | params3.put("articleNumber", articleNumber); |
| | | opeWarehouseReserveDao.updateCount(params3); |