Browse Source

Merge branch 'pre-production'

master
pref_mail@163.com 5 months ago
parent
commit
d280143b41
  1. 5
      blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java
  2. 6
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java
  3. 15
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java
  4. 244
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  5. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.java
  6. 110
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  7. 64
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  8. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  9. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  10. 4
      blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/ZbFactoryAccountsInterceptor.java

5
blade-biz-common/src/main/java/org/springblade/common/constant/aftersales/WorkOrderStatusConstant.java

@ -9,8 +9,9 @@ public enum WorkOrderStatusConstant {
daishenhe("待审核","40"), daishenhe("待审核","40"),
yishenhe("已审核","50"), yishenhe("已审核","50"),
chaoshiweichuli("超时未处理","60"), chaoshiweichuli("超时未处理","60"),
zhongchaizhong("客服介入中","70"), // zhongchaizhong("客服介入中","70"),
yiwanjei("仲裁中","80"), zhongchaizhong("仲裁中","70"),
yiwanjie("完结","80"),
lipeijineweichu("理赔金额未出","90"), lipeijineweichu("理赔金额未出","90"),
shenshuzhong("申述中","100"), shenshuzhong("申述中","100"),
yijeishu("已结束","110") yijeishu("已结束","110")

6
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java

@ -25,6 +25,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity; import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -326,6 +327,11 @@ public class AftersalesWorkOrderEntity extends TenantEntity {
private Integer packageFinish; private Integer packageFinish;
/**
* 赔款金额
*/
private BigDecimal compensationMoney;
/** /**

15
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java

@ -45,6 +45,21 @@ public class AftersalesWorkOrderVO extends AftersalesWorkOrderEntity {
* 提货名称 * 提货名称
*/ */
private String discoveryNodeName; private String discoveryNodeName;
/**
* 完成时间
*/
private String completeTime;
/**
* 是否申述
*/
private String isAppeal;
/**
* 申诉状态
*/
private String appealStatusName;
/** /**
* 责任方和处理方 * 责任方和处理方
*/ */

244
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -41,6 +41,7 @@ import javax.servlet.ServletOutputStream;
import javax.validation.Valid; import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
@ -732,7 +733,92 @@ public class AftersalesWorkOrderController extends BladeController {
/** /**
* 导出数据 * 处理中导出数据
*
*/
@GetMapping("/exportWorkOrder0")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入aftersalesWorkOrder")
public void allExportWorkOrder(@ApiIgnore @RequestParam Map<String, Object> aftersalesWorkOrder, BladeUser bladeUser, HttpServletResponse response) {
List<List<String>> basicTitle = aftersalesWorkOrderService.basicTitleBuild();
//查询数据
List<String> head1 = new ArrayList<>(Arrays.asList("总部处理客服"));
basicTitle.add(head1);
List<String> head2 = new ArrayList<>(Arrays.asList("处理结果"));
basicTitle.add(head2);
List<String> head3 = new ArrayList<>(Arrays.asList("理赔金额"));
basicTitle.add(head3);
List<String> head4 = new ArrayList<>(Arrays.asList("完结时间"));
basicTitle.add(head4);
List<String> head5 = new ArrayList<>(Arrays.asList("是否申诉"));
basicTitle.add(head5);
List<String> head6 = new ArrayList<>(Arrays.asList("申诉状态"));
basicTitle.add(head6);
List<String> head7 = new ArrayList<>(Arrays.asList("钉钉号"));
basicTitle.add(head7);
List<AftersalesWorkOrderVO> exportData = aftersalesWorkOrderService.getBasicExportData(aftersalesWorkOrder);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (!exportData.isEmpty()) {
List<List<String>> dataList = new ArrayList<>();
for (AftersalesWorkOrderVO exportDatum : exportData) {
List<String> data = new ArrayList<>();
data.add(0,exportDatum.getWorkOrderTypeName());
data.add(1,exportDatum.getDiscoveryNodeName());
data.add(2,exportDatum.getWarehouseName());
data.add(3,exportDatum.getWorkOrderNumber());
data.add(4,exportDatum.getWaybillNumber());
data.add(5,exportDatum.getOrderCode());
data.add(6,exportDatum.getPackageCode());
data.add(7,exportDatum.getBrandName());
data.add(8,exportDatum.getWaybillMall());
data.add(9,exportDatum.getFirst());
data.add(10,exportDatum.getWorkOrderStatusName());
data.add(11,exportDatum.getBusinessName());
data.add(12,sdf.format(exportDatum.getCreateTime()));
data.add(13,sdf.format(exportDatum.getEndCreateTime()));
data.add(14,Objects.isNull(exportDatum.getUpdateTime())?"":sdf.format(exportDatum.getUpdateTime()));
data.add(15,"");
data.add(16,exportDatum.getCustomerServiceName());
data.add(17,exportDatum.getHeadquartersName());
data.add(18,exportDatum.getResultTypes());
data.add(19,exportDatum.getTotalAmountNum());
data.add(20,exportDatum.getCompleteTime());
data.add(21,exportDatum.getIsAppeal());
data.add(22,exportDatum.getAppealStatusName());
data.add(23,exportDatum.getProcessNumber());
//查询此工单是否存在有责任方如果存在有责任方完善表头
// List<AftersalesPersonResponsibleEntity> entityList = aftersalesPersonResponsibleService.list(Wrappers.<AftersalesPersonResponsibleEntity>query().lambda()
// .eq(AftersalesPersonResponsibleEntity::getWordOrderId, exportDatum.getId())
// .eq(AftersalesPersonResponsibleEntity::getTypesOf, "1")
// );
// if (!entityList.isEmpty()) {
// handleResponsibility(basicTitle,entityList,data);
// }
dataList.add(data);
}
ServletOutputStream os = null;
try {
os = response.getOutputStream();
ExcelWriter excelWriter = EasyExcel.write(os).build();
WriteSheet sheet = EasyExcel.writerSheet()
// 这里放入动态头
.head(basicTitle)
// 当然这里数据也可以用 List<List<String>> 去传入
.build();
excelWriter.write(dataList,sheet);
excelWriter.finish();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
/**
* 处理中导出数据
* *
*/ */
@GetMapping("/exportWorkOrder1") @GetMapping("/exportWorkOrder1")
@ -763,8 +849,150 @@ public class AftersalesWorkOrderController extends BladeController {
data.add(12,sdf.format(exportDatum.getCreateTime())); data.add(12,sdf.format(exportDatum.getCreateTime()));
data.add(13,sdf.format(exportDatum.getEndCreateTime())); data.add(13,sdf.format(exportDatum.getEndCreateTime()));
data.add(14,Objects.isNull(exportDatum.getUpdateTime())?"":sdf.format(exportDatum.getUpdateTime())); data.add(14,Objects.isNull(exportDatum.getUpdateTime())?"":sdf.format(exportDatum.getUpdateTime()));
data.add(15,null); data.add(15,"");
data.add(16,null); data.add(16,"");
//查询此工单是否存在有责任方如果存在有责任方完善表头
List<AftersalesPersonResponsibleEntity> entityList = aftersalesPersonResponsibleService.list(Wrappers.<AftersalesPersonResponsibleEntity>query().lambda()
.eq(AftersalesPersonResponsibleEntity::getWordOrderId, exportDatum.getId())
.eq(AftersalesPersonResponsibleEntity::getTypesOf, "1")
);
if (!entityList.isEmpty()) {
handleResponsibility(basicTitle,entityList,data);
}
dataList.add(data);
}
ServletOutputStream os = null;
try {
os = response.getOutputStream();
ExcelWriter excelWriter = EasyExcel.write(os).build();
WriteSheet sheet = EasyExcel.writerSheet()
// 这里放入动态头
.head(basicTitle)
// 当然这里数据也可以用 List<List<String>> 去传入
.build();
excelWriter.write(dataList,sheet);
excelWriter.finish();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
/**
* 处理中导出数据
*
*/
@GetMapping("/exportWorkOrder2")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入aftersalesWorkOrder")
public void claimsCompensationExportWorkOrder(@ApiIgnore @RequestParam Map<String, Object> aftersalesWorkOrder, BladeUser bladeUser, HttpServletResponse response) {
List<List<String>> basicTitle = aftersalesWorkOrderService.basicTitleBuild();
//查询数据
List<String> head1 = new ArrayList<>(Arrays.asList("处理结果"));
basicTitle.add(head1);
List<String> head2 = new ArrayList<>(Arrays.asList("理赔金额"));
basicTitle.add(head2);
List<AftersalesWorkOrderVO> exportData = aftersalesWorkOrderService.getBasicExportData(aftersalesWorkOrder);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (!exportData.isEmpty()) {
List<List<String>> dataList = new ArrayList<>();
for (AftersalesWorkOrderVO exportDatum : exportData) {
List<String> data = new ArrayList<>();
data.add(0,exportDatum.getWorkOrderTypeName());
data.add(1,exportDatum.getDiscoveryNodeName());
data.add(2,exportDatum.getWarehouseName());
data.add(3,exportDatum.getWorkOrderNumber());
data.add(4,exportDatum.getWaybillNumber());
data.add(5,exportDatum.getOrderCode());
data.add(6,exportDatum.getPackageCode());
data.add(7,exportDatum.getBrandName());
data.add(8,exportDatum.getWaybillMall());
data.add(9,exportDatum.getFirst());
data.add(10,exportDatum.getWorkOrderStatusName());
data.add(11,exportDatum.getBusinessName());
data.add(12,sdf.format(exportDatum.getCreateTime()));
data.add(13,sdf.format(exportDatum.getEndCreateTime()));
data.add(14,Objects.isNull(exportDatum.getUpdateTime())?"":sdf.format(exportDatum.getUpdateTime()));
data.add(15,"");
data.add(16,"");
data.add(17,exportDatum.getResultTypes());
data.add(18,exportDatum.getTotalAmountNum());
//查询此工单是否存在有责任方如果存在有责任方完善表头
List<AftersalesPersonResponsibleEntity> entityList = aftersalesPersonResponsibleService.list(Wrappers.<AftersalesPersonResponsibleEntity>query().lambda()
.eq(AftersalesPersonResponsibleEntity::getWordOrderId, exportDatum.getId())
.eq(AftersalesPersonResponsibleEntity::getTypesOf, "1")
);
if (!entityList.isEmpty()) {
handleResponsibility(basicTitle,entityList,data);
}
dataList.add(data);
}
ServletOutputStream os = null;
try {
os = response.getOutputStream();
ExcelWriter excelWriter = EasyExcel.write(os).build();
WriteSheet sheet = EasyExcel.writerSheet()
// 这里放入动态头
.head(basicTitle)
// 当然这里数据也可以用 List<List<String>> 去传入
.build();
excelWriter.write(dataList,sheet);
excelWriter.finish();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
/**
* 处理中导出数据
*
*/
@GetMapping("/exportWorkOrder3")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入aftersalesWorkOrder")
public void processingCompletedExportWorkOrder(@ApiIgnore @RequestParam Map<String, Object> aftersalesWorkOrder, BladeUser bladeUser, HttpServletResponse response) {
List<List<String>> basicTitle = aftersalesWorkOrderService.basicTitleBuild();
//查询数据
List<String> head1 = new ArrayList<>(Arrays.asList("营业部处理客服"));
basicTitle.add(head1);
List<String> head2 = new ArrayList<>(Arrays.asList("处理结果"));
basicTitle.add(head2);
List<String> head3 = new ArrayList<>(Arrays.asList("理赔金额"));
basicTitle.add(head3);
List<AftersalesWorkOrderVO> exportData = aftersalesWorkOrderService.getBasicExportData(aftersalesWorkOrder);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (!exportData.isEmpty()) {
List<List<String>> dataList = new ArrayList<>();
for (AftersalesWorkOrderVO exportDatum : exportData) {
List<String> data = new ArrayList<>();
data.add(0,exportDatum.getWorkOrderTypeName());
data.add(1,exportDatum.getDiscoveryNodeName());
data.add(2,exportDatum.getWarehouseName());
data.add(3,exportDatum.getWorkOrderNumber());
data.add(4,exportDatum.getWaybillNumber());
data.add(5,exportDatum.getOrderCode());
data.add(6,exportDatum.getPackageCode());
data.add(7,exportDatum.getBrandName());
data.add(8,exportDatum.getWaybillMall());
data.add(9,exportDatum.getFirst());
data.add(10,exportDatum.getWorkOrderStatusName());
data.add(11,exportDatum.getBusinessName());
data.add(12,sdf.format(exportDatum.getCreateTime()));
data.add(13,sdf.format(exportDatum.getEndCreateTime()));
data.add(14,Objects.isNull(exportDatum.getUpdateTime())?"":sdf.format(exportDatum.getUpdateTime()));
data.add(15,"");
data.add(16,exportDatum.getCustomerServiceName());
data.add(17,exportDatum.getHeadquartersName());
data.add(18,exportDatum.getResultTypes());
data.add(19,exportDatum.getTotalAmountNum());
//查询此工单是否存在有责任方如果存在有责任方完善表头 //查询此工单是否存在有责任方如果存在有责任方完善表头
List<AftersalesPersonResponsibleEntity> entityList = aftersalesPersonResponsibleService.list(Wrappers.<AftersalesPersonResponsibleEntity>query().lambda() List<AftersalesPersonResponsibleEntity> entityList = aftersalesPersonResponsibleService.list(Wrappers.<AftersalesPersonResponsibleEntity>query().lambda()
.eq(AftersalesPersonResponsibleEntity::getWordOrderId, exportDatum.getId()) .eq(AftersalesPersonResponsibleEntity::getWordOrderId, exportDatum.getId())
@ -802,12 +1030,16 @@ public class AftersalesWorkOrderController extends BladeController {
.orderByDesc(AftersaleSurveyRecordEntity::getCreateTime) .orderByDesc(AftersaleSurveyRecordEntity::getCreateTime)
); );
if (!recordEntities.isEmpty()) { if (!recordEntities.isEmpty()) {
int size = 0;
if (!basicTitle.contains(Arrays.asList("最新消息回复内容")) ){ if (!basicTitle.contains(Arrays.asList("最新消息回复内容")) ){
List<String> head5 = new ArrayList<>(Arrays.asList("最新消息回复内容")); List<String> head5 = new ArrayList<>(Arrays.asList("最新消息回复内容"));
basicTitle.add(basicTitle.size(),head5); size = basicTitle.size();
basicTitle.add(head5); basicTitle.add(size,head5);
}else {
size = basicTitle.indexOf(Arrays.asList("最新消息回复内容"));
} }
data.add(recordEntities.get(0).getContent()); data.add(size,recordEntities.get(0).getContent());
} }
int aa = 0; int aa = 0;

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.java

@ -125,5 +125,5 @@ public interface AftersalesWorkOrderMapper extends BaseMapper<AftersalesWorkOrde
* @param ids * @param ids
* @return * @return
*/ */
List<AftersalesWorkOrderVO> getBasicExportData(@Param("param") AftersalesWorkOrderDTO workOrderDTO, List<Long> ids); List<AftersalesWorkOrderVO> getBasicExportData(@Param("param") AftersalesWorkOrderDTO workOrderDTO,@Param("ids") List<Long> ids,@Param("warehouseIds")List<Long> warehouseIds);
} }

110
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -57,6 +57,7 @@
SELECT DISTINCT SELECT DISTINCT
lawo.id, lawo.id,
lawo.ceator, lawo.ceator,
lawo.warehouse_name,
lawo.work_order_type, lawo.work_order_type,
lawo.discovery_node, lawo.discovery_node,
lawo.work_order_number, lawo.work_order_number,
@ -91,7 +92,7 @@
lawo.warehouse_id warehouseId, lawo.warehouse_id warehouseId,
lawo.investigation_process investigationProcess, lawo.investigation_process investigationProcess,
lawo.customer_service_id customerServiceId, lawo.customer_service_id customerServiceId,
IFNULL( sum( lapr.money ), 0 ) AS totalAmountNum, lawo.compensation_money totalAmountNum,
GROUP_CONCAT(DISTINCT lapr.result_type) AS resultTypes, GROUP_CONCAT(DISTINCT lapr.result_type) AS resultTypes,
GROUP_CONCAT(DISTINCT lapr.compensation_method) AS compensationMethods GROUP_CONCAT(DISTINCT lapr.compensation_method) AS compensationMethods
FROM FROM
@ -113,8 +114,8 @@
AND b.is_deleted = 0 AND b.is_deleted = 0
GROUP BY GROUP BY
a.id) AS t ON t.id = lawo.id a.id) AS t ON t.id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0
LEFT JOIN logpm_aftersales_processor AS lap ON lawo.id = lap.work_order_id AND lap.is_deleted = 0 LEFT JOIN logpm_aftersales_processor AS lap ON lawo.id = lap.work_order_id AND lap.is_deleted = 0
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0 AND lap.types_of != '3' AND lap.types_of != '3'
<where> <where>
lawo.is_deleted = 0 lawo.is_deleted = 0
<if test="param.workOrderNumbers != null and param.workOrderNumbers != '' "> <if test="param.workOrderNumbers != null and param.workOrderNumbers != '' ">
@ -132,6 +133,7 @@
<if test="param.startCreateTime != null and param.endCreateTime != null "> <if test="param.startCreateTime != null and param.endCreateTime != null ">
and lawo.create_time between #{param.startCreateTime} and #{param.endCreateTime} and lawo.create_time between #{param.startCreateTime} and #{param.endCreateTime}
</if> </if>
<if test="param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' ">and lawo.work_order_status = #{param.workOrderStatusNameS } </if> <if test="param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' ">and lawo.work_order_status = #{param.workOrderStatusNameS } </if>
<if test="param.id != null and param.id != '' ">and lawo.id = #{param.id } </if> <if test="param.id != null and param.id != '' ">and lawo.id = #{param.id } </if>
<if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if> <if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if>
@ -188,12 +190,13 @@
<if test="param.brandName != null and param.brandName != '' ">and t.brand_name like concat('%',#{param.brandName},'%') </if> <if test="param.brandName != null and param.brandName != '' ">and t.brand_name like concat('%',#{param.brandName},'%') </if>
<if test="param.waybillNumber != null and param.waybillNumber != ''">and t.waybill_number like concat('%',#{param.waybillNumber},'%') </if> <if test="param.waybillNumber != null and param.waybillNumber != ''">and t.waybill_number like concat('%',#{param.waybillNumber},'%') </if>
<if test="param.packageCode != null and param.packageCode != ''">and t.package_code like concat('%',#{param.packageCode},'%') </if> <if test="param.packageCode != null and param.packageCode != ''">and t.package_code like concat('%',#{param.packageCode},'%') </if>
<if test="param.warehouseId != null "> <if test="warehouseIds != null ">
and lap.business_id IN and lap.business_id IN
<foreach collection="warehouseIds" item="warehouseId" open="(" separator="," close=")" > <foreach collection="warehouseIds" item="warehouseId" open="(" separator="," close=")" >
#{warehouseId} #{warehouseId}
</foreach> </foreach>
</if> </if>
</where> </where>
group by lawo.id group by lawo.id
ORDER BY lawo.create_time DESC ORDER BY lawo.create_time DESC
@ -1106,26 +1109,29 @@
GROUP_CONCAT(DISTINCT lapr.result_type) AS resultTypes, GROUP_CONCAT(DISTINCT lapr.result_type) AS resultTypes,
IFNULL( sum( lapr.money ), 0 ) AS totalAmountNum, IFNULL( sum( lapr.money ), 0 ) AS totalAmountNum,
lawo.ceator, lawo.ceator,
IF(lawo.work_order_status = '80',lawo.update_time,'') AS '完结时间', lawo.compensation_money totalAmountNum,
IF(lawo.work_order_status = '100','是','否') AS '是否申述', IF(lawo.work_order_status = '80',lawo.update_time,'') AS completeTime,
IF(lawo.work_order_status = '100','是','否') AS isAppeal,
lawo.process_number, lawo.process_number,
IF(lawo.work_order_status = '100',(SELECT CASE types_of IF(lawo.work_order_status = '100',(SELECT CASE types_of
WHEN 0 THEN '待处理' WHEN 0 THEN '待处理'
WHEN 1 THEN '成立' WHEN 1 THEN '成立'
WHEN 2 THEN '驳回' WHEN 2 THEN '驳回'
WHEN 3 THEN '取消' WHEN 3 THEN '取消'
ELSE ELSE
'未知审核状态' '未知审核状态'
END aaa END aaa
FROM logpm_aftersales_appeal WHERE word_order_id = lawo.id AND is_deleted = 0 AND types_of != 3 ORDER BY create_time DESC LIMIT 1),'未申述') AS '申述状态' FROM logpm_aftersales_appeal WHERE word_order_id = lawo.id AND is_deleted = 0 AND types_of != 3 ORDER BY create_time DESC LIMIT 1),'未申述') AS appealStatusName,
lawo.warehouse_service_name,
lawo.headquarters_name
FROM FROM
logpm_aftersales_work_order lawo logpm_aftersales_work_order lawo
LEFT JOIN logpm_aftersales_processor lap ON lawo.id = lap.work_order_id LEFT JOIN logpm_aftersales_processor lap ON lawo.id = lap.work_order_id
AND lap.types_of = '2' AND lap.types_of = '2'
AND lap.conditions IN ( 1, 2 ) AND lap.conditions IN ( 1, 2 )
AND lap.is_deleted = 0
LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id
AND lacr.is_deleted = '0' AND lacr.is_deleted = 0
LEFT JOIN (SELECT LEFT JOIN (SELECT
a.id, a.id,
group_concat( DISTINCT b.`first` SEPARATOR ',' ) AS `first`, group_concat( DISTINCT b.`first` SEPARATOR ',' ) AS `first`,
@ -1143,7 +1149,93 @@
GROUP BY GROUP BY
a.id) AS t ON t.id = lawo.id a.id) AS t ON t.id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0 LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0
LEFT JOIN logpm_aftersales_person_responsible AS laprr ON laprr.word_order_id = lawo.id LEFT JOIN logpm_aftersales_person_responsible AS laprr ON laprr.word_order_id = lawo.id AND laprr.is_deleted = '0'
<where>
lawo.is_deleted = 0
<if test="param.workOrderNumbers != null and param.workOrderNumbers != '' ">
and lawo.work_order_number in
<foreach collection="param.workOrderNumbers.split(',')" item="workOrderNumber" separator="," open="(" close=")">
#{workOrderNumber}
</foreach>
</if>
<if test="param.orderCodes != null and param.orderCodes != '' ">
and lawo.order_code in
<foreach collection="param.orderCodes.split(',')" item="orderCode" separator="," open="(" close=")">
#{orderCode}
</foreach>
</if>
<if test="param.startCreateTime != null and param.endCreateTime != null ">
and lawo.create_time between #{param.startCreateTime} and #{param.endCreateTime}
</if>
<if test="warehouseIds != null ">
and lap.business_id IN
<foreach collection="warehouseIds" item="warehouseId" open="(" separator="," close=")" >
#{warehouseId}
</foreach>
</if>
<if test="ids != null ">
and lawo.id IN
<foreach collection="ids" item="id" open="(" separator="," close=")" >
#{id}
</foreach>
</if>
<if test="param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' ">and lawo.work_order_status = #{param.workOrderStatusNameS } </if>
<if test="param.id != null and param.id != '' ">and lawo.id = #{param.id } </if>
<if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if>
<if test="param.initiationIdentification != null and param.initiationIdentification != '' ">and lawo.initiation_identification = #{param.initiationIdentification } </if>
<if test="param.discoveryNode != null and param.discoveryNode != '' ">and lawo.discovery_node = #{param.discoveryNode } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test="param.waybillNumber != null and param.waybillNumber != '' ">and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test="param.orderCode != null and param.orderCode != '' ">and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<if test="param.deliverGoodsTime != null ">and date_format(from_unixtime( lawo.deliver_goods_time),'%Y-%m-%d') = date_format(#{param.deliverGoodsTime },'%Y-%m-%d') </if>
<if test="param.discoveryTime != null ">and date_format(from_unixtime(lawo.discovery_time),'%Y-%m-%d') = date_format( #{param.discoveryTime},'%Y-%m-%d') </if>
<if test="param.warehousingTime != null "> and date_format(from_unixtime(lawo.warehousing_time),'%Y-%m-%d') = date_format( #{param.warehousingTime},'%Y-%m-%d') </if>
<if test="param.deliveryTime != null ">and date_format(from_unixtime( lawo.delivery_time),'%Y-%m-%d') = date_format(#{param.deliveryTime} param.deliveryTime,'%Y-%m-%d') </if>
<if test="param.auditTime != null ">and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test="param.entryTime != null ">and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test="param.overTime != null ">and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test="param.waybillMall != null and param.waybillMall != '' ">and lawo.waybill_mall like concat('%', #{param.waybillMall },'%') </if>
<if test="param.deliveryDriver != null and param.deliveryDriver != '' ">and lawo.delivery_driver = #{param.deliveryDriver } </if>
<if test="param.customerServiceState != null and param.customerServiceState == 30 "> and lawo.work_order_status in ('40') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 40 "> and lawo.work_order_status in ('20') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 31 "> and lawo.work_order_status in ('30') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 60 "> and lawo.work_order_status in ('30') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 10 "> and lawo.work_order_status in ('70','80','100') </if>
<if test="param.customerServiceId != null and param.customerServiceId != '' ">and lawo.customer_service_id = #{param.customerServiceId } </if>
<if test="param.customerServiceName != null and param.customerServiceName != '' ">and lawo.customer_service_name like concat('%', #{param.customerServiceName },'%') </if>
<if test="param.waybillMallId != null and param.waybillMallId != '' ">and lawo.waybill_mall_id = #{param.waybillMallId } </if>
<if test="param.problemDescription != null and param.problemDescription != '' ">and lawo.problem_description = #{param.problemDescription} </if>
<if test="param.personResponsible != null and param.personResponsible != '' ">and lawo.person_responsible = #{param.personResponsible } </if>
<if test="param.processNumber != null and param.processNumber != '' ">and lawo.process_number = #{param.processNumber } </if>
<if test="param.reviewedBy != null and param.reviewedBy != '' ">and lawo.reviewed_by = #{param.reviewedBy } </if>
<if test="param.operator != null and param.operator != '' ">and lawo.operator = #{param.operator } </if>
<if test="param.responsiblePerson != null and param.responsiblePerson != '' ">and lawo.responsible_person = #{param.responsiblePerson } </if>
<if test="param.processedBy != null and param.processedBy != '' ">and lawo.processed_by = #{param.processedBy} </if>
<if test="param.investigationProcess != null and param.investigationProcess != '' ">and lawo.investigation_process = #{param.investigationProcess } </if>
<if test="param.relatedWorkOrdersId != null and param.relatedWorkOrdersId != '' ">and lawo.related_work_orders_id = #{param.relatedWorkOrdersId } </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != ''">and lawo.work_order_status in( #{param.workOrderStatus }) </if>
<if test="param.customerIdentification != null and param.customerIdentification == 1 ">
and lawo.work_order_status IN ( '10', '20', '21', '30', '40', '50', '60', '70', '80', '90' ,'100','110')
</if>
<if test="param.handleStatus != null and param.handleStatus == 40 "> and lawo.work_order_status in ('10') </if>
<if test="param.handleStatus != null and param.handleStatus == 50 "> and lawo.work_order_status in ('20') </if>
<if test="param.handleStatus!= null and param.handleStatus == 30"> and lawo.work_order_status in (21,30) </if>
<if test="param.handleStatus!= null and param.handleStatus == 20 ">and lawo.work_order_status in (80,100,70) </if>
<if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if>
<if test="param.discoveryNode != null and param.discoveryNode != '' ">and lawo.discovery_node = #{param.discoveryNode } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.handleStatus != 40 "> and lawo.work_order_status in ( #{param.workOrderStatus }) </if>
<if test="param.customerServiceState!= null and param.customerServiceState == 80 ">and lawo.work_order_status in ('10') </if>
<if test="param.first != null and param.first != '' ">and t.first like concat('%',#{param.first},'%') </if>
<if test="param.secondary != null and param.secondary != '' ">and t.secondary like concat('%',#{param.secondary},'%') </if>
<if test="param.brandName != null and param.brandName != '' ">and t.brand_name like concat('%',#{param.brandName},'%') </if>
<if test="param.waybillNumber != null and param.waybillNumber != ''">and t.waybill_number like concat('%',#{param.waybillNumber},'%') </if>
<if test="param.packageCode != null and param.packageCode != ''">and t.package_code like concat('%',#{param.packageCode},'%') </if>
</where>
group by lawo.id group by lawo.id
ORDER BY lawo.create_time DESC ORDER BY lawo.create_time DESC
</select> </select>

64
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -153,7 +153,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daichuli.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daichuli.getValue().equals(workOrderStatus)) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("customerServiceState", "80"); //55的待审核 aftersalesWorkOrder.put("customerServiceState", "80"); //55的待审核
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjei.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjie.getValue().equals(workOrderStatus)) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("customerServiceState", "10"); aftersalesWorkOrder.put("customerServiceState", "10");
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daishenhe.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daishenhe.getValue().equals(workOrderStatus)) {
@ -184,7 +184,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.put("handleStatus", "50"); aftersalesWorkOrder.put("handleStatus", "50");
} }
//已完结 //已完结
if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())) { if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjie.getValue())) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus", "20"); aftersalesWorkOrder.put("handleStatus", "20");
} }
@ -205,7 +205,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.put("customerServiceId", user.getUserId()); aftersalesWorkOrder.put("customerServiceId", user.getUserId());
} else if (ObjectUtils.isNull(workOrderStatus)) { } else if (ObjectUtils.isNull(workOrderStatus)) {
aftersalesWorkOrder.put("customerIdentification", "1"); aftersalesWorkOrder.put("customerIdentification", "1");
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjei.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjie.getValue().equals(workOrderStatus)) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("customerServiceState", "10"); aftersalesWorkOrder.put("customerServiceState", "10");
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daichuli.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daichuli.getValue().equals(workOrderStatus)) {
@ -238,7 +238,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.put("handleStatus", "50"); aftersalesWorkOrder.put("handleStatus", "50");
} }
//已完结 //已完结
if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())) { if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjie.getValue())) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus", "20"); aftersalesWorkOrder.put("handleStatus", "20");
} }
@ -691,7 +691,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
throw new ServiceException("赔款方数据不能为空"); throw new ServiceException("赔款方数据不能为空");
} }
AftersalesWorkOrderEntity workOrderEntity1 = baseMapper.selectById(v.getId()); AftersalesWorkOrderEntity workOrderEntity1 = baseMapper.selectById(v.getId());
if (workOrderEntity1.getWorkOrderStatus().equals(WorkOrderStatusConstant.yiwanjei.getValue())) { if (workOrderEntity1.getWorkOrderStatus().equals(WorkOrderStatusConstant.yiwanjie.getValue())) {
throw new ServiceException(" 包含已完结的异常工单!"); throw new ServiceException(" 包含已完结的异常工单!");
} }
//添加赔付方信息 //添加赔付方信息
@ -773,7 +773,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
// } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yichuli.getValue().equals(workOrderStatus)) { // } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yichuli.getValue().equals(workOrderStatus)) {
// aftersalesWorkOrder.remove("workOrderStatus"); // aftersalesWorkOrder.remove("workOrderStatus");
// aftersalesWorkOrder.put("customerServiceState", "60"); //55的待审核 // aftersalesWorkOrder.put("customerServiceState", "60"); //55的待审核
// } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjei.getValue().equals(workOrderStatus)) { // } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjie.getValue().equals(workOrderStatus)) {
// aftersalesWorkOrder.remove("workOrderStatus"); // aftersalesWorkOrder.remove("workOrderStatus");
// aftersalesWorkOrder.put("customerServiceState", "10"); // aftersalesWorkOrder.put("customerServiceState", "10");
// } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daishenhe.getValue().equals(workOrderStatus)) { // } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daishenhe.getValue().equals(workOrderStatus)) {
@ -804,7 +804,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
// aftersalesWorkOrder.put("handleStatus", "50"); // aftersalesWorkOrder.put("handleStatus", "50");
// } // }
// //已完结 // //已完结
// if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())) { // if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjie.getValue())) {
// aftersalesWorkOrder.remove("workOrderStatus"); // aftersalesWorkOrder.remove("workOrderStatus");
// aftersalesWorkOrder.put("handleStatus", "20"); // aftersalesWorkOrder.put("handleStatus", "20");
// } // }
@ -825,7 +825,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
// aftersalesWorkOrder.put("customerServiceId", user.getUserId()); // aftersalesWorkOrder.put("customerServiceId", user.getUserId());
// } else if (ObjectUtils.isNull(workOrderStatus)) { // } else if (ObjectUtils.isNull(workOrderStatus)) {
// aftersalesWorkOrder.put("customerIdentification", "1"); // aftersalesWorkOrder.put("customerIdentification", "1");
// } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjei.getValue().equals(workOrderStatus)) { // } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjie.getValue().equals(workOrderStatus)) {
// aftersalesWorkOrder.remove("workOrderStatus"); // aftersalesWorkOrder.remove("workOrderStatus");
// aftersalesWorkOrder.put("customerServiceState", "10"); // aftersalesWorkOrder.put("customerServiceState", "10");
// } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daichuli.getValue().equals(workOrderStatus)) { // } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daichuli.getValue().equals(workOrderStatus)) {
@ -857,7 +857,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
// aftersalesWorkOrder.put("handleStatus", "50"); // aftersalesWorkOrder.put("handleStatus", "50");
// } // }
// //已完结 // //已完结
// if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())) { // if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjie.getValue())) {
// aftersalesWorkOrder.remove("workOrderStatus"); // aftersalesWorkOrder.remove("workOrderStatus");
// aftersalesWorkOrder.put("handleStatus", "20"); // aftersalesWorkOrder.put("handleStatus", "20");
// } // }
@ -1010,7 +1010,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yichuli.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yichuli.getValue().equals(workOrderStatus)) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("customerServiceState", "60"); //55的待审核 aftersalesWorkOrder.put("customerServiceState", "60"); //55的待审核
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjei.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjie.getValue().equals(workOrderStatus)) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("customerServiceState", "10"); aftersalesWorkOrder.put("customerServiceState", "10");
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daishenhe.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daishenhe.getValue().equals(workOrderStatus)) {
@ -1044,7 +1044,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.put("handleStatus", "50"); aftersalesWorkOrder.put("handleStatus", "50");
} }
//已完结 //已完结
if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())) { if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjie.getValue())) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus", "20"); aftersalesWorkOrder.put("handleStatus", "20");
} }
@ -1064,7 +1064,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.put("customerServiceId", userId); aftersalesWorkOrder.put("customerServiceId", userId);
} else if (ObjectUtils.isNull(workOrderStatus)) { } else if (ObjectUtils.isNull(workOrderStatus)) {
aftersalesWorkOrder.put("customerIdentification", "1"); aftersalesWorkOrder.put("customerIdentification", "1");
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjei.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.yiwanjie.getValue().equals(workOrderStatus)) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("customerServiceState", "10"); aftersalesWorkOrder.put("customerServiceState", "10");
} else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daichuli.getValue().equals(workOrderStatus)) { } else if (ObjectUtils.isNotNull(workOrderStatus) && WorkOrderStatusConstant.daichuli.getValue().equals(workOrderStatus)) {
@ -1089,7 +1089,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.put("handleStatus", "50"); aftersalesWorkOrder.put("handleStatus", "50");
} }
//已完结 //已完结
if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjei.getValue())) { if (ObjectUtils.isNotNull(workOrderStatus) && workOrderStatus.equals(WorkOrderStatusConstant.yiwanjie.getValue())) {
aftersalesWorkOrder.remove("workOrderStatus"); aftersalesWorkOrder.remove("workOrderStatus");
aftersalesWorkOrder.put("handleStatus", "20"); aftersalesWorkOrder.put("handleStatus", "20");
} }
@ -1642,7 +1642,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if (byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yichuli.getValue())) { if (byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yichuli.getValue())) {
throw new ServiceException("当前异常工单已处理!"); throw new ServiceException("当前异常工单已处理!");
} }
if (byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yiwanjei.getValue())) { if (byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yiwanjie.getValue())) {
throw new ServiceException("当前异常工单已完结!!"); throw new ServiceException("当前异常工单已完结!!");
} }
AftersalesProcessingResultsDTO aftersalesProcessingResultsDTO = aftersalesWorkOrder.getAftersalesProcessingResultsDTO(); AftersalesProcessingResultsDTO aftersalesProcessingResultsDTO = aftersalesWorkOrder.getAftersalesProcessingResultsDTO();
@ -1912,13 +1912,19 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
//处理赔付方式 //处理赔付方式
aftersalesProcessingResultsDTO.setCompensationMethod(aftersalesProcessingResultsDTO.getCompensationMethod()); aftersalesProcessingResultsDTO.setCompensationMethod(aftersalesProcessingResultsDTO.getCompensationMethod());
} }
BigDecimal totalMoney = BigDecimal.ZERO;
aftersalesProcessingResultsDTO.setWarehouseId(aftersalesWorkOrderDTO.getWarehouseId()); aftersalesProcessingResultsDTO.setWarehouseId(aftersalesWorkOrderDTO.getWarehouseId());
if (!Objects.isNull(aftersalesProcessingResultsDTO.getProcessingMoneyEntityList())){
for (AftersalesProcessingMoneyEntity aftersalesProcessingMoneyEntity : aftersalesProcessingResultsDTO.getProcessingMoneyEntityList()) {
BigDecimal money = aftersalesProcessingMoneyEntity.getMoney();
totalMoney = totalMoney.add(aftersalesProcessingMoneyEntity.getMoney());
}
}
aftersalesProcessingResultsService.ownSaveOrUpdate(aftersalesProcessingResultsDTO); aftersalesProcessingResultsService.ownSaveOrUpdate(aftersalesProcessingResultsDTO);
//修改异常工单处理信息! //修改异常工单处理信息!
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(aftersalesWorkOrderDTO.getId()); workOrderEntity.setId(aftersalesWorkOrderDTO.getId());
workOrderEntity.setCompensationMoney(totalMoney);
//是否为已提交 //是否为已提交
if ("1".equals(aftersalesWorkOrderDTO.getResultIdentification())) { if ("1".equals(aftersalesWorkOrderDTO.getResultIdentification())) {
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue());
@ -2210,7 +2216,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
} }
//修改工单状态 //修改工单状态
if (ObjectUtils.isNotNull(aftersalesWorkOrder.getTypesOf())) { if (ObjectUtils.isNotNull(aftersalesWorkOrder.getTypesOf())) {
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjie.getValue());
} }
return baseMapper.updateById(workOrderEntity) > 0; return baseMapper.updateById(workOrderEntity) > 0;
@ -2227,7 +2233,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
List<AftersalesSettlementEntity> settlementEntityList = baseMapper.getWholeListSettlement(settlementEntity); List<AftersalesSettlementEntity> settlementEntityList = baseMapper.getWholeListSettlement(settlementEntity);
List<AftersalesWorkOrderEntity> aftersalesWorkOrderEntities = baseMapper.selectList(Wrappers.<AftersalesWorkOrderEntity>query().lambda() List<AftersalesWorkOrderEntity> aftersalesWorkOrderEntities = baseMapper.selectList(Wrappers.<AftersalesWorkOrderEntity>query().lambda()
.eq(AftersalesWorkOrderEntity::getWorkOrderStatus, WorkOrderStatusConstant.yiwanjei.getValue()) .eq(AftersalesWorkOrderEntity::getWorkOrderStatus, WorkOrderStatusConstant.yiwanjie.getValue())
); );
List<AftersalesWorkOrderEntity> list = new ArrayList<>(); List<AftersalesWorkOrderEntity> list = new ArrayList<>();
@ -2382,7 +2388,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.getAssignList().forEach(i -> { aftersalesWorkOrder.getAssignList().forEach(i -> {
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(i); workOrderEntity.setId(i);
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjie.getValue());
baseMapper.updateById(workOrderEntity); baseMapper.updateById(workOrderEntity);
}); });
@ -2406,7 +2412,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
// //取消订单申述 // //取消订单申述
// AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); // AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
// workOrderEntity.setId(aftersalesAppeal.getWorkOrderId()); // workOrderEntity.setId(aftersalesAppeal.getWorkOrderId());
// workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue()); // workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjie.getValue());
// baseMapper.updateById(workOrderEntity); // baseMapper.updateById(workOrderEntity);
// //
// if("2".equals(aftersalesAppeal.getTypesOf())){ // if("2".equals(aftersalesAppeal.getTypesOf())){
@ -2452,7 +2458,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
// 根据不同的申诉类型进行订单状态更新和申述记录添加 // 根据不同的申诉类型进行订单状态更新和申述记录添加
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(aftersalesAppeal.getWorkOrderId()); workOrderEntity.setId(aftersalesAppeal.getWorkOrderId());
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjie.getValue());
baseMapper.updateById(workOrderEntity); baseMapper.updateById(workOrderEntity);
if ("2".equals(typesOf)) { if ("2".equals(typesOf)) {
@ -2753,10 +2759,24 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}else { }else {
throw new CustomerException("当前登录人无工单操作权限!!!"); throw new CustomerException("当前登录人无工单操作权限!!!");
} }
//进行仓库限制
List<Long> warehouseIds = new ArrayList<>();
if (!Objects.isNull(myCurrentWarehouse)){
warehouseIds.add(myCurrentWarehouse.getId());
}else {
//获取当前人所有仓权限信息
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList();
if (!warehouseList.isEmpty()) {
warehouseIds.addAll(warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()));
}
}
if (warehouseIds.isEmpty()) {
throw new CustomerException("当前登录人无仓库信息,请联系管理人员!!!");
}
AftersalesWorkOrderDTO workOrderDTO = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderDTO.class); AftersalesWorkOrderDTO workOrderDTO = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderDTO.class);
List<AftersalesWorkOrderVO> exportData = baseMapper.getBasicExportData(workOrderDTO,ids); List<AftersalesWorkOrderVO> exportData = baseMapper.getBasicExportData(workOrderDTO,ids,warehouseIds);
return exportData; return exportData;
} }

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -1700,6 +1700,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// Map<String, List<DistributionReservationStockarticleEntity>> allStockArticle = reservationStockarticleEntityList.stream().filter(f -> Func.isNotEmpty(f.getIsZero())).collect(Collectors.groupingBy(DistributionReservationStockarticleEntity::getIsZero)); // Map<String, List<DistributionReservationStockarticleEntity>> allStockArticle = reservationStockarticleEntityList.stream().filter(f -> Func.isNotEmpty(f.getIsZero())).collect(Collectors.groupingBy(DistributionReservationStockarticleEntity::getIsZero));
DistributionDeliverySelfEntity finalDistributionDeliverySelfEntity = distributionDeliverySelfEntity; DistributionDeliverySelfEntity finalDistributionDeliverySelfEntity = distributionDeliverySelfEntity;
List<DistributionParcelListEntity> updatePackageList = new ArrayList<>(); List<DistributionParcelListEntity> updatePackageList = new ArrayList<>();
List<JSONObject> logList = new ArrayList<>();
List<String> orderCodes = new ArrayList<>(); List<String> orderCodes = new ArrayList<>();
for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) { for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) {
switch (reservationStockarticleEntity.getIsZero()) { switch (reservationStockarticleEntity.getIsZero()) {
@ -1781,6 +1782,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
orderCodes.add(parcelListEntity.getOrderCode()); orderCodes.add(parcelListEntity.getOrderCode());
//拼接包条码 //拼接包条码
// orderPackages.append(parcelListEntity.getOrderPackageCode()).append(",") // orderPackages.append(parcelListEntity.getOrderPackageCode()).append(",")
String content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getScanUser() + "一键装车,配送车次号:" + distributionDeliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
logList.add(trunklinePackageTrackLog);
} }
} }
break; break;
@ -1987,6 +1991,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionParcelListMapper.updatePackageListByIds(packageIds); distributionParcelListMapper.updatePackageListByIds(packageIds);
} }
} }
if (!logList.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(logList);
}
return Resp.scanSuccess("操作成功", "装车成功"); return Resp.scanSuccess("操作成功", "装车成功");
} }

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

@ -1715,7 +1715,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//查询是否进行装车或者签收 //查询是否进行装车或者签收
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda() List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()) .eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())
.eq(DistributionLoadscanEntity::getDriverId, distrilbutionloadingscanDTO.getDeliveryId()) // .eq(DistributionLoadscanEntity::getDriverId, distrilbutionloadingscanDTO.getDeliveryId())
.in(DistributionLoadscanEntity::getPackageId, list) .in(DistributionLoadscanEntity::getPackageId, list)
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
); );

4
blade-service/logpm-factory/src/main/java/com/logpm/factory/interceptor/ZbFactoryAccountsInterceptor.java

@ -38,9 +38,7 @@ public class ZbFactoryAccountsInterceptor implements HandlerInterceptor {
String customerId = request.getParameter("customerId"); String customerId = request.getParameter("customerId");
String body = myRequestWrapper.getBody(); String body = myRequestWrapper.getBody();
JSONObject bodyJson = JSONObject.parseObject(body); log.info("body ={}",body);
log.info("bodyJson ={}",bodyJson.toString());
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
params.put("app_key",appKey); params.put("app_key",appKey);
params.put("customerId",customerId); params.put("customerId",customerId);

Loading…
Cancel
Save