add:pda手工出库确认
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.wms.pda_manage.ios_manage.service;
|
package org.nl.wms.pda_manage.ios_manage.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.wms.pda_manage.ios_manage.service.dto.OutBoundDis;
|
||||||
import org.nl.wms.pda_manage.outBound.dto.LineSideDto;
|
import org.nl.wms.pda_manage.outBound.dto.LineSideDto;
|
||||||
import org.nl.wms.pda_manage.util.PdaResponse;
|
import org.nl.wms.pda_manage.util.PdaResponse;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDis;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDis;
|
||||||
@@ -107,6 +108,6 @@ public interface PdaIosOutService {
|
|||||||
PdaResponse vehicleOutConfirm(JSONObject whereJson);
|
PdaResponse vehicleOutConfirm(JSONObject whereJson);
|
||||||
|
|
||||||
|
|
||||||
|
void outDisFinish(OutBoundDis outBoundDis);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import org.nl.wms.sch_manage.service.util.tasks.VehicleOutTask;
|
|||||||
import org.nl.wms.warehouse_manage.enums.IOSConstant;
|
import org.nl.wms.warehouse_manage.enums.IOSConstant;
|
||||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.IInBillService;
|
import org.nl.wms.warehouse_manage.inAndOut.service.IInBillService;
|
||||||
|
import org.nl.wms.warehouse_manage.inAndOut.service.IOutBillService;
|
||||||
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
|
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
|
||||||
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
|
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInv;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInv;
|
||||||
@@ -60,10 +61,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -105,7 +103,11 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
* 出入库单主表
|
* 出入库单主表
|
||||||
*/
|
*/
|
||||||
@Resource
|
@Resource
|
||||||
private IOStorInvMapper ioStorInvMapper;
|
private IOStorInvMapper ioStorInvMapper; /**
|
||||||
|
* 出入库单主表
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||||
/**
|
/**
|
||||||
* 仓库服务
|
* 仓库服务
|
||||||
*/
|
*/
|
||||||
@@ -117,6 +119,11 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
*/
|
*/
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMdMeMaterialbaseService iMdMeMaterialbaseService;
|
private IMdMeMaterialbaseService iMdMeMaterialbaseService;
|
||||||
|
/**
|
||||||
|
* 基础物料服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private IOutBillService iOutBillService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点位服务
|
* 点位服务
|
||||||
@@ -136,19 +143,6 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IOStorInvDtlMapper ioStorInvDtlMapper;
|
private IOStorInvDtlMapper ioStorInvDtlMapper;
|
||||||
|
|
||||||
/**
|
|
||||||
* 出入库单分配明细mapper
|
|
||||||
*/
|
|
||||||
@Autowired
|
|
||||||
private IOStorInvDisMapper ioStorInvDisMapper;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 出库任务类
|
|
||||||
*/
|
|
||||||
@Autowired
|
|
||||||
private StOutTask stOutTask;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手持任务
|
* 手持任务
|
||||||
*/
|
*/
|
||||||
@@ -601,4 +595,10 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
);
|
);
|
||||||
return PdaResponse.requestOk();
|
return PdaResponse.requestOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void outDisFinish(OutBoundDis outBoundDis) {
|
||||||
|
final IOStorInvDis ioStorInvDis = ioStorInvDisMapper.selectById(outBoundDis.getIostorinvdisId());
|
||||||
|
iOutBillService.disFinish(Arrays.asList(ioStorInvDis));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.nl.wms.pda_manage.ios_manage.service.dto.OutBoundDis;
|
|||||||
import org.nl.wms.pda_manage.outBound.dto.LineSideDto;
|
import org.nl.wms.pda_manage.outBound.dto.LineSideDto;
|
||||||
import org.nl.wms.pda_manage.util.PdaResponse;
|
import org.nl.wms.pda_manage.util.PdaResponse;
|
||||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||||
|
import org.nl.wms.warehouse_manage.inAndOut.service.IOutBillService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -46,6 +47,7 @@ public class PdaIosOutController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISectattrService iSectattrService;
|
private ISectattrService iSectattrService;
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/flatWarehouse")
|
@GetMapping("/flatWarehouse")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> flatWarehouse() {
|
public ResponseEntity<Object> flatWarehouse() {
|
||||||
@@ -69,6 +71,7 @@ public class PdaIosOutController {
|
|||||||
@PostMapping("/assignOutDis")
|
@PostMapping("/assignOutDis")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> assignOutDis(OutBoundDis outBoundDis) {
|
public ResponseEntity<Object> assignOutDis(OutBoundDis outBoundDis) {
|
||||||
|
pdaIosOutService.outDisFinish(outBoundDis);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import org.nl.common.domain.query.PageQuery;
|
|||||||
import org.nl.wms.basedata_manage.service.dto.MdPbStoragevehicleextDto;
|
import org.nl.wms.basedata_manage.service.dto.MdPbStoragevehicleextDto;
|
||||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInv;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInv;
|
||||||
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDis;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDtlDto;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDtlDto;
|
||||||
|
|
||||||
@@ -161,4 +162,10 @@ public interface IOutBillService extends IService<IOStorInv> {
|
|||||||
* @param task
|
* @param task
|
||||||
*/
|
*/
|
||||||
void taskFinish(SchBaseTask task);
|
void taskFinish(SchBaseTask task);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明细完成
|
||||||
|
* @param disList
|
||||||
|
*/
|
||||||
|
void disFinish(List<IOStorInvDis> disList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1102,6 +1102,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
if (ObjectUtil.isEmpty(disList)) {
|
if (ObjectUtil.isEmpty(disList)) {
|
||||||
throw new BadRequestException("未找到任务对应的分配明细");
|
throw new BadRequestException("未找到任务对应的分配明细");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disFinish(disList);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void disFinish(List<IOStorInvDis> disList) {
|
||||||
// 完成当前任务对应的所有分配明细
|
// 完成当前任务对应的所有分配明细
|
||||||
for (IOStorInvDis ioStorInvDis : disList) {
|
for (IOStorInvDis ioStorInvDis : disList) {
|
||||||
ioStorInvDisMapper.update(ioStorInvDis,new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
ioStorInvDisMapper.update(ioStorInvDis,new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||||
@@ -1121,7 +1127,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
StructattrChangeDto changeDto = StructattrChangeDto.builder()
|
StructattrChangeDto changeDto = StructattrChangeDto.builder()
|
||||||
.inv(item.getIostorinv_id())
|
.inv(item.getIostorinv_id())
|
||||||
.storagevehicleCode(item.getStoragevehicle_code())
|
.storagevehicleCode(item.getStoragevehicle_code())
|
||||||
.structCode(item.getStruct_code()).taskType(task.getConfig_code()).inBound(false).build();
|
.structCode(item.getStruct_code()).taskType(item.getStruct_code())
|
||||||
|
.inBound(false).build();
|
||||||
iStructattrService.changeStruct(changeDto);
|
iStructattrService.changeStruct(changeDto);
|
||||||
// 查询该明细下是否还有未完成的分配明细
|
// 查询该明细下是否还有未完成的分配明细
|
||||||
int countDis = ioStorInvDisMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
int countDis = ioStorInvDisMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||||
@@ -1151,9 +1158,9 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
//更新主表状态
|
//更新主表状态
|
||||||
ioStorInvMapper.update(new IOStorInv(),new LambdaUpdateWrapper<>(IOStorInv.class)
|
ioStorInvMapper.update(new IOStorInv(),new LambdaUpdateWrapper<>(IOStorInv.class)
|
||||||
.set(IOStorInv::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
.set(IOStorInv::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||||
.set(IOStorInv::getConfirm_optid,currentUserId)
|
.set(IOStorInv::getConfirm_optid, SecurityUtils.getCurrentUserId())
|
||||||
.set(IOStorInv::getConfirm_optname,nickName)
|
.set(IOStorInv::getConfirm_optname, SecurityUtils.getCurrentNickName())
|
||||||
.set(IOStorInv::getConfirm_time,now)
|
.set(IOStorInv::getConfirm_time, DateUtil.now())
|
||||||
.eq(IOStorInv::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
.eq(IOStorInv::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user