认证清单收集-催办
This commit is contained in:
+8
-2
@@ -731,8 +731,14 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
|
||||
@ApiOperation(value="催办", notes="催办")
|
||||
@PostMapping(value = "/urge")
|
||||
public void urge(String ids,String projectId,String title,String inventoryName,String url){
|
||||
paramsCollectManifestEOService.urge(ids,projectId,title,inventoryName,url);
|
||||
public void urge(@RequestBody Map<String,Object> map){
|
||||
String ids = (String)map.get("ids");
|
||||
String projectId = (String)map.get("projectId");
|
||||
String title = (String)map.get("title");
|
||||
String inventoryVersion = (String)map.get("inventoryVersion");
|
||||
String projectVersion = (String)map.get("projectVersion");
|
||||
String paramsManifestId = (String)map.get("paramsManifestId");
|
||||
paramsCollectManifestEOService.urge(ids,projectId,title,inventoryVersion,projectVersion,paramsManifestId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -208,5 +208,5 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
Result<?> queryDutyTerritory(String id);
|
||||
Result<?> queryDutyTerritoryHistory(String id);
|
||||
|
||||
void urge(String ids,String projectId,String title,String inventoryName,String url);
|
||||
void urge(String ids,String projectId,String title,String inventoryVersion,String projectVersion,String paramsManifestId);
|
||||
}
|
||||
|
||||
+29
-10
@@ -8098,10 +8098,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
* @param projectId
|
||||
* @param title 清单标题
|
||||
* @param inventoryVersion 清单版本
|
||||
* @param url
|
||||
*/
|
||||
@Override
|
||||
public void urge(String ids, String projectId,String title, String inventoryVersion, String url) {
|
||||
public void urge(String ids, String projectId,String title, String inventoryVersion, String projectVersion,String paramsManifestId) {
|
||||
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId, null, null);
|
||||
//项目名称中英文
|
||||
String projectNameCn = projectInfo.getProjectName();
|
||||
@@ -8165,28 +8164,48 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(SysUser::getUsername,userNameList);
|
||||
List<SysUser> sysUserList = sysUserService.list();
|
||||
List<String> userIdList = sysUserList.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
List<SysUser> sysUserList = sysUserService.list(queryWrapper);
|
||||
|
||||
try {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String contentInfoFeiCn = "您好,您参与填写的" + inventoryNameCn + ",请及时查看处理,谢谢!";
|
||||
String contentInfoFeiEn = "Hello! Please fill in the " + inventoryNameEn + " in a timely manner. Thank you!";
|
||||
|
||||
String urlParamsStrCn = "title="+title
|
||||
+"&id="+paramsManifestId
|
||||
+"&version="+inventoryVersion
|
||||
+"&projectName="+projectNameCn
|
||||
+"&projectVersion="+projectVersion
|
||||
+"&projectId="+projectId;
|
||||
String urlParamsStrEn = "title="+title
|
||||
+"&id="+paramsManifestId
|
||||
+"&version="+inventoryVersion
|
||||
+"&projectName="+projectNameEn
|
||||
+"&projectVersion="
|
||||
+projectVersion
|
||||
+"&projectId="+projectId;
|
||||
String encodeCn = UriEncoder.encode(urlParamsStrCn);
|
||||
String encodeEn = UriEncoder.encode(urlParamsStrEn);
|
||||
|
||||
String hrefFeishuCn = backUrl + "/ParameterItemCollection?" + encodeCn;
|
||||
String hrefFeishuEn = backUrl + "/ParameterItemCollection?" + encodeEn;
|
||||
|
||||
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
params.put("contentInfoFeiEn",contentInfoFeiEn);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("projectCn",projectNameCn);
|
||||
params.put("projectEn",projectNameEn);
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
// params.put("back_url_cn",hrefFeishuCn);
|
||||
// params.put("back_url_en",hrefFeishuEn);
|
||||
// params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
if(ObjectUtil.isNotEmpty(deadline)){
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
}
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("back_url_phone",backUrlPhone + "/phoneTaskData?activeTab=parametercollection");
|
||||
feishuService.sendMessageHomoParameterCollectionUrge(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_RED.getValue(),params,null,sysUserList);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
+8
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@@ -165,4 +166,11 @@ public interface IFeishuService {
|
||||
*/
|
||||
public void sendMessageOtaManager(String templeteId, Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 飞书消息模板--认证参数收集-催办(主题颜色为红色)
|
||||
* @param templeteId
|
||||
* @param params
|
||||
*/
|
||||
void sendMessageHomoParameterCollectionUrge(String templeteId,Map<String,Object> params,String flag,List<SysUser> sysUserList);
|
||||
|
||||
}
|
||||
|
||||
+47
@@ -1635,6 +1635,53 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 飞书消息模板--认证参数收集-催办(主题颜色为红色)
|
||||
* @param templeteId
|
||||
* @param params
|
||||
*/
|
||||
@Override
|
||||
public void sendMessageHomoParameterCollectionUrge(String templeteId, Map<String, Object> params,String flag,List<SysUser> sysUserList) {
|
||||
if (CollectionUtils.isNotEmpty(sysUserList)) {
|
||||
String contentCn = (String) params.get("contentInfoFeiCn");
|
||||
String contentEn = (String) params.get("contentInfoFeiEn");
|
||||
String back_url_cn = (String) params.get("back_url_cn");
|
||||
String back_url_en = (String) params.get("back_url_en");
|
||||
String back_url_Phone = (String) params.get("back_url_phone");
|
||||
String projectCn = (String) params.get("projectCn");
|
||||
String projectEn = (String) params.get("projectEn");
|
||||
String initiatorCn = (String) params.get("initiatorCn");
|
||||
String initiatorEn = (String) params.get("initiatorEn");
|
||||
String dueDate = (String) params.get("dueDate");
|
||||
try {
|
||||
for (SysUser sysUser : sysUserList) {
|
||||
String thirdId = sysUser.getThirdId();
|
||||
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_cn);
|
||||
templateVariableMap.put("view_url_en",back_url_en);
|
||||
templateVariableMap.put("back_url_Phone",back_url_Phone);
|
||||
templateVariableMap.put("projectCn"," " + projectCn);
|
||||
templateVariableMap.put("projectEn"," " + projectEn);
|
||||
templateVariableMap.put("initiatorCn"," " + initiatorCn);
|
||||
templateVariableMap.put("initiatorEn"," " + initiatorEn);
|
||||
templateVariableMap.put("dueDate"," " + dueDate);
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
batchSendLarkCardMsgByTemplate2(larkMesJson);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 飞书消息模板--OTA认证管理(主题颜色为红色或绿色)
|
||||
|
||||
Reference in New Issue
Block a user