Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
wangzhijiang
2023-04-10 16:14:25 +08:00
11 changed files with 189 additions and 95 deletions
@@ -45,6 +45,7 @@ import com.jero.modules.document.vo.QueryConditionVO;
import com.jero.modules.domain.entity.DomainUserRel; import com.jero.modules.domain.entity.DomainUserRel;
import com.jero.modules.domain.service.DomainUserRelService; import com.jero.modules.domain.service.DomainUserRelService;
import com.jero.modules.domain.service.impl.DomainManageServiceImpl; import com.jero.modules.domain.service.impl.DomainManageServiceImpl;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.home.entity.HomeDocumentDynamicEO; import com.jero.modules.home.entity.HomeDocumentDynamicEO;
@@ -2348,19 +2349,28 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//飞书 //飞书
try { try {
String contentInfoFeiShu = "In the "+ technologyTerritoryName String contentInfoFeiShu = "In the "+ technologyTerritoryName
+ " technical field you subscribed to, "+ + " technical field you subscribed to, the "+
serialNumber +" has been updated."; serialNumber +" has been updated.";
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + serialNumber; String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + serialNumber;
FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); // FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName()); // feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
feishuMsgVo.setUrl(hrefTemp); // feishuMsgVo.setUrl(hrefTemp);
feishuMsgVo.setContentEn(contentInfoFeiShu); // feishuMsgVo.setContentEn(contentInfoFeiShu);
feishuMsgVo.setContent(contentInfoFeiShuCn); // feishuMsgVo.setContent(contentInfoFeiShuCn);
// iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
//飞书消息(模板-20230410)
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",contentInfoFeiShuCn);
params.put("contentInfoFeiEn",contentInfoFeiShu);
params.put("userIdList",userIdList);
params.put("back_url",hrefTemp);
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFeiShu, MessageTypeEnum.PUSH.getName(), hrefTemp); // iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFeiShu, MessageTypeEnum.PUSH.getName(), hrefTemp);
} catch (IOException e) { } catch (Exception e) {
log.error("飞书消息推送失败"); log.error("飞书消息推送失败");
} }
} }
@@ -3569,7 +3579,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
List<String> thirdIdList = new ArrayList<>(); List<String> thirdIdList = new ArrayList<>();
List<String> userList = new ArrayList<>(); List<String> userList = new ArrayList<>();
String technologyTerritoryNameEn = ""; String technologyTerritoryNameEn = "";
if(StringUtils.isNotBlank(technologyTerritory) && !technologyTerritory.equals(technologyTerritoryNew) && domainUserRelList.size() != 0){ if(StringUtils.isNotBlank(technologyTerritory) && technologyTerritory.equals(technologyTerritoryNew) && domainUserRelList.size() != 0){
List<DomainUserRel> collect = domainUserRelList.stream() List<DomainUserRel> collect = domainUserRelList.stream()
.filter(e -> technologyTerritory.contains(e.getDomainId())) .filter(e -> technologyTerritory.contains(e.getDomainId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
@@ -3622,7 +3632,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//订阅管理 //订阅管理
if(thirdIdList.size() != 0){ if(thirdIdList.size() != 0){
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, " + String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
serialNumber+" has been updated."; serialNumber+" has been updated.";
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + serialNumber; String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + serialNumber;
try { try {
@@ -3633,10 +3643,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
feishuMsgVo.setUrl(url); feishuMsgVo.setUrl(url);
feishuMsgVo.setContentEn(contentInfoFei); feishuMsgVo.setContentEn(contentInfoFei);
feishuMsgVo.setContent(contentInfoFeiCn); feishuMsgVo.setContent(contentInfoFeiCn);
//飞书消息(模板-20230410)
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",contentInfoFeiCn);
params.put("contentInfoFeiEn",contentInfoFei);
params.put("userIdList",userList);
params.put("back_url",url);
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo); // iFeishuService.sendCardMsgTerritory(thirdIdList.toArray(new String[]{}), feishuMsgVo);
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url); // iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url);
} catch (IOException e) { } catch (Exception e) {
log.error("文档新增飞书消息推送失败"); log.error("文档新增飞书消息推送失败");
} }
@@ -3731,20 +3748,28 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName()); feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
feishuMsgVo.setUrl(url); feishuMsgVo.setUrl(url);
String replaceAll = contentInfoFei.replaceAll("\"", "<"); // String replaceAll = contentInfoFei.replaceAll("\"", "<");
feishuMsgVo.setContentEn(replaceAll); feishuMsgVo.setContentEn(contentInfoFei);
String replaceAllCn = contentInfoFeiCn.replaceAll("<text class='highlight-class'>", "") String replaceAllCn = contentInfoFeiCn.replaceAll("<text class='highlight-class'>", "")
.replaceAll("</text>","").replaceAll("\"", "<"); .replaceAll("</text>","");
// .replaceAll("\"", "<");
feishuMsgVo.setContent(replaceAllCn); feishuMsgVo.setContent(replaceAllCn);
// //
iFeishuService.sendCardMsgDocument(userIdListUpdateFeishu.toArray(new String[]{}), feishuMsgVo); // iFeishuService.sendCardMsgDocument(userIdListUpdateFeishu.toArray(new String[]{}), feishuMsgVo);
//飞书消息(模板-20230410)
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",replaceAllCn);
params.put("contentInfoFeiEn",contentInfoFei);
params.put("userIdList",userIdListUpdate);
params.put("back_url",url);
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
// String contentInfoFei = "In the "+category + " " + serialNumber +" you subscribed to, "+sysUser.getUsername()+" changed the " + sbStr.toString();; // String contentInfoFei = "In the "+category + " " + serialNumber +" you subscribed to, "+sysUser.getUsername()+" changed the " + sbStr.toString();;
// //跳转文档详情 // //跳转文档详情
// String url = backUrl + "/docManage/library/detail?id=" + id; // String url = backUrl + "/docManage/library/detail?id=" + id;
// iFeishuService.batchSendMessage(userIdListUpdateFeishu.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url); // iFeishuService.batchSendMessage(userIdListUpdateFeishu.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url);
} catch (IOException e) { } catch (Exception e) {
log.error("文档新增飞书消息推送失败"); log.error("文档新增飞书消息推送失败");
} }
} }
@@ -197,7 +197,7 @@ public class DummyInventoryInfoEO implements Serializable {
private java.lang.String remark; private java.lang.String remark;
/**设计符合性确认-交付物类型*/ /**设计符合性确认-交付物类型*/
@Excel(name = "设计-交付物类型", width = 15,dicCode ="deliverable_template") @Excel(name = "交付物类型", width = 15,dicCode ="deliverable_template",groupName = "设计符合性确认")
@ApiModelProperty(value = "设计符合性确认-交付物类型") @ApiModelProperty(value = "设计符合性确认-交付物类型")
// @Dict(dicCode ="deliverable_template") // @Dict(dicCode ="deliverable_template")
private java.lang.String designDeliverableType; private java.lang.String designDeliverableType;
@@ -211,7 +211,7 @@ public class DummyInventoryInfoEO implements Serializable {
private java.lang.String designDeliverableTemplate; private java.lang.String designDeliverableTemplate;
@TableField(exist = false) @TableField(exist = false)
@Excel(name = "设计-交付物模板", width = 15) @Excel(name = "交付物模板", width = 15,groupName = "设计符合性确认")
private java.lang.String designDeliverableTemplateName; private java.lang.String designDeliverableTemplateName;
/**设计符合性确认-发起人*/ /**设计符合性确认-发起人*/
@@ -223,7 +223,7 @@ public class DummyInventoryInfoEO implements Serializable {
private String designInitiator_dictText; private String designInitiator_dictText;
/**设计符合性确认-责任人*/ /**设计符合性确认-责任人*/
@Excel(name = "设计-责任人", width = 15,dicCode ="ze2_ren4_ren2") @Excel(name = "责任人", width = 15,dicCode ="ze2_ren4_ren2",groupName = "设计符合性确认")
@ApiModelProperty(value = "设计符合性确认-责任人") @ApiModelProperty(value = "设计符合性确认-责任人")
//@Dict(dicCode ="ze2_ren4_ren2") //@Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String designDuty; private java.lang.String designDuty;
@@ -231,7 +231,7 @@ public class DummyInventoryInfoEO implements Serializable {
private String designDuty_dictText; private String designDuty_dictText;
//交付物说明 //交付物说明
@Excel(name = "设计符合性确认-交付物说明", width = 20) @Excel(name = "交付物说明", width = 20,groupName = "设计符合性确认")
private String designRemark; private String designRemark;
/**prehomo确认-交付物类型*/ /**prehomo确认-交付物类型*/
@@ -273,7 +273,7 @@ public class DummyInventoryInfoEO implements Serializable {
private String prehomoRemark; private String prehomoRemark;
/**验证符合性确认-交付物类型*/ /**验证符合性确认-交付物类型*/
@Excel(name = "验证-交付物类型", width = 15,dicCode ="deliverable_template") @Excel(name = "交付物类型", width = 15,dicCode ="deliverable_template",groupName = "验证符合性确认")
@ApiModelProperty(value = "验证符合性确认-交付物类型") @ApiModelProperty(value = "验证符合性确认-交付物类型")
// @Dict(dicCode ="deliverable_template") // @Dict(dicCode ="deliverable_template")
private java.lang.String verifyDeliverableType; private java.lang.String verifyDeliverableType;
@@ -286,7 +286,7 @@ public class DummyInventoryInfoEO implements Serializable {
private java.lang.String verifyDeliverableTemplate; private java.lang.String verifyDeliverableTemplate;
@TableField(exist = false) @TableField(exist = false)
@Excel(name = "验证-交付物模板", width = 15) @Excel(name = "交付物模板", width = 15,groupName = "验证符合性确认")
private java.lang.String verifyDeliverableTemplateName; private java.lang.String verifyDeliverableTemplateName;
/**验证符合性确认-发起人*/ /**验证符合性确认-发起人*/
@@ -298,7 +298,7 @@ public class DummyInventoryInfoEO implements Serializable {
private String verifyInitiator_dictText; private String verifyInitiator_dictText;
/**验证符合性确认-责任人*/ /**验证符合性确认-责任人*/
@Excel(name = "验证-责任人", width = 15,dicCode ="ze2_ren4_ren2") @Excel(name = "责任人", width = 15,dicCode ="ze2_ren4_ren2",groupName = "验证符合性确认")
@ApiModelProperty(value = "验证符合性确认-责任人") @ApiModelProperty(value = "验证符合性确认-责任人")
//@Dict(dicCode ="ze2_ren4_ren2") //@Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String verifyDuty; private java.lang.String verifyDuty;
@@ -306,7 +306,7 @@ public class DummyInventoryInfoEO implements Serializable {
private String verifyDuty_dictText; private String verifyDuty_dictText;
//验证备注 //验证备注
@Excel(name = "验证符合性确认-交付物说明", width = 20) @Excel(name = "交付物说明", width = 20,groupName = "验证符合性确认")
private String verifyRemark; private String verifyRemark;
@TableField(exist = false) @TableField(exist = false)
@@ -171,7 +171,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String remark; private String remark;
/**设计符合性确认-交付物类型*/ /**设计符合性确认-交付物类型*/
@Excel(name = "Design Deliverables", width = 30,dicCode ="deliverable_template") @Excel(name = "Deliverables", width = 30,dicCode ="deliverable_template",groupName = "Design compliance check")
@ApiModelProperty(value = "设计符合性确认-交付物类型") @ApiModelProperty(value = "设计符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template") @Dict(dicCode ="deliverable_template")
private String designDeliverableType; private String designDeliverableType;
@@ -182,7 +182,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String designDeliverableTemplate; private String designDeliverableTemplate;
@TableField(exist = false) @TableField(exist = false)
@Excel(name = "Design Deliverable Template", width = 30) @Excel(name = "Deliverable Template", width = 30,groupName = "Design compliance check")
private String designDeliverableTemplateName; private String designDeliverableTemplateName;
@@ -193,17 +193,17 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String designInitiator; private String designInitiator;
/**设计符合性确认-责任人*/ /**设计符合性确认-责任人*/
@Excel(name = "Design Assignee", width = 30) @Excel(name = "Assignee", width = 30,groupName = "Design compliance check")
@ApiModelProperty(value = "设计符合性确认-责任人") @ApiModelProperty(value = "设计符合性确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2") @Dict(dicCode ="ze2_ren4_ren2")
private String designDuty; private String designDuty;
//交付物说明 //交付物说明
@Excel(name = "Design Compliance Check Deliverable Description", width = 50) @Excel(name = "Deliverables description", width = 50,groupName = "Design compliance check")
private String designRemark; private String designRemark;
/**prehomo确认-交付物类型*/ /**prehomo确认-交付物类型*/
@Excel(name = "Prehomo Deliverables", width = 30,dicCode ="deliverable_template") // @Excel(name = "Prehomo Deliverables", width = 30,dicCode ="deliverable_template")
@ApiModelProperty(value = "prehomo确认-交付物类型") @ApiModelProperty(value = "prehomo确认-交付物类型")
@Dict(dicCode ="deliverable_template") @Dict(dicCode ="deliverable_template")
private String prehomoDeliverableType; private String prehomoDeliverableType;
@@ -214,7 +214,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String prehomoDeliverableTemplate; private String prehomoDeliverableTemplate;
@TableField(exist = false) @TableField(exist = false)
@Excel(name = "Prehomo Deliverable Template", width = 30) // @Excel(name = "Prehomo Deliverable Template", width = 30)
private String prehomoDeliverableTemplateName; private String prehomoDeliverableTemplateName;
/**prehomo确认-发起人*/ /**prehomo确认-发起人*/
@@ -224,17 +224,17 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String prehomoInitiator; private String prehomoInitiator;
/**prehomo确认-责任人*/ /**prehomo确认-责任人*/
@Excel(name = "Prehomo Assignee", width = 30) // @Excel(name = "Prehomo Assignee", width = 30)
@ApiModelProperty(value = "prehomo确认-责任人") @ApiModelProperty(value = "prehomo确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2") @Dict(dicCode ="ze2_ren4_ren2")
private String prehomoDuty; private String prehomoDuty;
//prehomo确认-交付物说明 //prehomo确认-交付物说明
@Excel(name = "Prehomo Check Deliverable Description", width = 50) // @Excel(name = "Prehomo Check Deliverable Description", width = 50)
private String prehomoRemark; private String prehomoRemark;
/**验证符合性确认-交付物类型*/ /**验证符合性确认-交付物类型*/
@Excel(name = "Verify Deliverables", width = 30,dicCode ="deliverable_template") @Excel(name = "Deliverables", width = 30,dicCode ="deliverable_template",groupName = "Validation compliance check")
@ApiModelProperty(value = "验证符合性确认-交付物类型") @ApiModelProperty(value = "验证符合性确认-交付物类型")
@Dict(dicCode ="deliverable_template") @Dict(dicCode ="deliverable_template")
private String verifyDeliverableType; private String verifyDeliverableType;
@@ -244,7 +244,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String verifyDeliverableTemplate; private String verifyDeliverableTemplate;
@TableField(exist = false) @TableField(exist = false)
@Excel(name = "Verify Deliverable Template", width = 30) @Excel(name = "Deliverable Template", width = 30,groupName = "Validation compliance check")
private String verifyDeliverableTemplateName; private String verifyDeliverableTemplateName;
/**验证符合性确认-发起人*/ /**验证符合性确认-发起人*/
@@ -254,13 +254,13 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String verifyInitiator; private String verifyInitiator;
/**验证符合性确认-责任人*/ /**验证符合性确认-责任人*/
@Excel(name = "Verify Assignee", width = 30) @Excel(name = "Assignee", width = 30,groupName = "Validation compliance check")
@ApiModelProperty(value = "验证符合性确认-责任人") @ApiModelProperty(value = "验证符合性确认-责任人")
@Dict(dicCode ="ze2_ren4_ren2") @Dict(dicCode ="ze2_ren4_ren2")
private String verifyDuty; private String verifyDuty;
///验证-交付物说明 ///验证-交付物说明
@Excel(name = "Validation Compliance Check Deliverable Description", width = 60) @Excel(name = "Deliverables description", width = 60,groupName = "Validation compliance check")
private String verifyRemark; private String verifyRemark;
@TableField(exist = false) @TableField(exist = false)
@@ -1207,7 +1207,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
"WVTA ID,Certification Type," + "WVTA ID,Certification Type," +
"*Certification Level," +"Applicable Supplement,"+ "*Certification Level," +"Applicable Supplement,"+
"*Responsible Field,Comments," + "*Responsible Field,Comments," +
"Design compliance check,Validation compliance chech"; "Design compliance check,Validation compliance check";
titleTwo = "Type of deliverables,Deliverable template,Person liable,Deliverables description," + titleTwo = "Type of deliverables,Deliverable template,Person liable,Deliverables description," +
"Type of deliverables,Deliverable template,Person liable,Deliverables description"; "Type of deliverables,Deliverable template,Person liable,Deliverables description";
} }
@@ -67,6 +67,18 @@ public enum TemplateInfoEnum2 {
VALIDATION_COMPLIANCE_CONFIRMATION2("验证符合性流程-公用消息-红色","ctp_AAu2lBI6MV0i"), VALIDATION_COMPLIANCE_CONFIRMATION2("验证符合性流程-公用消息-红色","ctp_AAu2lBI6MV0i"),
VALIDATION_COMPLIANCE_CONFIRMATION3("验证符合性流程-公用消息-黄色","ctp_AAupcD3RBbUV"), VALIDATION_COMPLIANCE_CONFIRMATION3("验证符合性流程-公用消息-黄色","ctp_AAupcD3RBbUV"),
/**
* 订阅通知
*/
SUBSCRIPTION_INFORM("通用-订阅消息模板","ctp_AAfvdg0Cy90I"),
/**
* 转发推送
*/
TRANSPOND_PUSH1("转发推送",""),
; ;
String name; String name;
@@ -130,4 +130,11 @@ public interface IFeishuService {
* @throws IOException * @throws IOException
*/ */
Result<?> batchSendLarkCardMsgByTemplate2(JSONObject json) throws IOException; Result<?> batchSendLarkCardMsgByTemplate2(JSONObject json) throws IOException;
/**
* 飞书消息模板--订阅通知
* @param templeteId
* @param params
*/
void sendMessageSubscriptionNotification(String templeteId,Map<String,Object> params);
} }
@@ -34,7 +34,12 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@@ -1431,4 +1436,37 @@ public class FeishuServiceImpl implements IFeishuService {
return Result.OK(); return Result.OK();
} }
@Override
public void sendMessageSubscriptionNotification(String templeteId, Map<String, Object> params) {
List<String> userIdList = (List<String>) params.get("userIdList");
if (CollectionUtils.isNotEmpty(userIdList)) {
List<SysUser> userInfoList = this.sysUserService.querySysUserListByIdList(userIdList);
String contentCn = (String) params.get("contentInfoFeiCn");
String contentEn = (String) params.get("contentInfoFeiEn");
String back_url = (String) params.get("back_url");
try {
for (String userId : userIdList) {
String thirdId = this.sysUserService.getUserThirdIdByUserId(userInfoList,userId);
if(StringUtils.isNotEmpty(thirdId)){
// 根据结束时间进行排序,获取最近的时间,发消息时使用。
JSONObject larkMesJson = new JSONObject();
larkMesJson.put("template_id", templeteId);
larkMesJson.put("userIds",thirdId);
Map<String,Object> templateVariableMap = new HashMap<>();
templateVariableMap.put("contentInfoFeiCn",contentCn);
templateVariableMap.put("contentInfoFeiEn",contentEn);
templateVariableMap.put("view_url_cn",back_url);
templateVariableMap.put("view_url_en",back_url);
larkMesJson.put("templateVariableMap",templateVariableMap);
batchSendLarkCardMsgByTemplate2(larkMesJson);
}
}
} catch (Exception e) {
log.error("飞书消息推送失败");
}
}
}
} }
@@ -743,7 +743,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
excelName = "Personal List"; excelName = "Personal List";
} }
HSSFSheet sheet = workbook.createSheet(excelName); HSSFSheet sheet = workbook.createSheet(excelName);
sheet.setDefaultColumnWidth(16);//列宽 sheet.setDefaultColumnWidth(21);//列宽
HSSFCellStyle cellStyle = workbook.createCellStyle(); HSSFCellStyle cellStyle = workbook.createCellStyle();
cellStyle.setWrapText(true);//自动换行 cellStyle.setWrapText(true);//自动换行
cellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中 cellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
@@ -752,31 +752,31 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
HSSFCellStyle cellStyleTemp = workbook.createCellStyle(); HSSFCellStyle cellStyleTemp = workbook.createCellStyle();
cellStyleTemp.setWrapText(true);//自动换行 cellStyleTemp.setWrapText(true);//自动换行
int startLine = 0; // int startLine = 0;
int endLine = 4; // int endLine = 4;
//合并单元格 // //合并单元格
CellRangeAddress region1 = // CellRangeAddress region1 =
new CellRangeAddress(1, 1, startLine, endLine); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列 // new CellRangeAddress(1, 1, startLine, endLine); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
sheet.addMergedRegion(region1); // sheet.addMergedRegion(region1);
String explainInfo= null; // String explainInfo= null;
if(CutEnum.CN.getValue().equals(cut)){ // if(CutEnum.CN.getValue().equals(cut)){
explainInfo = // explainInfo =
"填写说明\n" // "填写说明\n"
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据;\n" // + "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据;\n"
+ "2.填写人员时,必须使用人员账号进行填写;\n" // + "2.填写人员时,必须使用人员账号进行填写;\n"
+ "3.填写的人员账号必须与系统中账号保持一致;\n" // + "3.填写的人员账号必须与系统中账号保持一致;\n"
+ "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人、认证工程师三个字段信息。"; // + "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人、认证工程师三个字段信息。";
}else{ // }else{
explainInfo = // explainInfo =
"filling explanation\n" // "filling explanation\n"
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n" // + "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
+ "2. When filling in personnel, personnel account must be used to fill in;\n" // + "2. When filling in personnel, personnel account must be used to fill in;\n"
+ "3. The personnel account number filled in must be consistent with the account number in the system;\n" // + "3. The personnel account number filled in must be consistent with the account number in the system;\n"
+ "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person and certified engineer."; // + "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person and certified engineer.";
} // }
HSSFRichTextString explain=new HSSFRichTextString(explainInfo); // HSSFRichTextString explain=new HSSFRichTextString(explainInfo);
//表头 //表头
Row row = sheet.createRow(0);//开始创建标题行 Row row = sheet.createRow(0);//开始创建标题行
@@ -789,20 +789,20 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
short height = (short) (7 * 200); short height = (short) (7 * 200);
rowExplain.setHeight((short) height); rowExplain.setHeight((short) height);
Cell cell = rowExplain.createCell(0); Cell cell = rowExplain.createCell(0);
cell.setCellValue(explain); // cell.setCellValue(explain);
cell.setCellStyle(cellStyleTemp); cell.setCellStyle(cellStyleTemp);
//设置导出数据 //设置导出数据
if(CollectionUtils.isNotEmpty(dataList)) { if(CollectionUtils.isNotEmpty(dataList)) {
for (int j = 2; j < dataList.size()+2; j++) { for (int j = 1; j < dataList.size()+1; j++) {
Row dataRow = sheet.createRow(j); Row dataRow = sheet.createRow(j);
dataRow.createCell(0).setCellValue(dataList.get(j - 2).getDutyTerritory()); dataRow.createCell(0).setCellValue(dataList.get(j - 1).getDutyTerritory());
dataRow.createCell(1).setCellValue(dataList.get(j - 2).getLawEngineerName()); dataRow.createCell(1).setCellValue(dataList.get(j - 1).getLawEngineerName());
dataRow.createCell(2).setCellValue(dataList.get(j - 2).getEngineeringInterfacePersonName()); dataRow.createCell(2).setCellValue(dataList.get(j - 1).getEngineeringInterfacePersonName());
//dataRow.createCell(3).setCellValue(dataList.get(j - 2).getCertificationEngineerName()); //dataRow.createCell(3).setCellValue(dataList.get(j - 2).getCertificationEngineerName());
dataRow.createCell(3).setCellValue(dataList.get(j - 2).getEngineerLawSetName()); dataRow.createCell(3).setCellValue(dataList.get(j - 1).getEngineerLawSetName());
dataRow.createCell(4).setCellValue(dataList.get(j - 2).getEngineerAttSetName()); dataRow.createCell(4).setCellValue(dataList.get(j - 1).getEngineerAttSetName());
dataRow.createCell(5).setCellValue(dataList.get(j - 2).getRemark()); dataRow.createCell(5).setCellValue(dataList.get(j - 1).getRemark());
} }
} }
@@ -882,15 +882,13 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
"填写说明\n" "填写说明\n"
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据;\n" + "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据;\n"
+ "2.填写人员时,必须使用人员账号进行填写;\n" + "2.填写人员时,必须使用人员账号进行填写;\n"
+ "3.填写的人员账号必须与系统中账号保持一致;\n" + "3.填写的人员账号必须与系统中账号保持一致。";
+ "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人两个字段信息。";
} else { } else {
explainInfo = explainInfo =
"filling explanation\n" "filling explanation\n"
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n" + "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
+ "2. When filling in personnel, personnel account must be used to fill in;\n" + "2. When filling in personnel, personnel account must be used to fill in;\n"
+ "3. The personnel account number filled in must be consistent with the account number in the system;\n" + "3. The personnel account number filled in must be consistent with the account number in the system .";
+ "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person .";
} }
HSSFRichTextString explain = new HSSFRichTextString(explainInfo); HSSFRichTextString explain = new HSSFRichTextString(explainInfo);
@@ -902,7 +900,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
} }
Row rowExplain = sheet.createRow(1); Row rowExplain = sheet.createRow(1);
short height = (short) (7 * 200); short height = (short) (6 * 200);
rowExplain.setHeight((short) height); rowExplain.setHeight((short) height);
Cell cell = rowExplain.createCell(0); Cell cell = rowExplain.createCell(0);
cell.setCellValue(explain); cell.setCellValue(explain);
@@ -104,7 +104,7 @@
@click="breakdown(valItem)" @click="breakdown(valItem)"
v-if="valItem.splitFlag == 1" v-if="valItem.splitFlag == 1"
:title="$t('StandardBreakdown')" :title="$t('StandardBreakdown')"
type="profile" /> type="profile"/>
</div> </div>
</div> </div>
</div> </div>
@@ -673,7 +673,7 @@
if (res.success) { if (res.success) {
this.rightTitleList = res.result this.rightTitleList = res.result
this.rightTitleList.push({ this.rightTitleList.push({
name:this.$t('DetailsPhasedImplementation'), name: this.$t('DetailsPhasedImplementation')
}) })
} else { } else {
this.rightTitleList = [] this.rightTitleList = []
@@ -857,7 +857,8 @@
color: #040B29; color: #040B29;
font-weight: bold; font-weight: bold;
} }
.text-field-right-text{
.text-field-right-text {
width: calc(50% - 140px); width: calc(50% - 140px);
} }
} }
@@ -1000,16 +1001,28 @@
margin-right: 10px margin-right: 10px
} }
.TextInformation {
display: flex;
flex-wrap: wrap;
}
.TextInformation-box { .TextInformation-box {
width: 100%; width: calc(50% - 10px);
height: auto; height: auto;
display: inline-block;
overflow: hidden; overflow: hidden;
margin-right: 20px;
}
.TextInformation-box:nth-child(even) {
margin-right: 0;
} }
.TextInformation-box-title { .TextInformation-box-title {
background: #F5F6F7; background: #F5F6F7;
border-radius: 4px; border-radius: 4px;
width: 100%; width: 100%;
display: inline-block;
height: 56px; height: 56px;
padding: 0 16px; padding: 0 16px;
line-height: 56px; line-height: 56px;
@@ -366,7 +366,7 @@
} }
.box-two { .box-two {
margin-bottom: 438px; /*margin-bottom: 438px;*/
} }
.header-text { .header-text {
@@ -380,16 +380,17 @@
} }
.drawer-review { .drawer-review {
position: absolute; /*position: absolute;*/
bottom: 40px; /*bottom: 40px;*/
z-index: 1001; /*z-index: 1001;*/
height: 404px; /*height: 404px;*/
width: 100%; /*width: 100%;*/
padding: 24px; /*padding: 24px;*/
border-top: 1px solid #e8e8e8; /*border-top: 1px solid #e8e8e8;*/
left: 0; /*left: 0;*/
background: #fff; /*background: #fff;*/
border-radius: 0 0 2px 2px; /*border-radius: 0 0 2px 2px;*/
margin-bottom: 40px;
} }
.formAdd { .formAdd {
@@ -30,10 +30,6 @@
<a-radio value="Adopt" :disabled="isAdopt" v-if="query.TaskKey == 'fggcssh'"> <a-radio value="Adopt" :disabled="isAdopt" v-if="query.TaskKey == 'fggcssh'">
{{$t('adopt')}} {{$t('adopt')}}
</a-radio> </a-radio>
<a-radio value="Returned" v-if="query.TaskKey == 'dezrrqr' || query.TaskKey == 'dezrrtjjfw' ||
query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'fggcssh'">
{{$t('sendBack')}}
</a-radio>
<a-radio value="Compliance" v-if="query.TaskKey == 'dezrrtjjfw' || query.TaskKey == 'zrrtjjfw'"> <a-radio value="Compliance" v-if="query.TaskKey == 'dezrrtjjfw' || query.TaskKey == 'zrrtjjfw'">
{{$t('accord')}} {{$t('accord')}}
</a-radio> </a-radio>
@@ -46,6 +42,10 @@
<a-radio value="NA" v-if="query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'dezrrtjjfw'"> <a-radio value="NA" v-if="query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'dezrrtjjfw'">
{{$t('notInvolved')}} {{$t('notInvolved')}}
</a-radio> </a-radio>
<a-radio value="Returned" v-if="query.TaskKey == 'dezrrqr' || query.TaskKey == 'dezrrtjjfw' ||
query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'fggcssh'">
{{$t('sendBack')}}
</a-radio>
<a-radio value="Transfer" v-if="query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'zrrqr'"> <a-radio value="Transfer" v-if="query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'zrrqr'">
{{$t('turnToDo')}} {{$t('turnToDo')}}
</a-radio> </a-radio>