|
|
@ -3,6 +3,7 @@ package com.glxp.api.service.thrsys.impl;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
@ -10,8 +11,10 @@ import com.glxp.api.common.res.BaseResponse;
|
|
|
|
import com.glxp.api.constant.Constant;
|
|
|
|
import com.glxp.api.constant.Constant;
|
|
|
|
import com.glxp.api.constant.ConstantStatus;
|
|
|
|
import com.glxp.api.constant.ConstantStatus;
|
|
|
|
import com.glxp.api.constant.ConstantType;
|
|
|
|
import com.glxp.api.constant.ConstantType;
|
|
|
|
|
|
|
|
import com.glxp.api.dao.basic.UdiRelevanceDao;
|
|
|
|
import com.glxp.api.dao.thrsys.ThrInvOrderDetailMapper;
|
|
|
|
import com.glxp.api.dao.thrsys.ThrInvOrderDetailMapper;
|
|
|
|
import com.glxp.api.dao.thrsys.ThrInvOrderMapper;
|
|
|
|
import com.glxp.api.dao.thrsys.ThrInvOrderMapper;
|
|
|
|
|
|
|
|
import com.glxp.api.entity.basic.BasicProductsEntity;
|
|
|
|
import com.glxp.api.entity.basic.BasicSkProjectDetailEntity;
|
|
|
|
import com.glxp.api.entity.basic.BasicSkProjectDetailEntity;
|
|
|
|
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
|
|
|
|
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
|
|
|
|
import com.glxp.api.entity.inout.IoOrderEntity;
|
|
|
|
import com.glxp.api.entity.inout.IoOrderEntity;
|
|
|
@ -25,9 +28,13 @@ import com.glxp.api.req.inv.FilterInvProductRequest;
|
|
|
|
import com.glxp.api.req.thrsys.FilterThrInvOrderRequest;
|
|
|
|
import com.glxp.api.req.thrsys.FilterThrInvOrderRequest;
|
|
|
|
import com.glxp.api.req.thrsys.GenerateOrderRequest;
|
|
|
|
import com.glxp.api.req.thrsys.GenerateOrderRequest;
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
|
|
|
|
import com.glxp.api.res.basic.MainIdRelIdAndProductResponse;
|
|
|
|
import com.glxp.api.res.inv.ThrInvResultResponse;
|
|
|
|
import com.glxp.api.res.inv.ThrInvResultResponse;
|
|
|
|
import com.glxp.api.service.auth.CustomerService;
|
|
|
|
import com.glxp.api.service.auth.CustomerService;
|
|
|
|
|
|
|
|
import com.glxp.api.service.basic.ProductInfoService;
|
|
|
|
|
|
|
|
import com.glxp.api.service.basic.UdiRelevanceService;
|
|
|
|
import com.glxp.api.service.basic.impl.BasicDestinyRelService;
|
|
|
|
import com.glxp.api.service.basic.impl.BasicDestinyRelService;
|
|
|
|
|
|
|
|
import com.glxp.api.service.inout.IoAddInoutService;
|
|
|
|
import com.glxp.api.service.inout.IoOrderDetailBizService;
|
|
|
|
import com.glxp.api.service.inout.IoOrderDetailBizService;
|
|
|
|
import com.glxp.api.service.inout.IoOrderService;
|
|
|
|
import com.glxp.api.service.inout.IoOrderService;
|
|
|
|
import com.glxp.api.service.system.SystemParamConfigService;
|
|
|
|
import com.glxp.api.service.system.SystemParamConfigService;
|
|
|
@ -43,6 +50,7 @@ import javax.annotation.Resource;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
@Slf4j
|
|
|
@ -68,6 +76,13 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
IoOrderService ioOrderService;
|
|
|
|
IoOrderService ioOrderService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
IoOrderDetailBizService ioOrderDetailBizService;
|
|
|
|
IoOrderDetailBizService ioOrderDetailBizService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
UdiRelevanceDao udiRelevanceDao;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
IoAddInoutService ioAddInoutService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
UdiRelevanceService udiRelevanceService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 设置要输出的日期格式
|
|
|
|
// 设置要输出的日期格式
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
@ -81,7 +96,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
String billNo = generateBillNo(filterInvProductRequest);//单据号
|
|
|
|
String billNo = generateBillNo(filterInvProductRequest);//单据号
|
|
|
|
//处理 返回实体 转换成 单据 和 单据明细
|
|
|
|
//处理 返回实体 转换成 单据 和 单据明细
|
|
|
|
List<ThrInvOrderDetail> thrInvOrderDetails = new ArrayList<>();
|
|
|
|
List<ThrInvOrderDetail> thrInvOrderDetails = new ArrayList<>();
|
|
|
|
handleExternalConvertThrInvOrderDetail(list, thrInvOrderDetails, billNo);
|
|
|
|
String thirdSys = filterInvProductRequest.getThirdSys();
|
|
|
|
|
|
|
|
handleExternalConvertThrInvOrderDetail(list, thrInvOrderDetails, billNo, thirdSys);
|
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(thrInvOrderDetails)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(thrInvOrderDetails)) {
|
|
|
|
ThrInvOrder thrInvOrder = new ThrInvOrder();
|
|
|
|
ThrInvOrder thrInvOrder = new ThrInvOrder();
|
|
|
@ -133,17 +149,21 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean generateOrder(GenerateOrderRequest generateOrderRequest) {
|
|
|
|
public boolean generateOrder(GenerateOrderRequest generateOrderRequest) {
|
|
|
|
String billNo = generateOrderRequest.getBillNo();
|
|
|
|
String billNo = generateOrderRequest.getBillNo();
|
|
|
|
|
|
|
|
|
|
|
|
//通过单号获取单据信息
|
|
|
|
//通过单号获取单据信息
|
|
|
|
QueryWrapper<ThrInvOrder> qw = new QueryWrapper<>();
|
|
|
|
QueryWrapper<ThrInvOrder> qw = new QueryWrapper<>();
|
|
|
|
qw.eq("billNo",billNo);
|
|
|
|
qw.eq("billNo", billNo);
|
|
|
|
ThrInvOrder thrInvOrder = thrInvOrderMapper.selectOne(qw);
|
|
|
|
ThrInvOrder thrInvOrder = thrInvOrderMapper.selectOne(qw);
|
|
|
|
if (Objects.isNull(thrInvOrder)) return false;
|
|
|
|
if (Objects.isNull(thrInvOrder) || thrInvOrder.getStatus() != ConstantStatus.SFIO_DRAFT) return false;
|
|
|
|
|
|
|
|
|
|
|
|
//通过单号获取单据明细信息
|
|
|
|
//通过单号获取单据明细信息
|
|
|
|
QueryWrapper<ThrInvOrderDetail> qwd = new QueryWrapper<>();
|
|
|
|
QueryWrapper<ThrInvOrderDetail> qwd = new QueryWrapper<>();
|
|
|
|
qwd.eq("orderIdFk",billNo);
|
|
|
|
qwd.eq("orderIdFk", billNo);
|
|
|
|
List<ThrInvOrderDetail> thrInvOrderDetails = thrInvOrderDetailMapper.selectList(qwd);
|
|
|
|
List<ThrInvOrderDetail> thrInvOrderDetails = thrInvOrderDetailMapper.selectList(qwd);
|
|
|
|
if (CollectionUtil.isNotEmpty(thrInvOrderDetails)) return false;
|
|
|
|
if (CollectionUtil.isEmpty(thrInvOrderDetails)) return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//校验单据的relId有null不生成单据
|
|
|
|
|
|
|
|
if (!inspectionDocuments(thrInvOrderDetails)) return false;
|
|
|
|
|
|
|
|
|
|
|
|
//新单号
|
|
|
|
//新单号
|
|
|
|
String newBillNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd"));
|
|
|
|
String newBillNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd"));
|
|
|
@ -154,6 +174,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
ioOrderEntity.setFromCorp(generateOrderRequest.getFromCorp());
|
|
|
|
ioOrderEntity.setFromCorp(generateOrderRequest.getFromCorp());
|
|
|
|
ioOrderEntity.setInvCode(thrInvOrder.getInvCode());
|
|
|
|
ioOrderEntity.setInvCode(thrInvOrder.getInvCode());
|
|
|
|
ioOrderEntity.setDeptCode(thrInvOrder.getDeptCode());
|
|
|
|
ioOrderEntity.setDeptCode(thrInvOrder.getDeptCode());
|
|
|
|
|
|
|
|
ioOrderEntity.setAction(generateOrderRequest.getAction());
|
|
|
|
|
|
|
|
|
|
|
|
ioOrderEntity.setFromType(ConstantStatus.FROM_THRORDER);//网页新增
|
|
|
|
ioOrderEntity.setFromType(ConstantStatus.FROM_THRORDER);//网页新增
|
|
|
|
ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);//草稿
|
|
|
|
ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);//草稿
|
|
|
@ -167,23 +188,81 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
ioOrderEntity.setOrderType(ConstantStatus.ORDER_TYPE_NORMAL);//正常单据处理
|
|
|
|
ioOrderEntity.setOrderType(ConstantStatus.ORDER_TYPE_NORMAL);//正常单据处理
|
|
|
|
|
|
|
|
|
|
|
|
List<IoOrderDetailBizEntity> newOrderDetailBiz = new ArrayList<>(thrInvOrderDetails.size());
|
|
|
|
List<IoOrderDetailBizEntity> newOrderDetailBiz = new ArrayList<>(thrInvOrderDetails.size());
|
|
|
|
if (!copyOrderDetailBiz(thrInvOrderDetails,newOrderDetailBiz)){
|
|
|
|
if (!copyOrderDetailBiz(thrInvOrderDetails, newOrderDetailBiz,newBillNo)) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ioOrderService.insertOrder(ioOrderEntity);
|
|
|
|
ioOrderService.insertOrder(ioOrderEntity);
|
|
|
|
return ioOrderDetailBizService.batchInsertBizs(newOrderDetailBiz);
|
|
|
|
thrInvOrder.setStatus(ConstantStatus.SFIO_CFMD);//已确认
|
|
|
|
|
|
|
|
thrInvOrder.setUpdateTime(new Date());
|
|
|
|
|
|
|
|
thrInvOrder.setCreateTime(new Date());
|
|
|
|
|
|
|
|
thrInvOrder.setCreateUser(userId + "");
|
|
|
|
|
|
|
|
thrInvOrder.setUpdateUser(userId + "");
|
|
|
|
|
|
|
|
thrInvOrderMapper.updateByPrimaryKey(thrInvOrder);
|
|
|
|
|
|
|
|
ioOrderDetailBizService.batchInsertBizs(newOrderDetailBiz);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ioAddInoutService.stockGenScan(ioOrderEntity);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 校验relId字段有空返回false
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param thrInvOrderDetails
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private boolean inspectionDocuments(List<ThrInvOrderDetail> thrInvOrderDetails) {
|
|
|
|
|
|
|
|
for (int i = 0; i < thrInvOrderDetails.size(); i++) {
|
|
|
|
|
|
|
|
ThrInvOrderDetail thrInvOrderDetail = thrInvOrderDetails.get(0);
|
|
|
|
|
|
|
|
if (ObjectUtil.isNull(thrInvOrderDetail.getRelId())) return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private boolean copyOrderDetailBiz(List<ThrInvOrderDetail> thrInvOrderDetails, List<IoOrderDetailBizEntity> newOrderDetailBiz) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 复制列表
|
|
|
|
* 1、获取产品的集合列表信息
|
|
|
|
*
|
|
|
|
* 2、遍历封装
|
|
|
|
* @param thrInvOrderDetails
|
|
|
|
*/
|
|
|
|
* @param newOrderDetailBiz
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private boolean copyOrderDetailBiz(List<ThrInvOrderDetail> thrInvOrderDetails, List<IoOrderDetailBizEntity> newOrderDetailBiz,String newBillNo) {
|
|
|
|
|
|
|
|
List<Long> relIds = thrInvOrderDetails.stream().filter(x -> ObjectUtil.isNotNull(x.getRelId()))
|
|
|
|
|
|
|
|
.map(ThrInvOrderDetail::getRelId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
List<BasicProductsEntity> basicProductsEntities = udiRelevanceDao.selectProductByRelIds(relIds);
|
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(basicProductsEntities)) return false;
|
|
|
|
|
|
|
|
Map<Long, BasicProductsEntity> relIdBasicProductsEntityMap = basicProductsEntities.stream().collect(Collectors.toMap(BasicProductsEntity::getId, x -> x));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < thrInvOrderDetails.size(); i++) {
|
|
|
|
|
|
|
|
ThrInvOrderDetail thrInvOrderDetail = thrInvOrderDetails.get(i);
|
|
|
|
|
|
|
|
Long relId = thrInvOrderDetail.getRelId();
|
|
|
|
|
|
|
|
BasicProductsEntity basicProductsEntity = relIdBasicProductsEntityMap.get(relId);
|
|
|
|
|
|
|
|
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
|
|
|
|
|
|
|
|
parameterPackag(basicProductsEntity,ioOrderDetailBizEntity,thrInvOrderDetail);
|
|
|
|
|
|
|
|
ioOrderDetailBizEntity.setOrderIdFk(newBillNo);
|
|
|
|
|
|
|
|
newOrderDetailBiz.add(ioOrderDetailBizEntity);
|
|
|
|
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 实体参数包装
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param basicProductsEntity
|
|
|
|
|
|
|
|
* @param ioOrderDetailBizEntity
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private void parameterPackag(BasicProductsEntity basicProductsEntity, IoOrderDetailBizEntity ioOrderDetailBizEntity,ThrInvOrderDetail thrInvOrderDetail) {
|
|
|
|
|
|
|
|
ioOrderDetailBizEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(basicProductsEntity)) {
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(basicProductsEntity, ioOrderDetailBizEntity);
|
|
|
|
|
|
|
|
ioOrderDetailBizEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
|
|
|
|
ioOrderDetailBizEntity.setUuidFk(basicProductsEntity.getUuid());
|
|
|
|
|
|
|
|
ioOrderDetailBizEntity.setBindRlFk(basicProductsEntity.getId());
|
|
|
|
|
|
|
|
ioOrderDetailBizEntity.setNameCode(basicProductsEntity.getNameCode());
|
|
|
|
|
|
|
|
ioOrderDetailBizEntity.setCount(Integer.valueOf(thrInvOrderDetail.getReCount()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 生成单号 SFIO + 6位起始日期 + 6位结束日期 + 6位随机
|
|
|
|
* 生成单号 SFIO + 6位起始日期 + 6位结束日期 + 6位随机
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -219,7 +298,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
thrInvOrder.setSpaceCode(thrInvResultResponse.getSpaceCode());//货位编码
|
|
|
|
thrInvOrder.setSpaceCode(thrInvResultResponse.getSpaceCode());//货位编码
|
|
|
|
thrInvOrder.setStatus(ConstantStatus.SFIO_DRAFT);//单据状态 草稿
|
|
|
|
thrInvOrder.setStatus(ConstantStatus.SFIO_DRAFT);//单据状态 草稿
|
|
|
|
thrInvOrder.setCreateTime(newDate);
|
|
|
|
thrInvOrder.setCreateTime(newDate);
|
|
|
|
thrInvOrder.setCreateUser("系统自动");
|
|
|
|
thrInvOrder.setCreateUser("外部系统下载");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -230,12 +309,19 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
* @param thrInvOrderDetails
|
|
|
|
* @param thrInvOrderDetails
|
|
|
|
* @param billNo
|
|
|
|
* @param billNo
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void handleExternalConvertThrInvOrderDetail(List<ThrInvResultResponse> list, List<ThrInvOrderDetail> thrInvOrderDetails, String billNo) {
|
|
|
|
private void handleExternalConvertThrInvOrderDetail(List<ThrInvResultResponse> list, List<ThrInvOrderDetail> thrInvOrderDetails, String billNo, String thirdSys) {
|
|
|
|
Integer inv_set_enable = Integer.valueOf(systemParamConfigService.selectValueByParamKey("inv_set_enable"));
|
|
|
|
Integer inv_set_enable = Integer.valueOf(systemParamConfigService.selectValueByParamKey("inv_set_enable"));
|
|
|
|
if (inv_set_enable == null || inv_set_enable == 0) {
|
|
|
|
if (inv_set_enable == null || inv_set_enable == 0) {//直接明细 不走项目组套
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> thrCodes = list.stream().map(ThrInvResultResponse::getThrCode).collect(Collectors.toList());
|
|
|
|
|
|
|
|
MainIdRelIdAndProductResponse map = udiRelevanceService.selectMainIdRelIdAndProductMap(thrCodes, thirdSys);
|
|
|
|
|
|
|
|
Map<String, Long> mainIdRelIdMap = map.getMainIdRelIdMap();
|
|
|
|
|
|
|
|
|
|
|
|
list.forEach(item -> {
|
|
|
|
list.forEach(item -> {
|
|
|
|
String mainAction = item.getMainAction();
|
|
|
|
String mainAction = item.getMainAction();
|
|
|
|
Integer count = 0;
|
|
|
|
String thrCode = item.getThrCode();
|
|
|
|
|
|
|
|
Long relId = mainIdRelIdMap.get(thrCode);
|
|
|
|
|
|
|
|
Integer count;
|
|
|
|
if (ConstantType.TYPE_PUT.equals(mainAction)) {
|
|
|
|
if (ConstantType.TYPE_PUT.equals(mainAction)) {
|
|
|
|
count = Integer.valueOf(item.getInCount());
|
|
|
|
count = Integer.valueOf(item.getInCount());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -244,15 +330,16 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
ThrInvOrderDetail thrInvOrderDetail = new ThrInvOrderDetail();
|
|
|
|
ThrInvOrderDetail thrInvOrderDetail = new ThrInvOrderDetail();
|
|
|
|
BeanUtils.copyProperties(item, thrInvOrderDetail);
|
|
|
|
BeanUtils.copyProperties(item, thrInvOrderDetail);
|
|
|
|
thrInvOrderDetail.setOrderIdFk(billNo);
|
|
|
|
thrInvOrderDetail.setOrderIdFk(billNo);
|
|
|
|
thrInvOrderDetail.setRelId(Long.parseLong(item.getThrCode()));
|
|
|
|
thrInvOrderDetail.setRelId(relId);
|
|
|
|
|
|
|
|
thrInvOrderDetail.setThrCode(thrCode);
|
|
|
|
thrInvOrderDetail.setReCount(String.valueOf(count));
|
|
|
|
thrInvOrderDetail.setReCount(String.valueOf(count));
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {//走项目组套
|
|
|
|
list.forEach(item -> {
|
|
|
|
list.forEach(item -> {
|
|
|
|
String thrCode = item.getThrCode();
|
|
|
|
String thrCode = item.getThrCode();
|
|
|
|
String mainAction = item.getMainAction();
|
|
|
|
String mainAction = item.getMainAction();
|
|
|
|
Integer count = 0;
|
|
|
|
Integer count;
|
|
|
|
if (ConstantType.TYPE_PUT.equals(mainAction)) {
|
|
|
|
if (ConstantType.TYPE_PUT.equals(mainAction)) {
|
|
|
|
count = Integer.valueOf(item.getInCount());
|
|
|
|
count = Integer.valueOf(item.getInCount());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -270,8 +357,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
Integer skCount = sk.getCount();
|
|
|
|
Integer skCount = sk.getCount();
|
|
|
|
if (skCount != null && skCount > 0) {
|
|
|
|
if (skCount != null && skCount > 0) {
|
|
|
|
thrInvOrderDetail.setReCount(String.valueOf(skCount * finalCount));
|
|
|
|
thrInvOrderDetail.setReCount(String.valueOf(skCount * finalCount));
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
thrInvOrderDetails.add(thrInvOrderDetail);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|