Browse Source

Merge branch 'fix_task' into dev

master
pref_mail@163.com 9 months ago
parent
commit
c1ea8202be
  1. 6
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java
  2. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTaskApiController.java
  3. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml
  4. 152
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

6
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java

@ -216,6 +216,12 @@ public class QuestDetailEntity extends TenantEntity {
@ApiModelProperty(value = "新托盘编码")
private String newTrayCode;
/**
* 新托盘名称
*/
@ApiModelProperty(value = "新托盘名称")
private String newTrayName;
/**
* 货位id
*/

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTaskApiController.java

@ -129,6 +129,7 @@ public class WarehouseTaskApiController {
*/
@PostMapping("/addDataInfo")
public R addDataInfo(@RequestBody TaskSearchDTO taskSearchDTO){
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){

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

@ -110,6 +110,7 @@
`grounding_allocation_id` bigint(20) NULL DEFAULT NULL COMMENT '上架后的库位ID',
`new_tray_id` bigint(20) NULL DEFAULT NULL COMMENT '新托盘ID',
`new_tray_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '新托盘编码',
`new_tray_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '新托盘名称',
`is_new` int(20) NULL DEFAULT 0 COMMENT '是否是新增数据',
`is_change` int(4) NULL DEFAULT 0 COMMENT '是否有变更 0未变更 1有变更',
`is_change_at` int(4) NULL DEFAULT 0 COMMENT '是否有变更库位托盘 0未变更 1有变更',
@ -301,6 +302,7 @@
update ${questNum} set quest_status = #{param.questStatus}
WHERE `id` = #{ param.id }
</update>
<update id="updatePositionCodeList" parameterType="com.logpm.warehouse.entity.QuestDetailEntity">
<foreach collection="list" separator=";" item="item" index="index" open="" close="">
update ${questNum}
@ -325,6 +327,7 @@
<if test="item.isChange != null ">is_change = #{item.isChange }, </if>
<if test="item.newTrayId != null ">new_tray_id = #{item.newTrayId }, </if>
<if test="item.newTrayCode != null ">new_tray_code = #{item.newTrayCode }, </if>
<if test="item.newTrayName != null ">new_tray_name = #{item.newTrayName }, </if>
<if test="item.isChangeAt != null ">is_change_at = #{item.isChangeAt }, </if>
<!-- <if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>

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

@ -222,9 +222,9 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
}
Integer conditions = i.getConditions();
if(conditions.equals(1)){
if (conditions.equals(1)) {
detailEntity.setQuestTarget(1);
}else if (conditions.equals(2)){
} else if (conditions.equals(2)) {
detailEntity.setQuestTarget(3);
}
@ -338,7 +338,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
//处理库位,托盘
for (DistributionStockArticleEntity stockArticleEntity : stockArticleInfo) {
Integer handQuantity = stockArticleEntity.getHandQuantity();
if(handQuantity == 0){
if (handQuantity == 0) {
continue;
}
String orderCode = stockArticleEntity.getOrderCode();
@ -347,7 +347,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
String waybillNumber = stockArticleEntity.getWaybillNumber();
//查询零担订单在哪些库位上
List<PositionVO> updownGoodsEntities = warehouseUpdownGoodsMapper.getUpdownGoodsByZeroOrderId(orderId,warehouseId);
List<PositionVO> updownGoodsEntities = warehouseUpdownGoodsMapper.getUpdownGoodsByZeroOrderId(orderId, warehouseId);
Integer tnum = 0;
for (PositionVO updownGoodsEntity : updownGoodsEntities) {
Integer num = updownGoodsEntity.getNum();
@ -371,15 +371,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
detailEntity.setWarehouseId(warehouseId);
detailEntity.setIsNew(0);
detailEntity.setStockNum(num);
detailEntity.setTrayId(updownGoodsEntity.getTrayId()+"");
detailEntity.setTrayId(updownGoodsEntity.getTrayId() + "");
detailEntity.setTrayCode(updownGoodsEntity.getTrayCode());
detailEntity.setAllocationId(updownGoodsEntity.getAllocationId()+"");
detailEntity.setAllocationId(updownGoodsEntity.getAllocationId() + "");
detailEntity.setPositionCode(updownGoodsEntity.getPositionCode());
detailEntityList.add(detailEntity);
tnum = tnum + num;
}
List<PositionVO> trayGoodsEntities = warehouseTrayGoodsMapper.getTrayGoodsByZeroOrderIdNoAllocationId(orderId,warehouseId);
List<PositionVO> trayGoodsEntities = warehouseTrayGoodsMapper.getTrayGoodsByZeroOrderIdNoAllocationId(orderId, warehouseId);
for (PositionVO trayGoodsEntity : trayGoodsEntities) {
Integer num = trayGoodsEntity.getNum();
QuestDetailEntity detailEntity = new QuestDetailEntity();
@ -402,13 +402,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
detailEntity.setWarehouseId(warehouseId);
detailEntity.setStockNum(num);
detailEntity.setIsNew(0);
detailEntity.setTrayId(trayGoodsEntity.getTrayId()+"");
detailEntity.setTrayId(trayGoodsEntity.getTrayId() + "");
detailEntity.setTrayCode(trayGoodsEntity.getTrayCode());
detailEntityList.add(detailEntity);
tnum = tnum + num;
}
if(handQuantity-tnum > 0){
if (handQuantity - tnum > 0) {
QuestDetailEntity detailEntity = new QuestDetailEntity();
detailEntity.setId(getTaskID());
detailEntity.setCreateTime(new Date());
@ -427,7 +427,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
detailEntity.setQuestStatus(0);
detailEntity.setMarketName(stockArticleEntity.getMallName());
detailEntity.setWarehouseId(warehouseId);
detailEntity.setStockNum(handQuantity-tnum);
detailEntity.setStockNum(handQuantity - tnum);
detailEntity.setIsNew(0);
detailEntityList.add(detailEntity);
}
@ -444,7 +444,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
for (DistributionStockListVO distributionStockListVO : stockListInfo) {
Integer quantityStock = distributionStockListVO.getQuantityStock();
if(quantityStock == 0){
if (quantityStock == 0) {
continue;
}
Long warehouseId = distributionStockListVO.getWarehouseId();
@ -452,7 +452,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
String cargoNumber = distributionStockListVO.getCargoNumber();
Long marketId = distributionStockListVO.getMarketId();
Integer tnum = 0;
List<PositionVO> updownGoodsByStock = warehouseUpdownGoodsMapper.getUpdownGoodsByStock(marketId,cargoNumber,incomingBatch,warehouseId);
List<PositionVO> updownGoodsByStock = warehouseUpdownGoodsMapper.getUpdownGoodsByStock(marketId, cargoNumber, incomingBatch, warehouseId);
for (PositionVO positionVO : updownGoodsByStock) {
Integer num = positionVO.getNum();
QuestDetailEntity detailEntity = new QuestDetailEntity();
@ -478,15 +478,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
detailEntity.setIncomingBatch(incomingBatch);
detailEntity.setWarehouseId(warehouseId);
detailEntity.setIsNew(0);
detailEntity.setTrayId(positionVO.getTrayId()+"");
detailEntity.setTrayId(positionVO.getTrayId() + "");
detailEntity.setTrayCode(positionVO.getTrayCode());
detailEntity.setAllocationId(positionVO.getAllocationId()+"");
detailEntity.setAllocationId(positionVO.getAllocationId() + "");
detailEntity.setPositionCode(positionVO.getPositionCode());
detailEntityList.add(detailEntity);
tnum = tnum + num;
}
List<PositionVO> traynGoodsByStock = warehouseTrayGoodsMapper.getTrayGoodsByStockNoAllocationId(marketId,cargoNumber,incomingBatch,warehouseId);
List<PositionVO> traynGoodsByStock = warehouseTrayGoodsMapper.getTrayGoodsByStockNoAllocationId(marketId, cargoNumber, incomingBatch, warehouseId);
for (PositionVO positionVO : traynGoodsByStock) {
Integer num = positionVO.getNum();
QuestDetailEntity detailEntity = new QuestDetailEntity();
@ -512,13 +512,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
detailEntity.setIncomingBatch(incomingBatch);
detailEntity.setWarehouseId(warehouseId);
detailEntity.setIsNew(0);
detailEntity.setTrayId(positionVO.getTrayId()+"");
detailEntity.setTrayId(positionVO.getTrayId() + "");
detailEntity.setTrayCode(positionVO.getTrayCode());
detailEntityList.add(detailEntity);
tnum = tnum + num;
}
if(quantityStock-tnum > 0){
if (quantityStock - tnum > 0) {
QuestDetailEntity detailEntity = new QuestDetailEntity();
detailEntity.setId(getTaskID());
detailEntity.setCreateTime(new Date());
@ -532,7 +532,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
detailEntity.setHasData(0);
//盘点对象;1.定制品 2零担 3 库存品
detailEntity.setQuestTarget(3);
detailEntity.setStockNum(quantityStock-tnum);
detailEntity.setStockNum(quantityStock - tnum);
detailEntity.setCategoryName(distributionStockListVO.getDescriptionGoods());
detailEntity.setStockId(distributionStockListVO.getId()); //库存品ID
detailEntity.setQuestStatus(0);
@ -750,6 +750,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
* @return
*/
@Override
public R addDataInfo(TaskSearchDTO taskSearchDTO) {
log.info("开始添加数据{}", taskSearchDTO.toString());
String questNum = taskSearchDTO.getQuestNum();
@ -779,7 +780,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
taskSearchDTO.getQuestDetailIds().forEach(i -> {
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> tag {}", i);
if(ObjectUtils.isNotNull(i)){
if (ObjectUtils.isNotNull(i)) {
//查询当前包件盘点状态
QuestDetailEntity questDetail = new QuestDetailEntity();
@ -801,7 +802,6 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
//处理盘点的包件
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> tag {}", 2);
if (ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailList())) {
List<QuestDetailEntity> detailEntityList = new ArrayList<>();
//处理的包件
@ -827,13 +827,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
questDetail.setIsDeleted(0);
questDetail.setStatus(1);
questDetail.setIsChange(1);
if(questTarget.equals(2)){
if (questTarget.equals(2)) {
questDetail.setHasData(0);
}else{
} else {
String orderPackageCode = i.getOrderPackageCode();
if(StringUtil.isBlank(orderPackageCode)){
if (StringUtil.isBlank(orderPackageCode)) {
questDetail.setHasData(0);
}else{
} else {
questDetail.setHasData(1);
}
}
@ -886,16 +886,16 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
questDetail.setId(i.getId());
questDetail.setQuestStatus(1); //已盘
questDetail.setUpdateUser(user.getUserId());
QuestDetailEntity detailEntity = baseMapper.findEntityById(questNum,taskID);
if(!Objects.isNull(detailEntity)){
QuestDetailEntity detailEntity = baseMapper.findEntityById(questNum, taskID);
if (!Objects.isNull(detailEntity)) {
Integer isNew = detailEntity.getIsNew();
Integer questTarget = detailEntity.getQuestTarget();
Integer stockNum1 = detailEntity.getStockNum();
if(isNew.equals(1)){
if (isNew.equals(1)) {
questDetail.setIsChange(1);
}else{
if(!stockNum1.equals(stockNum)){
} else {
if (!stockNum1.equals(stockNum)) {
questDetail.setIsChange(1);
}
}
@ -916,7 +916,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
//是否修改库位
QuestDetailEntity questDetail = new QuestDetailEntity();
if (ObjectUtils.isNotNull(i.getGroundingAllocationId()) || ObjectUtils.isNotNull(i.getNewTrayId()) ) {
if (ObjectUtils.isNotNull(i.getGroundingAllocationId()) || ObjectUtils.isNotNull(i.getNewTrayId())) {
//查询当前待更新货位是否包含已更新货位数据
QuestDetailEntity questDetail1 = new QuestDetailEntity();
questDetail1.setGroundingAllocationId(i.getGroundingAllocationId());
@ -931,6 +931,12 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
questDetail.setIsChangeAt(1);
questDetail.setNewTrayId(i.getNewTrayId());
questDetail.setNewTrayCode(i.getNewTrayCode());
// 通过托盘ID 查询托盘名称
if(ObjectUtils.isNotNull(i.getNewTrayCode())){
BasicdataTrayEntity trayEntity = basicdataTrayClient.getTrayByTrayCode(i.getNewTrayCode());
questDetail.setNewTrayName(trayEntity.getPalletName());
}
questDetail.setGroundingAllocationId(i.getGroundingAllocationId());
questDetail.setGroundingPositionCode(i.getGroundingPositionCode());
questDetail.setInventoryTime(new Date());
@ -1445,13 +1451,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
Long warehouseId = taskQuestEntity.getWarehouseId();
String questStatus = taskQuestEntity.getQuestStatus();
if("3".equals(questStatus)){
if ("3".equals(questStatus)) {
log.warn("##########syncTaskData: 盘点任务未结束,不能同步 questNum={}", questNum);
throw new CustomerException(405, "盘点任务未结束");
}
//开启异步线程处理盘点数据
asyncDataService.syncTaskData(questNum, warehouseId,AuthUtil.getTenantId(),AuthUtil.getUserId(),AuthUtil.getNickName(),Func.firstLong(AuthUtil.getDeptId()));
asyncDataService.syncTaskData(questNum, warehouseId, AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId()));
taskQuestEntity.setSyncDataStatus(1);
taskQuestEntity.setSyncUserId(AuthUtil.getUserId());
@ -1547,7 +1553,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
} else {
//没有
if (questDetailEntity.getHasData().equals(1) ) {
if (questDetailEntity.getHasData().equals(1)) {
continue;
}
@ -1578,7 +1584,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
WarehouseGoodsAllocationEntity byId = warehouseGoodsAllocationService.getById(taskSearchDTO.getAllocationId());
if (ObjectUtils.isNotNull(byId)) {
TaskallocationVO taskallocationVO = new TaskallocationVO();
taskallocationVO.setAllocationId(taskSearchDTO.getAllocationId()+"");
taskallocationVO.setAllocationId(taskSearchDTO.getAllocationId() + "");
taskallocationVO.setPositionCode(byId.getQrCode());
list.add(taskallocationVO);
}
@ -1586,7 +1592,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
return list;
} catch (Exception e) {
log.error(">>>>>>>>>>>>> 查询货 位异常报错",e);
log.error(">>>>>>>>>>>>> 查询货 位异常报错", e);
return new ArrayList<>();
}
@ -1721,22 +1727,27 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
//添加扫描的托盘信息
//添加托盘上面的数据
int taskInventory = getTaskInventory(taskSearchDTO, collect.get(0), trayByTrayCode);
switch (taskInventory) {
case 0:
log.debug("全仓盘点");
//返回托盘信息
return getTrayInfo(trayByTrayCode.getId(), myCurrentWarehouse.getId(), trayByTrayCode.getPalletCode());
case 1:
List<QuestDetailEntity> questDetailList = getQuestDetailList(taskSearchDTO, myCurrentWarehouse.getId(), trayByTrayCode.getId());
return R.data(getTaskTrayInfo(questDetailList));
case 2:
//返回托盘信息
return getTrayInfo(trayByTrayCode.getId(), myCurrentWarehouse.getId(), trayByTrayCode.getPalletCode());
case 3:
return Resp.scanFail("无包件信息!", "无包件信息!");
default:
return Resp.scanFail("注意,注意:未知查询!", "注意,注意:未知查询!");
try {
switch (taskInventory) {
case 0:
log.debug("全仓盘点");
//返回托盘信息
return R.data(getTrayInfo(trayByTrayCode.getId(), myCurrentWarehouse.getId(), trayByTrayCode.getPalletCode()));
case 1:
List<QuestDetailEntity> questDetailList = getQuestDetailList(taskSearchDTO, myCurrentWarehouse.getId(), trayByTrayCode.getId());
return R.data(getTaskTrayInfo(questDetailList));
case 2:
//返回托盘信息
return R.data(getTrayInfo(trayByTrayCode.getId(), myCurrentWarehouse.getId(), trayByTrayCode.getPalletCode()));
case 3:
return Resp.scanFail("无包件信息!", "无包件信息!");
default:
return Resp.scanFail("注意,注意:未知查询!", "注意,注意:未知查询!");
}
} catch (ServiceException e) {
return Resp.scanFail(e.getMessage(), e.getMessage());
}
}
} else {
@ -1752,9 +1763,9 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
//查询托盘信息
public R getTrayInfo(Long trayId, Long warehouseId, String taryCode) {
public TaskTrayVO getTrayInfo(Long trayId, Long warehouseId, String taryCode) {
//返回托盘信息
List<TaskTrayVO> trayVO = new ArrayList<>();
// List<TaskTrayVO> trayVO = new ArrayList<>();
WarehouseTrayTypeEntity one = trayTypeService.getOne(Wrappers.<WarehouseTrayTypeEntity>query().lambda()
.eq(WarehouseTrayTypeEntity::getTrayId, trayId)
.eq(WarehouseTrayTypeEntity::getIsDeleted, 0)
@ -1771,7 +1782,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
taskTrayVO.setGoodsType(one.getType()); // 没有类型
} else {
//不是
return Resp.scanFail("此托盘不在当前仓库!", "此托盘不在当前仓库!");
// return Resp.scanFail("此托盘不在当前仓库!", "此托盘不在当前仓库!");
throw new ServiceException("此托盘不在当前仓库!");
}
} else {
//没有绑定可以使用
@ -1781,8 +1793,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
taskTrayVO.setUnTotal(0);
taskTrayVO.setGoodsType("定制品"); // 定制品
}
trayVO.add(taskTrayVO);
return R.data(trayVO);
// trayVO.add(taskTrayVO);
return taskTrayVO;
}
@ -1799,8 +1811,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
QuestDetailEntity questDetailEntity = list1.get(0);
String trayId = questDetailEntity.getTrayId();
if(StringUtil.isBlank(trayId)){
trayId = questDetailEntity.getNewTrayId()+"";
if (StringUtil.isBlank(trayId)) {
trayId = questDetailEntity.getNewTrayId() + "";
}
taskTrayVO.setTrayId(Long.parseLong(trayId));
List<BasicdataTrayEntity> trayEntityList = basicdataTrayClient.getTrayEntityList(trayId);
@ -1815,7 +1827,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
Integer questStatus = entity.getQuestStatus();
Integer stockNum = entity.getStockNum();
total = total + stockNum;
if(questStatus.equals(1)){
if (questStatus.equals(1)) {
unTotal = unTotal + stockNum;
}
}
@ -1950,11 +1962,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
for (QuestDetailEntity questDetailEntity : questDetailList) {
String trayId = questDetailEntity.getTrayId();
if(StringUtil.isBlank(trayId)){
questDetailEntity.setTrayId(questDetailEntity.getNewTrayId()+"");
if (StringUtil.isBlank(trayId)) {
questDetailEntity.setTrayId(questDetailEntity.getNewTrayId() + "");
questDetailEntity.setTrayCode(questDetailEntity.getNewTrayCode());
BasicdataTrayEntity trayEntity = basicdataTrayClient.getTrayByTrayCode(questDetailEntity.getNewTrayCode());
if(!Objects.isNull(trayEntity)){
if (!Objects.isNull(trayEntity)) {
questDetailEntity.setTrayName(trayEntity.getPalletName());
}
@ -2867,7 +2879,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
// 需要判读这个盘点任务 是否存在绑定的商场
R<Object> extracted = extracted(questId, questDetail);
if(extracted!= null){
if (extracted != null) {
return extracted;
}
@ -2896,23 +2908,23 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
List<TaskQuestChildVO> taskQuestChildVOS = bladeRedis.get(RedisKeyConstant.TASK_QUEST_CHILD_KEY);
if(taskQuestChildVOS== null){
if (taskQuestChildVOS == null) {
taskQuestChildVOS = taskQuestChildService.selectlistByMasterId(questId);
bladeRedis.setEx(RedisKeyConstant.TASK_QUEST_CHILD_KEY,taskQuestChildVOS,1000L);
bladeRedis.setEx(RedisKeyConstant.TASK_QUEST_CHILD_KEY, taskQuestChildVOS, 1000L);
}
if(taskQuestChildVOS!=null && !taskQuestChildVOS.isEmpty()){
if (taskQuestChildVOS != null && !taskQuestChildVOS.isEmpty()) {
// 存在商场
Map<String, Object> resultMap = distributionParcelListClient.findByOrderInfoByOrderPackageCodeAndWarehouseId(questDetail.getOrderPackageCode(), questDetail.getWarehouseId());
if(resultMap!= null && !resultMap.isEmpty()){
if (resultMap != null && !resultMap.isEmpty()) {
String mallName = resultMap.get("mallName").toString();
for (TaskQuestChildVO taskQuestChildVO : taskQuestChildVOS) {
if(taskQuestChildVO.getRefType()==1&&!mallName.equals(taskQuestChildVO.getRefName())){
if (taskQuestChildVO.getRefType() == 1 && !mallName.equals(taskQuestChildVO.getRefName())) {
// 抛出异常
return R.fail(5001, "扫码包件不属于当前盘点商场!");
}
@ -3376,11 +3388,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
public List<TaskQueryDataExcel> exportContrastStockInfo(QuestDetailDTO questDetailDTO) {
List<TaskQueryDataExcel> datas =baseMapper.selectContrastStockInfo( questDetailDTO.getQuestNum());
List<TaskQueryDataExcel> datas = baseMapper.selectContrastStockInfo(questDetailDTO.getQuestNum());
return datas;
}
@Override
@ -3390,7 +3401,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
@Override
public Integer findStockNum(Long questDetailId, String tableName) {
return baseMapper.findStockNum(questDetailId,tableName);
return baseMapper.findStockNum(questDetailId, tableName);
}
private String getQuestNum(String warehouseCode) {
@ -3426,5 +3437,4 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
}

Loading…
Cancel
Save