Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -5,7 +5,7 @@ import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.system.api.domain.MaterialBaseInfoFeign;
|
||||
import com.mhd.system.api.domain.MaterialInventoryDTO;
|
||||
import com.mhd.system.api.domain.NoticeOrderDTO;
|
||||
import com.mhd.system.api.factory.RemoteTicketFeignFallbackFactory;
|
||||
import com.mhd.system.api.factory.RemoteWmsFallbackFactory;
|
||||
import com.mhd.system.api.feign.FeignAutoConfiguration;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -18,7 +18,7 @@ import java.util.Map;
|
||||
* @description: TODO
|
||||
* @date 2024/5/10 8:58
|
||||
**/
|
||||
@FeignClient(contextId = "remoteWmsServiceFeign", value = ServiceNameConstants.WMS_SERVICE, fallbackFactory = RemoteTicketFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||
@FeignClient(contextId = "remoteWmsServiceFeign", value = ServiceNameConstants.WMS_SERVICE, fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||
public interface WmsServiceFeign {
|
||||
|
||||
/**
|
||||
|
||||
+10
@@ -211,5 +211,15 @@ public class MaterialBaseInfoFeign extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("币制")
|
||||
private String currency;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("复合条件查询 物料名称 物料编码 物料条码")
|
||||
private String compoundOrQuery;
|
||||
|
||||
@ApiModelProperty("批次ID")
|
||||
private Long batchId;
|
||||
}
|
||||
|
||||
|
||||
+116
-2
@@ -1,6 +1,7 @@
|
||||
package com.mhd.basic.domain.materialBaseInfo.repository.persistence;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.nacos.client.naming.utils.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.basic.domain.batch.entity.Batch;
|
||||
@@ -14,7 +15,7 @@ import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.WmsServiceFeign;
|
||||
import com.mhd.system.api.domain.MaterialBaseInfoFeign;
|
||||
import com.mhd.system.api.domain.*;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -24,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 物料基础信息Service业务层处理
|
||||
@@ -87,7 +89,7 @@ public class MaterialBaseInfoImpl extends ServiceImpl<MaterialBaseInfoMapper, Ma
|
||||
* @param materialBaseInfoDO
|
||||
*/
|
||||
public void synchMaterialBaseInfo(MaterialBaseInfoDO materialBaseInfoDO, Integer updateFeign){
|
||||
MaterialBaseInfoFeign materialBaseInfoFeign = JSONUtil.toBean(JSONUtil.toJsonStr(materialBaseInfoDO), MaterialBaseInfoFeign.class);
|
||||
MaterialBaseInfoFeign materialBaseInfoFeign = toFeign(materialBaseInfoDO);
|
||||
materialBaseInfoFeign.setUpdateFeign(updateFeign);
|
||||
AjaxResult ajaxResult = wmsServiceFeign.edit(materialBaseInfoFeign);
|
||||
if (!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
@@ -95,6 +97,118 @@ public class MaterialBaseInfoImpl extends ServiceImpl<MaterialBaseInfoMapper, Ma
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 DO 转换为 Feign 对象(深拷贝)
|
||||
*/
|
||||
public MaterialBaseInfoFeign toFeign(MaterialBaseInfoDO source) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
MaterialBaseInfoFeign target = new MaterialBaseInfoFeign();
|
||||
|
||||
// 1. 复制基本属性(所有非集合字段)
|
||||
copyBasicProperties(source, target);
|
||||
|
||||
// 2. 深拷贝嵌套对象
|
||||
target.setMaterialGoodsRule(copyMaterialGoodsRule(source.getMaterialGoodsRule()));
|
||||
target.setMaterialCommon(copyMaterialCommon(source.getMaterialCommon()));
|
||||
target.setMaterialWarehouseControl(copyMaterialWarehouseControl(source.getMaterialWarehouseControl()));
|
||||
target.setMaterialInventoryWarningList(copyMaterialInventoryWarningList(source.getMaterialInventoryWarningList()));
|
||||
target.setMaterialBarCodeList(copyMaterialBarCodeList(source.getMaterialBarCodeList()));
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制基本属性
|
||||
*/
|
||||
private void copyBasicProperties(MaterialBaseInfoDO source, MaterialBaseInfoFeign target) {
|
||||
// 使用 Spring 的 BeanUtils 复制基本字段
|
||||
BeanUtils.copyProperties(source, target);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 深拷贝商品规则
|
||||
*/
|
||||
private MaterialGoodsRuleFeign copyMaterialGoodsRule(MaterialGoodsRuleFeign source) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
MaterialGoodsRuleFeign target = new MaterialGoodsRuleFeign();
|
||||
BeanUtils.copyProperties(source, target);
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* 深拷贝公共信息
|
||||
*/
|
||||
private MaterialCommonFeign copyMaterialCommon(MaterialCommonFeign source) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
MaterialCommonFeign target = new MaterialCommonFeign();
|
||||
BeanUtils.copyProperties(source, target);
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* 深拷贝仓库控制信息
|
||||
*/
|
||||
private MaterialWarehouseControlFeign copyMaterialWarehouseControl(MaterialWarehouseControlFeign source) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
MaterialWarehouseControlFeign target = new MaterialWarehouseControlFeign();
|
||||
BeanUtils.copyProperties(source, target);
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* 深拷贝库存预警列表
|
||||
*/
|
||||
private List<MaterialInventoryWarningFeign> copyMaterialInventoryWarningList(List<MaterialInventoryWarningFeign> sourceList) {
|
||||
if (CollectionUtils.isEmpty(sourceList)) {
|
||||
return null;
|
||||
}
|
||||
return sourceList.stream()
|
||||
.map(source -> {
|
||||
MaterialInventoryWarningFeign target = new MaterialInventoryWarningFeign();
|
||||
BeanUtils.copyProperties(source, target);
|
||||
return target;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 深拷贝条码列表
|
||||
*/
|
||||
private List<MaterialBarCodeFeign> copyMaterialBarCodeList(List<MaterialBarCodeFeign> sourceList) {
|
||||
if (CollectionUtils.isEmpty(sourceList)) {
|
||||
return null;
|
||||
}
|
||||
return sourceList.stream()
|
||||
.map(source -> {
|
||||
MaterialBarCodeFeign target = new MaterialBarCodeFeign();
|
||||
BeanUtils.copyProperties(source, target);
|
||||
return target;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量转换(如果有需要)
|
||||
*/
|
||||
public List<MaterialBaseInfoFeign> toFeignList(List<MaterialBaseInfoDO> sourceList) {
|
||||
if (CollectionUtils.isEmpty(sourceList)) {
|
||||
return null;
|
||||
}
|
||||
return sourceList.stream()
|
||||
.map(this::toFeign)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 校验唯一
|
||||
* @author ZhouGY
|
||||
|
||||
@@ -14,20 +14,20 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# server-addr: 10.33.0.129:6010
|
||||
server-addr: 10.33.0.129:6010
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
# server-addr: 10.102.192.5:6848
|
||||
# username: nacos
|
||||
# password: manhuoda@2023
|
||||
#线上正式环境
|
||||
# server-addr: 10.102.192.105:6848
|
||||
config:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# server-addr: 10.33.0.129:6010
|
||||
server-addr: 10.33.0.129:6010
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
# server-addr: 10.102.192.5:6848
|
||||
# username: nacos
|
||||
# password: manhuoda@2023
|
||||
#线上正式环境
|
||||
# server-addr: 10.102.192.105:6848
|
||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||
|
||||
+9
-26
@@ -381,7 +381,7 @@ public class StockReceiptOrderApplicationService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 扁平化明细:将第一条子项变为主行,两条子项收货数量累加到主行 ALREADY_RECEIPT_QUANTITY,主行展示第一条子项的批次属性(收货时修改的值)
|
||||
* 扁平化明细:主行保留自身 receiptQuantity,alreadyReceiptQuantity 汇总主行+所有子项;保留父子结构,子项作为 children 展示
|
||||
* @param receiptMaterialDetailPOList 物料明细列表(树形,level 1 父级含 children)
|
||||
*/
|
||||
private void flattenMaterialDetailList(List<ReceiptMaterialDetailPO> receiptMaterialDetailPOList) {
|
||||
@@ -393,43 +393,23 @@ public class StockReceiptOrderApplicationService {
|
||||
if (CollectionUtils.isEmpty(children)) {
|
||||
continue;
|
||||
}
|
||||
// 第一条子项变为主行:用第一条子项的数据(含批次属性)覆盖主行展示
|
||||
ReceiptMaterialDetailPO firstChild = children.get(0);
|
||||
if (!CollectionUtils.isEmpty(firstChild.getMaterialMoreDetailList())) {
|
||||
parent.setMaterialMoreDetailList(firstChild.getMaterialMoreDetailList());
|
||||
}
|
||||
parent.setBatchRefNo(firstChild.getBatchRefNo());
|
||||
parent.setSheetRefNo(firstChild.getSheetRefNo());
|
||||
parent.setBoxPalletNo(firstChild.getBoxPalletNo());
|
||||
parent.setProductionDate(firstChild.getProductionDate());
|
||||
parent.setExpiryDate(firstChild.getExpiryDate());
|
||||
parent.setInventoryDate(firstChild.getInventoryDate());
|
||||
parent.setExtAttr1(firstChild.getExtAttr1());
|
||||
parent.setExtAttr2(firstChild.getExtAttr2());
|
||||
parent.setExtAttr3(firstChild.getExtAttr3());
|
||||
parent.setExtAttr4(firstChild.getExtAttr4());
|
||||
// 两条子项收货数量累加到主行(净重、毛重、体积、面积不累加,保持主行原值)
|
||||
BigDecimal receiptQuantitySum = parent.getReceiptQuantity() != null ? parent.getReceiptQuantity() : BigDecimal.ZERO;
|
||||
// 主行 alreadyReceiptQuantity = 主行 receiptQuantity + 所有子项 receiptQuantity
|
||||
BigDecimal alreadyReceiptQuantitySum = parent.getReceiptQuantity() != null ? parent.getReceiptQuantity() : BigDecimal.ZERO;
|
||||
Integer maxReceiptStatus = parent.getReceiptStatus();
|
||||
for (ReceiptMaterialDetailPO child : children) {
|
||||
if (child.getReceiptQuantity() != null) {
|
||||
receiptQuantitySum = receiptQuantitySum.add(child.getReceiptQuantity());
|
||||
alreadyReceiptQuantitySum = alreadyReceiptQuantitySum.add(child.getReceiptQuantity());
|
||||
}
|
||||
if (child.getReceiptStatus() != null && (maxReceiptStatus == null || child.getReceiptStatus() > maxReceiptStatus)) {
|
||||
maxReceiptStatus = child.getReceiptStatus();
|
||||
}
|
||||
// 子项不需要展示计划数量字段
|
||||
child.setQuantity(null);
|
||||
}
|
||||
parent.setReceiptQuantity(receiptQuantitySum);
|
||||
// 主行 ALREADY_RECEIPT_QUANTITY:DB 已存汇总时用其值,否则用子项合计
|
||||
if (parent.getAlreadyReceiptQuantity() == null || parent.getAlreadyReceiptQuantity().compareTo(receiptQuantitySum) < 0) {
|
||||
parent.setAlreadyReceiptQuantity(receiptQuantitySum);
|
||||
}
|
||||
parent.setAlreadyReceiptQuantity(alreadyReceiptQuantitySum);
|
||||
if (maxReceiptStatus != null) {
|
||||
parent.setReceiptStatus(maxReceiptStatus);
|
||||
}
|
||||
// 保留子项,子项展示其自己填写的值(收货数量、批次属性、净重毛重体积面积等)
|
||||
// 保留父子结构,子项在 parent.children 中,前端按树形展示
|
||||
}
|
||||
}
|
||||
|
||||
@@ -926,6 +906,9 @@ public class StockReceiptOrderApplicationService {
|
||||
// 物料条码为空时取物料维护的条码信息第一行的 barCode
|
||||
Map<Long, String> materialBarCodeMap = buildMaterialBarCodeMap(materialBaseInfoIdSet);
|
||||
fillBarCodeFromMaterialBarCodeRecursively(materialDetailList, materialBarCodeMap);
|
||||
// PDA 端与 PC 端一致:主行收货数量取第一条子项,已收货数量汇总所有子项
|
||||
flattenMaterialDetailList(materialDetailList);
|
||||
clearChildQuantityRecursively(materialDetailList);
|
||||
}
|
||||
return stockReceiptOrderPO;
|
||||
}
|
||||
|
||||
+1
-1
@@ -364,7 +364,7 @@ public class InvestigationManageImpl extends ServiceImpl<InvestigationManageMapp
|
||||
differentManage.setInvestigationRange(investigationManage.getInvestigationRange());
|
||||
differentManage.setInvestigationType(investigationManage.getInvestigationType());
|
||||
differentManage.setInvestigationMethod(investigationManage.getInvestigationMethod());
|
||||
differentManage.setInvestigationFrequency(2);
|
||||
differentManage.setInvestigationFrequency(investigationManage.getInvestigationFrequency());
|
||||
if (ObjectUtil.isNotNull(investigationManage.getInvestigationManBy())){
|
||||
investigationManParam(differentManage);
|
||||
}
|
||||
|
||||
+28
-7
@@ -698,23 +698,37 @@ public class StockOutOrderDomainService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean checkTaskDistribution(StockOutOrderDO stockOutOrderDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<Long> outOrderIds = stockOutOrderDO.getOutOrderIds();
|
||||
if (outOrderIds == null || outOrderIds.size() == 0) {
|
||||
throw new ServiceException("未选择出库单,或出库单不存在");
|
||||
}
|
||||
StockOutOrderDO stockOutOrderDOQuery = new StockOutOrderDO();
|
||||
stockOutOrderDOQuery.setOutOrderIds(stockOutOrderDO.getOutOrderIds());
|
||||
stockOutOrderDOQuery.setOutOrderIds(outOrderIds);
|
||||
stockOutOrderDOQuery.setCheckTaskDistribution(2);
|
||||
List<StockOutOrderPO> stockOutOrderPOList = stockOutOrderService.queryList(stockOutOrderDOQuery);
|
||||
if (CollectionUtils.isEmpty(stockOutOrderPOList)) {
|
||||
throw new ServiceException("复合单已下发,请重新选择");
|
||||
throw new ServiceException("出库单不存在或已下发,请重新选择");
|
||||
}
|
||||
//复核下发任务
|
||||
//复核下发任务(插入 delive_task,PDA 从此表查任务)
|
||||
genDeliveTask(stockOutOrderPOList, stockOutOrderDO);
|
||||
//标记收货单任务已下发
|
||||
//标记出库单任务已下发,并同步复核人信息到 stock_out_order(与 genDeliveTask 中逻辑一致)
|
||||
Long checkOperatorsBy = stockOutOrderDO.getCheckOperatorsBy();
|
||||
String checkOperatorsName = stockOutOrderDO.getCheckOperatorsName();
|
||||
if (checkOperatorsBy == null || checkOperatorsBy == 0) {
|
||||
checkOperatorsBy = loginUser.getUserid();
|
||||
checkOperatorsName = (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null && !loginUser.getUserPo().getUserName().trim().isEmpty())
|
||||
? loginUser.getUserPo().getUserName()
|
||||
: (loginUser.getRealname() != null && !loginUser.getRealname().trim().isEmpty()) ? loginUser.getRealname() : loginUser.getUsername();
|
||||
}
|
||||
return stockOutOrderService.update(null, new UpdateWrapper<StockOutOrder>().lambda()
|
||||
.set(StockOutOrder::getCheckTaskDistribution, 1)
|
||||
.set(StockOutOrder::getCheckTaskDistributionTime, new Date())
|
||||
.set(StockOutOrder::getCheckOperatorsBy, checkOperatorsBy)
|
||||
.set(StockOutOrder::getCheckOperatorsName, checkOperatorsName)
|
||||
.set(StockOutOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(StockOutOrder::getUpdateByName, loginUser.getUsername())
|
||||
.set(StockOutOrder::getUpdateTime, new Date())
|
||||
.in(StockOutOrder::getOutOrderId, stockOutOrderDO.getOutOrderIds()));
|
||||
.in(StockOutOrder::getOutOrderId, outOrderIds));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1436,8 +1450,15 @@ public class StockOutOrderDomainService {
|
||||
deliveTaskDO.setTaskDistributionId(loginUser.getUserid());
|
||||
deliveTaskDO.setTaskDistributionName(userRealName);
|
||||
deliveTaskDO.setTaskDistributionTime(new Date());
|
||||
deliveTaskDO.setOperatorsBy(stockOutOrderDO.getCheckOperatorsBy());
|
||||
deliveTaskDO.setOperatorsName(stockOutOrderDO.getCheckOperatorsName());
|
||||
// 若未指定复核人(null 或 0),默认分配给当前操作用户;前端未选择时可能传 0,0 在 PDA 两个 tab 都查不到
|
||||
Long operatorsBy = stockOutOrderDO.getCheckOperatorsBy();
|
||||
String operatorsName = stockOutOrderDO.getCheckOperatorsName();
|
||||
if (operatorsBy == null || operatorsBy == 0) {
|
||||
operatorsBy = loginUser.getUserid();
|
||||
operatorsName = (operatorsName != null && !operatorsName.isEmpty()) ? operatorsName : userRealName;
|
||||
}
|
||||
deliveTaskDO.setOperatorsBy(operatorsBy);
|
||||
deliveTaskDO.setOperatorsName(operatorsName);
|
||||
deliveTaskDO.setCreateBy(loginUser.getUserid());
|
||||
deliveTaskDO.setCreateByName(userRealName);
|
||||
deliveTaskDO.setCreateTime(new Date());
|
||||
|
||||
+8
@@ -1,6 +1,7 @@
|
||||
package com.mhd.wms.interfaces.assember.materialBaseInfo;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.mhd.system.api.domain.MaterialBaseInfoFeign;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.todo.MaterialBaseInfoDO;
|
||||
import com.mhd.wms.interfaces.dto.materialBaseInfo.MaterialBaseInfoDTO;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -21,4 +22,11 @@ public class MaterialBaseInfoAssembler {
|
||||
return JSONUtil.toBean(JSONUtil.toJsonStr(materialBaseInfoDTO), MaterialBaseInfoDO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public MaterialBaseInfoDO toDO2(MaterialBaseInfoFeign materialBaseInfoDTO) {
|
||||
return JSONUtil.toBean(JSONUtil.toJsonStr(materialBaseInfoDTO), MaterialBaseInfoDO.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mhd.wms.interfaces.dto.stockOutOrder;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAlias;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.wms.interfaces.dto.outMaterialDetail.OutMaterialDetailDTO;
|
||||
@@ -234,6 +235,7 @@ public class StockOutOrderDTO extends StockOutOrderBaseDTO {
|
||||
|
||||
@ApiModelProperty("复核作业人用户ID")
|
||||
@Excel(name = "复核作业人用户ID")
|
||||
@JsonAlias({"checkOperatorId", "operatorId"})
|
||||
private Long checkOperatorsBy;
|
||||
|
||||
@ApiModelProperty("复核作业人姓名")
|
||||
|
||||
+3
-2
@@ -4,6 +4,7 @@ import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.system.api.domain.MaterialBaseInfoFeign;
|
||||
import com.mhd.wms.application.service.materialBaseInfo.MaterialBaseInfoApplicationService;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.todo.MaterialBaseInfoDO;
|
||||
@@ -50,10 +51,10 @@ public class MaterialBaseInfoApi extends BaseController {
|
||||
*/
|
||||
@ApiOperation("编辑物料基础信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody MaterialBaseInfoDTO materialBaseInfoDTO)
|
||||
public AjaxResult edit(@RequestBody MaterialBaseInfoFeign materialBaseInfoDTO)
|
||||
{
|
||||
//转换实体
|
||||
MaterialBaseInfoDO materialBaseInfoDO = materialBaseInfoAssembler.toDO(materialBaseInfoDTO);
|
||||
MaterialBaseInfoDO materialBaseInfoDO = materialBaseInfoAssembler.toDO2(materialBaseInfoDTO);
|
||||
if(1 == materialBaseInfoDTO.getUpdateFeign()){
|
||||
return toAjax(materialBaseInfoApplicationService.update(materialBaseInfoDO));
|
||||
}else {
|
||||
|
||||
+4
@@ -19,6 +19,7 @@ import com.mhd.wms.interfaces.assember.stockOutOrder.StockOutOrderAssembler;
|
||||
import com.mhd.wms.interfaces.dto.outMaterialDetail.OutMaterialDetailDTO;
|
||||
import com.mhd.wms.interfaces.dto.stockOutOrder.StockOutOrderDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpRequest;
|
||||
@@ -39,6 +40,7 @@ import java.util.List;
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/stockOutOrderApi")
|
||||
public class StockOutOrderApi extends BaseController {
|
||||
@@ -281,6 +283,8 @@ public class StockOutOrderApi extends BaseController {
|
||||
@ApiOperation("复核下发")
|
||||
@PostMapping("/checkTaskDistribution")
|
||||
public AjaxResult checkTaskDistribution(@RequestBody StockOutOrderDTO stockOutOrderDTO) {
|
||||
log.debug("复核下发入参 checkOperatorsBy={}, checkOperatorsName={}, outOrderIds={}",
|
||||
stockOutOrderDTO.getCheckOperatorsBy(), stockOutOrderDTO.getCheckOperatorsName(), stockOutOrderDTO.getOutOrderIds());
|
||||
StockOutOrderDO stockOutOrderDO = JSONUtil.toBean(JSONUtil.toJsonStr(stockOutOrderDTO), StockOutOrderDO.class);
|
||||
return AjaxResult.success(stockOutOrderApplicationService.checkTaskDistribution(stockOutOrderDO));
|
||||
}
|
||||
|
||||
+17
-3
@@ -5,6 +5,10 @@ import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfoApi;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.domain.cache.AssociationWarehouseCacheDO;
|
||||
import com.mhd.system.api.domain.cache.SystemServiceCacheUtil;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.application.service.stockOutOrder.StockOutOrderApplicationService;
|
||||
import com.mhd.wms.domain.stockOutOrder.repository.po.StockOutOrderPO;
|
||||
import com.mhd.wms.domain.stockOutOrder.repository.todo.StockOutOrderDO;
|
||||
@@ -33,15 +37,25 @@ public class StockOutOrderAppApi extends BaseController {
|
||||
private StockOutOrderAssembler stockOutOrderAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询出库单列表
|
||||
* 分页查询出库单列表(PDA复核查询)
|
||||
* 查询条件:warehouse_id(用户关联仓库)、check_operators_by(当前用户)、check_status<3 等
|
||||
*/
|
||||
@ApiOperation("查询出库单列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfoApi list(StockOutOrderDTO stockOutOrderDTO) {
|
||||
//转换实体
|
||||
StockOutOrderDO stockOutOrderDO = stockOutOrderAssembler.toDO(stockOutOrderDTO);
|
||||
startPage();
|
||||
stockOutOrderDO.setCheckOperatorsBy(SecurityUtils.getLoginUser().getUserPo().getUserId());
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
UserPo userPo = loginUser.getUserPo();
|
||||
stockOutOrderDO.setCheckOperatorsBy(userPo.getUserId());
|
||||
stockOutOrderDO.setOrganizationId(userPo.getOrganizationId());
|
||||
stockOutOrderDO.setTopOrganizationId(userPo.getTopOrganizationId());
|
||||
stockOutOrderDO.setLtCheckStatus(3);
|
||||
stockOutOrderDO.setDelFlag(1);
|
||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||
if (associationWarehouseCacheDO != null) {
|
||||
stockOutOrderDO.setWarehouseId(associationWarehouseCacheDO.getWarehouseId());
|
||||
}
|
||||
List<StockOutOrderPO> list = stockOutOrderApplicationService.queryList(stockOutOrderDO);
|
||||
return getDataTableApi(list);
|
||||
}
|
||||
|
||||
@@ -116,5 +116,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="queryList" parameterType="com.mhd.wms.domain.differentManage.repository.todo.DifferentManageDO" resultMap="DifferentManageResult">
|
||||
<include refid="selectDifferentManagePo"/>
|
||||
<include refid="selectDifferentManagePo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user