Commit 7ce16d14 authored by liuzeheng's avatar liuzeheng

二期需求第16、19问题

parent 7689f33e
......@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery;
import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseIn.OrderWarehouseInDO;
import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseIn.OrderWarehouseInBackItemVO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseIn.OrderWarehouseInQueryVO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseIn.OrderWarehouseInSumBackVO;
......@@ -72,4 +73,17 @@ public interface OrderWarehouseInMapper extends AbstractMapper<OrderWarehouseInD
@ResultType(OrderWarehouseInDO.class)
@Select("select * from ecw_order_warehouse_in wi where wi.deleted = 1 and wi.order_id = #{orderId} and wi.order_item_id = #{orderItemId} order by id asc")
List<OrderWarehouseInDO> getDeletedList(@Param("orderId") Long orderId, @Param("orderItemId") Long orderItemId);
@ResultType(OrderItemBackVO.class)
@Select("SELECT wi.* ," +
"GROUP_CONCAT(DISTINCT dict.label) as specificationType ," +
"GROUP_CONCAT(DISTINCT spe.label) as warehouseType ," +
"GROUP_CONCAT(wi.remark) as warehouseRecordRemark " +
"FROM ecw_order_warehouse_in wi LEFT JOIN system_dict_data dict ON dict.dict_type = 'packaging_type' AND dict.`value` = wi.unit " +
"LEFT JOIN system_dict_data spe ON spe.dict_type = 'warehousing_specification_type' AND spe.`value` = wi.specification_type " +
"where 1 = 1 AND wi.deleted = 0 and wi.order_id = #{orderId} and wi.order_item_id = #{orderItemId} order by id asc")
OrderItemBackVO getWarehouseInByItemIdAndOrderId(@Param("orderId") Long orderId, @Param("orderItemId") Long orderItemId);
}
......@@ -750,6 +750,20 @@ public class OrderQueryServiceImpl implements OrderQueryService {
item.setVWeight(BigDecimal.ZERO.toString());
item.setQQuantity(BigDecimal.ZERO.toString());
}
//入仓类型,多个用逗号分隔
OrderItemBackVO warehouseInDO = orderWarehouseInMapper.getWarehouseInByItemIdAndOrderId(item.getOrderId(),item.getOrderItemId());
if(Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getWarehouseType())){
item.setWarehouseType(warehouseInDO.getWarehouseType()) ;
}
//入仓包装单位,多个用逗号分隔
if(Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getSpecificationType())){
item.setSpecificationType(warehouseInDO.getSpecificationType()) ;
}
if(Objects.nonNull(warehouseInDO) && StringUtils.isNotBlank(warehouseInDO.getWarehouseRecordRemark())){
item.setWarehouseRecordRemark(warehouseInDO.getWarehouseRecordRemark()) ;
}
// 转换赋值出刷数值
item.setInitialChargeWeight(item.getChargeWeight());
item.setInitialChargeVolume(item.getChargeVolume());
......
......@@ -428,6 +428,16 @@ public class OrderItemBackVO {
@ApiModelProperty(value = "订单项入仓影像列表")
private List<String> pictureUrls;
@ApiModelProperty(value = "入仓类型,多个用逗号分隔")
private String warehouseType ;
@ApiModelProperty(value = "入仓包装单位,多个用逗号分隔")
private String specificationType ;
@ApiModelProperty(value = "入仓记录备注,多个用逗号分隔")
private String warehouseRecordRemark ;
public void setCouponInfo(String couponInfo) {
this.couponInfo = couponInfo;
if (StringUtils.isNotBlank(couponInfo)){
......
......@@ -178,6 +178,9 @@ public class BoxLadingBillServiceImpl extends AbstractService<BoxLadingBillMappe
if (boxLadingBillDO.getShipCompanyId() != null && boxLadingBillDO.getShipCompanyId() > 0L) {
headMap.put("shipCompany",supplierService.getSupplier(boxLadingBillDO.getShipCompanyId()).getCompanyEn());
}
if(box !=null){
headMap.put("qyDate",box.getQyDate()==null? "": DateUtil.formatDateTime(box.getQyDate()) ) ;
}
headMap.put("shipType",shipType);
headMap.put("freight","FREIGHT PREPAID");
StringBuffer remarks = new StringBuffer();
......@@ -227,6 +230,7 @@ public class BoxLadingBillServiceImpl extends AbstractService<BoxLadingBillMappe
headMap.put("volume",boxLadingBillDO.getCbm() == null ? "" : String.valueOf(boxLadingBillDO.getCbm().doubleValue()));
headMap.put("boxNo",boxLadingBillDO.getContainerSealNo());
headMap.put("totalNum","SAY("+shipType+")ONLY ");
headMap.put("selfNo",box.getSelfNo()==null?"":box.getSelfNo());
return headMap;
}
......
......@@ -1760,7 +1760,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
BoxLoadOrderVO orderVO = new BoxLoadOrderVO();
BeanUtils.copyProperties(boxPreloadGoodsDO, orderVO);
orderVO.setShipmentId(shipmentId);
loadOrderList.add(orderVO);
orderVO.setMultiSpecification(boxService.getMultiSpecification(goodsList));
......
......@@ -191,7 +191,11 @@ public class BoxLoadOrderVO {
@ApiModelProperty(value = "语言")
private Integer lang;
/**
* shipmentId
*/
private Long shipmentId ;
public void setGuanLianOrderStatus(String guanLianOrderStatus) {
this.guanLianOrderStatus = guanLianOrderStatus;
......
......@@ -106,7 +106,7 @@ public class BoxLadingBillController {
@GetMapping("/getBoxLadingBillPdf")
@ApiOperation("获得提单补料pdf")
@ApiImplicitParam(name = "shipmentId", value = "出货编号", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<String> getBoxLadingBillPdf(@RequestParam("shipmentId") Long shipmentId,HttpServletResponse response) throws Exception {
public CommonResult<String> getBoxLadingBillPdf(@RequestParam("shipmentId") Long shipmentId,@RequestParam("type") Integer type,HttpServletResponse response) throws Exception {
InputStream inputStream = null;
OutputStream outputStream = null;
BoxLadingBillDO boxLadingBillDO = boxLadingBillService.selectOne(BoxLadingBillDO::getShipmentId, shipmentId);
......@@ -115,11 +115,17 @@ public class BoxLadingBillController {
}
try {
// inputStream = new FileInputStream(new File("C:\\lzlj\\boxLadingBill.xlsx"));
if(type==1){//从海运页面进入
inputStream = this.getClass().getClassLoader().getResourceAsStream(path + "/boxLadingBill.xlsx");
}else if(type==2){
inputStream = this.getClass().getClassLoader().getResourceAsStream(path + "/boxAirLadingBill.xlsx");
}
outputStream = response.getOutputStream();
Map<String, String> boxLadingBillPdf = boxLadingBillService.getBoxLadingBillPdf(shipmentId);
ExcelWriter excelWriter = EasyExcel.write(outputStream).withTemplate(inputStream).build();
WriteSheet sheet = EasyExcel.writerSheet(0).build();
sheet.setSheetName("空运");
excelWriter.fill(boxLadingBillPdf, sheet);
excelWriter.finish();
outputStream.flush();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment