Merge branch 'refs/heads/dev' into dev_WMS20260401
# Conflicts: # mhd_wms/src/main/java/com/mhd/wms/domain/stockShelfOrder/service/StockShelfOrderDomainService.java
This commit is contained in:
+5
-1
@@ -2,6 +2,7 @@ package com.mhd.wms.interfaces.dto.stockReceiptOrder;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.wms.domain.receiptOrderAccount.entity.ReceiptOrderAccount;
|
||||
import com.mhd.wms.interfaces.dto.receiptMaterialDetail.ReceiptMaterialDetailDTO;
|
||||
import com.mhd.wms.interfaces.dto.stockInOrder.StockInOrderBaseDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -152,4 +153,7 @@ public class StockReceiptOrderDTO extends StockInOrderBaseDTO {
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
}
|
||||
|
||||
@ApiModelProperty("费用")
|
||||
List<ReceiptOrderAccount> receiptOrderAccountList;
|
||||
}
|
||||
+6
-2
@@ -1,6 +1,7 @@
|
||||
package com.mhd.wms.interfaces.facadeApi.materialBaseInfo;
|
||||
|
||||
import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
@@ -54,11 +55,14 @@ public class MaterialBaseInfoApi extends BaseController {
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody MaterialBaseInfoFeign materialBaseInfoDTO)
|
||||
{
|
||||
if (materialBaseInfoDTO == null) {
|
||||
throw new ServiceException("请求参数不能为空");
|
||||
}
|
||||
//转换实体
|
||||
MaterialBaseInfoDO materialBaseInfoDO = materialBaseInfoAssembler.toDO2(materialBaseInfoDTO);
|
||||
if(1 == materialBaseInfoDTO.getUpdateFeign()){
|
||||
if (Integer.valueOf(1).equals(materialBaseInfoDTO.getUpdateFeign())) {
|
||||
return toAjax(materialBaseInfoApplicationService.update(materialBaseInfoDO));
|
||||
}else {
|
||||
} else {
|
||||
return toAjax(materialBaseInfoApplicationService.insert(materialBaseInfoDO));
|
||||
}
|
||||
}
|
||||
|
||||
+15
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -79,6 +80,15 @@ public class MaterialInventoryApi extends BaseController {
|
||||
startPage();
|
||||
// 使用带批次属性的查询方法,批次属性值从库存表中获取
|
||||
List<MaterialInventoryPO> list = materialInventoryApplicationService.queryListWithBatchAttributes(materialInventoryDO);
|
||||
// 按更新时间倒序排序;update_time 为空的数据放最后
|
||||
list.sort((o1, o2) -> {
|
||||
Date t1 = o1.getUpdateTime();
|
||||
Date t2 = o2.getUpdateTime();
|
||||
if (t1 == null && t2 == null) return 0;
|
||||
if (t1 == null) return 1;
|
||||
if (t2 == null) return -1;
|
||||
return t2.compareTo(t1); // desc
|
||||
});
|
||||
TableDataInfo tableDataInfo = getDataTable(list);
|
||||
// 如果查询结果为空,抛出异常提示用户该物料在库存中不存在
|
||||
// if (tableDataInfo.getTotal() == 0) {
|
||||
@@ -136,6 +146,11 @@ public class MaterialInventoryApi extends BaseController {
|
||||
if(materialInventoryDTO.getMaterialInventoryId() != null){
|
||||
return toAjax(materialInventoryApplicationService.update(materialInventoryDO));
|
||||
}else {
|
||||
// 新增时补齐更新时间(update_time),避免新增数据 update_time 为空
|
||||
materialInventoryDO.setUpdateTime(new Date());
|
||||
// update_by/update_by_name 与 create_by/create_by_name 保持一致
|
||||
materialInventoryDO.setUpdateBy(materialInventoryDO.getCreateBy());
|
||||
materialInventoryDO.setUpdateByName(materialInventoryDO.getCreateByName());
|
||||
return toAjax(materialInventoryApplicationService.insert(materialInventoryDO));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user