|
|
|
@ -17,6 +17,7 @@ import com.glxp.api.dao.basic.UdiRelevanceDao;
|
|
|
|
|
import com.glxp.api.dao.inout.IoCodeTempDao;
|
|
|
|
|
import com.glxp.api.dao.thrsys.ThrInvOrderDetailMapper;
|
|
|
|
|
import com.glxp.api.dao.thrsys.ThrInvOrderMapper;
|
|
|
|
|
import com.glxp.api.entity.auth.WarehouseUserEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.*;
|
|
|
|
|
import com.glxp.api.entity.inout.IoCodeTempEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
|
|
|
|
@ -34,6 +35,7 @@ import com.glxp.api.res.basic.MainIdRelIdAndProductResponse;
|
|
|
|
|
import com.glxp.api.res.inv.ThrInvResultResponse;
|
|
|
|
|
import com.glxp.api.res.thrsys.ThrInvOrderResponse;
|
|
|
|
|
import com.glxp.api.service.auth.CustomerService;
|
|
|
|
|
import com.glxp.api.service.auth.WarehouseUserService;
|
|
|
|
|
import com.glxp.api.service.basic.IBasicBussinessTypeService;
|
|
|
|
|
import com.glxp.api.service.basic.UdiRelevanceService;
|
|
|
|
|
import com.glxp.api.service.basic.UdiRlSupService;
|
|
|
|
@ -375,6 +377,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
return thrInvOrderMapper.delete(uw);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
WarehouseUserService warehouseUserService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 普耗收费出入库明细单据生成
|
|
|
|
@ -434,9 +438,14 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
ioOrderEntity.setUpdateTime(new Date());
|
|
|
|
|
ioOrderEntity.setCustomerId("110");
|
|
|
|
|
ioOrderEntity.setCreateTime(new Date());
|
|
|
|
|
Long userId = customerService.getUserId();
|
|
|
|
|
ioOrderEntity.setCreateUser(userId + "");
|
|
|
|
|
ioOrderEntity.setUpdateUser(userId + "");
|
|
|
|
|
Long userId = null;
|
|
|
|
|
WarehouseUserEntity warehouseUserEntity = warehouseUserService.getOne(new QueryWrapper<WarehouseUserEntity>().eq("code", ioOrderEntity.getInvCode()).last("limit 1"));
|
|
|
|
|
if (warehouseUserEntity != null) {
|
|
|
|
|
userId = warehouseUserEntity.getUserid();
|
|
|
|
|
ioOrderEntity.setCreateUser(warehouseUserEntity.getUserid() + "");
|
|
|
|
|
ioOrderEntity.setUpdateUser(warehouseUserEntity.getUserid() + "");
|
|
|
|
|
thrInvOrder.setUpdateUser(userId + "");
|
|
|
|
|
}
|
|
|
|
|
ioOrderEntity.setOrderType(ConstantStatus.ORDER_TYPE_BIZ);//正常单据处理
|
|
|
|
|
|
|
|
|
|
List<IoOrderDetailBizEntity> newOrderDetailBiz = new ArrayList<>(grouped.values().size());
|
|
|
|
@ -457,7 +466,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
ioOrderService.insertOrder(ioOrderEntity);
|
|
|
|
|
thrInvOrder.setStatus(ConstantStatus.SFIO_CFMD);//已确认
|
|
|
|
|
thrInvOrder.setUpdateTime(new Date());
|
|
|
|
|
thrInvOrder.setUpdateUser(userId + "");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String toBillNo = (thrInvOrder.getToBillNo() == null ? "" : thrInvOrder.getToBillNo()) + ("," + newBillNo);
|
|
|
|
|
// 检查字符串是否以逗号开始
|
|
|
|
@ -1284,7 +1293,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
for (int i = 0; i < thrInvOrderDetails.size(); i++) {
|
|
|
|
|
ThrInvOrderDetail thrInvOrderDetail = thrInvOrderDetails.get(i);
|
|
|
|
|
Long relId = thrInvOrderDetail.getRelId();
|
|
|
|
|
if (relId != null ) {
|
|
|
|
|
if (relId != null) {
|
|
|
|
|
BasicProductsEntity basicProductsEntity = relIdBasicProductsEntityMap.get(relId);
|
|
|
|
|
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
|
|
|
|
|
parameterPackag(basicProductsEntity, ioOrderDetailBizEntity, thrInvOrderDetail);
|
|
|
|
|