43 changed files with 1168 additions and 159 deletions
@ -0,0 +1,78 @@
|
||||
package com.logpm.trunkline.vo; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
@Data |
||||
public class BillladingWaybillExportVO implements Serializable { |
||||
|
||||
@ExcelProperty(value = "提货批次") |
||||
private String billadingCode; |
||||
|
||||
@ExcelProperty(value = "运单号") |
||||
private String waybillNo; |
||||
|
||||
@ExcelProperty(value = "开单时间") |
||||
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private Date openOrderTime; |
||||
|
||||
@ExcelProperty(value = "货物名称") |
||||
private String goodsName; |
||||
|
||||
@ExcelProperty(value = "扫描件数") |
||||
private Integer scanNum; |
||||
|
||||
@ExcelProperty(value = "提货件数") |
||||
private Integer realNum; |
||||
|
||||
@ExcelProperty(value = "提货重量") |
||||
private BigDecimal realWeight; |
||||
|
||||
@ExcelProperty(value = "提货体积") |
||||
private BigDecimal realVolume; |
||||
|
||||
@ExcelProperty(value = "到站") |
||||
private String destination; |
||||
|
||||
@ExcelProperty(value = "目的仓") |
||||
private String destinationWarehouseName; |
||||
|
||||
@ExcelProperty(value = "发货人") |
||||
private String shipperName; |
||||
|
||||
@ExcelProperty(value = "发货单位") |
||||
private String shipper; |
||||
|
||||
@ExcelProperty(value = "发货手机") |
||||
private String shipperMobile; |
||||
|
||||
@ExcelProperty(value = "收货人") |
||||
private String consigneeName; |
||||
|
||||
@ExcelProperty(value = "收货单位") |
||||
private String consignee; |
||||
|
||||
@ExcelProperty(value = "收货电话") |
||||
private String consigneeMobile; |
||||
|
||||
@ExcelProperty(value = "收货地址") |
||||
private String consigneeAddress; |
||||
|
||||
@ExcelProperty(value = "备注") |
||||
private String remark; |
||||
|
||||
@ExcelProperty(value = "支付方式") |
||||
private BigDecimal collectPay; |
||||
|
||||
@ExcelProperty(value = "提货费用") |
||||
private BigDecimal billladingFee; |
||||
|
||||
@ExcelProperty(value = "运输费用") |
||||
private BigDecimal totalFreight; |
||||
|
||||
} |
@ -0,0 +1,78 @@
|
||||
package com.logpm.trunkline.vo; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
@Data |
||||
public class TrunklineBillladingExportVO implements Serializable { |
||||
|
||||
@ExcelProperty(value = "提货批次") |
||||
private String billladingCode ; |
||||
|
||||
@ExcelProperty(value = "车牌号") |
||||
private String carNumber ; |
||||
|
||||
@ExcelProperty(value = "司机名称") |
||||
private String driverName ; |
||||
|
||||
@ExcelProperty(value = "司机电话") |
||||
private String driverPhone ; |
||||
|
||||
@ExcelProperty(value = "仓库名称") |
||||
private String warehouseName ; |
||||
|
||||
@ExcelProperty(value = "线路名称") |
||||
private String lineNameTitle ; |
||||
|
||||
@ExcelProperty(value = "提货开始时间") |
||||
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private Date startTime ; |
||||
@ExcelProperty(value = "提货完成时间") |
||||
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private Date endTime ; |
||||
|
||||
@ExcelProperty(value = "状态") |
||||
private String billladingStatus ; |
||||
|
||||
@ExcelProperty(value = "计费模式") |
||||
private String chargeType ; |
||||
|
||||
@ExcelProperty(value = "提货费用") |
||||
private BigDecimal totalFee ; |
||||
|
||||
@ExcelProperty(value = "备注") |
||||
private String remark ; |
||||
|
||||
@ExcelProperty(value = "承运商") |
||||
private String carrierName ; |
||||
|
||||
@ExcelProperty(value = "单数") |
||||
private Integer orderNum; |
||||
|
||||
@ExcelProperty(value = "件数") |
||||
private Integer realNum; |
||||
|
||||
@ExcelProperty(value = "预计件数") |
||||
private Integer planNum ; |
||||
|
||||
@ExcelProperty(value = "重量") |
||||
private BigDecimal realWeight ; |
||||
|
||||
@ExcelProperty(value = "计划重量") |
||||
private BigDecimal planWeight ; |
||||
|
||||
@ExcelProperty(value = "体积") |
||||
private BigDecimal realVolume ; |
||||
|
||||
@ExcelProperty(value = "计划体积") |
||||
private BigDecimal planVolume ; |
||||
|
||||
@ExcelProperty(value = "创建人") |
||||
private String createUserName ; |
||||
|
||||
} |
@ -0,0 +1,97 @@
|
||||
package com.logpm.distribution.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.logpm.basicdata.entity.BasicdataClientUserEntity; |
||||
import com.logpm.basicdata.feign.IBasicdataClientClient; |
||||
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
||||
import com.logpm.distribution.entity.DistributionStockArticleEntity; |
||||
import com.logpm.distribution.excel.DistributionStockArticleExcel; |
||||
import com.logpm.distribution.service.IDistributionStockArticleService; |
||||
import com.logpm.distribution.vo.DistributionStockArticleVO; |
||||
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import java.util.stream.Collectors; |
||||
|
||||
/** |
||||
* 商家订单控制器 |
||||
* @date 2019/07/01 |
||||
* @author pref |
||||
*/ |
||||
@RestController |
||||
@Slf4j |
||||
@AllArgsConstructor |
||||
@RequestMapping("/maill") |
||||
@Api(value = "商场在库订单", tags = "配送在库订单接口") |
||||
public class MallOrderController extends BladeController { |
||||
private final IDistributionStockArticleService distributionStockArticleService; |
||||
|
||||
private final IBasicdataClientClient basicdataClientClient; |
||||
|
||||
private IBasicdataWarehouseClient warehouseClient; |
||||
@GetMapping("/clientList") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "分页", notes = "传入distributionStockArticle") |
||||
public R<IPage<DistributionStockArticleVO>> clientList(@ApiIgnore DistributionStockArticleVO distributionStockArticle, Query query) { |
||||
|
||||
try { |
||||
// 得到当前登录用户的Id
|
||||
List<BasicdataClientUserEntity> basicdataClientUserEntityListByUserIds = basicdataClientClient.getBasicdataClientUserEntityListByUserId(AuthUtil.getUserId()); |
||||
List clientIds = null; |
||||
if (Func.isNotEmpty(basicdataClientUserEntityListByUserIds)) { |
||||
clientIds = basicdataClientUserEntityListByUserIds.stream().map(BasicdataClientUserEntity::getClientId).collect(Collectors.toList()); |
||||
distributionStockArticle.setClientIds(clientIds); |
||||
} else { |
||||
return null; |
||||
} |
||||
IPage<DistributionStockArticleEntity> pages = distributionStockArticleService.selectClientListPage(Condition.getPage(query), distributionStockArticle); |
||||
return R.data(DistributionStockArticleWrapper.build().pageVO(pages)); |
||||
}catch (Exception e){ |
||||
log.error("商场订单列表查询",e); |
||||
} |
||||
return R.fail("服务器异常"); |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@GetMapping("/export-maillOrder") |
||||
@ApiOperationSupport(order = 9) |
||||
@ApiOperation(value = "导出已签订单数据", notes = "传入distributionStockArticle") |
||||
public void exportMaillOrder(@ApiIgnore @RequestParam Map<String, Object> paramMap, BladeUser bladeUser, HttpServletResponse response) { |
||||
|
||||
List<BasicdataClientUserEntity> basicdataClientUserEntityListByUserIds = basicdataClientClient.getBasicdataClientUserEntityListByUserId(AuthUtil.getUserId()); |
||||
List clientIds = null; |
||||
if (Func.isNotEmpty(basicdataClientUserEntityListByUserIds)) { |
||||
clientIds = basicdataClientUserEntityListByUserIds.stream().map(BasicdataClientUserEntity::getClientId).collect(Collectors.toList()); |
||||
paramMap.put("clientIds",clientIds); |
||||
} else { |
||||
return ; |
||||
} |
||||
List<DistributionStockArticleExcel> list = distributionStockArticleService.exportMallOrder(paramMap); |
||||
ExcelUtil.export(response, "商场在库订单明细" + DateUtil.time(), "商场在库订单明细", list, DistributionStockArticleExcel.class); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue