Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 1 year ago
parent
commit
692863d7a1
  1. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java
  2. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
  3. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  4. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java
  5. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockController.java
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  7. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  9. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml
  10. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  11. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  12. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  13. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  14. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  15. 5
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java

@ -36,7 +36,8 @@ import java.util.Date;
public class DistributionParcelListVO extends DistributionParcelListEntity {
private static final long serialVersionUID = 1L;
private String stockupStatus;
private String stockupStatus; //备货状态
private String stockupStatusName; //备货名称
private Date stockupDate;
private String stockupArea;
private String goodsAllocation;

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java

@ -29,11 +29,9 @@ import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.common.utils.RedisUtil;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -44,7 +42,6 @@ import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Date;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
@ -105,9 +102,9 @@ BasicdataWarehouseController extends BladeController {
// qw.lambda().eq(BasicdataWarehouseEntity::getDepartment, deptId);
IPage<BasicdataWarehouseEntity> page = warehouseService.page(Condition.getPage(query), qw);
//TODO 这里将仓库的行政区域放到Service中通过缓存进行陪陪结果后返回给前端
page.getRecords().forEach(basicdataWarehouseEntity -> {
});
// page.getRecords().forEach(basicdataWarehouseEntity -> {
//
// });
// IPage<BasicdataWarehouseEntity> pages = warehouseService.page(Condition.getPage(query), Condition.getQueryWrapper(warehouseWarehouse, BasicdataWarehouseEntity.class));
return R.data(page);
}

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -31,7 +31,6 @@ import com.logpm.basicdata.service.IBasicdataWarehouseService;
import com.logpm.basicdata.vo.BasicdataWarehouseVO;
import com.logpm.basicdata.wrapper.BasicdataWarehouseWrapper;
import lombok.AllArgsConstructor;
import org.springblade.common.utils.RedisUtil;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java

@ -102,9 +102,9 @@ public class DistributionParcelListController extends BladeController {
@GetMapping("/parcelListOwn")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionParcelList")
public R<IPage<DistributionParcelListEntity>> getParcelListOwn(@ApiIgnore @RequestParam Map<String, Object> distributionParcelList, Query query) {
public R<IPage<DistributionParcelListVO>> getParcelListOwn(@ApiIgnore @RequestParam Map<String, Object> distributionParcelList, Query query) {
IPage<DistributionParcelListEntity> pages = distributionParcelListService.getParcelListOwn(Condition.getPage(query), distributionParcelList);
IPage<DistributionParcelListVO> pages = distributionParcelListService.getParcelListOwn(Condition.getPage(query), distributionParcelList);
return R.data(pages);
}

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockController.java

@ -100,6 +100,17 @@ public class DistributionStockController extends BladeController {
return R.status(distributionStockService.save(distributionStock));
}
/**
* 库存品详情信息 新增
*/
@PostMapping("/addStockDetail")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入distributionStock")
public R addStockDetail(@Valid @RequestBody DistributionStockEntity distributionStock) {
distributionStockService.save(distributionStock);
return R.status(true);
}
/**
* 库存品详情信息 修改
*/

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -301,7 +301,7 @@
ldr.reservation_num reservationNum,
COALESCE(lds.loaded_number + lds.loadedin_number, 0) loadingNub,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub,
COALESCE(lds.loaded_number + lds.loadedin_number, 0) signNub
COALESCE(lds.received_quantity + lds.receivedin_quantity, 0) signNub
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -396,7 +396,7 @@
</where>
</select>
<select id="selectdeliverywork" resultType="com.logpm.distribution.entity.DistributionLoadscanEntity">
SELECT
<!-- SELECT
ldpl.id packageId,
ldrs.stock_article_id orderId,
ldpl.order_package_code orderPackageCode,
@ -411,7 +411,14 @@
JOIN logpm_distribution_delivery_list lddl on lddl.id = lds.delivery_id
join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
where
lds.is_deleted =0 and lddl.id = #{deliveryId} and ldpl.order_package_code =#{barcode}
lds.is_deleted =0 and lddl.id = #{deliveryId} and ldpl.order_package_code =#{barcode} -->
select ldrp.parce_list_id packageId,ldrp.stock_article_id orderId ,ldrp.packet_bar_code orderPackageCode,ldrp.reservation_id reservationId,
lds.train_number trainNumber, lds.delivery_id deliveryId , ldpl.quantity packageNub
FROM logpm_distribution_reservation_package ldrp
LEFT JOIN logpm_distribution_signfor lds on lds.reservation_id = ldrp.reservation_id
INNER JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id
where ldrp.packet_bar_code = #{barcode} and lds.delivery_id = #{deliveryId} and ldrp.packet_bar_status in (1,3) and lds.is_deleted = 0
</select>
<select id="selectdeliverypallet" resultType="com.logpm.distribution.entity.DistributionLoadscanEntity">

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java

@ -62,7 +62,7 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
List<String> selectPalletByReservationId(@Param("reservationId") Long reservationId);
IPage<DistributionParcelListEntity> getParcelListOwn(IPage<Object> page,@Param("id") Long id);
IPage<DistributionParcelListVO> getParcelListOwn(IPage<Object> page,@Param("id") Long id);
/**
* 查询订单下的包件信息 VO封装

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

@ -65,7 +65,7 @@
<select id="getOrderPackageListByOrderCode" resultType="com.logpm.distribution.vo.app.DistributionAppParcelListVO">
SELECT DISTINCT
<!-- SELECT DISTINCT
ldpl.*,
IF ( (
SELECT id
@ -77,7 +77,11 @@ FROM
logpm_distribution_reservation_package ldrp
INNER JOIN logpm_distribution_parcel_list ldpl ON ldrp.parce_list_id = ldpl.id
WHERE
ldrp.stock_article_id = #{id}
ldrp.stock_article_id = #{id} -->
select DISTINCT ldrp.packet_bar_code packetBarCode,ldsa.description_goods description_goods
from logpm_distribution_reservation_package ldrp
left JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldrp.stock_article_id
WHERE ldrp.stock_article_id = #{id} and ldrp.packet_bar_status in (1,3)
</select>
<select id="getReservationPackageList" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">

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

@ -66,7 +66,7 @@ public interface IDistributionParcelListService extends BaseService<Distribution
* @param distributionParcelList
* @return
*/
IPage<DistributionParcelListEntity> getParcelListOwn(IPage<Object> page, Map<String, Object> distributionParcelList);
IPage<DistributionParcelListVO> getParcelListOwn(IPage<Object> page, Map<String, Object> distributionParcelList);
/**

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

@ -16,12 +16,17 @@
*/
package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionReservationPackageDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionDeliveryInfoEntity;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.entity.DistributionLoadscanordEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.mapper.DistributionReservationPackageMapper;
import com.logpm.distribution.service.IDistributionLoadscanService;
import com.logpm.distribution.service.IDistributionLoadscanordService;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.excel.DistributionDeliveryInfoExcel;
import com.logpm.distribution.mapper.DistributionDeliveryInfoMapper;
@ -31,6 +36,7 @@ import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.app.*;
import com.logpm.distribution.wrapper.DistributionParcelListAppWrapper;
import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
import lombok.AllArgsConstructor;
import org.checkerframework.checker.units.qual.A;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
@ -51,11 +57,13 @@ import java.util.List;
* @since 2023-06-16
*/
@Service
@AllArgsConstructor
public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<DistributionDeliveryInfoMapper, DistributionDeliveryInfoEntity> implements IDistributionDeliveryInfoService {
@Autowired
private DistributionReservationPackageMapper distributionReservationPackageMapper;
private IDistributionLoadscanService distributionLoadscanService;
@Override
public IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfoPage(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoVO distributionDeliveryInfo) {
List<DistributionDeliveryInfoVO> distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryInfoPage(page, distributionDeliveryInfo);
@ -114,6 +122,17 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
distributionAppStockArticleVOS.forEach(e -> {
// 需要根据当前的客户的ID查询对应的包件信息
List<DistributionAppParcelListVO> ks =distributionReservationPackageMapper.getOrderPackageListByOrderCode(e.getStockArticleId());
ks.forEach( k ->{
List<DistributionLoadscanEntity> list = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getOrderPackageCode, k.getOrderPackageCode())
.apply("scan_status != 1")
);
if(list.size() > 0){
k.setScanStatus(2);
}else{
k.setScanStatus(1);
}
});
e.setDistributionAppParcelListVOS(ks);
if (e.getLoadingNub() == 0) {

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

@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.BasicdataDriverArteryEntity;
import com.logpm.basicdata.feign.IBasicdataDriverArteryClient;
@ -288,6 +289,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
public Resp loadingscan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
String s = distrilbutionloadingscanDTO.getBarcode() + distrilbutionloadingscanDTO.getReservationId();
String barcode = distrilbutionloadingscanDTO.getBarcode();
Object o = bladeRedis.get(barcode);
if(ObjectUtils.isNotNull(o)){
bladeRedis.del(barcode);
return Resp.scanSuccess("重复扫描!!","重复扫描!!");
}
bladeRedis.setEx(barcode,s, 500L);
//获取当前用户司机
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity();
@ -853,6 +864,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public R loadingscanoff(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
//查询是否重复扫码
List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())

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

@ -91,9 +91,13 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
* @return
*/
@Override
public IPage<DistributionParcelListEntity> getParcelListOwn(IPage<Object> page, Map<String, Object> distributionParcelList) {
public IPage<DistributionParcelListVO> getParcelListOwn(IPage<Object> page, Map<String, Object> distributionParcelList) {
Object o = distributionParcelList.get("id");
return baseMapper.getParcelListOwn(page, Long.parseLong((String) o) );
IPage<DistributionParcelListVO> parcelListOwn = baseMapper.getParcelListOwn(page, Long.parseLong((String) o));
parcelListOwn.getRecords().forEach(i ->{
i.setStockupStatusName(DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS,i.getStockupStatus()));
});
return parcelListOwn;
}
@Override

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

@ -409,7 +409,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
*/
@Override
public IPage<DistributionStockupVO> detailReservationOwn(IPage page, Long id) {
return baseMapper.detailReservationOwn(page,id);
IPage<DistributionStockupVO> iPage = baseMapper.detailReservationOwn(page, id);
iPage.getRecords().forEach(i ->{
i.setStockupStatusName(DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS,i.getStockupStatus()));
});
return iPage;
}
@Override

5
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceMapper.xml

@ -29,15 +29,14 @@
`customerName`, `customerPhone`, `customerRoad`, `systemType`, `storeNo`, `storeName`, `serialKey`, `serviceNum`,
`matingCode`, `contractNum`, `leaveBehind`, `senderName`, `senderMobile`, `senderAddress`, `administrators_id`, `create_time`,`update_time`,
`delete_time`, `cars_num`, `waybill_status`, `waybill_no`, `mctsTruck`, `warehouse_id`, `old_id`, `freeze`,
`delete_reason`, `delete_administrators_id`,`mctsTruckNo`,`siteName`,`siteCode`,`dealerName`,`dealerCode`)
`delete_reason`, `delete_administrators_id`)
VALUES ( #{param.orderSelfNum}, #{param.siteName}, #{param.area}, #{param.orderTypeName}, #{param.orderClassName},#{param.type}, #{param.total}, #{param.mtdsNo},
#{param.firstPackName}, #{param.firstPackCode}, #{param.dealerCode}, #{param.dealerName}, #{param.dueDate},#{param.isOpai}, #{param.orderNum},
#{param.carrierName}, #{param.customerName},#{param.customerPhone}, #{param.customerRoad}, #{param.systemType}, #{param.storeNo}, #{param.storeName},
#{param.serialKey}, #{param.serviceNum},#{param.matingCode}, #{param.contractNum}, #{param.leaveBehind}, #{param.senderName},
#{param.senderMobile}, #{param.senderAddress}, #{param.administratorsId},NOW(),NOW(), #{param.deleteTime}, #{param.carsNum}, #{param.waybillStatus},
#{param.waybillNo}, #{param.mctsTruck}, #{param.warehouseId}, #{param.oldId},#{param.freeze}, #{param.deleteReason},
#{param.deleteAdministratorsId},
#{param.mctsTruckNo}, #{param.siteName}, #{param.siteCode},#{param.dealerName},#{param.dealerCode},
#{param.deleteAdministratorsId}
);
</insert>

Loading…
Cancel
Save