获取任务类型列表接口,获取工单列表接口返回值增加处理结果ID字段
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeTaskType; |
| | | import com.dy.pipIrrGlobal.voOp.VoTaskType; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | int updateByPrimaryKeySelective(OpeTaskType record); |
| | | |
| | | int updateByPrimaryKey(OpeTaskType record); |
| | | |
| | | /** |
| | | * 获取任务类型列表 |
| | | * @return |
| | | */ |
| | | List<VoTaskType> getTaskTypes(); |
| | | |
| | | |
| | | } |
| | |
| | | public static final long serialVersionUID = 202411081500001L; |
| | | |
| | | /** |
| | | * 问题结果ID |
| | | * 处理结果ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long proResultId; |
| | |
| | | private Long workOrderId; |
| | | |
| | | /** |
| | | * 巡检员ID |
| | | * 巡检员 |
| | | */ |
| | | private String inspector; |
| | | |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voOp; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-11-28 14:39 |
| | | * @LastEditTime 2024-11-28 14:39 |
| | | * @Description 任务类型视图对象 |
| | | */ |
| | | |
| | | @Data |
| | | @JsonPropertyOrder({"taskTypeId", "taskType"}) |
| | | public class VoTaskType implements BaseEntity { |
| | | public static final long serialVersionUID = 202411281440001L; |
| | | |
| | | /** |
| | | * 任务类型ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long taskTypeId; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | private String taskType; |
| | | } |
| | |
| | | */ |
| | | |
| | | @Data |
| | | @JsonPropertyOrder({"workOrderId", "dispatcherId", "dispatcher", "inspectorId", "inspector", "taskTypeId", "taskType", "taskContent", "completeCriteria", "deadLine", "clientReportId", "inspectorReportId", "completeTime", "dispatchTime", "rejectTimes", "state", "processingState"}) |
| | | @JsonPropertyOrder({"workOrderId", "dispatcherId", "dispatcher", "inspectorId", "inspector", "taskTypeId", "taskType", "taskContent", "completeCriteria", "deadLine", "clientReportId", "inspectorReportId", "completeTime", "dispatchTime", "rejectTimes", "state", "processingState", "proResultId"}) |
| | | public class VoWorkOrder implements BaseEntity { |
| | | public static final long serialVersionUID = 202411061524001L; |
| | | |
| | |
| | | * 处理状态 |
| | | */ |
| | | private String processingState; |
| | | |
| | | /** |
| | | * 处理结果ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long proResultId; |
| | | } |
| | |
| | | deleted = #{deleted,jdbcType=BIGINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--获取任务类型列表--> |
| | | <select id="getTaskTypes" resultType="com.dy.pipIrrGlobal.voOp.VoTaskType"> |
| | | SELECT |
| | | id AS taskTypeId, |
| | | task_type AS taskType |
| | | FROM ope_task_type |
| | | WHERE deleted = 0 |
| | | </select> |
| | | </mapper> |
| | |
| | | WHEN res.state = 2 THEN '已通过' |
| | | WHEN res.state = 3 THEN '已驳回' |
| | | ELSE '未上报' |
| | | END AS processingState |
| | | END AS processingState, |
| | | res.id AS proResultId |
| | | FROM ope_work_order ord |
| | | INNER JOIN ba_user us1 ON us1.id = ord.dispatcher_id |
| | | INNER JOIN ba_user us2 ON us2.id = ord.inspector_id |
| | |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeProcessingResult; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeWorkOrder; |
| | | import com.dy.pipIrrGlobal.voOp.VoProcessingResult; |
| | | import com.dy.pipIrrGlobal.voOp.VoTaskType; |
| | | import com.dy.pipIrrGlobal.voOp.VoWorkOrder; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | /** |
| | | * 获取任务类型列表 |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/getTaskTypes") |
| | | @SsoAop() |
| | | public BaseResponse<List<VoTaskType>> getTaskTypes() { |
| | | try { |
| | | return BaseResponseUtils.buildSuccess(workOrderSv.getTaskTypes()); |
| | | } catch (Exception e) { |
| | | log.error("获取任务类型异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.dy.pipIrrApp.workOrder.qo.QoWorkOrder; |
| | | import com.dy.pipIrrGlobal.daoOp.OpeApproveResultMapper; |
| | | import com.dy.pipIrrGlobal.daoOp.OpeProcessingResultMapper; |
| | | import com.dy.pipIrrGlobal.daoOp.OpeTaskTypeMapper; |
| | | import com.dy.pipIrrGlobal.daoOp.OpeWorkOrderMapper; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeApproveResult; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeProcessingResult; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeWorkOrder; |
| | | import com.dy.pipIrrGlobal.voOp.VoProcessingResult; |
| | | import com.dy.pipIrrGlobal.voOp.VoTaskType; |
| | | import com.dy.pipIrrGlobal.voOp.VoWorkOrder; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | |
| | | |
| | | @Autowired |
| | | private OpeApproveResultMapper opeApproveResultMapper; |
| | | |
| | | @Autowired |
| | | private OpeTaskTypeMapper opeTaskTypeMapper; |
| | | |
| | | /** |
| | | * 添加工单记录 |
| | |
| | | |
| | | return "success"; |
| | | } |
| | | |
| | | /** |
| | | * 获取任务类型列表 |
| | | * @return |
| | | */ |
| | | public List<VoTaskType> getTaskTypes() { |
| | | return opeTaskTypeMapper.getTaskTypes(); |
| | | } |
| | | } |