Browse Source

1.干线-零担补录数据

single_db
zhenghaoyu 1 year ago
parent
commit
cb259e5bef
  1. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java
  2. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  3. 30
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroOrderVO.java
  4. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  5. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  6. 24
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  7. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java
  8. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  9. 53
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  10. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  11. 13
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java

@ -16,6 +16,8 @@
*/ */
package com.logpm.distribution.feign; package com.logpm.distribution.feign;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionStockArticleEntity; import com.logpm.distribution.entity.DistributionStockArticleEntity;
import org.springblade.common.constant.ModuleNameConstant; import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.BladePage;
@ -127,4 +129,7 @@ public interface IDistributionStockArticleClient {
@GetMapping(API_PREFIX + "/updateOrderInfo") @GetMapping(API_PREFIX + "/updateOrderInfo")
void updateOrderInfo(@RequestParam String orderCode, @RequestParam Long warehouseId); void updateOrderInfo(@RequestParam String orderCode, @RequestParam Long warehouseId);
@GetMapping(API_PREFIX + "/findZeroListByWarehouseId")
IPage<JSONObject> findZeroListByWarehouseId(@RequestParam Long warehouseId, @RequestParam Integer pageNum, @RequestParam Integer pageSize);
} }

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -1,5 +1,6 @@
package com.logpm.trunkline.dto; package com.logpm.trunkline.dto;
import com.logpm.trunkline.vo.ZeroOrderVO;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -61,4 +62,7 @@ public class LoadCarsDTO implements Serializable {
private Integer enterNum; private Integer enterNum;
private List<ZeroOrderVO> zeroOrderList = new ArrayList<>();
} }

30
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroOrderVO.java

@ -0,0 +1,30 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class ZeroOrderVO implements Serializable {
private String waybillNo;
private String orderCode;
private Date createTime;
private String destination;
private String destinationWarehouseName;
private String shipper;
private String shipperName;
private String consignee;
private String consigneeName;
private String goodsName;
private Integer totalNum;
private Integer stockNum;
private BigDecimal price;
private BigDecimal weight;
private BigDecimal volume;
private String customerTrain;
private String remark;
}

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -16,6 +16,7 @@
*/ */
package com.logpm.distribution.feign; package com.logpm.distribution.feign;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@ -262,4 +263,9 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
distributionStockArticleService.updateOrderInfo(orderCode,warehouseId); distributionStockArticleService.updateOrderInfo(orderCode,warehouseId);
} }
@Override
public IPage<JSONObject> findZeroListByWarehouseId(Long warehouseId,Integer pageNum,Integer pageSize) {
return distributionStockArticleService.findZeroListByWarehouseId(warehouseId,pageNum,pageSize);
}
} }

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java

@ -16,6 +16,7 @@
*/ */
package com.logpm.distribution.mapper; package com.logpm.distribution.mapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionStockArticleOweDTO; import com.logpm.distribution.dto.DistributionStockArticleOweDTO;
@ -137,4 +138,6 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
Integer augmentHandQuantity(@Param("orderId") Long orderId, @Param("augmentNum") Integer loadedNub); Integer augmentHandQuantity(@Param("orderId") Long orderId, @Param("augmentNum") Integer loadedNub);
void addIncomingNumk(@Param("orderId") Long orderId,@Param("num") Integer num); void addIncomingNumk(@Param("orderId") Long orderId,@Param("num") Integer num);
IPage<JSONObject> findZeroListByWarehouseId(IPage<Object> page,@Param("warehouseId") Long warehouseId);
} }

