Browse Source

待签收查看增值服务列表

training
kilo 1 year ago
parent
commit
0bc18e0e93
  1. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionAddvalueController.java
  2. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  3. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionAddvalueDTO.java
  4. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.java
  5. 18
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml
  6. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAddvalueService.java
  7. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  8. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java
  9. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  10. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  11. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionAddvalueController.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.controller;
import com.logpm.distribution.dto.app.DistributionAppAddvalueDTO;
import com.logpm.distribution.entity.DistributionAddvalueEntity;
import com.logpm.distribution.excel.DistributionAddvalueExcel;
import com.logpm.distribution.service.IDistributionAddvalueService;
@ -52,7 +53,7 @@ import javax.servlet.http.HttpServletResponse;
*/
@RestController
@AllArgsConstructor
@RequestMapping("addvalue/distributionAddvalue")
@RequestMapping("/addvalue")
@Api(value = "配送增值服务表", tags = "配送增值服务表接口")
public class DistributionAddvalueController extends BladeController {
@ -147,4 +148,17 @@ public class DistributionAddvalueController extends BladeController {
ExcelUtil.export(response, "配送增值服务表数据" + DateUtil.time(), "配送增值服务表数据表", list, DistributionAddvalueExcel.class);
}
// /**
// * 查询
// */
// @PostMapping("/addvalueInfoList")
// @ApiOperationSupport(order = 2)
// @ApiOperation(value = "分页", notes = "传入distributionAddvalue")
// public R addvalueInfoList(@ApiIgnore @RequestBody DistributionAppAddvalueDTO distributionAddvalue) {
// R r = distributionAddvalueService.editAddvalueInfo(distributionAddvalue);
// return r;
// }
}

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java

@ -19,6 +19,7 @@ package com.logpm.distribution.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.distribution.dto.DistributionAddvalueDTO;
import com.logpm.distribution.dto.DistributionReservationStocklistDTO;
import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.entity.DistributionSignforEntity;
@ -233,4 +234,17 @@ public class DistributionSignforController extends BladeController {
ExcelUtil.export(response, "签收管理数据" + DateUtil.time(), "签收管理数据表", list, DistributionSignforExcel.class);
}
/**
* 签收管理 删除
*/
@PostMapping("/addvalueInfoList")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R addvalueInfoList(@RequestBody DistributionAddvalueDTO distributionAddvalueDTO) {
R r = distributionSignforService.getAddvalueInfoList(distributionAddvalueDTO);
return r;
}
}

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionAddvalueDTO.java

