Merge branch 'develop' of https://gitea.gentronhealth.com/wangyizhe/his into develop
This commit is contained in:
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.openhis.infectious.domain.InfectiousAudit;
|
||||
@@ -558,6 +559,15 @@ public class CardManageAppServiceImpl implements ICardManageAppService {
|
||||
card.setUpdateTime(new Date());
|
||||
card.setUpdateBy(loginUser.getUsername()); // 使用username作为更新者
|
||||
|
||||
card.setUpdateTime(new Date());
|
||||
card.setUpdateBy(loginUser.getUsername()); // 使用 username 作为更新者
|
||||
|
||||
card.setUpdateTime(new Date());
|
||||
card.setUpdateBy(loginUser.getUsername()); // 使用 username 作为更新者
|
||||
|
||||
card.setUpdateTime(new Date());
|
||||
card.setUpdateBy(loginUser.getUsername()); // 使用 username 作为更新者
|
||||
|
||||
int rows = infectiousCardMapper.updateById(card);
|
||||
if (rows > 0) {
|
||||
return R.ok("更新成功");
|
||||
|
||||
@@ -70,6 +70,14 @@ public interface IPurchaseInventoryAppService {
|
||||
*/
|
||||
R<?> deleteReceipt(List<Long> supplyRequestIds);
|
||||
|
||||
/**
|
||||
* 根据单据号删除单据
|
||||
*
|
||||
* @param busNoList 单据号列表
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> deleteReceiptByBusNo(List<String> busNoList);
|
||||
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
|
||||
@@ -271,6 +271,33 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单据号删除单据
|
||||
*
|
||||
* @param busNoList 单据号列表
|
||||
* @return 操作结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> deleteReceiptByBusNo(List<String> busNoList) {
|
||||
// 收集所有需要删除的 supplyRequestId
|
||||
List<Long> allRequestIdList = new ArrayList<>();
|
||||
for (String busNo : busNoList) {
|
||||
List<SupplyRequest> supplyRequestIdList = supplyRequestService.getSupplyByBusNo(busNo);
|
||||
List<Long> requestIdList = supplyRequestIdList.stream()
|
||||
.map(SupplyRequest::getId)
|
||||
.toList();
|
||||
allRequestIdList.addAll(requestIdList);
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
if (!allRequestIdList.isEmpty()) {
|
||||
boolean result = supplyRequestService.removeByIds(allRequestIdList);
|
||||
return result ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null))
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
|
||||
@@ -102,6 +102,17 @@ public class PurchaseInventoryController {
|
||||
return purchaseInventoryAppService.deleteReceipt(supplyRequestIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单据号删除单据
|
||||
*
|
||||
* @param busNoList 单据号列表
|
||||
* @return 操作结果
|
||||
*/
|
||||
@DeleteMapping("/inventory-receipt-by-bus-no")
|
||||
public R<?> deleteInventoryReceiptByBusNo(@RequestParam List<String> busNoList) {
|
||||
return purchaseInventoryAppService.deleteReceiptByBusNo(busNoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
|
||||
@@ -551,7 +551,7 @@
|
||||
|
||||
<script setup name="InventoryReceiptDialog">
|
||||
import {
|
||||
addPurchaseinventory,
|
||||
addPurchaseInventory,
|
||||
delPurchaseinventory,
|
||||
getCount,
|
||||
getDispensaryList,
|
||||
@@ -755,7 +755,7 @@ function handleClickOutside(event) {
|
||||
|
||||
function saveRow(row, index) {
|
||||
form.purchaseinventoryList[index] = row;
|
||||
addPurchaseinventory(row).then((response) => {
|
||||
addPurchaseInventory(row).then((response) => {
|
||||
reset();
|
||||
data.isAdding = false; // 允许新增下一行
|
||||
proxy.$message.success('保存成功!');
|
||||
@@ -846,7 +846,7 @@ function handleSave(row, index) {
|
||||
if (valid) {
|
||||
proxy.$refs['formRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
addPurchaseinventory(row).then((res) => {
|
||||
addPurchaseInventory(row).then((res) => {
|
||||
// 当前行没有id视为首次新增
|
||||
if (!row.id) {
|
||||
data.isAdding = false; // 允许新增下一行
|
||||
|
||||
@@ -19,7 +19,7 @@ export function getpurchaseInventoryDetail(busNo) {
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addPurchaseinventory(data) {
|
||||
export function addPurchaseInventory(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'put',
|
||||
@@ -45,7 +45,7 @@ export function getInitBusNo() {
|
||||
}
|
||||
|
||||
|
||||
// 删除单据
|
||||
// 删除单据(根据供应请求 ID)
|
||||
export function delPurchaseinventory(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt?supplyRequestIds=' + param,
|
||||
@@ -53,6 +53,14 @@ export function delPurchaseinventory(param) {
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单据(根据单据号)
|
||||
export function delPurchaseinventoryByBusNo(busNoList) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt-by-bus-no?busNoList=' + busNoList,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
|
||||
<script setup name="Purchaseinventory">
|
||||
import {
|
||||
delPurchaseinventory,
|
||||
delPurchaseinventoryByBusNo,
|
||||
generatedReturnDetail,
|
||||
getInit,
|
||||
getpurchaseInventoryDetail,
|
||||
@@ -644,18 +644,14 @@ function handleSelectionChangeReturn(selection) {
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
let length = selectedRows.value.length;
|
||||
let ids = [];
|
||||
if (selectedRows.value[0].id) {
|
||||
ids = selectedRows.value.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
}
|
||||
const deleteIds = selectedRows.value.map((item) => item.supplierId).join(',');
|
||||
// 获取选中行的单据号列表
|
||||
const busNoList = selectedRows.value.map((item) => item.supplyBusNo);
|
||||
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除以上数据?')
|
||||
.then(function () {
|
||||
return delPurchaseinventory(ids);
|
||||
// 调用后端接口,根据单据号删除
|
||||
return delPurchaseinventoryByBusNo(busNoList);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
|
||||
Reference in New Issue
Block a user