24
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -850,4 +850,28 @@
where id = #{orderId} where id = #{orderId}
and incoming_num + #{num} &lt;= total_number and incoming_num + #{num} &lt;= total_number
</update> </update>
<select id="findZeroListByWarehouseId" resultType="com.alibaba.fastjson.JSONObject">
select ldsa.waybill_no waybillNo,
ldsa.order_code orderCode,
lww.create_time createTime,
lww.destination destination,
lww.destination_warehouse_name destinationWarehouseName,
lww.shipper shipper,
lww.shipper_name shipperName,
lww.consignee consignee,
lww.consignee_name consigneeName,
lww.goods_name goodsName,
ldsa.total_number totalNum,
lww.total_weight weight,
lww.total_volume volume,
ldsa.stock_num stockNum,
lww.customer_train customerTrain,
lww.remark remark,
ROUND(lww.total_freight/total_count,2) price
from logpm_distribution_stock_article ldsa
left join logpm_warehouse_waybill lww on lww.waybill_no = ldsa.waybill_number
where
</select>
</mapper> </mapper>

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java

@ -16,6 +16,7 @@
*/ */
package com.logpm.distribution.service; package com.logpm.distribution.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionStockArticleDTO; import com.logpm.distribution.dto.DistributionStockArticleDTO;
import com.logpm.distribution.dto.app.queryOrderDTO; import com.logpm.distribution.dto.app.queryOrderDTO;
@ -192,4 +193,6 @@ public interface IDistributionStockArticleService extends BaseService<Distributi
void addIncomingNumk(Long orderId, Integer num); void addIncomingNumk(Long orderId, Integer num);
void updateOrderInfo(String orderCode, Long warehouseId); void updateOrderInfo(String orderCode, Long warehouseId);
IPage<JSONObject> findZeroListByWarehouseId(Long warehouseId,Integer pageNum,Integer pageSize);
} }

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

@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basic.entity.BasicMaterialEntity; import com.logpm.basic.entity.BasicMaterialEntity;
import com.logpm.basic.entity.BasicPrintTemplateEntity; import com.logpm.basic.entity.BasicPrintTemplateEntity;
import com.logpm.basic.feign.IBasicMaterialClient; import com.logpm.basic.feign.IBasicMaterialClient;
@ -1373,6 +1374,15 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
updateById(stockArticleEntity); updateById(stockArticleEntity);
} }
@Override
public IPage<JSONObject> findZeroListByWarehouseId(Long warehouseId,Integer pageNum,Integer pageSize) {
IPage<Object> page = new Page<>();
page.setCurrent(pageNum);
page.setSize(pageSize);
return baseMapper.findZeroListByWarehouseId(page,warehouseId);
}
@Override @Override
public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) { public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) {

53
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -1215,5 +1215,58 @@ public class CarsLoadController {
} }
@ResponseBody
@PostMapping("/zeroSuppleList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担补录列表", notes = "传入loadCarsDTO")
public R zeroSuppleList(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############zeroSuppleList: ";
log.info(method+"请求参数{}",loadCarsDTO);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
return carsLoadService.zeroSuppleList(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/addZeroSupple")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "增加零担补录", notes = "传入loadCarsDTO")
public R addZeroSupple(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############addZeroSupple: ";
log.info(method+"请求参数{}",loadCarsDTO);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
return carsLoadService.zeroSuppleList(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
} }

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -115,4 +115,6 @@ public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoad
R carsLoadDetailInfo(LoadCarsDTO loadCarsDTO); R carsLoadDetailInfo(LoadCarsDTO loadCarsDTO);
R zeroSuppleList(LoadCarsDTO loadCarsDTO);
} }

13
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -1948,6 +1948,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.data(carsLoadWaybillInfoList); return R.data(carsLoadWaybillInfoList);
} }
@Override
public R zeroSuppleList(LoadCarsDTO loadCarsDTO) {
Long warehouseId = loadCarsDTO.getWarehouseId();
Integer pageNum = loadCarsDTO.getPageNum();
Integer pageSize = loadCarsDTO.getPageSize();
//查询当前仓零担在库列表
IPage<JSONObject> pageList = distributionStockArticleClient.findZeroListByWarehouseId(warehouseId,pageNum,pageSize);
return R.data(pageList);
}
@Override @Override
public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) { public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) {
log.info("##############loadingTrayInfo: 查询托盘的货物信息"); log.info("##############loadingTrayInfo: 查询托盘的货物信息");

Loading…
Cancel
Save