|
|
@ -34,6 +34,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
|
@Slf4j |
|
|
|
@Service |
|
|
|
@Service |
|
|
@ -139,29 +140,33 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline |
|
|
|
for (String orderPackageCode : idArray) { |
|
|
|
for (String orderPackageCode : idArray) { |
|
|
|
DistributionStockArticleQRCodeVO vo = new DistributionStockArticleQRCodeVO(); |
|
|
|
DistributionStockArticleQRCodeVO vo = new DistributionStockArticleQRCodeVO(); |
|
|
|
TrunklineAdvanceDetailEntity advanceDetailEntity = baseMapper.findEntityByOrderPackageCodelimit1(orderPackageCode); |
|
|
|
TrunklineAdvanceDetailEntity advanceDetailEntity = baseMapper.findEntityByOrderPackageCodelimit1(orderPackageCode); |
|
|
|
Long advanceId = advanceDetailEntity.getAdvanceId(); |
|
|
|
if(!Objects.isNull(advanceDetailEntity)){ |
|
|
|
TrunklineAdvanceEntity advanceEntity = advanceMapper.selectById(advanceId); |
|
|
|
Long advanceId = advanceDetailEntity.getAdvanceId(); |
|
|
|
if(ObjectUtil.isEmpty(advanceEntity.getSenderName()) || ("/").equals(advanceEntity.getSenderName())){ |
|
|
|
TrunklineAdvanceEntity advanceEntity = advanceMapper.selectById(advanceId); |
|
|
|
vo.setShipperName("无"); |
|
|
|
if(ObjectUtil.isEmpty(advanceEntity.getSenderName()) || ("/").equals(advanceEntity.getSenderName())){ |
|
|
|
} |
|
|
|
vo.setShipperName("无"); |
|
|
|
if(ObjectUtil.isEmpty(advanceEntity.getSenderAddress())){ |
|
|
|
} |
|
|
|
vo.setShipperAddress(" "); |
|
|
|
if(ObjectUtil.isEmpty(advanceEntity.getSenderAddress())){ |
|
|
|
|
|
|
|
vo.setShipperAddress(" "); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
vo.setOrderCode(advanceDetailEntity.getOrderCode()); |
|
|
|
|
|
|
|
vo.setMallName(advanceEntity.getDealerName()); |
|
|
|
|
|
|
|
vo.setCustomerName(advanceEntity.getCustomerName()); |
|
|
|
|
|
|
|
vo.setCustomerTelephone(advanceEntity.getCustomerPhone()); |
|
|
|
|
|
|
|
vo.setMaterialName(advanceDetailEntity.getMaterialName()); |
|
|
|
|
|
|
|
vo.setCategory(advanceDetailEntity.getFirstPackName()); |
|
|
|
|
|
|
|
vo.setWaybillNumber(StringUtil.isBlank(advanceDetailEntity.getWaybillNo())?"":advanceDetailEntity.getWaybillNo()); |
|
|
|
|
|
|
|
vo.setObjective(advanceEntity.getWarehouseName()); |
|
|
|
|
|
|
|
vo.setDealerCode(advanceEntity.getDealerCode()); |
|
|
|
|
|
|
|
vo.setQrCode(orderPackageCode); |
|
|
|
|
|
|
|
vo.setDealerName(advanceEntity.getDealerName()); |
|
|
|
|
|
|
|
vo.setTotalNumber(advanceEntity.getTotalNum()+""); |
|
|
|
} |
|
|
|
} |
|
|
|
vo.setOrderCode(advanceDetailEntity.getOrderCode()); |
|
|
|
|
|
|
|
vo.setMallName(advanceEntity.getDealerName()); |
|
|
|
|
|
|
|
vo.setCustomerName(advanceEntity.getCustomerName()); |
|
|
|
|
|
|
|
vo.setCustomerTelephone(advanceEntity.getCustomerPhone()); |
|
|
|
|
|
|
|
vo.setMaterialName(advanceDetailEntity.getMaterialName()); |
|
|
|
|
|
|
|
vo.setCategory(advanceDetailEntity.getFirstPackName()); |
|
|
|
|
|
|
|
vo.setWaybillNumber(StringUtil.isBlank(advanceDetailEntity.getWaybillNo())?"":advanceDetailEntity.getWaybillNo()); |
|
|
|
|
|
|
|
vo.setObjective(advanceEntity.getWarehouseName()); |
|
|
|
|
|
|
|
vo.setDealerCode(advanceEntity.getDealerCode()); |
|
|
|
|
|
|
|
vo.setQrCode(orderPackageCode); |
|
|
|
|
|
|
|
vo.setDealerName(advanceEntity.getDealerName()); |
|
|
|
|
|
|
|
vo.setTotalNumber(advanceEntity.getTotalNum()+""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = JSONObject.parseObject(JSONObject.toJSONString(vo), Map.class); |
|
|
|
Map<String, Object> map = JSONObject.parseObject(JSONObject.toJSONString(vo), Map.class); |
|
|
|
map.put("id",advanceDetailEntity.getId()); |
|
|
|
if(!Objects.isNull(advanceDetailEntity)){ |
|
|
|
|
|
|
|
map.put("id",advanceDetailEntity.getId()); |
|
|
|
|
|
|
|
} |
|
|
|
String filename = QRCodeUtil.createCodeToFile(vo.getQrCode()); |
|
|
|
String filename = QRCodeUtil.createCodeToFile(vo.getQrCode()); |
|
|
|
map.put("img", QRCodeUtil.getEmpAutograph(filename)); |
|
|
|
map.put("img", QRCodeUtil.getEmpAutograph(filename)); |
|
|
|
// 订单号 生成二维码
|
|
|
|
// 订单号 生成二维码
|
|
|
|