Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
# Conflicts: # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/controller/AuthDummyInventoryInfoEOController.java # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/IAuthDummyInventoryInfoEOService.java # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/impl/AuthDummyInventoryInfoEOServiceImpl.java
This commit is contained in:
+2
-1
@@ -13,7 +13,8 @@ public enum MessageType2Enum {
|
||||
VALIDATION_COMPLIANCE_CONFIRMATION("Validation Compliance Confirmation","验证符合性确认"),
|
||||
REGULATION_OPINION_COLLECTION("Regulation Opinion Collection","法规意见收集"),
|
||||
REGULATION_TECHNICAL_ASSESSMENT("Regulation Technical Assessment","法规技术评估"),
|
||||
HOMO_PARAMETER_COLLECTION("Homo Parameter Collection","认证参数收集");
|
||||
HOMO_PARAMETER_COLLECTION("Homo Parameter Collection","认证参数收集"),
|
||||
CERTIFICATION_LIST_CONFIRMATION("Certification List Confirmation","认证清单确认");
|
||||
|
||||
String en;
|
||||
String cn;
|
||||
|
||||
+15
-7
@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -218,11 +219,18 @@ public class AuthDummyInventoryInfoEOController extends JeroController<AuthDummy
|
||||
public Result<?> setBatch(@RequestBody AuthDummyInventoryInfoEO authDummyInventoryInfoEO) {
|
||||
return this.authDummyInventoryInfoEOService.setBatch(authDummyInventoryInfoEO);
|
||||
}
|
||||
//
|
||||
// @AutoLog(value = "认证虚拟清单详情表-批量添加")
|
||||
// @ApiOperation(value="认证虚拟清单详情表-批量添加", notes="认证虚拟清单详情表-批量添加")
|
||||
// @PostMapping(value = "/batchAdd")
|
||||
// public Result<?> batchAdd(@RequestBody JSONObject json) {
|
||||
// return this.authDummyInventoryInfoEOService.batchAdd(json);
|
||||
// }
|
||||
|
||||
@AutoLog(value = "认证虚拟清单详情表-批量添加")
|
||||
@ApiOperation(value="认证虚拟清单详情表-批量添加", notes="认证虚拟清单详情表-批量添加")
|
||||
@PostMapping(value = "/batchAdd")
|
||||
public Result<?> batchAdd(@RequestBody JSONObject json) {
|
||||
return this.authDummyInventoryInfoEOService.batchAdd(json);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
// @RequiresPermissions("authDummyInventoryInfo:exportTemplate")
|
||||
public void exportTemplate(AuthDummyInventoryInfoEO authDummyInventoryInfoEO, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
authDummyInventoryInfoEOService.exportTemplate(authDummyInventoryInfoEO,response,request);
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -5,6 +5,10 @@ import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
@@ -93,4 +97,13 @@ public interface IAuthDummyInventoryInfoEOService extends IService<AuthDummyInve
|
||||
* @param authDummyInventoryInfoEO
|
||||
*/
|
||||
void importData(MultipartFile file, AuthDummyInventoryInfoEO authDummyInventoryInfoEO) throws Exception;
|
||||
Result<?> batchAdd(JSONObject json);
|
||||
|
||||
/**
|
||||
* 模板下载
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @param response
|
||||
* @param request
|
||||
*/
|
||||
void exportTemplate(AuthDummyInventoryInfoEO authDummyInventoryInfoEO, HttpServletResponse response, HttpServletRequest request);
|
||||
}
|
||||
|
||||
+179
@@ -3,6 +3,8 @@ package com.jero.modules.authDummy.service.impl;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.aliyuncs.utils.IOUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
@@ -17,6 +19,7 @@ import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEOEn;
|
||||
import com.jero.modules.authDummy.mapper.AuthDummyInventoryInfoEOMapper;
|
||||
import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService;
|
||||
import com.jero.modules.authDummy.service.IAuthDummyInventoryInfoEOService;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||
@@ -34,6 +37,15 @@ import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
@@ -51,6 +63,8 @@ import org.springframework.stereotype.Service;
|
||||
import java.io.*;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.io.File;
|
||||
import java.io.OutputStream;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -65,6 +79,9 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl.copyFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @Description: 认证虚拟清单详情表
|
||||
* @Author: jero-boot
|
||||
@@ -97,6 +114,8 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService iBussDocumentLibraryEOService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -876,4 +895,164 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模板下载
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @param response
|
||||
* @param request
|
||||
*/
|
||||
@Override
|
||||
public void exportTemplate(AuthDummyInventoryInfoEO authDummyInventoryInfoEO, HttpServletResponse response, HttpServletRequest request) {
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
String fileOriName = "认证虚拟清单导入模板.xls";
|
||||
String filePath = uploadpath + File.separator + fileOriName;
|
||||
try {
|
||||
String titleOne = "";
|
||||
// String titleTwo = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
// titleOne = "编号,子标题,实施类别," +
|
||||
// "WVTA ID,认证类型," +
|
||||
// "*认证级别," +"适用增补件,"+
|
||||
// "*责任领域,备注," +
|
||||
// "设计符合性确认,Pre-homo确认,验证符合性确认";
|
||||
titleOne="类别,检验项目," +
|
||||
"WVTA ID,编号," +
|
||||
"*责任领域,交付物";
|
||||
// titleTwo = "交付物类型,交付物模板,发起人,责任人,交付物说明," +
|
||||
// "交付物类型,交付物模板,发起人,责任人,交付物说明," +
|
||||
// "交付物类型,交付物模板,发起人,责任人,交付物说明";
|
||||
}else{
|
||||
// titleOne = "*Number,Sub-Title,Usage," +
|
||||
// "WVTA ID,Certification Type," +
|
||||
// "*Certification Level," +"Applicable Supplement,"+
|
||||
// "*Responsible Field,Comments," +
|
||||
// "Design compliance check,Pre-homo check,Validation compliance chech";
|
||||
titleOne = "Type,检验项目," +
|
||||
"WVTA ID,*Number," +
|
||||
"*Responsible Field,交付物";
|
||||
// titleTwo = "Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
|
||||
// "Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
|
||||
// "Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description";
|
||||
}
|
||||
|
||||
|
||||
List<String> list = Arrays.asList(titleOne.split(","));
|
||||
int index = 0;
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
index = list.indexOf("备注") + 1;
|
||||
}else{
|
||||
index = list.indexOf("Comments") + 1;
|
||||
}
|
||||
|
||||
//创建临时文件夹
|
||||
File nowFile = new File(filePath);
|
||||
if (nowFile.exists()) {
|
||||
nowFile.delete();
|
||||
}
|
||||
nowFile.mkdirs();
|
||||
HSSFSheet sheet = workbook.createSheet("认证虚拟清单导入模板");
|
||||
sheet.setDefaultColumnWidth(16);//列宽
|
||||
HSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||
cellStyle.setWrapText(true);//自动换行
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
|
||||
HSSFCellStyle cellStyleTemp = workbook.createCellStyle();
|
||||
cellStyleTemp.setWrapText(true);//自动换行
|
||||
|
||||
|
||||
int count = 1;
|
||||
int startLine = 0;
|
||||
int endLine = 0;
|
||||
int line = 4;
|
||||
for (int i = 0; i < index; i++) {
|
||||
//合并单元格
|
||||
CellRangeAddress region1 =
|
||||
new CellRangeAddress(0, 1, i, i);
|
||||
sheet.addMergedRegion(region1);
|
||||
}
|
||||
for (int i = index; i < 12; i++) {
|
||||
if(count > 1){
|
||||
startLine = startLine + line + 1;
|
||||
endLine = startLine + line;
|
||||
}else{
|
||||
startLine = i;
|
||||
endLine = i + line;
|
||||
}
|
||||
//合并单元格
|
||||
CellRangeAddress region1 =
|
||||
new CellRangeAddress(0, 0, startLine, endLine); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
|
||||
sheet.addMergedRegion(region1);
|
||||
count ++;
|
||||
}
|
||||
CellRangeAddress region =
|
||||
new CellRangeAddress(2, 2, 0, 23); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
|
||||
sheet.addMergedRegion(region);
|
||||
// String explain= "";
|
||||
// if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
// explain = "填写说明\n" +
|
||||
// "1.导入数据从第四行开始\n" +
|
||||
// "2.所有带*号的字段必须填写\n"+
|
||||
// "3.实施类别,交付物类型,发起人,责任人,字段是单选属性,必须和系统中的对应字段选项相匹配\n" +
|
||||
// "4.认证类型,认证级别,责任领域,字段是多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n" +
|
||||
// "5.编号,子标题,WVTA ID,备注,填写文本内容\n" +
|
||||
// "6.交付物模板字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.docx,则应填写AAA/B.docx";
|
||||
// }else{
|
||||
// explain = "Filling explanation\n" +
|
||||
// "1.Import data starts at the fourth line\n" +
|
||||
// "2.All fields marked with * must be filled in\n"+
|
||||
// "3.Implementation category,Type of deliverables,Initiator,Person liable,Fields are radio attributes that must match the corresponding field option in the system\n" +
|
||||
// "4.Certification Type,Certification Level,Responsible Field, field is a multi-select attribute and must match the corresponding field in the system. If multiple fields are filled in, separate them by commas (,)\n" +
|
||||
// "5.Number,Sub-Title,WVTA ID,Comments,Fill in the text\n" +
|
||||
// "6.Deliverable template,When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. If b. diocx is stored under the AAA standard number, enter AAA/B. diocx";
|
||||
// }
|
||||
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
//表头
|
||||
Row row = sheet.createRow(i);//开始创建标题行
|
||||
String[] headerArr = titleOne.split(",");
|
||||
int lineTemp = index;
|
||||
if (i == 0) {
|
||||
for (int m = 0; m < headerArr.length; m++) {
|
||||
if(m < index){
|
||||
row.createCell(m).setCellValue(headerArr[m]);
|
||||
}else{
|
||||
row.createCell(lineTemp).setCellValue(headerArr[m]);
|
||||
Cell cell = row.getCell(lineTemp);
|
||||
cell.setCellStyle(cellStyle);
|
||||
lineTemp = lineTemp + 5;
|
||||
}
|
||||
}
|
||||
|
||||
}else if(i == 1){
|
||||
//titleTwo
|
||||
// String[] headerArrTwo = titleTwo.split(",");
|
||||
// for (int j = 0; j < headerArrTwo.length; j++) {
|
||||
// row.createCell(9+j).setCellValue(headerArrTwo[j]);
|
||||
// }
|
||||
}else{
|
||||
short height = (short) (7 * 252);
|
||||
row.setHeight((short) height);
|
||||
Cell cell = row.createCell(0);
|
||||
cell.setCellStyle(cellStyleTemp);
|
||||
// cell.setCellValue(new HSSFRichTextString(explain));
|
||||
}
|
||||
}
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=\"" + fileOriName + ".xls");
|
||||
response.setContentType("application/force-download");
|
||||
response.flushBuffer();
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
package com.jero.modules.feishu.enums;
|
||||
|
||||
/**
|
||||
* 飞书消息模板枚举类 由于开发分支问题,此枚举只在认证清单流程中使用, 与 TemplateInfoEnum 作用一样
|
||||
*/
|
||||
public enum TemplateInfoEnum2 {
|
||||
|
||||
// 认证消息
|
||||
CERTIFICATION_MESSAGE1("stuido催办,认证工程师收到消息","ctp_AAuDmU58lKqB"),
|
||||
// HOME_PARAMETER_COLLECTION2("工程接口人下发参数,填写人接收任务","ctp_AAfv49aET4Rn"),
|
||||
// HOME_PARAMETER_COLLECTION3("工程接口人退回,通知认证工程师","ctp_AAfvQy0bsb6Y"),
|
||||
// HOME_PARAMETER_COLLECTION4("填写人退回,通知工程接口人","ctp_AAfK3TvbkTLq"),
|
||||
// HOME_PARAMETER_COLLECTION5("您的参数收集任务还有7天到期,请及时查看处理","ctp_AAfvdg0Cx6yN"),
|
||||
// HOME_PARAMETER_COLLECTION6("您的参数收集任务已被XXX重新分发给XXX","ctp_AAfvKkz192fn"),
|
||||
// HOME_PARAMETER_COLLECTION7(" 您的参数收集任务已被XXX撤回","ctp_AAfK2oTpFn9M"),
|
||||
// HOME_PARAMETER_COLLECTION8(" 您的参数收集任务还有3天到期,请及时查看处理","ctp_AAft9XcQbrlT"),
|
||||
// HOME_PARAMETER_COLLECTION9(" 您的参数收集任务将于今天到期,请及时查看处理","ctp_AAfefHo8thrQ"),
|
||||
//
|
||||
// REGULATION_TECHNICAL_ASSESSMENT1("法规技术评估发起提醒评估人","ctp_AAf2qRfouGcc"),
|
||||
// REGULATION_TECHNICAL_ASSESSMENT2("评估人提交通知发起人审批","ctp_AAfvKkz1xSd7"),
|
||||
// REGULATION_TECHNICAL_ASSESSMENT3("发起人审查通过,通知评估人","ctp_AAfK2oTpRGSa"),
|
||||
// REGULATION_TECHNICAL_ASSESSMENT4("发起人审查退回,评估人接收 - 任务","ctp_AAfK2oTp4Mir"),
|
||||
// REGULATION_TECHNICAL_ASSESSMENT5("任务提醒,评估人接收-任务 到期前三天","ctp_AAfvKkz1bozO"),
|
||||
// REGULATION_TECHNICAL_ASSESSMENT6("任务提醒,评估人接收-任务 当天","ctp_AAf2qRforjyP"),
|
||||
//
|
||||
// REGULATION_OPINION_COLLECTION1("法规意见收集发起提醒评估人","ctp_AAftzD2mN9jr"),
|
||||
// REGULATION_OPINION_COLLECTION2("任务提醒,评估人接收-任务 到期前三天","ctp_AAfK2oTpzhDX"),
|
||||
// REGULATION_OPINION_COLLECTION3("任务提醒,评估人接收-任务 当天","ctp_AAfefHo8XrBl"),
|
||||
// REGULATION_OPINION_COLLECTION4("评估人提交通知发起人","ctp_AAft9XcQW1lV"),
|
||||
// REGULATION_OPINION_COLLECTION5("任务完成当天通知发起人","ctp_AAftJ7q0YClP"),
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// SUBSCRIPTION_NOTIFICATION1("虚拟清单订阅更新","ctp_AAfRLrOqGiF9"),
|
||||
// SUBSCRIPTION_NOTIFICATION2("法规领域订阅更新","ctp_AAfvdg0Cy90I"),
|
||||
// SUBSCRIPTION_NOTIFICATION3("虚拟清单订阅更新","ctp_AAfRLrOqGiF9"),
|
||||
//
|
||||
// SHARE_FORWARD1("转发推送","ctp_AAfdBUtdLJog"),
|
||||
// SHARE_FORWARD2("问题知识库转发推送","ctp_AAfvQy0brRtq"),
|
||||
// SHARE_FORWARD3("问题知识库评论信息","ctp_AAf2qRfosO2P"),
|
||||
//
|
||||
// REGULATION_EARLY_WARNING1("订阅法规预警","ctp_AAfvQy0br1R7"),
|
||||
// REGULATION_EARLY_WARNING2("预警信息分享","ctp_AAfK3TvbktC9"),
|
||||
//
|
||||
// REGULATION_LIST_CONFIRMATION1("Studio发起,法规/认证接收-任务","ctp_AAfdBUtdpKCX"),
|
||||
// REGULATION_LIST_CONFIRMATION2("任务提醒,法规认证接收-任务","ctp_AAftzD2mK31z"),
|
||||
// REGULATION_LIST_CONFIRMATION3("状态通知,Studio接收/法规拒绝","ctp_AAftzD2mK7e6"),
|
||||
// REGULATION_LIST_CONFIRMATION4("状态通知,Studio接收/认证拒绝","ctp_AAfvdg0C4OXb"),
|
||||
//
|
||||
// REGULATION_TASK_CONFIRMATION1("发起,工程接口人接收-任务","ctp_AAfvdg0C4qSM"),
|
||||
// REGULATION_TASK_CONFIRMATION2("询问工程师,工程师接收-任务","ctp_AAftJ7q0OgGw"),
|
||||
// REGULATION_TASK_CONFIRMATION3("工程师退回,接口人接收消息-任务","ctp_AAftzD2meZ6I"),
|
||||
// REGULATION_TASK_CONFIRMATION4("工程师提交,接口人接收消息-任务","ctp_AAftJ7q0O8yL"),
|
||||
// REGULATION_TASK_CONFIRMATION5("任务提醒,工程接口人接收-任务 3天前","ctp_AAfvdg0CdIu8"),
|
||||
// REGULATION_TASK_CONFIRMATION6("任务提醒,工程接口人接收-任务 当天","ctp_AAftzD2mtsoN"),
|
||||
// REGULATION_TASK_CONFIRMATION7("任务提醒,工程接口人接收-任务 逾期之后 3天,7天,14天通知","ctp_AAfvKkz1QK9Z"),
|
||||
// REGULATION_TASK_CONFIRMATION8("任务提醒,工程接口人接收-任务 催办","ctp_AAf2qRfog8ey"),
|
||||
// REGULATION_TASK_CONFIRMATION9("状态提醒,Studio接收","ctp_AAfK2oTpd2de"),
|
||||
//
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION1("设计符合性任务,责任人接收-任务","ctp_AAftJ7q0YuC7"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION2("责任人下发工程师,工程师接收-任务责任人下发工程师,工程师接收-任务","ctp_AAft9XcQP4Qi"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION3("责任人催办,工程师接收-任务","ctp_AAfvdg0Czw0L"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION4("工程师提交反馈,责任人接收-任务","ctp_AAft9XcQTO27"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION5("责任人回复工程师,工程师接收-任务","ctp_AAftJ7q0feyC"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION6("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAfefHo8XmE9"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION7("任务提醒,责任人接收-任务 两周通知","ctp_AAfvKkz1Ewe9"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION8("任务提醒,责任人接收-任务 一周通知","ctp_AAftJ7q0ur2Z"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION9("任务提醒,责任人接收-任务 当天","ctp_AAfefHo8vZzW"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION10("任务提醒,责任人接收-任务 逾期之后 3天,7天,14天通知","ctp_AAft9XcQW9xx"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION11("责任人提交,发起人接收审查任务-任务","ctp_AAftJ7q0Yym9"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION12("发起人审查退回,责任人接收-任务","ctp_AAfefHo8vR6w"),
|
||||
// DESIGN_COMPLIANCE_CONFIRMATION13("发起人审查通过,责任人接收通知-通知","ctp_AAftJ7q0YF7H"),
|
||||
//
|
||||
// PRE_HOMO_CONFIRMATION1("Pre-Homo任务,责任人接收-任务","ctp_AAftJ7q0uXRs"),
|
||||
// PRE_HOMO_CONFIRMATION2("责任人下发工程师,工程师接收-任务","ctp_AAfefHo8KU8o"),
|
||||
// PRE_HOMO_CONFIRMATION3("责任人催办,工程师接收-任务","ctp_AAfvdg0C91Dv"),
|
||||
// PRE_HOMO_CONFIRMATION4("工程师提交反馈,责任人接收-任务","ctp_AAftJ7q03tft"),
|
||||
// PRE_HOMO_CONFIRMATION5("责任人回复工程师,工程师接收-任务","ctp_AAftJ7q03Xer"),
|
||||
// PRE_HOMO_CONFIRMATION6("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAfvKkz1ETZU"),
|
||||
// PRE_HOMO_CONFIRMATION7("任务提醒,责任人接收-任务 两周通知","ctp_AAft9XcQTFYa"),
|
||||
// PRE_HOMO_CONFIRMATION8("任务提醒,责任人接收-任务 一周通知","ctp_AAfefHo8219e"),
|
||||
// PRE_HOMO_CONFIRMATION9("任务提醒,责任人接收-任务 当天","ctp_AAftzD2mWof3"),
|
||||
// PRE_HOMO_CONFIRMATION10("任务提醒,责任人接收-任务 逾期之后 每天通知","ctp_AAftJ7q0ul4M"),
|
||||
// PRE_HOMO_CONFIRMATION11("责任人提交,发起人接收审查任务-任务","ctp_AAfvKkz1Evrr"),
|
||||
// PRE_HOMO_CONFIRMATION12("发起人审查退回,责任人接收-任务","ctp_AAfvKkz1nMgY"),
|
||||
// PRE_HOMO_CONFIRMATION13("发起人审查通过,责任人接收通知-通知","ctp_AAftJ7q0rtdn"),
|
||||
//
|
||||
//
|
||||
//
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION1("验证符合性任务,责任人接收-任务","ctp_AAftJ7q0u3Je"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION2("责任人下发工程师,工程师接收-任务","ctp_AAft9XcQLuty"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION3("责任人催办,工程师接收-任务","ctp_AAfefHo8Kpsf"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION4("工程师提交反馈,责任人接收-任务","ctp_AAfefHo8K9Qk"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION5("责任人回复工程师,工程师接收-任务","ctp_AAft9XcQLkZO"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION6("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAftzD2mPku1"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION7("任务提醒,责任人接收-任务 两周通知(接口人提交之后停止消息发送)","ctp_AAftJ7q0Hv3C"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION8("任务提醒,责任人接收-任务 一周通知(接口人提交之后停止消息发送)","ctp_AAftJ7q0HzZL"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION9("任务提醒,责任人接收-任务 当天(接口人提交之后停止消息发送)","ctp_AAfefHo8edYl"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION10("任务提醒,责任人接收-任务 逾期之后 每天通知(接口人提交之后停止消息发送)","ctp_AAfefHo8ef2S"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION11("责任人提交,发起人接收审查任务-任务","ctp_AAftJ7q03z1d"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION12("发起人审查退回,责任人接收-任务","ctp_AAfefHo8eOyG"),
|
||||
// VALIDATION_COMPLIANCE_CONFIRMATION13("发起人审查通过,责任人接收通知-通知","ctp_AAfefHo8K6DT"),
|
||||
|
||||
;
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private TemplateInfoEnum2(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
+8
@@ -122,4 +122,12 @@ public interface IFeishuService {
|
||||
* @param emailList
|
||||
*/
|
||||
JSONObject getUserInfoFromLarkByEmainList(List<String> emailList) throws IOException ;
|
||||
|
||||
/**
|
||||
* 根据模板-批量发送飞书卡片消息 由于开发分支问题,此方法只在认证清单流程中使用, 与 batchSendLarkCardMsgByTemplate 作用一样
|
||||
* @param json
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
Result<?> batchSendLarkCardMsgByTemplate2(JSONObject json) throws IOException;
|
||||
}
|
||||
|
||||
+37
@@ -1394,4 +1394,41 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
return responseJson;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> batchSendLarkCardMsgByTemplate2(JSONObject json) throws IOException {
|
||||
String token = this.getTenantAccessToken();
|
||||
// 设置请求头
|
||||
Map<String, String> headerMap = new HashMap<>();
|
||||
headerMap.put("Authorization", "Bearer " + token);
|
||||
headerMap.put("Content-Type", "application/json; charset=utf-8");
|
||||
|
||||
String template_id = json.getString("template_id");
|
||||
String[] userIdArr = json.getString("userIds").split(",");
|
||||
Map<String,Object> templateVariableMap = JSONObject.parseObject(JSONObject.toJSONString(json.get("templateVariableMap")),Map.class);
|
||||
|
||||
JSONObject templateJson = new JSONObject();
|
||||
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("template_id",template_id);
|
||||
data.put("template_variable",templateVariableMap);
|
||||
|
||||
templateJson.put("type","template");
|
||||
templateJson.put("data",data);
|
||||
|
||||
// 设置请求参数
|
||||
JSONObject paramsMap = new JSONObject();
|
||||
paramsMap.put("user_ids", userIdArr);
|
||||
paramsMap.put("msg_type", "interactive");
|
||||
paramsMap.put("card", templateJson);
|
||||
|
||||
// 发送请求给飞书
|
||||
String response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString());
|
||||
// 获取返回结果
|
||||
JSONObject tokenJson = JSONObject.parseObject(response);
|
||||
if(!tokenJson.get("code").toString().equals("0")) {
|
||||
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson);
|
||||
}
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -234,4 +234,11 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
|
||||
public Result<?> transferTask(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.transferTask(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-催办")
|
||||
@ApiOperation(value="项目库-认证清单表-催办", notes="项目库-认证清单表-催办")
|
||||
@PostMapping(value = "/expediting")
|
||||
public Result<?> expediting(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.expediting(json);
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -145,6 +145,14 @@ public class ProjectLibraryBase implements Comparable<ProjectLibraryBase> {
|
||||
@TableField(exist = false)
|
||||
private String brandTextEn;
|
||||
|
||||
/**项目名称 英文*/
|
||||
@TableField(exist = false)
|
||||
private String projectNameEn;
|
||||
|
||||
/**项目名称 中文**/
|
||||
@TableField(exist = false)
|
||||
private String projectNameCn;
|
||||
|
||||
@Override
|
||||
public int compareTo(ProjectLibraryBase o) {
|
||||
return Integer.valueOf(this.projectVersion)-Integer.valueOf(o.projectVersion);//升序
|
||||
|
||||
+2
@@ -12,11 +12,13 @@ public enum JumpLinkEnum {
|
||||
* 103:跳转 项目库 - 任务清单
|
||||
* 104:跳转 项目库 - 未符合项
|
||||
* 105:跳转 项目库 - 认证参数收集
|
||||
* 106:跳转 项目库 - 认证清单
|
||||
*/
|
||||
INVENTORY_AFFIRM_LINK("清单确认链接","1","/ProjectDetails?id=","&type=102"),
|
||||
PREHOMO_AFFIRM_LINK("prehomo确认链接","2","/ProjectDetails?id=","&type=103"),
|
||||
VERIFY_AFFIRM_LINK("验证符合性确认链接","3","/ProjectDetails?id=","&type=103"),
|
||||
DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"),
|
||||
CERTIFICATION_INVENTORY_LINK("认证清单链接","5","/ProjectDetails?id=","&type=106"),
|
||||
TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""),
|
||||
FGPG_TODO_CENTER_LINK("法规评估任务待办中心链接","88","/regulatoryAssessmentTasks",""),
|
||||
XMCS_TODO_CENTER_LINK("项目参数任务待办中心链接","99","/projectParameterTasks",""),
|
||||
|
||||
+7
@@ -46,6 +46,13 @@ public enum OperatorTypeEnum {
|
||||
* 流程信息明细表
|
||||
*/
|
||||
UPDATE_PROCESS_INFO_DETAIL_BY_TASK_ID("根据taskId更新流程信息明细表","updateProcessInfoDetailByTaskId"),
|
||||
|
||||
/**
|
||||
* 项目库-认证清单
|
||||
*/
|
||||
CERTIFICATION_INVENTORY_STUDIO_EXPEDITING("认证清单-studio催办","certificationInventoryStudioExpediting"),
|
||||
CERTIFICATION_INVENTORY_CERTIFICATION_ENGINEER_EXPEDITING("认证清单-认证工程师催办","certificationInventoryCertificationEngineerExpediting"),
|
||||
CERTIFICATION_INVENTORY_SDT_EXPEDITING("认证清单-接口人催办","certificationInventorySdtExpediting"),
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
+7
@@ -149,4 +149,11 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
|
||||
* @return
|
||||
*/
|
||||
Result<?> transferTask(JSONObject json);
|
||||
|
||||
/**
|
||||
* 催办任务
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
Result<?> expediting(JSONObject json);
|
||||
}
|
||||
|
||||
+7
@@ -139,4 +139,11 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
|
||||
* @return
|
||||
*/
|
||||
List<ProjectLibraryBase> getParentAndChildern(String parentId);
|
||||
|
||||
/**
|
||||
* 根据id查询项目库详情信息 发送飞书消息时使用,之前的 queryById不太兼容
|
||||
* @param projectLibraryId
|
||||
* @return
|
||||
*/
|
||||
ProjectLibraryBase selectById(String projectLibraryId);
|
||||
}
|
||||
|
||||
+211
@@ -11,6 +11,8 @@ import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.DateUtils;
|
||||
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
@@ -40,8 +42,10 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -78,6 +82,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
private IProjectRelatedPersonnelService projectRelatedPersonnelService;
|
||||
@Autowired
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -1310,4 +1320,205 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
return Result.OK("转办成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> expediting(JSONObject json) {
|
||||
String ids = json.getString("ids");
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
throw new JeroBootException("至少选择一条数据进行操作!");
|
||||
}
|
||||
|
||||
String projectLibraryId = json.getString("projectLibraryId");
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
if(ObjectUtils.isEmpty(projectLibraryBase)){
|
||||
throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!");
|
||||
}
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
|
||||
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList);
|
||||
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getDutyPerson,currentUser.getId());
|
||||
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(queryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOList)){
|
||||
//飞书跳转链接
|
||||
String hrefFeishu_CN = backUrl
|
||||
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getLink()
|
||||
+ projectLibraryId
|
||||
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getType()
|
||||
+ "&projectName=" + PRN_CN;
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu_EN = backUrl
|
||||
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getLink()
|
||||
+ projectLibraryId
|
||||
+ JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getType()
|
||||
+ "&projectName=" + PRN_EN;
|
||||
|
||||
/**
|
||||
* studio催办:除了 清单待发布、审查通过、认证退回 的 催办当前办理人
|
||||
* 认证工程师催办:任务待确认、结果待提交、审查退回 的 催办当前办理人
|
||||
* 接口人催办:任务待确认 、结果待提交、审查退回 的 催办当前办理人
|
||||
*/
|
||||
String operatorType = json.getString("operatorType");
|
||||
if(StringUtils.equals(operatorType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_EXPEDITING.getValue())){
|
||||
List<ProjectCertificationInventoryEO> certificationInventoryEOList = projectCertificationInventoryEOList.stream().filter(data -> {
|
||||
return (StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|
||||
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue())
|
||||
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue()));
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(certificationInventoryEOList)){
|
||||
String certificationEngineerIds = projectLibraryBase.getCertificationEngineer();
|
||||
if(StringUtils.isNotEmpty(certificationEngineerIds)){
|
||||
List<String> certificationEngineerIdList = Arrays.asList(certificationEngineerIds.split(","));
|
||||
|
||||
List<SysUser> certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList);
|
||||
StringBuilder standNameSb = new StringBuilder();
|
||||
StringBuilder itemNameSb = new StringBuilder();
|
||||
|
||||
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
|
||||
Collections.sort(certificationInventoryEOList, new Comparator<ProjectCertificationInventoryEO>() {
|
||||
@Override
|
||||
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
|
||||
return p1.getEndTime().compareTo(p2.getEndTime());
|
||||
}
|
||||
});
|
||||
Date endTime = certificationInventoryEOList.get(0).getEndTime();
|
||||
|
||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : certificationInventoryEOList) {
|
||||
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getInspectionItem())){
|
||||
itemNameSb.append(projectCertificationInventoryEO.getInspectionItem()).append(",");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getSerialNumber())){
|
||||
standNameSb.append(projectCertificationInventoryEO.getSerialNumber()).append(",");
|
||||
}
|
||||
}
|
||||
|
||||
String standName = "";
|
||||
if(StringUtils.isNotEmpty(standNameSb.toString())){
|
||||
standName = standNameSb.toString().substring(0,standNameSb.toString().length()-1);
|
||||
}
|
||||
String itemName = "";
|
||||
if(StringUtils.isNotEmpty(itemNameSb.toString())){
|
||||
itemName = itemNameSb.toString().substring(0,itemNameSb.toString().length()-1);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(certificationEngineerList)){
|
||||
for (String certificationEngineerId : certificationEngineerIdList) {
|
||||
String thirdId = certificationEngineerList.stream().filter(certificationEngineer -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(certificationEngineerId,certificationEngineer.getId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList()).get(0).getThirdId();
|
||||
|
||||
try {
|
||||
JSONObject larkMesJson = new JSONObject();
|
||||
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE1.getValue());
|
||||
larkMesJson.put("userIds",thirdId);
|
||||
|
||||
Map<String,Object> templateVariableMap = new HashMap<>();
|
||||
templateVariableMap.put("projectNameCn",PRN_CN);
|
||||
templateVariableMap.put("projectNameEn",PRN_EN);
|
||||
templateVariableMap.put("standName",standName);
|
||||
templateVariableMap.put("itemName",itemName);
|
||||
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<String> dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
|
||||
List<SysUser> dutyPersonList = this.sysUserService.querySysUserListByIdList(dutyPersonIdList);
|
||||
|
||||
Map<String, List<ProjectCertificationInventoryEO>> certifycationInventoryListByDutyPersonMap = projectCertificationInventoryEOList.stream().filter(data -> {
|
||||
return (StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
|
||||
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|
||||
|| StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue()));
|
||||
}).collect(Collectors.groupingBy(ProjectCertificationInventoryEO::getDutyPerson));
|
||||
|
||||
if(!ObjectUtils.isEmpty(certifycationInventoryListByDutyPersonMap) && CollectionUtils.isNotEmpty(dutyPersonList)){
|
||||
for (Map.Entry<String, List<ProjectCertificationInventoryEO>> map : certifycationInventoryListByDutyPersonMap.entrySet()) {
|
||||
String key = map.getKey();
|
||||
List<ProjectCertificationInventoryEO> value = map.getValue();
|
||||
|
||||
String thirdId = dutyPersonList.stream().filter(dutyPersonInfo -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(key,dutyPersonInfo.getId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList()).get(0).getThirdId();
|
||||
|
||||
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
|
||||
Collections.sort(value, new Comparator<ProjectCertificationInventoryEO>() {
|
||||
@Override
|
||||
public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) {
|
||||
return p1.getEndTime().compareTo(p2.getEndTime());
|
||||
}
|
||||
});
|
||||
Date endTime = value.get(0).getEndTime();
|
||||
|
||||
StringBuilder standNameSb = new StringBuilder();
|
||||
StringBuilder itemNameSb = new StringBuilder();
|
||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : value) {
|
||||
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getInspectionItem())){
|
||||
itemNameSb.append(projectCertificationInventoryEO.getInspectionItem()).append(",");
|
||||
}
|
||||
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getSerialNumber())){
|
||||
standNameSb.append(projectCertificationInventoryEO.getSerialNumber()).append(",");
|
||||
}
|
||||
}
|
||||
|
||||
String standName = "";
|
||||
if(StringUtils.isNotEmpty(standNameSb.toString())){
|
||||
standName = standNameSb.toString().substring(0,standNameSb.toString().length()-1);
|
||||
}
|
||||
String itemName = "";
|
||||
if(StringUtils.isNotEmpty(itemNameSb.toString())){
|
||||
itemName = itemNameSb.toString().substring(0,itemNameSb.toString().length()-1);
|
||||
}
|
||||
|
||||
try {
|
||||
JSONObject larkMesJson = new JSONObject();
|
||||
larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE1.getValue());
|
||||
larkMesJson.put("userIds",thirdId);
|
||||
|
||||
Map<String,Object> templateVariableMap = new HashMap<>();
|
||||
templateVariableMap.put("projectNameCn",PRN_CN);
|
||||
templateVariableMap.put("projectNameEn",PRN_EN);
|
||||
templateVariableMap.put("standName",standName);
|
||||
templateVariableMap.put("itemName",itemName);
|
||||
templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
templateVariableMap.put("endTime",DateUtils.formatDate(endTime));
|
||||
templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN);
|
||||
templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN);
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Result.OK("催办成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+43
@@ -1857,6 +1857,49 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
List<ProjectLibraryBase> list = this.list(wrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectLibraryBase selectById(String projectLibraryId) {
|
||||
List<ProjectLibraryBase> records = this.projectLibraryBaseMapper.queryById(projectLibraryId);
|
||||
disposeData(records,"",false);
|
||||
|
||||
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||
for(ProjectLibraryBase projectLibraryBase: records){
|
||||
//历史数据的主版本没有版本号,所以默认给00
|
||||
if(StringUtils.isBlank(projectLibraryBase.getParentId()) && StringUtils.isBlank(projectLibraryBase.getProjectVersion())){
|
||||
projectLibraryBase.setProjectVersion("00");
|
||||
}
|
||||
//目标市场 英文
|
||||
Map<String,Object> paramEn = new HashMap<>();
|
||||
paramEn.put("cut",CutEnum.EN.getValue());
|
||||
String targetMarketEn = getMarket(paramEn, targetMarketList, projectLibraryBase);
|
||||
|
||||
//目标市场 中文
|
||||
Map<String,Object> paramCn = new HashMap<>();
|
||||
paramCn.put("cut",CutEnum.CN.getValue());
|
||||
String targetMarketCn = getMarket(paramCn, targetMarketList, projectLibraryBase);
|
||||
|
||||
//主项目的版本号
|
||||
String projectVersion = "";
|
||||
if(StringUtils.isBlank(projectLibraryBase.getParentId())){
|
||||
projectVersion = "00";
|
||||
}else{
|
||||
projectVersion = projectLibraryBase.getProjectVersion();
|
||||
}
|
||||
if(StringUtils.isNotBlank(projectLibraryBase.getYearName())){
|
||||
projectLibraryBase.setProjectNameEn(projectLibraryBase.getProjectName()
|
||||
+ "-" + projectLibraryBase.getYearName()
|
||||
+ "-" + targetMarketEn
|
||||
+ "-" + projectVersion);
|
||||
|
||||
projectLibraryBase.setProjectNameCn(projectLibraryBase.getProjectName()
|
||||
+ "-" + projectLibraryBase.getYearName()
|
||||
+ "-" + targetMarketCn
|
||||
+ "-" + projectVersion);
|
||||
}
|
||||
}
|
||||
return records.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1426,4 +1426,9 @@ module.exports = {
|
||||
confirmUrging:'Confirm urging ?',
|
||||
confirmWithdrawal:'Confirm withdrawal ?',
|
||||
onlyListCheckedCanRecalled:'Only the data whose process status is list to be checked can be recalled',
|
||||
statusthetasistobeconfirmed:'You can withdraw the list only when the status of the list is to be checked or the status of the task is to be confirmed',
|
||||
confirmreturn:'Confirm return ?',
|
||||
onlyDataSelected:'Only data with process status of task to be confirmed, result to be submitted and review to be returned can be selected',
|
||||
youCannotStatusListToBeReleasedAndApproved:'You cannot select data whose process status is list to be released and approved',
|
||||
batchmodify:'Whether to batch modify',
|
||||
}
|
||||
@@ -1524,7 +1524,13 @@ module.exports = {
|
||||
confirmReturnForApproval:'确认退回审批?',
|
||||
onlyDataStatusResultReviewedCanBeSelected:'只能选择流程状态为结果待审查的数据',
|
||||
confirmResetProcess:'确认重置流程?',
|
||||
confirmUrging:'确认催办',
|
||||
statusthetasistobeconfirmed:'只有清单待校核状态或任务确认状态为待确认时才可以进行撤回',
|
||||
confirmreturn:'确认退回?',
|
||||
confirmUrging:'确认催办?',
|
||||
confirmWithdrawal:'确认撤回?',
|
||||
onlyListCheckedCanRecalled:'只能撤回流程状态为清单待校核的数据',
|
||||
onlyDataSelected:'只能选择流程状态为任务待确认、结果待提交、审查退回的数据',
|
||||
youCannotStatusListToBeReleasedAndApproved:'不能选择流程状态为清单待发布、审查通过的数据',
|
||||
batchmodify:'是否批量修改',
|
||||
}
|
||||
@@ -207,7 +207,9 @@
|
||||
'13': 'Viewer',
|
||||
'14': '品牌管理员',
|
||||
'20': '接口人',
|
||||
'21': '责任人'
|
||||
'21': '责任人',
|
||||
'30': '工程接口人',
|
||||
'31': '责任人',
|
||||
},
|
||||
roleSwitchListEn: {
|
||||
'0': 'R&H Studio',
|
||||
@@ -219,7 +221,9 @@
|
||||
'13': 'Viewer',
|
||||
'14': 'BrandAdministrator',
|
||||
'20': 'Interface person',
|
||||
'21': 'Person liable'
|
||||
'21': 'Person liable',
|
||||
'30': 'Engineering interface person',
|
||||
'31': 'Person liable',
|
||||
},
|
||||
areaOfResponsibility: {},
|
||||
engineeringInterfacePerson: '',
|
||||
@@ -321,7 +325,12 @@
|
||||
},
|
||||
//待办中心跳转
|
||||
todocenterClick(){
|
||||
|
||||
this.$router.push({
|
||||
path: '/projectRegulationTasks',
|
||||
query: {
|
||||
projectName:this.$route.query.projectName
|
||||
}
|
||||
})
|
||||
},
|
||||
UpdateLogClick() {
|
||||
this.$refs.updateLogRef.getList({ projectLibraryId: this.$route.query.id })
|
||||
|
||||
@@ -10,21 +10,6 @@
|
||||
>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('implementationCategory')">{{$t('implementationCategory')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.implementType"
|
||||
@input="handleInput('implementType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('implementationCategory')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="implement_type"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
@@ -43,22 +28,6 @@
|
||||
</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('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="region">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.region"
|
||||
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'region'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
@@ -96,93 +65,253 @@
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}}</span>
|
||||
:title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'implementTime'">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('vehicleInProductionDate')"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
@change="dateChange({db_field_name:'implementTime'})"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline.implementTime"
|
||||
style="width: 100%"/>
|
||||
<a-form-model-item class="itemModel" prop="designDutyId">
|
||||
<PersonnelSelection :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
|
||||
:isSingleChoice="true"
|
||||
:personneQuery="formInline"
|
||||
v-if="visible"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.engineeringInterfacePersonName"/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
|
||||
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
|
||||
<!-- @input="handleInput('designDuty')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-col :span="12" v-if="this.code != '1'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('ImplementationDate')">{{$t('ImplementationDate')}}</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-date-picker class="box-input"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
:placeholder="$t('PleaseSelect')+$t('ImplementationDate')"
|
||||
@change="dateChange({db_field_name:'xin1Che1Xing2Shi2Shi1Ri4Qi1'})"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline.xin1Che1Xing2Shi2Shi1Ri4Qi1"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('deadlineForConfirmationOfDesignCompliance')">
|
||||
{{$t('deadlineForConfirmationOfDesignCompliance')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('deadlineForConfirmationOfDesignCompliance')"
|
||||
@change="dateChange({db_field_name:'designDueDate'})"
|
||||
format="YYYY-MM-DD"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
v-model="formInline.designDueDate"
|
||||
:disabled="false"
|
||||
style="width: 100%"/>
|
||||
<a-form-model-item class="itemModel" prop="designDutyId">
|
||||
<PersonnelSelection :query="{db_field_name:'regulatoryEngineer',db_field_txt:$t('regulatoryEngineer')}"
|
||||
:isSingleChoice="true"
|
||||
:personneQuery="formInline"
|
||||
v-if="visible"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.regulatoryEngineerName"/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
|
||||
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
|
||||
<!-- @input="handleInput('designDuty')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div class="header-text">
|
||||
{{$t('confirmationOfDesignConformity')}}
|
||||
</div>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('prehomoConfirmationDeadline')">
|
||||
{{$t('prehomoConfirmationDeadline')}}</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('personLiable')">{{$t('personLiable')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('prehomoConfirmationDeadline')"
|
||||
@change="dateChange({db_field_name:'prehomoDueDate'})"
|
||||
format="YYYY-MM-DD"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
v-model="formInline.prehomoDueDate"
|
||||
:disabled="false"
|
||||
style="width: 100%"/>
|
||||
<a-form-model-item class="itemModel" prop="designDutyId">
|
||||
<PersonnelSelection :query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
|
||||
:isSingleChoice="true"
|
||||
:personneQuery="formInline"
|
||||
v-if="visible"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.dutyPersonName"/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
|
||||
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
|
||||
<!-- @input="handleInput('designDuty')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('verificationComplianceConfirmationDeadline')">
|
||||
{{$t('verificationComplianceConfirmationDeadline')}}</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel" :prop="'verifyDueDate'">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('verificationComplianceConfirmationDeadline')"
|
||||
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
|
||||
@change="dateChange({db_field_name:'verifyDueDate'})"
|
||||
format="YYYY-MM-DD"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
v-model="formInline.verifyDueDate"
|
||||
:disabled="false"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <div class="box-title-text">-->
|
||||
<!-- <div class="title-text">-->
|
||||
<!-- <span class="title-text-text"-->
|
||||
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-form-model-item class="itemModel" prop="designInitiatorId">-->
|
||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
|
||||
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
|
||||
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
||||
<!-- class="box-input"-->
|
||||
<!-- allowClear-->
|
||||
<!-- v-model="formInline.designInitiatorId">-->
|
||||
<!-- <a-select-option v-for="(item, key) in designInitiatorList"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- <!– <j-dict-select-tag class="box-input" v-model="formInline.designInitiator"–>-->
|
||||
<!-- <!– :disabled="formInline.roleCode == 0 ? false : true"–>-->
|
||||
<!-- <!– @input="handleInput('designInitiator')"–>-->
|
||||
<!-- <!– :placeholder="$t('PleaseSelect')+$t('Sponsor')"–>-->
|
||||
<!-- <!– :type="'select'"–>-->
|
||||
<!-- <!– :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>–>-->
|
||||
<!-- </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('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="typeOfDeliverables">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="formInline.designDeliverableType"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="DeliverableTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDeliverableType"-->
|
||||
<!-- @input="handleInput('designDeliverableType')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div class="header-text">
|
||||
{{$t('verificationAndConformityconfirmation')}}
|
||||
</div>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('personLiable')">{{$t('personLiable')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="verifyDutyId">
|
||||
<PersonnelSelection :query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
|
||||
:isSingleChoice="true"
|
||||
:personneQuery="formInline"
|
||||
v-if="visible"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.dutyPersonName"/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDuty"-->
|
||||
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
|
||||
<!-- @input="handleInput('verifyDuty')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'verifyDueDate'">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
|
||||
@change="dateChange({db_field_name:'verifyDueDate'})"
|
||||
format="YYYY-MM-DD"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
v-model="formInline.verifyDueDate"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <div class="box-title-text">-->
|
||||
<!-- <div class="title-text">-->
|
||||
<!-- <span class="title-text-text"-->
|
||||
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-form-model-item class="itemModel" prop="verifyInitiatorId">-->
|
||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
|
||||
<!-- class="box-input"-->
|
||||
<!-- allowClear-->
|
||||
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
||||
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
|
||||
<!-- v-model="formInline.verifyInitiatorId">-->
|
||||
<!-- <a-select-option v-for="(item, key) in verifyInitiatorList"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- <!– <j-dict-select-tag class="box-input" v-model="formInline.verifyInitiator"–>-->
|
||||
<!-- <!– :disabled="formInline.roleCode == 0 ? false : true"–>-->
|
||||
<!-- <!– @input="handleInput('verifyInitiator')"–>-->
|
||||
<!-- <!– :placeholder="$t('PleaseSelect')+$t('Sponsor')"–>-->
|
||||
<!-- <!– :type="'select'"–>-->
|
||||
<!-- <!– :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>–>-->
|
||||
<!-- </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('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="verifyDeliverableType">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="formInline.verifyDeliverableType"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="DeliverableTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDeliverableType"-->
|
||||
<!-- :disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyDeliverableType ? true : false"-->
|
||||
<!-- @input="handleInput('verifyDeliverableType')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
@@ -190,25 +319,39 @@
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'batSetting',
|
||||
props: ['url'],
|
||||
components: {
|
||||
PersonnelSelection
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
designDutyList: [],
|
||||
DeliverableTreeList: [],
|
||||
formInline: {},
|
||||
rules: {},
|
||||
ids: []
|
||||
ids: [],
|
||||
code:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
edit(data) {
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
edit(data,code) {
|
||||
this.visible = true
|
||||
this.getDeliverableTree()
|
||||
this.code = code
|
||||
console.log(this.code)
|
||||
this.$nextTick(() => {
|
||||
this.ids = data || []
|
||||
this.formInline = {}
|
||||
@@ -221,6 +364,15 @@
|
||||
this.handleOkOne()
|
||||
}
|
||||
},
|
||||
getDeliverableTree() {
|
||||
getAction('/sys/category/getDeliverableTree', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.DeliverableTreeList = res.result
|
||||
} else {
|
||||
this.DeliverableTreeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOkOne() {
|
||||
let ids = JSON.parse(JSON.stringify(this.ids))
|
||||
let query = {
|
||||
|
||||
@@ -501,7 +501,7 @@
|
||||
AndUserId: '/project/projectLibraryRoleRelEO/queryByProjectLibraryIdAndUserId',
|
||||
AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit',
|
||||
saveBatch: '/project/projectCertificationInventoryEO/saveBatch',
|
||||
questionUrl: ''
|
||||
questionUrl: '/project/projectCertificationInventoryEO/expediting'
|
||||
},
|
||||
dataSource: [],
|
||||
roleSwitchingCode: '',
|
||||
@@ -988,31 +988,99 @@
|
||||
},
|
||||
//催办
|
||||
questionClick() {
|
||||
let _this = this
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$confirm({
|
||||
content: _this.$t('confirmUrging'),
|
||||
onOk() {
|
||||
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||
postAction(_this.url.questionUrl, {
|
||||
ids: idList.join(','),
|
||||
projectLibraryId: _this.$route.query.id
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
let ids = []
|
||||
let notConditions = []
|
||||
let data = ''
|
||||
if (this.roleSwitchingCode == 0) {
|
||||
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
|
||||
if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Certification returned' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Engineer return' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Results to be reviewed' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Review and return') {
|
||||
ids.push(this.selectedRowKeysList[i].id)
|
||||
} else {
|
||||
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
|
||||
}
|
||||
}
|
||||
})
|
||||
if (notConditions && notConditions.length > 0) {
|
||||
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('youCannotStatusListToBeReleasedAndApproved')
|
||||
}
|
||||
if (ids && ids.length > 0) {
|
||||
this.questionData('certificationInventoryStudioExpediting', ids, notConditions, data)
|
||||
} else {
|
||||
this.failedMessage(data)
|
||||
}
|
||||
} else if (this.roleSwitchingCode == 2) {
|
||||
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
|
||||
if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Review and return') {
|
||||
ids.push(this.selectedRowKeysList[i].id)
|
||||
} else {
|
||||
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
|
||||
}
|
||||
}
|
||||
if (notConditions && notConditions.length > 0) {
|
||||
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataSelected')
|
||||
}
|
||||
if (ids && ids.length > 0) {
|
||||
this.questionData('certificationInventoryCertificationEngineerExpediting', ids, notConditions, data)
|
||||
} else {
|
||||
this.failedMessage(data)
|
||||
}
|
||||
} else if (this.roleSwitchingCode == 20) {
|
||||
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
|
||||
if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Review and return') {
|
||||
ids.push(this.selectedRowKeysList[i].id)
|
||||
} else {
|
||||
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
|
||||
}
|
||||
}
|
||||
if (notConditions && notConditions.length > 0) {
|
||||
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataSelected')
|
||||
}
|
||||
if (ids && ids.length > 0) {
|
||||
this.questionData('certificationInventorySdtExpediting', ids, notConditions, data)
|
||||
} else {
|
||||
this.failedMessage(data)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
|
||||
questionData(operatorType, ids, notConditions, data) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('confirmUrging'),
|
||||
onOk() {
|
||||
postAction(_this.url.questionUrl, {
|
||||
ids: ids.join(','),
|
||||
projectLibraryId: _this.$route.query.id,
|
||||
operatorType: operatorType
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.selectedRowKeysList = []
|
||||
_this.getList()
|
||||
if (notConditions && notConditions.length > 0) {
|
||||
_this.failedMessage(data)
|
||||
}
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
transferListForm() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
@@ -1159,16 +1227,39 @@
|
||||
this.turnToDoClickJC()
|
||||
return
|
||||
}
|
||||
this.$refs.SelectedByRef.getPush()
|
||||
this.toDoIds = []
|
||||
this.toDoNotConditions = []
|
||||
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
|
||||
if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Review and return') {
|
||||
this.toDoIds.push(this.selectedRowKeysList[i].id)
|
||||
} else {
|
||||
this.toDoNotConditions.push(this.selectedRowKeysList[i].inspectionItem)
|
||||
}
|
||||
}
|
||||
this.toDoData = ''
|
||||
if (this.toDoNotConditions && this.toDoNotConditions.length > 0) {
|
||||
this.toDoData = this.$t('inspectionItems') + '"' + this.toDoNotConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataSelected')
|
||||
}
|
||||
if (this.toDoIds && this.toDoIds.length > 0) {
|
||||
this.$refs.SelectedByRef.getPush()
|
||||
} else {
|
||||
this.failedMessage(this.toDoData)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
//接口人转办
|
||||
turnToDoClickJC() {
|
||||
this.toDoIds = []
|
||||
this.toDoNotConditions = []
|
||||
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
|
||||
if (this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) {
|
||||
if ((this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' ||
|
||||
this.selectedRowKeysList[i].flowStatus == 'Review and return') &&
|
||||
this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) {
|
||||
this.toDoIds.push(this.selectedRowKeysList[i].id)
|
||||
} else {
|
||||
this.toDoNotConditions.push(this.selectedRowKeysList[i].inspectionItem)
|
||||
@@ -1184,6 +1275,7 @@
|
||||
this.failedMessage(this.toDoData)
|
||||
}
|
||||
},
|
||||
//转办接口
|
||||
SelectedByForm(userIds) {
|
||||
let query = {
|
||||
transferUserId: userIds,
|
||||
|
||||
@@ -97,20 +97,24 @@
|
||||
<!-- v-if="(isRoleSwitching && !isDisplay) || (!isDisplay && roleSwitchingList.length > 1) || isDisplay"-->
|
||||
<div class="table-operator"
|
||||
style="overflow:hidden;margin-bottom: 20px">
|
||||
<div style="float: left;margin-bottom: 0px;margin-left: 20px" v-if="isDisplay">
|
||||
<div @click="transferClick" class="operator-text">
|
||||
<div style="float: left;margin-bottom: 0px;margin-left: 20px">
|
||||
<!-- 调取-->
|
||||
<div @click="transferClick" class="operator-text" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '0'">
|
||||
<a-icon type="profile" />
|
||||
{{ $t('Transfer') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="bringInRelevantPersonnelClick">
|
||||
<!-- 带入相关人员-->
|
||||
<div class="operator-text" @click="bringInRelevantPersonnelClick" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '0'">
|
||||
<a-icon type="user" />
|
||||
{{ $t('bringInRelevantPersonnel') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="batSettingClick">
|
||||
<!-- 批量设置-->
|
||||
<div class="operator-text" @click="batSettingClick" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '0' || this.formInlineRoleSwitching.roleSwitchingCode == '1'">
|
||||
<a-icon type="setting" />
|
||||
{{ $t('BatchSetting') }}
|
||||
</div>
|
||||
<a-popconfirm :visible="customizevisible" overlayClassName="popconfirmmize" placement="bottomRight">
|
||||
<!-- 列表设置-->
|
||||
<a-popconfirm :visible="customizevisible" overlayClassName="popconfirmmize" placement="bottomRight" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '0' || this.formInlineRoleSwitching.roleSwitchingCode == '1'">
|
||||
<template slot="title" id="popconfirmmize">
|
||||
<div style="height:320px;overflow:scroll;overflow-x: auto;">
|
||||
<a-checkbox
|
||||
@@ -137,38 +141,47 @@
|
||||
<a-icon type="setting" />
|
||||
{{ $t('customize') }}
|
||||
</div>
|
||||
</a-popconfirm>
|
||||
<a-popconfirm overlayClassName="popconfirm" placement="bottomRight">
|
||||
</a-popconfirm v-if="this.formInlineRoleSwitching.roleSwitchingCode == '0' || this.formInlineRoleSwitching.roleSwitchingCode == '1'">
|
||||
<!-- 更多-->
|
||||
<a-popconfirm overlayClassName="popconfirm" placement="bottomRight" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '0'">
|
||||
<template slot="title" id="popconfirm">
|
||||
<div style="height:320px;overflow:scroll;overflow-x: auto;">
|
||||
<!-- 添加-->
|
||||
<div @click="handleAdd" class="operator-text-title">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('add') }}
|
||||
</div>
|
||||
<!-- 复制-->
|
||||
<div @click="copyClick" class="operator-text-title">
|
||||
<a-icon type="copy" />
|
||||
{{ $t('copy') }}
|
||||
</div>
|
||||
<!-- 批量删除-->
|
||||
<div @click="handleDel" class="operator-text-title">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('BatchDelete') }}
|
||||
</div>
|
||||
<!-- 模板下载-->
|
||||
<div @click="handleModule" class="operator-text-title">
|
||||
<a-icon type="download" />
|
||||
{{ $t('templateDownload') }}
|
||||
</div>
|
||||
<!-- 导入-->
|
||||
<div class="operator-text-title">
|
||||
<ImportFile :url="url" :projectLibraryId=$route.query.id :isTrue="true" :accept="'.zip'"
|
||||
@getList="getPersonnelList" />
|
||||
</div>
|
||||
<!-- 导出-->
|
||||
<div @click="handleExport" v-has="'projectLawsInventory:exportData'" class="operator-text-title">
|
||||
<a-icon type="export" :rotate="-90" />
|
||||
{{ $t('export') }}
|
||||
</div>
|
||||
<!-- 定版-->
|
||||
<div class="operator-text-title" @click="fixedPlateClick">
|
||||
<a-icon type="pushpin" />
|
||||
{{ $t('fixedPlate') }}
|
||||
</div>
|
||||
<!-- 生成合规报告-->
|
||||
<div class="operator-text-title" @click="ExportReportClick">
|
||||
<a-icon type="export" :rotate="-90" />
|
||||
{{ $t('compliancereport') }}
|
||||
@@ -181,6 +194,7 @@
|
||||
<!-- <a-icon type="setting" />-->
|
||||
<!-- {{ $t('batchSettingPersonnel') }}-->
|
||||
<!-- </div>-->
|
||||
<!-- 流程重置-->
|
||||
<div class="operator-text-title" @click="alterationClick">
|
||||
<a-icon type="file-search" />
|
||||
{{ $t('processReset') }}
|
||||
@@ -196,47 +210,43 @@
|
||||
<!-- {{ $t('initiateTaskConfirmation') }}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div style="float: right;margin-top: 1px;;margin-right: 20px" v-if="isDisplay">
|
||||
<div style="float: right;margin-top: 1px;;margin-right: 20px">
|
||||
|
||||
<!-- <div class="operator-text" @click="customizeClick">-->
|
||||
<!-- <a-icon type="setting"/>-->
|
||||
<!-- {{ $t('customize') }}-->
|
||||
<!-- </div>-->
|
||||
<div class="operator-text" @click="initiateListConfirmationcClick('清单')">
|
||||
<a-icon type="solution" />
|
||||
{{ $t('release') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="withdrawnClick">
|
||||
<a-icon type="rollback" />
|
||||
{{ $t('withdraw') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="questionClick">
|
||||
<a-icon type="sound" />
|
||||
{{ $t('question') }}
|
||||
</div>
|
||||
<!-- <div class="operator-text"-->
|
||||
<!-- v-if="roleSwitchingList.length > 1"-->
|
||||
<!-- @click="roleSwitchingClick">-->
|
||||
<!-- <a-icon type="select" />-->
|
||||
<!-- {{ $t('roleSwitching') }}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 0px;margin-right: 20px">
|
||||
<div @click="handleExport" v-has="'projectLawsInventory:exportData'"
|
||||
v-if="isRoleSwitching || formInlineRoleSwitching.roleSwitchingCode == '12'"
|
||||
v-if="this.formInlineRoleSwitching.roleSwitchingCode == '1' || this.formInlineRoleSwitching.roleSwitchingCode == '2' || this.formInlineRoleSwitching.roleSwitchingCode == '30' || this.formInlineRoleSwitching.roleSwitchingCode == '31'"
|
||||
class="operator-text">
|
||||
<a-icon type="export" :rotate="-90" />
|
||||
{{ $t('export') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="submitClick(0)" v-if="isRoleSwitching">
|
||||
<!-- 发布-->
|
||||
<div class="operator-text" @click="initiateListConfirmationcClick('清单')" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '0'">
|
||||
<a-icon type="solution" />
|
||||
{{ $t('release') }}
|
||||
</div>
|
||||
<!-- 撤回-->
|
||||
<div class="operator-text" @click="withdrawnClick" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '0'">
|
||||
<a-icon type="rollback" />
|
||||
{{ $t('withdraw') }}
|
||||
</div>
|
||||
<!-- 发起任务-->
|
||||
<div class="operator-text" @click="submitClick(0)" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '1'">
|
||||
<a-icon type="check-circle" />
|
||||
{{ $t('submit') }}
|
||||
{{ $t('initiateTask') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="submitClick(1)" v-if="isRoleSwitching">
|
||||
<!-- 退回-->
|
||||
<div class="operator-text" @click="submitClick(1)" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '1'">
|
||||
<a-icon type="close-circle" />
|
||||
{{ $t('overrule') }}
|
||||
{{ $t('sendBack') }}
|
||||
</div>
|
||||
<!-- 催办-->
|
||||
<div class="operator-text" @click="questionClick" v-if="this.formInlineRoleSwitching.roleSwitchingCode == '0' || this.formInlineRoleSwitching.roleSwitchingCode == '1' || this.formInlineRoleSwitching.roleSwitchingCode == '30'">
|
||||
<a-icon type="sound" />
|
||||
{{ $t('question') }}
|
||||
</div>
|
||||
|
||||
<!-- <div class="operator-text"-->
|
||||
<!-- v-if="roleSwitchingList.length > 1"-->
|
||||
<!-- @click="roleSwitchingClick">-->
|
||||
@@ -1603,8 +1613,9 @@ export default {
|
||||
this.$refs.transferListRef.transferModel()
|
||||
},
|
||||
batSettingClick() {
|
||||
let code = this.formInlineRoleSwitching.roleSwitchingCode
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
|
||||
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)),code)
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
@@ -1652,7 +1663,47 @@ export default {
|
||||
},
|
||||
// 撤回
|
||||
withdrawnClick(){
|
||||
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
let isTrue
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
for (let j = 0; j < selectedRowKeys.length; j++) {
|
||||
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
||||
if (this.dataSource[i].taskAffirmStatus == 'List to confirm' ||
|
||||
this.dataSource[i].inventoryAffirmStatus == 'List to confirm') {
|
||||
isTrue = true
|
||||
} else {
|
||||
isTrue = false
|
||||
this.$message.warning(this.$t('statusthetasistobeconfirmed'))
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isTrue) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('confirmWithdraw'),
|
||||
onOk() {
|
||||
let query = {
|
||||
ids: selectedRowKeys.join(','),
|
||||
projectLibraryId: _this.$route.query.id
|
||||
}
|
||||
postAction('project/projectLawsInventoryEO/expediting', query).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
questionClick() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
@@ -1722,19 +1773,19 @@ export default {
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
for (let j = 0; j < selectedRowKeys.length; j++) {
|
||||
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
||||
if (this.dataSource[i].taskAffirmStatus == 'Accepted' ||
|
||||
(this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Accepted') ||
|
||||
(this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Accepted') ||
|
||||
(this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Rejected') ||
|
||||
(this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Rejected') ||
|
||||
(this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Not started') ||
|
||||
(this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Not started')) {
|
||||
// if (this.dataSource[i].taskAffirmStatus == 'Accepted' ||
|
||||
// (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Accepted') ||
|
||||
// (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Accepted') ||
|
||||
// (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Rejected') ||
|
||||
// (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Rejected') ||
|
||||
// (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Not started') ||
|
||||
// (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Not started')) {
|
||||
isTrue = true
|
||||
} else {
|
||||
isTrue = false
|
||||
this.$message.warning(this.$t('theTaskConfirmationStatusCannot'))
|
||||
return
|
||||
}
|
||||
// } else {
|
||||
// isTrue = false
|
||||
// this.$message.warning(this.$t('theTaskConfirmationStatusCannot'))
|
||||
// return
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2652,7 +2703,7 @@ export default {
|
||||
let _this = this
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$confirm({
|
||||
content: num == 0 ? _this.$t('confirmSubmit') : _this.$t('confirmOverrule'),
|
||||
content: num == 0 ? _this.$t('confirmLaunchTask') : _this.$t('confirmreturn'),
|
||||
onOk() {
|
||||
if (num == 0) {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||
|
||||
@@ -124,6 +124,9 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if(this.$route.query.projectName){
|
||||
this.queryParam.projectName = this.$route.query.projectName
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -112,7 +112,9 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParam: {},
|
||||
queryParam: {
|
||||
projectName:this.$route.query.projectName?this.$route.query.projectName:''
|
||||
},
|
||||
toggleSearchStatus: false,
|
||||
taskTypeList: [
|
||||
{
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
:title="$t('batSetting')"
|
||||
:width="900"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model class="formAdd">
|
||||
<a-form-model class="formAdd" v-model="formInline" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
@@ -14,7 +16,9 @@
|
||||
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<j-multi-select-tag class="box-input"
|
||||
<j-dict-select-tag class="box-input"
|
||||
v-model="formInline.dutyTerritory"
|
||||
@input="handleInput('dutyTerritory')"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
@@ -33,6 +37,8 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<j-multi-select-tag class="box-input"
|
||||
v-model="formInline.deliverable"
|
||||
@input="handleInput('deliverable')"
|
||||
:placeholder="$t('PleaseSelect')+$t('Deliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"/>
|
||||
@@ -50,14 +56,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { postAction } from '../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'batSetting',
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
formInline: {},
|
||||
rules: {},
|
||||
ids: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
edit(data) {
|
||||
@@ -67,10 +81,79 @@ export default {
|
||||
this.formInline = {}
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
if (this.formInline.dutyTerritory) {
|
||||
this.handleOnTwo()
|
||||
} else {
|
||||
this.handleOkOne()
|
||||
}
|
||||
},
|
||||
handleOkOne() {
|
||||
let ids = JSON.parse(JSON.stringify(this.ids))
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
})
|
||||
let query = {
|
||||
ids: ids.join(','),
|
||||
...formInline
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction(this.url.setBatch, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('batSettingList')
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOnTwo() {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('areResponsibilityAreaInformationBatch'),
|
||||
onOk() {
|
||||
let ids = JSON.parse(JSON.stringify(_this.ids))
|
||||
let formInline = JSON.parse(JSON.stringify(_this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
})
|
||||
let query = {
|
||||
ids: ids.join(','),
|
||||
...formInline
|
||||
}
|
||||
_this.confirmLoading = true
|
||||
postAction(_this.url.setBatch, query).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.visible = false
|
||||
_this.confirmLoading = false
|
||||
_this.$emit('batSettingList')
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
_this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.formInline = {}
|
||||
this.visible = false
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+5
-1
@@ -219,7 +219,7 @@
|
||||
<transfer-list ref="transferListRef"></transfer-list>
|
||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||
<edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model>
|
||||
<bat-setting :url="url" ref="batSettingRef"></bat-setting>
|
||||
<bat-setting :url="url" ref="batSettingRef" @batSettingList="batSettingList"></bat-setting>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -265,6 +265,7 @@ export default {
|
||||
copyInfo: '/authDummy/authDummyInventoryInfoEO/copyInfoByIds',//复制
|
||||
deleteBatch: '/authDummy/authDummyInventoryInfoEO/deleteBatch',//批量删除
|
||||
editModel: '/authDummy/authDummyInventoryInfoEO/edit',//编辑
|
||||
setBatch: '/authDummy/authDummyInventoryInfoEO/setBatch',//批量设置
|
||||
},
|
||||
queryParam: {},
|
||||
orderByField: '',
|
||||
@@ -521,6 +522,9 @@ export default {
|
||||
editModelList() {
|
||||
this.getList()
|
||||
},
|
||||
batSettingList() {
|
||||
this.getList()
|
||||
},
|
||||
tableOnChange(pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||
if(sorter.columnKey == 'shi4Yong4Fan4Wei2_dictText'){
|
||||
|
||||
Reference in New Issue
Block a user