Browse Source

散货权限修改

lichao 3 years ago
parent
commit
08f8b0556d

+ 22 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/vo/OrderAcctVO.java

@@ -42,8 +42,27 @@ public class OrderAcctVO {
 
 	private String dispatchDeptName;
 
+	//地址
 	private String addressDetail;
 
+	//卸货地址
+	private String unloadingPlace;
+
+	//合同号
+	private String contractNo;
+
+	//派车单号
+	private String dispatchNumber;
+
+	//车体积
+	private String fleetVolum;
+
+	//应收运费
+	private BigDecimal freightCollect;
+
+	//应付运费
+	private BigDecimal freightPay;
+
 	private String receiptNo;
 
 	private String billNo;
@@ -90,4 +109,7 @@ public class OrderAcctVO {
 
 	private String endCreateTime;
 
+	//角色权限控制
+	private String userRoleControl;
+
 }

+ 18 - 0
blade-service/blade-client/src/main/java/org/springblade/client/corps/controller/CorpsDescController.java

@@ -375,6 +375,24 @@ public class CorpsDescController extends BladeController {
 	}
 
 	/**
+	 * 客户信息
+	 */
+	@GetMapping("/fleetList")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "所有车队信息", notes = "获得车队信息")
+	public R<List<CorpsDesc>> fleetList(CorpsDescVO corpsDesc) {
+
+		LambdaQueryWrapper<CorpsDesc> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(CorpsDesc::getIsDeleted, 0);
+		lambdaQueryWrapper.eq(CorpsDesc::getTenantId, SecureUtil.getTenantId());
+		lambdaQueryWrapper.eq(CorpsDesc::getCorpType, "CD");
+
+		List<CorpsDesc> corpsDescList = corpsDescService.list(lambdaQueryWrapper);
+
+		return R.data(corpsDescList);
+	}
+
+	/**
 	 * 同步客户
 	 */
 	@PostMapping("/copy")

+ 28 - 12
blade-service/blade-land/src/main/java/org/springblade/land/controller/OrderIndexController.java

