解决合并冲突

This commit is contained in:
2025-12-10 14:20:24 +08:00
parent e1385cb3e6
commit 18f6a845e6
804 changed files with 61881 additions and 13577 deletions

View File

@@ -2,25 +2,16 @@ package com.openhis.web.departmentmanage.appservice.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.openhis.web.departmentmanage.mapper.DepartmentIssuanceOrderMapper;
import com.openhis.web.pharmacyDispensarymanage.dto.PharmacyDispensaryDetailDto;
import com.openhis.web.pharmacyDispensarymanage.dto.PharmacyDispensaryInitDto;
import com.openhis.web.pharmacyDispensarymanage.mapper.PharmacyDispensaryDispensingOrderMapper;
import com.openhis.workflow.domain.SupplyDelivery;
import com.openhis.workflow.service.ISupplyDeliveryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.utils.AssignSeqUtil;
import com.core.common.utils.MessageUtils;
import com.openhis.common.constant.CommonConstants;
import com.openhis.common.constant.PromptMsgConstant;
import com.openhis.common.enums.*;
import com.openhis.common.utils.EnumUtils;
import com.openhis.web.departmentmanage.appservice.IDepartmentCommonService;
@@ -28,8 +19,10 @@ import com.openhis.web.departmentmanage.appservice.IDepartmentIssuanceOrderServi
import com.openhis.web.departmentmanage.dto.DepartmentDetailDto;
import com.openhis.web.departmentmanage.dto.DepartmentInitDto;
import com.openhis.web.departmentmanage.mapper.DepartmentCommonMapper;
import com.openhis.web.inventorymanage.dto.ProductStocktakingInitDto;
import com.openhis.web.departmentmanage.mapper.DepartmentIssuanceOrderMapper;
import com.openhis.workflow.domain.SupplyDelivery;
import com.openhis.workflow.domain.SupplyRequest;
import com.openhis.workflow.service.ISupplyDeliveryService;
import com.openhis.workflow.service.ISupplyRequestService;
/**
@@ -55,6 +48,7 @@ public class DepartmentIssuanceOrderServiceImpl implements IDepartmentIssuanceOr
private DepartmentCommonMapper departmentCommonMapper;
@Autowired
private DepartmentIssuanceOrderMapper departmentIssuanceOrderMapper;
/**
* 初始化
*
@@ -67,15 +61,15 @@ public class DepartmentIssuanceOrderServiceImpl implements IDepartmentIssuanceOr
// 单据分类
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
supplyCategoryOption
.add(new DepartmentInitDto.IntegerOption(SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getValue(),
SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getInfo()));
supplyCategoryOption
.add(new DepartmentInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_DISPENSING.getValue(),
SupplyCategory.INPATIENT_PATIENT_DISPENSING.getInfo()));
supplyCategoryOption.add(
new DepartmentInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getValue(),
SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getInfo()));
// supplyCategoryOption
// .add(new DepartmentInitDto.IntegerOption(SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getValue(),
// SupplyCategory.OUTPATIENT_PATIENT_DISPENSING.getInfo()));
// supplyCategoryOption
// .add(new DepartmentInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_DISPENSING.getValue(),
// SupplyCategory.INPATIENT_PATIENT_DISPENSING.getInfo()));
// supplyCategoryOption.add(
// new DepartmentInitDto.IntegerOption(SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getValue(),
// SupplyCategory.INPATIENT_PATIENT_SUMMARY_DISPENSING.getInfo()));
issuanceOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
@@ -143,9 +137,8 @@ public class DepartmentIssuanceOrderServiceImpl implements IDepartmentIssuanceOr
.setStatusEnum(SupplyStatus.AGREE.getValue()).setCategoryEnum(item.getCategoryEnum())
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION).setItemId(item.getItemId())
.setUnitCode(item.getUnitCode()).setItemQuantity(item.getItemQuantity())
.setLotNumber(item.getLotNumber())
.setSourceTypeEnum(LocationForm.CABINET.getValue()).setSourceLocationId(item.getSourceLocationId())
.setPurposeTypeEnum(LocationForm.DEPARTMENT.getValue())
.setLotNumber(item.getLotNumber()).setSourceTypeEnum(LocationForm.CABINET.getValue())
.setSourceLocationId(item.getSourceLocationId()).setPurposeTypeEnum(LocationForm.DEPARTMENT.getValue())
.setPurposeLocationId(item.getPurposeLocationId()).setApplicantId(item.getApplicantId())
.setApplyTime(item.getApplyTime()).setApproverId(item.getApproverId())
.setApprovalTime(item.getApprovalTime());
@@ -156,9 +149,9 @@ public class DepartmentIssuanceOrderServiceImpl implements IDepartmentIssuanceOr
.setItemTable(supplyRequest.getItemTable()).setItemId(supplyRequest.getItemId())
.setBasedOnTable(CommonConstants.TableName.WOR_DEVICE_DISPENSE).setBasedOnIds(item.getDispenseIds())
.setUnitCode(supplyRequest.getUnitCode()).setQuantity(supplyRequest.getItemQuantity())
.setLotNumber(supplyRequest.getLotNumber())
.setPractitionerId(supplyRequest.getApplicantId()).setOccurrenceTime(supplyRequest.getApprovalTime())
.setReceiverId(supplyRequest.getPurposeLocationId()).setReceiveTime(supplyRequest.getApprovalTime());
.setLotNumber(supplyRequest.getLotNumber()).setPractitionerId(supplyRequest.getApplicantId())
.setOccurrenceTime(supplyRequest.getApprovalTime()).setReceiverId(supplyRequest.getPurposeLocationId())
.setReceiveTime(supplyRequest.getApprovalTime());
supplyDeliveryList.add(supplyDelivery);
}

View File

@@ -59,16 +59,16 @@ public class DepartmentProfitLossOrderServiceImpl implements IDepartmentProfitLo
// 单据分类
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.GENERAL_PROFIT_AND_LOSS.getValue(),
SupplyCategory.GENERAL_PROFIT_AND_LOSS.getInfo()));
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getValue(),
SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getInfo()));
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.STANDBY_RESCUE_MEDICINES.getValue(),
SupplyCategory.STANDBY_RESCUE_MEDICINES.getInfo()));
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getValue(),
SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getInfo()));
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.DONATED_MEDICINES.getValue(),
SupplyCategory.DONATED_MEDICINES.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.GENERAL_PROFIT_AND_LOSS.getValue(),
// SupplyCategory.GENERAL_PROFIT_AND_LOSS.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getValue(),
// SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.STANDBY_RESCUE_MEDICINES.getValue(),
// SupplyCategory.STANDBY_RESCUE_MEDICINES.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getValue(),
// SupplyCategory.DAMAGED_EXPIRED_MEDICINES.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.DONATED_MEDICINES.getValue(),
// SupplyCategory.DONATED_MEDICINES.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -58,10 +58,10 @@ public class DepartmentRequisitionOrderServiceImpl implements IDepartmentRequisi
// 单据分类
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
SupplyCategory.NORMAL.getInfo()));
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.PURCHASE_APPLICATION.getValue(),
SupplyCategory.PURCHASE_APPLICATION.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
// SupplyCategory.NORMAL.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.PURCHASE_APPLICATION.getValue(),
// SupplyCategory.PURCHASE_APPLICATION.getInfo()));
requisitionOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -24,7 +24,6 @@ import com.openhis.web.departmentmanage.appservice.IDepartmentReturnToWarehouseO
import com.openhis.web.departmentmanage.dto.DepartmentDetailDto;
import com.openhis.web.departmentmanage.dto.DepartmentInitDto;
import com.openhis.web.departmentmanage.mapper.DepartmentCommonMapper;
import com.openhis.web.departmentmanage.mapper.DepartmentReturnToWarehouseOrderMapper;
import com.openhis.web.inventorymanage.dto.ProductStocktakingInitDto;
import com.openhis.workflow.domain.SupplyRequest;
import com.openhis.workflow.service.ISupplyRequestService;
@@ -47,6 +46,7 @@ public class DepartmentReturnToWarehouseOrderServiceImpl implements IDepartmentR
private IDepartmentCommonService departmentCommonService;
@Autowired
private DepartmentCommonMapper departmentCommonMapper;
/**
* 初始化
*
@@ -59,8 +59,8 @@ public class DepartmentReturnToWarehouseOrderServiceImpl implements IDepartmentR
// 单据分类
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
SupplyCategory.NORMAL.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
// SupplyCategory.NORMAL.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
@@ -93,16 +93,14 @@ public class DepartmentReturnToWarehouseOrderServiceImpl implements IDepartmentR
List<DepartmentDetailDto.Option> unitList;
for (DepartmentDetailDto item : returnToDispensaryOrderDtoDetailPage.getRecords()) {
unitList = new ArrayList<>();
unitList.add(new DepartmentDetailDto.Option(item.getMaxUnitCode(),item.getMaxUnitCode_dictText()));
unitList.add(new DepartmentDetailDto.Option(item.getMinUnitCode(),item.getMinUnitCode_dictText()
));
unitList.add(new DepartmentDetailDto.Option(item.getMaxUnitCode(), item.getMaxUnitCode_dictText()));
unitList.add(new DepartmentDetailDto.Option(item.getMinUnitCode(), item.getMinUnitCode_dictText()));
item.setUnitList(unitList);
}
return R.ok(returnToDispensaryOrderDtoDetailPage);
}
/**
* 获取单据号
*
@@ -128,7 +126,8 @@ public class DepartmentReturnToWarehouseOrderServiceImpl implements IDepartmentR
@Override
public R<?> addOrEditReturnToWarehouseOrder(List<DepartmentDetailDto> returnToDispensaryOrderDtoList) {
// 请求数据取得
List<SupplyRequest> requestList = supplyRequestService.getSupplyByBusNo(returnToDispensaryOrderDtoList.get(0).getBusNo());
List<SupplyRequest> requestList =
supplyRequestService.getSupplyByBusNo(returnToDispensaryOrderDtoList.get(0).getBusNo());
if (!requestList.isEmpty()) {
// 请求id取得
List<Long> requestIdList = requestList.stream().map(SupplyRequest::getId).collect(Collectors.toList());

View File

@@ -24,7 +24,6 @@ import com.openhis.web.departmentmanage.appservice.IDepartmentStockInOrderServic
import com.openhis.web.departmentmanage.dto.DepartmentDetailDto;
import com.openhis.web.departmentmanage.dto.DepartmentInitDto;
import com.openhis.web.departmentmanage.mapper.DepartmentCommonMapper;
import com.openhis.web.departmentmanage.mapper.DepartmentStockInOrderMapper;
import com.openhis.web.inventorymanage.dto.ProductStocktakingInitDto;
import com.openhis.workflow.domain.SupplyRequest;
import com.openhis.workflow.service.ISupplyRequestService;
@@ -60,8 +59,8 @@ public class DepartmentStockInOrderServiceImpl implements IDepartmentStockInOrde
// 单据分类
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
SupplyCategory.NORMAL.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
// SupplyCategory.NORMAL.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
@@ -134,10 +133,11 @@ public class DepartmentStockInOrderServiceImpl implements IDepartmentStockInOrde
// 单据信息删除
supplyRequestService.removeByIds(requestIdList);
}
//添加原始单据号
if(stockInOrderDtoList.get(0).getOriginalBusNo()!=null){
// 添加原始单据号
if (stockInOrderDtoList.get(0).getOriginalBusNo() != null) {
// 审批单据并返回单据详情
List<SupplyRequest> agreedList = supplyRequestService.addOriginalBusNo(stockInOrderDtoList.get(0).getOriginalBusNo(), stockInOrderDtoList.get(0).getBusNo());
List<SupplyRequest> agreedList = supplyRequestService
.addOriginalBusNo(stockInOrderDtoList.get(0).getOriginalBusNo(), stockInOrderDtoList.get(0).getBusNo());
if (agreedList.isEmpty()) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
}
@@ -156,8 +156,9 @@ public class DepartmentStockInOrderServiceImpl implements IDepartmentStockInOrde
.setTraceNo(item.getTraceNo()).setTraceNoUnitCode(item.getTraceNoUnitCode())
.setSupplierId(item.getSupplierId()).setReason(item.getReason())
.setSourceTypeEnum(LocationForm.WAREHOUSE.getValue()).setSourceLocationId(item.getSourceLocationId())
.setPurposeTypeEnum(LocationForm.DEPARTMENT.getValue()).setPurposeLocationId(item.getPurposeLocationId())
.setApplicantId(item.getApplicantId()).setApplyTime(applyTime).setRemake(item.getRemake());
.setPurposeTypeEnum(LocationForm.DEPARTMENT.getValue())
.setPurposeLocationId(item.getPurposeLocationId()).setApplicantId(item.getApplicantId())
.setApplyTime(applyTime).setRemake(item.getRemake());
supplyRequestList.add(supplyRequest);
}
// 更新请求表

View File

@@ -60,10 +60,10 @@ public class DepartmentStocktakingOrderServiceImpl implements IDepartmentStockta
// 单据分类
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(
SupplyCategory.GENERAL_STOCKTAKING.getValue(), SupplyCategory.GENERAL_STOCKTAKING.getInfo()));
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(
SupplyCategory.MONTHLY_STOCKTAKING.getValue(), SupplyCategory.MONTHLY_STOCKTAKING.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(
// SupplyCategory.GENERAL_STOCKTAKING.getValue(), SupplyCategory.GENERAL_STOCKTAKING.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(
// SupplyCategory.MONTHLY_STOCKTAKING.getValue(), SupplyCategory.MONTHLY_STOCKTAKING.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -24,7 +24,6 @@ import com.openhis.web.departmentmanage.appservice.IDepartmentTransferInOrderSer
import com.openhis.web.departmentmanage.dto.DepartmentDetailDto;
import com.openhis.web.departmentmanage.dto.DepartmentInitDto;
import com.openhis.web.departmentmanage.mapper.DepartmentCommonMapper;
import com.openhis.web.departmentmanage.mapper.DepartmentTransferInOrderMapper;
import com.openhis.web.inventorymanage.dto.ProductStocktakingInitDto;
import com.openhis.workflow.domain.SupplyRequest;
import com.openhis.workflow.service.ISupplyRequestService;
@@ -59,8 +58,8 @@ public class DepartmentTransferInOrderServiceImpl implements IDepartmentTransfer
// 单据分类
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
SupplyCategory.NORMAL.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
// SupplyCategory.NORMAL.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);
@@ -127,7 +126,8 @@ public class DepartmentTransferInOrderServiceImpl implements IDepartmentTransfer
@Override
public R<?> addOrEditTransferInOrder(List<DepartmentDetailDto> transferInOrderDtoList) {
// 请求数据取得
List<SupplyRequest> requestList = supplyRequestService.getSupplyByBusNo(transferInOrderDtoList.get(0).getBusNo());
List<SupplyRequest> requestList =
supplyRequestService.getSupplyByBusNo(transferInOrderDtoList.get(0).getBusNo());
if (!requestList.isEmpty()) {
// 请求id取得
List<Long> requestIdList = requestList.stream().map(SupplyRequest::getId).collect(Collectors.toList());
@@ -149,8 +149,8 @@ public class DepartmentTransferInOrderServiceImpl implements IDepartmentTransfer
.setTraceNoUnitCode(item.getTraceNoUnitCode()).setSupplierId(item.getSupplierId())
.setReason(item.getReason()).setSourceTypeEnum(LocationForm.DEPARTMENT.getValue())
.setSourceLocationId(item.getSourceLocationId()).setPurposeTypeEnum(LocationForm.DEPARTMENT.getValue())
.setPurposeLocationId(item.getPurposeLocationId())
.setApplicantId(item.getApplicantId()).setApplyTime(applyTime).setRemake(item.getRemake());
.setPurposeLocationId(item.getPurposeLocationId()).setApplicantId(item.getApplicantId())
.setApplyTime(applyTime).setRemake(item.getRemake());
supplyRequestList.add(supplyRequest);
}
// 更新请求表

View File

@@ -59,8 +59,8 @@ public class DepartmentTransferOutOrderServiceImpl implements IDepartmentTransfe
// 单据分类
List<DepartmentInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
SupplyCategory.NORMAL.getInfo()));
// supplyCategoryOption.add(new DepartmentInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
// SupplyCategory.NORMAL.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);