@ -31,4 +31,9 @@ import lombok.EqualsAndHashCode;
public class DistributionAddvalueDTO extends DistributionAddvalueEntity {
private static final long serialVersionUID = 1L;
/**
* 签收ID
*/
private Long signforId;
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.java

@ -19,6 +19,7 @@ package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionAddvalueDTO;
import com.logpm.distribution.entity.DistributionAddvalueEntity;
import com.logpm.distribution.entity.DistributionAddvaluePackageEntity;
import com.logpm.distribution.excel.DistributionAddvalueExcel;
@ -73,6 +74,13 @@ public interface DistributionAddvalueMapper extends BaseMapper<DistributionAddva
*/
List<DistributionAddvalueVO> addvalueInfo(@Param("reservationId")Long reservationId);
/**
* 查询签收列表客户的增值服务项
* @param distributionAddvalueDTO
* @return
*/
DistributionAddvalueVO getAddvalueBySignfor(@Param("par")DistributionAddvalueDTO distributionAddvalueDTO);
// /**
// * 删除增值服务
// * @param reservationId

18
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml

@ -72,5 +72,23 @@
GROUP BY ldad.fee,ldad.num,ldad.flool_num,ldad.distance,ldad.id
</select>
<select id="getAddvalueBySignfor" resultType="com.logpm.distribution.vo.DistributionAddvalueVO">
SELECT DISTINCT
lda.addvalue_id,
group_concat(DISTINCT ldad.fee) AS fee,
group_concat(DISTINCT ldad.num) AS num,
group_concat(DISTINCT ldad.id) AS addvalueDetailId,
group_concat(DISTINCT ldad.flool_num) AS floolNum,
group_concat(DISTINCT ldad.distance) AS distance,
group_concat( ldap.package_id SEPARATOR ',' ) AS packageListIds
FROM
logpm_distribution_signfor AS lds
INNER JOIN logpm_distribution_addvalue lda ON lds.reservation_id = lda.ref_id
INNER JOIN logpm_distribution_addvalue_detail ldad ON lda.id = ldad.addvalue_id
INNER JOIN logpm_distribution_addvalue_package ldap ON ldad.id = ldap.addvalue_detail_id
WHERE lds.id = #{par.signforId} and lda.addvalue_id = #{par.addvalueId}
GROUP BY
lda.id
</select>
</mapper>

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAddvalueService.java

@ -19,6 +19,7 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.logpm.distribution.dto.DistributionAddvalueDTO;
import com.logpm.distribution.dto.app.DistributionAppAddvalueDTO;
import com.logpm.distribution.entity.DistributionAddvalueEntity;
import com.logpm.distribution.entity.DistributionAddvaluePackageEntity;
@ -103,4 +104,12 @@ public interface IDistributionAddvalueService extends IService<DistributionAddva
* @return
*/
R addvalueInfo(DistributionAppAddvalueDTO distributionAppAddvalueDTO);
// /**
// * 签收列表查看对应的增值服务列表信息
// * @param distributionAddvalueDTO
// * @return
// */
// List<DistributionAddvaluePackageEntity> getAddvalueBySignfor(DistributionAddvalueDTO distributionAddvalueDTO);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java

@ -19,6 +19,7 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.bean.Resp;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionAddvalueDTO;
import com.logpm.distribution.dto.DistributionReservationStocklistDTO;
import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.DistrilbutionAppsignforDTO;
@ -143,4 +144,11 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
* @return
*/
List<DistributionReservationStocklistVO> signforInventoryList(Long signforId);
/**
* 查询签收对应的增值服务类型
* @param distributionAddvalueDTO
* @return
*/
R getAddvalueInfoList(DistributionAddvalueDTO distributionAddvalueDTO);
}

15
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java

