Merge remote-tracking branch 'origin/master'
This commit is contained in:
+32
-5
@@ -1,6 +1,5 @@
|
|||||||
package com.jero.modules.project.controller;
|
package com.jero.modules.project.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
@@ -16,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description
|
* @description
|
||||||
@@ -45,8 +46,9 @@ public class NcrTrackController {
|
|||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
IPage<NcrTrackVO> pageList = iNcrTrackService.getPageInfo(ncrTrackVO,pageNo, pageSize);
|
List<NcrTrackVO> pageInfo = iNcrTrackService.getPageInfo(ncrTrackVO);
|
||||||
return Result.OK(pageList);
|
Page pages = iNcrTrackService.getPages(pageNo, pageSize, pageInfo);
|
||||||
|
return Result.OK(ncrTrackVO.getCut(),pages);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -65,8 +67,33 @@ public class NcrTrackController {
|
|||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
IPage<NcrTrackVO> pageList = iNcrTrackService.getPageInfo(ncrTrackVO,pageNo, pageSize);
|
List<NcrTrackVO> pageInfo = iNcrTrackService.getPageInfo(ncrTrackVO);
|
||||||
return Result.OK(pageList);
|
Page pages = iNcrTrackService.getPages(pageNo, pageSize, pageInfo);
|
||||||
|
return Result.OK(pages);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
* @param request
|
||||||
|
* @param ncrTrackVO
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportData")
|
||||||
|
public void exportData(HttpServletResponse response,
|
||||||
|
HttpServletRequest request,
|
||||||
|
NcrTrackVO ncrTrackVO) {
|
||||||
|
iNcrTrackService.exportData(response,request, ncrTrackVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目详情中未符合项导出数据
|
||||||
|
* @param request
|
||||||
|
* @param ncrTrackVO
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportDataInfo")
|
||||||
|
public void exportDataInfo(HttpServletResponse response,
|
||||||
|
HttpServletRequest request,
|
||||||
|
NcrTrackVO ncrTrackVO) {
|
||||||
|
iNcrTrackService.exportData(response,request, ncrTrackVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+8
-6
@@ -2,6 +2,7 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.jero.modules.project.mapper.NcrTrackMapper">
|
<mapper namespace="com.jero.modules.project.mapper.NcrTrackMapper">
|
||||||
<resultMap id="NcrTrackVOResultMap" type="com.jero.modules.project.vo.NcrTrackVO">
|
<resultMap id="NcrTrackVOResultMap" type="com.jero.modules.project.vo.NcrTrackVO">
|
||||||
|
<id column="id" property="id" />
|
||||||
<id column="serial_number" property="serialNumber" />
|
<id column="serial_number" property="serialNumber" />
|
||||||
<result column="title" property="title" />
|
<result column="title" property="title" />
|
||||||
<result column="duty_territory" property="dutyTerritory" />
|
<result column="duty_territory" property="dutyTerritory" />
|
||||||
@@ -19,13 +20,14 @@
|
|||||||
<result column="design_flow_task_status" property="designFlowTaskStatus" />
|
<result column="design_flow_task_status" property="designFlowTaskStatus" />
|
||||||
<result column="prehomo_flow_task_status" property="prehomoFlowTaskStatus" />
|
<result column="prehomo_flow_task_status" property="prehomoFlowTaskStatus" />
|
||||||
<result column="verify_flow_task_status" property="verifyFlowTaskStatus" />
|
<result column="verify_flow_task_status" property="verifyFlowTaskStatus" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<select id="getInfoList" resultMap="NcrTrackVOResultMap">
|
<select id="getInfoList" resultMap="NcrTrackVOResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
pni.project_name,plb.target_market,
|
pni.project_name,plb.target_market,
|
||||||
pli.serial_number,pli.title,pli.duty_territory,
|
pli.id,pli.serial_number,pli.title,pli.duty_territory,pli.create_time,
|
||||||
pti.design_flow_task_status,pti.prehomo_flow_task_status,pti.verify_flow_task_status,pti.design_p_id,pti.prehomo_p_id,pti.verify_p_id,
|
pti.design_flow_task_status,pti.prehomo_flow_task_status,pti.verify_flow_task_status,pti.design_p_id,pti.prehomo_p_id,pti.verify_p_id,
|
||||||
pli.design_initiator_id,pli.design_duty_id,pli.prehomo_initiator_id,pli.prehomo_duty_id,pli.verify_initiator_id,pli.verify_duty_id
|
pli.design_initiator_id,pli.design_duty_id,pli.prehomo_initiator_id,pli.prehomo_duty_id,pli.verify_initiator_id,pli.verify_duty_id
|
||||||
|
|
||||||
@@ -40,25 +42,25 @@
|
|||||||
and
|
and
|
||||||
</if>
|
</if>
|
||||||
<if test="ncrTrackVO.serialNumber != null and ncrTrackVO.serialNumber != ''">
|
<if test="ncrTrackVO.serialNumber != null and ncrTrackVO.serialNumber != ''">
|
||||||
pli.serial_number =#{ncrTrackVO.serialNumber}
|
pli.serial_number like concat(concat('%',#{ncrTrackVO.serialNumber}),'%')
|
||||||
and
|
and
|
||||||
</if>
|
</if>
|
||||||
<if test="ncrTrackVO.title != null and ncrTrackVO.title != ''">
|
<if test="ncrTrackVO.title != null and ncrTrackVO.title != ''">
|
||||||
pli.title =#{ncrTrackVO.title}
|
pli.title like concat(concat('%',#{ncrTrackVO.title}),'%')
|
||||||
and
|
and
|
||||||
</if>
|
</if>
|
||||||
<if test="ncrTrackVO.dutyTerritory != null and ncrTrackVO.dutyTerritory != ''">
|
<if test="ncrTrackVO.dutyTerritory != null and ncrTrackVO.dutyTerritory != ''">
|
||||||
pli.duty_territory =#{ncrTrackVO.dutyTerritory}
|
pli.duty_territory like concat(concat('%',#{ncrTrackVO.dutyTerritory}),'%')
|
||||||
and
|
and
|
||||||
</if>
|
</if>
|
||||||
<if test="ncrTrackVO.projectName != null and ncrTrackVO.projectName != ''">
|
<if test="ncrTrackVO.projectName != null and ncrTrackVO.projectName != ''">
|
||||||
pni.project_name =#{ncrTrackVO.projectName}
|
pni.project_name =#{ncrTrackVO.projectName}
|
||||||
and
|
and
|
||||||
</if>
|
</if>
|
||||||
<if test="ncrTrackVO.problemType != null and ncrTrackVO.problemType != ''">
|
<!--<if test="ncrTrackVO.problemType != null and ncrTrackVO.problemType != ''">
|
||||||
(pti.design_flow_task_status =#{ncrTrackVO.problemType} or pti.prehomo_flow_task_status =#{ncrTrackVO.problemType} or pti.verify_flow_task_status =#{ncrTrackVO.problemType})
|
(pti.design_flow_task_status =#{ncrTrackVO.problemType} or pti.prehomo_flow_task_status =#{ncrTrackVO.problemType} or pti.verify_flow_task_status =#{ncrTrackVO.problemType})
|
||||||
and
|
and
|
||||||
</if>
|
</if>-->
|
||||||
<if test="ncrTrackVO.initiator != null and ncrTrackVO.initiator != ''">
|
<if test="ncrTrackVO.initiator != null and ncrTrackVO.initiator != ''">
|
||||||
(pli.design_initiator_id =#{ncrTrackVO.initiator} or pli.prehomo_initiator_id =#{ncrTrackVO.initiator} or pli.verify_initiator_id =#{ncrTrackVO.initiator})
|
(pli.design_initiator_id =#{ncrTrackVO.initiator} or pli.prehomo_initiator_id =#{ncrTrackVO.initiator} or pli.verify_initiator_id =#{ncrTrackVO.initiator})
|
||||||
and
|
and
|
||||||
|
|||||||
+12
-4
@@ -1,9 +1,13 @@
|
|||||||
package com.jero.modules.project.service;
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.modules.project.vo.NcrTrackVO;
|
import com.jero.modules.project.vo.NcrTrackVO;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description
|
* @description
|
||||||
* @date 2022/5/11 9:24
|
* @date 2022/5/11 9:24
|
||||||
@@ -11,7 +15,11 @@ import com.jero.modules.project.vo.NcrTrackVO;
|
|||||||
*/
|
*/
|
||||||
public interface INcrTrackService extends IService<NcrTrackVO> {
|
public interface INcrTrackService extends IService<NcrTrackVO> {
|
||||||
|
|
||||||
IPage<NcrTrackVO> getPageInfo(NcrTrackVO ncrTrackVO,
|
List<NcrTrackVO> getPageInfo(NcrTrackVO ncrTrackVO);
|
||||||
Integer pageNo,
|
|
||||||
Integer pageSize);
|
Page getPages(Integer currentPage, Integer pageSize, List<NcrTrackVO> list);
|
||||||
|
|
||||||
|
void exportData(HttpServletResponse response,
|
||||||
|
HttpServletRequest request,
|
||||||
|
NcrTrackVO ncrTrackVO);
|
||||||
}
|
}
|
||||||
|
|||||||
+104
-18
@@ -1,27 +1,36 @@
|
|||||||
package com.jero.modules.project.service.impl;
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.modules.project.enums.ReviewResultEnum;
|
import com.jero.modules.project.enums.ReviewResultEnum;
|
||||||
import com.jero.modules.project.mapper.NcrTrackMapper;
|
import com.jero.modules.project.mapper.NcrTrackMapper;
|
||||||
import com.jero.modules.project.service.INcrTrackService;
|
import com.jero.modules.project.service.INcrTrackService;
|
||||||
|
import com.jero.modules.project.vo.NcrTrackInfoVO;
|
||||||
import com.jero.modules.project.vo.NcrTrackVO;
|
import com.jero.modules.project.vo.NcrTrackVO;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
|
||||||
import com.jero.modules.system.entity.SysUser;
|
import com.jero.modules.system.entity.SysUser;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.PageImpl;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,9 +45,11 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
private NcrTrackMapper ncrTrackMapper;
|
private NcrTrackMapper ncrTrackMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysUserService sysUserService;
|
private ISysUserService sysUserService;
|
||||||
|
@Value(value = "${jero.path.upload}")
|
||||||
|
private String uploadpath;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<NcrTrackVO> getPageInfo(NcrTrackVO ncrTrackVO, Integer pageNo, Integer pageSize) {
|
public List<NcrTrackVO> getPageInfo(NcrTrackVO ncrTrackVO) {
|
||||||
if(StringUtils.isNotBlank(ncrTrackVO.getSerialNumber())){
|
if(StringUtils.isNotBlank(ncrTrackVO.getSerialNumber())){
|
||||||
ncrTrackVO.setSerialNumber(ncrTrackVO.getSerialNumber().replace("*",""));
|
ncrTrackVO.setSerialNumber(ncrTrackVO.getSerialNumber().replace("*",""));
|
||||||
}
|
}
|
||||||
@@ -76,10 +87,10 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
String designFlowTaskStatusName = "";
|
String designFlowTaskStatusName = "";
|
||||||
//pre问题类型
|
//pre问题类型
|
||||||
String prehomoFlowTaskStatus = trackVO.getPrehomoFlowTaskStatus();
|
String prehomoFlowTaskStatus = trackVO.getPrehomoFlowTaskStatus();
|
||||||
String prehomoFlowTaskStatusName = trackVO.getPrehomoFlowTaskStatus();
|
String prehomoFlowTaskStatusName = "";
|
||||||
//验证问题类型
|
//验证问题类型
|
||||||
String verifyFlowTaskStatus = trackVO.getVerifyFlowTaskStatus();
|
String verifyFlowTaskStatus = trackVO.getVerifyFlowTaskStatus();
|
||||||
String verifyFlowTaskStatusName = trackVO.getVerifyFlowTaskStatus();
|
String verifyFlowTaskStatusName = "";
|
||||||
|
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(designFlowTaskStatus)) {
|
if (StringUtils.isNotBlank(designFlowTaskStatus)) {
|
||||||
@@ -103,7 +114,9 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
trackVO.getDesignInitiatorId(),
|
trackVO.getDesignInitiatorId(),
|
||||||
trackVO.getDesignDutyId(),
|
trackVO.getDesignDutyId(),
|
||||||
designName,
|
designName,
|
||||||
sysUserList);
|
sysUserList,
|
||||||
|
trackVO.getId(),
|
||||||
|
trackVO.getCreateTime());
|
||||||
trackVOList.add(ncrTrackVOTemp);
|
trackVOList.add(ncrTrackVOTemp);
|
||||||
}
|
}
|
||||||
//PreHomo确认
|
//PreHomo确认
|
||||||
@@ -117,7 +130,9 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
trackVO.getPrehomoInitiatorId(),
|
trackVO.getPrehomoInitiatorId(),
|
||||||
trackVO.getPrehomoDutyId(),
|
trackVO.getPrehomoDutyId(),
|
||||||
prehomoName,
|
prehomoName,
|
||||||
sysUserList);
|
sysUserList,
|
||||||
|
trackVO.getId(),
|
||||||
|
trackVO.getCreateTime());
|
||||||
trackVOList.add(ncrTrackVOTemp);
|
trackVOList.add(ncrTrackVOTemp);
|
||||||
}
|
}
|
||||||
//验证符合性确认
|
//验证符合性确认
|
||||||
@@ -131,19 +146,43 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
trackVO.getVerifyInitiatorId(),
|
trackVO.getVerifyInitiatorId(),
|
||||||
trackVO.getVerifyDutyId(),
|
trackVO.getVerifyDutyId(),
|
||||||
verifyName,
|
verifyName,
|
||||||
sysUserList);
|
sysUserList,
|
||||||
|
trackVO.getId(),
|
||||||
|
trackVO.getCreateTime());
|
||||||
trackVOList.add(ncrTrackVOTemp);
|
trackVOList.add(ncrTrackVOTemp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//流程类型数据过滤
|
||||||
if(StringUtils.isNotBlank(ncrTrackVO.getFlowType())){
|
if(StringUtils.isNotBlank(ncrTrackVO.getFlowType())){
|
||||||
trackVOList = trackVOList.stream().filter(e->ncrTrackVO.getFlowType().equals(e.getFlowType())).collect(Collectors.toList());
|
trackVOList = trackVOList.stream().filter(e->ncrTrackVO.getFlowType().equals(e.getFlowType())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
//问题类型数据过滤
|
||||||
|
if(StringUtils.isNotBlank(ncrTrackVO.getProblemType())){
|
||||||
|
trackVOList = trackVOList.stream().filter(e->ncrTrackVO.getProblemType().equals(e.getProblemType())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
Page pages = getPages(pageNo, pageSize, trackVOList);
|
List<NcrTrackVO> trackVOListTemp = new ArrayList<>();
|
||||||
|
List<NcrTrackVO> ncrTrackVOList = ncrTrackVO.getNcrTrackVOList();
|
||||||
return pages;
|
//导出数据过滤(列表中选取多条进行导出的时候,用id和流程类型作为条件进行数据过滤)
|
||||||
|
if(ObjectUtils.allNotNull(ncrTrackVOList)){
|
||||||
|
for (NcrTrackVO trackVO : ncrTrackVOList) {
|
||||||
|
List<NcrTrackVO> collect = trackVOList.stream()
|
||||||
|
.filter(e -> trackVO.getId().equals(e.getId()) && trackVO.getFlowType().equals(e.getFlowType()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if(collect.size() != 0){
|
||||||
|
trackVOListTemp.addAll(collect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(trackVOListTemp.size() != 0){
|
||||||
|
return trackVOListTemp;
|
||||||
|
}else{
|
||||||
|
return trackVOList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private String cut(NcrTrackVO trackVO,String designFlowTaskStatus,String flowTaskStatusName) {
|
private String cut(NcrTrackVO trackVO,String designFlowTaskStatus,String flowTaskStatusName) {
|
||||||
if(CutEnum.CN.getValue().equals(trackVO.getCut())){
|
if(CutEnum.CN.getValue().equals(trackVO.getCut())){
|
||||||
if(ReviewResultEnum.INCONFORMITY.getValue().equals(designFlowTaskStatus)){
|
if(ReviewResultEnum.INCONFORMITY.getValue().equals(designFlowTaskStatus)){
|
||||||
@@ -161,7 +200,7 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
return flowTaskStatusName;
|
return flowTaskStatusName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page getPages(Integer currentPage, Integer pageSize, List<NcrTrackVO> list){
|
public Page getPages(Integer currentPage, Integer pageSize, List<NcrTrackVO> list){
|
||||||
Page page =new Page();
|
Page page =new Page();
|
||||||
if(list==null){
|
if(list==null){
|
||||||
return null;
|
return null;
|
||||||
@@ -197,7 +236,10 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
String initiator,
|
String initiator,
|
||||||
String duty,
|
String duty,
|
||||||
String name,
|
String name,
|
||||||
List<SysUser> sysUserList){
|
List<SysUser> sysUserList,
|
||||||
|
String id,
|
||||||
|
Date createTime){
|
||||||
|
String uuid = UUID.randomUUID().toString().replace("-", "");
|
||||||
String initiatorTemp ="";
|
String initiatorTemp ="";
|
||||||
String dutyTemp ="";
|
String dutyTemp ="";
|
||||||
if(StringUtils.isNotBlank(initiator)){
|
if(StringUtils.isNotBlank(initiator)){
|
||||||
@@ -213,6 +255,9 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
NcrTrackVO ncrTrackVO = new NcrTrackVO();
|
NcrTrackVO ncrTrackVO = new NcrTrackVO();
|
||||||
|
ncrTrackVO.setId(id);
|
||||||
|
ncrTrackVO.setUuid(uuid);
|
||||||
|
ncrTrackVO.setCreateTime(createTime);
|
||||||
ncrTrackVO.setSerialNumber(serialNumber);//编号
|
ncrTrackVO.setSerialNumber(serialNumber);//编号
|
||||||
ncrTrackVO.setTitle(title);//标题
|
ncrTrackVO.setTitle(title);//标题
|
||||||
if(StringUtils.isNotBlank(flowType)){
|
if(StringUtils.isNotBlank(flowType)){
|
||||||
@@ -223,7 +268,48 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
ncrTrackVO.setProblemType(problemType);//问题类型
|
ncrTrackVO.setProblemType(problemType);//问题类型
|
||||||
ncrTrackVO.setInitiator(initiatorTemp);//发起人
|
ncrTrackVO.setInitiator(initiatorTemp);//发起人
|
||||||
ncrTrackVO.setDuty(dutyTemp);//责任人
|
ncrTrackVO.setDuty(dutyTemp);//责任人
|
||||||
|
|
||||||
return ncrTrackVO;
|
return ncrTrackVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
* @param response
|
||||||
|
* @param request
|
||||||
|
* @param ncrTrackVO
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void exportData(HttpServletResponse response, HttpServletRequest request, NcrTrackVO ncrTrackVO) {
|
||||||
|
try {
|
||||||
|
//导出的数据
|
||||||
|
List<NcrTrackVO> dataList = getPageInfo(ncrTrackVO);
|
||||||
|
List<NcrTrackInfoVO> dataInfoList = new ArrayList<>();
|
||||||
|
response.setContentType("application/force-download");
|
||||||
|
Workbook workbook = new XSSFWorkbook();
|
||||||
|
OutputStream excelOS = response.getOutputStream();;
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
//项目详情中的导出(没有相关项目字段)
|
||||||
|
if(StringUtils.isBlank(ncrTrackVO.getProjectLibraryId())){
|
||||||
|
workbook = ExcelExportUtil.exportExcel(exportParams, NcrTrackVO.class, dataList);
|
||||||
|
}else{
|
||||||
|
for (NcrTrackVO trackVO : dataList) {
|
||||||
|
NcrTrackInfoVO ncrTrackInfoVO = new NcrTrackInfoVO();
|
||||||
|
BeanUtils.copyProperties(trackVO,ncrTrackInfoVO);
|
||||||
|
dataInfoList.add(ncrTrackInfoVO);
|
||||||
|
}
|
||||||
|
workbook = ExcelExportUtil.exportExcel(exportParams, NcrTrackInfoVO.class, dataInfoList);
|
||||||
|
}
|
||||||
|
workbook.write(excelOS);
|
||||||
|
excelOS.flush();
|
||||||
|
} catch (IOException e) {
|
||||||
|
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
|
||||||
|
throw new JeroBootException("下载文件失败");
|
||||||
|
}else{
|
||||||
|
throw new JeroBootException("Failed to download file");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+116
@@ -0,0 +1,116 @@
|
|||||||
|
package com.jero.modules.project.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 项目详情中--项目未符合项跟踪(用于区分导出(项目详情中的未符合项导出没有相关项目字段))
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
public class NcrTrackInfoVO implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
//中英文切换
|
||||||
|
private String cut;
|
||||||
|
|
||||||
|
//编号
|
||||||
|
@Excel(name = "编号", width = 20)
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
//标题
|
||||||
|
@Excel(name = "标题", width = 20)
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
//责任领域 duty_territory
|
||||||
|
@Dict(dicCode ="duty_territory")
|
||||||
|
@Excel(name = "责任领域", width = 20,dicCode ="duty_territory")
|
||||||
|
private String dutyTerritory;
|
||||||
|
|
||||||
|
//流程类型
|
||||||
|
@Excel(name = "流程类型", width = 20)
|
||||||
|
private String flowType;
|
||||||
|
|
||||||
|
//目标市场
|
||||||
|
private String targetMarket;
|
||||||
|
|
||||||
|
//问题类型
|
||||||
|
@Excel(name = "问题类型", width = 20)
|
||||||
|
private String problemType;
|
||||||
|
|
||||||
|
//发起人
|
||||||
|
@Excel(name = "发起人", width = 20)
|
||||||
|
private String initiator;
|
||||||
|
|
||||||
|
//责任人
|
||||||
|
@Excel(name = "责任人", width = 20)
|
||||||
|
private String duty;
|
||||||
|
|
||||||
|
//项目id
|
||||||
|
private String projectLibraryId;
|
||||||
|
//项目id
|
||||||
|
private String inconformity;
|
||||||
|
//项目id
|
||||||
|
private String track;
|
||||||
|
|
||||||
|
//设计符合性确认 design_p_id
|
||||||
|
private String designPId;
|
||||||
|
//PreHomo确认 prehomo_p_id
|
||||||
|
private String prehomoPId;
|
||||||
|
//验证符合性确认 verify_p_id
|
||||||
|
private String verifyPId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//设计发起人 design_initiator_id
|
||||||
|
private String designInitiatorId;
|
||||||
|
//pre发起人 prehomo_initiator_id
|
||||||
|
private String prehomoInitiatorId;
|
||||||
|
//验证发起人 verify_initiator_id
|
||||||
|
private String verifyInitiatorId;
|
||||||
|
|
||||||
|
|
||||||
|
//设计责任人 design_duty_id
|
||||||
|
private String designDutyId;
|
||||||
|
//pre责任人 prehomo_duty_id
|
||||||
|
private String prehomoDutyId;
|
||||||
|
//验证责任人 verify_duty_id
|
||||||
|
private String verifyDutyId;
|
||||||
|
|
||||||
|
|
||||||
|
//设计问题类型 design_flow_task_status
|
||||||
|
private String designFlowTaskStatus;
|
||||||
|
//pre问题类型 prehomo_flow_task_status
|
||||||
|
private String prehomoFlowTaskStatus;
|
||||||
|
//验证问题类型 verify_flow_task_status
|
||||||
|
private String verifyFlowTaskStatus;
|
||||||
|
|
||||||
|
private List<NcrTrackVO> ncrTrackVOList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+30
-4
@@ -1,15 +1,20 @@
|
|||||||
package com.jero.modules.project.vo;
|
package com.jero.modules.project.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 法规清单评论表
|
* @Description: 项目未符合项跟踪
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2022-04-29
|
* @Date: 2022-04-29
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
@@ -19,35 +24,54 @@ import java.io.Serializable;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class NcrTrackVO implements Serializable {
|
public class NcrTrackVO implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
//用于导出时勾选数据
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
//中英文切换
|
//中英文切换
|
||||||
private String cut;
|
private String cut;
|
||||||
|
|
||||||
//编号
|
//编号
|
||||||
|
@Excel(name = "编号", width = 20)
|
||||||
private String serialNumber;
|
private String serialNumber;
|
||||||
|
|
||||||
//标题
|
//标题
|
||||||
|
@Excel(name = "标题", width = 20)
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
//流程类型
|
|
||||||
private String flowType;
|
|
||||||
|
|
||||||
//责任领域 duty_territory
|
//责任领域 duty_territory
|
||||||
@Dict(dicCode ="duty_territory")
|
@Dict(dicCode ="duty_territory")
|
||||||
|
@Excel(name = "责任领域", width = 20,dicCode ="duty_territory")
|
||||||
private String dutyTerritory;
|
private String dutyTerritory;
|
||||||
|
|
||||||
|
//流程类型
|
||||||
|
@Excel(name = "流程类型", width = 20)
|
||||||
|
private String flowType;
|
||||||
|
|
||||||
//相关项目
|
//相关项目
|
||||||
|
@Excel(name = "相关项目", width = 20)
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
//目标市场
|
//目标市场
|
||||||
private String targetMarket;
|
private String targetMarket;
|
||||||
|
|
||||||
//问题类型
|
//问题类型
|
||||||
|
@Excel(name = "问题类型", width = 20)
|
||||||
private String problemType;
|
private String problemType;
|
||||||
|
|
||||||
//发起人
|
//发起人
|
||||||
|
@Excel(name = "发起人", width = 20)
|
||||||
private String initiator;
|
private String initiator;
|
||||||
|
|
||||||
//责任人
|
//责任人
|
||||||
|
@Excel(name = "责任人", width = 20)
|
||||||
private String duty;
|
private String duty;
|
||||||
|
|
||||||
//项目id
|
//项目id
|
||||||
@@ -89,6 +113,8 @@ public class NcrTrackVO implements Serializable {
|
|||||||
//验证问题类型 verify_flow_task_status
|
//验证问题类型 verify_flow_task_status
|
||||||
private String verifyFlowTaskStatus;
|
private String verifyFlowTaskStatus;
|
||||||
|
|
||||||
|
private List<NcrTrackVO> ncrTrackVOList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user