@@ -159,8 +159,19 @@ public class OrderIndexController extends BladeController {
 		// 今日总量
 		long all = itemList.size();
 
+		// 获取角色
+		String userRole = AuthUtil.getUserRole();
+
+		long inactive = 0;
 		// 未运行
-		long inactive = itemList.stream().filter(item -> item.getStatus() == 0 || item.getStatus() == 1).count();
+		if (userRole.contains(LandConst.ROLE_CD)) {//车队
+			inactive = itemList.stream().filter(item -> item.getStatus() == 2).count();
+		}else if (userRole.contains(LandConst.ROLE_SJ)) {//司机
+			inactive = itemList.stream().filter(item -> item.getStatus() == 3).count();
+		}else {
+			inactive = itemList.stream().filter(item -> item.getStatus() == 0 || item.getStatus() == 1).count();
+		}
+
 		mapTemp = new HashMap<>();
 		mapTemp.put("name", "未运行");
 		mapTemp.put("value", inactive);
@@ -170,7 +181,13 @@ public class OrderIndexController extends BladeController {
 		long active = 0;
 		// 运行中
 		if (mold == 2){
-			active = itemList.stream().filter(item -> item.getStatus() != 0 && item.getStatus() != 1 && item.getStatus() != 5).count();
+			if (userRole.contains(LandConst.ROLE_CD)) {//车队
+				active = itemList.stream().filter(item -> item.getStatus() == 3 || item.getStatus() == 4).count();
+			}else if (userRole.contains(LandConst.ROLE_SJ)) {//司机
+				active = itemList.stream().filter(item -> item.getStatus() == 4).count();
+			}else {
+				active = itemList.stream().filter(item -> item.getStatus() != 0 && item.getStatus() != 1 && item.getStatus() != 5).count();
+			}
 		}else {
 			active = itemList.stream().filter(item -> item.getStatus() != 0 && item.getStatus() != 1 && item.getStatus() != 4).count();
 		}
@@ -185,6 +202,7 @@ public class OrderIndexController extends BladeController {
 		if (mold == 2)
 		{
 			finish = itemList.stream().filter(item -> item.getStatus() == 5).count();
+
 		}else {
 			finish = itemList.stream().filter(item -> item.getStatus() == 4).count();
 		}
@@ -210,16 +228,6 @@ public class OrderIndexController extends BladeController {
 		return R.data(orderService.getAcctNoPage(getAcctQuery(mold, status)));
 	}
 
-	/**
-	 * 首页 散货业务详情
-	 */
-	@GetMapping("/biz-BulkLoadDetail")
-	@ApiOperationSupport(order = 4)
-	@ApiOperation(value = "散货业务详情")
-	public R bizBulkLoadDetail(Integer mold, Integer status) {
-		return R.data(orderService.getBulkLoadPage(getAcctQuery(mold, status)));
-	}
-
 	private String getTime(boolean init) {
 		String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
 		if (init) {
@@ -251,6 +259,14 @@ public class OrderIndexController extends BladeController {
 			acctVO.setShippingMode(LandConst.MOLD_JZX);
 		} else if (mold == 2) {
 			acctVO.setShippingMode(LandConst.MOLD_SH);
+			if (userRole.contains(LandConst.ROLE_CD)) {//车队
+				//未派车2,未受理3,未完工4,已关闭5
+				acctVO.setUserRoleControl(LandConst.ROLE_CD);
+			}
+			if (userRole.contains(LandConst.ROLE_SJ)){//司机
+				//未受理3,未完工4,已关闭5
+				acctVO.setUserRoleControl(LandConst.ROLE_SJ);
+			}
 		} else if (mold == 3) {
 			acctVO.setShippingMode(LandConst.MOLD_TZ);
 		}

+ 0 - 9
blade-service/blade-land/src/main/java/org/springblade/land/mapper/OrderMapper.java

@@ -52,13 +52,4 @@ public interface OrderMapper extends BaseMapper<Order> {
 	 */
 	List<OrderAcctVO> selectAcctList(IPage<OrderAcctVO> page, @Param("acct") OrderAcctVO acctVO);
 
-	/**
-	 * 陆运散货台账
-	 *
-	 * @param page
-	 * @param acctVO
-	 * @return
-	 */
-	List<OrderAcctVO> selectBulkLoadList(IPage<OrderAcctVO> page, @Param("acct") OrderAcctVO acctVO);
-
 }

+ 21 - 85
blade-service/blade-land/src/main/java/org/springblade/land/mapper/OrderMapper.xml

@@ -46,6 +46,12 @@
             t1.arrival_time
             END) as arrivalTime,
             t1.address_detail as addressDetail,
+            t1.unloading_place as unloadingPlace,
+            t1.contract_no as contractNo,
+            t1.dispatch_number as dispatchNumber,
+            t1.fleet_volum as fleetVolum,
+            t1.freight_collect as freightCollect,
+            t1.freight_pay as freightPay,
             t1.receipt_no as receiptNo,
             t1.bill_no as billNo,
             t1.station,
@@ -57,7 +63,6 @@
             ELSE
             t1.fleet_id
             END) as fleetId,
-
             (CASE WHEN
             t1.shipping_mode != '散货'
             THEN
@@ -65,15 +70,9 @@
             ELSE
             t8.cname
             END) as fleetName,
-
-            (CASE WHEN
-            t1.shipping_mode != '散货'
-            THEN
-            t4.short_name
-            ELSE
-            t8.short_name
-            END) as fleetShortName,
-
+            (CASE t1.shipping_mode
+            WHEN '散货' THEN t8.short_name
+            ELSE t4.short_name END) as fleetShortName,
             (CASE WHEN
             t1.shipping_mode != '散货'
             THEN
@@ -91,7 +90,6 @@
             ELSE
             t1.status
             END) as status,
-
             (CASE WHEN
             t1.shipping_mode != '散货'
             THEN
@@ -103,7 +101,7 @@
                  left join land_order_item t2 on t1.id = t2.order_id
                  left join basic_corps_desc t3 on t1.corp_id = t3.id
                  left join basic_corps_desc t4 on t2.fleet_id = t4.id
-                left join basic_corps_desc t8 on t1.fleet_id = t4.id
+                 left join basic_corps_desc t8 on t8.id = t1.fleet_id
                  left join blade_user t5 on t1.salesman = t5.id
                  left join blade_dept t6 on t1.dispatch_dept = t6.id
                  left join blade_user t7 on t1.dispatcher = t7.id
@@ -114,7 +112,6 @@
             <if test="acct.corpName != null and acct.corpName != ''">and t3.cname like concat('%', #{acct.corpName}, '%')</if>
             <if test="acct.salesmanName != null and acct.salesmanName != ''">and t5.name like concat('%', #{acct.salesmanName}, '%')</if>
             <if test="acct.corpShortName != null and acct.corpShortName != ''">and t3.short_name like concat('%', #{acct.corpShortName}, '%')</if>
-
             <if test="acct.fleetId != null and acct.shippingMode != '散货'">and t2.fleet_id = #{acct.fleetId}</if>
             <if test="acct.fleetId != null and acct.shippingMode == '散货'">and t1.fleet_id = #{acct.fleetId}</if>
             <if test="acct.fleetShortName != null and acct.fleetShortName != ''">and t4.short_name like concat('%', #{acct.fleetShortName}, '%')</if>
@@ -124,13 +121,10 @@
             <if test="acct.plateNo != null and acct.plateNo != '' and acct.shippingMode != '散货'">and t2.plate_no like concat('%', #{acct.plateNo}, '%')</if>
             <if test="acct.plateNo != null and acct.plateNo != '' and acct.shippingMode == '散货'">and t1.plate_no like concat('%', #{acct.plateNo}, '%')</if>
             <if test="acct.ctnDetail != null and acct.ctnDetail != '' and acct.shippingMode != '散货'">and t2.ctn_type like concat('%', #{acct.ctnDetail}, '%')</if>
-
             <if test="acct.beginArrivalTime != null and acct.beginArrivalTime != '' and acct.shippingMode != '散货'">and t2.arrival_time &gt;= #{acct.beginArrivalTime}</if>
             <if test="acct.endArrivalTime != null and acct.endArrivalTime != '' and acct.shippingMode != '散货'">and t2.arrival_time &lt;= #{acct.endArrivalTime}</if>
-
-            <if test="acct.beginArrivalTime != null and acct.beginArrivalTime != '' and acct.shippingMode = '散货'">and t1.arrival_time &gt;= #{acct.beginArrivalTime}</if>
-            <if test="acct.endArrivalTime != null and acct.endArrivalTime != '' and acct.shippingMode = '散货'">and t1.arrival_time &lt;= #{acct.endArrivalTime}</if>
-
+            <if test="acct.beginArrivalTime != null and acct.beginArrivalTime != '' and acct.shippingMode == '散货'">and t1.arrival_time &gt;= #{acct.beginArrivalTime}</if>
+            <if test="acct.endArrivalTime != null and acct.endArrivalTime != '' and acct.shippingMode == '散货'">and t1.arrival_time &lt;= #{acct.endArrivalTime}</if>
             <if test="acct.salesman != null">and t1.salesman = #{acct.salesman}</if>
             <if test="acct.dispatcher != null">and t1.dispatcher = #{acct.dispatcher}</if>
             <if test="acct.dispatchDept != null">and t1.dispatchDept = #{acct.dispatchDept}</if>
@@ -145,77 +139,19 @@
             <if test="acct.status == 2 and acct.shippingMode != '散货'">and t2.status not in (0, 1, 4)</if>
             <if test="acct.status == 3 and acct.shippingMode != '散货'">and t2.status = 4</if>
 
-            <if test="acct.status == 1 and acct.shippingMode == '散货'">and t1.status in (0, 1)</if>
-            <if test="acct.status == 2 and acct.shippingMode == '散货'">and t1.status not in (0, 1, 5)</if>
-            <if test="acct.status == 3 and acct.shippingMode == '散货'">and t1.status = 5</if>
-        </where>
-        group by t1.id, t2.id, t2.plate_no, t2.arrival_time
-        order by t2.arrival_time desc
-    </select>
+            <if test="acct.status == 1 and acct.shippingMode == '散货' and acct.userRoleControl != '车队' and acct.userRoleControl != '司机'">and t1.status in (0, 1)</if>
+            <if test="acct.status == 2 and acct.shippingMode == '散货' and acct.userRoleControl != '车队' and acct.userRoleControl != '司机'">and t1.status not in (0, 1, 5)</if>
 
+            <if test="acct.status == 1 and acct.shippingMode == '散货' and acct.userRoleControl == '车队'">and t1.status = 2</if>
+            <if test="acct.status == 2 and acct.shippingMode == '散货' and acct.userRoleControl == '车队'">and t1.status in (3, 4)</if>
 
-    <select id="selectBulkLoadList" resultType="org.springblade.land.vo.OrderAcctVO">
-        select t1.id as orderId,
-        t1.corp_id as corpId,
-        t3.cname as corpName,
-        t3.short_name as corpShortName,
-        t1.salesman,
-        t5.name as salesmanName,
-        t1.salesman_dept as salesmanDept,
-        t1.create_user as createUser,
-        t1.dispatcher,
-        t7.name as dispatcherName,
-        t1.dispatch_dept as dispatchDept,
-        t6.dept_name as dispatchDeptName,
-        t1.arrival_time as arrivalTime,
-        t1.address_detail as addressDetail,
-        t1.receipt_no as receiptNo,
-        t1.bill_no as billNo,
-        t1.station,
-        t1.fleet_id as fleetId,
-        t4.cname as fleetName,
-        t4.short_name as fleetShortName,
-        t1.plate_no,
-        t1.status,
-        t1.remarks
-        from land_order t1
-        left join basic_corps_desc t3 on t1.corp_id = t3.id
-        left join basic_corps_desc t4 on t1.fleet_id = t4.id
-        left join blade_user t5 on t1.salesman = t5.id
-        left join blade_dept t6 on t1.dispatch_dept = t6.id
-        left join blade_user t7 on t1.dispatcher = t7.id
-        <where>
-            t1.tenant_id = #{acct.tenantId}
-            and t1.is_deleted = 0
-            <if test="acct.corpName != null and acct.corpName != ''">and t3.cname like concat('%', #{acct.corpName}, '%')</if>
-            <if test="acct.salesmanName != null and acct.salesmanName != ''">and t5.name like concat('%', #{acct.salesmanName}, '%')</if>
-            <if test="acct.corpShortName != null and acct.corpShortName != ''">and t3.short_name like concat('%', #{acct.corpShortName}, '%')</if>
+            <if test="acct.status == 1 and acct.shippingMode == '散货' and acct.userRoleControl == '司机'">and t1.status = 3</if>
+            <if test="acct.status == 2 and acct.shippingMode == '散货' and acct.userRoleControl == '司机'">and t1.status = 4</if>
 
-            <if test="acct.fleetId != null">and t1.fleet_id = #{acct.fleetId}</if>
-            <if test="acct.fleetShortName != null and acct.fleetShortName != ''">and t4.short_name like concat('%', #{acct.fleetShortName}, '%')</if>
-            <if test="acct.addressDetail != null and acct.addressDetail != ''">and t1.address_detail like concat('%', #{acct.addressDetail}, '%')</if>
-            <if test="acct.receiptNo != null and acct.receiptNo != ''">and t1.receipt_no like concat('%', #{acct.receiptNo}, '%')</if>
-            <if test="acct.billNo != null and acct.billNo != ''">and t1.bill_no like concat('%', #{acct.billNo}, '%')</if>
-            <if test="acct.plateNo != null and acct.plateNo != ''">and t1.plate_no like concat('%', #{acct.plateNo}, '%')</if>
-
-            <if test="acct.beginArrivalTime != null and acct.beginArrivalTime != ''">and t1.arrival_time >= #{acct.beginArrivalTime}</if>
-            <if test="acct.endArrivalTime != null and acct.endArrivalTime != ''">and t1.arrival_time &lt;= #{acct.endArrivalTime}</if>
-
-            <if test="acct.salesman != null">and t1.salesman = #{acct.salesman}</if>
-            <if test="acct.dispatcher != null">and t1.dispatcher = #{acct.dispatcher}</if>
-            <if test="acct.dispatchDept != null">and t1.dispatchDept = #{acct.dispatchDept}</if>
-            <if test="acct.salesmanDeptList != null">and t1.salesman_dept in
-                <foreach item="dept" collection="acct.salesmanDeptList" open="(" separator="," close=")">
-                    #{dept}
-                </foreach>
-            </if>
-            <if test="acct.shippingMode != null and acct.shippingMode != ''">and t1.shipping_mode = #{acct.shippingMode}</if>
-            <if test="acct.status == 1">and t1.status in (0, 1)</if>
-            <if test="acct.status == 2">and t1.status not in (0, 1, 5)</if>
-            <if test="acct.status == 3">and t1.status = 5</if>
+            <if test="acct.status == 3 and acct.shippingMode == '散货'">and t1.status = 5</if>
         </where>
-        group by t1.id, t1.plate_no, t1.arrival_time
-        order by t1.arrival_time desc
+        group by t1.id, t2.id, t2.plate_no, t2.arrival_time
+        order by t2.arrival_time desc
     </select>
 
 </mapper>

+ 0 - 7
blade-service/blade-land/src/main/java/org/springblade/land/service/IOrderService.java

@@ -80,13 +80,6 @@ public interface IOrderService extends IService<Order> {
 	List<OrderAcctVO> getAcctNoPage(OrderAcctVO acctVO);
 
 	/**
-	 * 陆运散货台账
-	 *
-	 * @param acctVO
-	 * @return
-	 */
-	List<OrderAcctVO> getBulkLoadPage(OrderAcctVO acctVO);
-	/**
 	 * 列表 统计
 	 *
 	 * @param order

+ 19 - 28
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/OrderServiceImpl.java

@@ -410,14 +410,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 	}
 
 	@Override
-	public List<OrderAcctVO> getBulkLoadPage(OrderAcctVO acctVO) {
-		acctVO.setTenantId(AuthUtil.getTenantId());
-		List<OrderAcctVO> acctList = baseMapper.selectBulkLoadList(null, acctVO);
-		calculateAcct(acctList);
-		return acctList;
-	}
-
-	@Override
 	public Map<String, Object> getCount(Order order) {
 		long all = 0;
 		long last = 0;
@@ -590,11 +582,13 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 			queryWrapper.eq(OrderItem::getTenantId, AuthUtil.getTenantId())
 				.eq(OrderItem::getIsDeleted, 0)
 				.eq(OrderItem::getOrderId, order.getId())
-				.eq(OrderItem::getKind, 2);
+				.eq(OrderItem::getKind, 2)
+				.eq(OrderItem::getShippingMode, "散货");
 			OrderItem orderItem = orderItemMapper.selectOne(queryWrapper);
 			OrderItem item = new OrderItem();
 			if (ObjectUtil.isEmpty(orderItem)){
 				item.setOrderId(order.getId());
+				item.setShippingMode("散货");
 				item.setKind(2);
 				item.setTenantId(AuthUtil.getTenantId());
 				item.setCreateUser(AuthUtil.getUserId());
@@ -665,30 +659,28 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 		orderQueryWrapper.eq(Order::getShippingMode, "散货")
 			.eq(Order::getTenantId, AuthUtil.getTenantId())
 			.eq(Order::getIsDeleted, 0)
-			.eq(ObjectUtil.isNotEmpty(order.getSalesman()), Order::getSalesman, order.getSalesman())
-			.eq(ObjectUtil.isNotEmpty(order.getDispatchDept()), Order::getDispatchDept, order.getDispatchDept())
-			.eq(StringUtil.isNotBlank(order.getShippingMode()), Order::getShippingMode, order.getShippingMode())
-			.eq(ObjectUtil.isNotEmpty(order.getCorpId()), Order::getCorpId, order.getCorpId())
-			.eq(ObjectUtil.isNotEmpty(order.getFleetId()), Order::getFleetId, order.getFleetId())
-			.eq(ObjectUtil.isNotEmpty(order.getPlateNo()), Order::getPlateNo, order.getPlateNo())
-			.eq(ObjectUtil.isNotEmpty(order.getDriverId()), Order::getDriverId, order.getDriverId())
-			.eq(StringUtil.isNotBlank(order.getOrderNo()), Order::getOrderNo, order.getOrderNo())
-			.like(StringUtil.isNotBlank(order.getContractNo()), Order::getContractNo, order.getContractNo())
-			.like(StringUtil.isNotBlank(order.getDispatchNumber()), Order::getDispatchNumber, order.getDispatchNumber())
-			.like(StringUtil.isNotBlank(order.getAddressDetail()), Order::getAddressDetail, order.getAddressDetail())
-			.like(StringUtil.isNotBlank(order.getUnloadingPlace()),Order::getUnloadingPlace, order.getUnloadingPlace())
-			.between(StringUtil.isNotBlank(order.getBeginArrivalTime()) && StringUtil.isNotBlank(order.getEndArrivalTime()), Order::getArrivalTime, order.getBeginArrivalTime(), order.getEndArrivalTime())
-			.between(StringUtil.isNotBlank(order.getBeginCrateTime()) && StringUtil.isNotBlank(order.getEndCrateTime()), Order::getCreateTime, order.getBeginCrateTime(), order.getEndCrateTime())
+			.eq(ObjectUtil.isNotEmpty(order.getSalesman()), Order::getSalesman, order.getSalesman())//业务员
+			.eq(ObjectUtil.isNotEmpty(order.getDispatchDept()), Order::getDispatchDept, order.getDispatchDept())//调度部门
+			.eq(ObjectUtil.isNotEmpty(order.getCorpId()), Order::getCorpId, order.getCorpId())//客户id
+			.eq(ObjectUtil.isNotEmpty(order.getFleetId()), Order::getFleetId, order.getFleetId())//车队id
+			.eq(ObjectUtil.isNotEmpty(order.getPlateNo()), Order::getPlateNo, order.getPlateNo())//车号
+			.eq(ObjectUtil.isNotEmpty(order.getDriverId()), Order::getDriverId, order.getDriverId())//司机id
+			.eq(StringUtil.isNotBlank(order.getOrderNo()), Order::getOrderNo, order.getOrderNo())//订单号
+			.like(StringUtil.isNotBlank(order.getContractNo()), Order::getContractNo, order.getContractNo())//合同号
+			.like(StringUtil.isNotBlank(order.getDispatchNumber()), Order::getDispatchNumber, order.getDispatchNumber())//派车单号
+			.like(StringUtil.isNotBlank(order.getAddressDetail()), Order::getAddressDetail, order.getAddressDetail())//装货地址
+			.like(StringUtil.isNotBlank(order.getUnloadingPlace()),Order::getUnloadingPlace, order.getUnloadingPlace())//卸货地址
+			.between(StringUtil.isNotBlank(order.getBeginArrivalTime()) && StringUtil.isNotBlank(order.getEndArrivalTime()), Order::getArrivalTime, order.getBeginArrivalTime(), order.getEndArrivalTime())//货运日期
+			.between(StringUtil.isNotBlank(order.getBeginCrateTime()) && StringUtil.isNotBlank(order.getEndCrateTime()), Order::getCreateTime, order.getBeginCrateTime(), order.getEndCrateTime())//制单日期
 			.orderByDesc(Order::getArrivalTime);
 
-		System.out.println("角色-=========================="+AuthUtil.getUserRole());
-		// 获取角色
+		// 获取角色 设置权限
 		String userRole = AuthUtil.getUserRole();
 		if (userRole.contains(LandConst.ROLE_CD)) {//车队
 			//未派车2,未受理3,未完工4,已关闭5
 			orderQueryWrapper.in(Order::getStatus,2,3,4,5);
 		}
-		if (userRole.contains(LandConst.ROLE_SJ)){
+		if (userRole.contains(LandConst.ROLE_SJ)){//司机
 			//未受理3,未完工4,已关闭5
 			orderQueryWrapper.in(Order::getStatus,3,4,5);
 		}
@@ -697,7 +689,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 
 		IPage<Order> pages = baseMapper.selectPage(Condition.getPage(query), orderQueryWrapper);
 		pages.getRecords().forEach(record -> {
-
 			//杂费客户
 			if (!ObjectUtil.isEmpty(record.getId())){
 				LambdaQueryWrapper<OrderFee> feeLambdaQueryWrapper = new LambdaQueryWrapper<>();
@@ -1303,7 +1294,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 					address.setSort(sort);
 					orderAddressMapper.updateById(address);
 				}
-
+				sort++;
 				if (ObjectUtil.isNotEmpty(address.getCorpId()) || StringUtil.isNotBlank(address.getContacts())
 					|| StringUtil.isNotBlank(address.getTel()) || StringUtil.isNotBlank(address.getAddress())) {
 					if (ObjectUtil.isNotEmpty(address.getCorpId()) && StringUtil.isNotBlank(address.getCorpName())) {