代码合并终
This commit is contained in:
@@ -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