diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceController.java index b6e9ac560..75003dc30 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataPriceController.java @@ -16,8 +16,19 @@ */ package com.logpm.basicdata.controller; +import cn.hutool.core.date.DateUtil; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; +import com.alibaba.excel.write.metadata.WriteTable; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.logpm.basicdata.excel.price.BasicdataPriceCategoryBasicExcel; +import com.logpm.basicdata.excel.price.BasicdataPriceCategoryDispatchExcel; +import com.logpm.basicdata.excel.price.BasicdataPriceCategoryWarehouseExcel; +import com.logpm.basicdata.excel.price.BasicdataPriceExcel; +import com.logpm.basicdata.excel.price.BasicdataPriceFullVehicleExcel; +import com.logpm.basicdata.excel.price.BasicdataPriceGeneralExcel; import com.logpm.basicdata.service.IBasicdataPriceService; import com.logpm.basicdata.vo.BasicdatPriceApiVO; import com.logpm.basicdata.vo.BasicdataPriceBasicUpdateVO; @@ -29,6 +40,7 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; +import org.apache.commons.codec.Charsets; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; @@ -40,12 +52,18 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; +import springfox.documentation.annotations.ApiIgnore; +import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.io.InputStream; +import java.io.IOException; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.Map; /** * 基础价格表 控制器 @@ -129,4 +147,39 @@ public class BasicdataPriceController extends BladeController { return R.data(detail); } + @GetMapping("/export") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "导出", notes = "导出") + public void export(@ApiIgnore @RequestParam Map map, HttpServletResponse response) { + try { + String fileName = "基础价格表" + DateUtil.today(); + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding(Charsets.UTF_8.name()); + fileName = URLEncoder.encode(fileName, Charsets.UTF_8.name()); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build(); + WriteTable table1 = EasyExcel.writerTable(0).head(BasicdataPriceExcel.class).build(); + WriteTable table2 = EasyExcel.writerTable(1).head(BasicdataPriceCategoryBasicExcel.class).build(); + WriteTable table3 = EasyExcel.writerTable(2).head(BasicdataPriceCategoryWarehouseExcel.class).build(); + WriteTable table4 = EasyExcel.writerTable(3).head(BasicdataPriceCategoryDispatchExcel.class).build(); + WriteTable table5 = EasyExcel.writerTable(4).head(BasicdataPriceFullVehicleExcel.class).build(); + WriteTable table6 = EasyExcel.writerTable(5).head(BasicdataPriceGeneralExcel.class).build(); + WriteSheet writeSheet1 = EasyExcel.writerSheet(0, "客户信息").build(); + WriteSheet writeSheet2 = EasyExcel.writerSheet(1, "提货干线按品类计费").build(); + WriteSheet writeSheet3 = EasyExcel.writerSheet(2, "仓储按品类计费").build(); + WriteSheet writeSheet4 = EasyExcel.writerSheet(3, "配送按品类计费").build(); + WriteSheet writeSheet5 = EasyExcel.writerSheet(4, "最低计费").build(); + WriteSheet writeSheet6 = EasyExcel.writerSheet(5, "整车").build(); + excelWriter.write(new ArrayList(), writeSheet1, table1); + excelWriter.write(new ArrayList(), writeSheet2, table2); + excelWriter.write(new ArrayList(), writeSheet3, table3); + excelWriter.write(new ArrayList(), writeSheet4, table4); + excelWriter.write(new ArrayList(), writeSheet5, table5); + excelWriter.write(new ArrayList(), writeSheet6, table6); + excelWriter.finish(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/ClerkCheckPushDataQueueHandler.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/ClerkCheckPushDataQueueHandler.java index 8491a8ccb..3bdc8ab10 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/ClerkCheckPushDataQueueHandler.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/ClerkCheckPushDataQueueHandler.java @@ -235,7 +235,15 @@ public class ClerkCheckPushDataQueueHandler { if (ObjectUtils.isNotNull(user)) { assert user != null; signPushDataUnitDTO.setAdministratorsName(user.getName()); - signPushDataUnitDTO.setAdministratorsPhone(user.getPhone()); + if (ObjectUtils.isNotEmpty(user.getPhone())){ + signPushDataUnitDTO.setAdministratorsPhone(user.getPhone()); + }else { + if (ObjectUtils.isNotEmpty(user.getAccount())){ + signPushDataUnitDTO.setAdministratorsPhone(user.getAccount()); + }else { + log.info("用户无电话号码且账号信息为空>>用户名称:{}",user.getName()); + } + } } } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 3640f3a32..a57e6d52d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -2058,6 +2058,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImplupdate().lambda() + .eq(DistributionParcelListEntity::getOrderPackageCode, disStockListDetailEntity.getStockPackageCode()) + .eq(DistributionParcelListEntity::getWarehouseId, myCurrentWarehouse.getId()) + .eq(DistributionParcelListEntity::getMaterialCode, disStockListDetailEntity.getSku()) + ); + log.info(">>>>>>>>>>>>>>>>>>>装车修改库存品包件>装车包件码:{},",disStockListDetailEntity.getStockPackageCode()); DistributionLoadscaninvnEntity distributionLoadscaninvnEntity = getDistributionLoadscaninvnEntity(distrilbutionloadingscanDTO, distributionDeliverySelfEntity, disStockListDetailEntities); packageLockIds.add(distributionLoadscaninvnEntity.getInventoryPackageId()); distributionLoadscaninvnService.save(distributionLoadscaninvnEntity);