Browse Source

到车管理导出、工单BUG修复、工单增加创建人字段、工单导出BUG修复

visual
汤建军 5 months ago
parent
commit
8bd82036a9
  1. 6
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java
  2. 7
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java
  3. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  4. 13
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java
  5. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  6. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java
  7. 39
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  8. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java
  9. 125
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  10. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  11. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

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

@ -284,6 +284,12 @@ public class AftersalesWorkOrderEntity extends TenantEntity {
@ApiModelProperty(value = "标识 1订单 2 零担 3库存品 ")
@TableField(exist = false)
private String packageCode;
/**
* 提交人
*/
@ApiModelProperty(value = "提交人 ")
private String ceator;
/**
* 处理仓库ID
*/

7
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java

@ -263,5 +263,12 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ExcelProperty("赔付方式")
private String compensationMethods;
/**
* 钉钉流程号
*/
@ColumnWidth(20)
@ExcelProperty("创建人")
private String ceator;
}

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

@ -56,6 +56,7 @@
SELECT DISTINCT
lawo.id,
lawo.ceator,
lawo.work_order_type,
lawo.discovery_node,
lawo.work_order_number,
@ -115,7 +116,7 @@
AND b.is_deleted = 0
GROUP BY
a.id) AS t ON t.id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0
<where>
lawo.is_deleted = 0
<if test="param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' ">and lawo.work_order_status = #{param.workOrderStatusNameS } </if>
@ -185,6 +186,7 @@
SELECT DISTINCT
lawo.id,
lawo.ceator,
CASE
lawo.work_order_type
WHEN 1 THEN
@ -288,7 +290,7 @@
AND b.is_deleted = 0
GROUP BY
a.id) AS t ON t.id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0
<where>
lawo.is_deleted = 0
<if test="param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' ">and lawo.work_order_status = #{param.workOrderStatusNameS } </if>

13
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java

@ -55,6 +55,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* 异常工单处理结果 服务实现类
@ -104,10 +105,22 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
throw new ServiceException("未选择仓库");
}
if(ObjectUtil.isNull(aftersalesProcessingResults.getId())){
//查询此工单之前是否存在有处理结果 如果有则全部进行删除
List<AftersalesProcessingResultsEntity> list = this.list(Wrappers.<AftersalesProcessingResultsEntity>query().lambda()
.eq(AftersalesProcessingResultsEntity::getWorkOrderId, aftersalesProcessingResults.getWorkOrderId())
);
if (!list.isEmpty()) {
List<Long> collect = list.stream().map(AftersalesProcessingResultsEntity::getId).collect(Collectors.toList());
//删除处理结果和处理结果详情
aftersalesProcessingMoneyService.remove(Wrappers.<AftersalesProcessingMoneyEntity>update().lambda().in(AftersalesProcessingMoneyEntity::getProcessingResultsId,collect));
//移除处理结果
this.removeBatchByIds(collect);
}
aftersalesProcessingResults.setCreateUser(AuthUtil.getUserId());
aftersalesProcessingResults.setCreateDept(myCurrentWarehouse.getDepartment());
aftersalesProcessingResults.setCreateTime(new Date());
aftersalesProcessingResults.setStatus(1);
aftersalesProcessingResults.setWarehouseId(myCurrentWarehouse.getId());
aftersalesProcessingResults.setIsDeleted(0);
//添加
baseMapper.insert(aftersalesProcessingResults);

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

@ -343,6 +343,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.setWorkOrderNumber(getWorkOrderNumber(myCurrentWarehouse.getWarehouseCode(), aftersalesWorkOrder.getWorkOrderType()));
}
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
aftersalesWorkOrder.setCeator(user.getNickName());
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue());
if (ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())) {
aftersalesWorkOrder.getProcessorEntityList().stream().collect(Collectors.groupingBy(AftersalesProcessorEntity::getTypesOf))

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java

@ -469,4 +469,13 @@ public class DistributionDeliveryAppController {
return distributionStockArticleService.getdeliveryInfo(type,code);
}
/**
* 扫描查询配送任务下的包件信息
*/
@GetMapping("/orderCodeWarehouseDetail")
@ApiOperationSupport(order = 11)
public R orderCodeWarehouseDetail(@RequestParam String orderCode ) {
return distributionStockArticleService.getOrderWarehouseDetail(orderCode);
}
}

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

