|
|
@ -27,7 +27,6 @@ import digital.laboratory.platform.sys.entity.CabinetCell; |
|
|
|
import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData; |
|
|
|
import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData; |
|
|
|
import digital.laboratory.platform.sys.feign.RemoteCabinetService; |
|
|
|
import digital.laboratory.platform.sys.feign.RemoteCabinetService; |
|
|
|
import feign.Response; |
|
|
|
import feign.Response; |
|
|
|
import io.seata.spring.annotation.GlobalTransactional; |
|
|
|
|
|
|
|
import org.apache.commons.io.output.ByteArrayOutputStream; |
|
|
|
import org.apache.commons.io.output.ByteArrayOutputStream; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -283,6 +282,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo |
|
|
|
|
|
|
|
|
|
|
|
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(id); |
|
|
|
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (referenceMaterial == null) { |
|
|
|
|
|
|
|
throw new RuntimeException(String.format("未能查询到该ID对应的标准物质")); |
|
|
|
|
|
|
|
} |
|
|
|
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO(); |
|
|
|
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO(); |
|
|
|
|
|
|
|
|
|
|
|
ReagentConsumableInventory byId = this.getById(referenceMaterial.getReagentConsumableInventoryId()); |
|
|
|
ReagentConsumableInventory byId = this.getById(referenceMaterial.getReagentConsumableInventoryId()); |
|
|
@ -558,9 +560,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo |
|
|
|
|
|
|
|
|
|
|
|
ReagentConsumableInventory one = this.getOne(Wrappers.<ReagentConsumableInventory>query() |
|
|
|
ReagentConsumableInventory one = this.getOne(Wrappers.<ReagentConsumableInventory>query() |
|
|
|
.eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName()) |
|
|
|
.eq("reagent_consumable_name", reagentConsumableInventoryDTO.getReagentConsumableName()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()),"brand", reagentConsumableInventoryDTO.getBrand()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getBrand()), "brand", reagentConsumableInventoryDTO.getBrand()) |
|
|
|
.eq("category", reagentConsumableInventoryDTO.getCategory()) |
|
|
|
.eq("category", reagentConsumableInventoryDTO.getCategory()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecificationAndModel()),"specification_and_model", reagentConsumableInventoryDTO.getSpecificationAndModel()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecificationAndModel()), "specification_and_model", reagentConsumableInventoryDTO.getSpecificationAndModel()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getStandardValueOrPurity()), "standard_value_or_purity", reagentConsumableInventoryDTO.getStandardValueOrPurity()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getStandardValueOrPurity()), "standard_value_or_purity", reagentConsumableInventoryDTO.getStandardValueOrPurity()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCasNumber()), "cas_number", reagentConsumableInventoryDTO.getCasNumber()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getCasNumber()), "cas_number", reagentConsumableInventoryDTO.getCasNumber()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecies()), "species", reagentConsumableInventoryDTO.getSpecies()) |
|
|
|
.eq(StrUtil.isNotBlank(reagentConsumableInventoryDTO.getSpecies()), "species", reagentConsumableInventoryDTO.getSpecies()) |
|
|
@ -669,7 +671,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo |
|
|
|
this.save(reagentConsumableInventory); |
|
|
|
this.save(reagentConsumableInventory); |
|
|
|
this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1); |
|
|
|
this.updateCabinet(cabinetCell.getId(), reagentConsumables.getReagentConsumableId(), 1); |
|
|
|
|
|
|
|
|
|
|
|
if (!reagentConsumableInventory.getCategory().equals("标准物质")){ |
|
|
|
if (!reagentConsumableInventory.getCategory().equals("标准物质")) { |
|
|
|
ReagentConsumableStash reagentConsumableStash = reagentConsumableStashService.getOne(Wrappers.<ReagentConsumableStash>query() |
|
|
|
ReagentConsumableStash reagentConsumableStash = reagentConsumableStashService.getOne(Wrappers.<ReagentConsumableStash>query() |
|
|
|
.eq("room_no", reagentConsumableInventoryDTO.getRoomNo()) |
|
|
|
.eq("room_no", reagentConsumableInventoryDTO.getRoomNo()) |
|
|
|
.eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId())); |
|
|
|
.eq("reagent_consumable_id", reagentConsumables.getReagentConsumableId())); |
|
|
@ -712,6 +714,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo |
|
|
|
batchDetailsService.save(batchDetails); |
|
|
|
batchDetailsService.save(batchDetails); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
//更新柜子系统方法,柜子ID、物品ID、入库OR出库 (opCode 1 or -1)
|
|
|
|
//更新柜子系统方法,柜子ID、物品ID、入库OR出库 (opCode 1 or -1)
|
|
|
|
public void updateCabinet(String latticeId, String itemId, int opCode) { |
|
|
|
public void updateCabinet(String latticeId, String itemId, int opCode) { |
|
|
@ -726,4 +729,25 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo |
|
|
|
cellAndStoreSupplyDataArrayList.add(cellAndStoreSupplyData); |
|
|
|
cellAndStoreSupplyDataArrayList.add(cellAndStoreSupplyData); |
|
|
|
remoteCabinetService.takeOrSaveGoodsFromCabinet(cellAndStoreSupplyDataArrayList, opCode); |
|
|
|
remoteCabinetService.takeOrSaveGoodsFromCabinet(cellAndStoreSupplyDataArrayList, opCode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @Override
|
|
|
|
|
|
|
|
// public List<OrgFullVO> getOrgList() {
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// List<OrgVO> orgList = baseMapper.getOrgList();
|
|
|
|
|
|
|
|
// ArrayList<OrgFullVO> orgFullVOS = new ArrayList<>();
|
|
|
|
|
|
|
|
// for (OrgVO orgVO : orgList) {
|
|
|
|
|
|
|
|
// if (orgVO.getOrgType() != null && orgVO.getOrgType().equals("county")) {
|
|
|
|
|
|
|
|
// OrgFullVO orgFullVO = new OrgFullVO();
|
|
|
|
|
|
|
|
// orgFullVO.setUsername("X" + orgVO.getAreaCode());
|
|
|
|
|
|
|
|
// String[] roles = {"10015", "10020"};
|
|
|
|
|
|
|
|
// orgFullVO.setRoleIds(roles);
|
|
|
|
|
|
|
|
// orgFullVO.setPassword("123456");
|
|
|
|
|
|
|
|
// orgFullVO.setOrgId(orgVO.getOrgId());
|
|
|
|
|
|
|
|
// orgFullVOS.add(orgFullVO);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// return orgFullVOS;
|
|
|
|
|
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|