Merge remote-tracking branch 'refs/remotes/惠信/dev_zhangke' into develop
This commit is contained in:
commit
3e02bd0895
|
|
@ -57,8 +57,6 @@ public class NormalPGIController extends BaseController {
|
|||
@Resource
|
||||
private NormalPGIControllerService normalPGIControllerService;
|
||||
|
||||
@Resource
|
||||
private IWmsSrmMaterialReceiptItemService wmsSrmMaterialReceiptItemService;
|
||||
|
||||
@Resource
|
||||
private SrmMaterialReceiptScanCodesRepository srmMaterialReceiptCanCodesRepository;
|
||||
|
|
@ -259,7 +257,6 @@ public class NormalPGIController extends BaseController {
|
|||
@PostMapping("PDA/task/confirm")
|
||||
@ApiMark(moduleName = "送货单管理", apiName = "普通物料任务上架确认")
|
||||
public ApiResult<Void> takeDeliveryConfirm(@Valid @RequestBody PoReceiveTaskConfirmQO request) {
|
||||
|
||||
//首先判断是否已经确认
|
||||
WmsPoReceipt wmsPoReceipt = wmsPoReceiptService.getById(request.getTaskId());
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(wmsPoReceipt)).throwMessage("收货单不存在");
|
||||
|
|
@ -277,7 +274,7 @@ public class NormalPGIController extends BaseController {
|
|||
List<StorageLocationDTO> storageLocationDTOS = new ArrayList<>();
|
||||
List<InventoryDTO> inventories = new ArrayList<>();
|
||||
List<ZWM3A17DTO> zwm3A17DTOS = new ArrayList<>();
|
||||
|
||||
List<SrmMaterialReceiptScanCodes> scanCodes = new ArrayList<>();
|
||||
for (WmsPoReceiptItem item : wmsPoReceiptItems) {
|
||||
PoReceiveTaskItemConfirmQO qo = request.getItems().stream()
|
||||
.filter(q -> q.getId().equals(item.getId()))
|
||||
|
|
@ -322,6 +319,11 @@ public class NormalPGIController extends BaseController {
|
|||
List<ZWM3A17Item2DTO> item2 = zwm3A17DTO.getItem2();
|
||||
|
||||
List<SrmMaterialReceiptScanCodes> scanCode = srmMaterialReceiptScanCodesRepository.findByOrderItemId(item.getOrderItemId());
|
||||
if (CollectionUtil.isNotEmpty(scanCode)) {
|
||||
scanCode = scanCode.stream().filter(code -> code.getIsIntoStorage() == false)
|
||||
.toList();
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(scanCode)) {
|
||||
scanCode.forEach(code -> {
|
||||
// 库存
|
||||
|
|
@ -371,6 +373,8 @@ public class NormalPGIController extends BaseController {
|
|||
.setEBELP(item.getPoLineNumber())
|
||||
.setFLAG("")
|
||||
.setSERNR(code.getSerialNumbers()));
|
||||
|
||||
scanCodes.add(code);
|
||||
});
|
||||
} else {
|
||||
// 库存
|
||||
|
|
@ -394,7 +398,7 @@ public class NormalPGIController extends BaseController {
|
|||
);
|
||||
}
|
||||
}
|
||||
normalPGIControllerService.takeDeliveryConfirm(receiptItems, storageLocationDTOS, inventories, zwm3A17DTOS, request.getTaskId());
|
||||
normalPGIControllerService.takeDeliveryConfirm(receiptItems, storageLocationDTOS, inventories, zwm3A17DTOS, request.getTaskId(), scanCodes);
|
||||
return ApiResult.success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,4 +57,9 @@ public class SrmMaterialReceiptScanCodes {
|
|||
public String getKey() {
|
||||
return this.batchNumber + ";" + this.serialNumbers;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否在
|
||||
*/
|
||||
private Boolean IsIntoStorage;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.nflg.wms.admin.repository;
|
|||
|
||||
import com.nflg.wms.admin.pojo.document.SrmMaterialReceiptScanCodes;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.data.mongodb.repository.Query;
|
||||
import org.springframework.data.mongodb.repository.Update;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -11,4 +13,10 @@ public interface SrmMaterialReceiptScanCodesRepository extends MongoRepository<S
|
|||
List<SrmMaterialReceiptScanCodes> findByOrderItemId(Long orderItemId);
|
||||
|
||||
List<SrmMaterialReceiptScanCodes> findByCodeIdIn(List<String> attr0);
|
||||
|
||||
@Query("{ 'codeId' : { $in : ?0 } }")
|
||||
@Update("{ $set : { 'isIntoStorage' : ?1 } }")
|
||||
void updateIsIntoStorage(List<String> codeIds, boolean isIntoStorage);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.dev33.satoken.SaManager.log;
|
||||
|
||||
|
|
@ -195,6 +196,7 @@ public class NormalPGIControllerService {
|
|||
.setCodeNum(scanCode.getCodeNum())
|
||||
.setBatchNumber(scanCode.getBatchNumber())
|
||||
.setSerialNumbers(scanCode.getSerialNumbers())
|
||||
.setIsIntoStorage(false)
|
||||
.setCodeContent(scanCode.getCodeContent()));
|
||||
}
|
||||
//查看是否有重复的条码
|
||||
|
|
@ -276,7 +278,8 @@ public class NormalPGIControllerService {
|
|||
List<StorageLocationDTO> storageLocationDTOS,
|
||||
List<InventoryDTO> inventories,
|
||||
List<ZWM3A17DTO> zwm3A17DTOS,
|
||||
Long taskId
|
||||
Long taskId,
|
||||
List<SrmMaterialReceiptScanCodes> scanCodes
|
||||
) {
|
||||
if (CollectionUtil.isNotEmpty(wmsPoReceiptItems)) {
|
||||
wmsPoReceiptItemService.updateBatchById(wmsPoReceiptItems);
|
||||
|
|
@ -317,6 +320,12 @@ public class NormalPGIControllerService {
|
|||
.update();
|
||||
}
|
||||
}
|
||||
//修改二维码的入库状态
|
||||
if (CollectionUtil.isNotEmpty(scanCodes)) {
|
||||
List<String> codeIds = scanCodes.stream().map(SrmMaterialReceiptScanCodes::getId).toList();
|
||||
srmMaterialReceiptCanCodesRepository.updateIsIntoStorage(codeIds, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||
import com.nflg.wms.admin.pojo.dto.QCReceiveDTO;
|
||||
import com.nflg.wms.common.pojo.vo.QCTaskItemScanCodesVO;
|
||||
import com.nflg.wms.common.pojo.vo.QCTaskItemVO;
|
||||
import com.nflg.wms.repository.entity.WmsQcReceive;
|
||||
import com.nflg.wms.repository.entity.WmsQcReceiveItem;
|
||||
import com.nflg.wms.repository.entity.WmsSrmQualityInspection;
|
||||
import com.nflg.wms.repository.service.IWmsInventoryService;
|
||||
|
|
@ -106,6 +107,23 @@ public class NormalQMControllerService {
|
|||
qcReceiveDTO.getWaitModifyItems().forEach(item -> {
|
||||
wmsQcReceiveItemService.updateInQty(item.getId(), item.getInQty(), item.getUnqualifiedQty(), item.getQualifiedQty());
|
||||
});
|
||||
// 修改表头的状态
|
||||
Long id = qcReceiveDTO.getWaitModifyItems().get(0).getId();
|
||||
WmsQcReceiveItem wmsQcReceiveItem = wmsQcReceiveItemService.getById(id);
|
||||
Long receiveId = wmsQcReceiveItem.getReceiveId();
|
||||
List<Long> ids = wmsQcReceiveItemService.getUnReceivedItems(receiveId);
|
||||
//判断是否全部完成
|
||||
if (CollectionUtil.isEmpty(ids)) {
|
||||
iWmsQcReceiveService.lambdaUpdate()
|
||||
.eq(WmsQcReceive::getId, receiveId)
|
||||
.set(WmsQcReceive::getIsCompleted, 2)
|
||||
.update();
|
||||
} else {
|
||||
iWmsQcReceiveService.lambdaUpdate()
|
||||
.eq(WmsQcReceive::getId, receiveId)
|
||||
.set(WmsQcReceive::getIsCompleted, 1)
|
||||
.update();
|
||||
}
|
||||
}
|
||||
// 上传SAP
|
||||
if (Objects.nonNull(qcReceiveDTO.getZwm3a18DTO())) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ public class ConfigAddQO {
|
|||
/**
|
||||
* 所属组别
|
||||
*/
|
||||
@NotBlank
|
||||
private String groupName;
|
||||
|
||||
//名称
|
||||
|
|
|
|||
|
|
@ -48,5 +48,5 @@ public class QCReceiveTaskConfirmQO {
|
|||
/**
|
||||
* 质检单ID
|
||||
*/
|
||||
private List<Long> QcIdList;
|
||||
private List<Long> qcIdList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@ public class QCReceiptVO {
|
|||
private String supplierName;
|
||||
|
||||
/**
|
||||
* 是否已入库,true 是;false 否
|
||||
* 是否已入库,0 未完成,1 部分入库,2 已完成
|
||||
*/
|
||||
private Boolean isCompleted;
|
||||
private Integer isCompleted;
|
||||
/**
|
||||
* 收货时间
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,4 +22,6 @@ public interface WmsQcReceiveItemMapper extends BaseMapper<WmsQcReceiveItem> {
|
|||
void updateCheckNum(BigDecimal InspectionQty, String noteNum, String lineNumber, String itemCode, String materialDoc);
|
||||
|
||||
void updateInQty(Long id, BigDecimal inQty, BigDecimal unqualifiedQty, BigDecimal qualifiedQty);
|
||||
|
||||
List<Long> getUnReceivedItems(Long receiveId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,4 +24,6 @@ public interface IWmsQcReceiveItemService extends IService<WmsQcReceiveItem> {
|
|||
void updateCheckNum(BigDecimal InspectionQty, String noteNum, String lineNumber, String itemCode,String materialDoc);
|
||||
|
||||
void updateInQty(Long id, BigDecimal inQty,BigDecimal unqualifiedQty,BigDecimal qualifiedQty);
|
||||
|
||||
List<Long> getUnReceivedItems(Long receiveId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
|
|||
.setSourceId(request.getNo());
|
||||
|
||||
|
||||
// Department dept2 = BeanUtil.copy(dept1, Department.class);
|
||||
//Department dept2 = BeanUtil.copy(dept1, Department.class);
|
||||
// dept2.setName(request.getName())
|
||||
// .setParentId(request.getParentId())
|
||||
// .setUpdateBy(UserUtil.getUserName())
|
||||
|
|
|
|||
|
|
@ -35,4 +35,9 @@ public class WmsQcReceiveItemServiceImpl extends ServiceImpl<WmsQcReceiveItemMap
|
|||
public void updateInQty(Long id, BigDecimal inQty, BigDecimal unqualifiedQty, BigDecimal qualifiedQty) {
|
||||
baseMapper.updateInQty(id, inQty, unqualifiedQty, qualifiedQty);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getUnReceivedItems(Long receiveId) {
|
||||
return baseMapper.getUnReceivedItems(receiveId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nflg.wms.repository.mapper.WmsQcReceiveItemMapper">
|
||||
|
||||
<select id="getTaskItem" resultType="com.nflg.wms.common.pojo.vo.QCTaskItemVO">
|
||||
select id,
|
||||
line_number,
|
||||
|
|
@ -37,4 +36,11 @@
|
|||
and material_doc = #{materialDoc}
|
||||
and item_code = #{ itemCode}
|
||||
</update>
|
||||
|
||||
<select id="getUnReceivedItems" resultType="java.lang.Long">
|
||||
select id
|
||||
from wms_qc_receive_item
|
||||
where receive_id = #{receiveId}
|
||||
and receipt_num > in_qty
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
create_time,
|
||||
factory_code
|
||||
from wms_qc_receive
|
||||
where is_completed = 0 and is_check = true
|
||||
where is_completed !=2 and is_check = true
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
and ( in_no like concat( '%',#{orderNo},'%') or order_no like concat( '%',#{orderNo},'%') )
|
||||
</if>
|
||||
|
|
@ -31,7 +31,8 @@
|
|||
a.create_time as receive_time,
|
||||
a.update_time as in_time,
|
||||
a.create_user_name as receive_user_name,
|
||||
a.update_user_name as in_user_name
|
||||
a.update_user_name as in_user_name,
|
||||
a.is_check
|
||||
from wms_qc_receive a
|
||||
left join
|
||||
wms_srm_order b on a.order_no = b.note_num
|
||||
|
|
|
|||
Loading…
Reference in New Issue