@ -2829,9 +2829,6 @@ public class CarsLoadController {
String method = "############loadCarsPageList: ";
log.info(method+"请求参数{}",loadCarsDTO);
try{
Enumeration<String> headerNames = request.getHeaderNames();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<Long> warehouseIds = new ArrayList<>();
@ -2856,4 +2853,40 @@ public class CarsLoadController {
}
@ResponseBody
@PostMapping("/exportCarsPageList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "到车管理分页列表", notes = "传入loadCarsDTO")
public void exportCarsPageList(@RequestBody LoadCarsDTO loadCarsDTO, HttpServletResponse response) {
String method = "############arriveCarsPageList: ";
log.info(method+"请求参数{}",loadCarsDTO);
try{
//当前登录人选择的仓库
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<Long> warehouseIds = new ArrayList<>();
if(!Objects.isNull(myCurrentWarehouse)){
Long warehouseId = myCurrentWarehouse.getId();
warehouseIds.add(warehouseId);
}else{
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> {
warehouseIds.add(warehouseEntity.getId());
});
}
loadCarsDTO.setWarehouseIds(warehouseIds);
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
List<TrunklineCarsLoadExcel> list = carsLoadService.exportCarsPageList(loadCarsDTO);
ExcelUtil.export(response, "到达车辆数据" + DateUtil.time(), "到达车辆数据", list, TrunklineCarsLoadExcel.class);
}catch (CustomerException e){
log.error(e.message,e);
}catch (Exception e){
log.error(method+"系统异常",e);
}
}
}

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java

@ -57,5 +57,12 @@ public interface TrunklineCarsLoadMapper extends BaseMapper<TrunklineCarsLoadEnt
* @return
*/
List<TrunklineCarsLoadExcel> exportLoadCarsList(@Param("param") LoadCarsDTO loadCarsDTO,@Param("idList")List<Long> idList);
/**
* 到车数据查询
* @param loadCarsDTO
* @return
*/
List<TrunklineCarsLoadExcel> exportCarsPageList(@Param("param")LoadCarsDTO loadCarsDTO);
}

