提交 efea642a authored 作者: 刘海泉's avatar 刘海泉

新增履约进度表相关接口

上级 44036e92
package com.clx.performance.vo.pc;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.math.BigDecimal;
/**
* @ClassName UpdatePerformanceProgressParam
* @Description
* @Author kavin
* @Date 2024/7/16 10:29
* @Version 1.0
*/
@Getter
@Setter
public class PerformanceProgressDetailVO {
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("今日预计完成吨数")
private BigDecimal todayExpectComplete;
@ApiModelProperty("交易要求到站时间")
private String tradeRequireArriveStationTime;
@ApiModelProperty("物流预计到站时间")
private String transportExpectArriveStationTime;
@ApiModelProperty("异常备注")
private String abnormalRemark;
@ApiModelProperty("履约异常原因")
private String performanceAbnormalReason;
@ApiModelProperty("调度备注/跟进措施")
private String dispatchFollow;
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.param.pc.carrier.PagePerformanceProgress;
import com.clx.performance.param.pc.carrier.UpdatePerformanceProgressParam;
import com.clx.performance.service.PerformanceProgressService;
import com.clx.performance.vo.pc.PerformanceProgressDetailVO;
import com.clx.performance.vo.pc.PerformanceProgressOperationLogVO;
import com.clx.performance.vo.pc.PerformanceProgressVO;
import com.msl.common.base.PageData;
......@@ -65,9 +66,9 @@ public class CarrierPerformanceProgressController {
@ApiOperation(value = "编辑履约进度",notes = "<br>By:刘海泉")
@GetMapping("/getPerformanceProgressDetail")
public Result<Object> getPerformanceProgressDetail(@RequestParam("id") @NotNull(message = "id不能为空") Integer id) {
performanceProgressService.getPerformanceProgressDetail(id);
return Result.ok();
public Result<PerformanceProgressDetailVO> getPerformanceProgressDetail(@RequestParam("id") @NotNull(message = "id不能为空") Integer id) {
PerformanceProgressDetailVO vo = performanceProgressService.getPerformanceProgressDetail(id);
return Result.ok(vo);
}
......
package com.clx.performance.dao;
import com.msl.common.dao.BaseDao;
import com.clx.performance.mapper.PerformanceProgressLogMapper;
import com.clx.performance.model.PerformanceProgressLog;
import com.msl.common.dao.BaseDao;
import java.util.List;
/**
* @author kavin
......@@ -10,4 +12,5 @@ import com.clx.performance.model.PerformanceProgressLog;
* Time 16:02
*/
public interface PerformanceProgressLogDao extends BaseDao<PerformanceProgressLogMapper, PerformanceProgressLog, Integer> {
List<PerformanceProgressLog> getOperationLog(String orderNo);
}
package com.clx.performance.dao.impl;
import com.msl.common.dao.impl.BaseDaoImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.clx.performance.dao.PerformanceProgressLogDao;
import com.clx.performance.mapper.PerformanceProgressLogMapper;
import com.clx.performance.model.PerformanceProgressLog;
import com.msl.common.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author kavin
* Date 2024-07-12
......@@ -13,4 +16,11 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public class PerformanceProgressLogDaoImpl extends BaseDaoImpl<PerformanceProgressLogMapper, PerformanceProgressLog, Integer> implements PerformanceProgressLogDao {
@Override
public List<PerformanceProgressLog> getOperationLog(String orderNo) {
LambdaQueryWrapper<PerformanceProgressLog> query = new LambdaQueryWrapper<>();
query.eq(PerformanceProgressLog :: getOrderNo,orderNo);
query.orderByDesc(PerformanceProgressLog :: getId);
return baseMapper.selectList(query);
}
}
......@@ -27,6 +27,10 @@ public class PerformanceProgressLog implements HasKey<Integer> {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@TableField("order_no")
@ApiModelProperty("订单编号")
private String orderNo;
@TableField("operate_type")
@ApiModelProperty("操作类型")
private Integer operateType;
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.model.PerformanceProgress;
import com.clx.performance.param.pc.carrier.PagePerformanceProgress;
import com.clx.performance.param.pc.carrier.UpdatePerformanceProgressParam;
import com.clx.performance.vo.pc.PerformanceProgressDetailVO;
import com.clx.performance.vo.pc.PerformanceProgressOperationLogVO;
import com.clx.performance.vo.pc.PerformanceProgressVO;
......@@ -24,7 +25,7 @@ public interface PerformanceProgressService {
void updatePerformanceProgress(UpdatePerformanceProgressParam param, Long userNo, String userName);
void getPerformanceProgressDetail(Integer id);
PerformanceProgressDetailVO getPerformanceProgressDetail(Integer id);
List<PerformanceProgressOperationLogVO> getOperationLog(String orderNo);
}
......@@ -3,14 +3,18 @@ package com.clx.performance.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.performance.dao.PerformanceProgressDao;
import com.clx.performance.dao.PerformanceProgressLogDao;
import com.clx.performance.enums.OrderEnum;
import com.clx.performance.enums.PerformanceProgressEnum;
import com.clx.performance.enums.ResultEnum;
import com.clx.performance.model.PerformanceProgress;
import com.clx.performance.model.PerformanceProgressLog;
import com.clx.performance.param.pc.carrier.PagePerformanceProgress;
import com.clx.performance.param.pc.carrier.UpdatePerformanceProgressParam;
import com.clx.performance.service.PerformanceProgressService;
import com.clx.performance.struct.PerformanceProgressLogStruct;
import com.clx.performance.struct.PerformanceProgressStruct;
import com.clx.performance.vo.pc.PerformanceProgressDetailVO;
import com.clx.performance.vo.pc.PerformanceProgressOperationLogVO;
import com.clx.performance.vo.pc.PerformanceProgressVO;
import com.msl.common.base.Optional;
......@@ -37,6 +41,8 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
private final PerformanceProgressDao performanceProgressDao;
private final PerformanceProgressStruct performanceProgressStruct;
private final PerformanceProgressLogDao performanceProgressLogDao;
private final PerformanceProgressLogStruct performanceProgressLogStruct;
public static List<Integer> inProcessStatusList;
......@@ -155,12 +161,14 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
}
@Override
public void getPerformanceProgressDetail(Integer id) {
public PerformanceProgressDetailVO getPerformanceProgressDetail(Integer id) {
PerformanceProgress item = performanceProgressDao.getEntityByKey(id).orElseThrow(ResultEnum.DATA_NOT_FIND);
return performanceProgressStruct.convert(item);
}
@Override
public List<PerformanceProgressOperationLogVO> getOperationLog(String orderNo) {
return null;
List<PerformanceProgressLog> list = performanceProgressLogDao.getOperationLog(orderNo);
return performanceProgressLogStruct.convertList(list);
}
}
package com.clx.performance.struct;
import com.clx.performance.model.PerformanceProgressLog;
import com.clx.performance.vo.pc.PerformanceProgressOperationLogVO;
import com.msl.common.utils.DateStructUtil;
import com.msl.common.utils.DateUtils;
import org.mapstruct.Mapper;
import java.util.List;
@Mapper(componentModel = "spring", uses = DateStructUtil.class, imports = {DateUtils.class})
public interface PerformanceProgressLogStruct {
List<PerformanceProgressOperationLogVO> convertList(List<PerformanceProgressLog> list);
}
package com.clx.performance.struct;
import com.clx.performance.model.PerformanceProgress;
import com.clx.performance.vo.pc.PerformanceProgressDetailVO;
import com.clx.performance.vo.pc.PerformanceProgressVO;
import com.msl.common.utils.DateStructUtil;
import com.msl.common.utils.DateUtils;
......@@ -11,4 +12,6 @@ import java.util.List;
@Mapper(componentModel = "spring", uses = DateStructUtil.class, imports = {DateUtils.class})
public interface PerformanceProgressStruct {
List<PerformanceProgressVO> convertList(List<PerformanceProgress> records);
PerformanceProgressDetailVO convert(PerformanceProgress item);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论