@ -21,6 +21,7 @@ import com.alibaba.druid.sql.visitor.functions.If;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.bean.Res;
import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.DistributionAddvalueDTO;
import com.logpm.distribution.dto.app.DistributionAppAddvalueDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DistributionAddvalueExcel;
@ -411,4 +412,18 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl<Distributio
return R.data(addvalueInfo);
}
// @Override
// public List<DistributionAddvaluePackageEntity> getAddvalueBySignfor(DistributionAddvalueDTO distributionAddvalueDTO) {
// DistributionAddvalueVO addvalueVO = distributionAddvalueMapper.getAddvalueBySignfor(distributionAddvalueDTO);
// if (Func.isNotEmpty(addvalueVO)){
// String packageListIds = addvalueVO.getPackageListIds();
// if (Func.isNotEmpty(packageListIds)){
// List<Long> longs = Func.toLongList(packageListIds);
// List<DistributionAddvaluePackageEntity> distributionAddvaluePackageEntities = distributionAddvaluePackageService.list(Wrappers.<DistributionAddvaluePackageEntity>query().lambda().in(DistributionAddvaluePackageEntity::getPackageId,longs).eq(DistributionAddvaluePackageEntity::getAddvalueDetailId,addvalueVO.getAddvalueDetailId()));
// addvalueVO.setPackageEntityList(distributionAddvaluePackageEntities);
// }
// }
// return R.data(addvalueVO);
// }
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -1934,11 +1934,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
HashSet<String> consigneeAddress = new HashSet<>();
//运单客户收货单位
HashSet<String> consignee = new HashSet<>();
//运单号
HashSet<String> waybillNo = new HashSet<>();
clientTotal.getAndIncrement();
if (Func.isEmpty(oldClient.get(k))) {
DistributionReservationEntity reservationEntity = new DistributionReservationEntity();
reservationEntity.setWaybillNo(k);
// reservationEntity.setWaybillNo(k);
reservationEntity.setReservationDate(reservationDate);
reservationEntity.setReservationStatus(ReservationStatusConstant.daipeisong.getValue());
reservationEntity.setDeliveryType(DistributionTypeConstant.shangpei.getValue());
@ -1988,6 +1990,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(s.getConsigneeAddress())) {
consigneeAddress.add(s.getConsigneeAddress());
}
if (Func.isNotEmpty(s.getWaybillNumber())) {
waybillNo.add(s.getWaybillNumber());
}
DistributionReservationStockarticleEntity reservationStockarticleEntity = new DistributionReservationStockarticleEntity();
//现在前端进行订单提交必然会携带包件信息
List<DistributionParcelListEntity> packageListInfo = s.getPackageListInfo();
@ -2101,6 +2106,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(s.getServiceNumber())) {
serviceNumber.add(s.getServiceNumber());
}
if (Func.isNotEmpty(s.getWaybillNumber())) {
waybillNo.add(s.getWaybillNumber());
}
//此订单包件数量统计
AtomicInteger orderPackageNum = new AtomicInteger();
if (Func.isEmpty(oldOrder.get(s.getId()))) {

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -1381,6 +1381,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
stockupEntity.setStockupStatus(StockupStatusConstant.weibeihuo.getValue());
stockupEntity.setAssignStatus(StockAssignStatusConstant.weizhipai.getValue());
}
String trainNumberMa = trainNumberMa();
BladeUser user = AuthUtil.getUser();
stockupEntity.setStockupUser(user.getUserName());
stockupEntity.setStockupUserId(user.getUserId());
@ -1399,7 +1400,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//4、维护配送表数据
DistributionDeliveryListEntity distributionDeliveryListEntity = new DistributionDeliveryListEntity();
// String str = Func.random(7, RandomType.ALL) + DateUtil.today();
distributionDeliveryListEntity.setTrainNumber(trainNumberMa());
distributionDeliveryListEntity.setTrainNumber(trainNumberMa);
distributionDeliveryListEntity.setType(DistributionTypeConstant.shangpei.getValue());
distributionDeliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.daipeisong.getValue());
distributionDeliveryListEntity.setPrice(BigDecimal.ZERO);
@ -1561,7 +1562,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
deliveryPackageTotal.getAndAdd(reservationEntity.getReservationNum());
DistributionSignforEntity distributionSignforEntity = new DistributionSignforEntity();
distributionSignforEntity.setReservationId(reservationEntity.getId());
distributionSignforEntity.setTrainNumber(trainNumberMa());
distributionSignforEntity.setTrainNumber(trainNumberMa);
distributionSignforEntity.setDeliveryId(distributionDeliveryListEntity.getId());
distributionSignforService.save(distributionSignforEntity);
deliveryWarehouseName.add(reservationEntity.getWarehouseName());

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

@ -102,6 +102,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
private final DistributionReservationMapper distributionReservationMapper;
private final IDisStockListDetailService disStockListDetailService;
private final IDistributionStockListService distributionStockListService;
private final DistributionAddvalueMapper distributionAddvalueMapper;
private final IDistributionAddvalueService distributionAddvalueService;
private final IDistributionAddvaluePackageService distributionAddvaluePackageService;
@Override
public IPage<DistributionSignforVO> selectDistributionSignforPage(IPage<DistributionSignforVO> page, DistributionSignforVO distributionSignfor) {
@ -1384,5 +1387,23 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return distributionReservationStocklistVOS;
}
@Override
public R getAddvalueInfoList(DistributionAddvalueDTO distributionAddvalueDTO) {
// List<DistributionAddvaluePackageEntity> addvaluePackageEntities = distributionAddvalueService.getAddvalueBySignfor(distributionAddvalueDTO);
DistributionAddvalueVO addvalueBySignfor = distributionAddvalueMapper.getAddvalueBySignfor(distributionAddvalueDTO);
if (Func.isNotEmpty(addvalueBySignfor)){
String packageListIds = addvalueBySignfor.getPackageListIds();
if (Func.isNotEmpty(packageListIds)){
List<Long> longs = Func.toLongList(packageListIds);
List<DistributionAddvaluePackageEntity> distributionAddvaluePackageEntities = distributionAddvaluePackageService.list(Wrappers.<DistributionAddvaluePackageEntity>query().lambda()
.in(DistributionAddvaluePackageEntity::getPackageId,longs)
.eq(DistributionAddvaluePackageEntity::getAddvalueDetailId,addvalueBySignfor.getAddvalueDetailId()));
addvalueBySignfor.setPackageEntityList(distributionAddvaluePackageEntities);
}
}
return R.data(addvalueBySignfor);
}
}

Loading…
Cancel
Save