|
|
@ -1,8 +1,5 @@ |
|
|
|
package digital.laboratory.platform.reagent.service.impl; |
|
|
|
package digital.laboratory.platform.reagent.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.LocalDateTimeUtil; |
|
|
|
|
|
|
|
import cn.hutool.core.io.IoUtil; |
|
|
|
|
|
|
|
import cn.hutool.core.util.PageUtil; |
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
@ -11,33 +8,22 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.deepoove.poi.XWPFTemplate; |
|
|
|
|
|
|
|
import com.deepoove.poi.config.Configure; |
|
|
|
|
|
|
|
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy; |
|
|
|
|
|
|
|
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
|
|
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
|
|
import digital.laboratory.platform.reagent.config.PageUtils; |
|
|
|
|
|
|
|
import digital.laboratory.platform.reagent.dto.WarehousingRecordFormDTO; |
|
|
|
import digital.laboratory.platform.reagent.dto.WarehousingRecordFormDTO; |
|
|
|
import digital.laboratory.platform.reagent.entity.*; |
|
|
|
import digital.laboratory.platform.reagent.entity.*; |
|
|
|
import digital.laboratory.platform.reagent.mapper.WarehousingRecordFormMapper; |
|
|
|
import digital.laboratory.platform.reagent.mapper.WarehousingRecordFormMapper; |
|
|
|
import digital.laboratory.platform.reagent.service.*; |
|
|
|
import digital.laboratory.platform.reagent.service.*; |
|
|
|
import digital.laboratory.platform.reagent.vo.*; |
|
|
|
import digital.laboratory.platform.reagent.vo.*; |
|
|
|
import digital.laboratory.platform.sys.feign.RemoteCabinetService; |
|
|
|
import digital.laboratory.platform.sys.feign.RemoteCabinetService; |
|
|
|
import feign.Response; |
|
|
|
|
|
|
|
//import io.seata.spring.annotation.GlobalTransactional;
|
|
|
|
//import io.seata.spring.annotation.GlobalTransactional;
|
|
|
|
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; |
|
|
|
import org.springframework.mock.web.MockMultipartFile; |
|
|
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
import java.io.ByteArrayInputStream; |
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Calendar; |
|
|
|
import java.util.Calendar; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -49,9 +35,6 @@ import java.util.List; |
|
|
|
@Service |
|
|
|
@Service |
|
|
|
@SuppressWarnings("all") |
|
|
|
@SuppressWarnings("all") |
|
|
|
public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRecordFormMapper, WarehousingRecordForm> implements WarehousingRecordFormService { |
|
|
|
public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRecordFormMapper, WarehousingRecordForm> implements WarehousingRecordFormService { |
|
|
|
@Autowired |
|
|
|
|
|
|
|
private WarehousingRecordFormService warehousingRecordFormService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private WarehousingContentService warehousingContentService; |
|
|
|
private WarehousingContentService warehousingContentService; |
|
|
|
|
|
|
|
|
|
|
@ -111,7 +94,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec |
|
|
|
@Override//查看采购入库
|
|
|
|
@Override//查看采购入库
|
|
|
|
public WarehousingRecordFormVO getWarehousingRecordFormVO(String warehousingFormId) { |
|
|
|
public WarehousingRecordFormVO getWarehousingRecordFormVO(String warehousingFormId) { |
|
|
|
|
|
|
|
|
|
|
|
WarehousingRecordForm byId = warehousingRecordFormService.getById(warehousingFormId); |
|
|
|
WarehousingRecordForm byId = this.getById(warehousingFormId); |
|
|
|
|
|
|
|
|
|
|
|
WarehousingRecordFormVO warehousingRecordFormVO = new WarehousingRecordFormVO(); |
|
|
|
WarehousingRecordFormVO warehousingRecordFormVO = new WarehousingRecordFormVO(); |
|
|
|
|
|
|
|
|
|
|
@ -127,292 +110,295 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
@Override//录入入库明细
|
|
|
|
@Override//录入入库明细
|
|
|
|
public WarehousingRecordFormVO addFormById(List<WarehousingRecordFormDTO> warehousingRecordFormDTOList, DLPUser dlpUser) { |
|
|
|
public WarehousingRecordFormVO addFormById(WarehousingRecordFormDTO warehousingRecordFormDTO, DLPUser dlpUser) { |
|
|
|
|
|
|
|
|
|
|
|
for (WarehousingRecordFormDTO warehousingRecordFormDTO : warehousingRecordFormDTOList) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (warehousingRecordFormDTO.getLatticeId().isEmpty() & warehousingRecordFormDTO.getLocation().isEmpty() & |
|
|
|
if (warehousingRecordFormDTO.getLatticeId().isEmpty() & warehousingRecordFormDTO.getLocation().isEmpty() & |
|
|
|
warehousingRecordFormDTO.getBoxId().isEmpty()) { |
|
|
|
warehousingRecordFormDTO.getBoxId().isEmpty()) { |
|
|
|
|
|
|
|
|
|
|
|
throw new RuntimeException(String.format("请选择存放位置后再进行提交")); |
|
|
|
throw new RuntimeException(String.format("请选择存放位置后再进行提交")); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean flag = true; |
|
|
|
boolean flag = true; |
|
|
|
|
|
|
|
|
|
|
|
int i = 0; |
|
|
|
int i = 0; |
|
|
|
//签收内容循环
|
|
|
|
|
|
|
|
for (WarehousingRecordFormDTO warehousingRecordFormDTO : warehousingRecordFormDTOList) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String latticeId = warehousingRecordFormDTO.getLatticeId(); |
|
|
|
|
|
|
|
//录入签收批次信息
|
|
|
|
|
|
|
|
WarehousingBatchList warehousingBatchList = new WarehousingBatchList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(warehousingRecordFormDTO, warehousingBatchList); |
|
|
|
String latticeId = warehousingRecordFormDTO.getLatticeId(); |
|
|
|
|
|
|
|
//录入签收批次信息
|
|
|
|
|
|
|
|
WarehousingBatchList warehousingBatchList = new WarehousingBatchList(); |
|
|
|
|
|
|
|
|
|
|
|
warehousingBatchList.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
BeanUtils.copyProperties(warehousingRecordFormDTO, warehousingBatchList); |
|
|
|
|
|
|
|
|
|
|
|
warehousingBatchList.setDepositorId(dlpUser.getId()); |
|
|
|
warehousingBatchList.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
|
|
|
|
warehousingBatchList.setDateOfReceipt(LocalDateTime.now()); |
|
|
|
warehousingBatchList.setDepositorId(dlpUser.getId()); |
|
|
|
|
|
|
|
|
|
|
|
warehousingBatchList.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
warehousingBatchList.setDateOfReceipt(LocalDateTime.now()); |
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<WarehousingBatchList> warehousingBatchListLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
warehousingBatchList.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
|
|
|
|
|
|
|
|
warehousingBatchListLambdaQueryWrapper.eq(WarehousingBatchList::getWarehousingContentId, warehousingBatchList.getWarehousingContentId()); |
|
|
|
LambdaQueryWrapper<WarehousingBatchList> warehousingBatchListLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
//通过判断签收内容表里的签收批次表数量,进行批次字段的赋值
|
|
|
|
|
|
|
|
warehousingBatchList.setBatch(warehousingBatchListService.list(warehousingBatchListLambdaQueryWrapper).size() + 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WarehousingContent byId = warehousingContentService.getById(warehousingBatchList.getWarehousingContentId()); |
|
|
|
warehousingBatchListLambdaQueryWrapper.eq(WarehousingBatchList::getWarehousingContentId, warehousingBatchList.getWarehousingContentId()); |
|
|
|
|
|
|
|
//通过判断签收内容表里的签收批次表数量,进行批次字段的赋值
|
|
|
|
|
|
|
|
warehousingBatchList.setBatch(warehousingBatchListService.list(warehousingBatchListLambdaQueryWrapper).size() + 1); |
|
|
|
|
|
|
|
|
|
|
|
byId.setWarehousingQuantity(byId.getWarehousingQuantity() + warehousingBatchList.getQuantity()); |
|
|
|
WarehousingContent byId = warehousingContentService.getById(warehousingBatchList.getWarehousingContentId()); |
|
|
|
//判断采购数量与签收数量
|
|
|
|
|
|
|
|
if (byId.getWarehousingQuantity() > byId.getTotalQuantity()) { |
|
|
|
|
|
|
|
throw new RuntimeException(String.format("入库数量不能大于采购数量")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
warehousingContentService.updateById(byId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
byId.setWarehousingQuantity(byId.getWarehousingQuantity() + warehousingBatchList.getQuantity()); |
|
|
|
|
|
|
|
//判断采购数量与签收数量
|
|
|
|
|
|
|
|
if (byId.getWarehousingQuantity() > byId.getTotalQuantity()) { |
|
|
|
|
|
|
|
throw new RuntimeException(String.format("入库数量不能大于采购数量")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", byId.getReagentConsumableId())); |
|
|
|
warehousingContentService.updateById(byId); |
|
|
|
//录入仓库批次信息,若仓库不存在该物品,则新增该物品的库存信息
|
|
|
|
|
|
|
|
if (one == null) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", byId.getReagentConsumableId())); |
|
|
|
|
|
|
|
//录入仓库批次信息,若仓库不存在该物品,则新增该物品的库存信息
|
|
|
|
|
|
|
|
if (one == null) { |
|
|
|
|
|
|
|
|
|
|
|
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId, byId.getReagentConsumableId()); |
|
|
|
ReagentConsumableInventory reagentConsumableInventory = new ReagentConsumableInventory(); |
|
|
|
|
|
|
|
|
|
|
|
ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); |
|
|
|
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory); |
|
|
|
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId, byId.getReagentConsumableId()); |
|
|
|
|
|
|
|
|
|
|
|
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); |
|
|
|
reagentConsumableInventory.setStatus(1); |
|
|
|
|
|
|
|
reagentConsumableInventory.setCreateTime(LocalDateTime.now()); |
|
|
|
|
|
|
|
reagentConsumableInventory.setUpdateTime(LocalDateTime.now()); |
|
|
|
|
|
|
|
reagentConsumableInventory.setWarningValue(warehousingRecordFormDTO.getWarningValue()); |
|
|
|
|
|
|
|
//如果供应商未提供物品编码,则需在入库时扫描标签录入编码
|
|
|
|
|
|
|
|
if (warehousingRecordFormDTO.getCode() != null) { |
|
|
|
|
|
|
|
reagentConsumableInventory.setCode(warehousingRecordFormDTO.getCode()); |
|
|
|
|
|
|
|
reagentConsumables.setCode(warehousingRecordFormDTO.getCode()); |
|
|
|
|
|
|
|
reagentConsumablesService.updateById(reagentConsumables); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BatchDetails batchDetails = new BatchDetails(); |
|
|
|
BeanUtils.copyProperties(reagentConsumables, reagentConsumableInventory); |
|
|
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails); |
|
|
|
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
reagentConsumableInventory.setStatus(1); |
|
|
|
batchDetails.setServiceStatus(1); |
|
|
|
reagentConsumableInventory.setCreateTime(LocalDateTime.now()); |
|
|
|
batchDetails.setPurchaseTime(LocalDateTime.now()); |
|
|
|
reagentConsumableInventory.setUpdateTime(LocalDateTime.now()); |
|
|
|
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); |
|
|
|
reagentConsumableInventory.setWarningValue(warehousingRecordFormDTO.getWarningValue()); |
|
|
|
batchDetails.setSupplierId(byId.getSupplierId()); |
|
|
|
//如果供应商未提供物品编码,则需在入库时扫描标签录入编码
|
|
|
|
batchDetails.setBatch(1); |
|
|
|
if (warehousingRecordFormDTO.getCode() != null) { |
|
|
|
batchDetails.setExpirationDate(warehousingRecordFormDTO.getExpirationDate()); |
|
|
|
reagentConsumableInventory.setCode(warehousingRecordFormDTO.getCode()); |
|
|
|
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity() * Integer.valueOf(reagentConsumables.getPackagedCopies())); |
|
|
|
reagentConsumables.setCode(warehousingRecordFormDTO.getCode()); |
|
|
|
batchDetails.setWarehousingBatchListId(warehousingBatchList.getId()); |
|
|
|
reagentConsumablesService.updateById(reagentConsumables); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
warehousingBatchList.setBatchId(batchDetails.getBatchDetailsId()); |
|
|
|
BatchDetails batchDetails = new BatchDetails(); |
|
|
|
|
|
|
|
|
|
|
|
if (batchDetails.getQuantity() == null) { |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
batchDetails.setQuantity(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int year = calendar.get(Calendar.YEAR); |
|
|
|
|
|
|
|
|
|
|
|
if (reagentConsumables.getCategory().equals("试剂") | reagentConsumables.getCategory().equals("耗材")) { |
|
|
|
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails); |
|
|
|
//更新格子信息(试剂耗材传入类ID)
|
|
|
|
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
remoteCabinetService.updateCabinet(latticeId, byId.getReagentConsumableId(), "1"); |
|
|
|
batchDetails.setServiceStatus(1); |
|
|
|
batchDetails.setLatticeId(warehousingRecordFormDTO.getLatticeId()); |
|
|
|
batchDetails.setPurchaseTime(LocalDateTime.now()); |
|
|
|
batchDetails.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
batchDetails.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); |
|
|
|
batchDetails.setBoxId(warehousingRecordFormDTO.getBoxId()); |
|
|
|
batchDetails.setSupplierId(byId.getSupplierId()); |
|
|
|
} |
|
|
|
batchDetails.setBatch(year + "-" + 1); |
|
|
|
|
|
|
|
batchDetails.setExpirationDate(warehousingRecordFormDTO.getExpirationDate()); |
|
|
|
|
|
|
|
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity() * Integer.valueOf(reagentConsumables.getPackagedCopies())); |
|
|
|
|
|
|
|
batchDetails.setWarehousingBatchListId(warehousingBatchList.getId()); |
|
|
|
|
|
|
|
|
|
|
|
if (reagentConsumableInventory.getTotalQuantity() == null) { |
|
|
|
warehousingBatchList.setBatchId(batchDetails.getBatchDetailsId()); |
|
|
|
|
|
|
|
|
|
|
|
reagentConsumableInventory.setTotalQuantity(0); |
|
|
|
if (batchDetails.getQuantity() == null) { |
|
|
|
} |
|
|
|
batchDetails.setQuantity(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + batchDetails.getQuantity()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果是标准物质,则赋值编号
|
|
|
|
if (reagentConsumables.getCategory().equals("试剂") | reagentConsumables.getCategory().equals("耗材")) { |
|
|
|
if (reagentConsumables.getCategory().equals("标准物质")) { |
|
|
|
//更新格子信息(试剂耗材传入类ID)
|
|
|
|
|
|
|
|
remoteCabinetService.updateCabinet(latticeId, byId.getReagentConsumableId(), "1"); |
|
|
|
|
|
|
|
batchDetails.setLatticeId(warehousingRecordFormDTO.getLatticeId()); |
|
|
|
|
|
|
|
batchDetails.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
|
|
|
|
batchDetails.setBoxId(warehousingRecordFormDTO.getBoxId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (reagentConsumableInventory.getTotalQuantity() == null) { |
|
|
|
|
|
|
|
|
|
|
|
for (int j = 0; j < batchDetails.getQuantity(); j++) { |
|
|
|
reagentConsumableInventory.setTotalQuantity(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ReferenceMaterial referenceMaterial = new ReferenceMaterial(); |
|
|
|
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() + batchDetails.getQuantity()); |
|
|
|
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); |
|
|
|
|
|
|
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId()); |
|
|
|
|
|
|
|
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); |
|
|
|
|
|
|
|
referenceMaterial.setStatus(0); |
|
|
|
|
|
|
|
referenceMaterial.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
|
|
|
|
referenceMaterial.setLatticeId(warehousingRecordFormDTO.getLatticeId()); |
|
|
|
|
|
|
|
referenceMaterial.setCustodianName(warehousingRecordFormDTO.getCustodianName()); |
|
|
|
|
|
|
|
referenceMaterial.setBoxId(warehousingRecordFormDTO.getBoxId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果是标准物质,则赋值编号
|
|
|
|
|
|
|
|
if (reagentConsumables.getCategory().equals("标准物质")) { |
|
|
|
|
|
|
|
|
|
|
|
//更新格子信息(标准物质传入对象ID)
|
|
|
|
|
|
|
|
remoteCabinetService.updateCabinet(latticeId, referenceMaterial.getId(), "1"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
for (int j = 0; j < batchDetails.getQuantity(); j++) { |
|
|
|
|
|
|
|
|
|
|
|
int year = calendar.get(Calendar.YEAR); |
|
|
|
ReferenceMaterial referenceMaterial = new ReferenceMaterial(); |
|
|
|
|
|
|
|
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
referenceMaterial.setReagentConsumableId(reagentConsumables.getReagentConsumableId()); |
|
|
|
|
|
|
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId()); |
|
|
|
|
|
|
|
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId()); |
|
|
|
|
|
|
|
referenceMaterial.setStatus(0); |
|
|
|
|
|
|
|
referenceMaterial.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
|
|
|
|
referenceMaterial.setLatticeId(warehousingRecordFormDTO.getLatticeId()); |
|
|
|
|
|
|
|
referenceMaterial.setCustodianName(warehousingRecordFormDTO.getCustodianName()); |
|
|
|
|
|
|
|
referenceMaterial.setBoxId(warehousingRecordFormDTO.getBoxId()); |
|
|
|
|
|
|
|
|
|
|
|
String location = warehousingRecordFormDTO.getLocation(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String prefix = reagentConsumables.getEnglishName() + "-" + year + "-" + location.charAt(1) + "-"; |
|
|
|
//更新格子信息(标准物质传入对象ID)
|
|
|
|
|
|
|
|
remoteCabinetService.updateCabinet(latticeId, referenceMaterial.getId(), "1"); |
|
|
|
|
|
|
|
|
|
|
|
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query() |
|
|
|
String location = warehousingRecordFormDTO.getLocation(); |
|
|
|
.likeRight("number", prefix) |
|
|
|
|
|
|
|
.orderByDesc("number")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int newNo = 1; |
|
|
|
String prefix = reagentConsumables.getEnglishName() + "-" + year + "-" + location.charAt(1) + "-"; |
|
|
|
|
|
|
|
|
|
|
|
if ((list != null) && (list.size() > 0)) { |
|
|
|
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query() |
|
|
|
ReferenceMaterial referenceMaterial1 = list.get(0); |
|
|
|
.likeRight("number", prefix) |
|
|
|
String strMaxNo = StrUtil.removePrefixIgnoreCase(referenceMaterial1.getNumber(), prefix); |
|
|
|
.orderByDesc("number")); |
|
|
|
try { |
|
|
|
|
|
|
|
int maxno = Integer.parseUnsignedInt(strMaxNo); |
|
|
|
|
|
|
|
newNo = maxno + 1; |
|
|
|
|
|
|
|
} catch (NumberFormatException e) { |
|
|
|
|
|
|
|
// 如果后缀有非数字, 则无视之, 重头编码
|
|
|
|
|
|
|
|
newNo = 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
referenceMaterial.setNumber(prefix + String.format("%03d", newNo)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
referenceMaterialService.save(referenceMaterial); |
|
|
|
int newNo = 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((list != null) && (list.size() > 0)) { |
|
|
|
|
|
|
|
ReferenceMaterial referenceMaterial1 = list.get(0); |
|
|
|
|
|
|
|
String strMaxNo = StrUtil.removePrefixIgnoreCase(referenceMaterial1.getNumber(), prefix); |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
int maxno = Integer.parseUnsignedInt(strMaxNo); |
|
|
|
|
|
|
|
newNo = maxno + 1; |
|
|
|
|
|
|
|
} catch (NumberFormatException e) { |
|
|
|
|
|
|
|
// 如果后缀有非数字, 则无视之, 重头编码
|
|
|
|
|
|
|
|
newNo = 1; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
referenceMaterial.setNumber(prefix + String.format("%03d", newNo)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
referenceMaterialService.save(referenceMaterial); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
reagentConsumableInventoryService.save(reagentConsumableInventory); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
batchDetailsService.save(batchDetails); |
|
|
|
} |
|
|
|
} else { |
|
|
|
reagentConsumableInventoryService.save(reagentConsumableInventory); |
|
|
|
//如果仓库存在该物品
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (warehousingRecordFormDTO.getCode() != null) { |
|
|
|
batchDetailsService.save(batchDetails); |
|
|
|
one.setCode(warehousingRecordFormDTO.getCode()); |
|
|
|
} else { |
|
|
|
ReagentConsumables byId1 = reagentConsumablesService.getById(one.getReagentConsumableId()); |
|
|
|
//如果仓库存在该物品
|
|
|
|
byId1.setCode(one.getCode()); |
|
|
|
|
|
|
|
reagentConsumablesService.updateById(byId1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId, byId.getReagentConsumableId()); |
|
|
|
if (warehousingRecordFormDTO.getCode() != null) { |
|
|
|
|
|
|
|
one.setCode(warehousingRecordFormDTO.getCode()); |
|
|
|
|
|
|
|
ReagentConsumables byId1 = reagentConsumablesService.getById(one.getReagentConsumableId()); |
|
|
|
|
|
|
|
byId1.setCode(one.getCode()); |
|
|
|
|
|
|
|
reagentConsumablesService.updateById(byId1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
|
|
|
|
ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); |
|
|
|
reagentConsumablesLambdaQueryWrapper.eq(ReagentConsumables::getReagentConsumableId, byId.getReagentConsumableId()); |
|
|
|
|
|
|
|
|
|
|
|
BatchDetails batchDetails = new BatchDetails(); |
|
|
|
ReagentConsumables reagentConsumables = reagentConsumablesService.getOne(reagentConsumablesLambdaQueryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails); |
|
|
|
BatchDetails batchDetails = new BatchDetails(); |
|
|
|
|
|
|
|
|
|
|
|
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
BeanUtils.copyProperties(warehousingRecordFormDTO, batchDetails); |
|
|
|
batchDetails.setServiceStatus(1); |
|
|
|
|
|
|
|
batchDetails.setPurchaseTime(LocalDateTime.now()); |
|
|
|
|
|
|
|
batchDetails.setSupplierId(byId.getSupplierId()); |
|
|
|
|
|
|
|
batchDetails.setExpirationDate(warehousingRecordFormDTO.getExpirationDate()); |
|
|
|
|
|
|
|
batchDetails.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId()); |
|
|
|
|
|
|
|
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity() * Integer.valueOf(one.getPackagedCopies())); |
|
|
|
|
|
|
|
batchDetails.setWarehousingBatchListId(warehousingBatchList.getId()); |
|
|
|
|
|
|
|
warehousingBatchList.setBatchId(batchDetails.getBatchDetailsId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId()) |
|
|
|
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
.eq("supplier_id", byId.getSupplierId())); |
|
|
|
batchDetails.setServiceStatus(1); |
|
|
|
|
|
|
|
batchDetails.setPurchaseTime(LocalDateTime.now()); |
|
|
|
|
|
|
|
batchDetails.setSupplierId(byId.getSupplierId()); |
|
|
|
|
|
|
|
batchDetails.setExpirationDate(warehousingRecordFormDTO.getExpirationDate()); |
|
|
|
|
|
|
|
batchDetails.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId()); |
|
|
|
|
|
|
|
batchDetails.setQuantity(warehousingRecordFormDTO.getQuantity() * Integer.valueOf(one.getPackagedCopies())); |
|
|
|
|
|
|
|
batchDetails.setWarehousingBatchListId(warehousingBatchList.getId()); |
|
|
|
|
|
|
|
warehousingBatchList.setBatchId(batchDetails.getBatchDetailsId()); |
|
|
|
|
|
|
|
|
|
|
|
if (batchDetailsList.size() == 0) { |
|
|
|
|
|
|
|
batchDetails.setBatch(1); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
batchDetails.setBatch(batchDetailsList.size() + 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (one.getCategory().equals("试剂") | one.getCategory().equals("耗材")) { |
|
|
|
|
|
|
|
batchDetails.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
|
|
|
|
batchDetails.setLatticeId(warehousingRecordFormDTO.getLatticeId()); |
|
|
|
|
|
|
|
batchDetails.setBoxId(warehousingRecordFormDTO.getBoxId()); |
|
|
|
|
|
|
|
//更新格子信息(试剂耗材传入类ID)
|
|
|
|
|
|
|
|
remoteCabinetService.updateCabinet(latticeId, byId.getReagentConsumableId(), "1"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
one.setTotalQuantity(one.getTotalQuantity() + batchDetails.getQuantity()); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
one.setWarningValue(warehousingRecordFormDTO.getWarningValue()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (one.getCategory().equals("标准物质")) { |
|
|
|
int year = calendar.get(Calendar.YEAR); |
|
|
|
|
|
|
|
|
|
|
|
for (int j = 0; j < batchDetails.getQuantity(); j++) { |
|
|
|
Integer years = Integer.valueOf(year); |
|
|
|
|
|
|
|
|
|
|
|
ReferenceMaterial referenceMaterial = new ReferenceMaterial(); |
|
|
|
|
|
|
|
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId()); |
|
|
|
|
|
|
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId()); |
|
|
|
|
|
|
|
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId()); |
|
|
|
|
|
|
|
referenceMaterial.setStatus(0); |
|
|
|
|
|
|
|
referenceMaterial.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
|
|
|
|
referenceMaterial.setLatticeId(warehousingRecordFormDTO.getLatticeId()); |
|
|
|
|
|
|
|
referenceMaterial.setBoxId(warehousingRecordFormDTO.getBoxId()); |
|
|
|
|
|
|
|
referenceMaterial.setCustodianName(warehousingRecordFormDTO.getCustodianName()); |
|
|
|
|
|
|
|
//更新格子信息(试剂耗材传入类ID)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
remoteCabinetService.updateCabinet(latticeId, referenceMaterial.getId(), "1"); |
|
|
|
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId()) |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
.eq("supplier_id", byId.getSupplierId()) |
|
|
|
|
|
|
|
.like( "batch",years)); |
|
|
|
|
|
|
|
|
|
|
|
int year = calendar.get(Calendar.YEAR); |
|
|
|
if (batchDetailsList.size() == 0) { |
|
|
|
|
|
|
|
batchDetails.setBatch(year + "-" + 1); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Integer x = batchDetailsList.size() + 1; |
|
|
|
|
|
|
|
batchDetails.setBatch(year + "-" +x ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (one.getCategory().equals("试剂") | one.getCategory().equals("耗材")) { |
|
|
|
|
|
|
|
batchDetails.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
|
|
|
|
batchDetails.setLatticeId(warehousingRecordFormDTO.getLatticeId()); |
|
|
|
|
|
|
|
batchDetails.setBoxId(warehousingRecordFormDTO.getBoxId()); |
|
|
|
|
|
|
|
//更新格子信息(试剂耗材传入类ID)
|
|
|
|
|
|
|
|
remoteCabinetService.updateCabinet(latticeId, byId.getReagentConsumableId(), "1"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String location = warehousingRecordFormDTO.getLocation(); |
|
|
|
one.setTotalQuantity(one.getTotalQuantity() + batchDetails.getQuantity()); |
|
|
|
|
|
|
|
one.setWarningValue(warehousingRecordFormDTO.getWarningValue()); |
|
|
|
|
|
|
|
|
|
|
|
String prefix = reagentConsumables.getEnglishName() + "-" + year + "-" + location.charAt(1) + "-"; |
|
|
|
if (one.getCategory().equals("标准物质")) { |
|
|
|
|
|
|
|
|
|
|
|
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query() |
|
|
|
for (int j = 0; j < batchDetails.getQuantity(); j++) { |
|
|
|
.likeRight("number", prefix) |
|
|
|
|
|
|
|
.orderByDesc("number")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int newNo = 1; |
|
|
|
ReferenceMaterial referenceMaterial = new ReferenceMaterial(); |
|
|
|
|
|
|
|
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
referenceMaterial.setReagentConsumableId(one.getReagentConsumableId()); |
|
|
|
|
|
|
|
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId()); |
|
|
|
|
|
|
|
referenceMaterial.setReagentConsumableInventoryId(one.getReagentConsumableInventoryId()); |
|
|
|
|
|
|
|
referenceMaterial.setStatus(0); |
|
|
|
|
|
|
|
referenceMaterial.setLocation(warehousingRecordFormDTO.getLocation()); |
|
|
|
|
|
|
|
referenceMaterial.setLatticeId(warehousingRecordFormDTO.getLatticeId()); |
|
|
|
|
|
|
|
referenceMaterial.setBoxId(warehousingRecordFormDTO.getBoxId()); |
|
|
|
|
|
|
|
referenceMaterial.setCustodianName(warehousingRecordFormDTO.getCustodianName()); |
|
|
|
|
|
|
|
//更新格子信息(试剂耗材传入类ID)
|
|
|
|
|
|
|
|
|
|
|
|
if ((list != null) && (list.size() > 0)) { |
|
|
|
remoteCabinetService.updateCabinet(latticeId, referenceMaterial.getId(), "1"); |
|
|
|
ReferenceMaterial referenceMaterial1 = list.get(0); |
|
|
|
|
|
|
|
String strMaxNo = StrUtil.removePrefixIgnoreCase(referenceMaterial1.getNumber(), prefix); |
|
|
|
String location = warehousingRecordFormDTO.getLocation(); |
|
|
|
try { |
|
|
|
|
|
|
|
int maxno = Integer.parseUnsignedInt(strMaxNo); |
|
|
|
String prefix = reagentConsumables.getEnglishName() + "-" + year + "-" + location.charAt(1) + "-"; |
|
|
|
newNo = maxno + 1; |
|
|
|
|
|
|
|
} catch (NumberFormatException e) { |
|
|
|
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query() |
|
|
|
// 如果后缀有非数字, 则无视之, 重头编码
|
|
|
|
.likeRight("number", prefix) |
|
|
|
newNo = 1; |
|
|
|
.orderByDesc("number")); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
int newNo = 1; |
|
|
|
referenceMaterial.setNumber(prefix + String.format("%03d", newNo)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
referenceMaterialService.save(referenceMaterial); |
|
|
|
if ((list != null) && (list.size() > 0)) { |
|
|
|
|
|
|
|
ReferenceMaterial referenceMaterial1 = list.get(0); |
|
|
|
|
|
|
|
String strMaxNo = StrUtil.removePrefixIgnoreCase(referenceMaterial1.getNumber(), prefix); |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
int maxno = Integer.parseUnsignedInt(strMaxNo); |
|
|
|
|
|
|
|
newNo = maxno + 1; |
|
|
|
|
|
|
|
} catch (NumberFormatException e) { |
|
|
|
|
|
|
|
// 如果后缀有非数字, 则无视之, 重头编码
|
|
|
|
|
|
|
|
newNo = 1; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
referenceMaterial.setNumber(prefix + String.format("%03d", newNo)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
referenceMaterialService.save(referenceMaterial); |
|
|
|
} |
|
|
|
} |
|
|
|
reagentConsumableInventoryService.updateById(one); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
batchDetailsService.save(batchDetails); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
warehousingBatchListService.save(warehousingBatchList); |
|
|
|
reagentConsumableInventoryService.updateById(one); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
batchDetailsService.save(batchDetails); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
warehousingBatchListService.save(warehousingBatchList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<WarehousingContent> warehousingContentLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
LambdaQueryWrapper<WarehousingContent> warehousingContentLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
|
|
|
|
WarehousingContent byId = warehousingContentService.getById(warehousingRecordFormDTOList.get(0).getWarehousingContentId()); |
|
|
|
WarehousingContent byId1 = warehousingContentService.getById(warehousingRecordFormDTO.getWarehousingContentId()); |
|
|
|
|
|
|
|
|
|
|
|
String warehousingRecordFormId = byId.getWarehousingRecordFormId(); |
|
|
|
String warehousingRecordFormId = byId1.getWarehousingRecordFormId(); |
|
|
|
|
|
|
|
|
|
|
|
warehousingContentLambdaQueryWrapper.eq(WarehousingContent::getWarehousingRecordFormId, warehousingRecordFormId); |
|
|
|
warehousingContentLambdaQueryWrapper.eq(WarehousingContent::getWarehousingRecordFormId, warehousingRecordFormId); |
|
|
|
|
|
|
|
|
|
|
|
List<WarehousingContent> list = warehousingContentService.list(warehousingContentLambdaQueryWrapper); |
|
|
|
List<WarehousingContent> list = warehousingContentService.list(warehousingContentLambdaQueryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
WarehousingRecordForm warehousingRecordForm = warehousingRecordFormService.getById(warehousingRecordFormId); |
|
|
|
WarehousingRecordForm warehousingRecordForm = this.getById(warehousingRecordFormId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//遍历采购内容,判断试剂耗材是否入库完毕
|
|
|
|
//遍历采购内容,判断试剂耗材是否入库完毕
|
|
|
|
for (WarehousingContent warehousingContent : list) { |
|
|
|
for (WarehousingContent warehousingContent : list) { |
|
|
|
|
|
|
|
|
|
|
|
if (warehousingContent.getWarehousingQuantity()== warehousingContent.getTotalQuantity()) { |
|
|
|
if (warehousingContent.getWarehousingQuantity() == warehousingContent.getTotalQuantity()) { |
|
|
|
|
|
|
|
|
|
|
|
warehousingContent.setStatus(1); |
|
|
|
warehousingContent.setStatus(1); |
|
|
|
|
|
|
|
|
|
|
@ -434,7 +420,6 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec |
|
|
|
|
|
|
|
|
|
|
|
List<SupplierInformation> supplierInformations = new ArrayList<>(); |
|
|
|
List<SupplierInformation> supplierInformations = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//创建供应商评价表
|
|
|
|
//创建供应商评价表
|
|
|
|
/* |
|
|
|
/* |
|
|
|
通过循环签收内容,获得所有的供应商列表 |
|
|
|
通过循环签收内容,获得所有的供应商列表 |
|
|
@ -467,9 +452,9 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec |
|
|
|
warehousingRecordForm.setStatus(1); |
|
|
|
warehousingRecordForm.setStatus(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
warehousingRecordFormService.updateById(warehousingRecordForm); |
|
|
|
this.updateById(warehousingRecordForm); |
|
|
|
|
|
|
|
|
|
|
|
WarehousingRecordFormVO warehousingRecordFormVO = warehousingRecordFormService.getWarehousingRecordFormVO(warehousingRecordFormId); |
|
|
|
WarehousingRecordFormVO warehousingRecordFormVO = this.getWarehousingRecordFormVO(warehousingRecordFormId); |
|
|
|
|
|
|
|
|
|
|
|
return warehousingRecordFormVO; |
|
|
|
return warehousingRecordFormVO; |
|
|
|
} |
|
|
|
} |
|
|
@ -503,7 +488,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec |
|
|
|
|
|
|
|
|
|
|
|
public List<PurchaseRequestPrintVO> getPurchaseRequestPrint(String id) { |
|
|
|
public List<PurchaseRequestPrintVO> getPurchaseRequestPrint(String id) { |
|
|
|
|
|
|
|
|
|
|
|
WarehousingRecordForm byId = warehousingRecordFormService.getById(id); |
|
|
|
WarehousingRecordForm byId = this.getById(id); |
|
|
|
|
|
|
|
|
|
|
|
List<WarehousingContent> warehousingContentList = warehousingContentService.list(Wrappers.<WarehousingContent>query().eq("warehousing_record_form_id", id)); |
|
|
|
List<WarehousingContent> warehousingContentList = warehousingContentService.list(Wrappers.<WarehousingContent>query().eq("warehousing_record_form_id", id)); |
|
|
|
|
|
|
|
|
|
|
|