Browse Source

修改签收复合数据查询失败的问题

single_db
pref_mail@163.com 1 year ago
parent
commit
12e7649c83
  1. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  2. 56
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

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

@ -124,6 +124,7 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
DistributionSignforVO selectOneCustom(@Param("id")Long id);
DistributionSignforVO selectOneCustomByReservationId(@Param("id")Long id);
/**
* 查询车次装车件数
*

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

@ -661,6 +661,62 @@
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
where lds.is_deleted = 0 and lds.id = #{id}
</select>
<select id="selectOneCustomByReservationId" resultType="com.logpm.distribution.vo.DistributionSignforVO">
SELECT
CASE
WHEN
ldr.is_urgent = '1' THEN '否'
WHEN ldr.is_urgent = '2' THEN '是'
ELSE ''
END isUrgent,
ldr.reservation_code reservationCode,
ldr.mall_name mallName,
ldr.consignee consignee,
ldr.remarks remarks,
ldr.delivery_address deliveryAddress,
ldr.delivery_phone deliveryPhone,
lds.clerk_sign_remarks clerkSignRemarks,
lds.driver_remarks driverRemarks,
lds.signing_status AS wenyuanSigningStatus,
lds.driver_signing AS sijiSigningStatus,
lds.reservation_id reservationId,
lds.signing_type signingType,
lds.clerk_sign_pictures clerkSignPictures,
lds.delivery_sign_pictures deliverySignPictures,
ldr.reservation_date reservationDate,
lds.positioning_adr positioningAdr,
lddl.train_number trainNumber,
lddl.vehicle_name vehicleName,
lddl.driver_name driverName,
lddl.driver_name driverName,
lddl.loading_team_name loadingTeamName,
lddl.unloading_team_name unLoadingTeamName,
CASE
WHEN ldr.delivery_type = '1' THEN
'商配'
WHEN ldr.delivery_type = '2' THEN
'市配'
END deliveryType,
CASE
WHEN lds.signing_status = '1' THEN
'文员待审核'
WHEN lds.signing_status = '2' THEN
'文员已审核'
END signingStatusName,
CASE
WHEN lds.driver_signing = '1' THEN
'司机待审核'
WHEN lds.driver_signing = '2' THEN
'司机已签收'
END driverSigningName
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
where lds.is_deleted = 0 and ldr.id = #{id}
</select>
<select id="selectloadNub" resultType="java.lang.Integer">
SELECT COALESCE(sum(lds.loaded_number), 0) FROM logpm_distribution_signfor lds WHERE lds.delivery_id = #{id}
</select>

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

@ -1049,7 +1049,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public DistributionSignforVO getOneCustom(Long id) {
DistributionSignforVO distributionSignforVO = baseMapper.selectOneCustom(id);
DistributionSignforVO distributionSignforVO = baseMapper.selectOneCustomByReservationId(id);
//查询客户下的订单列表信息
DistributionSignforEntity signforEntity = this.getById(id);
if (Func.isEmpty(signforEntity)) {

Loading…
Cancel
Save