125
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -990,6 +990,131 @@
ltcl.count_transport_cost
order by ltcl.create_time desc
</select>
<select id="exportCarsPageList" resultType="com.logpm.trunkline.excel.TrunklineCarsLoadExcel">
select ltcl.id id,
ltcl.cars_no carsNo,
ltcl.plan_loading_number planLoadingNumber,
ltcl.real_loading_number realLoadingNumber,
ltcl.stock_number stockCarsNum,
ltcl.unload_number unloadNumber,
ltcl.full_load_rate fullLoadRate,
ltcl.is_customer isCustomer,
CASE ltcl.load_status
WHEN '0' THEN '未发车'
WHEN '10' THEN '已发车'
WHEN '20' THEN '网点到车'
WHEN '30' THEN '网点发车'
WHEN '40' THEN '终点到车'
WHEN '80' THEN '已卸车'
WHEN '90' THEN '已签收'
WHEN '100' THEN '取消配载'
ELSE
'未知状态'
END loadStatusName,
ltcl.loading_type loadingType,
ltcl.driver_name driverName,
ltcl.driver_mobile driverMobile,
ltcl.car_number carNumber,
ltcl.start_warehouse_name startWarehouseName,
ltcl.end_warehouse_names endWarehouseNames,
ltcl.arrive_time arriveTime,
ltcl.start_time startTime,
ltcl.create_user_name createUserName,
ltcl.operator operator,
ltcl.create_time createTime,
ltcl.now_warehouse_id nowWarehouseId,
sum(ltcll.now_transport_cost) nowTransportCost,
sum(ltcll.oil_cost) oilCost,
sum(ltcll.back_transport_cost) backTransportCost,
sum(ltcll.reach_transport_cost) reachTransportCost,
sum(ltcll.whole_car_info_cost) wholeCarInfoCost,
sum(ltcll.whole_car_insurance_cost) wholeCarInsuranceCost,
sum(ltcll.whole_car_ground_cost) wholeCarGroundCost,
sum(ltcll.hair_whole_cost) hairWholeCost,
sum(ltcll.hair_whole_other_cost) hairWholeOtherCost,
sum(ltcll.unload_cost) unloadCost,
sum(ltcll.unload_other_cost) unloadOtherCost,
sum(ltcll.fuel) fuel,
sum(ltcll.toll_fee) tollFee
from logpm_trunkline_cars_load ltcl
left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcl.id
where ltcl.is_deleted = 0
and ltcl.load_status != '100'
and ltcl.load_type != '4'
<if test="param.warehouseId != null" >
and ltcl.end_warehouse_ids like concat('%',#{param.warehouseId},'%')
</if>
<if test="param.warehouseName != null and param.warehouseName != ''">
and (Locate(#{param.warehouseName},ltcl.start_warehouse_name) > 0 or Locate(#{param.warehouseName},ltcl.end_warehouse_names) > 0)
</if>
<if test="param.loadCarsNo != null and param.loadCarsNo != ''">
and Locate(#{param.loadCarsNo},ltcl.cars_no) > 0
</if>
<if test="param.createTimeStart != null ">
and ltcl.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null ">
and ltcl.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.startTime != null ">
and ltcl.start_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and ltcl.start_time &lt;= #{param.endTime}
</if>
<if test="param.arriveTimeStart != null ">
and ltcl.arrive_time &gt;= #{param.arriveTimeStart}
</if>
<if test="param.arriveTimeEnd != null ">
and ltcl.arrive_time &lt;= #{param.arriveTimeEnd}
</if>
<if test="param.driverName != null and param.driverName != ''">
and ltcl.driver_name like CONCAT('%',#{param.driverName},'%')
</if>
<if test="param.driverMobile != null and param.driverMobile != ''">
and ltcl.driver_mobile like CONCAT('%',#{param.driverMobile},'%')
</if>
<if test="param.carNumber != null and param.carNumber != ''">
and ltcl.car_number like CONCAT('%',#{param.carNumber},'%')
</if>
<if test="param.startWarehouseName != null and param.startWarehouseName != ''">
and ltcl.start_warehouse_name like CONCAT('%',#{param.startWarehouseName},'%')
</if>
<if test="param.endWarehouseNames != null and param.endWarehouseNames != ''">
and ltcl.end_warehouse_names like CONCAT('%',#{param.endWarehouseNames},'%')
</if>
<if test="param.createUserName != null and param.createUserName != ''">
and ltcl.create_user_name like CONCAT('%',#{param.createUserName},'%')
</if>
<if test="param.operator != null and param.operator != ''">
and ltcl.operator like CONCAT('%',#{param.operator},'%')
</if>
<if test="param.arriveTime != null ">
AND DATE_FORMAT(ltcl.arrive_time,'%y%d%m') = DATE_FORMAT(#{param.arriveTime},'%y%d%m')
</if>
<if test="param.startTime != null ">
AND DATE_FORMAT(ltcl.start_time,'%y%d%m') = DATE_FORMAT(#{param.startTime},'%y%d%m')
</if>
<if test="param.createTime != null ">
AND DATE_FORMAT(ltcl.create_time,'%y%d%m') = DATE_FORMAT(#{param.createTime},'%y%d%m')
</if>
group by ltcl.id,ltcl.cars_no,
ltcl.plan_loading_number,
ltcl.real_loading_number,
ltcl.unload_number,
ltcl.full_load_rate,
ltcl.is_customer,
ltcl.load_status,
ltcl.loading_type,
ltcl.driver_name,
ltcl.driver_mobile,
ltcl.car_number,
ltcl.start_warehouse_name,
ltcl.end_warehouse_names,
ltcl.arrive_time,
ltcl.start_time
order by ltcl.create_time desc
</select>
</mapper>

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -261,4 +261,11 @@ public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoad
* @return
*/
List<TrunklineCarsLoadExcel> exportLoadCarsPageList(LoadCarsDTO loadCarsDTO);
/**
* 到车导出
* @param loadCarsDTO
* @return
*/
List<TrunklineCarsLoadExcel> exportCarsPageList(LoadCarsDTO loadCarsDTO);
}

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

@ -10416,6 +10416,21 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return pageList;
}
@Override
public List<TrunklineCarsLoadExcel> exportCarsPageList(LoadCarsDTO loadCarsDTO) {
loadCarsDTO.setCreateTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getCreateTimeStartStr()));
loadCarsDTO.setCreateTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getCreateTimeEndStr()));
loadCarsDTO.setStartTime(CommonUtil.getStartByDateStr(loadCarsDTO.getStartDate()));
loadCarsDTO.setEndTime(CommonUtil.getEndByDateStr(loadCarsDTO.getEndDate()));
loadCarsDTO.setArriveTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getArriveTimeStartStr()));
loadCarsDTO.setArriveTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getArriveTimeEndStr()));
List<TrunklineCarsLoadExcel> pageList = baseMapper.exportCarsPageList(loadCarsDTO);
return pageList;
}
@Override
public R unloadZero(Long carsLoadScanId,Long loadId, String waybillNo, Integer enterNun, Long warehouseId, Integer unbindTray, String trayCode, String orderCode, String remark,String unloadTrayName,String unloadTrayCode,List<ZeroPackageDTO> zeroPackageList) {

Loading…
Cancel
Save