Merge remote-tracking branch 'origin/dev_20230831_problem'
# Conflicts: # jero-web/src/common/lang/en-us.js # jero-web/src/common/lang/zh-cn.js
This commit is contained in:
+1
@@ -6,6 +6,7 @@ package com.jero.modules.system.enums;
|
|||||||
public enum DicCodeEnum {
|
public enum DicCodeEnum {
|
||||||
REGION("适用地区","1493782108399820801","region"),
|
REGION("适用地区","1493782108399820801","region"),
|
||||||
DUTY_TERRITORY("责任领域","1513417672023441409","duty_territory"),
|
DUTY_TERRITORY("责任领域","1513417672023441409","duty_territory"),
|
||||||
|
PROBLEM_TYPE("问题类型","1697066042058821634","wen4_ti2_lei4_xing2"),
|
||||||
;
|
;
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ public class NcrTrackController {
|
|||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
List<NcrTrackVO> pageInfo = iNcrTrackService.getPageInfo(ncrTrackVO);
|
List<NcrTrackVO> pageInfo = iNcrTrackService.getPageInfo(ncrTrackVO);
|
||||||
//表头排序
|
//表头排序
|
||||||
orderHeader(ncrTrackVO, pageInfo);
|
// orderHeader(ncrTrackVO, pageInfo);
|
||||||
Page pages = iNcrTrackService.getPages(pageNo, pageSize, pageInfo);
|
Page pages = iNcrTrackService.getPages(pageNo, pageSize, pageInfo);
|
||||||
return Result.OK(ncrTrackVO.getCut(),pages);
|
return Result.OK(ncrTrackVO.getCut(),pages);
|
||||||
}
|
}
|
||||||
|
|||||||
+171
@@ -0,0 +1,171 @@
|
|||||||
|
package com.jero.modules.project.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.project.entity.ProblemManagementEO;
|
||||||
|
import com.jero.modules.project.service.IProblemManagementEOService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 问题管理
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="问题管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project/problemManagementEO")
|
||||||
|
@Slf4j
|
||||||
|
public class ProblemManagementEOController extends JeroController<ProblemManagementEO, IProblemManagementEOService> {
|
||||||
|
@Autowired
|
||||||
|
private IProblemManagementEOService problemManagementEOService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param problemManagementEO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "问题管理-分页列表查询")
|
||||||
|
@ApiOperation(value="问题管理-分页列表查询", notes="问题管理-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(ProblemManagementEO problemManagementEO,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ProblemManagementEO> queryWrapper = QueryGenerator.initQueryWrapper(problemManagementEO, req.getParameterMap());
|
||||||
|
Page<ProblemManagementEO> page = new Page<ProblemManagementEO>(pageNo, pageSize);
|
||||||
|
IPage<ProblemManagementEO> pageList = problemManagementEOService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "问题管理-列表查询")
|
||||||
|
@ApiOperation(value="问题管理-列表查询", notes="问题管理-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<ProblemManagementEO>> queryList() {
|
||||||
|
List<ProblemManagementEO> list = problemManagementEOService.queryList();
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param problemManagementEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "问题管理-添加")
|
||||||
|
@ApiOperation(value="问题管理-添加", notes="问题管理-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody ProblemManagementEO problemManagementEO) {
|
||||||
|
problemManagementEOService.add(problemManagementEO);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param problemManagementEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "问题管理-编辑")
|
||||||
|
@ApiOperation(value="问题管理-编辑", notes="问题管理-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody ProblemManagementEO problemManagementEO) {
|
||||||
|
problemManagementEOService.editById(problemManagementEO);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "问题管理-通过id删除")
|
||||||
|
@ApiOperation(value="问题管理-通过id删除", notes="问题管理-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
problemManagementEOService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "问题管理-批量删除")
|
||||||
|
@ApiOperation(value="问题管理-批量删除", notes="问题管理-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.problemManagementEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "问题管理-通过id查询")
|
||||||
|
@ApiOperation(value="问题管理-通过id查询", notes="问题管理-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id,
|
||||||
|
@RequestParam(name="cut",required=true) String cut) {
|
||||||
|
ProblemManagementEO problemManagementEO = problemManagementEOService.queryById(id,cut);
|
||||||
|
if(problemManagementEO==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(problemManagementEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param problemManagementEO
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ProblemManagementEO problemManagementEO) {
|
||||||
|
return super.exportXls(request, problemManagementEO, ProblemManagementEO.class, "问题管理");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, ProblemManagementEO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+4
-2
@@ -10,6 +10,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
|||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.common.util.PageUtil;
|
||||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||||
@@ -550,7 +551,8 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
|||||||
@GetMapping(value = "/queryNotComplianList")
|
@GetMapping(value = "/queryNotComplianList")
|
||||||
public Result<?> queryNotComplianList(@RequestParam Map<String,Object> params) {
|
public Result<?> queryNotComplianList(@RequestParam Map<String,Object> params) {
|
||||||
List<Map<String,Object>> result = this.projectLawsInventoryEOService.queryNotComplianList(params);
|
List<Map<String,Object>> result = this.projectLawsInventoryEOService.queryNotComplianList(params);
|
||||||
return Result.OK(result);
|
Page pages = PageUtil.getPages(Integer.parseInt((String) params.get("pageNo")), Integer.parseInt((String) params.get("pageSize")), result);
|
||||||
|
return Result.OK(pages);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -563,7 +565,7 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
|||||||
@RequestMapping(value = "/exportNotComplianList")
|
@RequestMapping(value = "/exportNotComplianList")
|
||||||
public void exportNotComplianList(HttpServletResponse response,
|
public void exportNotComplianList(HttpServletResponse response,
|
||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
@RequestParam Map<String,Object> params) {
|
@RequestBody Map<String,Object> params) {
|
||||||
this.projectLawsInventoryEOService.exportNotComplianList(response,request, params);
|
this.projectLawsInventoryEOService.exportNotComplianList(response,request, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -7,6 +7,7 @@ import com.jero.common.api.vo.Result;
|
|||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||||
import com.jero.modules.project.service.IProjectNameInfoEOService;
|
import com.jero.modules.project.service.IProjectNameInfoEOService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -36,7 +37,7 @@ import java.util.List;
|
|||||||
public class ProjectNameInfoEOController extends JeroController<ProjectNameInfoEO, IProjectNameInfoEOService> {
|
public class ProjectNameInfoEOController extends JeroController<ProjectNameInfoEO, IProjectNameInfoEOService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProjectNameInfoEOService projectNameInfoEOService;
|
private IProjectNameInfoEOService projectNameInfoEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
@@ -71,6 +72,18 @@ public class ProjectNameInfoEOController extends JeroController<ProjectNameInfoE
|
|||||||
List<ProjectNameInfoEO> list = projectNameInfoEOService.queryList();
|
List<ProjectNameInfoEO> list = projectNameInfoEOService.queryList();
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 返回项目全拼
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "返回项目全拼")
|
||||||
|
@ApiOperation(value="返回项目全拼", notes="返回项目全拼")
|
||||||
|
@GetMapping(value = "/queryProjectNameList")
|
||||||
|
public Result<List<ProjectLibraryBase>> queryProjectNameList(String cut) {
|
||||||
|
List<ProjectLibraryBase> list = projectNameInfoEOService.queryProjectNameList(cut);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
|
|||||||
+171
@@ -0,0 +1,171 @@
|
|||||||
|
package com.jero.modules.project.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
|
import com.jero.modules.project.vo.ProblemManagementVO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
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: 2023-09-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("problem_management")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="problem_management对象", description="问题管理")
|
||||||
|
public class ProblemManagementEO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private java.lang.String id;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@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;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@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 updateTime;
|
||||||
|
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
|
/**标题*/
|
||||||
|
@Excel(name = "标题", width = 15)
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
private java.lang.String title;
|
||||||
|
|
||||||
|
/**问题类型*/
|
||||||
|
@Excel(name = "问题类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "问题类型")
|
||||||
|
private java.lang.String problemType;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String problemType_dictText;
|
||||||
|
|
||||||
|
/**ps_issue*/
|
||||||
|
@Excel(name = "ps_issue", width = 15)
|
||||||
|
@ApiModelProperty(value = "ps_issue")
|
||||||
|
private java.lang.String psIssue;
|
||||||
|
|
||||||
|
/**相关法规*/
|
||||||
|
@Excel(name = "相关法规", width = 15)
|
||||||
|
@ApiModelProperty(value = "相关法规")
|
||||||
|
private java.lang.String lawsId;
|
||||||
|
|
||||||
|
/**相关项目*/
|
||||||
|
@Excel(name = "相关项目", width = 15)
|
||||||
|
@ApiModelProperty(value = "相关项目")
|
||||||
|
private java.lang.String projectId;
|
||||||
|
|
||||||
|
/**责任部门*/
|
||||||
|
@ApiModelProperty(value = "责任部门")
|
||||||
|
@Excel(name = "*责任领域", width = 15,dicCode ="duty_territory")
|
||||||
|
private java.lang.String dutyTerritory;
|
||||||
|
|
||||||
|
/**问题状态*/
|
||||||
|
@Excel(name = "*问题状态", width = 15,dicCode ="wen4_ti2_lei4_xing2")
|
||||||
|
@ApiModelProperty(value = "问题状态")
|
||||||
|
private java.lang.String problemState;
|
||||||
|
|
||||||
|
/**描述和分析*/
|
||||||
|
@Excel(name = "描述和分析", width = 15)
|
||||||
|
@ApiModelProperty(value = "描述和分析")
|
||||||
|
private java.lang.String description;
|
||||||
|
|
||||||
|
/**相关文件链接*/
|
||||||
|
@Excel(name = "相关文件链接", width = 15)
|
||||||
|
@ApiModelProperty(value = "相关文件链接")
|
||||||
|
private java.lang.String fileLink;
|
||||||
|
|
||||||
|
/**相关文件*/
|
||||||
|
@Excel(name = "相关文件", width = 15)
|
||||||
|
@ApiModelProperty(value = "相关文件")
|
||||||
|
private java.lang.String file;
|
||||||
|
|
||||||
|
/**进度追踪*/
|
||||||
|
@Excel(name = "进度追踪", width = 15)
|
||||||
|
@ApiModelProperty(value = "进度追踪")
|
||||||
|
private java.lang.String progressTracking;
|
||||||
|
|
||||||
|
/**结论*/
|
||||||
|
@Excel(name = "结论", width = 15)
|
||||||
|
@ApiModelProperty(value = "结论")
|
||||||
|
private java.lang.String conclusion;
|
||||||
|
|
||||||
|
/**审批证据*/
|
||||||
|
@Excel(name = "审批证据", width = 15)
|
||||||
|
@ApiModelProperty(value = "审批证据")
|
||||||
|
private java.lang.String approvalEvidence;
|
||||||
|
|
||||||
|
/**审批证据链接*/
|
||||||
|
@Excel(name = "审批证据链接", width = 15)
|
||||||
|
@ApiModelProperty(value = "审批证据链接")
|
||||||
|
private java.lang.String approvalEvidenceLink;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "相关文件地址链接(前端传参)")
|
||||||
|
private List<ProblemManagementVO> fileLinkList;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "进度追踪(前端传参)")
|
||||||
|
private List<ProblemManagementVO> progressTrackingList;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "审批证据链接(前端传参)")
|
||||||
|
private List<ProblemManagementVO> approvalEvidenceLinkList;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "相关法规中文名")
|
||||||
|
private String lawsName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "相关项目中文名")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "详情文件回显")
|
||||||
|
private List<OSSFile> fileList;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "详情文件回显")
|
||||||
|
private List<OSSFile> approvalEvidenceFileList;
|
||||||
|
|
||||||
|
//用于区分旧数据和新数据(旧数据->old,新数据->new)
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "旧数据->old,新数据->new")
|
||||||
|
private String flag;
|
||||||
|
|
||||||
|
}
|
||||||
+2
-2
@@ -5,8 +5,8 @@ package com.jero.modules.project.enums;
|
|||||||
*/
|
*/
|
||||||
public enum ColourEnum {
|
public enum ColourEnum {
|
||||||
|
|
||||||
RED("红色","1"), // 未完成
|
RED("红","1"), // 未完成
|
||||||
YELLOW("黄色","2"), // 已完成
|
YELLOW("黄","2"), // 已完成
|
||||||
GREEN("绿色","3"), // 展示数据
|
GREEN("绿色","3"), // 展示数据
|
||||||
BLUE("蓝色","4") // 展示数据
|
BLUE("蓝色","4") // 展示数据
|
||||||
;
|
;
|
||||||
|
|||||||
+2
@@ -19,6 +19,8 @@ public enum ComplianceFlowStatusEnum {
|
|||||||
TO_TRACK("待追踪","To be tracked","To be tracked"),
|
TO_TRACK("待追踪","To be tracked","To be tracked"),
|
||||||
UNINVOLVED("不涉及","NA","NA"),
|
UNINVOLVED("不涉及","NA","NA"),
|
||||||
TERMINATION_OF_TASK("任务终止","Termination of task","Termination of task"),
|
TERMINATION_OF_TASK("任务终止","Termination of task","Termination of task"),
|
||||||
|
LAWS_INCONFORMITY("法规未符合项","Non-compliance of regulations","Non-compliance of regulations"),
|
||||||
|
LAWS_TO_TRACK("法规待追踪项","Regulations to track items","Regulations to track items"),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+46
@@ -0,0 +1,46 @@
|
|||||||
|
package com.jero.modules.project.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前状态枚举类
|
||||||
|
*/
|
||||||
|
public enum DataEnum {
|
||||||
|
|
||||||
|
OLD("老数据","OLD"), // 老数据
|
||||||
|
NEW("新数据","NEW") // 新数据
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
String name;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
private DataEnum(String name, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getTextByValue(String value) {
|
||||||
|
DataEnum[] values = values();
|
||||||
|
for (DataEnum taskStatusEnum : values) {
|
||||||
|
if (taskStatusEnum.value.equals(value)) {
|
||||||
|
return taskStatusEnum.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
package com.jero.modules.project.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.jero.modules.project.entity.ProblemManagementEO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 问题管理
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ProblemManagementEOMapper extends BaseMapper<ProblemManagementEO> {
|
||||||
|
|
||||||
|
List<ProjectLibraryBase> queryByIds(@Param("ids") String ids);
|
||||||
|
|
||||||
|
}
|
||||||
+7
-25
@@ -27,20 +27,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="getInfoList" resultMap="NcrTrackVOResultMap">
|
<select id="getInfoList" resultMap="NcrTrackVOResultMap">
|
||||||
<!--
|
|
||||||
SELECT
|
|
||||||
pni.project_name,plb.target_market,plb.project_version,pyni.year_name,
|
|
||||||
pli.serial_number,pli.title,pli.duty_territory,pli.create_time,pli.project_library_id,pli.stand_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,pti.id,pti.project_laws_inventory_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
|
|
||||||
|
|
||||||
FROM project_task_inventory pti
|
|
||||||
left join project_laws_inventory pli on pti.project_laws_inventory_id = pli.id
|
|
||||||
left join project_library_base plb on plb.id = pli.project_library_id
|
|
||||||
left join project_name_info pni on pni.id = plb.project_name_id
|
|
||||||
left join project_task_inventory_detail ptid on ptid.project_task_inventory_id = pti.project_laws_inventory_id
|
|
||||||
left join project_year_name_info pyni on pyni.id = plb.year_name_id
|
|
||||||
-->
|
|
||||||
SELECT
|
SELECT
|
||||||
pni.project_name,
|
pni.project_name,
|
||||||
plb.target_market,
|
plb.target_market,
|
||||||
@@ -76,14 +62,10 @@
|
|||||||
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
|
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
|
||||||
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
|
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
|
||||||
where
|
where
|
||||||
<if test="ncrTrackVO.projectLibraryId != null and ncrTrackVO.projectLibraryId != ''">
|
<!--<if test="ncrTrackVO.projectLibraryId != null and ncrTrackVO.projectLibraryId != ''">
|
||||||
plb.id =#{ncrTrackVO.projectLibraryId}
|
plb.id =#{ncrTrackVO.projectLibraryId}
|
||||||
and
|
and
|
||||||
</if>
|
</if>
|
||||||
<!--<if test="ncrTrackVO.userId != null and ncrTrackVO.userId != ''">
|
|
||||||
ptid.user_id =#{ncrTrackVO.userId}
|
|
||||||
and
|
|
||||||
</if>-->
|
|
||||||
<if test="ncrTrackVO.serialNumber != null and ncrTrackVO.serialNumber != ''">
|
<if test="ncrTrackVO.serialNumber != null and ncrTrackVO.serialNumber != ''">
|
||||||
pli.serial_number like concat(concat('%',#{ncrTrackVO.serialNumber}),'%')
|
pli.serial_number like concat(concat('%',#{ncrTrackVO.serialNumber}),'%')
|
||||||
and
|
and
|
||||||
@@ -100,10 +82,6 @@
|
|||||||
pni.project_name =#{ncrTrackVO.projectName}
|
pni.project_name =#{ncrTrackVO.projectName}
|
||||||
and
|
and
|
||||||
</if>
|
</if>
|
||||||
<!--<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})
|
|
||||||
and
|
|
||||||
</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
|
||||||
@@ -111,11 +89,15 @@
|
|||||||
<if test="ncrTrackVO.duty != null and ncrTrackVO.duty != ''">
|
<if test="ncrTrackVO.duty != null and ncrTrackVO.duty != ''">
|
||||||
(pli.design_duty_id =#{ncrTrackVO.duty} or pli.prehomo_duty_id =#{ncrTrackVO.duty} or pli.verify_duty_id =#{ncrTrackVO.duty})
|
(pli.design_duty_id =#{ncrTrackVO.duty} or pli.prehomo_duty_id =#{ncrTrackVO.duty} or pli.verify_duty_id =#{ncrTrackVO.duty})
|
||||||
and
|
and
|
||||||
</if>
|
</if>-->
|
||||||
(
|
(
|
||||||
|
design_flow_status =#{ncrTrackVO.inconformity}
|
||||||
|
or verify_flow_status =#{ncrTrackVO.inconformity}
|
||||||
|
)
|
||||||
|
<!--(
|
||||||
design_flow_status =#{ncrTrackVO.inconformity} or design_flow_status =#{ncrTrackVO.track}
|
design_flow_status =#{ncrTrackVO.inconformity} or design_flow_status =#{ncrTrackVO.track}
|
||||||
or verify_flow_status =#{ncrTrackVO.inconformity} or verify_flow_status =#{ncrTrackVO.track}
|
or verify_flow_status =#{ncrTrackVO.inconformity} or verify_flow_status =#{ncrTrackVO.track}
|
||||||
)
|
)-->
|
||||||
<!--如果当前操作人不是系统管理员角色,查询跟自己相关的数据,如果是系统管理员,查询所有的-->
|
<!--如果当前操作人不是系统管理员角色,查询跟自己相关的数据,如果是系统管理员,查询所有的-->
|
||||||
<if test="ncrTrackVO.administrator == 'false'">
|
<if test="ncrTrackVO.administrator == 'false'">
|
||||||
<if test="ncrTrackVO.userId != null and ncrTrackVO.userId != ''">
|
<if test="ncrTrackVO.userId != null and ncrTrackVO.userId != ''">
|
||||||
|
|||||||
+64
@@ -0,0 +1,64 @@
|
|||||||
|
<?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.jero.modules.project.mapper.ProblemManagementEOMapper">
|
||||||
|
<resultMap id="ProblemManagementEOResultMap" type="com.jero.modules.project.entity.ProblemManagementEO">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="title" property="title" />
|
||||||
|
<result column="problem_type" property="problemType" />
|
||||||
|
<result column="ps_issue" property="psIssue" />
|
||||||
|
<result column="laws_id" property="lawsId" />
|
||||||
|
<result column="project_id" property="projectId" />
|
||||||
|
<result column="duty_territory" property="dutyTerritory" />
|
||||||
|
<result column="problem_state" property="problemState" />
|
||||||
|
<result column="description" property="description" />
|
||||||
|
<result column="file_link" property="fileLink" />
|
||||||
|
<result column="file" property="file" />
|
||||||
|
<result column="progress_tracking" property="progressTracking" />
|
||||||
|
<result column="conclusion" property="conclusion" />
|
||||||
|
<result column="approval_evidence" property="approvalEvidence" />
|
||||||
|
<result column="approval_evidence_link" property="approvalEvidenceLink" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="queryByIds" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
|
||||||
|
select
|
||||||
|
plb.id,
|
||||||
|
plb.project_name_id,
|
||||||
|
pni.project_name as project_name,
|
||||||
|
pyni.id as year_name_id,
|
||||||
|
pyni.year_name,
|
||||||
|
plb.target_market,
|
||||||
|
plb.project_status,
|
||||||
|
plb.studio_engineer,
|
||||||
|
studiouser.username as studio_engineer_name,
|
||||||
|
plb.certification_engineer,
|
||||||
|
plb.vehicle_platform,
|
||||||
|
plb.digital_platform,
|
||||||
|
plb.ipd_info,
|
||||||
|
plb.vehicle_development_plan,
|
||||||
|
plb.attestation_plan,
|
||||||
|
plb.create_by,
|
||||||
|
plb.create_time,
|
||||||
|
plb.sys_org_code,
|
||||||
|
plb.update_by,
|
||||||
|
plb.update_time,
|
||||||
|
plb.parent_id,
|
||||||
|
plb.project_version
|
||||||
|
from project_library_base as plb
|
||||||
|
left join project_name_info as pni on plb.project_name_id=pni.id
|
||||||
|
left join sys_user as studiouser on plb.studio_engineer=studiouser.id
|
||||||
|
left join project_year_name_info as pyni on plb.year_name_id=pyni.id
|
||||||
|
<where>
|
||||||
|
<if test="ids != null and ids !=''">
|
||||||
|
plb.id in
|
||||||
|
<foreach collection="ids.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
+3
-3
@@ -158,8 +158,8 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
) temp
|
) temp
|
||||||
<include refid="BaseQuerySql"/>
|
<!--<include refid="BaseQuerySql"/>-->
|
||||||
<if test="params.orderByField != null and params.orderByField != ''">
|
<!--<if test="params.orderByField != null and params.orderByField != ''">
|
||||||
order by temp.${params.orderByField}
|
order by temp.${params.orderByField}
|
||||||
<if test="params.orderBy == 1">
|
<if test="params.orderBy == 1">
|
||||||
asc
|
asc
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
<if test="params.orderBy == 2">
|
<if test="params.orderBy == 2">
|
||||||
desc
|
desc
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>-->
|
||||||
<if test="params.orderByField == null or params.orderByField == ''">
|
<if test="params.orderByField == null or params.orderByField == ''">
|
||||||
order by temp.serial_number desc
|
order by temp.serial_number desc
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProblemManagementEO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 问题管理
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IProblemManagementEOService extends IService<ProblemManagementEO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param problemManagementEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(ProblemManagementEO problemManagementEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param problemManagementEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(ProblemManagementEO problemManagementEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ProblemManagementEO queryById(String id,String cut);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ProblemManagementEO> queryList();
|
||||||
|
}
|
||||||
+7
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.modules.project.service;
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -59,6 +60,12 @@ public interface IProjectNameInfoEOService extends IService<ProjectNameInfoEO> {
|
|||||||
*/
|
*/
|
||||||
List<ProjectNameInfoEO> queryList();
|
List<ProjectNameInfoEO> queryList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回项目全拼
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ProjectLibraryBase> queryProjectNameList(String cut);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//void getSpaceInfo(String cut);
|
//void getSpaceInfo(String cut);
|
||||||
|
|||||||
+646
-32
@@ -1,6 +1,8 @@
|
|||||||
package com.jero.modules.project.service.impl;
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import cn.hutool.core.util.ZipUtil;
|
||||||
|
import com.aliyuncs.utils.IOUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
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;
|
||||||
@@ -8,40 +10,71 @@ import com.jero.common.constant.enums.CutEnum;
|
|||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.DictModel;
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.common.util.oss.CosBootUtil;
|
||||||
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
|
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||||
|
import com.jero.modules.dummy.enums.OrderEnum;
|
||||||
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
|
import com.jero.modules.project.entity.ProblemManagementEO;
|
||||||
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
import com.jero.modules.project.entity.ProjectTaskInventoryDetailEO;
|
import com.jero.modules.project.entity.ProjectTaskInventoryDetailEO;
|
||||||
|
import com.jero.modules.project.enums.ColourEnum;
|
||||||
|
import com.jero.modules.project.enums.ComplianceFlowStatusEnum;
|
||||||
|
import com.jero.modules.project.enums.DataEnum;
|
||||||
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.mapper.ProblemManagementEOMapper;
|
||||||
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.project.vo.NcrTrackVOEn;
|
||||||
|
import com.jero.modules.project.vo.ProblemManagementVO;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
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.enums.DicCodeEnum;
|
import com.jero.modules.system.enums.DicCodeEnum;
|
||||||
import com.jero.modules.system.service.ISysDictService;
|
|
||||||
import com.jero.modules.system.service.IProjectUserDutyTerritoryService;
|
import com.jero.modules.system.service.IProjectUserDutyTerritoryService;
|
||||||
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||||
|
import com.jero.modules.system.util.PDFUtils;
|
||||||
|
import com.jero.modules.todoCenter.enums.DesignComplianceFlowNodeKeyEnum;
|
||||||
|
import com.jero.modules.wkflow.entity.ProcessHistoryEO;
|
||||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||||
|
import com.jero.modules.wkflow.service.impl.ProcessHistoryEOServiceImpl;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
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.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.aspectj.util.FileUtil;
|
||||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.text.Collator;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -66,23 +99,35 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
private ISysDictService sysDictService;
|
private ISysDictService sysDictService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProjectUserDutyTerritoryService projectUserDutyTerritoryService;
|
private IProjectUserDutyTerritoryService projectUserDutyTerritoryService;
|
||||||
|
@Autowired
|
||||||
|
private ProblemManagementEOServiceImpl problemManagementEOService;
|
||||||
|
@Autowired
|
||||||
|
private ProblemManagementEOMapper problemManagementEOMapper;
|
||||||
|
@Autowired
|
||||||
|
private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
||||||
|
@Autowired
|
||||||
|
private ProcessHistoryEOServiceImpl processHistoryEOService;
|
||||||
|
@Autowired
|
||||||
|
private IOSSFileService iOSSFileService;
|
||||||
|
@Value(value = "${jero.path.upload}")
|
||||||
|
private String uploadpath;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<NcrTrackVO> getPageInfo(NcrTrackVO ncrTrackVO) {
|
public List<NcrTrackVO> getPageInfo(NcrTrackVO ncrTrackVO) {
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
ncrTrackVO.setUserId(loginUser.getId());
|
ncrTrackVO.setUserId(loginUser.getId());
|
||||||
if(StringUtils.isNotBlank(ncrTrackVO.getSerialNumber())){
|
// if(StringUtils.isNotBlank(ncrTrackVO.getSerialNumber())){
|
||||||
if(ncrTrackVO.getSerialNumber().contains("%")){
|
// if(ncrTrackVO.getSerialNumber().contains("%")){
|
||||||
ncrTrackVO.setSerialNumber(ncrTrackVO.getSerialNumber().replaceAll("%", "/%"));
|
// ncrTrackVO.setSerialNumber(ncrTrackVO.getSerialNumber().replaceAll("%", "/%"));
|
||||||
}
|
// }
|
||||||
ncrTrackVO.setSerialNumber(ncrTrackVO.getSerialNumber().replace("*",""));
|
// ncrTrackVO.setSerialNumber(ncrTrackVO.getSerialNumber().replace("*",""));
|
||||||
}
|
// }
|
||||||
if(StringUtils.isNotBlank(ncrTrackVO.getTitle())){
|
// if(StringUtils.isNotBlank(ncrTrackVO.getTitle())){
|
||||||
if(ncrTrackVO.getTitle().contains("%")){
|
// if(ncrTrackVO.getTitle().contains("%")){
|
||||||
ncrTrackVO.setTitle(ncrTrackVO.getTitle().replace("%","/%"));
|
// ncrTrackVO.setTitle(ncrTrackVO.getTitle().replace("%","/%"));
|
||||||
}
|
// }
|
||||||
ncrTrackVO.setTitle(ncrTrackVO.getTitle().replace("*",""));
|
// ncrTrackVO.setTitle(ncrTrackVO.getTitle().replace("*",""));
|
||||||
}
|
// }
|
||||||
// List<SysUser> sysUserList = sysUserService.list();
|
// List<SysUser> sysUserList = sysUserService.list();
|
||||||
|
|
||||||
|
|
||||||
@@ -121,15 +166,6 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||||
Set<String> userIdSet = new HashSet<>();
|
Set<String> userIdSet = new HashSet<>();
|
||||||
for (NcrTrackVO trackVO : infoList) {
|
for (NcrTrackVO trackVO : infoList) {
|
||||||
/*if(StringUtils.isNotBlank(trackVO.getDesignInitiatorId())){
|
|
||||||
userIdSet.add(trackVO.getDesignInitiatorId());
|
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(trackVO.getPrehomoInitiatorId())){
|
|
||||||
userIdSet.add(trackVO.getPrehomoInitiatorId());
|
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(trackVO.getVerifyInitiatorId())){
|
|
||||||
userIdSet.add(trackVO.getVerifyInitiatorId());
|
|
||||||
}*/
|
|
||||||
if(StringUtils.isNotBlank(trackVO.getDesignDutyId())){
|
if(StringUtils.isNotBlank(trackVO.getDesignDutyId())){
|
||||||
userIdSet.add(trackVO.getDesignDutyId());
|
userIdSet.add(trackVO.getDesignDutyId());
|
||||||
}
|
}
|
||||||
@@ -291,6 +327,36 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!trackVOList.isEmpty()){
|
||||||
|
//流程实例id
|
||||||
|
List<String> prcIdList = trackVOList.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getPrcId())).map(NcrTrackVO::getPrcId).collect(Collectors.toList());
|
||||||
|
QueryWrapper<ProcessHistoryEO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.orderByAsc("create_time");
|
||||||
|
queryWrapper.lambda().in(ProcessHistoryEO::getActiProcInstId, prcIdList);
|
||||||
|
List<ProcessHistoryEO> processHistoryEOList = processHistoryEOService.list(queryWrapper);
|
||||||
|
this.processHistoryEOService.disposeData(processHistoryEOList,ncrTrackVO.getCut());
|
||||||
|
for (NcrTrackVO trackVO : trackVOList) {
|
||||||
|
trackVO.setCreateTime(null);
|
||||||
|
List<ProcessHistoryEO> collect = processHistoryEOList.stream().filter(e -> StringUtils.isNotBlank(e.getActiProcInstId())
|
||||||
|
&& e.getActiProcInstId().equals(trackVO.getPrcId())).collect(Collectors.toList());
|
||||||
|
//创建时间为任务节点为符合性审查,处理结果为不符合或待追踪的操作时间
|
||||||
|
//更新时间为最新的流程时间
|
||||||
|
if(!collect.isEmpty()){
|
||||||
|
//更新时间
|
||||||
|
trackVO.setUpdateTime(collect.get(collect.size()-1).getCreateTime());
|
||||||
|
//创建时间
|
||||||
|
List<ProcessHistoryEO> processHistoryEOS = collect.stream().filter(e -> StringUtils.isNotBlank(e.getTaskDefinitionKey())
|
||||||
|
&& DesignComplianceFlowNodeKeyEnum.FGGCSSH.getValue().equals(e.getTaskDefinitionKey())
|
||||||
|
&& (ComplianceFlowStatusEnum.INCONFORMITY.getValue().equals(e.getOperatorResult()) || ComplianceFlowStatusEnum.TO_TRACK.getValue().equals(e.getOperatorResult()))).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(processHistoryEOS)) {
|
||||||
|
trackVO.setCreateTime(processHistoryEOS.get(0).getCreateTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
List<NcrTrackVO> trackVOListTemp = new ArrayList<>();
|
List<NcrTrackVO> trackVOListTemp = new ArrayList<>();
|
||||||
List<NcrTrackVO> ncrTrackVOListTemp = ncrTrackVO.getNcrTrackVOList();
|
List<NcrTrackVO> ncrTrackVOListTemp = ncrTrackVO.getNcrTrackVOList();
|
||||||
@@ -305,14 +371,415 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
List<NcrTrackVO> ncrTrackVOList = getProblemManagementData(ncrTrackVOListTemp,ncrTrackVO.getCut());
|
||||||
|
|
||||||
if(trackVOListTemp.size() != 0){
|
if(trackVOListTemp.size() != 0){
|
||||||
|
//旧数据处理
|
||||||
|
oldData(ncrTrackVO, trackVOListTemp);
|
||||||
|
if(!ncrTrackVOList.isEmpty()){
|
||||||
|
trackVOListTemp.addAll(ncrTrackVOList);
|
||||||
|
}
|
||||||
|
//条件查询
|
||||||
|
trackVOListTemp = parameterQuery(ncrTrackVO, trackVOListTemp);
|
||||||
return trackVOListTemp;
|
return trackVOListTemp;
|
||||||
}else{
|
}else{
|
||||||
|
//旧数据处理
|
||||||
|
oldData(ncrTrackVO, trackVOList);
|
||||||
|
if(!ncrTrackVOList.isEmpty()){
|
||||||
|
trackVOList.addAll(ncrTrackVOList);
|
||||||
|
}
|
||||||
|
//条件查询
|
||||||
|
trackVOList = parameterQuery(ncrTrackVO, trackVOList);
|
||||||
|
//表头排序
|
||||||
|
heartSort(ncrTrackVO, trackVOList);
|
||||||
|
|
||||||
|
|
||||||
return trackVOList;
|
return trackVOList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void heartSort(NcrTrackVO ncrTrackVO, List<NcrTrackVO> trackVOList) {
|
||||||
|
Collator comparator = Collator.getInstance(Locale.CHINESE);
|
||||||
|
if ("title".equals(ncrTrackVO.getOrderByField())) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getTitle()) ? e1.getTitle() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getTitle()) ? e2.getTitle() : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getTitle()) ? e1.getTitle() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getTitle()) ? e2.getTitle() : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("lawsName".equals(ncrTrackVO.getOrderByField())) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getLawsName()) ? e1.getLawsName() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getLawsName()) ? e2.getLawsName() : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getLawsName()) ? e1.getLawsName() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getLawsName()) ? e2.getLawsName() : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("projectName".equals(ncrTrackVO.getOrderByField())) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getProjectName()) ? e1.getProjectName() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getProjectName()) ? e2.getProjectName() : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getProjectName()) ? e1.getProjectName() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getProjectName()) ? e2.getProjectName() : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("problemType_dictText".equals(ncrTrackVO.getOrderByField())) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getProblemType_dictText()) ? e1.getProblemType_dictText() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getProblemType_dictText()) ? e2.getProblemType_dictText() : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getProblemType_dictText()) ? e1.getProblemType_dictText() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getProblemType_dictText()) ? e2.getProblemType_dictText() : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("dutyTerritory".equals(ncrTrackVO.getOrderByField())) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getDutyTerritory()) ? e1.getDutyTerritory() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getDutyTerritory()) ? e2.getDutyTerritory() : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getDutyTerritory()) ? e1.getDutyTerritory() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getDutyTerritory()) ? e2.getDutyTerritory() : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("problemState".equals(ncrTrackVO.getOrderByField())) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getProblemState()) ? e1.getProblemState() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getProblemState()) ? e2.getProblemState() : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getProblemState()) ? e1.getProblemState() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getProblemState()) ? e2.getProblemState() : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("createBy".equals(ncrTrackVO.getOrderByField())) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getCreateBy()) ? e1.getCreateBy() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getCreateBy()) ? e2.getCreateBy() : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, (e1, e2) -> {
|
||||||
|
String e1Field = StringUtils.isNotBlank(e1.getCreateBy()) ? e1.getCreateBy() : "";
|
||||||
|
String e2Field = StringUtils.isNotBlank(e2.getCreateBy()) ? e2.getCreateBy() : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("createTime".equals(ncrTrackVO.getOrderByField())) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, new Comparator<NcrTrackVO>() {
|
||||||
|
@Override
|
||||||
|
public int compare(NcrTrackVO o1, NcrTrackVO o2) {
|
||||||
|
if (o1.getCreateTime() == null || o2.getCreateTime() == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return o1.getCreateTime().compareTo(o2.getCreateTime());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, new Comparator<NcrTrackVO>() {
|
||||||
|
@Override
|
||||||
|
public int compare(NcrTrackVO o1, NcrTrackVO o2) {
|
||||||
|
if (o1.getCreateTime() == null || o2.getCreateTime() == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return o2.getCreateTime().compareTo(o1.getCreateTime());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("updateTime".equals(ncrTrackVO.getOrderByField())) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, new Comparator<NcrTrackVO>() {
|
||||||
|
@Override
|
||||||
|
public int compare(NcrTrackVO o1, NcrTrackVO o2) {
|
||||||
|
if (o1.getUpdateTime() == null || o2.getUpdateTime() == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return o1.getUpdateTime().compareTo(o2.getUpdateTime());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(ncrTrackVO.getOrderBy())) {
|
||||||
|
Collections.sort(trackVOList, new Comparator<NcrTrackVO>() {
|
||||||
|
@Override
|
||||||
|
public int compare(NcrTrackVO o1, NcrTrackVO o2) {
|
||||||
|
if (o1.getUpdateTime() == null || o2.getUpdateTime() == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return o2.getUpdateTime().compareTo(o1.getUpdateTime());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private List<NcrTrackVO> parameterQuery(NcrTrackVO ncrTrackVO, List<NcrTrackVO> trackVOList) {
|
||||||
|
if(!trackVOList.isEmpty()){
|
||||||
|
if(StringUtils.isNotBlank(ncrTrackVO.getTitle())){
|
||||||
|
trackVOList = trackVOList.stream().filter(e->StringUtils.isNotBlank(e.getTitle())
|
||||||
|
&& e.getTitle().contains(ncrTrackVO.getTitle())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(ncrTrackVO.getLawsName())){
|
||||||
|
trackVOList = trackVOList.stream().filter(e->StringUtils.isNotBlank(e.getLawsName())
|
||||||
|
&& e.getLawsName().contains(ncrTrackVO.getLawsName())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(ncrTrackVO.getProjectId())){
|
||||||
|
trackVOList = trackVOList.stream().filter(e->StringUtils.isNotBlank(e.getProjectId())
|
||||||
|
&& e.getProjectId().contains(ncrTrackVO.getProjectId())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(ncrTrackVO.getProblemType_dictText())){
|
||||||
|
trackVOList = trackVOList.stream().filter(e->StringUtils.isNotBlank(e.getProblemType_dictText())
|
||||||
|
&& e.getProblemType_dictText().contains(ncrTrackVO.getProblemType_dictText())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(ncrTrackVO.getDutyTerritory())){
|
||||||
|
trackVOList = trackVOList.stream().filter(e->StringUtils.isNotBlank(e.getDutyTerritory())
|
||||||
|
&& e.getDutyTerritory().contains(ncrTrackVO.getDutyTerritory())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(ncrTrackVO.getProblemState())){
|
||||||
|
trackVOList = trackVOList.stream().filter(e->StringUtils.isNotBlank(e.getProblemState())
|
||||||
|
&& e.getProblemState().contains(ncrTrackVO.getProblemState())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return trackVOList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void oldData(NcrTrackVO ncrTrackVO, List<NcrTrackVO> trackVOListTemp) {
|
||||||
|
for (NcrTrackVO trackVO : trackVOListTemp) {
|
||||||
|
String problemType = trackVO.getProblemType();
|
||||||
|
|
||||||
|
trackVO.setCreateBy(trackVO.getDuty());
|
||||||
|
trackVO.setLawsName(trackVO.getSerialNumber());
|
||||||
|
trackVO.setFlag(DataEnum.OLD.getValue());
|
||||||
|
if(ComplianceFlowStatusEnum.INCONFORMITY.getCnName().equals(problemType)
|
||||||
|
|| ComplianceFlowStatusEnum.INCONFORMITY.getEnName().equals(problemType)){
|
||||||
|
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
|
||||||
|
trackVO.setProblemType_dictText(ComplianceFlowStatusEnum.LAWS_INCONFORMITY.getCnName());
|
||||||
|
}else{
|
||||||
|
trackVO.setProblemType_dictText(ComplianceFlowStatusEnum.LAWS_INCONFORMITY.getEnName());
|
||||||
|
}
|
||||||
|
trackVO.setProblemState(ColourEnum.RED.getName());
|
||||||
|
}
|
||||||
|
if(ComplianceFlowStatusEnum.TO_TRACK.getCnName().equals(problemType)
|
||||||
|
||ComplianceFlowStatusEnum.TO_TRACK.getEnName().equals(problemType)){
|
||||||
|
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
|
||||||
|
trackVO.setProblemType_dictText(ComplianceFlowStatusEnum.LAWS_TO_TRACK.getCnName());
|
||||||
|
}else{
|
||||||
|
trackVO.setProblemType_dictText(ComplianceFlowStatusEnum.LAWS_TO_TRACK.getEnName());
|
||||||
|
}
|
||||||
|
trackVO.setProblemState(ColourEnum.YELLOW.getName());
|
||||||
|
}
|
||||||
|
trackVO.setTitle(trackVO.getFlowType()+trackVO.getProblemType_dictText());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private List<NcrTrackVO> getProblemManagementData(List<NcrTrackVO> ncrTrackVOListTemp,String cut) {
|
||||||
|
List<String> idList = new ArrayList<>();
|
||||||
|
if(!ncrTrackVOListTemp.isEmpty()){
|
||||||
|
//处理导出时勾选数据
|
||||||
|
idList = ncrTrackVOListTemp.stream().filter(e -> StringUtils.isNotBlank(e.getFlowType())).map(NcrTrackVO::getId).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
List<ProblemManagementEO> managementEOList = new ArrayList<>();
|
||||||
|
if(!idList.isEmpty()){
|
||||||
|
LambdaQueryWrapper<ProblemManagementEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(ProblemManagementEO::getId,idList);
|
||||||
|
managementEOList = problemManagementEOService.list(wrapper);
|
||||||
|
}else{
|
||||||
|
managementEOList = problemManagementEOService.list();
|
||||||
|
}
|
||||||
|
//法规
|
||||||
|
List<String> lawsIdList = managementEOList.stream()
|
||||||
|
.filter(e->StringUtils.isNotBlank(e.getLawsId())).map(ProblemManagementEO::getLawsId).collect(Collectors.toList());
|
||||||
|
//项目
|
||||||
|
List<String> projectIdList = managementEOList.stream()
|
||||||
|
.filter(e->StringUtils.isNotBlank(e.getProjectId())).map(ProblemManagementEO::getProjectId).collect(Collectors.toList());
|
||||||
|
//相关文件
|
||||||
|
List<String> fileList = managementEOList.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getFile())).map(ProblemManagementEO::getFile).collect(Collectors.toList());
|
||||||
|
//审批证据
|
||||||
|
List<String> approvalEvidenceList = managementEOList.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getApprovalEvidence())).map(ProblemManagementEO::getApprovalEvidence).collect(Collectors.toList());
|
||||||
|
List<String> connectList = new ArrayList<>();
|
||||||
|
if(!fileList.isEmpty()){
|
||||||
|
connectList.addAll(fileList);
|
||||||
|
}
|
||||||
|
if(!approvalEvidenceList.isEmpty()){
|
||||||
|
connectList.addAll(approvalEvidenceList);
|
||||||
|
}
|
||||||
|
List<OSSFile> fileInfoList = new ArrayList<>();
|
||||||
|
if(!connectList.isEmpty()){
|
||||||
|
fileInfoList = iOSSFileService.getFileInfosByConnectId(StringUtils.join(connectList,","));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BussDocumentLibraryEO> documentLibraryEOList = new ArrayList<>();
|
||||||
|
if(!lawsIdList.isEmpty()){
|
||||||
|
Set<String> lawIdSet = new HashSet<>();
|
||||||
|
for (String lawIds : lawsIdList) {
|
||||||
|
lawIdSet.addAll(Arrays.asList(lawIds.split(",")));
|
||||||
|
}
|
||||||
|
if(!lawIdSet.isEmpty()){
|
||||||
|
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(BussDocumentLibraryEO::getId, lawIdSet);
|
||||||
|
documentLibraryEOList = bussDocumentLibraryEOService.list(wrapper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
|
||||||
|
if(!projectIdList.isEmpty()){
|
||||||
|
Set<String> projectIdSet = new HashSet<>();
|
||||||
|
for (String projectIds : projectIdList) {
|
||||||
|
projectIdSet.addAll(Arrays.asList(projectIds.split(",")));
|
||||||
|
}
|
||||||
|
if(!projectIdSet.isEmpty()){
|
||||||
|
projectLibraryBaseList = problemManagementEOMapper.queryByIds(StringUtils.join(projectIdSet,","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//wen4_ti2_lei4_xing2 问题类型
|
||||||
|
List<DictModel> problemTypeList = sysDictService.queryDictItemsByCode(DicCodeEnum.PROBLEM_TYPE.getCode());
|
||||||
|
List<NcrTrackVO> ncrTrackVOList = new ArrayList<>();
|
||||||
|
for (ProblemManagementEO problemManagementEO : managementEOList) {
|
||||||
|
//问题类型
|
||||||
|
List<DictModel> dictModelList = problemTypeList.stream().filter(e -> e.getValue().equals(problemManagementEO.getProblemType())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if(!dictModelList.isEmpty()){
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
problemManagementEO.setProblemType_dictText(dictModelList.get(0).getText());
|
||||||
|
}else{
|
||||||
|
problemManagementEO.setProblemType_dictText(dictModelList.get(0).getTextEn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//相关法规
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getLawsId())){
|
||||||
|
if(!documentLibraryEOList.isEmpty()){
|
||||||
|
List<BussDocumentLibraryEO> documentLibraryEOListTemp = documentLibraryEOList.stream()
|
||||||
|
.filter(e->StringUtils.isNotBlank(problemManagementEO.getLawsId())
|
||||||
|
&& problemManagementEO.getLawsId().contains(e.getId())).collect(Collectors.toList());
|
||||||
|
List<String> serialNumberList = documentLibraryEOListTemp.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setLawsName(com.jero.modules.system.util.StringUtils.join(serialNumberList,","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//相关项目
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getProjectId())){
|
||||||
|
List<ProjectLibraryBase> projectLibraryBaseListTemp = projectLibraryBaseList.stream()
|
||||||
|
.filter(e->StringUtils.isNotBlank(problemManagementEO.getProjectId())
|
||||||
|
&& problemManagementEO.getProjectId().contains(e.getId())).collect(Collectors.toList());
|
||||||
|
//目标市场数据字典
|
||||||
|
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||||
|
List<String> projectNameList = new ArrayList<>();
|
||||||
|
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseListTemp) {
|
||||||
|
//目标市场
|
||||||
|
String targetMarket = problemManagementEOService.getMarket(cut, targetMarketList, projectLibraryBase);
|
||||||
|
//主项目的版本号
|
||||||
|
String projectVersion = "";
|
||||||
|
if(com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getParentId())){
|
||||||
|
projectVersion = "00";
|
||||||
|
}else{
|
||||||
|
projectVersion = projectLibraryBase.getProjectVersion();
|
||||||
|
}
|
||||||
|
projectNameList.add(projectLibraryBase.getProjectName()
|
||||||
|
+ "-" + projectLibraryBase.getYearName()
|
||||||
|
+ "-" + targetMarket
|
||||||
|
+"-"+projectVersion);
|
||||||
|
}
|
||||||
|
if(!projectNameList.isEmpty()){
|
||||||
|
problemManagementEO.setProjectName(StringUtils.join(projectNameList,","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//相关文件连接
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getFileLink())){
|
||||||
|
List<ProblemManagementVO> list = new ArrayList<>();
|
||||||
|
for (String fileLink : problemManagementEO.getFileLink().split(",")) {
|
||||||
|
ProblemManagementVO problemManagementVO = new ProblemManagementVO();
|
||||||
|
problemManagementVO.setFileLink(fileLink);
|
||||||
|
list.add(problemManagementVO);
|
||||||
|
}
|
||||||
|
problemManagementEO.setFileLinkList(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
//审批证据连接
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getApprovalEvidenceLink())){
|
||||||
|
List<ProblemManagementVO> list = new ArrayList<>();
|
||||||
|
for (String approvalEvidenceLink : problemManagementEO.getApprovalEvidenceLink().split(",")) {
|
||||||
|
ProblemManagementVO problemManagementVO = new ProblemManagementVO();
|
||||||
|
problemManagementVO.setApprovalEvidenceLink(approvalEvidenceLink);
|
||||||
|
list.add(problemManagementVO);
|
||||||
|
}
|
||||||
|
problemManagementEO.setApprovalEvidenceLinkList(list);
|
||||||
|
}
|
||||||
|
//进度追踪
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getProgressTracking())){
|
||||||
|
List<ProblemManagementVO> list = new ArrayList<>();
|
||||||
|
for (String progressTracking : problemManagementEO.getProgressTracking().split(",")) {
|
||||||
|
ProblemManagementVO problemManagementVO = new ProblemManagementVO();
|
||||||
|
problemManagementVO.setProgressTracking(progressTracking);
|
||||||
|
list.add(problemManagementVO);
|
||||||
|
}
|
||||||
|
problemManagementEO.setProgressTrackingList(list);
|
||||||
|
}
|
||||||
|
//相关文件
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getFile())){
|
||||||
|
List<OSSFile> collect = fileInfoList.stream()
|
||||||
|
.filter(e -> e.getConnectId().equals(problemManagementEO.getFile())).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setFileList(collect);
|
||||||
|
}
|
||||||
|
//审批证据
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getApprovalEvidence())){
|
||||||
|
List<OSSFile> collect = fileInfoList.stream()
|
||||||
|
.filter(e -> e.getConnectId().equals(problemManagementEO.getApprovalEvidence())).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setApprovalEvidenceFileList(collect);
|
||||||
|
}
|
||||||
|
NcrTrackVO ncrTrackVOTemp = new NcrTrackVO();
|
||||||
|
BeanUtils.copyProperties(problemManagementEO,ncrTrackVOTemp);
|
||||||
|
ncrTrackVOTemp.setUuid(ncrTrackVOTemp.getId());
|
||||||
|
ncrTrackVOTemp.setFlag(DataEnum.NEW.getValue());
|
||||||
|
ncrTrackVOList.add(ncrTrackVOTemp);
|
||||||
|
}
|
||||||
|
return ncrTrackVOList;
|
||||||
|
}
|
||||||
|
|
||||||
private String getMarket(List<DictModel> targetMarketList, NcrTrackVO trackVO,String cut) {
|
private String getMarket(List<DictModel> targetMarketList, NcrTrackVO trackVO,String cut) {
|
||||||
//目标市场
|
//目标市场
|
||||||
List<DictModel> dictModelList = new ArrayList<>();
|
List<DictModel> dictModelList = new ArrayList<>();
|
||||||
@@ -472,36 +939,183 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void exportData(HttpServletResponse response, HttpServletRequest request, NcrTrackVO ncrTrackVO) {
|
public void exportData(HttpServletResponse response, HttpServletRequest request, NcrTrackVO ncrTrackVO) {
|
||||||
|
OutputStream os = null;
|
||||||
try {
|
try {
|
||||||
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
SimpleDateFormat sdfTemp = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
//导出的数据
|
//导出的数据
|
||||||
List<NcrTrackVO> dataList = getPageInfo(ncrTrackVO);
|
List<NcrTrackVO> dataList = getPageInfo(ncrTrackVO);
|
||||||
List<NcrTrackInfoVO> dataInfoList = new ArrayList<>();
|
List<NcrTrackVO> ncrTrackVOList = new ArrayList<>();
|
||||||
|
for (NcrTrackVO trackVO : dataList) {
|
||||||
|
if(ObjectUtils.isNotEmpty(trackVO.getCreateTime())){
|
||||||
|
trackVO.setCreateTimeStr(sdf.format(trackVO.getCreateTime()));
|
||||||
|
}
|
||||||
|
NcrTrackVO ncrTrackVO1 = new NcrTrackVO();
|
||||||
|
BeanUtils.copyProperties(trackVO,ncrTrackVO1);
|
||||||
|
ncrTrackVOList.add(ncrTrackVO1);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> fileList = dataList.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getFile())).map(NcrTrackVO::getFile).collect(Collectors.toList());
|
||||||
|
List<String> approvalEvidenceList = dataList
|
||||||
|
.stream().filter(e -> StringUtils.isNotBlank(e.getApprovalEvidence())).map(NcrTrackVO::getApprovalEvidence).collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
response.setContentType("application/force-download");
|
response.setContentType("application/force-download");
|
||||||
Workbook workbook = new XSSFWorkbook();
|
Workbook workbook = new XSSFWorkbook();
|
||||||
OutputStream excelOS = response.getOutputStream();;
|
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
exportParams.setType(ExcelType.XSSF);
|
exportParams.setType(ExcelType.XSSF);
|
||||||
if(StringUtils.isBlank(ncrTrackVO.getProjectLibraryId())){
|
List<NcrTrackVOEn> dataInfoList = new ArrayList<>();
|
||||||
|
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
|
||||||
workbook = ExcelExportUtil.exportExcel(exportParams, NcrTrackVO.class, dataList);
|
workbook = ExcelExportUtil.exportExcel(exportParams, NcrTrackVO.class, dataList);
|
||||||
}else{
|
}else{
|
||||||
//项目详情中的导出(没有相关项目字段)
|
|
||||||
for (NcrTrackVO trackVO : dataList) {
|
for (NcrTrackVO trackVO : dataList) {
|
||||||
NcrTrackInfoVO ncrTrackInfoVO = new NcrTrackInfoVO();
|
if(ObjectUtils.isNotEmpty(trackVO.getCreateTime())){
|
||||||
BeanUtils.copyProperties(trackVO,ncrTrackInfoVO);
|
trackVO.setCreateTimeStr(sdf.format(trackVO.getCreateTime()));
|
||||||
dataInfoList.add(ncrTrackInfoVO);
|
}
|
||||||
|
NcrTrackVOEn ncrTrackVOEn = new NcrTrackVOEn();
|
||||||
|
BeanUtils.copyProperties(trackVO,ncrTrackVOEn);
|
||||||
|
dataInfoList.add(ncrTrackVOEn);
|
||||||
}
|
}
|
||||||
workbook = ExcelExportUtil.exportExcel(exportParams, NcrTrackInfoVO.class, dataInfoList);
|
workbook = ExcelExportUtil.exportExcel(exportParams, NcrTrackVOEn.class, dataInfoList);
|
||||||
}
|
}
|
||||||
|
String path = uploadpath + "/tempZip";
|
||||||
|
File fileTemp = new File(path);
|
||||||
|
if (fileTemp.exists()) {
|
||||||
|
fileTemp.delete();
|
||||||
|
}
|
||||||
|
fileTemp.mkdirs();
|
||||||
|
//excel
|
||||||
|
String name = "";
|
||||||
|
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
|
||||||
|
name = "问题管理";
|
||||||
|
}else{
|
||||||
|
name = "Problem management";
|
||||||
|
}
|
||||||
|
OutputStream excelOS = new FileOutputStream(path + File.separator + name + sdfTemp.format(new Date())+".xlsx");
|
||||||
workbook.write(excelOS);
|
workbook.write(excelOS);
|
||||||
excelOS.flush();
|
excelOS.flush();
|
||||||
|
|
||||||
|
List<String> connectIdList = new ArrayList<>();
|
||||||
|
if(!fileList.isEmpty()){
|
||||||
|
connectIdList.addAll(fileList);
|
||||||
|
}
|
||||||
|
if(!approvalEvidenceList.isEmpty()){
|
||||||
|
connectIdList.addAll(approvalEvidenceList);
|
||||||
|
}
|
||||||
|
if(!connectIdList.isEmpty()){
|
||||||
|
List<OSSFile> fileInfosList = iOSSFileService.getFileInfosByConnectId(StringUtils.join(connectIdList, ","));
|
||||||
|
for (NcrTrackVO trackVO : ncrTrackVOList) {
|
||||||
|
String folder = trackVO.getTitle()+sdfTemp.format(trackVO.getCreateTime());
|
||||||
|
List<String> connectIdListTemp = new ArrayList<>();
|
||||||
|
if(StringUtils.isNotBlank(trackVO.getFile())){
|
||||||
|
connectIdListTemp.add(trackVO.getFile());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(trackVO.getApprovalEvidence())){
|
||||||
|
connectIdListTemp.add(trackVO.getApprovalEvidence());
|
||||||
|
}
|
||||||
|
if(!connectIdListTemp.isEmpty()){
|
||||||
|
List<OSSFile> ossFileList = fileInfosList.stream().filter(e -> connectIdListTemp.contains(e.getConnectId())).collect(Collectors.toList());
|
||||||
|
if (ossFileList.size() != 0) {
|
||||||
|
String fileNowPath = path + File.separator + folder;
|
||||||
|
File file = new File(fileNowPath);
|
||||||
|
if (file.exists()) {
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
file.mkdirs();
|
||||||
|
for (OSSFile ossFile : ossFileList) {
|
||||||
|
String url = ossFile.getUrl();
|
||||||
|
//判断文件是否存在
|
||||||
|
if(StringUtils.isNotBlank(url)){
|
||||||
|
//判断文件是否存在
|
||||||
|
boolean b = CosBootUtil.doesObjectExist(url);
|
||||||
|
if(b){
|
||||||
|
InputStream download = CosBootUtil.download(url);
|
||||||
|
if(url.endsWith(".pdf") || url.endsWith(".PDF")){
|
||||||
|
String currentTime = sdf.format(new Date());
|
||||||
|
String waterContent = loginUser.getUsername() + " " + currentTime;
|
||||||
|
File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent);
|
||||||
|
download = new FileInputStream(newFile.getPath());
|
||||||
|
}
|
||||||
|
bussDocumentLibraryEOService.copyFile(download, fileNowPath + File.separator + ossFile.getFileName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ZipUtil.zip(path, path + ".zip");
|
||||||
|
//文件
|
||||||
|
FileInputStream fis = new FileInputStream(path + ".zip");
|
||||||
|
os = response.getOutputStream();
|
||||||
|
|
||||||
|
int len = 0;
|
||||||
|
while ((len = fis.read()) != -1) {
|
||||||
|
os.write(len);
|
||||||
|
}
|
||||||
|
os.flush();
|
||||||
|
fis.close();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
|
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
|
||||||
throw new JeroBootException("下载文件失败");
|
throw new JeroBootException("下载文件失败");
|
||||||
}else{
|
}else{
|
||||||
throw new JeroBootException("Failed to download file");
|
throw new JeroBootException("Failed to download file");
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
IOUtils.closeQuietly(os);
|
||||||
|
File file = new File(uploadpath + "/tempZip");
|
||||||
|
FileUtil.deleteContents(file);
|
||||||
|
File fileTemp = new File(uploadpath + "/tempZip.zip");
|
||||||
|
FileUtil.deleteContents(fileTemp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// /**
|
||||||
|
// * 导出数据
|
||||||
|
// * @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");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+299
@@ -0,0 +1,299 @@
|
|||||||
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
|
import com.jero.common.system.vo.DictModel;
|
||||||
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
|
import com.jero.modules.project.entity.ProblemManagementEO;
|
||||||
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
|
import com.jero.modules.project.mapper.ProblemManagementEOMapper;
|
||||||
|
import com.jero.modules.project.service.IProblemManagementEOService;
|
||||||
|
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||||
|
import com.jero.modules.project.vo.ProblemManagementVO;
|
||||||
|
import com.jero.modules.system.enums.DicCodeEnum;
|
||||||
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
|
import com.jero.modules.system.util.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 问题管理
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProblemManagementEOServiceImpl extends ServiceImpl<ProblemManagementEOMapper, ProblemManagementEO> implements IProblemManagementEOService {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IOSSFileService iOSSFileService;
|
||||||
|
@Autowired
|
||||||
|
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||||
|
@Autowired
|
||||||
|
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||||
|
@Autowired
|
||||||
|
private ISysDictService sysDictService;
|
||||||
|
@Autowired
|
||||||
|
private ProblemManagementEOMapper problemManagementEOMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param problemManagementEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(ProblemManagementEO problemManagementEO) {
|
||||||
|
//相关文件地址链接,进度追踪,审批证据链接
|
||||||
|
setParam(problemManagementEO);
|
||||||
|
|
||||||
|
//处理相关文件和审批证据
|
||||||
|
fileAndApprovalEvidence(problemManagementEO);
|
||||||
|
|
||||||
|
Date now = new Date();
|
||||||
|
problemManagementEO.setCreateTime(now);
|
||||||
|
problemManagementEO.setUpdateTime(now);
|
||||||
|
save(problemManagementEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fileAndApprovalEvidence(ProblemManagementEO problemManagementEO) {
|
||||||
|
//处理相关文件
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getFile())){
|
||||||
|
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||||
|
String fileIds = problemManagementEO.getFile();
|
||||||
|
List<OSSFile> oSSFileList = new ArrayList<>();
|
||||||
|
updateFileInfo(fileIds, oSSFileList,connectId);
|
||||||
|
problemManagementEO.setFile(connectId);
|
||||||
|
}
|
||||||
|
//处理审批证据
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getApprovalEvidence())){
|
||||||
|
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||||
|
String fileIds = problemManagementEO.getApprovalEvidence();
|
||||||
|
List<OSSFile> oSSFileList = new ArrayList<>();
|
||||||
|
updateFileInfo(fileIds, oSSFileList,connectId);
|
||||||
|
problemManagementEO.setApprovalEvidence(connectId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateFileInfo(String fileIds, List<OSSFile> oSSFileList,String connectId) {
|
||||||
|
for (String fileId : fileIds.split(",")) {
|
||||||
|
OSSFile ossFile = new OSSFile();
|
||||||
|
ossFile.setId(fileId);
|
||||||
|
ossFile.setConnectId(connectId);
|
||||||
|
oSSFileList.add(ossFile);
|
||||||
|
}
|
||||||
|
iOSSFileService.updateFileInfo(oSSFileList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setParam(ProblemManagementEO problemManagementEO) {
|
||||||
|
if(!problemManagementEO.getFileLinkList().isEmpty()){
|
||||||
|
List<ProblemManagementVO> fileLinkList = problemManagementEO.getFileLinkList();
|
||||||
|
List<String> collect = fileLinkList.stream().map(ProblemManagementVO::getFileLink).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setFileLink(StringUtils.join(collect,","));
|
||||||
|
}
|
||||||
|
if(!problemManagementEO.getProgressTrackingList().isEmpty()){
|
||||||
|
List<ProblemManagementVO> progressTrackingList = problemManagementEO.getProgressTrackingList();
|
||||||
|
List<String> collect = progressTrackingList.stream().map(ProblemManagementVO::getProgressTracking).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setProgressTracking(StringUtils.join(collect,","));
|
||||||
|
}
|
||||||
|
if(!problemManagementEO.getApprovalEvidenceLinkList().isEmpty()){
|
||||||
|
List<ProblemManagementVO> approvalEvidenceLinkList = problemManagementEO.getApprovalEvidenceLinkList();
|
||||||
|
List<String> collect = approvalEvidenceLinkList.stream().map(ProblemManagementVO::getApprovalEvidenceLink).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setApprovalEvidenceLink(StringUtils.join(collect,","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param problemManagementEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(ProblemManagementEO problemManagementEO) {
|
||||||
|
//相关文件地址链接,进度追踪,审批证据链接
|
||||||
|
setParam(problemManagementEO);
|
||||||
|
|
||||||
|
//处理相关文件和审批证据
|
||||||
|
fileAndApprovalEvidence(problemManagementEO);
|
||||||
|
|
||||||
|
Date now = new Date();
|
||||||
|
problemManagementEO.setUpdateTime(now);
|
||||||
|
saveOrUpdate(problemManagementEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ProblemManagementEO queryById(String id,String cut) {
|
||||||
|
ProblemManagementEO problemManagementEO = getById(id);
|
||||||
|
//相关法规
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getLawsId())){
|
||||||
|
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(BussDocumentLibraryEO::getId, Arrays.asList(problemManagementEO.getLawsId().split(",")));
|
||||||
|
List<BussDocumentLibraryEO> documentLibraryEOList = bussDocumentLibraryEOService.list(wrapper);
|
||||||
|
if(!documentLibraryEOList.isEmpty()){
|
||||||
|
List<String> serialNumberList = documentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setLawsName(StringUtils.join(serialNumberList,","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//相关项目
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getProjectId())){
|
||||||
|
List<ProjectLibraryBase> projectLibraryBaseList = problemManagementEOMapper.queryByIds(problemManagementEO.getProjectId());
|
||||||
|
//目标市场数据字典
|
||||||
|
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||||
|
List<String> projectNameList = new ArrayList<>();
|
||||||
|
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||||
|
//目标市场
|
||||||
|
String targetMarket = getMarket(cut, targetMarketList, projectLibraryBase);
|
||||||
|
//主项目的版本号
|
||||||
|
String projectVersion = "";
|
||||||
|
if(StringUtils.isBlank(projectLibraryBase.getParentId())){
|
||||||
|
projectVersion = "00";
|
||||||
|
}else{
|
||||||
|
projectVersion = projectLibraryBase.getProjectVersion();
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(projectLibraryBase.getYearName())){
|
||||||
|
projectLibraryBase.setProjectName(projectLibraryBase.getProjectName()
|
||||||
|
+ "-" + projectLibraryBase.getYearName()
|
||||||
|
+ "-" + targetMarket);
|
||||||
|
}
|
||||||
|
projectNameList.add(projectLibraryBase.getProjectName()
|
||||||
|
+ "-" + projectLibraryBase.getYearName()
|
||||||
|
+ "-" + targetMarket
|
||||||
|
+"-"+projectVersion);
|
||||||
|
}
|
||||||
|
if(!projectNameList.isEmpty()){
|
||||||
|
problemManagementEO.setProjectName(StringUtils.join(projectNameList,","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//责任部门
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getDutyTerritory())){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//相关文件
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getFile())){
|
||||||
|
List<OSSFile> fileInfos = iOSSFileService.getFileInfosByConnectId(problemManagementEO.getFile());
|
||||||
|
problemManagementEO.setFileList(fileInfos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//审批证据
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getApprovalEvidence())){
|
||||||
|
List<OSSFile> fileInfos = iOSSFileService.getFileInfosByConnectId(problemManagementEO.getApprovalEvidence());
|
||||||
|
problemManagementEO.setApprovalEvidenceFileList(fileInfos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//相关文件连接
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getFileLink())){
|
||||||
|
List<ProblemManagementVO> list = new ArrayList<>();
|
||||||
|
for (String fileLink : problemManagementEO.getFileLink().split(",")) {
|
||||||
|
ProblemManagementVO problemManagementVO = new ProblemManagementVO();
|
||||||
|
problemManagementVO.setFileLink(fileLink);
|
||||||
|
list.add(problemManagementVO);
|
||||||
|
}
|
||||||
|
problemManagementEO.setFileLinkList(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
//审批证据连接
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getApprovalEvidenceLink())){
|
||||||
|
List<ProblemManagementVO> list = new ArrayList<>();
|
||||||
|
for (String approvalEvidenceLink : problemManagementEO.getApprovalEvidenceLink().split(",")) {
|
||||||
|
ProblemManagementVO problemManagementVO = new ProblemManagementVO();
|
||||||
|
problemManagementVO.setApprovalEvidenceLink(approvalEvidenceLink);
|
||||||
|
list.add(problemManagementVO);
|
||||||
|
}
|
||||||
|
problemManagementEO.setApprovalEvidenceLinkList(list);
|
||||||
|
}
|
||||||
|
//进度追踪
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getProgressTracking())){
|
||||||
|
List<ProblemManagementVO> list = new ArrayList<>();
|
||||||
|
for (String progressTracking : problemManagementEO.getProgressTracking().split(",")) {
|
||||||
|
ProblemManagementVO problemManagementVO = new ProblemManagementVO();
|
||||||
|
problemManagementVO.setProgressTracking(progressTracking);
|
||||||
|
list.add(problemManagementVO);
|
||||||
|
}
|
||||||
|
problemManagementEO.setProgressTrackingList(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
return problemManagementEO;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMarket(String cut, List<DictModel> targetMarketList, ProjectLibraryBase projectLibraryBase) {
|
||||||
|
List<DictModel> dictModelList = new ArrayList<>();
|
||||||
|
for (String s : projectLibraryBase.getTargetMarket().split(",")) {
|
||||||
|
List<DictModel> dictModelListTemp = targetMarketList.stream()
|
||||||
|
.filter(e -> s.equals(e.getValue())).collect(Collectors.toList());
|
||||||
|
dictModelList.addAll(dictModelListTemp);
|
||||||
|
}
|
||||||
|
String targetMarket = "";
|
||||||
|
if(dictModelList.size() != 0){
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (DictModel dictModel : dictModelList) {
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
sb.append(dictModel.getText()+",");
|
||||||
|
}else{
|
||||||
|
sb.append(dictModel.getTextEn()+",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(sb)){
|
||||||
|
targetMarket = sb.substring(0,sb.length()-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return targetMarket;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProblemManagementEO> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
}
|
||||||
+635
-24
@@ -30,9 +30,11 @@ import com.jero.common.system.query.QueryGenerator;
|
|||||||
import com.jero.common.system.vo.DictModel;
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.common.util.DateUtils;
|
import com.jero.common.util.DateUtils;
|
||||||
|
import com.jero.common.util.PageUtil;
|
||||||
import com.jero.common.util.oss.CosBootUtil;
|
import com.jero.common.util.oss.CosBootUtil;
|
||||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
|
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||||
import com.jero.modules.dummy.enums.AttestationRankEnum;
|
import com.jero.modules.dummy.enums.AttestationRankEnum;
|
||||||
@@ -58,6 +60,8 @@ import com.jero.modules.project.mapper.*;
|
|||||||
import com.jero.modules.project.service.*;
|
import com.jero.modules.project.service.*;
|
||||||
import com.jero.modules.project.service.editImpl.ProjectLawsInventoryEOEditServiceImpl;
|
import com.jero.modules.project.service.editImpl.ProjectLawsInventoryEOEditServiceImpl;
|
||||||
import com.jero.modules.project.util.WordUtil;
|
import com.jero.modules.project.util.WordUtil;
|
||||||
|
import com.jero.modules.project.vo.NcrTrackVO;
|
||||||
|
import com.jero.modules.project.vo.ProblemManagementVO;
|
||||||
import com.jero.modules.project.vo.ProjectTaskUrgVo;
|
import com.jero.modules.project.vo.ProjectTaskUrgVo;
|
||||||
import com.jero.modules.split.common.FileUnZip;
|
import com.jero.modules.split.common.FileUnZip;
|
||||||
import com.jero.modules.system.entity.SysAnnouncement;
|
import com.jero.modules.system.entity.SysAnnouncement;
|
||||||
@@ -73,9 +77,11 @@ import com.jero.modules.system.mapper.SysUserMapper;
|
|||||||
import com.jero.modules.system.service.IProjectUserDutyTerritoryService;
|
import com.jero.modules.system.service.IProjectUserDutyTerritoryService;
|
||||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||||
import com.jero.modules.system.service.ISysDictItemService;
|
import com.jero.modules.system.service.ISysDictItemService;
|
||||||
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||||
|
import com.jero.modules.system.util.PDFUtils;
|
||||||
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
|
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
|
||||||
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
|
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
|
||||||
import com.jero.modules.todoCenter.enums.DesignComplianceFlowNodeKeyEnum;
|
import com.jero.modules.todoCenter.enums.DesignComplianceFlowNodeKeyEnum;
|
||||||
@@ -90,6 +96,7 @@ import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
|||||||
import com.jero.modules.wkflow.feginClient.impl.TaskFeignClientImpl;
|
import com.jero.modules.wkflow.feginClient.impl.TaskFeignClientImpl;
|
||||||
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
|
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
|
||||||
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
|
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
|
||||||
|
import com.jero.modules.wkflow.service.impl.ProcessHistoryEOServiceImpl;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -272,6 +279,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
private IProjectLibraryRoleRelEOService projectLibraryRoleRelEOService;
|
private IProjectLibraryRoleRelEOService projectLibraryRoleRelEOService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectLawsInventoryEOEditServiceImpl editService;
|
private ProjectLawsInventoryEOEditServiceImpl editService;
|
||||||
|
@Autowired
|
||||||
|
private ProblemManagementEOServiceImpl problemManagementEOService;
|
||||||
|
@Autowired
|
||||||
|
private ProblemManagementEOMapper problemManagementEOMapper;
|
||||||
|
@Autowired
|
||||||
|
private ISysDictService sysDictService;
|
||||||
|
@Autowired
|
||||||
|
private BussDocumentLibraryEOServiceImpl documentLibraryEOService;
|
||||||
|
@Autowired
|
||||||
|
private ProcessHistoryEOServiceImpl processHistoryEOServiceImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -10305,17 +10322,81 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
if(CollectionUtils.isNotEmpty(userIdList)){
|
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||||
userList = this.sysUserService.querySysUserListByIdList(userIdList);
|
userList = this.sysUserService.querySysUserListByIdList(userIdList);
|
||||||
}
|
}
|
||||||
|
//流程实例id
|
||||||
|
List<ProcessInfoDetailEO> processInfoDetailEOS = new ArrayList<>();
|
||||||
|
List<String> projectLawsInventoryIdList = result.stream().map(e -> (String) e.get("id")).collect(Collectors.toList());
|
||||||
|
List<ProcessHistoryEO> processHistoryEOList = new ArrayList<>();
|
||||||
|
if(ObjectUtils.isNotEmpty(projectLawsInventoryIdList)){
|
||||||
|
QueryWrapper<ProcessInfoDetailEO> processInfoDetailEOQueryWrapper = new QueryWrapper<>();
|
||||||
|
processInfoDetailEOQueryWrapper.lambda().in(ProcessInfoDetailEO::getProjectLawsInventoryId,projectLawsInventoryIdList);
|
||||||
|
processInfoDetailEOQueryWrapper.orderByDesc("create_time");
|
||||||
|
processInfoDetailEOS = this.processInfoDetailEOService.list(processInfoDetailEOQueryWrapper);
|
||||||
|
if(ObjectUtils.isNotEmpty(processInfoDetailEOS)){
|
||||||
|
List<String> actiProcInstIdList = processInfoDetailEOS.stream().map(ProcessInfoDetailEO::getActiProcInstId).collect(Collectors.toList());
|
||||||
|
if(ObjectUtils.isNotEmpty(actiProcInstIdList)){
|
||||||
|
QueryWrapper<ProcessHistoryEO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.orderByAsc("create_time");
|
||||||
|
queryWrapper.lambda().in(ProcessHistoryEO::getActiProcInstId, actiProcInstIdList);
|
||||||
|
processHistoryEOList = processHistoryEOService.list(queryWrapper);
|
||||||
|
if(ObjectUtils.isNotEmpty(processHistoryEOList)){
|
||||||
|
this.processHistoryEOServiceImpl.disposeData(processHistoryEOList,cut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
for (Map<String, Object> dataMap : result) {
|
for (Map<String, Object> dataMap : result) {
|
||||||
|
dataMap.put("uuid",dataMap.get("id"));
|
||||||
|
//相关法规
|
||||||
|
dataMap.put("lawsName",dataMap.get("serialNumber"));
|
||||||
|
//相关项目(旧数据的未符合项,都是属于这一个项目的)
|
||||||
|
dataMap.put("projectName",params.get("projectName"));
|
||||||
|
dataMap.put("projectid",params.get("projectLibraryId"));
|
||||||
|
//创建时间
|
||||||
|
dataMap.put("createTime",dataMap.get("createTime"));
|
||||||
|
//更新时间
|
||||||
|
dataMap.put("updateTime",dataMap.get("updateTime"));
|
||||||
|
|
||||||
String dutyTerritory = (String) dataMap.get("dutyTerritory");
|
String dutyTerritory = (String) dataMap.get("dutyTerritory");
|
||||||
if(StringUtils.isNotEmpty(dutyTerritory)){
|
if(StringUtils.isNotEmpty(dutyTerritory)){
|
||||||
if(StringUtils.isNotEmpty(dutyTerritory)){
|
if(StringUtils.isNotEmpty(dutyTerritory)){
|
||||||
String dutyTerritory_dictText = this.disposeShowDictItemValue(sysDictItems, dutyTerritory,cut,ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
|
String dutyTerritory_dictText = this.disposeShowDictItemValue(sysDictItems, dutyTerritory,cut,ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
|
||||||
dataMap.put("dutyTerritory_dictText",dutyTerritory_dictText);
|
dataMap.put("dutyTerritory_dictText",dutyTerritory_dictText);
|
||||||
|
//责任部门
|
||||||
|
dataMap.put("dutyTerritory",dutyTerritory_dictText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String flowStatus = (String) dataMap.get("flowStatus");
|
String flowStatus = (String) dataMap.get("flowStatus");
|
||||||
|
String problemType_dictText = "";
|
||||||
if(StringUtils.isNotEmpty(flowStatus)){
|
if(StringUtils.isNotEmpty(flowStatus)){
|
||||||
|
String textByValue = ComplianceFlowStatusEnum.getTextByValue(flowStatus, cut);
|
||||||
|
if(ComplianceFlowStatusEnum.INCONFORMITY.getCnName().equals(textByValue)
|
||||||
|
|| ComplianceFlowStatusEnum.INCONFORMITY.getEnName().equals(textByValue)){
|
||||||
|
//问题类型
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
problemType_dictText = ComplianceFlowStatusEnum.LAWS_INCONFORMITY.getCnName();
|
||||||
|
dataMap.put("problemType_dictText",problemType_dictText);
|
||||||
|
}else{
|
||||||
|
problemType_dictText = ComplianceFlowStatusEnum.LAWS_INCONFORMITY.getEnName();
|
||||||
|
dataMap.put("problemType_dictText",problemType_dictText);
|
||||||
|
}
|
||||||
|
//问题状态
|
||||||
|
dataMap.put("problemState",ColourEnum.RED.getName());
|
||||||
|
}
|
||||||
|
if(ComplianceFlowStatusEnum.TO_TRACK.getCnName().equals(textByValue)
|
||||||
|
||ComplianceFlowStatusEnum.TO_TRACK.getEnName().equals(textByValue)){
|
||||||
|
//问题类型
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
problemType_dictText = ComplianceFlowStatusEnum.LAWS_TO_TRACK.getCnName();
|
||||||
|
dataMap.put("problemType_dictText",problemType_dictText);
|
||||||
|
}else{
|
||||||
|
problemType_dictText = ComplianceFlowStatusEnum.LAWS_TO_TRACK.getEnName();
|
||||||
|
dataMap.put("problemType_dictText",problemType_dictText);
|
||||||
|
}
|
||||||
|
//问题状态
|
||||||
|
dataMap.put("problemState",ColourEnum.YELLOW.getName());
|
||||||
|
}
|
||||||
dataMap.put("flowStatusName",ComplianceFlowStatusEnum.getTextByValue(flowStatus,cut));
|
dataMap.put("flowStatusName",ComplianceFlowStatusEnum.getTextByValue(flowStatus,cut));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10329,6 +10410,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
if(StringUtils.isNotEmpty(dutyId)){
|
if(StringUtils.isNotEmpty(dutyId)){
|
||||||
String dutyIdName = this.sysUserService.getUsernameByUserId(userList,dutyId);
|
String dutyIdName = this.sysUserService.getUsernameByUserId(userList,dutyId);
|
||||||
dataMap.put("dutyIdName",dutyIdName);
|
dataMap.put("dutyIdName",dutyIdName);
|
||||||
|
//创建人
|
||||||
|
dataMap.put("createBy",dutyIdName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10336,31 +10419,458 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
if(StringUtils.isNotEmpty(flowType)){
|
if(StringUtils.isNotEmpty(flowType)){
|
||||||
dataMap.put("flowTypeName",FlowTypeEnum.getTextByValue(flowType,cut));
|
dataMap.put("flowTypeName",FlowTypeEnum.getTextByValue(flowType,cut));
|
||||||
}
|
}
|
||||||
|
//标题
|
||||||
// 返回符合性流程的流程实例id
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
QueryWrapper<ProcessInfoDetailEO> processInfoDetailEOQueryWrapper = new QueryWrapper<>();
|
dataMap.put("title",(String) dataMap.get("flowTypeName") + problemType_dictText);
|
||||||
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProjectLawsInventoryId,(String)dataMap.get("id"));
|
}else{
|
||||||
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getFlowType,flowType);
|
dataMap.put("title",(String) dataMap.get("flowTypeName") +" " + problemType_dictText);
|
||||||
processInfoDetailEOQueryWrapper.orderByDesc("create_time");
|
|
||||||
List<ProcessInfoDetailEO> processInfoDetailEOS = this.processInfoDetailEOService.list(processInfoDetailEOQueryWrapper);
|
|
||||||
if(CollectionUtils.isNotEmpty(processInfoDetailEOS)){
|
|
||||||
dataMap.put("actiProcInstId",processInfoDetailEOS.get(0).getActiProcInstId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dataMap.put("flag",DataEnum.OLD.getValue());
|
||||||
|
|
||||||
|
// 更新时间,创建时间
|
||||||
|
if(ObjectUtils.isNotEmpty(processInfoDetailEOS)){
|
||||||
|
List<ProcessInfoDetailEO> collect = processInfoDetailEOS.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getFlowType()) && e.getFlowType().equals(flowType)).collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isNotEmpty(collect)){
|
||||||
|
dataMap.put("actiProcInstId",collect.get(0).getActiProcInstId());
|
||||||
|
if(ObjectUtils.isNotEmpty(processHistoryEOList)){
|
||||||
|
List<ProcessHistoryEO> processHistoryEOSTemp = processHistoryEOList.stream().filter(e -> StringUtils.isNotBlank(e.getActiProcInstId())
|
||||||
|
&& e.getActiProcInstId().equals(collect.get(0).getActiProcInstId())).collect(Collectors.toList());
|
||||||
|
//创建时间为任务节点为符合性审查,处理结果为不符合或待追踪的操作时间
|
||||||
|
//更新时间为最新的流程时间
|
||||||
|
if(!processHistoryEOSTemp.isEmpty()){
|
||||||
|
//更新时间
|
||||||
|
if(ObjectUtils.isNotEmpty(processHistoryEOSTemp.get(processHistoryEOSTemp.size()-1).getCreateTime())){
|
||||||
|
dataMap.put("updateTime",sdf.format(processHistoryEOSTemp.get(processHistoryEOSTemp.size()-1).getCreateTime()));
|
||||||
|
}
|
||||||
|
//创建时间
|
||||||
|
List<ProcessHistoryEO> processHistoryEOS = processHistoryEOSTemp.stream().filter(e -> StringUtils.isNotBlank(e.getTaskDefinitionKey())
|
||||||
|
&& DesignComplianceFlowNodeKeyEnum.FGGCSSH.getValue().equals(e.getTaskDefinitionKey())
|
||||||
|
&& (ComplianceFlowStatusEnum.INCONFORMITY.getValue().equals(e.getOperatorResult()) || ComplianceFlowStatusEnum.TO_TRACK.getValue().equals(e.getOperatorResult()))).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(processHistoryEOS)) {
|
||||||
|
if(ObjectUtils.isNotEmpty(processHistoryEOS.get(0).getCreateTime())){
|
||||||
|
dataMap.put("createTime",sdf.format(processHistoryEOS.get(0).getCreateTime()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// QueryWrapper<ProcessInfoDetailEO> processInfoDetailEOQueryWrapper = new QueryWrapper<>();
|
||||||
|
// processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProjectLawsInventoryId,(String)dataMap.get("id"));
|
||||||
|
// processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getFlowType,flowType);
|
||||||
|
// processInfoDetailEOQueryWrapper.orderByDesc("create_time");
|
||||||
|
// List<ProcessInfoDetailEO> processInfoDetailEOS = this.processInfoDetailEOService.list(processInfoDetailEOQueryWrapper);
|
||||||
|
// if(CollectionUtils.isNotEmpty(processInfoDetailEOS)){
|
||||||
|
// dataMap.put("actiProcInstId",processInfoDetailEOS.get(0).getActiProcInstId());
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//新数据
|
||||||
|
List<Map<String, Object>> mapList = getNewData(params, cut);
|
||||||
|
if(ObjectUtils.isNotEmpty(mapList)){
|
||||||
|
result.addAll(mapList);
|
||||||
|
}
|
||||||
|
//条件查询
|
||||||
|
result = dataParameter(params, result);
|
||||||
|
//表头排序
|
||||||
|
heartSort(params, result);
|
||||||
|
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void heartSort(Map<String, Object> params, List<Map<String, Object>> result) {
|
||||||
|
Collator comparator = Collator.getInstance(Locale.CHINESE);
|
||||||
|
if ("title".equals(params.get("orderByField"))) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("title")) ? String.valueOf(e1.get("title")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("title")) ? String.valueOf(e2.get("title")) : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("title")) ? String.valueOf(e1.get("title")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("title")) ? String.valueOf(e2.get("title")) : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
if ("lawsName".equals(params.get("orderByField"))) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("lawsName")) ? String.valueOf(e1.get("lawsName")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("lawsName")) ? String.valueOf(e2.get("lawsName")) : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("lawsName")) ? String.valueOf(e1.get("lawsName")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("lawsName")) ? String.valueOf(e2.get("lawsName")) : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("projectName".equals(params.get("orderByField"))) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("projectName")) ? String.valueOf(e1.get("projectName")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("projectName")) ? String.valueOf(e2.get("projectName")) : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("projectName")) ? String.valueOf(e1.get("projectName")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("projectName")) ? String.valueOf(e2.get("projectName")) : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("problemType_dictText".equals(params.get("orderByField"))) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("problemType_dictText")) ? String.valueOf(e1.get("problemType_dictText")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("problemType_dictText")) ? String.valueOf(e2.get("problemType_dictText")) : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("problemType_dictText")) ? String.valueOf(e1.get("problemType_dictText")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("problemType_dictText")) ? String.valueOf(e2.get("problemType_dictText")) : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("dutyTerritory".equals(params.get("orderByField"))) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("dutyTerritory")) ? String.valueOf(e1.get("dutyTerritory")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("dutyTerritory")) ? String.valueOf(e2.get("dutyTerritory")) : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("dutyTerritory")) ? String.valueOf(e1.get("dutyTerritory")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("dutyTerritory")) ? String.valueOf(e2.get("dutyTerritory")) : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("createBy".equals(params.get("orderByField"))) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("createBy")) ? String.valueOf(e1.get("createBy")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("createBy")) ? String.valueOf(e2.get("createBy")) : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("createBy")) ? String.valueOf(e1.get("createBy")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("createBy")) ? String.valueOf(e2.get("createBy")) : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("problemState".equals(params.get("orderByField"))) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("problemState")) ? String.valueOf(e1.get("problemState")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("problemState")) ? String.valueOf(e2.get("problemState")) : "";
|
||||||
|
return comparator.compare(e1Field, e2Field);
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
String e1Field = ObjectUtils.isNotEmpty(e1.get("problemState")) ? String.valueOf(e1.get("problemState")) : "";
|
||||||
|
String e2Field = ObjectUtils.isNotEmpty(e2.get("problemState")) ? String.valueOf(e2.get("problemState")) : "";
|
||||||
|
return comparator.compare(e2Field, e1Field);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("createTime".equals(params.get("orderByField"))) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
if (e1.get("createTime") == null || e2.get("createTime") == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return comparator.compare(e1.get("createTime"), e2.get("createTime"));
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
if (e1.get("createTime") == null || e2.get("createTime") == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return comparator.compare(e2.get("createTime"), e1.get("createTime"));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ("updateTime".equals(params.get("orderByField"))) {
|
||||||
|
if (OrderEnum.POSITIVE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
if (e1.get("updateTime") == null || e2.get("updateTime") == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return comparator.compare(e1.get("updateTime"), e2.get("updateTime"));
|
||||||
|
});
|
||||||
|
} else if (OrderEnum.REVERSE.getValue().equals(params.get("orderBy"))) {
|
||||||
|
Collections.sort(result, (e1, e2) -> {
|
||||||
|
if (e1.get("updateTime") == null || e2.get("updateTime") == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return comparator.compare(e2.get("updateTime"), e1.get("updateTime"));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private List<Map<String, Object>> getNewData(Map<String, Object> params, String cut) {
|
||||||
|
//新数据
|
||||||
|
LambdaQueryWrapper<ProblemManagementEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.like(ProblemManagementEO::getProjectId,params.get("projectLibraryId"));
|
||||||
|
List<ProblemManagementEO> managementEOList = problemManagementEOService.list(wrapper);
|
||||||
|
//法规
|
||||||
|
List<String> lawsIdList = managementEOList.stream()
|
||||||
|
.filter(e-> StringUtils.isNotBlank(e.getLawsId())).map(ProblemManagementEO::getLawsId).collect(Collectors.toList());
|
||||||
|
//项目
|
||||||
|
List<String> projectIdList = managementEOList.stream()
|
||||||
|
.filter(e->StringUtils.isNotBlank(e.getProjectId())).map(ProblemManagementEO::getProjectId).collect(Collectors.toList());
|
||||||
|
//相关文件
|
||||||
|
List<String> fileList = managementEOList.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getFile())).map(ProblemManagementEO::getFile).collect(Collectors.toList());
|
||||||
|
//审批证据
|
||||||
|
List<String> approvalEvidenceList = managementEOList.stream()
|
||||||
|
.filter(e -> StringUtils.isNotBlank(e.getApprovalEvidence())).map(ProblemManagementEO::getApprovalEvidence).collect(Collectors.toList());
|
||||||
|
List<String> connectList = new ArrayList<>();
|
||||||
|
if(!fileList.isEmpty()){
|
||||||
|
connectList.addAll(fileList);
|
||||||
|
}
|
||||||
|
if(!approvalEvidenceList.isEmpty()){
|
||||||
|
connectList.addAll(approvalEvidenceList);
|
||||||
|
}
|
||||||
|
List<OSSFile> fileInfoList = new ArrayList<>();
|
||||||
|
if(!connectList.isEmpty()){
|
||||||
|
fileInfoList = iOSSFileService.getFileInfosByConnectId(StringUtils.join(connectList,","));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BussDocumentLibraryEO> documentLibraryEOList = new ArrayList<>();
|
||||||
|
if(!lawsIdList.isEmpty()){
|
||||||
|
Set<String> lawIdSet = new HashSet<>();
|
||||||
|
for (String lawIds : lawsIdList) {
|
||||||
|
lawIdSet.addAll(Arrays.asList(lawIds.split(",")));
|
||||||
|
}
|
||||||
|
if(!lawIdSet.isEmpty()){
|
||||||
|
LambdaQueryWrapper<BussDocumentLibraryEO> wrapperDocument = new LambdaQueryWrapper<>();
|
||||||
|
wrapperDocument.in(BussDocumentLibraryEO::getId, lawIdSet);
|
||||||
|
documentLibraryEOList = bussDocumentLibraryEOService.list(wrapperDocument);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
|
||||||
|
if(!projectIdList.isEmpty()){
|
||||||
|
Set<String> projectIdSet = new HashSet<>();
|
||||||
|
for (String projectIds : projectIdList) {
|
||||||
|
projectIdSet.addAll(Arrays.asList(projectIds.split(",")));
|
||||||
|
}
|
||||||
|
if(!projectIdSet.isEmpty()){
|
||||||
|
projectLibraryBaseList = problemManagementEOMapper.queryByIds(StringUtils.join(projectIdSet,","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<DictModel> problemTypeList = sysDictService.queryDictItemsByCode(DicCodeEnum.PROBLEM_TYPE.getCode());
|
||||||
|
|
||||||
|
List<NcrTrackVO> ncrTrackVOList = new ArrayList<>();
|
||||||
|
List<Map<String,Object>> mapList = new ArrayList<>();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
for (ProblemManagementEO problemManagementEO : managementEOList) {
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("title",problemManagementEO.getTitle());
|
||||||
|
map.put("psIssue",problemManagementEO.getPsIssue());
|
||||||
|
map.put("dutyTerritory",problemManagementEO.getDutyTerritory());
|
||||||
|
map.put("problemState",problemManagementEO.getProblemState());
|
||||||
|
map.put("problemType",problemManagementEO.getProblemType());
|
||||||
|
map.put("description",problemManagementEO.getDescription());
|
||||||
|
map.put("conclusion",problemManagementEO.getConclusion());
|
||||||
|
map.put("createBy",problemManagementEO.getCreateBy());
|
||||||
|
map.put("createTime",sdf.format(problemManagementEO.getCreateTime()));
|
||||||
|
map.put("updateTime",sdf.format(problemManagementEO.getUpdateTime()));
|
||||||
|
map.put("uuid",problemManagementEO.getId());
|
||||||
|
map.put("id",problemManagementEO.getId());
|
||||||
|
map.put("flag",DataEnum.NEW.getValue());
|
||||||
|
|
||||||
|
List<DictModel> dictModelList = problemTypeList.stream().filter(e -> e.getValue().equals(problemManagementEO.getProblemType())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if(!dictModelList.isEmpty()){
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
map.put("problemType_dictText",dictModelList.get(0).getText());
|
||||||
|
}else{
|
||||||
|
map.put("problemType_dictText",dictModelList.get(0).getTextEn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//相关法规
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getLawsId())){
|
||||||
|
if(!documentLibraryEOList.isEmpty()){
|
||||||
|
List<BussDocumentLibraryEO> documentLibraryEOListTemp = documentLibraryEOList.stream()
|
||||||
|
.filter(e->StringUtils.isNotBlank(problemManagementEO.getLawsId())
|
||||||
|
&& problemManagementEO.getLawsId().contains(e.getId())).collect(Collectors.toList());
|
||||||
|
List<String> serialNumberList = documentLibraryEOListTemp.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setLawsName(StringUtils.join(serialNumberList,","));
|
||||||
|
map.put("lawsName",StringUtils.join(serialNumberList,","));
|
||||||
|
map.put("lawsId",problemManagementEO.getLawsId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//相关项目
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getProjectId())){
|
||||||
|
List<ProjectLibraryBase> projectLibraryBaseListTemp = projectLibraryBaseList.stream()
|
||||||
|
.filter(e->StringUtils.isNotBlank(problemManagementEO.getProjectId())
|
||||||
|
&& problemManagementEO.getProjectId().contains(e.getId())).collect(Collectors.toList());
|
||||||
|
//目标市场数据字典
|
||||||
|
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||||
|
List<String> projectNameList = new ArrayList<>();
|
||||||
|
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseListTemp) {
|
||||||
|
//目标市场
|
||||||
|
String targetMarket = problemManagementEOService.getMarket(cut, targetMarketList, projectLibraryBase);
|
||||||
|
//主项目的版本号
|
||||||
|
String projectVersion = "";
|
||||||
|
if(com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getParentId())){
|
||||||
|
projectVersion = "00";
|
||||||
|
}else{
|
||||||
|
projectVersion = projectLibraryBase.getProjectVersion();
|
||||||
|
}
|
||||||
|
projectNameList.add(projectLibraryBase.getProjectName()
|
||||||
|
+ "-" + projectLibraryBase.getYearName()
|
||||||
|
+ "-" + targetMarket
|
||||||
|
+"-"+projectVersion);
|
||||||
|
}
|
||||||
|
if(!projectNameList.isEmpty()){
|
||||||
|
problemManagementEO.setProjectName(StringUtils.join(projectNameList,","));
|
||||||
|
map.put("projectName",StringUtils.join(projectNameList,","));
|
||||||
|
map.put("projectId",problemManagementEO.getProjectId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//相关文件连接
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getFileLink())){
|
||||||
|
List<ProblemManagementVO> list = new ArrayList<>();
|
||||||
|
for (String fileLink : problemManagementEO.getFileLink().split(",")) {
|
||||||
|
ProblemManagementVO problemManagementVO = new ProblemManagementVO();
|
||||||
|
problemManagementVO.setFileLink(fileLink);
|
||||||
|
list.add(problemManagementVO);
|
||||||
|
}
|
||||||
|
problemManagementEO.setFileLinkList(list);
|
||||||
|
map.put("fileLinkList",list);
|
||||||
|
}
|
||||||
|
|
||||||
|
//审批证据连接
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getApprovalEvidenceLink())){
|
||||||
|
List<ProblemManagementVO> list = new ArrayList<>();
|
||||||
|
for (String approvalEvidenceLink : problemManagementEO.getApprovalEvidenceLink().split(",")) {
|
||||||
|
ProblemManagementVO problemManagementVO = new ProblemManagementVO();
|
||||||
|
problemManagementVO.setApprovalEvidenceLink(approvalEvidenceLink);
|
||||||
|
list.add(problemManagementVO);
|
||||||
|
}
|
||||||
|
problemManagementEO.setApprovalEvidenceLinkList(list);
|
||||||
|
map.put("approvalEvidenceLinkList",list);
|
||||||
|
}
|
||||||
|
//进度追踪
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getProgressTracking())){
|
||||||
|
List<ProblemManagementVO> list = new ArrayList<>();
|
||||||
|
for (String progressTracking : problemManagementEO.getProgressTracking().split(",")) {
|
||||||
|
ProblemManagementVO problemManagementVO = new ProblemManagementVO();
|
||||||
|
problemManagementVO.setProgressTracking(progressTracking);
|
||||||
|
list.add(problemManagementVO);
|
||||||
|
}
|
||||||
|
problemManagementEO.setProgressTrackingList(list);
|
||||||
|
map.put("progressTrackingList",list);
|
||||||
|
}
|
||||||
|
//相关文件
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getFile())){
|
||||||
|
List<OSSFile> collect = fileInfoList.stream()
|
||||||
|
.filter(e -> e.getConnectId().equals(problemManagementEO.getFile())).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setFileList(collect);
|
||||||
|
map.put("fileList",collect);
|
||||||
|
map.put("file",problemManagementEO.getFile());
|
||||||
|
}
|
||||||
|
//审批证据
|
||||||
|
if(StringUtils.isNotBlank(problemManagementEO.getApprovalEvidence())){
|
||||||
|
List<OSSFile> collect = fileInfoList.stream()
|
||||||
|
.filter(e -> e.getConnectId().equals(problemManagementEO.getApprovalEvidence())).collect(Collectors.toList());
|
||||||
|
problemManagementEO.setApprovalEvidenceFileList(collect);
|
||||||
|
map.put("approvalEvidenceFileList",collect);
|
||||||
|
map.put("approvalEvidence",problemManagementEO.getApprovalEvidence());
|
||||||
|
|
||||||
|
}
|
||||||
|
mapList.add(map);
|
||||||
|
NcrTrackVO ncrTrackVOTemp = new NcrTrackVO();
|
||||||
|
BeanUtils.copyProperties(problemManagementEO,ncrTrackVOTemp);
|
||||||
|
ncrTrackVOTemp.setUuid(ncrTrackVOTemp.getId());
|
||||||
|
ncrTrackVOTemp.setFlag(DataEnum.NEW.getValue());
|
||||||
|
ncrTrackVOList.add(ncrTrackVOTemp);
|
||||||
|
}
|
||||||
|
return mapList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Map<String, Object>> dataParameter(Map<String, Object> params, List<Map<String, Object>> mapList) {
|
||||||
|
if(ObjectUtils.isNotEmpty(params.get("title"))){//标题
|
||||||
|
mapList = mapList.stream().filter(e->ObjectUtils.isNotEmpty(e.get("title"))
|
||||||
|
&& e.get("title").toString().contains(params.get("title").toString())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(ObjectUtils.isNotEmpty(params.get("lawsName"))){//相关法规
|
||||||
|
mapList = mapList.stream().filter(e->ObjectUtils.isNotEmpty(e.get("lawsName"))
|
||||||
|
&& e.get("lawsName").toString().contains(params.get("lawsName").toString())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(ObjectUtils.isNotEmpty(params.get("projectId"))){//相关项目
|
||||||
|
mapList = mapList.stream().filter(e->ObjectUtils.isNotEmpty(e.get("projectId"))
|
||||||
|
&& String.valueOf(e.get("projectId")).equals(String.valueOf(params.get("projectId")))).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(ObjectUtils.isNotEmpty(params.get("problemType_dictText"))){//问题类型
|
||||||
|
mapList = mapList.stream().filter(e->ObjectUtils.isNotEmpty(e.get("problemType_dictText"))
|
||||||
|
&& e.get("problemType_dictText").toString().equals(params.get("problemType_dictText").toString())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(ObjectUtils.isNotEmpty(params.get("dutyTerritory"))){//责任领域
|
||||||
|
mapList = mapList.stream().filter(e->ObjectUtils.isNotEmpty(e.get("dutyTerritory"))
|
||||||
|
&& e.get("dutyTerritory").toString().contains(params.get("dutyTerritory").toString())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if(ObjectUtils.isNotEmpty(params.get("problemState"))){//问题状态
|
||||||
|
mapList = mapList.stream().filter(e->ObjectUtils.isNotEmpty(e.get("problemState"))
|
||||||
|
&& e.get("problemState").toString().contains(params.get("problemState").toString())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return mapList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exportNotComplianList(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
|
public void exportNotComplianList(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
|
||||||
|
// params.put("projectLibraryId","1546314907190935554");
|
||||||
|
// params.put("projectName","EDS1.2 EVO-G1.1-中国-00");
|
||||||
|
// params.put("cut","en");
|
||||||
|
|
||||||
|
// Map<String,Object> map1 = new HashMap<>();
|
||||||
|
// map1.put("id","e4a2fe2b042e4150943e82094250f54d");
|
||||||
|
// Map<String,Object> map2 = new HashMap<>();
|
||||||
|
// map2.put("id","e1d5b1aa19344abb8154deea15539daa");
|
||||||
|
// List<Map<String,Object>> ncrTrackVOList =new ArrayList<>();
|
||||||
|
// ncrTrackVOList.add(map1);
|
||||||
|
// ncrTrackVOList.add(map2);
|
||||||
|
//
|
||||||
|
// params.put("ncrTrackVOList",ncrTrackVOList);
|
||||||
|
|
||||||
|
|
||||||
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
SimpleDateFormat sdfTemp = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String cut = (String) params.get("cut");
|
String cut = (String) params.get("cut");
|
||||||
String header = "";
|
String header = "";
|
||||||
String sheetName = "未符合项";
|
String sheetName = "";
|
||||||
if (StringUtils.equals(cut,CutEnum.CN.getValue())) {
|
if (StringUtils.equals(cut,CutEnum.CN.getValue())) {
|
||||||
header = "编号,标题,流程类型,责任领域,问题类型,发起人,责任人";
|
sheetName = "问题管理";
|
||||||
|
header = "标题,问题类型,PS_ISSUE,创建人,创建时间,相关法规,相关项目,责任部门,问题状态,描述和分析";
|
||||||
} else if (StringUtils.equals(cut,CutEnum.EN.getValue())) {
|
} else if (StringUtils.equals(cut,CutEnum.EN.getValue())) {
|
||||||
header = "Number,Title,Process Type,Responsible Field,Issue Type,Creator,Assignee";
|
header = "Title,Issue Type,PS-ISSUE,Creator,Create Date,Related Regualtions,Related Project,Resonsible Field,Status,Description";
|
||||||
sheetName = "Non-compliant";
|
sheetName = "Problem management";
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputStream os = null;
|
OutputStream os = null;
|
||||||
@@ -10369,6 +10879,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
|
|
||||||
List<Map<String, Object>> dataList = this.queryNotComplianList(params);
|
List<Map<String, Object>> dataList = this.queryNotComplianList(params);
|
||||||
|
|
||||||
|
List<Map<String, Object>> expertDataList = new ArrayList<>();
|
||||||
|
if(ObjectUtils.allNotNull(dataList)){
|
||||||
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) params.get("ncrTrackVOList");
|
||||||
|
if(ObjectUtils.isNotEmpty(mapList)){
|
||||||
|
for (Map<String, Object> map : mapList) {
|
||||||
|
List<Map<String, Object>> collect = dataList.stream().filter(e -> ObjectUtils.isNotEmpty(e.get("id")) && e.get("id").equals(map.get("id"))).collect(Collectors.toList());
|
||||||
|
expertDataList.addAll(collect);
|
||||||
|
}
|
||||||
|
dataList = expertDataList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CellStyle cellStyle = workbook.createCellStyle();
|
CellStyle cellStyle = workbook.createCellStyle();
|
||||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
Row rowHeader = sheet.createRow(0);//开始创建标题行
|
Row rowHeader = sheet.createRow(0);//开始创建标题行
|
||||||
@@ -10385,20 +10907,105 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
if(CollectionUtils.isNotEmpty(dataList)){
|
if(CollectionUtils.isNotEmpty(dataList)){
|
||||||
for (int i = 0; i < dataList.size(); i++) {
|
for (int i = 0; i < dataList.size(); i++) {
|
||||||
Row row = sheet.createRow(i + 1);
|
Row row = sheet.createRow(i + 1);
|
||||||
row.createCell(0).setCellValue((String) dataList.get(i).get("serialNumber"));
|
row.createCell(0).setCellValue((String) dataList.get(i).get("title"));
|
||||||
row.createCell(1).setCellValue((String) dataList.get(i).get("title"));
|
row.createCell(1).setCellValue((String) dataList.get(i).get("problemType_dictText"));
|
||||||
row.createCell(2).setCellValue((String) dataList.get(i).get("flowTypeName"));
|
row.createCell(2).setCellValue((String) dataList.get(i).get("psIssue"));
|
||||||
row.createCell(3).setCellValue((String) dataList.get(i).get("dutyTerritory_dictText"));
|
row.createCell(3).setCellValue((String) dataList.get(i).get("createBy"));
|
||||||
row.createCell(4).setCellValue((String) dataList.get(i).get("flowStatusName"));
|
row.createCell(4).setCellValue((String) dataList.get(i).get("createTime"));
|
||||||
row.createCell(5).setCellValue((String) dataList.get(i).get("regulationOwnerIdName"));
|
row.createCell(5).setCellValue((String) dataList.get(i).get("lawsName"));
|
||||||
row.createCell(6).setCellValue((String) dataList.get(i).get("dutyIdName"));
|
row.createCell(6).setCellValue((String) dataList.get(i).get("projectName"));
|
||||||
|
row.createCell(7).setCellValue((String) dataList.get(i).get("dutyTerritory"));
|
||||||
|
row.createCell(8).setCellValue((String) dataList.get(i).get("problemState"));
|
||||||
|
row.createCell(9).setCellValue((String) dataList.get(i).get("description"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
String path = uploadpath + "/tempZip";
|
||||||
|
File fileTemp = new File(path);
|
||||||
|
if (fileTemp.exists()) {
|
||||||
|
fileTemp.delete();
|
||||||
|
}
|
||||||
|
fileTemp.mkdirs();
|
||||||
|
String name = "";
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
name = "问题管理";
|
||||||
|
}else{
|
||||||
|
name = "Problem management";
|
||||||
|
}
|
||||||
|
OutputStream excelOS = new FileOutputStream(path + File.separator + name + sdfTemp.format(new Date())+".xlsx");
|
||||||
|
workbook.write(excelOS);
|
||||||
|
excelOS.flush();
|
||||||
|
|
||||||
|
//处理文件
|
||||||
|
List<Object> connectIdList = new ArrayList<>();
|
||||||
|
List<Object> fileList = dataList.stream()
|
||||||
|
.filter(e -> ObjectUtils.isNotEmpty(e.get("file"))).map(e -> e.get("file")).collect(Collectors.toList());
|
||||||
|
List<Object> approvalEvidenceList = dataList.stream()
|
||||||
|
.filter(e -> ObjectUtils.isNotEmpty(e.get("approvalEvidence"))).map(e -> e.get("approvalEvidence")).collect(Collectors.toList());
|
||||||
|
if(!fileList.isEmpty()){
|
||||||
|
connectIdList.addAll(fileList);
|
||||||
|
}
|
||||||
|
if(!approvalEvidenceList.isEmpty()){
|
||||||
|
connectIdList.addAll(approvalEvidenceList);
|
||||||
|
}
|
||||||
|
if(!connectIdList.isEmpty()){
|
||||||
|
List<OSSFile> fileInfosList = iOSSFileService.getFileInfosByConnectId(StringUtils.join(connectIdList, ","));
|
||||||
|
for (Map<String, Object> map : dataList) {
|
||||||
|
String title = (String) map.get("title");
|
||||||
|
String createTime = "";
|
||||||
|
if(ObjectUtils.isNotEmpty(map.get("createTime"))){
|
||||||
|
createTime = String.valueOf(map.get("createTime")).split(" ")[0];
|
||||||
|
}
|
||||||
|
String folder = title+createTime;
|
||||||
|
List<String> connectIdListTemp = new ArrayList<>();
|
||||||
|
if(ObjectUtils.isNotEmpty(map.get("file"))){
|
||||||
|
connectIdListTemp.add((String) map.get("file"));
|
||||||
|
}
|
||||||
|
if(ObjectUtils.isNotEmpty(map.get("approvalEvidence"))){
|
||||||
|
connectIdListTemp.add((String) map.get("approvalEvidence"));
|
||||||
|
}
|
||||||
|
if(!connectIdListTemp.isEmpty()){
|
||||||
|
List<OSSFile> ossFileList = fileInfosList.stream().filter(e -> connectIdListTemp.contains(e.getConnectId())).collect(Collectors.toList());
|
||||||
|
if (ossFileList.size() != 0) {
|
||||||
|
String fileNowPath = path + File.separator + folder;
|
||||||
|
File file = new File(fileNowPath);
|
||||||
|
if (file.exists()) {
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
file.mkdirs();
|
||||||
|
for (OSSFile ossFile : ossFileList) {
|
||||||
|
String url = ossFile.getUrl();
|
||||||
|
//判断文件是否存在
|
||||||
|
if(StringUtils.isNotBlank(url)){
|
||||||
|
//判断文件是否存在
|
||||||
|
boolean b = CosBootUtil.doesObjectExist(url);
|
||||||
|
if(b){
|
||||||
|
InputStream download = CosBootUtil.download(url);
|
||||||
|
if(url.endsWith(".pdf") || url.endsWith(".PDF")){
|
||||||
|
String currentTime = sdf.format(new Date());
|
||||||
|
String waterContent = loginUser.getUsername() + " " + currentTime;
|
||||||
|
File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent);
|
||||||
|
download = new FileInputStream(newFile.getPath());
|
||||||
|
}
|
||||||
|
documentLibraryEOService.copyFile(download, fileNowPath + File.separator + ossFile.getFileName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ZipUtil.zip(path, path + ".zip");
|
||||||
|
//文件
|
||||||
|
FileInputStream fis = new FileInputStream(path + ".zip");
|
||||||
os = response.getOutputStream();
|
os = response.getOutputStream();
|
||||||
workbook.write(os);
|
|
||||||
|
int len = 0;
|
||||||
|
while ((len = fis.read()) != -1) {
|
||||||
|
os.write(len);
|
||||||
|
}
|
||||||
os.flush();
|
os.flush();
|
||||||
|
fis.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
@@ -10406,8 +11013,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
}else{
|
}else{
|
||||||
throw new JeroBootException("Export failure");
|
throw new JeroBootException("Export failure");
|
||||||
}
|
}
|
||||||
} finally {
|
}finally {
|
||||||
IOUtils.closeQuietly(os);
|
IOUtils.closeQuietly(os);
|
||||||
|
File file = new File(uploadpath + "/tempZip");
|
||||||
|
FileUtil.deleteContents(file);
|
||||||
|
File fileTemp = new File(uploadpath + "/tempZip.zip");
|
||||||
|
FileUtil.deleteContents(fileTemp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+42
@@ -2,15 +2,22 @@ package com.jero.modules.project.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.system.vo.DictModel;
|
||||||
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||||
import com.jero.modules.project.entity.ProjectYearNameInfoEO;
|
import com.jero.modules.project.entity.ProjectYearNameInfoEO;
|
||||||
|
import com.jero.modules.project.mapper.ProblemManagementEOMapper;
|
||||||
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||||
import com.jero.modules.project.service.IProjectNameInfoEOService;
|
import com.jero.modules.project.service.IProjectNameInfoEOService;
|
||||||
import com.jero.modules.space.service.SpaceServiceImpl;
|
import com.jero.modules.space.service.SpaceServiceImpl;
|
||||||
|
import com.jero.modules.system.enums.DicCodeEnum;
|
||||||
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
|
import com.jero.modules.system.util.StringUtils;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -30,6 +37,12 @@ public class ProjectNameInfoEOServiceImpl extends ServiceImpl<ProjectNameInfoEOM
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectYearNameInfoEOServiceImpl projectYearNameInfoEOService;
|
private ProjectYearNameInfoEOServiceImpl projectYearNameInfoEOService;
|
||||||
|
@Autowired
|
||||||
|
private ProblemManagementEOMapper problemManagementEOMapper;
|
||||||
|
@Autowired
|
||||||
|
private ISysDictService sysDictService;
|
||||||
|
@Autowired
|
||||||
|
private ProblemManagementEOServiceImpl problemManagementEOService;
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -112,6 +125,35 @@ public class ProjectNameInfoEOServiceImpl extends ServiceImpl<ProjectNameInfoEOM
|
|||||||
// List<ProjectNameInfoEO> projectNameAndYear = projectNameInfoEOMapper.selectProjectNameAndYear();
|
// List<ProjectNameInfoEO> projectNameAndYear = projectNameInfoEOMapper.selectProjectNameAndYear();
|
||||||
return projectNameInfoEOList;
|
return projectNameInfoEOList;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProjectLibraryBase> queryProjectNameList(String cut) {
|
||||||
|
List<ProjectLibraryBase> projectLibraryBaseList = problemManagementEOMapper.queryByIds(null);
|
||||||
|
//目标市场数据字典
|
||||||
|
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||||
|
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||||
|
//目标市场
|
||||||
|
String targetMarket = problemManagementEOService.getMarket(cut, targetMarketList, projectLibraryBase);
|
||||||
|
//主项目的版本号
|
||||||
|
String projectVersion = "";
|
||||||
|
if(com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getParentId())){
|
||||||
|
projectVersion = "00";
|
||||||
|
}else{
|
||||||
|
projectVersion = projectLibraryBase.getProjectVersion();
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(projectLibraryBase.getYearName())){
|
||||||
|
projectLibraryBase.setProjectName(projectLibraryBase.getProjectName()
|
||||||
|
+ "-" + projectLibraryBase.getYearName()
|
||||||
|
+ "-" + targetMarket
|
||||||
|
+"-"+projectVersion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return projectLibraryBaseList;
|
||||||
|
}
|
||||||
|
|
||||||
/* @Override
|
/* @Override
|
||||||
public void getSpaceInfo(String cut){
|
public void getSpaceInfo(String cut){
|
||||||
|
|||||||
+109
-18
@@ -1,6 +1,8 @@
|
|||||||
package com.jero.modules.project.vo;
|
package com.jero.modules.project.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@@ -33,10 +35,12 @@ public class NcrTrackVO implements Serializable {
|
|||||||
|
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "创建日期")
|
@ApiModelProperty(value = "修改日期")
|
||||||
private java.util.Date createTime;
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
//中英文切换
|
//中英文切换
|
||||||
private String cut;
|
private String cut;
|
||||||
@@ -45,29 +49,61 @@ public class NcrTrackVO implements Serializable {
|
|||||||
private String standId;
|
private String standId;
|
||||||
|
|
||||||
//编号
|
//编号
|
||||||
@Excel(name = "编号", width = 20)
|
|
||||||
private String serialNumber;
|
private String serialNumber;
|
||||||
|
|
||||||
//标题
|
//标题
|
||||||
@Excel(name = "标题", width = 20)
|
@Excel(name = "标题", width = 20)
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
//流程类型
|
@Excel(name = "问题类型", width = 20)
|
||||||
@Excel(name = "流程类型", width = 20)
|
private String problemType_dictText;
|
||||||
private String flowType;
|
|
||||||
|
|
||||||
//责任领域 duty_territory
|
/**ps_issue*/
|
||||||
// @Dict(dicCode ="duty_territory")
|
@ApiModelProperty(value = "ps_issue")
|
||||||
@Excel(name = "责任领域", width = 20,dicCode ="duty_territory")
|
@Excel(name = "PS_ISSUE", width = 20)
|
||||||
|
private java.lang.String psIssue;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
@Excel(name = "创建人", width = 20)
|
||||||
|
private java.lang.String createBy;
|
||||||
|
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
// @Excel(name = "创建时间", width = 20)
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
@Excel(name = "创建时间", width = 20)
|
||||||
|
private String createTimeStr;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "相关法规")
|
||||||
|
@Excel(name = "相关法规", width = 20)
|
||||||
|
private String lawsName;
|
||||||
|
|
||||||
|
@Excel(name = "相关项目", width = 20)
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@Dict(dicCode ="duty_territory")
|
||||||
|
@Excel(name = "责任部门", width = 20)
|
||||||
private String dutyTerritory;
|
private String dutyTerritory;
|
||||||
|
|
||||||
|
/**问题状态*/
|
||||||
|
@ApiModelProperty(value = "问题状态")
|
||||||
|
@Excel(name = "问题状态", width = 20)
|
||||||
|
private java.lang.String problemState;
|
||||||
|
|
||||||
|
/**描述和分析*/
|
||||||
|
@ApiModelProperty(value = "描述和分析")
|
||||||
|
@Excel(name = "描述和分析", width = 20)
|
||||||
|
private java.lang.String description;
|
||||||
|
|
||||||
|
|
||||||
|
//流程类型
|
||||||
|
private String flowType;
|
||||||
|
|
||||||
//流程类型标识(枚举)
|
//流程类型标识(枚举)
|
||||||
private String flowTypeNumber;
|
private String flowTypeNumber;
|
||||||
|
|
||||||
//相关项目
|
|
||||||
@Excel(name = "相关项目", width = 20)
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
//目标市场
|
//目标市场
|
||||||
private String targetMarket;
|
private String targetMarket;
|
||||||
|
|
||||||
@@ -78,15 +114,12 @@ public class NcrTrackVO implements Serializable {
|
|||||||
private String projectVersion;
|
private String projectVersion;
|
||||||
|
|
||||||
//问题类型
|
//问题类型
|
||||||
@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
|
||||||
@@ -103,8 +136,6 @@ public class NcrTrackVO implements Serializable {
|
|||||||
//验证符合性确认 verify_p_id
|
//验证符合性确认 verify_p_id
|
||||||
private String verifyPId;
|
private String verifyPId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//设计发起人 design_initiator_id
|
//设计发起人 design_initiator_id
|
||||||
private String designInitiatorId;
|
private String designInitiatorId;
|
||||||
//pre发起人 prehomo_initiator_id
|
//pre发起人 prehomo_initiator_id
|
||||||
@@ -160,5 +191,65 @@ public class NcrTrackVO implements Serializable {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**相关法规*/
|
||||||
|
@ApiModelProperty(value = "相关法规")
|
||||||
|
private java.lang.String lawsId;
|
||||||
|
|
||||||
|
/**相关项目*/
|
||||||
|
@ApiModelProperty(value = "相关项目")
|
||||||
|
private java.lang.String projectId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**相关文件链接*/
|
||||||
|
@ApiModelProperty(value = "相关文件链接")
|
||||||
|
private java.lang.String fileLink;
|
||||||
|
|
||||||
|
/**相关文件*/
|
||||||
|
@ApiModelProperty(value = "相关文件")
|
||||||
|
private java.lang.String file;
|
||||||
|
|
||||||
|
/**进度追踪*/
|
||||||
|
@ApiModelProperty(value = "进度追踪")
|
||||||
|
private java.lang.String progressTracking;
|
||||||
|
|
||||||
|
/**结论*/
|
||||||
|
@ApiModelProperty(value = "结论")
|
||||||
|
private java.lang.String conclusion;
|
||||||
|
|
||||||
|
/**审批证据*/
|
||||||
|
@ApiModelProperty(value = "审批证据")
|
||||||
|
private java.lang.String approvalEvidence;
|
||||||
|
|
||||||
|
/**审批证据链接*/
|
||||||
|
@ApiModelProperty(value = "审批证据链接")
|
||||||
|
private java.lang.String approvalEvidenceLink;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "相关文件地址链接(前端传参)")
|
||||||
|
private List<ProblemManagementVO> fileLinkList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "进度追踪(前端传参)")
|
||||||
|
private List<ProblemManagementVO> progressTrackingList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批证据链接(前端传参)")
|
||||||
|
private List<ProblemManagementVO> approvalEvidenceLinkList;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "详情文件回显")
|
||||||
|
private List<OSSFile> fileList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "详情文件回显")
|
||||||
|
private List<OSSFile> approvalEvidenceFileList;
|
||||||
|
|
||||||
|
//用于区分旧数据和新数据(旧数据->old,新数据->new)
|
||||||
|
@ApiModelProperty(value = "旧数据->old,新数据->new")
|
||||||
|
private String flag;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+254
@@ -0,0 +1,254 @@
|
|||||||
|
package com.jero.modules.project.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
|
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.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 项目未符合项跟踪
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
public class NcrTrackVOEn implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
//任务清单id
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
//用于导出时勾选数据
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@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 updateTime;
|
||||||
|
|
||||||
|
//中英文切换
|
||||||
|
private String cut;
|
||||||
|
|
||||||
|
//文档库ID
|
||||||
|
private String standId;
|
||||||
|
|
||||||
|
//编号
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
//标题
|
||||||
|
@Excel(name = "Title", width = 20)
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Excel(name = "Issue Type", width = 20)
|
||||||
|
private String problemType_dictText;
|
||||||
|
|
||||||
|
/**ps_issue*/
|
||||||
|
@ApiModelProperty(value = "ps_issue")
|
||||||
|
@Excel(name = "PS-ISSUE", width = 20)
|
||||||
|
private String psIssue;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
@Excel(name = "Creator", width = 20)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
// @Excel(name = "Create Date", width = 20)
|
||||||
|
private java.util.Date createTime;
|
||||||
|
@Excel(name = "Create Date", width = 20)
|
||||||
|
private String createTimeStr;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "相关法规")
|
||||||
|
@Excel(name = " Related Regualtions", width = 20)
|
||||||
|
private String lawsName;
|
||||||
|
|
||||||
|
@Excel(name = "Related Project", width = 20)
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@Dict(dicCode ="duty_territory")
|
||||||
|
@Excel(name = "Resonsible Field", width = 20)
|
||||||
|
private String dutyTerritory;
|
||||||
|
|
||||||
|
/**问题状态*/
|
||||||
|
@ApiModelProperty(value = "问题状态")
|
||||||
|
@Excel(name = "Status", width = 20)
|
||||||
|
private String problemState;
|
||||||
|
|
||||||
|
/**描述和分析*/
|
||||||
|
@ApiModelProperty(value = "描述和分析")
|
||||||
|
@Excel(name = "Description", width = 20)
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
//流程类型
|
||||||
|
private String flowType;
|
||||||
|
|
||||||
|
//流程类型标识(枚举)
|
||||||
|
private String flowTypeNumber;
|
||||||
|
|
||||||
|
//目标市场
|
||||||
|
private String targetMarket;
|
||||||
|
|
||||||
|
//年款
|
||||||
|
private String yearName;
|
||||||
|
|
||||||
|
//项目版本
|
||||||
|
private String projectVersion;
|
||||||
|
|
||||||
|
//问题类型
|
||||||
|
private String problemType;
|
||||||
|
|
||||||
|
//发起人
|
||||||
|
private String initiator;
|
||||||
|
|
||||||
|
//责任人
|
||||||
|
private String duty;
|
||||||
|
|
||||||
|
//项目库id
|
||||||
|
private String projectLibraryId;
|
||||||
|
//不符合
|
||||||
|
private String inconformity;
|
||||||
|
//待追踪
|
||||||
|
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<NcrTrackVOEn> ncrTrackVOList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
//以下字段跳转适用(还有项目库id)
|
||||||
|
//待办任务id
|
||||||
|
private String taskId;
|
||||||
|
//法规清单id
|
||||||
|
private String projectLawsInventoryId;
|
||||||
|
//流程实例id
|
||||||
|
private String prcId;
|
||||||
|
//流程类型
|
||||||
|
private String prcType;
|
||||||
|
//状态:待办 、已办
|
||||||
|
private String status;
|
||||||
|
//任务清单详情id
|
||||||
|
private String projectTaskInventoryDetailId;
|
||||||
|
//任务节点定义key
|
||||||
|
private String taskDefinitionKey;
|
||||||
|
//是否是系统管理员角色
|
||||||
|
private String administrator;
|
||||||
|
|
||||||
|
|
||||||
|
//排序(1->正序, 2->倒序)
|
||||||
|
private String orderBy;
|
||||||
|
|
||||||
|
//排序字段
|
||||||
|
private String orderByField;
|
||||||
|
|
||||||
|
private String flowStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**相关法规*/
|
||||||
|
@ApiModelProperty(value = "相关法规")
|
||||||
|
private String lawsId;
|
||||||
|
|
||||||
|
/**相关项目*/
|
||||||
|
@ApiModelProperty(value = "相关项目")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**相关文件链接*/
|
||||||
|
@ApiModelProperty(value = "相关文件链接")
|
||||||
|
private String fileLink;
|
||||||
|
|
||||||
|
/**相关文件*/
|
||||||
|
@ApiModelProperty(value = "相关文件")
|
||||||
|
private String file;
|
||||||
|
|
||||||
|
/**进度追踪*/
|
||||||
|
@ApiModelProperty(value = "进度追踪")
|
||||||
|
private String progressTracking;
|
||||||
|
|
||||||
|
/**结论*/
|
||||||
|
@ApiModelProperty(value = "结论")
|
||||||
|
private String conclusion;
|
||||||
|
|
||||||
|
/**审批证据*/
|
||||||
|
@ApiModelProperty(value = "审批证据")
|
||||||
|
private String approvalEvidence;
|
||||||
|
|
||||||
|
/**审批证据链接*/
|
||||||
|
@ApiModelProperty(value = "审批证据链接")
|
||||||
|
private String approvalEvidenceLink;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "相关文件地址链接(前端传参)")
|
||||||
|
private List<ProblemManagementVO> fileLinkList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "进度追踪(前端传参)")
|
||||||
|
private List<ProblemManagementVO> progressTrackingList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批证据链接(前端传参)")
|
||||||
|
private List<ProblemManagementVO> approvalEvidenceLinkList;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "详情文件回显")
|
||||||
|
private List<OSSFile> fileList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "详情文件回显")
|
||||||
|
private List<OSSFile> approvalEvidenceFileList;
|
||||||
|
|
||||||
|
//用于区分旧数据和新数据(旧数据->old,新数据->new)
|
||||||
|
@ApiModelProperty(value = "旧数据->old,新数据->new")
|
||||||
|
private String flag;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.jero.modules.project.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
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: 2023-09-05
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ProblemManagementVO implements Serializable {
|
||||||
|
|
||||||
|
private String fileLink;
|
||||||
|
private String progressTracking;
|
||||||
|
private String approvalEvidenceLink;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1955,6 +1955,16 @@ module.exports = {
|
|||||||
Reasonforreturn:'Reason for return',
|
Reasonforreturn:'Reason for return',
|
||||||
maintenanceTemplate:'Maintenance template',
|
maintenanceTemplate:'Maintenance template',
|
||||||
UserFeedback:'User Feedback',
|
UserFeedback:'User Feedback',
|
||||||
|
Relevantlawsregulations:'Relevant laws and regulations',
|
||||||
|
Problemstate:'Problem state',
|
||||||
|
descriptions:'Descriptions',
|
||||||
|
documents:'Documents',
|
||||||
|
examineapproveevidence:'Examine and approve evidence',
|
||||||
|
conculsion:'Conculsion',
|
||||||
|
progresstracking:'Progress Tracking',
|
||||||
|
Fileupload:'File upload',
|
||||||
|
Addresslink:'Address link',
|
||||||
|
Problemanagement:'Problem management',
|
||||||
Correspondingversion:'Corresponding version',
|
Correspondingversion:'Corresponding version',
|
||||||
Listcreationtime:'List creation time',
|
Listcreationtime:'List creation time',
|
||||||
Chinesecharacters:'The role code cannot enter Chinese characters',
|
Chinesecharacters:'The role code cannot enter Chinese characters',
|
||||||
|
|||||||
@@ -3915,4 +3915,14 @@ module.exports = {
|
|||||||
Listcreationtime:'清单创建时间',
|
Listcreationtime:'清单创建时间',
|
||||||
Chinesecharacters:'角色编码不可以输入汉字',
|
Chinesecharacters:'角色编码不可以输入汉字',
|
||||||
alreadyexistssystem:'角色编码已存在',
|
alreadyexistssystem:'角色编码已存在',
|
||||||
|
Relevantlawsregulations:'相关法规',
|
||||||
|
Problemstate:'问题状态',
|
||||||
|
descriptions:'描述和分析',
|
||||||
|
documents:'相关文件',
|
||||||
|
examineapproveevidence:'审批证据',
|
||||||
|
conculsion:'结论',
|
||||||
|
progresstracking:'进度追踪',
|
||||||
|
Fileupload:'文件上传',
|
||||||
|
Addresslink:'地址链接',
|
||||||
|
Problemanagement:'问题管理',
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,778 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="900"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('title')">{{$t('title')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="title">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.title'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('title')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('problemType')">{{$t('problemType')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="problemType">
|
||||||
|
<j-dict-select-tag class="box-input" v-model="formInline.problemType"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('problemType')"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'wen4_ti2_lei4_xing2'"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="'PS-issue'">{{'PS-issue'}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="issue">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.psIssue'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+'PS-issue'"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('Relevantlawsregulations')">{{$t('Relevantlawsregulations')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||||
|
<Standardselection
|
||||||
|
:query="{'db_field_txt':$t('Relevantlawsregulations')}"
|
||||||
|
:standard="formInline"
|
||||||
|
:disabled="false"
|
||||||
|
@input="Standardselectioninput"
|
||||||
|
@change="StandardselectionChange"
|
||||||
|
v-model="formInline.lawsName"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('RelatedItems')">{{$t('RelatedItems')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||||
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
|
v-model="formInline.projectId"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
showSearch
|
||||||
|
mode="multiple"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:autoClearSearchValue="false"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
|
||||||
|
<a-select-option v-for="(item, key) in projectNameList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.id">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||||
|
{{ item.projectName}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||||
|
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||||
|
allowClear
|
||||||
|
show-search
|
||||||
|
mode="multiple"
|
||||||
|
class="box-input-search"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
v-model="formInline.dutyTerritory">
|
||||||
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.key"
|
||||||
|
:value="item.key">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.key ">
|
||||||
|
{{ item.key }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('Problemstate')">{{$t('Problemstate')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||||
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
|
v-model="formInline.problemState"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
showSearch
|
||||||
|
optionFilterProp="label"
|
||||||
|
:autoClearSearchValue="false"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('Problemstate')">
|
||||||
|
<a-select-option v-for="(item, key) in ProblemstateList"
|
||||||
|
:label='item'
|
||||||
|
:key="key"
|
||||||
|
:value="item">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item">
|
||||||
|
{{ item }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="descriptions">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.description'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('descriptions')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('documents')">{{$t('documents')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="fileLink">
|
||||||
|
<div v-for="(item,index) in formInline.fileLinkList" :key="index">
|
||||||
|
<a-input class="box-input"
|
||||||
|
style='width: 88%'
|
||||||
|
v-model='item.fileLink'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
|
||||||
|
<a-icon class="icon-text" @click="addClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||||
|
v-if="formInline.fileLinkList.length - 1 == index"
|
||||||
|
type="plus"/>
|
||||||
|
<a-icon class="icon-text" v-if="formInline.fileLinkList.length > 1 && formInline.fileLinkList.length - 1 !== index" style='margin-left: 10px;font-size: 18px;'
|
||||||
|
@click="deleteClick(index)"
|
||||||
|
type="minus"/>
|
||||||
|
</div>
|
||||||
|
<a-button type="primary" class="button-text"
|
||||||
|
@click="clickButtonToUpload('file')">
|
||||||
|
{{ (formInline.file === 'null' || formInline.file === '' ||
|
||||||
|
formInline.file == null) ? $t('Fileupload') : $t('viewUploadedFiles')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('progresstracking')">{{$t('progresstracking')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="progresstracking">
|
||||||
|
<div v-for="(item,index) in formInline.progressTrackingList" :key="index">
|
||||||
|
<!-- <span>{{item}}</span>-->
|
||||||
|
<a-input class="box-input"
|
||||||
|
style='width: 88%'
|
||||||
|
v-model='item.progressTracking'
|
||||||
|
:disabled="true"
|
||||||
|
:title='item.progressTracking'
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('progresstracking')"/>
|
||||||
|
<a @click="addprogresstrackingClick(index)" style='margin-left: 10px' v-if="formInline.progressTrackingList.length - 1 == index">{{$t('newlyAdded')}}</a>
|
||||||
|
<a @click="deleteprogresstrackingClick(index,item)" v-if="formInline.progressTrackingList.length > 0" :disabled="disabled" style='margin-left: 10px' >{{$t('delete')}}</a>
|
||||||
|
</div>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('conculsion')">{{$t('conculsion')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="conclusion">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.conclusion'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('conculsion')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('examineapproveevidence')">{{$t('examineapproveevidence')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="approvalEvidenceLink">
|
||||||
|
<div v-for="(item,index) in formInline.approvalEvidenceLinkList" :key="index">
|
||||||
|
<a-input class="box-input"
|
||||||
|
style='width: 88%'
|
||||||
|
v-model='item.approvalEvidenceLink'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
|
||||||
|
<a-icon class="icon-text" @click="addvidenceClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||||
|
v-if="formInline.approvalEvidenceLinkList.length - 1 == index"
|
||||||
|
type="plus"/>
|
||||||
|
<a-icon class="icon-text" v-if="formInline.approvalEvidenceLinkList.length > 1 && formInline.approvalEvidenceLinkList.length - 1 !== index"
|
||||||
|
style='margin-left: 10px;font-size: 18px;' @click="deletevidenceClick(index)"
|
||||||
|
type="minus" :disabled="disabled"/>
|
||||||
|
</div>
|
||||||
|
<a-button type="primary" class="button-text"
|
||||||
|
@click="clickButtonToUpload('approvalEvidence')">
|
||||||
|
{{ (formInline.approvalEvidence === 'null' || formInline.approvalEvidence === '' ||
|
||||||
|
formInline.approvalEvidence == null) ? $t('Fileupload') : $t('viewUploadedFiles')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-spin>
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
<!-- <addModel ref="addModelRef" @addModelForm="addModelForm"/>-->
|
||||||
|
<a-modal
|
||||||
|
:title="$t('progresstracking')"
|
||||||
|
:width="600"
|
||||||
|
:visible="visibletrack"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
:maskClosable="false"
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="Cancel"
|
||||||
|
>
|
||||||
|
<a-form-model :model="formInlinetracking" class="formAdd" :rules="rulestracking" ref="ruleFormtracking">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('progresstracking')">
|
||||||
|
{{$t('progresstracking')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="progressTracking">
|
||||||
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('progresstracking')"
|
||||||
|
v-model="formInlinetracking.progressTracking"
|
||||||
|
style="width: 90%"
|
||||||
|
:maxLength="500"
|
||||||
|
:rows="4"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-modal>
|
||||||
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import defaultTemplate from './defaultTemplate'
|
||||||
|
// import solicitOpinions from './solicitOpinions'
|
||||||
|
// import releaseStandard from './releaseStandard'
|
||||||
|
// import industryTemplate from './industryTemplate'
|
||||||
|
// import addModel from './a/ddModel'
|
||||||
|
import Standardselection from '@/components/Standardselection/index'
|
||||||
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
|
import { getAction, postAction,putAction, downloadFile } from '@/api/manage'
|
||||||
|
import moment from 'moment'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'fillAdd',
|
||||||
|
components: {
|
||||||
|
// defaultTemplate,
|
||||||
|
// solicitOpinions,
|
||||||
|
// releaseStandard,
|
||||||
|
// industryTemplate,
|
||||||
|
// addModel
|
||||||
|
Standardselection,
|
||||||
|
uploadFile,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
rules: {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('title') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
problemType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('problemType') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
visibletrack: false,
|
||||||
|
rulestracking:{
|
||||||
|
progressTracking: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('text') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
formInline: {
|
||||||
|
fileLinkList:[{}],
|
||||||
|
progressTrackingList:[{}],
|
||||||
|
approvalEvidenceLinkList:[{}],
|
||||||
|
dutyTerritory:undefined,
|
||||||
|
projectId:undefined,
|
||||||
|
problemState:undefined,
|
||||||
|
},
|
||||||
|
formInlinetracking:{},
|
||||||
|
confirmLoading: false,
|
||||||
|
title: '',
|
||||||
|
disabled: false,
|
||||||
|
isTrue: false,
|
||||||
|
chapterContentsList: [],
|
||||||
|
firstLevelDutyTerritoryList:[],
|
||||||
|
projectNameList: [],
|
||||||
|
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
|
||||||
|
templateDisabled: false,
|
||||||
|
contentTemplateList: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
text: this.$t('defaultTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
text: this.$t('newRequestCommentListTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
text: this.$t('NewReleasedStandardTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '4',
|
||||||
|
text: this.$t('industryInformationDynamicTemplate')
|
||||||
|
}
|
||||||
|
],
|
||||||
|
index:'',
|
||||||
|
url: {
|
||||||
|
add: '/project/problemManagementEO/add',
|
||||||
|
edit: '/project/problemManagementEO/edit',
|
||||||
|
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// bringInStandardInformationClick() {
|
||||||
|
// this.$refs.addModelRef.addModel()
|
||||||
|
// },
|
||||||
|
getNameList() {
|
||||||
|
getAction('/project/projectNameInfoEO/queryProjectNameList', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.projectNameList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.projectNameList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addModelForm(value) {
|
||||||
|
this.$refs.defaultTemplateRef.getStandData(value)
|
||||||
|
},
|
||||||
|
getFirstLevelDutyTerritory() {
|
||||||
|
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.firstLevelDutyTerritoryList = res.result
|
||||||
|
} else {
|
||||||
|
this.firstLevelDutyTerritoryList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
StandardselectionChange(value, id) {
|
||||||
|
this.formInline.lawsId = id
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
Standardselectioninput(val){
|
||||||
|
this.formInline.lawsName = val
|
||||||
|
},
|
||||||
|
clickButtonToUpload(item) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
this.$refs.uploadFile.visible = true
|
||||||
|
this.uploadName = item
|
||||||
|
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||||
|
} else {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 上传文件的回调 */
|
||||||
|
uploadSuccess(data) {
|
||||||
|
let attIdList = []
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
data.map(item => {
|
||||||
|
attIdList.push(item.id || data.name)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 赋值给当前对应的表单文件 */
|
||||||
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
add() {
|
||||||
|
this.templateDisabled = false
|
||||||
|
this.getNameList()
|
||||||
|
this.getFirstLevelDutyTerritory()
|
||||||
|
this.title = this.$t('newlyAdded')
|
||||||
|
this.visible = true
|
||||||
|
this.disabled = false
|
||||||
|
this.formInline = {
|
||||||
|
fileLinkList:[{}],
|
||||||
|
progressTrackingList:[{}],
|
||||||
|
approvalEvidenceLinkList:[{}]
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit(row) {
|
||||||
|
console.log(row)
|
||||||
|
this.getNameList()
|
||||||
|
this.getFirstLevelDutyTerritory()
|
||||||
|
this.title = this.$t('edit')
|
||||||
|
this.formInline = row
|
||||||
|
if(this.formInline.dutyTerritory != null){
|
||||||
|
this.formInline.dutyTerritory = this.formInline.dutyTerritory.split(',')
|
||||||
|
}else{
|
||||||
|
this.formInline.dutyTerritory = undefined
|
||||||
|
}
|
||||||
|
if(this.formInline.problemState == null){
|
||||||
|
this.formInline.problemState = undefined
|
||||||
|
}
|
||||||
|
if(this.formInline.progressTrackingList == null){
|
||||||
|
this.formInline.progressTrackingList = [{}]
|
||||||
|
}
|
||||||
|
if(this.formInline.approvalEvidenceLinkList == null){
|
||||||
|
this.formInline.approvalEvidenceLinkList = [{}]
|
||||||
|
}
|
||||||
|
if(this.formInline.fileLinkList == null){
|
||||||
|
this.formInline.fileLinkList = [{}]
|
||||||
|
}
|
||||||
|
if(this.formInline.projectId != null){
|
||||||
|
this.formInline.projectId = this.formInline.projectId.split(',')
|
||||||
|
}else{
|
||||||
|
this.formInline.projectId = undefined
|
||||||
|
}
|
||||||
|
console.log(this.formInline)
|
||||||
|
this.visible = true
|
||||||
|
this.disabled = false
|
||||||
|
this.templateDisabled = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addClick(index){
|
||||||
|
this.formInline.fileLinkList.splice(index + 1, 0, {})
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
deleteClick(index) {
|
||||||
|
this.formInline.fileLinkList.splice(index, 1)
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
addvidenceClick(index){
|
||||||
|
this.formInline.approvalEvidenceLinkList.splice(index + 1, 0, {})
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
deletevidenceClick(index) {
|
||||||
|
this.formInline.approvalEvidenceLinkList.splice(index, 1)
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
addprogresstrackingClick(index){
|
||||||
|
this.index = index
|
||||||
|
this.formInlinetracking = {}
|
||||||
|
this.visibletrack = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInlinetracking = { ...this.formInlinetracking }
|
||||||
|
this.isTrue = true
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
deleteprogresstrackingClick(index,item) {
|
||||||
|
if(item.progressTracking && item.progressTracking != ''){
|
||||||
|
if(index == 0){
|
||||||
|
item.progressTracking = ''
|
||||||
|
}else{
|
||||||
|
this.formInline.progressTrackingList.splice(index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
Cancel(){
|
||||||
|
this.visibletrack = false
|
||||||
|
this.formInlinetracking = {}
|
||||||
|
this.$refs.ruleFormtracking.clearValidate()
|
||||||
|
},
|
||||||
|
handleOk(){
|
||||||
|
console.log(this.formInlinetracking)
|
||||||
|
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
this.$refs.ruleFormtracking.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.progressTracking
|
||||||
|
this.formInline.progressTrackingList.forEach((item,index) => {
|
||||||
|
console.log(item.progressTracking)
|
||||||
|
if(!item.progressTracking){
|
||||||
|
this.formInline.progressTrackingList.splice(0,1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.formInline.progressTrackingList.splice(this.index+1, 1, {progressTracking:text})
|
||||||
|
this.visibletrack = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
console.log(this.formInline)
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.confirmLoading = true
|
||||||
|
let url = ''
|
||||||
|
let action = ''
|
||||||
|
if (this.title == this.$t('newlyAdded')) {
|
||||||
|
url = this.url.add
|
||||||
|
action = postAction
|
||||||
|
} else {
|
||||||
|
url = this.url.edit
|
||||||
|
action = putAction
|
||||||
|
}
|
||||||
|
// Object.keys(formInline).forEach(res => {
|
||||||
|
// if (formInline[res] && formInline[res] instanceof Array) {
|
||||||
|
// formInline[res] = formInline[res].join(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
if(this.formInline.dutyTerritory && this.formInline.dutyTerritory instanceof Array){
|
||||||
|
this.formInline.dutyTerritory = this.formInline.dutyTerritory.join(',')
|
||||||
|
}
|
||||||
|
if(this.formInline.projectId && this.formInline.projectId instanceof Array){
|
||||||
|
this.formInline.projectId = this.formInline.projectId.join(',')
|
||||||
|
}
|
||||||
|
// let fileLinkList = []
|
||||||
|
// let approvalEvidenceLinkList = []
|
||||||
|
// let progressTrackingList = []
|
||||||
|
// if(this.formInline.fileLinkList){
|
||||||
|
// this.formInline.fileLinkList.forEach(item => {
|
||||||
|
// if(item.fileLink){
|
||||||
|
// fileLinkList.push(item.fileLink)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// this.formInline.fileLinkList = fileLinkList
|
||||||
|
// }
|
||||||
|
// if(this.formInline.approvalEvidenceLinkList){
|
||||||
|
// this.formInline.approvalEvidenceLinkList.forEach(item => {
|
||||||
|
// if(item.approvalEvidenceLink){
|
||||||
|
// approvalEvidenceLinkList.push(item.approvalEvidenceLink)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// this.formInline.approvalEvidenceLinkList = approvalEvidenceLinkList
|
||||||
|
// }
|
||||||
|
// if(this.formInline.progressTrackingList){
|
||||||
|
// this.formInline.progressTrackingList.forEach(item => {
|
||||||
|
// if(item.progressTracking){
|
||||||
|
// progressTrackingList.push(item.progressTracking)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// this.formInline.progressTrackingList = progressTrackingList
|
||||||
|
// }
|
||||||
|
delete this.formInline.lawsName
|
||||||
|
let query = {
|
||||||
|
// problemManagementEO:formInline
|
||||||
|
...this.formInline
|
||||||
|
}
|
||||||
|
action(url, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visible = false
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$emit('addModelForm')
|
||||||
|
} else {
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.ant-select-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 114px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemModel {
|
||||||
|
width: calc(100% - 130px);
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 100;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
height: 38px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-treenode-switcher-close {
|
||||||
|
width: 255px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-node-content-wrapper {
|
||||||
|
float: right;
|
||||||
|
margin-top: -2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-title {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,507 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="900"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('title')">{{$t('title')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="title">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.title'
|
||||||
|
:disabled="disabled"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('problemType')">{{$t('problemType')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="problemType">
|
||||||
|
<j-dict-select-tag class="box-input" v-model="formInline.problemType"
|
||||||
|
:disabled="disabled"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'wen4_ti2_lei4_xing2'"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="'PS-issue'">{{'PS-issue'}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a style='width: 273px;display: inline-block;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;margin-top: 12px;'
|
||||||
|
:title='formInline.psIssue'
|
||||||
|
@click='UserFeedback(formInline.psIssue)'>{{formInline.psIssue}}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('Relevantlawsregulations')">{{$t('Relevantlawsregulations')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:title='formInline.lawsName'
|
||||||
|
v-model='formInline.lawsName'
|
||||||
|
:disabled="disabled"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('RelatedItems')">{{$t('RelatedItems')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||||
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
|
v-model="formInline.projectId"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
showSearch
|
||||||
|
mode="multiple"
|
||||||
|
:disabled="disabled"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:autoClearSearchValue="false">
|
||||||
|
<a-select-option v-for="(item, key) in projectNameList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.id">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||||
|
{{ item.projectName}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||||
|
<a-select
|
||||||
|
allowClear
|
||||||
|
show-search
|
||||||
|
mode="multiple"
|
||||||
|
:disabled="disabled"
|
||||||
|
class="box-input-search"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
v-model="formInline.dutyTerritory">
|
||||||
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.key"
|
||||||
|
:value="item.key">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.key ">
|
||||||
|
{{ item.key }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('Problemstate')">{{$t('Problemstate')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||||
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
|
v-model="formInline.problemState"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
showSearch
|
||||||
|
:disabled="disabled"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:autoClearSearchValue="false">
|
||||||
|
<a-select-option v-for="(item, key) in ProblemstateList"
|
||||||
|
:label='item'
|
||||||
|
:key="key"
|
||||||
|
:value="item">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item">
|
||||||
|
{{ item }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="descriptions">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.description'
|
||||||
|
:disabled="disabled"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('documents')">{{$t('documents')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="fileLink">
|
||||||
|
<div v-for="(item,index) in formInline.fileLinkList" :key="index">
|
||||||
|
<a @click='UserFeedback(item.fileLink)'>{{item.fileLink}}</a>
|
||||||
|
</div>
|
||||||
|
<div v-for='(item,index) in formInline.fileList'>
|
||||||
|
<a @click='download(item)'>{{item.fileName}}</a>
|
||||||
|
</div>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('progresstracking')">{{$t('progresstracking')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="progresstracking">
|
||||||
|
<div v-for="(item,index) in formInline.progressTrackingList" :key="index">
|
||||||
|
<a-input class="box-input"
|
||||||
|
style='width: 89%'
|
||||||
|
v-model='item.progressTracking'
|
||||||
|
:title='item.progressTracking'
|
||||||
|
:disabled="true"/>
|
||||||
|
</div>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('conculsion')">{{$t('conculsion')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="conclusion">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.conclusion'
|
||||||
|
:disabled="disabled"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('examineapproveevidence')">{{$t('examineapproveevidence')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="approvalEvidenceLink">
|
||||||
|
<div v-for="(item,index) in formInline.approvalEvidenceLinkList" :key="index">
|
||||||
|
<a @click='UserFeedback(item.approvalEvidenceLink)'>{{item.approvalEvidenceLink}}</a>
|
||||||
|
</div>
|
||||||
|
<div v-for='(item,index) in formInline.approvalEvidenceFileList'>
|
||||||
|
<a @click='download(item)'>{{item.fileName}}</a>
|
||||||
|
</div>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-spin>
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('close')}}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction, postAction,putAction, downloadFile } from '@/api/manage'
|
||||||
|
import moment from 'moment'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'fillAdd',
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
rules: {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('title') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
problemType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('problemType') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
visibletrack: false,
|
||||||
|
rulestracking:{
|
||||||
|
progressTracking: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('text') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
formInline: {
|
||||||
|
fileLinkList:[{}],
|
||||||
|
progressTrackingList:[{}],
|
||||||
|
approvalEvidenceLinkList:[{}],
|
||||||
|
dutyTerritory:undefined,
|
||||||
|
projectId:undefined,
|
||||||
|
problemState:undefined,
|
||||||
|
},
|
||||||
|
formInlinetracking:{},
|
||||||
|
confirmLoading: false,
|
||||||
|
title: '',
|
||||||
|
disabled: false,
|
||||||
|
isTrue: false,
|
||||||
|
chapterContentsList: [],
|
||||||
|
firstLevelDutyTerritoryList:[],
|
||||||
|
projectNameList: [],
|
||||||
|
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
|
||||||
|
templateDisabled: false,
|
||||||
|
contentTemplateList: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
text: this.$t('defaultTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
text: this.$t('newRequestCommentListTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
text: this.$t('NewReleasedStandardTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '4',
|
||||||
|
text: this.$t('industryInformationDynamicTemplate')
|
||||||
|
}
|
||||||
|
],
|
||||||
|
index:'',
|
||||||
|
url: {
|
||||||
|
add: '/project/problemManagementEO/add',
|
||||||
|
edit: '/project/problemManagementEO/edit',
|
||||||
|
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getNameList() {
|
||||||
|
getAction('/project/projectNameInfoEO/queryProjectNameList', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.projectNameList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.projectNameList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getFirstLevelDutyTerritory() {
|
||||||
|
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.firstLevelDutyTerritoryList = res.result
|
||||||
|
} else {
|
||||||
|
this.firstLevelDutyTerritoryList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
edit(row) {
|
||||||
|
this.getNameList()
|
||||||
|
this.getFirstLevelDutyTerritory()
|
||||||
|
this.title = this.$t('view')
|
||||||
|
this.formInline = row
|
||||||
|
if(this.formInline.dutyTerritory != null){
|
||||||
|
this.formInline.dutyTerritory = this.formInline.dutyTerritory.split(',')
|
||||||
|
}else{
|
||||||
|
this.formInline.dutyTerritory = undefined
|
||||||
|
}
|
||||||
|
if(this.formInline.problemState == null){
|
||||||
|
this.formInline.problemState = undefined
|
||||||
|
}
|
||||||
|
if(this.formInline.projectId != null){
|
||||||
|
this.formInline.projectId = this.formInline.projectId.split(',')
|
||||||
|
}else{
|
||||||
|
this.formInline.projectId = undefined
|
||||||
|
}
|
||||||
|
getAction('/project/problemManagementEO/queryById', {id:this.formInline.id}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.formInline.fileList = res.result.fileList
|
||||||
|
this.formInline.approvalEvidenceFileList = res.result.approvalEvidenceFileList
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log(this.formInline)
|
||||||
|
this.visible = true
|
||||||
|
this.disabled = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
UserFeedback(item){
|
||||||
|
window.open(item, '_blank');
|
||||||
|
},
|
||||||
|
download(item){
|
||||||
|
console.log(item)
|
||||||
|
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id })
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.ant-select-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 114px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemModel {
|
||||||
|
width: calc(100% - 130px);
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 100;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
height: 38px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-treenode-switcher-close {
|
||||||
|
width: 255px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-node-content-wrapper {
|
||||||
|
float: right;
|
||||||
|
margin-top: -2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-title {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -3,128 +3,106 @@
|
|||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="6" :sm="8">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text" :title="$t('standard')">
|
|
||||||
<span>{{$t('standard')}}</span>
|
|
||||||
</div>
|
|
||||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
|
||||||
v-model="queryParam.serialNumber"></j-input>
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text" :title="$t('title')">
|
<div class="title-text" :title="$t('title')">
|
||||||
<span>{{$t('title')}}</span>
|
<span>{{$t('title')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||||
v-model="queryParam.title"></j-input>
|
v-model="queryParam.title"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text" :title="$t('areaOfResponsibility')">
|
<div class="title-text" :title="$t('Relevantlawsregulations')">
|
||||||
<span>{{$t('areaOfResponsibility')}}</span>
|
<span>{{$t('Relevantlawsregulations')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('Relevantlawsregulations')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
v-model="queryParam.lawsName"></a-input>
|
||||||
:type="'select'"
|
</div>
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
</a-col>
|
||||||
|
<a-col :md="6" :sm="8">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text" :title="$t('RelatedItems')">
|
||||||
|
<span>{{$t('RelatedItems')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
|
v-model="queryParam.projectId"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
showSearch
|
||||||
|
optionFilterProp="label"
|
||||||
|
:autoClearSearchValue="false"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
|
||||||
|
<a-select-option v-for="(item, key) in projectNameList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.id">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||||
|
{{ item.projectName}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<template v-if="toggleSearchStatus">
|
<template v-if="toggleSearchStatus">
|
||||||
<a-col :md="6" :sm="8">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text" :title="$t('ProcessType')">
|
|
||||||
<span>{{$t('ProcessType')}}</span>
|
|
||||||
</div>
|
|
||||||
<a-select allowClear
|
|
||||||
class="box-input"
|
|
||||||
v-model="queryParam.flowType"
|
|
||||||
:placeholder="$t('PleaseSelect')+$t('ProcessType')">
|
|
||||||
<a-select-option :value="this.$t('designComplianceReview')">
|
|
||||||
<span class="itemOption">
|
|
||||||
{{ $t('designComplianceReview') }}
|
|
||||||
</span>
|
|
||||||
</a-select-option>
|
|
||||||
<a-select-option :value="this.$t('preHomeConfirmation')">
|
|
||||||
<span class="itemOption">
|
|
||||||
{{ $t('preHomeConfirmation') }}
|
|
||||||
</span>
|
|
||||||
</a-select-option>
|
|
||||||
<a-select-option :value="this.$t('verificationComplianceReview')">
|
|
||||||
<span class="itemOption">
|
|
||||||
{{ $t('verificationComplianceReview') }}
|
|
||||||
</span>
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="6" :sm="8">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text" :title="$t('RelatedItems')">
|
|
||||||
<span>{{$t('RelatedItems')}}</span>
|
|
||||||
</div>
|
|
||||||
<a-select allowClear
|
|
||||||
class="box-input"
|
|
||||||
v-model="queryParam.projectName"
|
|
||||||
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
|
|
||||||
<a-select-option v-for="(item, key) in projectNameList"
|
|
||||||
:key="key"
|
|
||||||
:value="item.projectName">
|
|
||||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
|
||||||
{{ item.projectName}}
|
|
||||||
</span>
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text" :title="$t('problemType')">
|
<div class="title-text" :title="$t('problemType')">
|
||||||
<span>{{$t('problemType')}}</span>
|
<span>{{$t('problemType')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-select allowClear
|
<j-dict-select-tag class="box-input" v-model="queryParam.problemType"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('problemType')"
|
||||||
|
:type="'select'"
|
||||||
|
@changeQuery="onChange"
|
||||||
|
:triggerChange="false" :dictCode="'wen4_ti2_lei4_xing2'"/>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="6" :sm="8">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text" :title="$t('statisticalNodes')">
|
||||||
|
<span>{{$t('statisticalNodes')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||||
|
allowClear
|
||||||
|
show-search
|
||||||
class="box-input"
|
class="box-input"
|
||||||
v-model="queryParam.problemType"
|
optionFilterProp="label"
|
||||||
:placeholder="$t('PleaseSelect')+$t('problemType')">
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
<a-select-option :value="$t('inconformity')">
|
v-model="queryParam.dutyTerritory">
|
||||||
<span class="itemOption">
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
{{ $t('nonConformity') }}
|
:key="key"
|
||||||
</span>
|
:label="item.key"
|
||||||
</a-select-option>
|
:value="item.key">
|
||||||
<a-select-option :value="$t('toTrack')">
|
<span style="display: inline-block;width: 100%" :title=" item.key ">
|
||||||
<span class="itemOption">
|
{{ item.key }}
|
||||||
{{ $t('Tracked') }}
|
</span>
|
||||||
</span>
|
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8" v-if="isPersonnelSelection">
|
<a-col :md="6" :sm="8">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text" :title="$t('Sponsor')">
|
<div class="title-text" :title="$t('Problemstate')">
|
||||||
<span>{{$t('Sponsor')}}</span>
|
<span>{{$t('Problemstate')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<PersonnelSelection :query="{db_field_name:'initiator',db_field_txt:$t('Sponsor')}"
|
<a-select allowClear
|
||||||
:isInput="true"
|
class="box-input"
|
||||||
class="box-input"
|
v-model="queryParam.problemState"
|
||||||
:personneQuery="queryParam"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
@change="PersonnelSelectionChange"
|
showSearch
|
||||||
v-model="queryParam.initiatorName"/>
|
optionFilterProp="label"
|
||||||
</div>
|
:autoClearSearchValue="false"
|
||||||
</a-col>
|
:placeholder="$t('PleaseSelect')+$t('Problemstate')">
|
||||||
<a-col :md="6" :sm="8" v-if="isPersonnelSelection">
|
<a-select-option v-for="(item, key) in ProblemstateList"
|
||||||
<div class="box-title-text">
|
:label='item'
|
||||||
<div class="title-text" :title="$t('personLiable')">
|
:key="key"
|
||||||
<span>{{$t('personLiable')}}</span>
|
:value="item">
|
||||||
</div>
|
<span style="display: inline-block;width: 100%" :title=" item">
|
||||||
<PersonnelSelection :query="{db_field_name:'duty',db_field_txt:$t('personLiable')}"
|
{{ item }}
|
||||||
:isInput="true"
|
</span>
|
||||||
class="box-input"
|
</a-select-option>
|
||||||
:personneQuery="queryParam"
|
</a-select>
|
||||||
@change="PersonnelSelectionChange"
|
|
||||||
v-model="queryParam.dutyName"/>
|
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</template>
|
</template>
|
||||||
@@ -142,6 +120,10 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
|
<div class="operator-text" @click="handleAdd" v-has="'ncrTrack:add'">
|
||||||
|
<a-icon type="plus"/>
|
||||||
|
{{$t('newlyAdded')}}
|
||||||
|
</div>
|
||||||
<div @click="handleExport" v-has="'ncrTrack:exportData'" class="operator-text">
|
<div @click="handleExport" v-has="'ncrTrack:exportData'" class="operator-text">
|
||||||
<a-icon type="export" :rotate="-90"/>
|
<a-icon type="export" :rotate="-90"/>
|
||||||
{{ $t('export') }}
|
{{ $t('export') }}
|
||||||
@@ -161,10 +143,44 @@
|
|||||||
:data-source="dataSource"
|
:data-source="dataSource"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
>
|
>
|
||||||
<span slot="standard" slot-scope="text,result">
|
<!-- <span slot="standard" slot-scope="text,result">-->
|
||||||
<a @click="designFlowStatusClick(result)" class="textName" :title="text">
|
<!-- <a @click="designFlowStatusClick(result)" class="textName" :title="text">-->
|
||||||
{{text}}
|
<!-- {{text}}-->
|
||||||
</a>
|
<!-- </a>-->
|
||||||
|
<!-- </span>-->
|
||||||
|
<div slot="CertificationProgress" slot-scope="text,result">
|
||||||
|
<span v-if="result.problemState == $t('red')" class="box-content-Progress box-content-cou nonConformityColor"
|
||||||
|
:style="{'width':long=='zh-cn'?'90px' : '120px'}"
|
||||||
|
>
|
||||||
|
{{result.problemState ? result.problemState : ''}}
|
||||||
|
</span>
|
||||||
|
<span v-if="result.problemState == $t('green')" class="box-content-Progress box-content-cou accordColor"
|
||||||
|
:style="{'width':long=='zh-cn'?'90px' : '120px'}"
|
||||||
|
>
|
||||||
|
{{result.problemState ? result.problemState : ''}}
|
||||||
|
</span>
|
||||||
|
<span v-if="result.problemState == $t('yellow')" class="box-content-Progress box-content-cou TrackedColor"
|
||||||
|
:style="{'width':long=='zh-cn'?'90px' : '120px'}"
|
||||||
|
>
|
||||||
|
{{result.problemState ? result.problemState : ''}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<!-- <span slot="problemType" slot-scope="text,result">-->
|
||||||
|
<!-- <span>{{result.flag== 'NEW'?result.problemType_dictText:result.problemType}}</span>-->
|
||||||
|
<!-- </span>-->
|
||||||
|
<span slot="operation" slot-scope="text,record">
|
||||||
|
<a class="text-operation" v-has="'ncrTrack:check'"
|
||||||
|
@click="detil(record)">
|
||||||
|
{{ $t('See') }}
|
||||||
|
</a>
|
||||||
|
<a class="text-operation" v-if="record.flag == 'NEW'" v-has="'ncrTrack:edit'"
|
||||||
|
@click="edit(record)">
|
||||||
|
{{ $t('edit') }}
|
||||||
|
</a>
|
||||||
|
<a class="text-operation" v-if="record.flag == 'NEW'" v-has="'ncrTrack:delete'"
|
||||||
|
@click="deleteLib(record)">
|
||||||
|
{{ $t('deleteLib') }}
|
||||||
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -181,6 +197,8 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<designCompliance ref="designComplianceRef"/>
|
<designCompliance ref="designComplianceRef"/>
|
||||||
|
<addModel ref="addModelRef" @addModelForm="addModelForm"/>
|
||||||
|
<detilModel ref="detilModelRef"/>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -189,12 +207,17 @@
|
|||||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||||
import designCompliance from '../../toDoCenter/projectRegulationTasks/components/designCompliance'
|
import designCompliance from '../../toDoCenter/projectRegulationTasks/components/designCompliance'
|
||||||
import store from '@/store/'
|
import store from '@/store/'
|
||||||
|
import addModel from './moudles/addModel'
|
||||||
|
import detilModel from './moudles/detilModel'
|
||||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'projectNonConformance',
|
name: 'projectNonConformance',
|
||||||
components: {
|
components: {
|
||||||
PersonnelSelection,
|
PersonnelSelection,
|
||||||
|
addModel,
|
||||||
|
detilModel,
|
||||||
designCompliance
|
designCompliance
|
||||||
},
|
},
|
||||||
mixins:[ResizeHeader, ResizeColumnProvide],
|
mixins:[ResizeHeader, ResizeColumnProvide],
|
||||||
@@ -204,37 +227,29 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
|
firstLevelDutyTerritoryList:[],
|
||||||
projectNameList: [],
|
projectNameList: [],
|
||||||
|
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
|
||||||
|
// CertificationColor: {
|
||||||
|
// $t('red'): 'nonConformityColor',
|
||||||
|
// $t('green'): 'accordColor',
|
||||||
|
// $t('yellow'): 'TrackedColor',
|
||||||
|
// },
|
||||||
toggleSearchStatus: false,
|
toggleSearchStatus: false,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
|
||||||
title: this.$t('standard'),
|
|
||||||
align: 'left',
|
|
||||||
dataIndex: 'serialNumber',
|
|
||||||
width: 170,
|
|
||||||
sorter:true,
|
|
||||||
scopedSlots: { customRender: 'standard' }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: this.$t('title'),
|
title: this.$t('title'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'title',
|
dataIndex: 'title',
|
||||||
width: 170,
|
width: 170,
|
||||||
scopedSlots: { customRender: 'standard' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('ProcessType'),
|
|
||||||
align: 'left',
|
|
||||||
dataIndex: 'flowType',
|
|
||||||
width: 150,
|
|
||||||
sorter:true,
|
sorter:true,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('areaOfResponsibility'),
|
title: this.$t('Relevantlawsregulations'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'dutyTerritory',
|
dataIndex: 'lawsName',
|
||||||
width: 100,
|
width: 170,
|
||||||
sorter:true,
|
sorter:true,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
@@ -242,31 +257,64 @@
|
|||||||
title: this.$t('RelatedItems'),
|
title: this.$t('RelatedItems'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'projectName',
|
dataIndex: 'projectName',
|
||||||
width: 180,
|
width: 170,
|
||||||
sorter:true,
|
sorter:true,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('problemType'),
|
title: this.$t('problemType'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'problemType',
|
dataIndex: 'problemType_dictText',
|
||||||
width: 120,
|
width: 170,
|
||||||
|
sorter:true,
|
||||||
|
ellipsis: true,
|
||||||
|
scopedSlots: { customRender: 'problemType' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('statisticalNodes'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'dutyTerritory',
|
||||||
|
width: 100,
|
||||||
sorter:true,
|
sorter:true,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('Sponsor'),
|
title: this.$t('creator'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'initiator',
|
dataIndex: 'createBy',
|
||||||
|
width: 100,
|
||||||
sorter:true,
|
sorter:true,
|
||||||
width: 100
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('personLiable'),
|
title: this.$t('Problemstate'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'duty',
|
dataIndex: 'problemState',
|
||||||
|
width: 120,
|
||||||
sorter:true,
|
sorter:true,
|
||||||
width: 100
|
ellipsis: true,
|
||||||
|
scopedSlots: { customRender: 'CertificationProgress' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('createTime'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'createTime',
|
||||||
|
sorter:true,
|
||||||
|
width: 180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('updateTime'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'updateTime',
|
||||||
|
sorter:true,
|
||||||
|
width: 180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('operation'),
|
||||||
|
align: 'left',
|
||||||
|
fixed: 'right',
|
||||||
|
width: localStorage.getItem('language') == 'zh-cn' ? 160 : 180,
|
||||||
|
scopedSlots: { customRender: 'operation' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -274,6 +322,7 @@
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
orderBy: '1',
|
orderBy: '1',
|
||||||
orderByField: '',
|
orderByField: '',
|
||||||
|
long: '',
|
||||||
isPersonnelSelection:true,
|
isPersonnelSelection:true,
|
||||||
url: {
|
url: {
|
||||||
page: '/project/ncrTrackController/queryPage',
|
page: '/project/ncrTrackController/queryPage',
|
||||||
@@ -288,8 +337,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.long = localStorage.getItem('language') || 'zh-cn'
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getNameList()
|
this.getNameList()
|
||||||
|
this.getFirstLevelDutyTerritory()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$socketPublic.state.msg': {
|
'$socketPublic.state.msg': {
|
||||||
@@ -304,8 +355,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getFirstLevelDutyTerritory() {
|
||||||
|
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.firstLevelDutyTerritoryList = res.result
|
||||||
|
} else {
|
||||||
|
this.firstLevelDutyTerritoryList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getNameList() {
|
getNameList() {
|
||||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
getAction('/project/projectNameInfoEO/queryProjectNameList', {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.projectNameList = res.result || []
|
this.projectNameList = res.result || []
|
||||||
} else {
|
} else {
|
||||||
@@ -320,6 +380,13 @@
|
|||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
addModelForm(){
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
onChange(value){
|
||||||
|
console.log(value)
|
||||||
|
this.queryParam.problemType_dictText = value
|
||||||
|
},
|
||||||
onSelectChange(value) {
|
onSelectChange(value) {
|
||||||
this.content = []
|
this.content = []
|
||||||
this.selectedRowKeys = value
|
this.selectedRowKeys = value
|
||||||
@@ -328,7 +395,7 @@
|
|||||||
this.selectedRowKeys.forEach(val => {
|
this.selectedRowKeys.forEach(val => {
|
||||||
if (res.uuid == val) {
|
if (res.uuid == val) {
|
||||||
this.content.push({
|
this.content.push({
|
||||||
id: res.id,
|
id: res.id || res.uuid,
|
||||||
flowType: res.flowType
|
flowType: res.flowType
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -360,6 +427,9 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
|
if(this.queryParam.problemType_dictText){
|
||||||
|
delete this.queryParam.problemType
|
||||||
|
}
|
||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
@@ -384,12 +454,42 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleAdd(){
|
||||||
|
this.$refs.addModelRef.add()
|
||||||
|
},
|
||||||
|
edit(record){
|
||||||
|
this.$refs.addModelRef.edit(JSON.parse(JSON.stringify(record)))
|
||||||
|
},
|
||||||
|
detil(record){
|
||||||
|
if(record.flag == 'NEW'){
|
||||||
|
this.$refs.detilModelRef.edit(JSON.parse(JSON.stringify(record)))
|
||||||
|
}else{
|
||||||
|
this.designFlowStatusClick(record)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deleteLib(record){
|
||||||
|
let _this = this
|
||||||
|
this.$confirm({
|
||||||
|
content: _this.$t('ConfirmDelete'),
|
||||||
|
onOk() {
|
||||||
|
deleteAction('/project/problemManagementEO/deleteBatch', { ids: record.uuid }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
|
_this.getList()
|
||||||
|
} else {
|
||||||
|
_this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
let query = {
|
let query = {
|
||||||
...this.queryParam,
|
...this.queryParam,
|
||||||
ncrTrackVOList: this.content
|
ncrTrackVOList: this.content
|
||||||
}
|
}
|
||||||
downloadFilePost(this.url.exportData, this.$t('NonConformance') + '.xls', query, this.Deselect)
|
let date = moment(new Date()).format('YYYY-MM-DD')
|
||||||
|
downloadFilePost(this.url.exportData, this.$t('Problemanagement') + date + '.zip', query, this.Deselect)
|
||||||
},
|
},
|
||||||
Deselect() {
|
Deselect() {
|
||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
@@ -550,7 +650,40 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
.box-content-Progress {
|
||||||
|
width: 78px;
|
||||||
|
height: 32px;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 32px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #f1f3f5;
|
||||||
|
color: #919399;
|
||||||
|
}
|
||||||
|
.accordColor {
|
||||||
|
background: #dbf6e2;
|
||||||
|
color: #26BD4B;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nonConformityColor {
|
||||||
|
background: #f3dddd;
|
||||||
|
color: #E83030;
|
||||||
|
}
|
||||||
|
|
||||||
|
.TrackedColor {
|
||||||
|
background: #f6ebdb;
|
||||||
|
color: #FDA71C;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notInvolvedColor {
|
||||||
|
background: #eef1f4;
|
||||||
|
color: #707486;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submittedColor {
|
||||||
|
color: #00B3BE;
|
||||||
|
background: #ddf3f4;
|
||||||
|
}
|
||||||
.textName {
|
.textName {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -0,0 +1,778 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="900"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('title')">{{$t('title')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="title">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.title'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('title')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('problemType')">{{$t('problemType')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="problemType">
|
||||||
|
<j-dict-select-tag class="box-input" v-model="formInline.problemType"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('problemType')"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'wen4_ti2_lei4_xing2'"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="'PS-issue'">{{'PS-issue'}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="issue">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.psIssue'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+'PS-issue'"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('Relevantlawsregulations')">{{$t('Relevantlawsregulations')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||||
|
<Standardselection
|
||||||
|
:query="{'db_field_txt':$t('Relevantlawsregulations')}"
|
||||||
|
:standard="formInline"
|
||||||
|
:disabled="false"
|
||||||
|
@input="Standardselectioninput"
|
||||||
|
@change="StandardselectionChange"
|
||||||
|
v-model="formInline.lawsName"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('RelatedItems')">{{$t('RelatedItems')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||||
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
|
v-model="formInline.projectId"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
showSearch
|
||||||
|
mode="multiple"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:autoClearSearchValue="false"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
|
||||||
|
<a-select-option v-for="(item, key) in projectNameList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.id">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||||
|
{{ item.projectName}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||||
|
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||||
|
allowClear
|
||||||
|
show-search
|
||||||
|
mode="multiple"
|
||||||
|
class="box-input-search"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
v-model="formInline.dutyTerritory">
|
||||||
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.key"
|
||||||
|
:value="item.key">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.key ">
|
||||||
|
{{ item.key }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('Problemstate')">{{$t('Problemstate')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||||
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
|
v-model="formInline.problemState"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
showSearch
|
||||||
|
optionFilterProp="label"
|
||||||
|
:autoClearSearchValue="false"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('Problemstate')">
|
||||||
|
<a-select-option v-for="(item, key) in ProblemstateList"
|
||||||
|
:label='item'
|
||||||
|
:key="key"
|
||||||
|
:value="item">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item">
|
||||||
|
{{ item }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="descriptions">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.description'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('descriptions')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('documents')">{{$t('documents')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="fileLink">
|
||||||
|
<div v-for="(item,index) in formInline.fileLinkList" :key="index">
|
||||||
|
<a-input class="box-input"
|
||||||
|
style='width: 88%'
|
||||||
|
v-model='item.fileLink'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
|
||||||
|
<a-icon class="icon-text" @click="addClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||||
|
v-if="formInline.fileLinkList.length - 1 == index"
|
||||||
|
type="plus"/>
|
||||||
|
<a-icon class="icon-text" v-if="formInline.fileLinkList.length > 1 && formInline.fileLinkList.length - 1 !== index" style='margin-left: 10px;font-size: 18px;'
|
||||||
|
@click="deleteClick(index)"
|
||||||
|
type="minus"/>
|
||||||
|
</div>
|
||||||
|
<a-button type="primary" class="button-text"
|
||||||
|
@click="clickButtonToUpload('file')">
|
||||||
|
{{ (formInline.file === 'null' || formInline.file === '' ||
|
||||||
|
formInline.file == null) ? $t('Fileupload') : $t('viewUploadedFiles')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('progresstracking')">{{$t('progresstracking')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="progresstracking">
|
||||||
|
<div v-for="(item,index) in formInline.progressTrackingList" :key="index">
|
||||||
|
<!-- <span>{{item}}</span>-->
|
||||||
|
<a-input class="box-input"
|
||||||
|
style='width: 88%'
|
||||||
|
v-model='item.progressTracking'
|
||||||
|
:disabled="true"
|
||||||
|
:title='item.progressTracking'
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('progresstracking')"/>
|
||||||
|
<a @click="addprogresstrackingClick(index)" style='margin-left: 10px' v-if="formInline.progressTrackingList.length - 1 == index">{{$t('newlyAdded')}}</a>
|
||||||
|
<a @click="deleteprogresstrackingClick(index,item)" v-if="formInline.progressTrackingList.length > 0" :disabled="disabled" style='margin-left: 10px' >{{$t('delete')}}</a>
|
||||||
|
</div>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('conculsion')">{{$t('conculsion')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="conclusion">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.conclusion'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('conculsion')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('examineapproveevidence')">{{$t('examineapproveevidence')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="approvalEvidenceLink">
|
||||||
|
<div v-for="(item,index) in formInline.approvalEvidenceLinkList" :key="index">
|
||||||
|
<a-input class="box-input"
|
||||||
|
style='width: 88%'
|
||||||
|
v-model='item.approvalEvidenceLink'
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
|
||||||
|
<a-icon class="icon-text" @click="addvidenceClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||||
|
v-if="formInline.approvalEvidenceLinkList.length - 1 == index"
|
||||||
|
type="plus"/>
|
||||||
|
<a-icon class="icon-text" v-if="formInline.approvalEvidenceLinkList.length > 1 && formInline.approvalEvidenceLinkList.length - 1 !== index"
|
||||||
|
style='margin-left: 10px;font-size: 18px;' @click="deletevidenceClick(index)"
|
||||||
|
type="minus" :disabled="disabled"/>
|
||||||
|
</div>
|
||||||
|
<a-button type="primary" class="button-text"
|
||||||
|
@click="clickButtonToUpload('approvalEvidence')">
|
||||||
|
{{ (formInline.approvalEvidence === 'null' || formInline.approvalEvidence === '' ||
|
||||||
|
formInline.approvalEvidence == null) ? $t('Fileupload') : $t('viewUploadedFiles')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-spin>
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
<!-- <addModel ref="addModelRef" @addModelForm="addModelForm"/>-->
|
||||||
|
<a-modal
|
||||||
|
:title="$t('progresstracking')"
|
||||||
|
:width="600"
|
||||||
|
:visible="visibletrack"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
:maskClosable="false"
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="Cancel"
|
||||||
|
>
|
||||||
|
<a-form-model :model="formInlinetracking" class="formAdd" :rules="rulestracking" ref="ruleFormtracking">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('progresstracking')">
|
||||||
|
{{$t('progresstracking')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="progressTracking">
|
||||||
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('progresstracking')"
|
||||||
|
v-model="formInlinetracking.progressTracking"
|
||||||
|
style="width: 90%"
|
||||||
|
:maxLength="500"
|
||||||
|
:rows="4"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-modal>
|
||||||
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import defaultTemplate from './defaultTemplate'
|
||||||
|
// import solicitOpinions from './solicitOpinions'
|
||||||
|
// import releaseStandard from './releaseStandard'
|
||||||
|
// import industryTemplate from './industryTemplate'
|
||||||
|
// import addModel from './a/ddModel'
|
||||||
|
import Standardselection from '@/components/Standardselection/index'
|
||||||
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
|
import { getAction, postAction,putAction, downloadFile } from '@/api/manage'
|
||||||
|
import moment from 'moment'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'fillAdd',
|
||||||
|
components: {
|
||||||
|
// defaultTemplate,
|
||||||
|
// solicitOpinions,
|
||||||
|
// releaseStandard,
|
||||||
|
// industryTemplate,
|
||||||
|
// addModel
|
||||||
|
Standardselection,
|
||||||
|
uploadFile,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
rules: {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('title') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
problemType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('problemType') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
visibletrack: false,
|
||||||
|
rulestracking:{
|
||||||
|
progressTracking: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('text') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
formInline: {
|
||||||
|
fileLinkList:[{}],
|
||||||
|
progressTrackingList:[{}],
|
||||||
|
approvalEvidenceLinkList:[{}],
|
||||||
|
dutyTerritory:undefined,
|
||||||
|
projectId:undefined,
|
||||||
|
problemState:undefined,
|
||||||
|
},
|
||||||
|
formInlinetracking:{},
|
||||||
|
confirmLoading: false,
|
||||||
|
title: '',
|
||||||
|
disabled: false,
|
||||||
|
isTrue: false,
|
||||||
|
chapterContentsList: [],
|
||||||
|
firstLevelDutyTerritoryList:[],
|
||||||
|
projectNameList: [],
|
||||||
|
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
|
||||||
|
templateDisabled: false,
|
||||||
|
contentTemplateList: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
text: this.$t('defaultTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
text: this.$t('newRequestCommentListTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
text: this.$t('NewReleasedStandardTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '4',
|
||||||
|
text: this.$t('industryInformationDynamicTemplate')
|
||||||
|
}
|
||||||
|
],
|
||||||
|
index:'',
|
||||||
|
url: {
|
||||||
|
add: '/project/problemManagementEO/add',
|
||||||
|
edit: '/project/problemManagementEO/edit',
|
||||||
|
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// bringInStandardInformationClick() {
|
||||||
|
// this.$refs.addModelRef.addModel()
|
||||||
|
// },
|
||||||
|
getNameList() {
|
||||||
|
getAction('/project/projectNameInfoEO/queryProjectNameList', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.projectNameList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.projectNameList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addModelForm(value) {
|
||||||
|
this.$refs.defaultTemplateRef.getStandData(value)
|
||||||
|
},
|
||||||
|
getFirstLevelDutyTerritory() {
|
||||||
|
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.firstLevelDutyTerritoryList = res.result
|
||||||
|
} else {
|
||||||
|
this.firstLevelDutyTerritoryList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
StandardselectionChange(value, id) {
|
||||||
|
this.formInline.lawsId = id
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
Standardselectioninput(val){
|
||||||
|
this.formInline.lawsName = val
|
||||||
|
},
|
||||||
|
clickButtonToUpload(item) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
this.$refs.uploadFile.visible = true
|
||||||
|
this.uploadName = item
|
||||||
|
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||||
|
} else {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 上传文件的回调 */
|
||||||
|
uploadSuccess(data) {
|
||||||
|
let attIdList = []
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
data.map(item => {
|
||||||
|
attIdList.push(item.id || data.name)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 赋值给当前对应的表单文件 */
|
||||||
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
add() {
|
||||||
|
this.templateDisabled = false
|
||||||
|
this.getNameList()
|
||||||
|
this.getFirstLevelDutyTerritory()
|
||||||
|
this.title = this.$t('newlyAdded')
|
||||||
|
this.visible = true
|
||||||
|
this.disabled = false
|
||||||
|
this.formInline = {
|
||||||
|
fileLinkList:[{}],
|
||||||
|
progressTrackingList:[{}],
|
||||||
|
approvalEvidenceLinkList:[{}]
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit(row) {
|
||||||
|
console.log(row)
|
||||||
|
this.getNameList()
|
||||||
|
this.getFirstLevelDutyTerritory()
|
||||||
|
this.title = this.$t('edit')
|
||||||
|
this.formInline = row
|
||||||
|
if(this.formInline.dutyTerritory != null){
|
||||||
|
this.formInline.dutyTerritory = this.formInline.dutyTerritory.split(',')
|
||||||
|
}else{
|
||||||
|
this.formInline.dutyTerritory = undefined
|
||||||
|
}
|
||||||
|
if(this.formInline.problemState == null){
|
||||||
|
this.formInline.problemState = undefined
|
||||||
|
}
|
||||||
|
if(this.formInline.progressTrackingList == null){
|
||||||
|
this.formInline.progressTrackingList = [{}]
|
||||||
|
}
|
||||||
|
if(this.formInline.approvalEvidenceLinkList == null){
|
||||||
|
this.formInline.approvalEvidenceLinkList = [{}]
|
||||||
|
}
|
||||||
|
if(this.formInline.fileLinkList == null){
|
||||||
|
this.formInline.fileLinkList = [{}]
|
||||||
|
}
|
||||||
|
if(this.formInline.projectId != null){
|
||||||
|
this.formInline.projectId = this.formInline.projectId.split(',')
|
||||||
|
}else{
|
||||||
|
this.formInline.projectId = undefined
|
||||||
|
}
|
||||||
|
console.log(this.formInline)
|
||||||
|
this.visible = true
|
||||||
|
this.disabled = false
|
||||||
|
this.templateDisabled = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addClick(index){
|
||||||
|
this.formInline.fileLinkList.splice(index + 1, 0, {})
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
deleteClick(index) {
|
||||||
|
this.formInline.fileLinkList.splice(index, 1)
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
addvidenceClick(index){
|
||||||
|
this.formInline.approvalEvidenceLinkList.splice(index + 1, 0, {})
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
deletevidenceClick(index) {
|
||||||
|
this.formInline.approvalEvidenceLinkList.splice(index, 1)
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
addprogresstrackingClick(index){
|
||||||
|
this.index = index
|
||||||
|
this.formInlinetracking = {}
|
||||||
|
this.visibletrack = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInlinetracking = { ...this.formInlinetracking }
|
||||||
|
this.isTrue = true
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
deleteprogresstrackingClick(index,item) {
|
||||||
|
if(item.progressTracking && item.progressTracking != ''){
|
||||||
|
if(index == 0){
|
||||||
|
item.progressTracking = ''
|
||||||
|
}else{
|
||||||
|
this.formInline.progressTrackingList.splice(index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
Cancel(){
|
||||||
|
this.visibletrack = false
|
||||||
|
this.formInlinetracking = {}
|
||||||
|
this.$refs.ruleFormtracking.clearValidate()
|
||||||
|
},
|
||||||
|
handleOk(){
|
||||||
|
console.log(this.formInlinetracking)
|
||||||
|
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
this.$refs.ruleFormtracking.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.progressTracking
|
||||||
|
this.formInline.progressTrackingList.forEach((item,index) => {
|
||||||
|
console.log(item.progressTracking)
|
||||||
|
if(!item.progressTracking){
|
||||||
|
this.formInline.progressTrackingList.splice(0,1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.formInline.progressTrackingList.splice(this.index+1, 1, {progressTracking:text})
|
||||||
|
this.visibletrack = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
console.log(this.formInline)
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.confirmLoading = true
|
||||||
|
let url = ''
|
||||||
|
let action = ''
|
||||||
|
if (this.title == this.$t('newlyAdded')) {
|
||||||
|
url = this.url.add
|
||||||
|
action = postAction
|
||||||
|
} else {
|
||||||
|
url = this.url.edit
|
||||||
|
action = putAction
|
||||||
|
}
|
||||||
|
// Object.keys(formInline).forEach(res => {
|
||||||
|
// if (formInline[res] && formInline[res] instanceof Array) {
|
||||||
|
// formInline[res] = formInline[res].join(',')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
if(this.formInline.dutyTerritory && this.formInline.dutyTerritory instanceof Array){
|
||||||
|
this.formInline.dutyTerritory = this.formInline.dutyTerritory.join(',')
|
||||||
|
}
|
||||||
|
if(this.formInline.projectId && this.formInline.projectId instanceof Array){
|
||||||
|
this.formInline.projectId = this.formInline.projectId.join(',')
|
||||||
|
}
|
||||||
|
// let fileLinkList = []
|
||||||
|
// let approvalEvidenceLinkList = []
|
||||||
|
// let progressTrackingList = []
|
||||||
|
// if(this.formInline.fileLinkList){
|
||||||
|
// this.formInline.fileLinkList.forEach(item => {
|
||||||
|
// if(item.fileLink){
|
||||||
|
// fileLinkList.push(item.fileLink)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// this.formInline.fileLinkList = fileLinkList
|
||||||
|
// }
|
||||||
|
// if(this.formInline.approvalEvidenceLinkList){
|
||||||
|
// this.formInline.approvalEvidenceLinkList.forEach(item => {
|
||||||
|
// if(item.approvalEvidenceLink){
|
||||||
|
// approvalEvidenceLinkList.push(item.approvalEvidenceLink)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// this.formInline.approvalEvidenceLinkList = approvalEvidenceLinkList
|
||||||
|
// }
|
||||||
|
// if(this.formInline.progressTrackingList){
|
||||||
|
// this.formInline.progressTrackingList.forEach(item => {
|
||||||
|
// if(item.progressTracking){
|
||||||
|
// progressTrackingList.push(item.progressTracking)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// this.formInline.progressTrackingList = progressTrackingList
|
||||||
|
// }
|
||||||
|
delete this.formInline.lawsName
|
||||||
|
let query = {
|
||||||
|
// problemManagementEO:formInline
|
||||||
|
...this.formInline
|
||||||
|
}
|
||||||
|
action(url, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visible = false
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$emit('addModelForm')
|
||||||
|
} else {
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.ant-select-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 114px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemModel {
|
||||||
|
width: calc(100% - 130px);
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 100;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
height: 38px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-treenode-switcher-close {
|
||||||
|
width: 255px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-node-content-wrapper {
|
||||||
|
float: right;
|
||||||
|
margin-top: -2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-title {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,507 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="900"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('title')">{{$t('title')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="title">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.title'
|
||||||
|
:disabled="disabled"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('problemType')">{{$t('problemType')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="problemType">
|
||||||
|
<j-dict-select-tag class="box-input" v-model="formInline.problemType"
|
||||||
|
:disabled="disabled"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'wen4_ti2_lei4_xing2'"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="'PS-issue'">{{'PS-issue'}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a style='width: 273px;display: inline-block;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;margin-top: 12px;'
|
||||||
|
:title='formInline.psIssue'
|
||||||
|
@click='UserFeedback(formInline.psIssue)'>{{formInline.psIssue}}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('Relevantlawsregulations')">{{$t('Relevantlawsregulations')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:title='formInline.lawsName'
|
||||||
|
v-model='formInline.lawsName'
|
||||||
|
:disabled="disabled"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('RelatedItems')">{{$t('RelatedItems')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||||
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
|
v-model="formInline.projectId"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
showSearch
|
||||||
|
mode="multiple"
|
||||||
|
:disabled="disabled"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:autoClearSearchValue="false">
|
||||||
|
<a-select-option v-for="(item, key) in projectNameList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.id">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||||
|
{{ item.projectName}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||||
|
<a-select
|
||||||
|
allowClear
|
||||||
|
show-search
|
||||||
|
mode="multiple"
|
||||||
|
:disabled="disabled"
|
||||||
|
class="box-input-search"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
v-model="formInline.dutyTerritory">
|
||||||
|
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||||
|
:key="key"
|
||||||
|
:label="item.key"
|
||||||
|
:value="item.key">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item.key ">
|
||||||
|
{{ item.key }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('Problemstate')">{{$t('Problemstate')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||||
|
<a-select allowClear
|
||||||
|
class="box-input"
|
||||||
|
v-model="formInline.problemState"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
showSearch
|
||||||
|
:disabled="disabled"
|
||||||
|
optionFilterProp="label"
|
||||||
|
:autoClearSearchValue="false">
|
||||||
|
<a-select-option v-for="(item, key) in ProblemstateList"
|
||||||
|
:label='item'
|
||||||
|
:key="key"
|
||||||
|
:value="item">
|
||||||
|
<span style="display: inline-block;width: 100%" :title=" item">
|
||||||
|
{{ item }}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="descriptions">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.description'
|
||||||
|
:disabled="disabled"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('documents')">{{$t('documents')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="fileLink">
|
||||||
|
<div v-for="(item,index) in formInline.fileLinkList" :key="index">
|
||||||
|
<a @click='UserFeedback(item.fileLink)'>{{item.fileLink}}</a>
|
||||||
|
</div>
|
||||||
|
<div v-for='(item,index) in formInline.fileList'>
|
||||||
|
<a @click='download(item)'>{{item.fileName}}</a>
|
||||||
|
</div>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('progresstracking')">{{$t('progresstracking')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="progresstracking">
|
||||||
|
<div v-for="(item,index) in formInline.progressTrackingList" :key="index">
|
||||||
|
<a-input class="box-input"
|
||||||
|
style='width: 89%'
|
||||||
|
v-model='item.progressTracking'
|
||||||
|
:title='item.progressTracking'
|
||||||
|
:disabled="true"/>
|
||||||
|
</div>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('conculsion')">{{$t('conculsion')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="conclusion">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model='formInline.conclusion'
|
||||||
|
:disabled="disabled"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<!-- <span class="Required">*</span>-->
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('examineapproveevidence')">{{$t('examineapproveevidence')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="approvalEvidenceLink">
|
||||||
|
<div v-for="(item,index) in formInline.approvalEvidenceLinkList" :key="index">
|
||||||
|
<a @click='UserFeedback(item.approvalEvidenceLink)'>{{item.approvalEvidenceLink}}</a>
|
||||||
|
</div>
|
||||||
|
<div v-for='(item,index) in formInline.approvalEvidenceFileList'>
|
||||||
|
<a @click='download(item)'>{{item.fileName}}</a>
|
||||||
|
</div>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-spin>
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('close')}}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction, postAction,putAction, downloadFile } from '@/api/manage'
|
||||||
|
import moment from 'moment'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'fillAdd',
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
rules: {
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('title') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
problemType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('problemType') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
visibletrack: false,
|
||||||
|
rulestracking:{
|
||||||
|
progressTracking: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('text') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
formInline: {
|
||||||
|
fileLinkList:[{}],
|
||||||
|
progressTrackingList:[{}],
|
||||||
|
approvalEvidenceLinkList:[{}],
|
||||||
|
dutyTerritory:undefined,
|
||||||
|
projectId:undefined,
|
||||||
|
problemState:undefined,
|
||||||
|
},
|
||||||
|
formInlinetracking:{},
|
||||||
|
confirmLoading: false,
|
||||||
|
title: '',
|
||||||
|
disabled: false,
|
||||||
|
isTrue: false,
|
||||||
|
chapterContentsList: [],
|
||||||
|
firstLevelDutyTerritoryList:[],
|
||||||
|
projectNameList: [],
|
||||||
|
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
|
||||||
|
templateDisabled: false,
|
||||||
|
contentTemplateList: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
text: this.$t('defaultTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
text: this.$t('newRequestCommentListTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
text: this.$t('NewReleasedStandardTemplate')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '4',
|
||||||
|
text: this.$t('industryInformationDynamicTemplate')
|
||||||
|
}
|
||||||
|
],
|
||||||
|
index:'',
|
||||||
|
url: {
|
||||||
|
add: '/project/problemManagementEO/add',
|
||||||
|
edit: '/project/problemManagementEO/edit',
|
||||||
|
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getNameList() {
|
||||||
|
getAction('/project/projectNameInfoEO/queryProjectNameList', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.projectNameList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.projectNameList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getFirstLevelDutyTerritory() {
|
||||||
|
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.firstLevelDutyTerritoryList = res.result
|
||||||
|
} else {
|
||||||
|
this.firstLevelDutyTerritoryList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
edit(row) {
|
||||||
|
this.getNameList()
|
||||||
|
this.getFirstLevelDutyTerritory()
|
||||||
|
this.title = this.$t('view')
|
||||||
|
this.formInline = row
|
||||||
|
if(this.formInline.dutyTerritory != null){
|
||||||
|
this.formInline.dutyTerritory = this.formInline.dutyTerritory.split(',')
|
||||||
|
}else{
|
||||||
|
this.formInline.dutyTerritory = undefined
|
||||||
|
}
|
||||||
|
if(this.formInline.problemState == null){
|
||||||
|
this.formInline.problemState = undefined
|
||||||
|
}
|
||||||
|
if(this.formInline.projectId != null){
|
||||||
|
this.formInline.projectId = this.formInline.projectId.split(',')
|
||||||
|
}else{
|
||||||
|
this.formInline.projectId = undefined
|
||||||
|
}
|
||||||
|
getAction('/project/problemManagementEO/queryById', {id:this.formInline.id}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.formInline.fileList = res.result.fileList
|
||||||
|
this.formInline.approvalEvidenceFileList = res.result.approvalEvidenceFileList
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log(this.formInline)
|
||||||
|
this.visible = true
|
||||||
|
this.disabled = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
UserFeedback(item){
|
||||||
|
window.open(item, '_blank');
|
||||||
|
},
|
||||||
|
download(item){
|
||||||
|
console.log(item)
|
||||||
|
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id })
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.ant-select-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 114px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemModel {
|
||||||
|
width: calc(100% - 130px);
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 100;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
height: 38px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-treenode-switcher-close {
|
||||||
|
width: 255px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-node-content-wrapper {
|
||||||
|
float: right;
|
||||||
|
margin-top: -2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-title {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user