Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 9 months ago
parent
commit
ab5947a00a
  1. 13
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  2. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java
  3. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  4. 13
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  5. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java
  6. 32
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  7. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  8. 27
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

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

@ -135,4 +135,17 @@ public class LoadCarsDTO implements Serializable {
private Integer unloadAbnormal;
private Integer isSupple;
private String createTimeStartStr;
private String createTimeEndStr;
private Date createTimeStart;
private Date createTimeEnd;
private String unloadTimeStartStr;
private String unloadTimeEndStr;
private Date unloadTimeStart;
private Date unloadTimeEnd;
}

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java

@ -110,6 +110,8 @@ public class OpenOrderDTO implements Serializable {
private String editResonCode;//改单原因编码
private String editReson;//改单原因
private String abolishReson;//作废原因
private Integer pickupCompleteOrNot;//提货是否整车 0否 1是
private Integer trunklineCompleteOrNot;//干线是否整车 0否 1是

8
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java

@ -1685,6 +1685,7 @@ public class OpenOrderController {
String method = "############abolishWaybill: ";
log.info(method + "请求参数{}", openOrderDTO);
List<Long> waybillIds = openOrderDTO.getWaybillIds();
String abolishReson = openOrderDTO.getAbolishReson();
try{
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
@ -1698,7 +1699,12 @@ public class OpenOrderController {
return R.fail(405,"运单ids为空");
}
return openOrderService.abolishWaybill(waybillIds,myCurrentWarehouse.getId(),myCurrentWarehouse.getName());
if(StringUtil.isBlank(abolishReson)){
log.warn(method+"请填写作废原因 abolishReson={}",abolishReson);
return R.fail(405,"请填写作废原因");
}
return openOrderService.abolishWaybill(waybillIds,myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),abolishReson);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);

13
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -134,7 +134,18 @@
<if test="param.isSupple != null">
and is_supple = #{param.isSupple}
</if>
<if test="param.createTimeStart != null">
and create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
and create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.unloadTimeStart != null">
and unload_time &gt;= #{param.unloadTimeStart}
</if>
<if test="param.unloadTimeEnd != null">
and unload_time &lt;= #{param.unloadTimeEnd}
</if>
</select>

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

@ -86,7 +86,7 @@ public interface IOpenOrderService {
R unFreezeWaybill(List<Long> waybillIds, Long warehouseId, String warehouseName);
R abolishWaybill(List<Long> waybillIds, Long warehouseId, String warehouseName);
R abolishWaybill(List<Long> waybillIds, Long warehouseId, String warehouseName, String abolishReson);
// R findWaybillInfo(String waybillNo);

32
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -230,6 +230,29 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
basicdataFreightApiVO.setDestination(openOrderVO.getDestinationCode());
basicdataFreightApiVO.setArrivalWarehouse(openOrderVO.getDestinationWarehouseId() + "");
if(goodsList.isEmpty()){
List<AdvanceDetailGoodsVO> ls = new ArrayList<>();
//把list中的元素通过packName分组如果pickName为空则换为"其他"
Map<String, List<TrunklineAdvanceEntity>> groupedEntities = list.stream()
.collect(Collectors.groupingBy(entity -> {
String packName = entity.getPackName();
return packName != null ? packName : "其他";
}));
groupedEntities.keySet().forEach(packName -> {
int total;
List<TrunklineAdvanceEntity> advanceEntityList = groupedEntities.get(packName);
total = advanceEntityList.stream().mapToInt(TrunklineAdvanceEntity::getTotalNum).sum();
AdvanceDetailGoodsVO advanceDetailGoodsVO = new AdvanceDetailGoodsVO();
advanceDetailGoodsVO.setChargeType(1);
advanceDetailGoodsVO.setGoodsName(packName);
advanceDetailGoodsVO.setNum(total);
advanceDetailGoodsVO.setVolume(BigDecimal.ZERO);
advanceDetailGoodsVO.setWeight(BigDecimal.ZERO);
ls.add(advanceDetailGoodsVO);
});
goodsList = new ArrayList<>(ls);
}else{
for (AdvanceDetailGoodsVO advanceDetailGoodsVO : goodsList) {
String goodsName = advanceDetailGoodsVO.getGoodsName();
BasicdataCategoryEntity basicdataCategoryEntity = basicdataCategoryClient.findByName(goodsName);
@ -248,6 +271,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
JSONArray price = JSONArray.parseArray(JSON.toJSONString(pirceList));
advanceDetailGoodsVO.setArrPirce(price);
}
}
openOrderVO.setGoodsList(goodsList);
@ -2127,7 +2153,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceEntity.setLegacyStatus("1");
}
advanceEntity.setHasPackage(0);
advanceEntity.setCreateUserName(AuthUtil.getUserName());
advanceEntity.setCreateUserName(AuthUtil.getNickName());
list.add(advanceEntity);
}
});
@ -2731,7 +2757,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
@Transactional(rollbackFor = Exception.class)
@Override
public R abolishWaybill(List<Long> waybillIds, Long warehouseId, String warehouseName) {
public R abolishWaybill(List<Long> waybillIds, Long warehouseId, String warehouseName, String abolishReson) {
List<WarehouseWaybillEntity> waybillList = warehouseWaybillClient.findListByWaybillIds(waybillIds);
List<WarehouseWaybillEntity> waybillEntities = warehouseWaybillClient.findListByWaybillIds(waybillIds);
waybillList.forEach(waybillEntity -> {
@ -2785,7 +2811,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntities.forEach(waybillEntity -> {
String createOperationRemark = "作废运单" + waybillEntity.getWaybillNo() + ",时间:" + CommonUtil.dateToString(new Date());
openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "1000", "作废运单", createOperationRemark, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
openOrderAsyncService.saveLog(waybillEntity.getId(), waybillEntity.getWaybillNo(), "1000", "作废运单", createOperationRemark+" 原因:"+abolishReson, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
});
return R.success("作废成功");
}

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

@ -2054,6 +2054,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
page.setCurrent(loadCarsDTO.getPageNum());
page.setSize(loadCarsDTO.getPageSize());
loadCarsDTO.setCreateTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getCreateTimeStartStr()));
loadCarsDTO.setCreateTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getCreateTimeEndStr()));
loadCarsDTO.setUnloadTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getUnloadTimeStartStr()));
loadCarsDTO.setUnloadTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getUnloadTimeEndStr()));
IPage<TrunklineCarsLoadScanEntity> pageList = trunklineCarsLoadScanService.loadingDetail(page, loadCarsDTO);
return R.data(pageList);

27
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -236,6 +236,33 @@
<if test="param.createTimeEndDate != null">
and create_time &lt;= #{param.createTimeEndDate}
</if>
<if test="param.agent != null and param.agent != ''">
and Locate(#{param.agent},agent) > 0
</if>
<if test="param.goodsName != null and param.goodsName != ''">
and Locate(#{param.goodsName},goods_name) > 0
</if>
<if test="param.freezeStatus != null">
and freeze_status = #{param.freezeStatus}
</if>
<if test="param.abolishStatus != null">
and abolish_status = #{param.abolishStatus}
</if>
<if test="param.remark != null and param.reamrk != ''">
and Locate(#{param.remark},remark) > 0
</if>
<if test="param.consigneeAddress != null and param.consigneeAddress != ''">
and Locate(#{param.consigneeAddress},consignee_address) > 0
</if>
<if test="param.totalCount != null">
and total_count = #{param.totalCount}
</if>
<if test="param.totalWeight != null">
and total_weight = #{param.totalWeight}
</if>
<if test="param.totalVolume != null">
and total_volume = #{param.totalVolume}
</if>
order by create_time desc
</select>

Loading…
Cancel
Save