Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 1 year ago
parent
commit
156b3dddb2
  1. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/TaskSearchDTO.java
  2. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java
  3. 34
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/TaskSearchDTO.java

@ -122,7 +122,7 @@ public class TaskSearchDTO {
/**
* 在库盘点包件
*/
private List<String> questDetailIds;
private List<Long> questDetailIds;
/**
* 当前仓库id

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java

@ -168,5 +168,5 @@ public interface TaskQuestMapper extends BaseMapper<TaskQuestEntity> {
*/
List<QuestContrastVO> selectContrastDataInfo(@Param("questNum")String questNum,@Param("param")QuestDetailEntity questDetail);
Integer deleteQuestChild(@Param("questNum")String questNum, @Param("questDetailId")String i);
Integer deleteQuestChild(@Param("questNum")String questNum, @Param("questDetailId")Long i);
}

34
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

@ -706,23 +706,12 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
return R.fail("待处理的包件为空!QuestNum");
}*/
BladeUser user = AuthUtil.getUser();
QuestDetailEntity questDetailer = new QuestDetailEntity();
List<Long> ids = null;
if(ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailIds())){
for (String questDetailId : taskSearchDTO.getQuestDetailIds()) {
if(ObjectUtils.isNull(ids)){
ids = new ArrayList<>();
}
ids.add(Long.parseLong(questDetailId));
}
}
List<QuestDetailEntity> questDetailList = baseMapper.selectTaskInfoForIds(questNum, questDetailer,ids);
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> questDetailList {}",questDetailList);
// 在库包件状态修改
if(ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailIds()) && ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailIds().get(0)) ){
QuestDetailEntity quest = new QuestDetailEntity();
List<QuestDetailEntity> questDetailList = baseMapper.selectTaskInfoForIds(questNum, quest,taskSearchDTO.getQuestDetailIds());
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> tag {}",1);
List<QuestDetailEntity> list = new ArrayList<>();
AtomicBoolean s = new AtomicBoolean(false);
@ -807,12 +796,12 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
//添加
List<QuestDetailChildEntity> childList = new ArrayList<>();
childList.add(addQuestDetailChild(stockNum,"10",i.getId(),warehouseId,questNum));
childList.add(addQuestDetailChild(wornNum,"20",i.getId(),warehouseId,questNum));
childList.add(addQuestDetailChild(lossNum,"30",i.getId(),warehouseId,questNum));
childList.add(addQuestDetailChild(noRepairNum,"40",i.getId(),warehouseId,questNum));
childList.add(addQuestDetailChild(deliveNum,"50",i.getId(),warehouseId,questNum));
childList.add(addQuestDetailChild(noReceivedNum,"60",i.getId(),warehouseId,questNum));
childList.add(addQuestDetailChild(stockNum,"10",taskID,warehouseId,questNum));
childList.add(addQuestDetailChild(wornNum,"20",taskID,warehouseId,questNum));
childList.add(addQuestDetailChild(lossNum,"30",taskID,warehouseId,questNum));
childList.add(addQuestDetailChild(noRepairNum,"40",taskID,warehouseId,questNum));
childList.add(addQuestDetailChild(deliveNum,"50",taskID,warehouseId,questNum));
childList.add(addQuestDetailChild(noReceivedNum,"60",taskID,warehouseId,questNum));
if(!childList.isEmpty()){
boolean b = childList.stream().anyMatch(ii -> ObjectUtils.isNull(ii.getId()));
if(b){
@ -2742,11 +2731,6 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
private QuestDetailChildEntity addQuestDetailChild(Integer num,String cargoName,Long questDetaiId,Long warehouseId,String qu){
if(Objects.isNull(questDetaiId)){
log.warn("###########addQuestDetailChild: 明细id不存在 questDetaiId={}",questDetaiId);
throw new CustomerException(403,"明细id不存在");
}
if(Objects.isNull(num)){
log.warn("###########addQuestDetailChild: 数量不正确 num={}",num);
throw new CustomerException(403,"数量不正确");

Loading…
Cancel
Save