Browse Source

1.逻辑修改

pull/31/head
zhenghaoyu 9 months ago
parent
commit
8732eca660
  1. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java
  2. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  3. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
  4. 20
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  5. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
  6. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  7. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  8. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java

@ -37,5 +37,6 @@ public class CarsLoadWaybillInfoVO implements Serializable {
private Integer costNum;
List<CarsLoadOrderInfoVO> carsLoadOrderInfoList = new ArrayList<>();
List<CarsLoadOrderInfoVO> carsLoadOrderInfoListPlan = new ArrayList<>();
}

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

@ -17,7 +17,9 @@ import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.Enumeration;
import java.util.List;
import java.util.Objects;
@ -35,11 +37,13 @@ public class CarsLoadController {
@PostMapping("/loadCarsPageList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "配载计划分页列表", notes = "传入loadCarsDTO")
public R loadCarsPageList(@RequestBody LoadCarsDTO loadCarsDTO) {
public R loadCarsPageList(@RequestBody LoadCarsDTO loadCarsDTO, HttpServletRequest request) {
String method = "############loadCarsPageList: ";
log.info(method+"请求参数{}",loadCarsDTO);
try{
Enumeration<String> headerNames = request.getHeaderNames();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(!Objects.isNull(myCurrentWarehouse)){

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

@ -33,6 +33,8 @@ public interface TrunklineCarsOrderMapper extends BaseMapper<TrunklineCarsOrderE
List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoList(@Param("loadId") Long loadId, @Param("waybillNo") String waybillNo);
List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoListPlan(@Param("loadId") Long loadId, @Param("waybillNo") String waybillNo);
void clearFinalNodeId(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId);
void deleteByLoadIdAndNodeIdAndWarehouseId(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId, @Param("warehouseId") Long warehouseId);

20
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -165,6 +165,26 @@
</select>
<select id="findCarsLoadOrderInfoListPlan" resultType="com.logpm.trunkline.vo.CarsLoadOrderInfoVO">
select ltco.order_code orderCode,
ltco.plan_num planNum,
ltco.real_num loadingNum,
lww.total_freight orderFreight,
lww.check_user_name checkUserName,
IFNULL(ltco.unload_num,0) unloadNum,
IFNULL(lww.total_freight/lww.total_count*ltco.unload_num,0) unloadIncome,
IFNULL(lww.total_freight/lww.total_count*ltco.plan_num,0) orderLineCost,
sum(ltwo.total_number) orderNum
from logpm_trunkline_cars_order ltco
left join logpm_trunkline_waybill_order ltwo on ltwo.order_code = ltco.order_code and ltwo.waybill_no = ltco.waybill_no
left join logpm_warehouse_waybill lww on lww.waybill_no = ltwo.waybill_no
where ltco.load_id = #{loadId}
and ltco.waybill_no = #{waybillNo}
group by ltco.order_code
</select>
<update id="clearFinalNodeId">
update logpm_trunkline_cars_order
set final_node_id = null

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

@ -30,6 +30,8 @@ public interface ITrunklineCarsOrderService extends BaseService<TrunklineCarsOrd
List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoList(Long loadId, String waybillNo);
List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoListPlan(Long loadId, String waybillNo);
void clearFinalNodeId(Long loadId, Long nodeId);
void deleteByLoadIdAndNodeIdAndWarehouseId(Long loadId, Long nodeId, Long warehouseId);

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

@ -27,7 +27,6 @@ import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient;
import com.logpm.warehouse.vo.WarehouseWaybillVO;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.CodeNumConstant;
@ -275,7 +274,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
return R.success("验证成功");
}
@GlobalTransactional
@Transactional(rollbackFor = ServiceException.class)
@Override
public R openWaybill(OpenOrderDTO openOrderDTO) {

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

@ -2750,7 +2750,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
List<CarsLoadOrderInfoVO> carsLoadOrderInfoList = trunklineCarsOrderService.findCarsLoadOrderInfoList(loadId, waybillNo);
List<CarsLoadOrderInfoVO> carsLoadOrderInfoListPlan = trunklineCarsOrderService.findCarsLoadOrderInfoListPlan(loadId, waybillNo);
carsLoadWaybillInfoVO.setCarsLoadOrderInfoList(carsLoadOrderInfoList);
carsLoadWaybillInfoVO.setCarsLoadOrderInfoListPlan(carsLoadOrderInfoListPlan);
TrunklineCostShareRecordEntity costShareRecordEntity = trunklineCostShareRecordService.findTotalUnloadNumByLoadAndWaybillNo(loadId, waybillNo);
carsLoadWaybillInfoVO.setCostPiece(costShareRecordEntity.getCostPiece());

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

@ -68,6 +68,11 @@ public class TrunklineCarsOrderEntityServiceImpl extends BaseServiceImpl<Trunkli
return baseMapper.findCarsLoadOrderInfoList(loadId,waybillNo);
}
@Override
public List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoListPlan(Long loadId, String waybillNo) {
return baseMapper.findCarsLoadOrderInfoList(loadId,waybillNo);
}
@Override
public void clearFinalNodeId(Long loadId, Long nodeId) {
baseMapper.clearFinalNodeId(loadId,nodeId);

Loading…
Cancel
Save