Browse Source

1.待签收页面

dev-warehouse
0.0 2 years ago
parent
commit
d4d543145e
  1. 32
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java
  2. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockupInfoClient.java
  3. 24
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforsnmbVO.java
  4. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  5. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  6. 199
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  7. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

32
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java

@ -96,7 +96,22 @@ public class DistributionSignforEntity extends TenantEntity {
* 服务类型
*/
@ApiModelProperty(value = "服务类型;预约服务类型;1-上楼、2-超区、3-拆样、4-平移、5-分拣、6-搬运、7-返货;")
private String serveType;
private String deliveryWay;
/**
* 配送类型
*/
@ApiModelProperty(value = "配送类型;1-商配、2-市配")
private String deliveryType;
/**
* 商城名称
*/
@ApiModelProperty(value = "商城名称")
private String shoppingName;
/**
* 订单来源
*/
@ApiModelProperty(value = "订单来源")
private String orderSource;
/**
* 配送仓库(id)
*/
@ -170,10 +185,15 @@ public class DistributionSignforEntity extends TenantEntity {
@ApiModelProperty(value = "签收人(名称)")
private String signeeName;
/**
* 签收状态;1-未签收,2-司机签收,3-文员签收
* 文员签收状态;1-未签收2-签收
*/
@ApiModelProperty(value = "签收状态;1-未签收,2-司机签收,3-文员签收")
@ApiModelProperty(value = "文员签收状态;1-未签收,2-签收")
private String signingStatus;
/**
* 司机签收状态;1-未签收2-签收
*/
@ApiModelProperty(value = "司机签收状态;1-未签收,2-签收")
private String driverSigning;
/**
* 签收类型;1-签收,2-代签收
*/
@ -210,6 +230,12 @@ public class DistributionSignforEntity extends TenantEntity {
@ApiModelProperty(value = "送货车辆(值)")
private String deliveryVehicleName;
/**
* 编号
*/
@ApiModelProperty(value = "编号")
private String number;
/**
* 配送时间

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockupInfoClient.java

@ -33,7 +33,7 @@ import org.springframework.web.bind.annotation.RequestParam;
)
public interface IDistributionStockupInfoClient {
String API_PREFIX = "/client";
String API_PREFIX = "reservationStockup/client";
String TOP = API_PREFIX + "/top";
/**

24
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforsnmbVO.java

@ -13,27 +13,15 @@ import lombok.Data;
public class DistributionSignforsnmbVO {
/**
* 客户总数
* 司机待签收
*/
@ApiModelProperty(value = "客户总数")
private Integer customNub;
@ApiModelProperty(value = "司机待签收")
private Integer driverNub;
/**
* 订单总数
* 文员待签收
*/
@ApiModelProperty(value = "订单总数")
private Integer ordersNub;
/**
* 已签收总数
*/
@ApiModelProperty(value = "已签收总数")
private Integer signedNub;
/**
* 未签收总数
*/
@ApiModelProperty(value = "未签收总数")
private Integer unsignedNub;
@ApiModelProperty(value = "文员待签收")
private Integer clerkNub;
}

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java

@ -116,7 +116,6 @@ public class DistributionSignforController extends BladeController {
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入distributionSignfor")
public R<IPage<DistributionSignforVO>> page(DistributionSignforVO distributionSignfor, Query query) {
IPage<DistributionSignforVO> pages = distributionSignforService.selectDistributionSignforPage(Condition.getPage(query), distributionSignfor);
return R.data(pages);
}

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -41,7 +41,7 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @param distributionSignfor
* @return
*/
List<DistributionSignforVO> selectDistributionSignforPage(IPage page, DistributionSignforVO distributionSignfor);
List<DistributionSignforVO> selectDistributionSignforPage(IPage page,@Param("param") DistributionSignforVO distributionSignfor);
/**
@ -79,4 +79,18 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
List<DistributionSignforEntity> selectCustomNub(DistributionSignforDTO distributionSignfor);
/**
* 司机未签收
*
* @param distributionSignfor
* @return
*/
Integer selectdriverNubCount(@Param("param") DistributionSignforDTO distributionSignfor);
/**
* 文员未签收
*
* @param distributionSignfor
* @return
*/
Integer selectclerkNubCount(@Param("param") DistributionSignforDTO distributionSignfor);
}

199
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -20,19 +20,22 @@
<result column="reserve5" property="reserve5"/>
<result column="order_id" property="orderId"/>
<result column="reservation_id" property="reservationId"/>
<result column="consignee" property="consignee"/>
<result column="consignee" property="consigneeName"/>
<result column="consignee" property="consigneeId"/>
<result column="delivery_address" property="deliveryAddress"/>
<result column="serve_type" property="serveType"/>
<result column="distributing_warehouse" property="distributingWarehouse"/>
<result column="warehouse_name" property="warehouseName"/>
<result column="warehouse_id" property="warehouseId"/>
<result column="train_number" property="trainNumber"/>
<result column="order_total" property="orderTotal"/>
<result column="total" property="total"/>
<result column="loaded_number" property="loadedNumber"/>
<result column="received_quantity" property="receivedQuantity"/>
<result column="delivery_driver" property="deliveryDriver"/>
<result column="delivery_driver_id" property="deliveryDriverId"/>
<result column="delivery_driver_name" property="deliveryDriverName"/>
<result column="delivery_driver_phone" property="deliveryDriverPhone"/>
<result column="signing_time" property="signingTime"/>
<result column="signee" property="signee"/>
<result column="signee_name" property="signeeName"/>
<result column="signee_id" property="signeeId"/>
<result column="signing_status" property="signingStatus"/>
<result column="signing_type" property="signingType"/>
<result column="clerk_sign_pictures" property="clerkSignPictures"/>
@ -43,8 +46,94 @@
</resultMap>
<select id="selectDistributionSignforPage" resultMap="distributionSignforResultMap">
select * from logpm_distribution_signfor where is_deleted = 0
<select id="selectDistributionSignforPage" resultType="com.logpm.distribution.vo.DistributionSignforVO">
SELECT
id id,
number number,
order_id orderId,
reservation_id reservationId,
consignee_id consigneeId,
consignee_name consigneeName,
delivery_phone deliveryPhone,
delivery_address delivery_Address,
delivery_type deliveryType,
delivery_way deliveryWay,
warehouse_name warehouseName,
warehouse_id warehouseId,
train_number trainNumber,
order_total orderTotal,
total total,
loaded_number loadedNumber,
received_quantity receivedQuantity,
delivery_driver_name deliveryDriverName,
delivery_driver_id deliveryDriverId,
delivery_driver_phone deliveryDriverPhone,
signing_time signingTime,
sjsigning_time sjsigningTime,
signee_name signeeName,
signee_id signeeId,
signing_status signingStatus,
driver_signing driverSigning,
signing_type signingType,
clerk_sign_pictures clerkSignPictures,
delivery_sign_pictures deliverySignPictures,
service_number serviceNumber,
notes notes,
delivery_time deliveryTime,
delivery_vehicle_id deliveryVehicleId,
delivery_vehicle_name deliveryVehicleName,
shopping_name shoppingName,
order_source orderSource
FROM
logpm_distribution_signfor
<where>
is_deleted = 0
<if test="param.number != null and param.number!=''">
and number like concat('%',#{param.number},'%')
</if>
<if test="param.shoppingName != null and param.shoppingName!=''">
and shopping_name like concat('%',#{param.shoppingName},'%')
</if>
<if test="param.deliveryTime!=null and param.deliveryTime!=''">
and date_format(delivery_time,'%y%m%d%') = date_format(#{param.deliveryTime},'%y%m%d%')
</if>
<if test="param.signingTime!=null and param.signingTime!=''">
and date_format(signing_time,'%y%m%d%') = date_format(#{param.signingTime},'%y%m%d%')
</if>
<if test="param.sjsigningTime!=null and param.sjsigningTime!=''">
and date_format(sjsigning_time,'%y%m%d%') = date_format(#{param.sjsigningTime},'%y%m%d%')
</if>
<if test="param.orderId != null and param.orderId!=''">
and order_id like concat('%',#{param.orderId},'%')
</if>
<if test="param.consigneeName != null and param.consigneeName!=''">
and consignee_name like concat('%',#{param.consigneeName},'%')
</if>
<if test="param.deliveryType != null and param.deliveryType!=''">
and delivery_type = #{param.deliveryType}
</if>
<if test="param.signingStatus != null and param.signingStatus!=''">
and signing_status = #{param.signingStatus}
</if>
<if test="param.orderSource != null and param.orderSource!=''">
and order_source = #{param.orderSource}
</if>
<if test="param.deliveryPhone != null and param.deliveryPhone!=''">
and delivery_phone = #{param.deliveryPhone}
</if>
<if test="param.trainNumber != null and param.trainNumber!=''">
and train_number like concat('%',#{param.trainNumber},'%')
</if>
<if test="param.deliveryDriverName != null and param.deliveryDriverName!=''">
and delivery_driver_name like concat('%',#{param.deliveryDriverName},'%')
</if>
<if test="param.deliveryAddress != null and param.deliveryAddress!=''">
and delivery_address like concat('%',#{param.deliveryAddress},'%')
</if>
<if test="param.driverSigning != null and param.driverSigning!=''">
and driver_signing = #{param.driverSigning}
</if>
</where>
</select>
@ -63,5 +152,101 @@
<select id="selectCustomNub" resultMap="distributionSignforResultMap">
select id,reservation_id,order_id from logpm_distribution_signfor where is_deleted = 0
</select>
<select id="selectdriverNubCount" resultType="java.lang.Integer">
select COALESCE(COUNT(*), 0) from logpm_distribution_signfor
<where>
is_deleted = 0 and driver_signing ='1'
<if test="param.number != null and param.number!=''">
and number like concat('%',#{param.number},'%')
</if>
<if test="param.shoppingName != null and param.shoppingName!=''">
and shopping_name like concat('%',#{param.shoppingName},'%')
</if>
<if test="param.signingStatus != null and param.signingStatus!=''">
and signing_status = #{param.signingStatus}
</if>
<if test="param.deliveryTime!=null and param.deliveryTime!=''">
and date_format(delivery_time,'%y%m%d%') = date_format(#{param.deliveryTime},'%y%m%d%')
</if>
<if test="param.signingTime!=null and param.signingTime!=''">
and date_format(signing_time,'%y%m%d%') = date_format(#{param.signingTime},'%y%m%d%')
</if>
<if test="param.sjsigningTime!=null and param.sjsigningTime!=''">
and date_format(sjsigning_time,'%y%m%d%') = date_format(#{param.sjsigningTime},'%y%m%d%')
</if>
<if test="param.orderId != null and param.orderId!=''">
and order_id like concat('%',#{param.orderId},'%')
</if>
<if test="param.consigneeName != null and param.consigneeName!=''">
and consignee_name like concat('%',#{param.consigneeName},'%')
</if>
<if test="param.deliveryType != null and param.deliveryType!=''">
and delivery_type = #{param.deliveryType}
</if>
<if test="param.orderSource != null and param.orderSource!=''">
and order_source = #{param.orderSource}
</if>
<if test="param.deliveryPhone != null and param.deliveryPhone!=''">
and delivery_phone = #{param.deliveryPhone}
</if>
<if test="param.trainNumber != null and param.trainNumber!=''">
and train_number like concat('%',#{param.trainNumber},'%')
</if>
<if test="param.deliveryDriverName != null and param.deliveryDriverName!=''">
and delivery_driver_name like concat('%',#{param.deliveryDriverName},'%')
</if>
<if test="param.deliveryAddress != null and param.deliveryAddress!=''">
and delivery_address like concat('%',#{param.deliveryAddress},'%')
</if>
</where>
</select>
<select id="selectclerkNubCount" resultType="java.lang.Integer">
select COALESCE(COUNT(*), 0) from logpm_distribution_signfor
<where>
is_deleted = 0 and signing_status ='1'
<if test="param.number != null and param.number!=''">
and number like concat('%',#{param.number},'%')
</if>
<if test="param.signingStatus != null and param.signingStatus!=''">
and signing_status = #{param.signingStatus}
</if>
<if test="param.shoppingName != null and param.shoppingName!=''">
and shopping_name like concat('%',#{param.shoppingName},'%')
</if>
<if test="param.deliveryTime!=null and param.deliveryTime!=''">
and date_format(delivery_time,'%y%m%d%') = date_format(#{param.deliveryTime},'%y%m%d%')
</if>
<if test="param.signingTime!=null and param.signingTime!=''">
and date_format(signing_time,'%y%m%d%') = date_format(#{param.signingTime},'%y%m%d%')
</if>
<if test="param.sjsigningTime!=null and param.sjsigningTime!=''">
and date_format(sjsigning_time,'%y%m%d%') = date_format(#{param.sjsigningTime},'%y%m%d%')
</if>
<if test="param.orderId != null and param.orderId!=''">
and order_id like concat('%',#{param.orderId},'%')
</if>
<if test="param.consigneeName != null and param.consigneeName!=''">
and consignee_name like concat('%',#{param.consigneeName},'%')
</if>
<if test="param.deliveryType != null and param.deliveryType!=''">
and delivery_type = #{param.deliveryType}
</if>
<if test="param.orderSource != null and param.orderSource!=''">
and order_source = #{param.orderSource}
</if>
<if test="param.deliveryPhone != null and param.deliveryPhone!=''">
and delivery_phone = #{param.deliveryPhone}
</if>
<if test="param.trainNumber != null and param.trainNumber!=''">
and train_number like concat('%',#{param.trainNumber},'%')
</if>
<if test="param.deliveryDriverName != null and param.deliveryDriverName!=''">
and delivery_driver_name like concat('%',#{param.deliveryDriverName},'%')
</if>
<if test="param.deliveryAddress != null and param.deliveryAddress!=''">
and delivery_address like concat('%',#{param.deliveryAddress},'%')
</if>
</where>
</select>
</mapper>

23
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.vo.DistributionSignforVO;
@ -59,23 +60,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public DistributionSignforsnmbVO getNubTotal(DistributionSignforDTO distributionSignfor) {
//转换创建时间
if (null != distributionSignfor.getCreateTime()){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
distributionSignfor.setCreateTime_query(sdf.format(distributionSignfor.getCreateTime()));
}
DistributionSignforsnmbVO distributionSignforsnmbVO = new DistributionSignforsnmbVO();
//查询客户总数
List<DistributionSignforEntity> distributionSignforEntityList = baseMapper.selectCustomNub(distributionSignfor);
//订单总数
Integer OrdersNub = baseMapper.selectOrdersNub(distributionSignfor);
//已签收总数
Integer SignedNub = baseMapper.selectSignedNub(distributionSignfor);
// //未签收总数
// Integer UnsignedNub = baseMapper.selectUnsignedNub(distributionSignfor);
distributionSignforsnmbVO.setCustomNub(distributionSignforEntityList.size());
distributionSignforsnmbVO.setOrdersNub(OrdersNub);
distributionSignforsnmbVO.setUnsignedNub(OrdersNub - SignedNub);
distributionSignforsnmbVO.setSignedNub(SignedNub);
//司机待签收
Integer driverNub = baseMapper.selectdriverNubCount(distributionSignfor);
//文员待签收
Integer clerkNub = baseMapper.selectclerkNubCount(distributionSignfor);
distributionSignforsnmbVO.setClerkNub(clerkNub);
distributionSignforsnmbVO.setDriverNub(driverNub);
return distributionSignforsnmbVO;
}

Loading…
Cancel
Save