Browse Source

Merge branch 'dev' into pre-production

master
汤建军 11 months ago
parent
commit
aa8c2f65f0
  1. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  3. 35
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportBillLoadingController.java
  4. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/excel/BillLoadingReportExcel.java
  5. 20
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportBillLoadingMapper.java
  6. 22
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportBillLoadingMapper.xml
  7. 11
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportBillLoadingAsyncService.java
  8. 29
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportBillLoadingAsyncService.java
  9. 4
      blade-service/logpm-report/src/main/java/com/logpm/report/util/MyExcelUtil.java

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -240,12 +240,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
int weiqianshoujianshu = 0;
int zhuangchejianshu = 0;
int qianshoujianshu = 0;
if (Func.isNotEmpty(list) && list.size()>0){
zhuangchejianshu += list.stream().filter(f -> f.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
weizhuangchejianshu += list.stream().filter(f -> f.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
qianshoujianshu += list.stream().filter(f -> f.getStockSignfoStatus().equals(InventorySigningStatusConstant.yiqianshou.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
weiqianshoujianshu += list.stream().filter(f -> f.getStockSignfoStatus().equals(InventorySigningStatusConstant.weiqianshou.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
}
// if (Func.isNotEmpty(list) && list.size()>0){
// zhuangchejianshu += list.stream().filter(f -> f.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
// weizhuangchejianshu += list.stream().filter(f -> f.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
// qianshoujianshu += list.stream().filter(f -> f.getStockSignfoStatus().equals(InventorySigningStatusConstant.yiqianshou.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
// weiqianshoujianshu += list.stream().filter(f -> f.getStockSignfoStatus().equals(InventorySigningStatusConstant.weiqianshou.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
// }
if (Func.isNotEmpty(distributionParcelListEntities)) {
weizhuangchejianshu += distributionParcelListEntities.stream().filter(f -> f.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())).mapToInt(DistributionParcelListEntity::getQuantity).sum();
zhuangchejianshu += distributionParcelListEntities.stream().filter(f -> f.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue())).mapToInt(DistributionParcelListEntity::getQuantity).sum();

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -2349,6 +2349,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
public List<User> getRoleList() {
//获取当前登录用户
BladeUser user = AuthUtil.getUser();
log.info(">>>>>>>>>>>>>>>user:{}",user);
String tenantId = user.getTenantId();
// String deptId = user.getDeptId();
//查询备货岗位
@ -2366,6 +2367,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
});
String roleIds = stringList.stream().collect(Collectors.joining(","));
R<List<User>> listR = userSearchClient.listByRole(roleIds); //查询角色下的所有人员数据
log.info(">>>>>>>>>>>>>>>>>>>>>listR,:{}",listR);
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
//有没有选择仓库信息
if (ObjectUtils.isNotNull(myCurrentWarehouse)) {

35
blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportBillLoadingController.java

@ -1,9 +1,25 @@
package com.logpm.report.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.report.excel.BillLoadingReportExcel;
import com.logpm.report.service.IReportBillLoadingAsyncService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.secure.BladeUser;
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;
/**
* 自提单包条控制器
@ -14,6 +30,25 @@ import org.springframework.web.bind.annotation.RestController;
@Api(value = "自提单报表", tags = "自提单报表接口")
public class ReportBillLoadingController {
private IReportBillLoadingAsyncService reportBillLoadingAsyncService;
/**
* 导出数据
*/
@GetMapping("/export-billLoading")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionDeliveryList")
public R exportBillLoading(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
List<BillLoadingReportExcel> list = reportBillLoadingAsyncService.exportBillLoading(param);
ExcelUtil.export(response, "配送管理数据" + DateUtil.time(), "配送管理数据表", list, BillLoadingReportExcel.class);
return R.status(true);
}

2
blade-service/logpm-report/src/main/java/com/logpm/report/excel/BillLoadingReportExcel.java

@ -21,7 +21,7 @@ public class BillLoadingReportExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("提货件数")
private String stockupCode;
private String BillLoadingNum;
@ColumnWidth(20)
@ExcelProperty("到付运费")

20
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportBillLoadingMapper.java

@ -0,0 +1,20 @@
package com.logpm.report.mapper;
import com.logpm.report.excel.BillLoadingReportExcel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface ReportBillLoadingMapper {
/**
* 导出自提单
* @param param
* @return
*/
List<BillLoadingReportExcel> exportBillLoading(@Param("param") Map<String, Object> param);
}

22
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportBillLoadingMapper.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.report.mapper.ReportBillLoadingMapper">
<select id="exportBillLoading" resultType="com.logpm.report.excel.BillLoadingReportExcel">
SELECT
ldbl.create_time AS createdTime,
IF(SUM(ldbll.quantity) is null,0,SUM(ldbll.quantity)) AS BillLoadingNum,
IF( (SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='1' AND is_deleted = 0) is null,0, (SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='1' AND is_deleted = 0)) AS collectPaymentFee,
IF((SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='2' AND is_deleted = 0) is null,0,(SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='2' AND is_deleted = 0)) AS transportFee,
IF((SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='3' AND is_deleted = 0) is null ,0,(SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='3' AND is_deleted = 0) )AS storageFee,
IF((SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='4' AND is_deleted = 0) is null,0,(SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='4' AND is_deleted = 0)) AS forkliftFee,
IF((SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='5' AND is_deleted = 0) is null,0,(SELECT money FROM logpm_distribution_delivery_charge WHERE bill_lading = ldbl.id AND cost ='5' AND is_deleted = 0)) AS addValueFee
FROM
logpm_distrilbution_bill_lading AS ldbl
LEFT JOIN logpm_distribution_delivery_charge AS lddc ON ldbl.id = lddc.bill_lading
LEFT JOIN logpm_distribution_bill_lading_scan AS ldbll ON ldbll.bill_lading_id = ldbl.id
GROUP BY
ldbl.id
</select>
</mapper>

11
blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportBillLoadingAsyncService.java

@ -1,7 +1,18 @@
package com.logpm.report.service;
import com.logpm.report.excel.BillLoadingReportExcel;
import java.util.List;
import java.util.Map;
public interface IReportBillLoadingAsyncService {
/**
* 导出自提单报表
* @param param
* @return
*/
List<BillLoadingReportExcel> exportBillLoading(Map<String, Object> param);
}

29
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportBillLoadingAsyncService.java

@ -1,19 +1,38 @@
package com.logpm.report.service.impl;
import com.logpm.report.excel.BillLoadingReportExcel;
import com.logpm.report.mapper.ReportBillLoadingMapper;
import com.logpm.report.service.IReportBillLoadingAsyncService;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@Log4j2
@Service
@AllArgsConstructor
public class ReportBillLoadingAsyncService implements IReportBillLoadingAsyncService {
private ReportBillLoadingMapper reportBillLoadingMapper;
/**
* @param param
* @return
*/
@Override
@Async
public List<BillLoadingReportExcel> exportBillLoading(Map<String, Object> param) {
List<BillLoadingReportExcel> list = reportBillLoadingMapper.exportBillLoading(param);
log.info("导出数据条数:{}",list.size());
list.stream().forEach(l->l.setAmountToFee(l.getForkliftFee()+l.getAddValueFee()+l.getStorageFee()+l.getCollectPaymentFee()+l.getTransportFee()));
return list;
}
}

4
blade-service/logpm-report/src/main/java/com/logpm/report/util/MyExcelUtil.java

@ -0,0 +1,4 @@
package com.logpm.report.util;
public class MyExcelUtil {
}
Loading…
Cancel
Save