代码合并终
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.njcn.process.constant;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.njcn.device.pq.pojo.po.DataV;
|
||||
import org.springframework.cglib.beans.BeanMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/7 15:18【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
|
||||
Map<String, Object> map = Maps.newHashMap ( );
|
||||
DataV d = new DataV ( );
|
||||
BeanMap beanMap = BeanMap.create (d);
|
||||
for (Object key : beanMap.keySet ( )) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:17【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 台区测点问题表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_stat_distribution_problem")
|
||||
public class RStatDistributionProblemPO {
|
||||
/**
|
||||
* 问题编号(有生成规则,看文档)
|
||||
*/
|
||||
@MppMultiId(value = "problem_no")
|
||||
private String problemNo;
|
||||
|
||||
@TableField(value = "org_no")
|
||||
private String orgNo;
|
||||
|
||||
/**
|
||||
* 问题类型(字典,两种类型:谐波电压越限、谐波电流越限)
|
||||
*/
|
||||
@TableField(value = "problem_type")
|
||||
private String problemType;
|
||||
|
||||
/**
|
||||
* 问题发生时间
|
||||
*/
|
||||
@TableField(value = "occur_time")
|
||||
private Date occurTime;
|
||||
|
||||
/**
|
||||
* 台区ID
|
||||
*/
|
||||
@TableField(value = "distribution_id")
|
||||
private String distributionId;
|
||||
|
||||
/**
|
||||
* 最新超标时间(超标连续大于4小时)
|
||||
*/
|
||||
@TableField(value = "last_time")
|
||||
private Date lastTime;
|
||||
|
||||
/**
|
||||
* 审核状态(字典,两种类型:待审核/已审核)
|
||||
*/
|
||||
@TableField(value = "check_status")
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
* 审核处理(字典,三种情况:“-”“生成工单”“无需处理”,待审核状态的审核结果为“-”,另外两种根据审核弹窗选择结果显示.这边字典存两个生成工单、无需处理,为空是替换成“-”)
|
||||
*/
|
||||
@TableField(value = "check_result")
|
||||
private String checkResult;
|
||||
|
||||
/**
|
||||
* 问题处理时间
|
||||
*/
|
||||
@TableField(value = "handle_time")
|
||||
private Date handleTime;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@TableField(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 问题描述
|
||||
*/
|
||||
@TableField(value = "problem_describe")
|
||||
private String problemDescribe;
|
||||
|
||||
/**
|
||||
* 补充描述
|
||||
*/
|
||||
@TableField(value = "supply_describe")
|
||||
private String supplyDescribe;
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:13【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 工单详情表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_stat_work_order_detail")
|
||||
public class RStatWorkOrderDetailPO {
|
||||
/**
|
||||
* 问题编号(台区测点问题表的problem_no)
|
||||
*/
|
||||
@MppMultiId(value = "problem_no")
|
||||
private String problemNo;
|
||||
@TableField(value = "org_no")
|
||||
private String orgNo;
|
||||
/**
|
||||
* 工单状态(字典,待派单、已派单、已关闭)
|
||||
*/
|
||||
@TableField(value = "work_order_status")
|
||||
private String workOrderStatus;
|
||||
|
||||
/**
|
||||
* 工单类型(字典,目前一个,整改单)
|
||||
*/
|
||||
@TableField(value = "work_order_type")
|
||||
private String workOrderType;
|
||||
|
||||
/**
|
||||
* 一级业务类型(字典,目前一个,运检业务)
|
||||
*/
|
||||
@TableField(value = "primary_business_type")
|
||||
private String primaryBusinessType;
|
||||
|
||||
/**
|
||||
* 二级业务类型(字典,两种类型:谐波电压越限、谐波电流越限)
|
||||
*/
|
||||
@TableField(value = "two_business_type")
|
||||
private String twoBusinessType;
|
||||
|
||||
/**
|
||||
* 供电所
|
||||
*/
|
||||
@TableField(value = "power_supply_station")
|
||||
private String powerSupplyStation;
|
||||
|
||||
/**
|
||||
* 工单流程(字典,生成工单、派单、反馈、审核、整改、评估、归档,默认生成工单)
|
||||
*/
|
||||
@TableField(value = "work_order_process")
|
||||
private String workOrderProcess;
|
||||
|
||||
/**
|
||||
* 维护班组
|
||||
*/
|
||||
@TableField(value = "whbz")
|
||||
private String whbz;
|
||||
|
||||
/**
|
||||
* 工单负责人
|
||||
*/
|
||||
@TableField(value = "work_order_leader")
|
||||
private String workOrderLeader;
|
||||
|
||||
/**
|
||||
* 工单完成时间
|
||||
*/
|
||||
@TableField(value = "work_order_over_time")
|
||||
private Date workOrderOverTime;
|
||||
|
||||
/**
|
||||
* 要求反馈时间
|
||||
*/
|
||||
@TableField(value = "expect_ask_feedback_time")
|
||||
private Date expectAskFeedbackTime;
|
||||
|
||||
/**
|
||||
* 接单人ID
|
||||
*/
|
||||
@TableField(value = "pick_up_person")
|
||||
private String pickUpPerson;
|
||||
|
||||
/**
|
||||
* 下发时间
|
||||
*/
|
||||
@TableField(value = "distribution_time")
|
||||
private Date distributionTime;
|
||||
|
||||
/**
|
||||
* 预期到期时间
|
||||
*/
|
||||
@TableField(value = "expiration_time")
|
||||
private Date expirationTime;
|
||||
|
||||
/**
|
||||
* 关联设备主人
|
||||
*/
|
||||
@TableField(value = "relation_device")
|
||||
private String relationDevice;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@TableField(value = "enclosure")
|
||||
private String enclosure;
|
||||
|
||||
/**
|
||||
* 抄送
|
||||
*/
|
||||
@TableField(value = "copy_for")
|
||||
private String copyFor;
|
||||
|
||||
/**
|
||||
* 反馈时间
|
||||
*/
|
||||
@TableField(value = "ask_feedback_time")
|
||||
private Date askFeedbackTime;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
@TableField(value = "planned_completion_time")
|
||||
private Date plannedCompletionTime;
|
||||
|
||||
/**
|
||||
* 原因反馈
|
||||
*/
|
||||
@TableField(value = "cause_feedback")
|
||||
private String causeFeedback;
|
||||
|
||||
/**
|
||||
* 审核状态(字典,两种类型:审核通过/审核不通过)
|
||||
*/
|
||||
@TableField(value = "check_status")
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
* 审核意见(审核通过可为空,审核不通过时必填)
|
||||
*/
|
||||
@TableField(value = "check_comments")
|
||||
private String checkComments;
|
||||
|
||||
/**
|
||||
* 计划完成时间
|
||||
*/
|
||||
@TableField(value = "rectify_complete_time")
|
||||
private Date rectifyCompleteTime;
|
||||
|
||||
/**
|
||||
* 整改人ID
|
||||
*/
|
||||
@TableField(value = "rectify_person")
|
||||
private String rectifyPerson;
|
||||
|
||||
/**
|
||||
* 整改描述
|
||||
*/
|
||||
@TableField(value = "rectify_describe")
|
||||
private String rectifyDescribe;
|
||||
|
||||
/**
|
||||
* 评估完成时间
|
||||
*/
|
||||
@TableField(value = "assess_complete_time")
|
||||
private Date assessCompleteTime;
|
||||
|
||||
/**
|
||||
* 评估结果(字典,评估合格、评估不合格)
|
||||
*/
|
||||
@TableField(value = "assess_result")
|
||||
private String assessResult;
|
||||
|
||||
/**
|
||||
* 评估描述
|
||||
*/
|
||||
@TableField(value = "assess_describe")
|
||||
private String assessDescribe;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 工单统计类
|
||||
* @Param:
|
||||
* @return:
|
||||
* @Author: clam
|
||||
* @Date: 2023/1/5
|
||||
*/
|
||||
@Data
|
||||
public class OrderCountVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8022287041427540079L;
|
||||
|
||||
@ApiModelProperty("单位id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("工单数量")
|
||||
private Integer orderCount;
|
||||
|
||||
@ApiModelProperty("已完成工单数量")
|
||||
private Integer compelteOrderCount;
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>pqs-process</artifactId>
|
||||
<groupId>com.njcn</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>技术监督管理</name>
|
||||
<artifactId>process-api</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-db</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-microservice</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-poi</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.jeffreyning</groupId>
|
||||
<artifactId>mybatisplus-plus</artifactId>
|
||||
<version>1.5.1-RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.process.pojo.vo.IssueesAndOrderVO;
|
||||
import com.njcn.process.pojo.vo.OrderCountVO;
|
||||
import com.njcn.process.service.RStatDistributionProblemService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 16:33【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/rStatWorkOrder")
|
||||
@Api(tags = "工单管理")
|
||||
@AllArgsConstructor
|
||||
public class RStatWorkOrderController extends BaseController {
|
||||
|
||||
private final RStatDistributionProblemService rStatDistributionProblemService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DELETE)
|
||||
@PostMapping("/queryIssuesAndOrder")
|
||||
@ApiOperation("查询问题及工单(当前部门下)")
|
||||
@ApiImplicitParam(name = "orgNo", value = "部门id", required = true)
|
||||
public HttpResult<IssueesAndOrderVO> queryIssuesAndOrder(@RequestParam("orgNo") String orgNo){
|
||||
String methodDescribe = getMethodDescribe("queryIssuesAndOrder");
|
||||
IssueesAndOrderVO issueesAndOrderVO =rStatDistributionProblemService.queryIssuesAndOrder(orgNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, issueesAndOrderVO, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DELETE)
|
||||
@PostMapping("/queryOrderDetail")
|
||||
@ApiOperation("查询工单及工单总数及完成工单数量(当前部门下)")
|
||||
@ApiImplicitParam(name = "orgNo", value = "部门id", required = true)
|
||||
public HttpResult<OrderCountVO> queryOrderDetail(@RequestParam("orgNo") String orgNo){
|
||||
String methodDescribe = getMethodDescribe("queryOrderDetail");
|
||||
OrderCountVO orderCountVO =rStatDistributionProblemService.queryOrderCount(orgNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, orderCountVO, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.process.pojo.po.RStatDistributionProblemPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:17【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatDistributionProblemMapper extends MppBaseMapper<RStatDistributionProblemPO> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:13【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatWorkOrderDetailMapper extends MppBaseMapper<RStatWorkOrderDetailPO> {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RStatDistributionProblemMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.RStatDistributionProblemPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_distribution_problem-->
|
||||
<id column="problem_no" jdbcType="VARCHAR" property="problemNo" />
|
||||
<result column="problem_type" jdbcType="VARCHAR" property="problemType" />
|
||||
<result column="occur_time" jdbcType="TIMESTAMP" property="occurTime" />
|
||||
<result column="distribution_id" jdbcType="VARCHAR" property="distributionId" />
|
||||
<result column="last_time" jdbcType="TIMESTAMP" property="lastTime" />
|
||||
<result column="check_status" jdbcType="VARCHAR" property="checkStatus" />
|
||||
<result column="check_result" jdbcType="VARCHAR" property="checkResult" />
|
||||
<result column="handle_time" jdbcType="TIMESTAMP" property="handleTime" />
|
||||
<result column="measurement_point_id" jdbcType="VARCHAR" property="measurementPointId" />
|
||||
<result column="problem_describe" jdbcType="VARCHAR" property="problemDescribe" />
|
||||
<result column="supply_describe" jdbcType="VARCHAR" property="supplyDescribe" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
problem_no, problem_type, occur_time, distribution_id, last_time, check_status, check_result,
|
||||
handle_time, measurement_point_id, problem_describe, supply_describe
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RStatWorkOrderDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.RStatWorkOrderDetailPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_work_order_detail-->
|
||||
<id column="problem_no" jdbcType="VARCHAR" property="problemNo" />
|
||||
<result column="work_order_status" jdbcType="VARCHAR" property="workOrderStatus" />
|
||||
<result column="work_order_type" jdbcType="VARCHAR" property="workOrderType" />
|
||||
<result column="primary_business_type" jdbcType="VARCHAR" property="primaryBusinessType" />
|
||||
<result column="two_business_type" jdbcType="VARCHAR" property="twoBusinessType" />
|
||||
<result column="power_supply_station" jdbcType="VARCHAR" property="powerSupplyStation" />
|
||||
<result column="work_order_process" jdbcType="VARCHAR" property="workOrderProcess" />
|
||||
<result column="whbz" jdbcType="VARCHAR" property="whbz" />
|
||||
<result column="work_order_leader" jdbcType="VARCHAR" property="workOrderLeader" />
|
||||
<result column="work_order_over_time" jdbcType="TIMESTAMP" property="workOrderOverTime" />
|
||||
<result column="expect_ask_feedback_time" jdbcType="TIMESTAMP" property="expectAskFeedbackTime" />
|
||||
<result column="pick_up_person" jdbcType="VARCHAR" property="pickUpPerson" />
|
||||
<result column="distribution_time" jdbcType="TIMESTAMP" property="distributionTime" />
|
||||
<result column="expiration_time" jdbcType="TIMESTAMP" property="expirationTime" />
|
||||
<result column="relation_device" jdbcType="VARCHAR" property="relationDevice" />
|
||||
<result column="enclosure" jdbcType="VARCHAR" property="enclosure" />
|
||||
<result column="copy_for" jdbcType="VARCHAR" property="copyFor" />
|
||||
<result column="ask_feedback_time" jdbcType="TIMESTAMP" property="askFeedbackTime" />
|
||||
<result column="planned_completion_time" jdbcType="TIMESTAMP" property="plannedCompletionTime" />
|
||||
<result column="cause_feedback" jdbcType="VARCHAR" property="causeFeedback" />
|
||||
<result column="check_status" jdbcType="VARCHAR" property="checkStatus" />
|
||||
<result column="check_comments" jdbcType="VARCHAR" property="checkComments" />
|
||||
<result column="rectify_complete_time" jdbcType="TIMESTAMP" property="rectifyCompleteTime" />
|
||||
<result column="rectify_person" jdbcType="VARCHAR" property="rectifyPerson" />
|
||||
<result column="rectify_describe" jdbcType="VARCHAR" property="rectifyDescribe" />
|
||||
<result column="assess_complete_time" jdbcType="TIMESTAMP" property="assessCompleteTime" />
|
||||
<result column="assess_result" jdbcType="VARCHAR" property="assessResult" />
|
||||
<result column="assess_describe" jdbcType="VARCHAR" property="assessDescribe" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
problem_no, work_order_status, work_order_type, primary_business_type, two_business_type,
|
||||
power_supply_station, work_order_process, whbz, work_order_leader, work_order_over_time,
|
||||
expect_ask_feedback_time, pick_up_person, distribution_time, expiration_time, relation_device,
|
||||
enclosure, copy_for, ask_feedback_time, planned_completion_time, cause_feedback,
|
||||
check_status, check_comments, rectify_complete_time, rectify_person, rectify_describe,
|
||||
assess_complete_time, assess_result, assess_describe
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.process.pojo.po.RStatDistributionProblemPO;
|
||||
import com.njcn.process.pojo.vo.IssueesAndOrderVO;
|
||||
import com.njcn.process.pojo.vo.OrderCountVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:17【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatDistributionProblemService extends IMppService<RStatDistributionProblemPO> {
|
||||
|
||||
/**
|
||||
* @Description: 查询问题及工单(当前部门下)
|
||||
* @Param: [orgNo]
|
||||
* @return: com.njcn.process.pojo.vo.IssueesAndOrderVO
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/2
|
||||
*/
|
||||
IssueesAndOrderVO queryIssuesAndOrder(String orgNo);
|
||||
/**
|
||||
* @Description: 查询工单及工单总数及完成工单数量(当前部门下)
|
||||
* @Param: [orgNo]
|
||||
* @return: com.njcn.process.pojo.vo.OrderCountVO
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/2
|
||||
*/
|
||||
OrderCountVO queryOrderCount(String orgNo);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:13【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatWorkOrderDetailService extends IMppService<RStatWorkOrderDetailPO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.process.mapper.RStatDistributionProblemMapper;
|
||||
import com.njcn.process.mapper.RStatWorkOrderDetailMapper;
|
||||
import com.njcn.process.pojo.po.RStatDistributionProblemPO;
|
||||
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||
import com.njcn.process.pojo.vo.IssueesAndOrderVO;
|
||||
import com.njcn.process.pojo.vo.OrderCountVO;
|
||||
import com.njcn.process.service.RStatDistributionProblemService;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:17【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class RStatDistributionProblemServiceImpl extends MppServiceImpl<RStatDistributionProblemMapper, RStatDistributionProblemPO> implements RStatDistributionProblemService{
|
||||
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
|
||||
private final RStatDistributionProblemMapper rStatDistributionProblemMapper;
|
||||
|
||||
private final RStatWorkOrderDetailMapper rStatWorkOrderDetailMapper;
|
||||
|
||||
/**
|
||||
* @param orgNo
|
||||
* @Description: 查询问题及工单(当前部门下)
|
||||
* @Param: [orgNo]
|
||||
* @return: com.njcn.process.pojo.vo.IssueesAndOrderVO
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/2
|
||||
*/
|
||||
@Override
|
||||
public IssueesAndOrderVO queryIssuesAndOrder(String orgNo) {
|
||||
IssueesAndOrderVO issueesAndOrderVO = new IssueesAndOrderVO();
|
||||
|
||||
List<String> deptIds = deptFeignClient.getDepSonIdtByDeptId(orgNo).getData();
|
||||
/*问题个数*/
|
||||
QueryWrapper<RStatDistributionProblemPO> problemPOQueryWrapper = new QueryWrapper<> ();
|
||||
problemPOQueryWrapper.select ("problem_no").
|
||||
in ("org_no",deptIds);
|
||||
List<RStatDistributionProblemPO> rStatDistributionProblemPOS = rStatDistributionProblemMapper.selectList (problemPOQueryWrapper);
|
||||
issueesAndOrderVO.setId (orgNo);
|
||||
issueesAndOrderVO.setIssueesCount (rStatDistributionProblemPOS.size ());
|
||||
List<String> problemNoList = rStatDistributionProblemPOS.stream ( ).map (RStatDistributionProblemPO::getProblemNo).collect (Collectors.toList ( ));
|
||||
/*已关联工单数量*/
|
||||
QueryWrapper<RStatWorkOrderDetailPO> workOrderDetailPOQueryWrapper = new QueryWrapper<> ();
|
||||
workOrderDetailPOQueryWrapper.select ("1").
|
||||
in("problem_no",problemNoList).
|
||||
in ("org_no",deptIds);
|
||||
Integer relatedOrderCount = rStatWorkOrderDetailMapper.selectCount (workOrderDetailPOQueryWrapper);
|
||||
issueesAndOrderVO.setRelatedOrderCount (relatedOrderCount);
|
||||
return issueesAndOrderVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param orgNo
|
||||
* @Description: 查询工单及工单总数及完成工单数量(当前部门下)
|
||||
* @Param: [orgNo]
|
||||
* @return: com.njcn.process.pojo.vo.OrderCountVO
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/2
|
||||
*/
|
||||
@Override
|
||||
public OrderCountVO queryOrderCount(String orgNo) {
|
||||
OrderCountVO orderCountVO = new OrderCountVO();
|
||||
List<String> deptIds = deptFeignClient.getDepSonIdtByDeptId(orgNo).getData();
|
||||
/*工单数量*/
|
||||
QueryWrapper<RStatWorkOrderDetailPO> workOrderDetailPOQueryWrapper = new QueryWrapper<> ();
|
||||
workOrderDetailPOQueryWrapper.
|
||||
in ("org_no",deptIds);
|
||||
List<RStatWorkOrderDetailPO> rStatWorkOrderDetailPOS = rStatWorkOrderDetailMapper.selectList (workOrderDetailPOQueryWrapper);
|
||||
orderCountVO.setId (orgNo);
|
||||
orderCountVO.setOrderCount (rStatWorkOrderDetailPOS.size ());
|
||||
/*已完成工单数量*/
|
||||
long count = rStatWorkOrderDetailPOS.stream ( ).filter (t -> Objects.equals (t.getWorkOrderStatus ( ), DicDataEnum.CLOSED.getCode ())).count ( );
|
||||
orderCountVO.setCompelteOrderCount (Integer.valueOf (count+""));
|
||||
return orderCountVO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.process.mapper.RStatWorkOrderDetailMapper;
|
||||
import com.njcn.process.pojo.po.RStatWorkOrderDetailPO;
|
||||
import com.njcn.process.service.RStatWorkOrderDetailService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/2/1 14:13【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatWorkOrderDetailServiceImpl extends MppServiceImpl<RStatWorkOrderDetailMapper, RStatWorkOrderDetailPO> implements RStatWorkOrderDetailService{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user