合并分支 'dev_third_stage' 到 'master'

Dev third stage

查看合并请求 laws-nio/laws-weilai!162
This commit is contained in:
肖文钰
2022-09-03 17:04:34 +08:00
73 changed files with 2637 additions and 730 deletions
@@ -973,4 +973,29 @@ ALTER TABLE `laws_weilai`.`laws_technology_evaluation_item_result`
ADD COLUMN `feedback_time` datetime NULL COMMENT '反馈时间' AFTER `laws_technology_evaluation_id`;
-- 表字段 英文修改 2022-08-31
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Sort Number' WHERE `id` = '1529373706885799937';
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Sort Number' WHERE `id` = '1529373706885799937';
-- 增加角色,countryCard管理员。 2022-08-31
INSERT INTO `laws_weilai`.`sys_role` (`id`, `role_name`, `role_code`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `parent_code`, `role_order`) VALUES ('1564916346120916993', 'countryCard管理员', 'countryCardManage', 'countryCard最大权限', 'admin', '2022-08-31 18:01:46', NULL, NULL, NULL, NULL);
-- 清单确认,拒绝原因表 2022-09-01
CREATE TABLE `laws_weilai`.`project_laws_inventory_reject_cause` (
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL ,
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人' ,
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期' ,
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人' ,
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期' ,
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门' ,
`reject_user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '拒绝人id' ,
`reject_time` datetime NULL DEFAULT NULL COMMENT '拒绝时间' ,
`reject_cause` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '拒绝原因' ,
`project_laws_inventory_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '法规清单id' ,
`reject_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '拒绝类型' ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
COMMENT='清单确认-拒绝原因表'
ROW_FORMAT=DYNAMIC
;
@@ -25,6 +25,8 @@ public enum MessageTypeEnum {
LIST_CONFIRMATION("List Confirmation", "17"), // 清单确认
TASK_CONFIRMATION("Task Confirmation", "18"), // 任务确认
COMPLIANCE_CONFIRMATION("Compliance Confirmation", "19"), // 符合性确认
COLLECTION_OF_LEGISLATIVE_COMMENTS("Collection of Legislative Comments", "20"), // 法规意见收集
REGULATORY_AND_TECHNICAL_ASSESSMENT("Regulatory and technical assessment", "21"), // 法规技术评估
;
String name;
@@ -105,9 +105,9 @@ public class DocTranslationEO implements Serializable {
private java.lang.String translationResult;
/**转换时间*/
@Excel(name = "转换时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "转换时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "转换时间")
private java.util.Date translationTime;
@@ -40,7 +40,7 @@ public class ExtRepoData implements Serializable {
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
@@ -50,7 +50,7 @@ public class ExtRepoData implements Serializable {
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
@@ -0,0 +1,70 @@
package com.jero.modules.lawsOpinionGather.job;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
import com.jero.modules.project.enums.MsgTypeEnum;
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
/**
* 法规意见收集表 - 定时器
* 作用数据还有一天过期时给代办人发消息
*/
@Slf4j
public class LawsOpinionGatherRemindJob implements Job {
@Autowired
private ILawsOpinionGatherEOService lawsOpinionGatherEOService;
@Autowired
private WorkFlowFeignClient workFlowFeignClient;
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
//查询出收集结果为未完成的数据
QueryWrapper<LawsOpinionGatherEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult, GatherResultEnum.UNDERWAY.getValue());
List<LawsOpinionGatherEO> lawsOpinionGatherEOList = this.lawsOpinionGatherEOService.list(queryWrapper);
if(CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date currentDate = new Date();
//获取后一天的时间
Calendar calendar=new GregorianCalendar();
calendar.setTime(new Date());
calendar.add(Calendar.DATE,1);
Date nextDay = calendar.getTime();
String nextDayStr = sdf.format(nextDay);
lawsOpinionGatherEOList.forEach(lawsOpinionGatherEO -> {
if(StringUtils.equals(nextDayStr,sdf.format(lawsOpinionGatherEO.getEndTime()))){
List<String> userIdList = this.workFlowFeignClient.getLawsOpinionGatherFlowAssigneeList(lawsOpinionGatherEO.getId());
if(CollectionUtils.isNotEmpty(userIdList)){
JSONObject sendJsonObject = new JSONObject();
sendJsonObject.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue());
sendJsonObject.put("lawsOpinionGatherId",lawsOpinionGatherEO.getId());
sendJsonObject.put("serialNumber",lawsOpinionGatherEO.getSerialNumber());
sendJsonObject.put("userIdList",userIdList);
this.lawsOpinionGatherEOService.workFlowSendMsg(sendJsonObject);
}
}
});
}
}
}
@@ -73,4 +73,6 @@ public interface ILawsOpinionGatherEOService extends IService<LawsOpinionGatherE
* @param lawsOpinionGatherEOList
*/
void disposeData(List<LawsOpinionGatherEO> lawsOpinionGatherEOList,String cut);
void workFlowSendMsg(JSONObject jsonObject);
}
@@ -1,25 +1,39 @@
package com.jero.modules.lawsOpinionGather.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionGatherEOMapper;
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectNameInfoEO;
import com.jero.modules.project.entity.ProjectYearNameInfoEO;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.MsgTypeEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.RequestSourceEnum;
import com.jero.modules.project.util.SendMessageUtils;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
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.util.List;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -40,6 +54,11 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
private SysCategoryServiceImpl sysCategoryService;
@Autowired
private IOSSFileService iOSSFileService;
@Autowired
private ISysUserService sysUserService;
@Value(value = "${jero.backUrl}")
private String backUrl;
/**
* 保存
@@ -140,6 +159,11 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
lawsOpinionGatherEO.setGatherResult(jsonObject.getString("gatherResult"));
this.baseMapper.updateById(lawsOpinionGatherEO);
}
// 发送消息
if(StringUtils.equals(operatorType, OperatorTypeEnum.SEND_MSG.getValue())){
workFlowSendMsg(jsonObject);
}
return new Result<>().success("调用成功!");
}
@@ -192,4 +216,63 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
}
return result;
}
/**
* 工作流发送消息
* @param jsonObject
*/
@Override
public void workFlowSendMsg(JSONObject jsonObject){
String msgType = jsonObject.getString("msgType"); //发送消息类型
if(StringUtils.isEmpty(msgType)){
throw new JeroBootException("发送消息类型不能为空,请检查!");
}
String lawsOpinionGatherId = jsonObject.getString("lawsOpinionGatherId");
String serialNumber = jsonObject.getString("serialNumber"); //文档库编号
List<String> userIdList = new ArrayList<>();
String msgContentEN = "";
String msgTitle = "";
String initiator = "";
if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_OPOMOPM_GATHER_START_MSG.getValue())){
userIdList.addAll(Arrays.asList(jsonObject.getString("evaluatorIds").split(",")));
String endTime = jsonObject.getString("endTime"); //截止日期
msgContentEN = "You recieved the Collection of Legislative Comments of "+serialNumber+" . The due date is "+endTime+". Please check and address it in a timely manner.";
msgTitle = "You have a Collection of Legislative Comments task to complete";
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
SysUser currentUser = sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
initiator = currentUser.getUsername();
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_SUBMIT_MSG.getValue())){
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
SysUser currentUser = sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
userIdList.add(jsonObject.getString("initiatorUserId"));
msgContentEN = currentUser.getUsername() + " has submitted the collection process of Collection of Legislative Comments of "+serialNumber+", please check it in time.";
msgTitle = "You have a Collection of Legislative Comments task completed";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue())){
userIdList = (List<String>) jsonObject.get("userIdList");
msgContentEN = "The the Collection of Legislative Comments of "+serialNumber+" will expire tomorrow . Please check and address it in time.";
msgTitle = "You have a Collection of Legislative Comments task to complete";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
}
//飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
//系统内部跳转链接
String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsOpinionGatherId,sendMessageMap,null,MessageTypeEnum.COLLECTION_OF_LEGISLATIVE_COMMENTS,initiator);
}
}
@@ -0,0 +1,87 @@
package com.jero.modules.lawsTechnologyEvaluation.job;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationFlowDetailEOService;
import com.jero.modules.project.enums.MsgTypeEnum;
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.stream.Collectors;
/**
* 法规技术评估 - 定时器
* 作用数据还有一天过期时给代办人发消息
*/
@Slf4j
public class LawsTechnologyEvaluationRemindJob implements Job {
@Autowired
private WorkFlowFeignClient workFlowFeignClient;
@Autowired
private ILawsTechnologyEvaluationEOService lawsTechnologyEvaluationEOService;
@Autowired
private ILawsTechnologyEvaluationFlowDetailEOService lawsTechnologyEvaluationFlowDetail;
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus, GatherResultEnum.UNDERWAY.getValue());
List<LawsTechnologyEvaluationEO> LawsTechnologyEvaluationEOList = this.lawsTechnologyEvaluationEOService.list(queryWrapper);
if(CollectionUtils.isNotEmpty(LawsTechnologyEvaluationEOList)){
List<String> LawsTechnologyEvaluationIdList = LawsTechnologyEvaluationEOList.stream().map(LawsTechnologyEvaluationEO::getId).distinct().collect(Collectors.toList());
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> detailQueryWrapper = new QueryWrapper<>();
detailQueryWrapper.lambda().in(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,LawsTechnologyEvaluationIdList);
List<LawsTechnologyEvaluationFlowDetailEO> flowDetailList = this.lawsTechnologyEvaluationFlowDetail.list(detailQueryWrapper);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//获取后一天的时间
Calendar calendar=new GregorianCalendar();
calendar.setTime(new Date());
calendar.add(Calendar.DATE,1);
Date nextDay = calendar.getTime();
String nextDayStr = sdf.format(nextDay);
LawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> {
if(StringUtils.equals(nextDayStr,sdf.format(lawsTechnologyEvaluationEO.getEndTime()))){
String actiProcInstIds = flowDetailList.stream().filter(flowDetail -> {
boolean flag = false;
if (StringUtils.equals(lawsTechnologyEvaluationEO.getId(), flowDetail.getLawsTechnologyEvaluationId())) {
flag = true;
}
return flag;
}).map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(","));
if(StringUtils.isNotEmpty(actiProcInstIds)){
List<String> userIdList = this.workFlowFeignClient.getTaskAssigneeListByPrcIds(actiProcInstIds);
if(CollectionUtils.isNotEmpty(userIdList)){
JSONObject sendJsonObject = new JSONObject();
sendJsonObject.put("msgType", MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG.getValue());
sendJsonObject.put("lawsTechnologyEvaluationId",lawsTechnologyEvaluationEO.getId());
sendJsonObject.put("serialNumber",lawsTechnologyEvaluationEO.getSerialNumber());
sendJsonObject.put("userIdList",userIdList);
this.lawsTechnologyEvaluationEOService.workFlowSendMsg(sendJsonObject);
}
}
}
});
}
}
}
@@ -88,4 +88,6 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
Result<?> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception;
List<Map<String, Object>> queryPageDummyById(Map<String, Object> parameter);
void workFlowSendMsg(JSONObject jsonObject);
}
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.constant.enums.ModuleEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
@@ -17,12 +18,17 @@ import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationEOMapper;
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.enums.MsgTypeEnum;
import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.RequestSourceEnum;
import com.jero.modules.project.util.SendMessageUtils;
import com.jero.modules.split.entity.SarFileSplitInfoEO;
import com.jero.modules.split.service.ISarFileSplitInfoService;
import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
@@ -72,6 +78,10 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
private ISarFileSplitInfoService sarFileSplitInfoService;
@Value(value = "${jero.path.upload}")
private String uploadpath;
@Autowired
private ISysUserService sysUserService;
@Value(value = "${jero.backUrl}")
private String backUrl;
/**
* 保存
@@ -163,6 +173,8 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
}else if(StringUtils.equals(operatorType,OperatorTypeEnum.UPDATE_STATUS.getValue())){
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.get("lawsTechnologyEvaluationEO")),LawsTechnologyEvaluationEO.class);
this.updateById(lawsTechnologyEvaluationEO);
}else if(StringUtils.equals(operatorType,OperatorTypeEnum.SEND_MSG.getValue())){
this.workFlowSendMsg(jsonObject);
}
return new Result<>().success("调用成功!");
@@ -524,6 +536,78 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
return result;
}
@Override
public void workFlowSendMsg(JSONObject jsonObject) {
String msgType = jsonObject.getString("msgType"); //发送消息类型
if(StringUtils.isEmpty(msgType)){
throw new JeroBootException("发送消息类型不能为空,请检查!");
}
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
String serialNumber = jsonObject.getString("serialNumber"); //文档库编号
List<String> userIdList = new ArrayList<>();
String msgContentEN = "";
String msgTitle = "";
String initiator = "";
if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_START_MSG.getValue())){
userIdList.add(jsonObject.getString("evaluationId"));
String endTime = jsonObject.getString("endTime"); //截止日期
//您收到GB 7258 的法规技术评估流程任务请及时查看处理
msgContentEN = "You recieved the Regulatory and technical assessment of "+serialNumber+" . The due date is "+endTime+". Please check and address it in a timely manner.";
msgTitle = "You have a Regulatory and technical assessment task to complete";
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
SysUser currentUser = sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
initiator = currentUser.getUsername();
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG.getValue())){
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
userIdList.add(jsonObject.getString("initiatorUserId"));
//XXX人员账号已提交GB 7258 的法规意见收集流程请及时查看审核
msgContentEN = currentUser.getUsername() + " has submitted the collection process of Regulatory and technical assessment of "+serialNumber+", Please check and address it in time.";
msgTitle = "You have a Regulatory and technical assessment task to complete";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG.getValue())){
userIdList.add(jsonObject.getString("evaluationId"));
//您提交的GB 7258 的法规技术评估流程已通过
msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed.";
msgTitle = "You have a Regulatory and technical assessment task completed";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG.getValue())){
userIdList.add(jsonObject.getString("evaluationId"));
//您提交的GB 7258 的法规技术评估流程已被退回请及时查看处理
msgContentEN = "The regulatory and technical assessment process of "+serialNumber+" you submitted has been returned, Please check and address it in time.";
msgTitle = "You have a Regulatory and technical assessment task to complete";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG.getValue())){
userIdList = (List<String>) jsonObject.get("userIdList");
//您GB 7258的法规技术评估流程将于明天结束请及时查看处理
msgContentEN = "The the Regulatory and technical assessment of "+serialNumber+" will expire tomorrow. Please check and address it in time.";
msgTitle = "You have a Regulatory and technical assessment task to complete";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
}
//飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
//系统内部跳转链接
String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsTechnologyEvaluationId,sendMessageMap,null, MessageTypeEnum.REGULATORY_AND_TECHNICAL_ASSESSMENT,initiator);
}
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
StringBuilder sb = new StringBuilder();
for (String technologyTerritory : technologyTerritoryList) {
@@ -56,6 +56,10 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
@RequestParam(name="cut", defaultValue="cn") String cut,
HttpServletRequest req) {
//验证用户是否拥有countryCard角色
if(this.countryCardManageReleaseEOService.isCountryCardManage()){
countryCardManageReleaseEO.setCreateBy(null);
}
QueryWrapper<CountryCardManageReleaseEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardManageReleaseEO, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<CountryCardManageReleaseEO> page = new Page<CountryCardManageReleaseEO>(pageNo, pageSize);
@@ -11,6 +11,7 @@ import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCollectEOService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -192,6 +193,7 @@ public class ProblemKnowledgeBaseCollectEOController extends JeroController<Prob
QueryWrapper<ProblemKnowledgeBaseCollectEO> collectEOQueryWrapper = new QueryWrapper<>();
collectEOQueryWrapper.lambda().eq(ProblemKnowledgeBaseCollectEO::getCollectUserId,currentUser.getId());
collectEOQueryWrapper.lambda().eq(ProblemKnowledgeBaseCollectEO::getCollectStatus, CollectStatusEnum.COLLECT.getValue());
List<ProblemKnowledgeBaseCollectEO> collectEOList = this.problemKnowledgeBaseCollectEOService.list(collectEOQueryWrapper);
if(CollectionUtils.isNotEmpty(collectEOList)){
@@ -85,4 +85,6 @@ public interface ICountryCardManageReleaseEOService extends IService<CountryCard
Result<List<DictModel>> getApplyMarketList(String queryFlag,String cut);
List<CountryCardManageReleaseEO> queryCountryCardManageReleaseByApplyMarkets(JSONObject params);
boolean isCountryCardManage();
}
@@ -16,8 +16,11 @@ import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseEOMa
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
import com.jero.modules.problemKnowledgeBase.service.ICountryNationalFlagEOService;
import com.jero.modules.project.enums.CollectManifestRoleIdEnum;
import com.jero.modules.system.entity.SysUserRole;
import com.jero.modules.system.enums.DicCodeEnum;
import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.service.ISysUserRoleService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
@@ -52,6 +55,8 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
private ISysDictService sysDictService;
@Autowired
private ICountryNationalFlagEOService countryNationalFlagEOService;
@Autowired
private ISysUserRoleService sysUserRoleService;
/**
* 保存
@@ -263,18 +268,34 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
result = null;
}else {
for (DictModel dictModel : dictModelList) {
boolean flag = false;
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())
&& StringUtils.equals(countryCardManageReleaseEO.getCreateBy(),currentUser.getUsername())){
flag = true;
break;
if(this.isCountryCardManage()){
for (DictModel dictModel : dictModelList) {
boolean flag = false;
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())){
flag = true;
break;
}
}
if(flag){
result.add(dictModel);
}
}
}else {
for (DictModel dictModel : dictModelList) {
boolean flag = false;
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())
&& StringUtils.equals(countryCardManageReleaseEO.getCreateBy(),currentUser.getUsername())){
flag = true;
break;
}
}
if(flag){
result.add(dictModel);
if(flag){
result.add(dictModel);
}
}
}
}
@@ -300,4 +321,31 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
this.disposeData(result,cut);
return result;
}
/**
* 验证用户是否是countryCard管理员如果是的话展示所有数据如果不是则展示用户自己创建的数据
*/
@Override
public boolean isCountryCardManage(){
boolean result = false;
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<SysUserRole> userRoleList = this.sysUserRoleService.list(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, currentUser.getId())); // 查询用户所有角色
if(CollectionUtils.isNotEmpty(userRoleList)){
CollectManifestRoleIdEnum countruCardManage = CollectManifestRoleIdEnum.COUNTRU_CARD_MANAGE;
CollectManifestRoleIdEnum managerId = CollectManifestRoleIdEnum.MANAGER_ID;
List<SysUserRole> userRoles = userRoleList.stream().filter(userRole -> {
boolean flag = false;
if(StringUtils.equals(userRole.getRoleId(),countruCardManage.getId()) || StringUtils.equals(userRole.getRoleId(),managerId.getId())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(userRoles)){
result = true;
}
}
return result;
}
}
@@ -129,7 +129,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
* @param problemKnowledgeBaseEO
*/
public void addOrUpdateElasticsearch(ProblemKnowledgeBaseEO problemKnowledgeBaseEO){
/*String problemKnowledgeBaseId = problemKnowledgeBaseEO.getId();
String problemKnowledgeBaseId = problemKnowledgeBaseEO.getId();
List<Map<String, Object>> mapListTempCn = new ArrayList<>();
List<Map<String, Object>> mapListTempEn = new ArrayList<>();
@@ -223,7 +223,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
} catch (Exception e) {
e.printStackTrace();
log.error("问题知识库添加es失败");
}*/
}
}
/**
@@ -231,7 +231,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
* @param problemKnowledgeBaseId
*/
public void deleteElasticsearchData(String problemKnowledgeBaseId){
/*try {
try {
//根据id删除全部索引中数据
this.jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), problemKnowledgeBaseId);
this.jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), problemKnowledgeBaseId);
@@ -246,7 +246,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}catch (Exception ex){
ex.printStackTrace();
log.error("问题知识库根据id删除es数据失败,问题知识库id为:" + problemKnowledgeBaseId);
}*/
}
}
public void esFullText(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,StringBuilder sbCn,StringBuilder sbEn,String cut,String fileText,List<DictModel> targetMarketList){
@@ -0,0 +1,170 @@
package com.jero.modules.project.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO;
import com.jero.modules.project.service.IProjectLawsInventoryRejectCauseEOService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
/**
* @Description: 清单确认-拒绝原因表
* @Author: jero-boot
* @Date: 2022-09-01
* @Version: V1.0
*/
@Api(tags="清单确认-拒绝原因表")
@RestController
@RequestMapping("/project/projectLawsInventoryRejectCauseEO")
@Slf4j
public class ProjectLawsInventoryRejectCauseEOController extends JeroController<ProjectLawsInventoryRejectCauseEO, IProjectLawsInventoryRejectCauseEOService> {
@Autowired
private IProjectLawsInventoryRejectCauseEOService projectLawsInventoryRejectCauseEOService;
/**
* 分页列表查询
*
* @param projectLawsInventoryRejectCauseEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "清单确认-拒绝原因表-分页列表查询")
@ApiOperation(value="清单确认-拒绝原因表-分页列表查询", notes="清单确认-拒绝原因表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ProjectLawsInventoryRejectCauseEO> queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryRejectCauseEO, req.getParameterMap());
Page<ProjectLawsInventoryRejectCauseEO> page = new Page<ProjectLawsInventoryRejectCauseEO>(pageNo, pageSize);
IPage<ProjectLawsInventoryRejectCauseEO> pageList = projectLawsInventoryRejectCauseEOService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "清单确认-拒绝原因表-列表查询")
@ApiOperation(value="清单确认-拒绝原因表-列表查询", notes="清单确认-拒绝原因表-列表查询")
@GetMapping(value = "/list")
public Result<List<ProjectLawsInventoryRejectCauseEO>> queryList(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO,HttpServletRequest req) {
List<ProjectLawsInventoryRejectCauseEO> list = projectLawsInventoryRejectCauseEOService.queryList(projectLawsInventoryRejectCauseEO,req);
return Result.OK(list);
}
/**
* 添加
*
* @param projectLawsInventoryRejectCauseEO
* @return
*/
@AutoLog(value = "清单确认-拒绝原因表-添加")
@ApiOperation(value="清单确认-拒绝原因表-添加", notes="清单确认-拒绝原因表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
projectLawsInventoryRejectCauseEOService.add(projectLawsInventoryRejectCauseEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param projectLawsInventoryRejectCauseEO
* @return
*/
@AutoLog(value = "清单确认-拒绝原因表-编辑")
@ApiOperation(value="清单确认-拒绝原因表-编辑", notes="清单确认-拒绝原因表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
projectLawsInventoryRejectCauseEOService.editById(projectLawsInventoryRejectCauseEO);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "清单确认-拒绝原因表-通过id删除")
@ApiOperation(value="清单确认-拒绝原因表-通过id删除", notes="清单确认-拒绝原因表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
projectLawsInventoryRejectCauseEOService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "清单确认-拒绝原因表-批量删除")
@ApiOperation(value="清单确认-拒绝原因表-批量删除", notes="清单确认-拒绝原因表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.projectLawsInventoryRejectCauseEOService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "清单确认-拒绝原因表-通过id查询")
@ApiOperation(value="清单确认-拒绝原因表-通过id查询", notes="清单确认-拒绝原因表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO = projectLawsInventoryRejectCauseEOService.queryById(id);
if(projectLawsInventoryRejectCauseEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(projectLawsInventoryRejectCauseEO);
}
/**
* 导出excel
*
* @param request
* @param projectLawsInventoryRejectCauseEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
return super.exportXls(request, projectLawsInventoryRejectCauseEO, ProjectLawsInventoryRejectCauseEO.class, "清单确认-拒绝原因表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ProjectLawsInventoryRejectCauseEO.class);
}
}
@@ -0,0 +1,91 @@
package com.jero.modules.project.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
/**
* @Description: 清单确认-拒绝原因表
* @Author: jero-boot
* @Date: 2022-09-01
* @Version: V1.0
*/
@Data
@TableName("project_laws_inventory_reject_cause")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="project_laws_inventory_reject_cause对象", description="清单确认-拒绝原因表")
public class ProjectLawsInventoryRejectCauseEO implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**拒绝人id*/
@Excel(name = "拒绝人id", width = 15)
@ApiModelProperty(value = "拒绝人id")
private java.lang.String rejectUserId;
/**拒绝时间*/
@Excel(name = "拒绝时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "拒绝时间")
private java.util.Date rejectTime;
/**拒绝原因*/
@Excel(name = "拒绝原因", width = 15)
@ApiModelProperty(value = "拒绝原因")
private java.lang.String rejectCause;
/**法规清单id*/
@Excel(name = "法规清单id", width = 15)
@ApiModelProperty(value = "法规清单id")
private java.lang.String projectLawsInventoryId;
/**拒绝类型*/
@Excel(name = "拒绝类型", width = 15)
@ApiModelProperty(value = "拒绝类型")
private java.lang.String rejectType;
}
@@ -14,7 +14,9 @@ import java.util.List;
public enum CollectManifestRoleIdEnum {
// STUDIO_ID("R&H Studio","R&H Studio","studio","1534019911296118786",1),
ADMIN_ID("R&H Manager","R&H Manager","manager","1534020391015444481",2),
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3);
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3),
COUNTRU_CARD_MANAGE("countryCard管理员","countryCardManage","countryCardManage","1564916346120916993",4),
;
String name;
String enName;
@@ -30,6 +30,16 @@ public enum MsgTypeEnum {
DESIGN_INITIATOR_ACCEPTED_MSG("设计符合性发起人通过发送消息","designInitiatorAcceptedMsg"),
PREHOMO_INITIATOR_ACCEPTED_MSG("prehomo发起人通过发送消息","prehomoInitiatorAcceptedMsg"),
VERIFY_INITIATOR_ACCEPTED_MSG("验证符合性发起人通过发送消息","verifyInitiatorAcceptedMsg"),
LAWS_OPOMOPM_GATHER_START_MSG("法规意见收集发起消息","lawsOpomopmGatherStartMsg"),
LAWS_OPOMOPM_GATHER_ENALUATOR_SUBMIT_MSG("法规意见收集评估人提交任务消息","lawsOpomopmGatherEnaluatorSubmitMsg"),
LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG("法规意见收集到期前一天消息","lawsOpomopmGatherExpireRemindMsg"),
LAWS_TECHNOLOGY_EVALUATION_START_MSG("法规技术评估发起消息","lawsTechnologyEvaluationStartMsg"),
LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG("法规技术评估,评估人提交任务消息","lawsTechnologyEvaluationEnaluatorSubmitMsg"),
LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG("法规技术评估,发起人审核通过消息","lawsTechnologyEvaluationAuditAcceptedMsg"),
LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG("法规技术评估,发起人审核拒绝消息","lawsTechnologyEvaluationAuditRejectedMsg"),
LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG("法规技术评估到期前一天消息","lawsTechnologyEvaluationExpireRemindMsg"),
;
String name;
@@ -0,0 +1,17 @@
package com.jero.modules.project.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 清单确认-拒绝原因表
* @Author: jero-boot
* @Date: 2022-09-01
* @Version: V1.0
*/
public interface ProjectLawsInventoryRejectCauseEOMapper extends BaseMapper<ProjectLawsInventoryRejectCauseEO> {
}
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jero.modules.project.mapper.ProjectLawsInventoryRejectCauseEOMapper">
<resultMap id="ProjectLawsInventoryRejectCauseEOResultMap" type="com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO">
<id column="id" property="id" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="sys_org_code" property="sysOrgCode" />
<result column="reject_user_id" property="rejectUserId" />
<result column="reject_time" property="rejectTime" />
<result column="reject_cause" property="rejectCause" />
<result column="project_laws_inventory_id" property="projectLawsInventoryId" />
<result column="reject_type" property="rejectType" />
</resultMap>
</mapper>
@@ -0,0 +1,63 @@
package com.jero.modules.project.service;
import com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @Description: 清单确认-拒绝原因表
* @Author: jero-boot
* @Date: 2022-09-01
* @Version: V1.0
*/
public interface IProjectLawsInventoryRejectCauseEOService extends IService<ProjectLawsInventoryRejectCauseEO> {
/**
* 保存
*
* @param projectLawsInventoryRejectCauseEO
* @return
*/
void add(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO);
/**
* 更新
*
* @param projectLawsInventoryRejectCauseEO
* @return
*/
void editById(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
ProjectLawsInventoryRejectCauseEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<ProjectLawsInventoryRejectCauseEO> queryList(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO, HttpServletRequest req);
}
@@ -0,0 +1,95 @@
package com.jero.modules.project.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO;
import com.jero.modules.project.mapper.ProjectLawsInventoryRejectCauseEOMapper;
import com.jero.modules.project.service.IProjectLawsInventoryRejectCauseEOService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest;
/**
* @Description: 清单确认-拒绝原因表
* @Author: jero-boot
* @Date: 2022-09-01
* @Version: V1.0
*/
@Service
public class ProjectLawsInventoryRejectCauseEOServiceImpl extends ServiceImpl<ProjectLawsInventoryRejectCauseEOMapper, ProjectLawsInventoryRejectCauseEO> implements IProjectLawsInventoryRejectCauseEOService {
/**
* 保存
*
* @param projectLawsInventoryRejectCauseEO
* @return
*/
@Override
public void add(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
Date now = new Date();
projectLawsInventoryRejectCauseEO.setCreateTime(now);
projectLawsInventoryRejectCauseEO.setUpdateTime(now);
save(projectLawsInventoryRejectCauseEO);
}
/**
* 更新
*
* @param projectLawsInventoryRejectCauseEO
* @return
*/
@Override
public void editById(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
Date now = new Date();
projectLawsInventoryRejectCauseEO.setUpdateTime(now);
saveOrUpdate(projectLawsInventoryRejectCauseEO);
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public ProjectLawsInventoryRejectCauseEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<ProjectLawsInventoryRejectCauseEO> queryList(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO, HttpServletRequest req) {
QueryWrapper<ProjectLawsInventoryRejectCauseEO> queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryRejectCauseEO, req.getParameterMap());
List<ProjectLawsInventoryRejectCauseEO> result = this.list(queryWrapper);
return result;
}
}
@@ -146,7 +146,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
this.updateById(lawsMonthlyReportManageEO);
// 同步es
// syncElasticsearch(id, issueStatus, issueTime);
syncElasticsearch(id, issueStatus, issueTime);
}
private void syncElasticsearch(String id, String issueStatus, Date issueTime) {
@@ -36,10 +36,14 @@ import com.jero.modules.system.service.impl.SysBaseApiImpl;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.system.util.StringUtils;
import org.apache.poi.hssf.usermodel.HeaderFooter;
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
import org.apache.poi.xwpf.usermodel.TOC;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.apache.shiro.SecurityUtils;
import org.aspectj.util.FileUtil;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtBlock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
@@ -55,6 +59,7 @@ import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -617,13 +622,24 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
//内容中文版
XWPFDocument documentContentCn = new XWPFDocument();
FileOutputStream outContentCn = new FileOutputStream(wordFileContentCn);
//封面
cover(lawsMonthlyReportWriteEOS, titleCN, documentContentCn);
//目录
catalogue(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, "目录", documentContentCn,CutEnum.CN.getValue());
wordContent(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, titleCN,
documentContentCn,CutEnum.CN.getValue(),loginUserList);
// documentContentCn.createTOC();
// createTOC(documentContentCn);
documentContentCn.write(outContentCn);
//内容英文版
XWPFDocument documentContentEn = new XWPFDocument();
FileOutputStream outContentEn = new FileOutputStream(wordFileContentEn);
//封面
cover(lawsMonthlyReportWriteEOS, titleEN, documentContentEn);
//目录
catalogue(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, "catalogue", documentContentEn,CutEnum.EN.getValue());
wordContent(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, titleEN,
documentContentEn,CutEnum.EN.getValue(), loginUserList);
documentContentEn.write(outContentEn);
@@ -633,6 +649,55 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
}
}
public void createTOC(XWPFDocument document) {
CTSdtBlock block = document.getDocument().getBody().addNewSdt();
TOC toc = new TOC(block);
Iterator i$ = document.getParagraphs().iterator();
while(i$.hasNext()) {
XWPFParagraph par = (XWPFParagraph)i$.next();
String parStyle = par.getStyle();
String page = HeaderFooter.page();
if (parStyle != null && parStyle.startsWith("Heading")) {
try {
int level = Integer.parseInt(parStyle.substring("Heading".length()));
toc.addRow(level, par.getText(), 1, "112723803");
} catch (NumberFormatException var7) {
}
}
}
}
// public static void insertNextPageChar(XWPFDocument document) {
// // 首先获取 document Section 信息
// CTBody body = document.getDocument().getBody();
// // 放心, 这个 body 肯定不为空, 否则这个文档就有问题了
// XWPFParagraph paragraph = document.createParagraph();
// // 新创建的段落肯定没有 PPr, 所以需要新创建一个
// CTPPr ctpPr = paragraph.getCTP().addNewPPr();
// // 这一句其实就是设置下一页的分页符了
// CTSectPr sectPr = ctpPr.addNewSectPr();
// // 先加入到 document List
// Document parent = Document.getParentDocument(document);
// if (parent != null) {
// parent.addSectPr(sectPr);
// }
// if (!body.isSetSectPr()) {
// // 文档没设置了 sectPr
// return;
// }
// // 把文档上的 sectPr 中的某些属性赋值给新创建的段落的 sectPr
// CTSectPr bodySectPr = body.getSectPr();
// sectPr.setPgSz(bodySectPr.getPgSz());
// sectPr.setPgMar(bodySectPr.getPgMar());
// sectPr.setCols(bodySectPr.getCols());
// sectPr.setDocGrid(bodySectPr.getDocGrid());
// }
private void word(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS,
List<LawsMonthlyReportTitleTemplateEO> reportTitleOneList,
@@ -711,24 +776,18 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
}
}
}
private void wordContent(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
private void catalogue(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS,
List<LawsMonthlyReportTitleTemplateEO> reportTitleOneList,
String titleCN,
String catalogue,
XWPFDocument document,
String cut,
List<LoginUser> loginUserList) {
//数据字典
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
String cut) {
//树形数据字典
List<SysCategory> categoryList = sysCategoryService.list();
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "") + "";
//生成页眉页脚
WordUtil.exportHeardAndFoot(document,moth);
//生成标题
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
false, true, "Blue Sky Noto Regular",null);
//单独设置每页右侧的时间
WordUtil.exportWord(document, catalogue, null, ParagraphAlignment.LEFT, 0, 18,
false, false, "Blue Sky Noto Regular",null);
int oneCount = 1;
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : reportTitleOneList) {
@@ -743,7 +802,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
}
if(StringUtils.isNotBlank(oneTitle)){
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT,
0, 14, false, true, "Blue Sky Noto Regular","1");
0, 12, false, true, "Blue Sky Noto Regular",null);
oneCount++;
}
@@ -766,7 +825,99 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
}
if(StringUtils.isNotBlank(twoTitle)){
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT,
2, 12, false, true, "Blue Sky Noto Regular","2");
2, 12, false, true, "Blue Sky Noto Regular",null);
twoCount++;
}
for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : lawsMonthlyReportWriteEOList) {
//月报内容标题
String reportTitle = "";
if(CutEnum.CN.getValue().equals(cut)){
reportTitle = lawsMonthlyReportWriteEO.getTitleCn();
}else{
reportTitle = lawsMonthlyReportWriteEO.getTitleEn();
}
if(org.apache.commons.lang3.StringUtils.isNotBlank(reportTitle)){
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT,
6, 12, false, false, "Blue Sky Noto Regular",null);
reportCount++;
}
}
}
}
}
//封面
private void cover(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
String titleCN,
XWPFDocument document) {
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "") + "";
titleCN = "\r\n\r\n" + titleCN + "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
false, false, "Blue Sky Noto Regular",null);
WordUtil.exportWord(document, moth, null, ParagraphAlignment.CENTER, 0, 12,
false, true, "Blue Sky Noto Regular",null);
}
private void wordContent(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS,
List<LawsMonthlyReportTitleTemplateEO> reportTitleOneList,
String titleCN,
XWPFDocument document,
String cut,
List<LoginUser> loginUserList) {
//数据字典
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
//树形数据字典
List<SysCategory> categoryList = sysCategoryService.list();
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "") + "";
//生成封面
// WordUtil.exportHeardAndFoot(document,moth);
//生成页眉页脚
WordUtil.exportHeardAndFoot(document,moth);
//生成标题
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18,
false, true, "Blue Sky Noto Regular",null);
int oneCount = 1;
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : reportTitleOneList) {
int twoCount = 1;
String oneNumber = intToRoman(oneCount);
//一级标题
String oneTitle = "";
if(CutEnum.CN.getValue().equals(cut)){
oneTitle = lawsMonthlyReportTitleTemplateEO.getTitleCn();
}else{
oneTitle = lawsMonthlyReportTitleTemplateEO.getTitleEn();
}
if(StringUtils.isNotBlank(oneTitle)){
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT,
0, 14, false, true, "Blue Sky Noto Regular","Heading1");
oneCount++;
}
List<LawsMonthlyReportTitleTemplateEO> reportTitleTwoList = lawsMonthlyReportTitleTemplateEOS.stream().filter(e -> e.getParentId().equals(lawsMonthlyReportTitleTemplateEO.getId())).collect(Collectors.toList());
for (LawsMonthlyReportTitleTemplateEO monthlyReportTitleTemplateEO : reportTitleTwoList) {
int reportCount = 1;
//子标题对应的月报填写的内容
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOList = lawsMonthlyReportWriteEOS.stream().filter(e -> monthlyReportTitleTemplateEO.getId().equals(e.getMemoriesChapter())).collect(Collectors.toList());
String twoNumber = intToRoman(twoCount);
twoNumber = oneNumber+"."+twoNumber;
//二级标题
String twoTitle = "";
if(CutEnum.CN.getValue().equals(cut)){
twoTitle = monthlyReportTitleTemplateEO.getTitleCn();
}else{
twoTitle = monthlyReportTitleTemplateEO.getTitleEn();
}
if(StringUtils.isNotBlank(twoTitle)){
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT,
2, 12, false, true, "Blue Sky Noto Regular","Heading2");
twoCount++;
}
//二级目录下放--->新征求意见清单模板, 新发布标准清单模板
@@ -794,7 +945,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
}
if(StringUtils.isNotBlank(reportTitle)){
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT,
6, 11, false, false, "Blue Sky Noto Regular","3");
6, 11, false, false, "Blue Sky Noto Regular","Heading3");
}
@@ -328,9 +328,11 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String, Object> queryMapTemp = new HashMap<>();
if (key.equals("serial_number")){
s = s.toLowerCase();
queryMap.put(key, "*" + s + "*");
map.put("wildcard", queryMap);
} else {
s = s.toLowerCase();
queryMapTemp.put("query", s);
queryMapTemp.put("minimum_should_match", 2);
queryMap.put(key, queryMapTemp);
@@ -461,6 +463,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String, Object> map25 = new HashMap<>();
Map<String, Object> map45 = new HashMap<>();
map25.put("query", selectValue);
map25.put("fields", fieldList.toArray());
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
map45.put("query_string", map25);
queryMapJson.add(map45);
@@ -488,6 +491,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String, Object> map25 = new HashMap<>();
Map<String, Object> map45 = new HashMap<>();
map25.put("query", selectValue);
map25.put("fields", fieldList.toArray());
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
map45.put("query_string", map25);
queryMapJson.add(map45);
@@ -551,15 +555,15 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String, Object> map31 = new HashMap<>();
Map<String, Object> map41 = new HashMap<>();
if("serial_number".equals(field)){
map31.put("boost",1);
map31.put("boost",10);
}else if("title".equals(field)){
map31.put("boost",1);
map31.put("boost",10);
}else if("file_text".equals(field)){
map31.put("boost",0.01);
}else if("content".equals(field)){
map31.put("boost",0.01);
}else if("file_name".equals(field)){
map31.put("boost",1);
map31.put("boost",10);
}
map31.put("value", selectValue);
map21.put(field + ".keyword", map31);
@@ -571,15 +575,15 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String, Object> map32 = new HashMap<>();
Map<String, Object> map42 = new HashMap<>();
if("serial_number".equals(field)){
map32.put("boost",1);
map32.put("boost",10);
}else if("title".equals(field)){
map32.put("boost",1);
map32.put("boost",10);
}else if("file_text".equals(field)){
map32.put("boost",0.01);
}else if("content".equals(field)){
map32.put("boost",0.01);
}else if("file_name".equals(field)){
map32.put("boost",1);
map32.put("boost",10);
}
map32.put("query", selectValue);
map22.put(field, map32);
@@ -589,8 +593,21 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
// match分词匹配查询
// 情况举例用户可能他知道开头的前缀几个字知道中间的几个字
Map<String, Object> map23 = new HashMap<>();
Map<String, Object> map33 = new HashMap<>();
Map<String, Object> map43 = new HashMap<>();
map23.put(field, selectValue);
if("serial_number".equals(field)){
map33.put("boost",10);
}else if("title".equals(field)){
map33.put("boost",10);
}else if("file_text".equals(field)){
map33.put("boost",0.01);
}else if("content".equals(field)){
map33.put("boost",0.01);
}else if("file_name".equals(field)){
map33.put("boost",10);
}
map33.put("query", selectValue);
map23.put(field, map33);
map43.put("match", map23);
queryMapJson.add(map43);
@@ -919,8 +936,27 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
*/
@Override
public IPage getParagraphInfoList(Map<String, Object> map) {
//指定module_type_flag= WDK
JSONArray queryJsonMust = new JSONArray();
Map<String, Object> mapModule = new HashMap<>();
Map<String, Object> mapModule1 = new HashMap<>();
Map<String, Object> mapModule2 = new HashMap<>();
mapModule.put("query", "WDK");
mapModule1.put("module_type_flag", mapModule);
mapModule2.put("match", mapModule1);
queryJsonMust.add(mapModule2);
//段落, 有条件的时候,查询的数据中不含有魑的数据
JSONArray queryJsonMustNot = new JSONArray();
if(ObjectUtils.isEmpty(map.get("mapOne"))){
((Map<String, Object>) map.get("mapOne")).put("flag",SEARCH_FLAG);
}else{
Map<String, Object> mapTemp = new HashMap<>();
Map<String, Object> map1 = new HashMap<>();
Map<String, Object> map2 = new HashMap<>();
mapTemp.put("query", SEARCH_FLAG);
map1.put("flag", mapTemp);
map2.put("match", map1);
queryJsonMustNot.add(map2);
}
String cut = (String) map.get("cut");
//module_type 代表文档库的段落
@@ -956,24 +992,27 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
JSONArray queryMapJsonAll = new JSONArray();
//首次查询条件
if (ObjectUtils.isNotEmpty(mapOne)) {
if(StringUtils.isNotBlank((String)mapOne.get("title"))
|| StringUtils.isNotBlank((String)mapOne.get("serial_number"))){
Map<String, Object> queryMap = new HashMap<>();
Map<String, Object> queryMapTemp = new HashMap<>();
queryMapTemp.put("flag",SEARCH_FLAG );
queryMap.put("match_phrase", queryMapTemp);
queryMapJsonTemp.add(queryMap);
}
// if(StringUtils.isNotBlank((String)mapOne.get("title"))
// || StringUtils.isNotBlank((String)mapOne.get("serial_number"))){
// Map<String, Object> queryMap = new HashMap<>();
// Map<String, Object> queryMapTemp = new HashMap<>();
// queryMapTemp.put("flag",SEARCH_FLAG );
// queryMap.put("match_phrase", queryMapTemp);
// queryMapJsonTemp.add(queryMap);
// }
for (Map.Entry<String, Object> entry : mapOne.entrySet()) {
String key = entry.getKey();
String value = (String) entry.getValue();
if("serial_number".equals(key) || "title".equals(key) || "file_text".equals(key)){
value = value.toLowerCase();
}
if (ObjectUtils.isNotEmpty(value)) {
for (String s : value.split(",")) {
Map<String, Object> queryMap = new HashMap<>();
Map<String, Object> queryMapTemp = new HashMap<>();
Map<String, Object> queryMap3 = new HashMap<>();
//特殊处理编号字段
if (key.equals("serial_number")){
if (key.equals("serial_number") || key.equals("title") || key.equals("file_text")){
queryMapTemp.put(key, "*" + s + "*");
queryMap.put("wildcard",queryMapTemp);
queryMapJson.add(queryMap);
@@ -1007,6 +1046,10 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, null, null);
queryMapJsonAll.add(jsonObject);
}
if(CollectionUtils.isNotEmpty(queryJsonMust)){
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryJsonMust, null, null);
queryMapJsonAll.add(jsonObject);
}
}
String ids = (String) mapTwo.get("ids");
@@ -1113,7 +1156,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
IPage iPage = getiPage(selectValue, selectValueTwo, queryMapJsonAll, mapHighlight1,null,
pageNo, pageSize, paragraphFlag,(String) map.get("cut"),sort,null);
pageNo, pageSize, paragraphFlag,(String) map.get("cut"),sort,queryJsonMustNot);
return iPage;
}
@@ -1489,7 +1532,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String, Object> map31 = new HashMap<>();
Map<String, Object> map41 = new HashMap<>();
if("title".equals(field)){
map31.put("boost",1);
map31.put("boost",10);
}else if("content".equals(field)){
map31.put("boost",0.01);
}
@@ -1503,7 +1546,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String, Object> map32 = new HashMap<>();
Map<String, Object> map42 = new HashMap<>();
if("title".equals(field)){
map32.put("boost",1);
map32.put("boost",10);
}else if("content".equals(field)){
map32.put("boost",0.01);
}
@@ -1515,8 +1558,15 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
// match分词匹配查询
// 情况举例用户可能他知道开头的前缀几个字知道中间的几个字
Map<String, Object> map23 = new HashMap<>();
Map<String, Object> map33 = new HashMap<>();
Map<String, Object> map43 = new HashMap<>();
map23.put(field, selectValue);
if("title".equals(field)){
map33.put("boost",10);
}else if("content".equals(field)){
map33.put("boost",0.01);
}
map33.put("query", selectValue);
map23.put(field, map33);
map43.put("match", map23);
queryMapJson.add(map43);
@@ -118,6 +118,7 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
Map<String, Object> map25 = new HashMap<>();
Map<String, Object> map45 = new HashMap<>();
map25.put("query", selectValue);
map25.put("fields", fieldList.toArray());
map25.put("allow_leading_wildcard", false);
map45.put("query_string", map25);
queryMapJsonTwo.add(map45);
@@ -248,7 +249,7 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
Map<String, Object> map31 = new HashMap<>();
Map<String, Object> map41 = new HashMap<>();
if("title".equals(field)){
map31.put("boost",1);
map31.put("boost",10);
}else if("content".equals(field)){
map31.put("boost",0.01);
}
@@ -262,7 +263,7 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
Map<String, Object> map32 = new HashMap<>();
Map<String, Object> map42 = new HashMap<>();
if("title".equals(field)){
map32.put("boost",1);
map32.put("boost",10);
}else if("content".equals(field)){
map32.put("boost",0.01);
}
@@ -274,8 +275,15 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
// match分词匹配查询
// 情况举例用户可能他知道开头的前缀几个字知道中间的几个字
Map<String, Object> map23 = new HashMap<>();
Map<String, Object> map33 = new HashMap<>();
Map<String, Object> map43 = new HashMap<>();
map23.put(field, selectValue);
if("title".equals(field)){
map33.put("boost",10);
}else if("content".equals(field)){
map33.put("boost",0.01);
}
map33.put("query", selectValue);
map23.put(field, map33);
map43.put("match", map23);
queryMapJson.add(map43);
@@ -165,12 +165,22 @@ public class FileSpiltService {
paragraphString = paragraphString.trim();
}
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
paragraphString = paragraphString.replaceAll("\r\n","");
paragraphString = paragraphString.replaceAll("\n","");
paragraphString = paragraphString.trim();
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
if (StringUtils.isNotEmpty(p.getNumLevelText()) && p.getNumLevelText().indexOf(".") > 0) {
@@ -682,12 +692,22 @@ public class FileSpiltService {
paragraphString = paragraphString.trim();
}
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
paragraphString = paragraphString.replaceAll("\r\n","");
paragraphString = paragraphString.replaceAll("\n","");
paragraphString = paragraphString.trim();
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
// if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
@@ -864,12 +884,22 @@ public class FileSpiltService {
paragraphString = paragraphString.trim();
}
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
paragraphString = paragraphString.replaceAll("\r\n","");
paragraphString = paragraphString.replaceAll("\n","");
paragraphString = paragraphString.trim();
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
// if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
@@ -1056,12 +1086,22 @@ public class FileSpiltService {
paragraphString = paragraphString.trim();
}
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
paragraphString = paragraphString.replaceAll("\r\n","");
paragraphString = paragraphString.replaceAll("\n","");
paragraphString = paragraphString.trim();
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
// if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
@@ -1418,12 +1458,22 @@ public class FileSpiltService {
paragraphString = paragraphString.trim();
}
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
paragraphString = paragraphString.replaceAll("\r\n","");
paragraphString = paragraphString.replaceAll("\n","");
paragraphString = paragraphString.trim();
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
// if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
@@ -1613,12 +1663,22 @@ public class FileSpiltService {
paragraphString = paragraphString.trim();
}
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
paragraphString = paragraphString.replaceAll("\r\n","");
paragraphString = paragraphString.replaceAll("\n","");
paragraphString = paragraphString.trim();
if(StringUtils.isEmpty(paragraphString)){
// 处理当前段落仅为图片的情况
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
if (CollectionUtils.isNotEmpty(imageBundleList)) {
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
}
continue;
}
@@ -2586,7 +2646,7 @@ public class FileSpiltService {
String path = splitUrl+"/jero-boot/sys/split/file/getImage?fileUrl="+filepathandname;
CosBootUtil.uploadByte(bytev, filepathandname);
String imgCon = path;
String imgConVal = "<img class=\"wordImg\" src=\"" + path + "\">";
String imgConVal = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"" + path + "\">";
message.getItemsCondi().add(imgConVal);
message.setItermsConditions(message.getItermsConditions() + imgConVal);
itemsValList.add(getSplitItemsValObject(message.getId(), SplitFilePragraTypeEnum.IMG.getValue(), imgCon, message.getItemsCondi().size(), null));
@@ -158,7 +158,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
} else if ("IMG".equals(valEO.getType())) {
String imgUrl = valEO.getItemContent();
valEO.setItemContent(imgUrl);
valContent = "<img class=\"wordImg\" src=\""+ valEO.getItemContent() +"\">";
valContent = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\""+ valEO.getItemContent() +"\">";
// valContent = valEO.getItemContent();
} else if ("TABLE".equals(valEO.getType())) {
valContent = valEO.getItemContent();
@@ -233,7 +233,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
} else if ("IMG".equals(valEO.getType())) {
String imgUrl = valEO.getItemContent();
valEO.setItemContent(imgUrl);
valContent = "<img class=\"wordImg\" src=\"" + valEO.getItemContent() + "\">";
valContent = "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\"" + valEO.getItemContent() + "\">";
// valContent = valEO.getItemContent();
} else if ("TABLE".equals(valEO.getType())) {
valContent = valEO.getItemContent();
@@ -1693,7 +1693,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
return mFile;
}
private List<Map<String, Object>> read(File file, List<String> dbfieldList, String[] titles, String cut) throws IOException, InvalidFormatException {
private List<Map<String, Object>> read(File file, List<String> dbfieldList, String[] titles, String cut) throws Exception {
//最终返回数据
List<Map<String, Object>> list = new ArrayList<>();
@@ -1702,8 +1702,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
InputStream is = new FileInputStream(file);
String name = file.getName().toLowerCase();
// 创建excel操作对象
if (name.contains(".xlsx") || name.contains(".xls")) {
if (name.contains(".xlsx")) {
workbook = WorkbookFactory.create(is);
} else {
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("请导入正确模板!");
} else {
throw new JeroBootException("Please import the correct template");
}
}
//得到一个工作表
Sheet sheet = workbook.getSheetAt(0);
@@ -1744,10 +1750,38 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
}
}
}
Row rowDescription= sheet.getRow(1);
if (rowDescription != null) {
Cell cell = rowDescription.getCell(0);
if(ObjectUtil.isNotNull(cell)){
//设置单元格类型
cell.setCellType(CellType.STRING);
String cellValue = cell.getStringCellValue();
if(!cellValue.contains("填写说明")){
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("请导入正确模板!");
} else {
throw new JeroBootException("Please import the correct template");
}
}
} else{
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("请导入正确模板!");
} else {
throw new JeroBootException("Please import the correct template");
}
}
}else{
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("请导入正确模板!");
} else {
throw new JeroBootException("Please import the correct template");
}
}
Map<String, Object> map = null;
//获得所有数据
//从第x行开始获取
//从第3行开始获取第一行是表头第二行是填写说明
for (int x = 2; x <= totalRowNum; x++) {
map = new HashMap<String, Object>();
//获得第i行对象
@@ -2461,7 +2495,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
if ("TEXT".equals(valEO.getType())) {
valContent += "<p>" + valEO.getItemContent() + "</p>";
} else if ("IMG".equals(valEO.getType())) {
valContent += "<img class=\"wordImg\" src=\""+ valEO.getItemContent() +"\">";
valContent += "<img class=\"wordImg\" style=\"width:100%;height:100%\" src=\""+ valEO.getItemContent() +"\">";
// valContent += valEO.getItemContent();
} else if ("TABLE".equals(valEO.getType())) {
valContent += valEO.getItemContent();
@@ -64,8 +64,8 @@ public class LawsWarnController {
@ApiOperation(value = "推送")
@GetMapping(value = "/warnPullMessage")
// @RequiresPermissions("document:pullMessage")
public Result<?> pullMessage(String departIds,String userIds,String documentIds) {
lawsWarnService.warnPullMessage(departIds,userIds,documentIds);
public Result<?> pullMessage(String departIds,String userIds,String documentIds,String flag) {
lawsWarnService.warnPullMessage(departIds,userIds,documentIds,flag);
return Result.OK("推送成功");
}
}
@@ -338,7 +338,7 @@ public class LawsWarnService {
}
public String warnPullMessage(String departIds, String userIds, String documentIds) {
public String warnPullMessage(String departIds, String userIds, String documentIds,String flag) {
Set<String> allDepartIds = new HashSet<>();
//查询当前部门下所有部门
if (StringUtils.isNotEmpty(departIds)) {
@@ -379,6 +379,25 @@ public class LawsWarnService {
List<String> urlList = new ArrayList<>();
List<String> hrefList = new ArrayList<>();
for (Map<String, Object> map : mapList) {
//1-->新车型实施日期, 2-->在产车实施日期
String timeContent = "";
if("1".equals(flag)){
String value = StringUtils.valueOf(map.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
if(StringUtils.isNotBlank(value)){
if(value.contains(" ")){
value = value.split(" ")[0];
}
timeContent =" to you as the implementation date of the new model is " +value;
}
}else if("2".equals(flag)){
String value = StringUtils.valueOf(map.get("implement_time"));
if(StringUtils.isNotBlank(value)){
if(value.contains(" ")){
value = value.split(" ")[0];
}
timeContent =" to you as the implementation date of vehicle production is " +value;
}
}
serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
String url = backUrl + "/docManage/library/detail?id=" + map.get("id") +
"&title=" + map.get("title") +
@@ -388,13 +407,16 @@ public class LawsWarnService {
"&title=" + map.get("title") +
"&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
urlList.add(url);
hrefList.add(href);
hrefList.add(href+timeContent);
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out.";
String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
String content = StringUtils.join(serialNumberList, ",") + " has been shared with you, please check.";
//消息详情模板
// XXX has pushed GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX
// GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX Please be reminded to check it out.
String contentInfo = sysUser.getUsername() + " has pushed " + StringUtils.join(hrefList, ",") + ", Please be reminded to check it out.";
String title = content;
//封装消息的实体类
@@ -409,10 +431,28 @@ public class LawsWarnService {
mapList.stream().forEach(e->{
if(s.contains((String)e.get("id"))){
String serialNumber = StringUtils.valueOf(e.get("serial_number"));
list.add(serialNumber);
String timeContent = "";
if("1".equals(flag)){
String value = StringUtils.valueOf(e.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
if(StringUtils.isNotBlank(value)){
if(value.contains(" ")){
value = value.split(" ")[0];
}
timeContent =" to you as the implementation date of the new model is " +value;
}
}else if("2".equals(flag)){
String value = StringUtils.valueOf(e.get("implement_time"));
if(StringUtils.isNotBlank(value)){
if(value.contains(" ")){
value = value.split(" ")[0];
}
timeContent =" to you as the implementation date of vehicle production is " +value;
}
}
list.add(serialNumber + timeContent);
}
});
String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
String contentTemp = sysUser.getUsername() + " has pushed " + StringUtils.join(list, ",") + ", Please be reminded to check it out.";
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
}
} catch (IOException e) {
@@ -421,4 +461,87 @@ public class LawsWarnService {
bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo);
return "推送成功";
}
// public String warnPullMessage(String departIds, String userIds, String documentIds,String flag) {
// Set<String> allDepartIds = new HashSet<>();
// //查询当前部门下所有部门
// if (StringUtils.isNotEmpty(departIds)) {
// String[] departIdArr = departIds.split(",");
// for (String departId : departIdArr) {
// List<String> subDepIdsByDepId = sysDepartService.getSubDepIdsByDepId(departId);
// allDepartIds.addAll(subDepIdsByDepId);
// }
// }
//
// List<String> userIdList = new ArrayList<>();
// List<String> thirdIdList = new ArrayList<>();
// if (StringUtils.isNotBlank(departIds)) {
// //查询部门下的人员
// List<SysUser> userList = new ArrayList<>();
// if(allDepartIds.size() != 0){
// userList = sysUserService.getUserListByDepIds(new ArrayList<>(allDepartIds));
// }
//
// if (userList.size() != 0) {
// userIdList = userList.stream().map(SysUser::getId).distinct().collect(Collectors.toList());
// thirdIdList = userList.stream().map(SysUser::getThirdId).distinct().collect(Collectors.toList());
// }
// }
// if(userIdList.size() == 0 && StringUtils.isNotBlank(userIds)){
// List<SysUser> sysUsers = sysUserService.listByIds(Arrays.asList(userIds.split(",")));
// if(sysUsers.size() != 0){
// List<String> userId = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
// List<String> thirdId = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
// userIdList.addAll(userId);
// thirdIdList.addAll(thirdId);
// }
// }
//
// //查询文档
// List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(documentIds);
// List<String> serialNumberList = new ArrayList<>();
// List<String> urlList = new ArrayList<>();
// List<String> hrefList = new ArrayList<>();
// for (Map<String, Object> map : mapList) {
// serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
// String url = backUrl + "/docManage/library/detail?id=" + map.get("id") +
// "&title=" + map.get("title") +
// "&serial_number=" + map.get("serial_number");
//
// String href = "<a href='/docManage/library/detail?id=" + map.get("id") +
// "&title=" + map.get("title") +
// "&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
// urlList.add(url);
// hrefList.add(href);
// }
//
//
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out.";
// String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
// String title = content;
//
// //封装消息的实体类
// SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
// sysAnnouncementService.saveAnnouncement(sysAnnouncement);
// bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
// //飞书
// try {
// for (String s : urlList) {
// String encode = UriEncoder.encode(s);
// List<String> list = new ArrayList<>();
// mapList.stream().forEach(e->{
// if(s.contains((String)e.get("id"))){
// String serialNumber = StringUtils.valueOf(e.get("serial_number"));
// list.add(serialNumber);
// }
// });
// String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
// }
// } catch (IOException e) {
// e.printStackTrace();
// }
// bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo);
// return "推送成功";
// }
}
@@ -164,4 +164,10 @@ public interface WorkFlowFeignClient {
*/
@RequestMapping(value = "/bat-wkflow/deleteProcessInstanceByTaskId",method = RequestMethod.GET)
Result<String> deleteProcessInstanceByTaskId(@RequestParam("taskId") String taskId);
@RequestMapping(value = "/bat-wkflow/task/getLawsOpinionGatherFlowAssigneeList",method = RequestMethod.GET)
List<String> getLawsOpinionGatherFlowAssigneeList(@RequestParam("lawsOpinionGatherId") String lawsOpinionGatherId);
@RequestMapping(value = "/bat-wkflow/task/getTaskAssigneeListByPrcIds",method = RequestMethod.GET)
List<String> getTaskAssigneeListByPrcIds(@RequestParam("actiProcInstIds") String actiProcInstIds);
}
+2
View File
@@ -1281,4 +1281,6 @@ module.exports = {
rejectedBy:'Rejected By',
rejectionTime:'Rejection Time',
rejectReason:'Reject Reason',
collectionLegislativeComments:'Collection of Legislative Comments',
regulatoryAndTechnicalAssessment:'Regulatory and technical assessment',
}
+3
View File
@@ -1383,4 +1383,7 @@ module.exports = {
rejectedBy:'拒绝人',
rejectionTime:'拒绝时间',
rejectReason:'拒绝原因',
collectionLegislativeComments:'法规意见收集',
regulatoryAndTechnicalAssessment:'法规技术评估',
}
@@ -125,7 +125,7 @@
<div v-else-if='detailDate.controlType === "2"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type === "pull"'>
<a-select v-model="item.dataValue"
<a-select v-model="item.dataValue" @change='selectChange'
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
@@ -690,6 +690,17 @@
})
},
methods: {
selectChange(val){
this.$nextTick(() => {
let element = document.querySelectorAll(
".tableclassname .ant-table-expanded-row"
);
let len = element.length / 2;
for (let i = 0; i < len; i++) {
element[i + len].style.height = element[i].offsetHeight + "px";
}
});
},
onInput(r) {
let value = r.target.value
r.target.value = value.replace(/[^\u4e00-\u9fa5]/g, '')
@@ -770,7 +781,9 @@
height: 38px !important;
line-height: 38px !important;
}
.ant-select-selection-selected-value{
height:100%;
}
.selectWid .ant-select-selection__rendered {
line-height: 36px !important;
}
@@ -781,9 +794,12 @@
height: calc(100% - 100px);
overflow: auto;
}
/deep/ .ant-select-allow-clear{
height: 30px;
}
///deep/ .ant-select-allow-clear{
// height: 30px;
//}
/deep/.ant-table-row{
height:69px;
}
.text {
margin-right: 10px;
}
+1 -1
View File
@@ -122,7 +122,7 @@
if (this.isTrue) {
this.$emit('getList',info.file.response.result)
} else {
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
}
this.$message.success(this.$t('OperationSuccessful'))
}
+1 -1
View File
@@ -296,7 +296,7 @@
postAction(url, this.formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
this.$emit('addFormClick')
} else {
this.$message.warning(this.$t(res.message))
@@ -124,6 +124,10 @@
this.getData()
this.getTableList()
})
eventBUs.$on('searchGetData', target => {
this.getData()
this.getTableList()
})
this.getData()
this.getTableList()
this.userData = this.userInfo()
@@ -0,0 +1,318 @@
<template>
<div>
<div class="box-title-text" v-if="!isInput">
<a-input class="box-input" :value="value" @input="indexclick($event)"
:disabled="true"
:title="value"
:placeholder="$t('PleaseSelect')+query.db_field_txt"/>
<a-button type="primary" class="button-box" :disabled="disabled" @click="standardClick">
{{this.$t('PersonnelSelection')}}
</a-button>
<a-button type="primary" v-if='isDelete' class="button-box" @click="standardDelete">
{{this.$t('delete')}}
</a-button>
</div>
<div class="box-title-text" v-if="isInput">
<a-input :class="{'box-input':!isClass}" :value="value"
readonly
:title="value"
@click.native="standardClick"
:placeholder="$t('PleaseSelect')+query.db_field_txt"/>
</div>
<a-drawer
:title="$t('PersonnelSelection')"
:maskClosable="false"
:width="600"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-input-search style="margin-bottom: 8px" :placeholder="$t('NodeQuickLookup')"
v-model="searchModel" @search="onSearch"/>
<div class="drawer-content">
<!-- checkStrictly-->
<a-tree
style="margin-bottom: 60px;height: 600px"
v-if="treeVisible"
checkable
:loading="loading"
:tree-data="gData"
@check="onCheck"
@expand="onExpand"
v-model:checkedKeys="defaultCheckedKeys"
:defaultExpandedKeys="defaultExpandedKeys"
>
</a-tree>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name: 'index',
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass', 'isDelete', 'disabled'],
data() {
return {
loading: true,
gData: [],
autoExpandParent: true,
expandedKeys: [],
visible: false,
treeVisible: false,
confirmLoading: false,
departId: '',
selectedKey: [],
userIds: [],
searchModel: '',
defaultExpandedKeys: [],
defaultCheckedKeys: [],
defaultCheckedKeysName: [],
content: []
}
},
mounted() {
},
methods: {
standardClick() {
this.treeVisible = false
this.departId = ''
this.searchModel = ''
this.userIds = []
this.userName = []
this.queryDepartUserTreeList(1)
this.visible = true
},
standardDelete() {
this.$emit('input', null)
this.$forceUpdate()
this.$emit('deleteData', this.query.db_field_name)
},
// onSelect(selectedKeys, info) {
// console.log(selectedKeys)
// this.selectedKey = selectedKeys
// },
onCheck(checkedKeys, info) {
console.log(checkedKeys, info)
this.userIds = checkedKeys
this.userName = []
if (this.userIds.length > 0) {
for (let i = 0; i < this.userIds.length; i++) {
for (let j = 0; j < this.defaultCheckedKeysName.length; j++) {
if (this.userIds[i] == this.defaultCheckedKeysName[j].id) {
this.userName.push(this.defaultCheckedKeysName[j].name)
}
}
}
}
if (info.checkedNodes && info.checkedNodes.length > 0) {
info.checkedNodes.forEach(res => {
if (res.data.props.dataRef.key) {
this.content.push({
id: res.data.props.dataRef.key,
title: res.data.props.dataRef.title
})
} else {
this.content.push({
id: res.data.props.id,
title: res.data.props.title
})
}
})
}
if (this.content && this.content.length > 0) {
for (let i = 0; i < this.content.length; i++) {
for (let j = i + 1; j < this.content.length; j++) {
if (this.content[i].id == this.content[j].id) {
this.content.splice(j, 1)
j--
}
}
}
this.userIds.forEach(res => {
this.content.forEach(val => {
if (res == val.id) {
this.userName.push(val.title)
}
})
})
}
if (this.userName.length > 0) {
for (let i = 0; i < this.userName.length; i++) {
for (let j = i + 1; j < this.userName.length; j++) {
if (this.userName[i] == this.userName[j]) {
this.userName.splice(j, 1)
j--
}
}
}
}
},
handleCancel() {
this.visible = false
this.treeVisible = false
},
handleSubmit() {
// if (this.userIds && this.userIds.length > 0) {
if (this.isSingleChoice) {
if (this.userIds.length > 1) {
this.$message.warning(this.$t('onlyOnePersonCanBeSelected'))
return
}
}
console.log(this,userIds)
console.log(this,userName)
let userIds = JSON.parse(JSON.stringify(this.userIds))
let userName = JSON.parse(JSON.stringify(this.userName))
this.$emit('input', userName.join(','))
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
this.visible = false
this.treeVisible = false
// } else {
// this.$message.warning(this.$t('pleaseSelectPersonFirst'))
// }
},
indexclick(event) {
this.$emit('input', event.target.value)
this.departId = ''
this.searchModel = ''
this.userIds = []
this.userName = []
this.defaultCheckedKeys = []
},
onSearch(e) {
this.gData = []
this.departId = ''
this.visibleTree = false
if (e) {
this.getUserAndDepart()
} else {
this.treeVisible = false
this.queryDepartUserTreeList(2)
}
},
getUserAndDepart() {
getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => {
if (res) {
this.gData = res.filter(ele => ele.flag === 'DEPART')
} else {
this.gData = []
}
this.visibleTree = true
})
},
onExpand(selectedKeys, val) {
if (this.searchModel == '' || !this.searchModel) {
if (val.expanded) {
if (this.departId == val.node.value) {
} else {
this.departId = val.node.value
this.queryDepartUserTreeList(2)
}
}
}
},
queryDepartUserTreeList(num) {
let gData = JSON.parse(JSON.stringify(this.gData))
if (gData && gData.length > 0) {
gData = JSON.stringify(gData)
} else {
gData = ''
}
this.confirmLoading = true
postAction('sys/user/queryDepartUserTreeList', {
departId: this.departId,
json: gData,
}).then((res) => {
this.confirmLoading = false
if (res.success) {
this.gData = res.result
this.defaultExpandedKeys = [this.departId]
if (num == 1) {
if (this.userName && this.userName.length == 0) {
if (this.personneQuery[this.query.db_field_name + 'Name']) {
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) {
this.userName = this.personneQuery[this.query.db_field_name].split(',')
} else {
this.userName = []
}
}
if (this.userIds && this.userIds.length == 0) {
if (this.personneQuery[this.query.db_field_name + '_id']) {
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) {
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
} else {
this.userIds = []
}
}
this.defaultCheckedKeys = this.userIds
this.defaultCheckedKeysName = []
if (this.defaultCheckedKeys.length > 0) {
for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
this.defaultCheckedKeysName.push({
id: this.defaultCheckedKeys[i],
name: this.userName[i]
})
}
}
}
this.treeVisible = true
} else {
this.gData = []
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.button-box {
margin-left: 10px;
height: 38px;
line-height: 38px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.drawer-content {
height: calc(100% - 60px);
overflow: auto;
}
</style>
@@ -136,12 +136,18 @@
this.getData()
this.getTableList()
})
eventBUs.$on('searchGetData', target => {
this.selectedRowKeys = []
this.getData()
this.getTableList()
})
this.getData()
this.getTableList()
},
beforeDestroy(){
eventBUs.$off('searchQuery')
eventBUs.$off('searchReset')
eventBUs.$off('searchGetData')
},
methods: {
@@ -106,7 +106,7 @@
}
},
mounted() {
eventBUs.$on('searchQuery', search => {
eventBUs.$on('searchQueryOne', search => {
Object.keys(search).forEach(res => {
if (search[res] instanceof Array) {
search[res] = search[res].join(',')
@@ -116,7 +116,7 @@
this.getData()
this.getTableList()
})
eventBUs.$on('searchReset', target => {
eventBUs.$on('searchResetOne', target => {
this.searchParmes = {}
this.selectedRowKeys = []
this.getData()
@@ -126,8 +126,8 @@
this.getTableList()
},
beforeDestroy(){
eventBUs.$off('searchQuery')
eventBUs.$off('searchReset')
eventBUs.$off('searchQueryOne')
eventBUs.$off('searchResetOne')
},
methods: {
@@ -129,6 +129,11 @@
this.getData()
this.getTableList()
})
eventBUs.$on('searchGetData', target => {
this.selectedRowKeys = []
this.getData()
this.getTableList()
})
this.getData()
this.getTableList()
this.userData = this.userInfo()
@@ -136,6 +141,7 @@
beforeDestroy(){
eventBUs.$off('searchQuery')
eventBUs.$off('searchReset')
eventBUs.$off('searchGetData')
},
methods: {
...mapGetters(['userInfo']),
@@ -335,7 +335,7 @@
if (this.formInline.id) {
eventBUs.$emit('searchGetData')
} else {
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
}
this.$emit('addFormClick')
+18 -6
View File
@@ -63,15 +63,17 @@
departId: '',
defaultExpandedKeys: [],
submitLoading: false,
visibleTree: false
visibleTree: false,
flag: ''
}
},
mounted() {
},
methods: {
getPush(data) {
getPush(data, flag) {
this.tableKey = data
this.flag = flag
this.searchModel = ''
this.visible = true
this.visibleTree = false
@@ -99,10 +101,20 @@
this.visibleTree = false
},
handleSubmit() {
let query = {
documentIds: this.tableKey.join(','),
userIds: this.userIds.join(','),
departIds: this.userIds.join(',')
let query = {}
if (this.flag) {
query = {
documentIds: this.tableKey.join(','),
userIds: this.userIds.join(','),
departIds: this.userIds.join(','),
flag: this.flag
}
} else {
query = {
documentIds: this.tableKey.join(','),
userIds: this.userIds.join(','),
departIds: this.userIds.join(',')
}
}
this.submitLoading = true
this.confirmLoading = true
+26 -21
View File
@@ -191,7 +191,7 @@
searchQuery() {
if (this.isDefault) {
let startTime = moment(new Date()).format('YYYY-MM-DD')
let endTime = this.haflYear()
let endTime = this.getNowdate()
if (this.queryParam['WarnTime'].length == 0) {
this.queryParam['WarnTime'] = [startTime, endTime]
}
@@ -203,7 +203,8 @@
this.queryParam = {}
if (this.isDefault) {
let startTime = moment(new Date()).format('YYYY-MM-DD')
let endTime = this.haflYear()
let endTime = this.getNowdate()
console.log(endTime)
this.queryParam['WarnTime'] = [startTime, endTime]
this.queryParam = { ...this.queryParam }
}
@@ -225,26 +226,30 @@
}
})
},
haflYear() {
// 获取当前时间
var curDate = (new Date()).getTime()
// 将半年的时间单位换算成毫秒
var halfYear = 365 / 2 * 24 * 3600 * 1000
// 半年前的时间毫秒单位
var pastResult = curDate + halfYear
// 日期函数定义起点为半年前
var pastDate = new Date(pastResult)
var pastYear = pastDate.getFullYear()
var pastMonth = pastDate.getMonth() + 1
var pastDay = pastDate.getDate()
if (pastMonth >= 1 && pastMonth <= 9) {
pastMonth = '0' + pastMonth
getNowdate(){
var date_now = new Date()//获取当前时间
var year = date_now.getFullYear()//获取当前时间的年份
var month = date_now.getMonth()//获取当前时间的月份
var day = date_now.getDate()//获取当前时间的日
var days = new Date(year,month,0)//将获取到的年月赋值给days
days = days.getDate()//获取当前年月的日
var year2 = year
var month2 = parseInt(month+7)//获取当前月份的1一个月以后的月份
if(month2 > 12){
year2 = parseInt(year2) + 1
month2 = parseInt(month2) % 12
}//考虑到12月要是获取一个月以后就是一月年份需要加一 一年没有13月所以%12取得来年1月
var day2 = day
var days2 = new Date(year2,month2,0)
days2 = days2.getDate()
if(day2>days2){
day2 = days2
}//获取了当前年份的日和6个月以后的日为的就是判断如果前一个月是有31号后一个月没有就将一个月以后的日期取到赋值给day2
if(month2 < 10){
month2 = '0' + month2
}
if (pastDay >= 0 && pastDay <= 9) {
pastDay = '0' + pastDay
}
var endDate = pastYear + '-' + pastMonth + '-' + (pastDay + 1)
return endDate
var time = year2 + '-' + month2 + '-' + day2
return time
},
dateChange(item) {
this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD')
@@ -179,11 +179,11 @@ export default {
},
methods: {
searchQuery() {
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
eventBUs.$emit('searchQueryOne', JSON.parse(JSON.stringify(this.queryParam)))
},
searchReset() {
this.queryParam = {}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
eventBUs.$emit('searchQueryOne', JSON.parse(JSON.stringify(this.queryParam)))
},
getSeach() {
let params = {
@@ -132,6 +132,7 @@
beforeDestroy() {
eventBUs.$off('searchQuery')
eventBUs.$off('searchReset')
eventBUs.$off('searchGetData')
},
methods: {
rowClassName(record) {
@@ -96,10 +96,10 @@
{{!record.releaseStatus || record.releaseStatus == 'Draft' ? $t('release') :$t('withdraw')}}
</a>
<a class="text-operation"
v-if="record.createBy == userInfoQuery.username && record.releaseStatus == 'Draft'"
v-if="record.releaseStatus == 'Draft'"
@click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation"
v-if="record.createBy == userInfoQuery.username && record.releaseStatus == 'Draft'"
v-if="record.releaseStatus == 'Draft'"
@click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
@@ -279,8 +279,7 @@
let idList = []
let selectedRowKeysRecord = JSON.parse(JSON.stringify(_this.selectedRowKeysRecord))
for (let i = 0; i < selectedRowKeysRecord.length; i++) {
if (selectedRowKeysRecord[i].createBy == _this.userInfo().username &&
selectedRowKeysRecord[i].releaseStatus == 'Draft') {
if (selectedRowKeysRecord[i].releaseStatus == 'Draft') {
idList.push(selectedRowKeysRecord[i].id)
}
}
@@ -228,6 +228,9 @@
id: this.queryForm.praiseEO ? this.queryForm.praiseEO.id : undefined
}
putAction('/problemKnowledgeBase/problemKnowledgeBasePraiseEO/edit', query).then((res) => {
if (!this.queryForm.collectEO || !this.queryForm.collectEO.id) {
this.queryById()
}
})
},
starClick() {
@@ -247,6 +250,9 @@
id: this.queryForm.collectEO ? this.queryForm.collectEO.id : undefined
}
putAction('/problemKnowledgeBase/problemKnowledgeBaseCollectEO/edit', query).then((res) => {
if (!this.queryForm.collectEO || !this.queryForm.collectEO.id) {
this.queryById()
}
})
},
clickButtonToUpload(item) {
@@ -10,7 +10,7 @@
<div class="myList-box-content" v-if="dataSource.length > 0">
<div class="myList-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="prcClick(item)">
<div class="top">
<span class="top-text" :title="item.prcNum">{{item.prcNum}}</span>
<span class="top-text" :title="item.prcName">{{item.prcName}}</span>
<span class="top-admin" :title="prcTypeName[item.prcType]">{{prcTypeName[item.prcType]}}</span>
</div>
<div class="button">
@@ -43,7 +43,9 @@
dataSource: [],
loading: false,
prcTypeName: {
1: this.$t('taskConfirmationProcess')
1: this.$t('taskConfirmationProcess'),
5:this.$t('collectionOfRegulatoryOpinionsProcess'),
6:this.$t('regulatoryTechnologyAssessmentProcess')
}
}
},
@@ -35,9 +35,9 @@
<div class="box-content">
<a-checkbox-group style="width: 100%" :defaultChecked="checkboxText"
@change="checkboxTextChange" v-model="checkboxText">
<div v-for="item in conList" :key="item.id">
<div v-for="item in conList" :key="item.collectEO.id">
<div style="margin-bottom: 10px;position: relative">
<a-checkbox :value="item.id" class="checkbox-left"></a-checkbox>
<a-checkbox :value="item.collectEO.id" class="checkbox-left"></a-checkbox>
<div class="text-text-right"
@click="checkedClick(item)"
:class="{ 'null-input':item.checked }">
@@ -117,7 +117,7 @@
if (value.length > 0) {
this.conList.forEach(val => {
value.forEach(res => {
if (res === val.id) {
if (res === val.collectEO.id) {
val.checked = true
}
})
@@ -183,7 +183,7 @@
this.$confirm({
content: _this.$t('confirmCancelCollection'),
onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
deleteAction(_this.url.deleteBatch, { ids: val.collectEO.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
@@ -216,13 +216,13 @@
}
this.loading = true
getAction(this.url.getInfoList, query).then((res) => {
if (res.success) {
if (res.success && res.result) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = 1
this.getList()
return
}
this.conList = res.result.records
this.conList = res.result ? res.result.records : []
if (this.conList && this.conList.length > 0) {
this.conList.forEach(val => {
if (val.content) {
@@ -233,7 +233,7 @@
if (this.checkboxList && this.checkboxList.length > 0) {
let contentList = []
for (let j = 0; j < this.conList.length; j++) {
contentList.push(this.conList[j].id)
contentList.push(this.conList[j].collectEO.id)
}
this.checkboxList = this.checkboxList.filter(val => {
return !contentList.join(',').includes(val)
@@ -1,8 +1,8 @@
<template>
<div class="collection">
<a-card :bordered="false">
<!-- <a-tabs :model="activeTab" @change="callback">-->
<!-- <a-tab-pane :key="$t('DocumentLibrary')" :tab="$t('DocumentLibrary')">-->
<a-tabs :model="activeTab" @change="callback">
<a-tab-pane :key="$t('DocumentLibrary')" :tab="$t('DocumentLibrary')">
<div class="collection-search-wrapper">
<div class="collection-search-header">
<div class="table-page-search-wrapper">
@@ -90,11 +90,11 @@
/>
</div>
</div>
<!-- </a-tab-pane>-->
<!-- <a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')">-->
<!-- <problemKnowledgeBaseList ref="problemKnowledgeBaseListRef"/>-->
<!-- </a-tab-pane>-->
<!-- </a-tabs>-->
</a-tab-pane>
<a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')">
<problemKnowledgeBaseList ref="problemKnowledgeBaseListRef"/>
</a-tab-pane>
</a-tabs>
</a-card>
</div>
</template>
@@ -285,7 +285,7 @@
.then( (res) =>{
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -362,7 +362,7 @@
getAction(`ocr/ocrRecord/delete`,params).then(res=> {
if(res.success){
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
}else{
this.$message.warning(this.$t('operationFailed'))
}
@@ -225,7 +225,7 @@
postAction(`ocr/OcrRestful/addOcrRecord`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
this.visible = false;
this.$emit('visible',false)
} else {
@@ -1,39 +1,39 @@
<template>
<div class="splitting">
<a-card :bordered="false">
<div class="splitting-search-wrapper">
<searchalonesplit :flag="'3'" :url="url" :searchalonesplit='serialnumber'/>
</div>
<div class="table-operator">
<div class="operator-text" @click="handleModule" v-has="'split:sarFileSplitInfo:splitFile'">
<a-icon type="plus" />
{{ $t('SplitText') }}
</div>
<div class="operator-text" @click="handleExport" v-has="'split:sarFileSplitInfo:splitResult'">
<a-icon type="export" />
{{ $t('ImportResults') }}
</div>
<div class="operator-text" @click="handleDel" v-has="'split:sarFileSplitInfo:deleteBatch'">
<a-icon type="delete" />
{{ $t('BatchDelete') }}
</div>
<div class="splitting">
<a-card :bordered="false">
<div class="splitting-search-wrapper">
<searchalonesplit :flag="'3'" :url="url" :searchalonesplit='serialnumber'/>
</div>
<div class="table-operator">
<div class="operator-text" @click="handleModule" v-has="'split:sarFileSplitInfo:splitFile'">
<a-icon type="plus"/>
{{ $t('SplitText') }}
</div>
<div class="splitting-table">
<table-data
:url="url"
:flag="'3'"
:OperationList="OperationList"
showAction
@onSelectChange="onSelectChange"
@backDocument="backDocument"
@deleteDetail="deleteDetail"
@detailClick="detailClick"
></table-data>
<div class="operator-text" @click="handleExport" v-has="'split:sarFileSplitInfo:splitResult'">
<a-icon type="export"/>
{{ $t('ImportResults') }}
</div>
<split-text v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split-text>
<import-result v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></import-result>
</a-card>
</div>
<div class="operator-text" @click="handleDel" v-has="'split:sarFileSplitInfo:deleteBatch'">
<a-icon type="delete"/>
{{ $t('BatchDelete') }}
</div>
</div>
<div class="splitting-table">
<table-data
:url="url"
:flag="'3'"
:OperationList="OperationList"
showAction
@onSelectChange="onSelectChange"
@backDocument="backDocument"
@deleteDetail="deleteDetail"
@detailClick="detailClick"
></table-data>
</div>
<split-text v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split-text>
<import-result v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></import-result>
</a-card>
</div>
</template>
<script>
@@ -55,51 +55,51 @@
SplitText,
ImportResult
},
data(){
return{
splitVisible:false,
importsVisible:false,
selectedRowKeys:[],
loading:false,
total:0,
ids:[],
tableData:[],
columns:[
data() {
return {
splitVisible: false,
importsVisible: false,
selectedRowKeys: [],
loading: false,
total: 0,
ids: [],
tableData: [],
columns: [
{
title: this.$t('standard'),
align: "center",
dataIndex: 'serialNumber',
align: 'center',
dataIndex: 'serialNumber'
},
{
title: this.$t('title'),
align: "center",
dataIndex: 'title',
align: 'center',
dataIndex: 'title'
},
{
title: this.$t('TextStatus'),
align: "center",
dataIndex: 'fileType_dictText',
align: 'center',
dataIndex: 'fileType_dictText'
},
{
title: this.$t('fileName'),
align: "center",
align: 'center',
dataIndex: 'fileName'
},
{
title: this.$t('splitTime'),
align: "center",
align: 'center',
dataIndex: 'createTime'
},
{
title: this.$t('splitResult'),
align: "center",
align: 'center',
dataIndex: 'splitResult_dictText'
},
{
title: this.$t('operation'),
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: "center",
scopedSlots: { customRender: 'action' },
align: 'center',
width: 170
}
],
@@ -117,64 +117,67 @@
ClickEvent: 'deleteDetail'
} //删除
],
url:{
url: {
tableHeader: 'split/sarFileSplitInfo/getHeader', //表格头部字段
seachList: 'split/sarFileSplitInfo/queryCondition', //搜索字段
tableList: 'split/sarFileSplitInfo/page', //表格数据
tableList: 'split/sarFileSplitInfo/page' //表格数据
// getAddForm: 'ocr/ocrRecord/getForm', // 表单的字段
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
},
queryParams:{
pageNo:1,
pageSize:10
queryParams: {
pageNo: 1,
pageSize: 10
},
token:Vue.ls.get(ACCESS_TOKEN),
serialnumber: '',
token: Vue.ls.get(ACCESS_TOKEN),
serialnumber: ''
}
},
props:{
},
props: {},
created() {
},
mounted() {
if(this.$route.query.serial_number !== undefined) {
if (this.$route.query.serial_number !== undefined) {
this.serialnumber = this.$route.query.serial_number
}
},
methods:{
methods: {
//获取列表数据
loadData(){
this.loading=true
let params={
loadData() {
this.loading = true
let params = {
...this.queryParams
}
getAction(`split/sarFileSplitInfo/page`,params).then(res=>{
if(res.success){
this.tableData=[...res.result.records]
this.loading=false
this.total=res.result.total
}else{
this.loading=false
getAction(`split/sarFileSplitInfo/page`, params).then(res => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.queryParams.pageNo = res.result.current - 1
this.loadData()
return
}
this.tableData = [...res.result.records]
this.loading = false
this.total = res.result.total
} else {
this.loading = false
}
})
},
//拆分已入库文本
handleModule(){
this.splitVisible=true
handleModule() {
this.splitVisible = true
},
//导入拆分结果
handleExport(){
this.importsVisible=true
handleExport() {
this.importsVisible = true
},
//批量删除
handleDel(){
let params={
ids:this.selectedRowKeys.join(',')
handleDel() {
let params = {
ids: this.selectedRowKeys.join(',')
}
if(this.selectedRowKeys&&this.selectedRowKeys.length>0){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$confirm({
title: this.$t('ConfirmDelete'),
content: '',
@@ -187,7 +190,7 @@
url: '/jero-boot/split/sarFileSplitInfo/deleteBatch',
method: 'post',
data: params,
transformRequest: [function (data) {
transformRequest: [function(data) {
// Do whatever you want to transform the data
let ret = ''
for (let it in data) {
@@ -197,31 +200,30 @@
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token':this.token
'X-Access-Token': this.token
}
}).then(res => {
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
// if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){
// this.queryParams.pageNo=this.queryParams.pageNo-1
// }
this.selectedRowKeys=[]
eventBUs.$emit('searchReset')
// this.loadData()
}else{
this.$message.success(this.$t('OperationSuccessful'))
// if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){
// this.queryParams.pageNo=this.queryParams.pageNo-1
// }
this.selectedRowKeys = []
eventBUs.$emit('searchGetData')
// this.loadData()
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
}
else{
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//删除
deleteDetail(val){
deleteDetail(val) {
this.$confirm({
content: this.$t('confirmDeletion'),
onOk:
@@ -232,7 +234,7 @@
// if (this.tableData && this.tableData.length == 1 && this.queryParams.pageNo != 1) {
// this.queryParams.pageNo = this.queryParams.pageNo - 1
// }
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
// this.loadData()
} else {
this.$message.warning(this.$t('operationFailed'))
@@ -242,81 +244,80 @@
})
},
sVisible(val){
this.splitVisible=val
sVisible(val) {
this.splitVisible = false
},
iVisible(val){
this.importsVisible=val
iVisible(val) {
this.importsVisible = val
},
//查询
searchQuery(){
searchQuery() {
},
//清空
searchReset(){
searchReset() {
},
onSelectChange(selKeys){
this.selectedRowKeys=selKeys
onSelectChange(selKeys) {
this.selectedRowKeys = selKeys
},
handleTableChange(){
handleTableChange() {
},
//点击页数
onChangePage(page,pageSize){
onChangePage(page, pageSize) {
this.queryParams.pageNo = page
this.$emit('queryParams',this.queryParams)
this.$emit('queryParams', this.queryParams)
},
//一页显示条数
SizeChange(page,pageSize){
SizeChange(page, pageSize) {
this.queryParams.pageSize = pageSize
this.queryParams.pageNo = 1
this.$emit('queryParams',this.queryParams)
this.$emit('queryParams', this.queryParams)
},
//回传至文档库
backDocument(val){
backDocument(val) {
this.$confirm({
content: this.$t('backDocument'),
onOk:
async () =>
{
let params={
id:val.id,
fileName:val.fileName,
connectId:val.connectId
onOk:
async () => {
let params = {
id: val.id,
fileName: val.fileName,
connectId: val.connectId
}
axios({
url: '/jero-boot/split/sarFileSplitInfo/bindToDocumentLibrary',
method: 'get',
params: params,
headers: {
// 'Content-Type': 'multipart/form-data',
'X-Access-Token': this.token
}
axios({
url: '/jero-boot/split/sarFileSplitInfo/bindToDocumentLibrary',
method: 'get',
params:params,
headers: {
// 'Content-Type': 'multipart/form-data',
'X-Access-Token':this.token
}
}).then(res => {
// console.log('res,res',res)
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
} else {
this.$message.warning(res.data.message)
}
})
}).then(res => {
// console.log('res,res',res)
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchGetData')
} else {
this.$message.warning(res.data.message)
}
})
}
})
},
//查看
detailClick(val){
detailClick(val) {
this.$router.push({
path:'/docManage/splitting/splitDetail',
path: '/docManage/splitting/splitDetail',
query: {
infoId:val.id,
infoNumber:val.serialNumber,
createBy:val.createBy
infoId: val.id,
infoNumber: val.serialNumber,
createBy: val.createBy
}
})
},
}
}
}
@@ -327,20 +328,22 @@
</style>
<style lang="less" scoped>
.splitting{
.splitting-search-wrapper {
margin-bottom: 20px;
.splitting {
.splitting-search-wrapper {
margin-bottom: 20px;
}
.splitting-table{
.action-margin{
margin-right: 10px;
}
.splitting-table {
.action-margin {
margin-right: 10px;
}
}
}
}
.splitting-table{
.page{
.splitting-table {
.page {
margin-top: 20px;
text-align: right;
}
@@ -355,7 +358,8 @@
display: flex;
}
}
.ant-col-sm-8{
.ant-col-sm-8 {
min-width: 300px;
}
}
@@ -16,12 +16,13 @@
</div>
<div class="table-operator">
<div class="operator-text">
<!-- <a-icon type="copy" />-->
<!-- 拆分文件-->
<split-upload ref="uploadFile" :accept="accept" :disabled="disabled" :module="'split'" @uploadSuccess="uploadSuccess"></split-upload>
<!-- <a-icon type="copy" />-->
<!-- 拆分文件-->
<split-upload ref="uploadFile" :accept="accept" :disabled="disabled" :module="'split'"
@uploadSuccess="uploadSuccess"></split-upload>
</div>
<div class="operator-text" @click="downLoad" v-has="'split:sarFileSplitItems:template'">
<a-icon type="download" />
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
</div>
@@ -38,8 +39,12 @@
<div class="imports-footer" style='display: flex;justify-content: flex-end'>
<div class="imports-footer-wrap">
<a-button class="imports-btn" style='background-color: #f5222d;border: none;margin-right: 15px' type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmit" v-has="'split:sarFileSplitItems:importSplitResult'">{{$t('submit')}}</a-button>
<a-button class="imports-btn" style='background-color: #f5222d;border: none;margin-right: 15px' type="primary"
@click="cancleImports">{{$t('cancel')}}
</a-button>
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmit"
v-has="'split:sarFileSplitItems:importSplitResult'">{{$t('submit')}}
</a-button>
</div>
</div>
<a-modal
@@ -50,9 +55,10 @@
:footer="false"
>
<div class="err-value" v-html="errValue"></div>
<!-- <span class="err-value">{{errValue}}</span>-->
<!-- <span class="err-value">{{errValue}}</span>-->
</a-modal>
<!-- <split-upload ref="uploadFile" :disabled="disabled" :title="upload1" :accept="accept" @uploadSuccess="uploadSuccess"></split-upload>-->
<JLoading :loading="loading">{{$t('Submitting')}}</JLoading>
<!-- <split-upload ref="uploadFile" :disabled="disabled" :title="upload1" :accept="accept" @uploadSuccess="uploadSuccess"></split-upload>-->
</a-drawer>
</div>
</template>
@@ -66,96 +72,98 @@
import { ACCESS_TOKEN } from '@/store/mutation-types'
import eventBUs from '../../../../common/event'
import Vue from 'vue'
export default {
name: 'import',
components:{
components: {
SplitUpload,
search,
TableData
},
data(){
return{
labelCol: { span:4 },
data() {
return {
labelCol: { span: 4 },
wrapperCol: { span: 18 },
visible:false,
contentVisible:true,
disabled:false,
tableSource:[], //列表数据
selectedRowKeys:[],
queryParams:{
pageNo:1,
pageSize:10
loading: false,
visible: false,
contentVisible: true,
disabled: false,
tableSource: [], //列表数据
selectedRowKeys: [],
queryParams: {
pageNo: 1,
pageSize: 10
}, //搜索条件
total:0,
total: 0,
columns: [
{
title:this.$t('standard'),
title: this.$t('standard'),
key: 'standNumber',
align:"center",
align: 'center',
dataIndex: 'standNumber',
ellipsis: true,
ellipsis: true
},
{
title:this.$t('title'),
title: this.$t('title'),
key: 'standName',
align:"center",
align: 'center',
dataIndex: 'standName',
ellipsis: true,
ellipsis: true
},
{
title:this.$t('fileName'),
title: this.$t('fileName'),
key: 'fileName',
align:"center",
align: 'center',
dataIndex: 'fileName',
ellipsis: true,
ellipsis: true
},
{
title:this.$t('TextStatus'),
title: this.$t('TextStatus'),
key: 'fileType_dictText',
align:"center",
align: 'center',
dataIndex: 'fileType_dictText',
ellipsis: true,
},
ellipsis: true
}
],
file:'',
form:{},
rules:{
file:[
{ required: true, message: this.$t('pleaseUploadFile'), trigger: 'change' },
],
file: '',
form: {},
rules: {
file: [
{ required: true, message: this.$t('pleaseUploadFile'), trigger: 'change' }
]
},
spinning:false, //loading标识
type:'pdfdoc',
url:{
spinning: false, //loading标识
type: 'pdfdoc',
url: {
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //表格头部字段
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //搜索字段
tableList: 'split/sarFileSplitInfo/splitResultPageInfo', //表格数据
tableList: 'split/sarFileSplitInfo/splitResultPageInfo' //表格数据
},
OperationList:[],
upload1:this.$t('upload1'),
OperationList: [],
upload1: this.$t('upload1'),
// accept:'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword',
accept:'application/x-zip-compressed,application/zip',
rows:[],
token:Vue.ls.get(ACCESS_TOKEN),
flag:false, //提交表单标识
cut:'',
preErrVisible:false,
errValue:'',
titleItem: '', // 错误标题
accept: 'application/x-zip-compressed,application/zip',
rows: [],
token: Vue.ls.get(ACCESS_TOKEN),
flag: false, //提交表单标识
cut: '',
preErrVisible: false,
errValue: '',
titleItem: '' // 错误标题
}
},
props:{
importsVisible:Boolean
props: {
importsVisible: Boolean
},
watch:{
'form.file'(val){
watch: {
'form.file'(val) {
// console.log('val111',val)
},
}
},
mounted() {
this.visible=this.importsVisible
this.visible = this.importsVisible
let long = localStorage.getItem('language')
this.cut = ''
if (long && long === 'zh-cn') {
@@ -167,63 +175,61 @@
}
// console.log('visibleSplit',this.visible)
},
methods:{
methods: {
//获取列表数据
loadData(){
this.spinning=true
let params={
loadData() {
this.spinning = true
let params = {}
getAction(``, params).then(res => {
}
getAction(``,params).then(res=>{
}).finally(()=>{
this.spinning=false
}).finally(() => {
this.spinning = false
})
},
afterVisibleChange(val) {
// console.log('visible', val);
},
onClose() {
this.visible = false;
this.$emit('visible',false)
this.visible = false
this.$emit('visible', false)
},
onSelectChange(keys,rows){
onSelectChange(keys, rows) {
// console.log('keys',keys,rows)
this.selectedRowKeys=keys
this.rows=rows
this.selectedRowKeys = keys
this.rows = rows
},
//搜索
searchQuery(){
searchQuery() {
},
//清空
searchReset(){
searchReset() {
},
//点击页数
onChangePage(page,pageSize){
onChangePage(page, pageSize) {
this.queryParams.pageNo = page
this.loadData()
},
//一页显示条数
SizeChange(page,pageSize){
SizeChange(page, pageSize) {
this.queryParams.pageSize = pageSize
this.queryParams.pageNo = 1
this.loadData()
},
cancleImports(){
this.$emit('visible',false)
cancleImports() {
this.$emit('visible', false)
},
fileUpload(){
this.$refs.uploadFile.visible=true
fileUpload() {
this.$refs.uploadFile.visible = true
},
//上传文件
uploadSuccess(data) {
// console.log('updata',data)
let attIdList = []
if(data && data.length>0) {
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
@@ -234,72 +240,76 @@
},
//模板下载
downLoad(){
let name = this.$t('documentSplitTemplate')+'.xls'
downloadFile('split/sarFileSplitItems/exportTemplate',name, {})
downLoad() {
let name = this.$t('documentSplitTemplate') + '.xlsx'
downloadFile('split/sarFileSplitItems/exportTemplate', name, {})
},
//保存
handleSubmit(){
handleSubmit() {
// console.log('seleced',this.selectedRowKeys,this.rows)
// console.log('this.form.file,',this.form.file)
if(this.rows.length===0){
if (this.rows.length === 0) {
this.$message.warning(this.$t('PleaseSelectData'))
}else if(this.rows&&this.rows.length>1){
} else if (this.rows && this.rows.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
}else if(!this.form.file) {
} else if (!this.form.file) {
this.$message.warning(this.$t('pleaseUploadSplitFile'))
}else if(this.rows&&this.rows.length===1){
let params={
connectId:this.rows[0].connect_id,
splitFileId:this.form.file,
fileName:this.rows[0].file_name,
serialNumber:this.rows[0].serial_number,
title:this.rows[0].title,
titleEn:this.rows[0].title_en,
} else if (this.rows && this.rows.length === 1) {
let params = {
connectId: this.rows[0].connect_id,
splitFileId: this.form.file,
fileName: this.rows[0].file_name,
serialNumber: this.rows[0].serial_number,
title: this.rows[0].title,
titleEn: this.rows[0].title_en
}
params.fileType=this.rows[0].text_info_id
params.cut=this.cut
params.fileType = this.rows[0].text_info_id
params.cut = this.cut
let formData = new FormData()
Object.keys(params).forEach((key) => {
// console.log('key',key,params[key])
formData.append(key, params[key]);
});
formData.append(key, params[key])
})
// console.log('formData',params,formData.getAll)
if(this.form.file) {
if (this.form.file) {
// this.$refs.ruleForm.validate(valid => {
// if (valid) {
if (!this.flag) {
this.flag = true
axios({
url: '/jero-boot/split/sarFileSplitItems/importSplitResult',
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data',
// 'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': this.token
}
}).then(res => {
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
this.visible = false;
this.$emit('visible',false)
}else{
// this.$message.warning(res.data.message)
if(res.data.code==1){
this.$message.error(res.data.message);
}else{
this.titleItem = '失败'
this.preErrVisible=true
this.errValue=res.data.message
}
}
}).finally(() => [
this.flag = false
])
if (!this.flag) {
this.flag = true
this.loading = true
axios({
url: '/jero-boot/split/sarFileSplitItems/importSplitResult',
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data',
// 'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': this.token
}
}).then(res => {
if (res.data.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchGetData')
this.visible = false
this.loading = false
this.$emit('visible', false)
} else {
this.loading = false
// this.$message.warning(res.data.message)
if (res.data.code == 1) {
this.$message.error(res.data.message)
} else {
this.titleItem = '失败'
this.preErrVisible = true
this.errValue = res.data.message
}
}
}).finally(() => {
this.flag = false
this.loading = false
})
}
// }
// })
}
@@ -331,42 +341,47 @@
// }
}
},
handleErrCancel(){
this.preErrVisible=false
},
handleErrCancel() {
this.preErrVisible = false
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.imports-table-content{
.imports-header{
.imports-table-content {
.imports-header {
margin-bottom: 20px;
}
}
.imports-table-detail{
.page{
.imports-table-detail {
.page {
margin: 20px 0;
text-align: right;
}
}
.imports-files{
.imports-files {
position: relative;
margin:20px 0;
.file-down{
margin: 20px 0;
.file-down {
position: absolute;
left: 320px;
top: 5px;
}
}
.imports-footer{
.imports-footer-wrap{
margin:20px 0;
.imports-footer {
.imports-footer-wrap {
margin: 20px 0;
text-align: center;
.imports-sub{
.imports-sub {
margin-right: 20px;
}
}
@@ -375,21 +390,23 @@
<style lang="less">
.imports-table-content {
.imports-header {
.ant-col-sm-24{
.ant-col-sm-24 {
display: flex;
}
}
}
.imports-table-drawer{
.table-operator{
display: flex;
justify-content: end;
text-align: right;
margin-bottom: 20px;
span{
color:#040B29;
.imports-table-drawer {
.table-operator {
display: flex;
justify-content: end;
text-align: right;
margin-bottom: 20px;
span {
color: #040B29;
}
}
}
}
</style>
@@ -48,6 +48,7 @@
<a-input-number class="box-input"
:placeholder="$t('PleaseEnter')+item.db_field_txt"
:disabled="disabled"
:min="0"
v-model="formInline[item.db_field_name]" :max="99999999"/>
</a-form-model-item>
</div>
@@ -774,7 +775,7 @@
info_id: this.infoId,
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
this.$emit('sumber')
}else{
@@ -723,7 +723,7 @@
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
} else {
this.$message.warning(this.$t('operationFailed'))
@@ -771,7 +771,7 @@
}
this.loadMenuData()
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
}
let attIdList = []
if (data && data.length > 0) {
@@ -819,7 +819,7 @@
},
//模板下载
handleDownManage() {
let name = this.$t('documentSplitTemplate') + '.xls'
let name = this.$t('documentSplitTemplate') + '.xlsx'
downloadFile('split/sarFileSplitItems/exportTemplate', name, {})
},
//合并条款
@@ -853,7 +853,7 @@
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
this.selectedRowKeys = []
} else {
@@ -895,7 +895,7 @@
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
},
//批量删除
handleBatCancel() {
@@ -934,7 +934,7 @@
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
this.selectClear()
// eventBUs.$emit('searchReset')
} else {
@@ -1004,7 +1004,7 @@
info_id: this.infoId
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(queryParam)))
eventBUs.$emit('searchGetData', JSON.parse(JSON.stringify(queryParam)))
// eventBUs.$emit('searchReset')
} else {
this.$message.warning(this.$t('operationFailed'))
@@ -1,76 +1,81 @@
<template>
<div class="split">
<a-drawer
class="split-table-drawer"
:title="$t('SplitText')"
placement="right"
:visible="visible"
:after-visible-change="afterVisibleChange"
@close="onClose"
width="1100"
>
<div class="split-table-content">
<div class="split-header">
<searchAlone :url="url" :flag="'condition'"></searchAlone>
</div>
<div class="split">
<a-drawer
class="split-table-drawer"
:title="$t('SplitText')"
placement="right"
:visible="visible"
@close="onClose"
width="1100"
>
<div class="split-table-content">
<div class="split-header">
<searchAlone :url="url" :flag="'condition'"></searchAlone>
</div>
<div class="table-operator operator-select">
<div class="operator-text">
<!-- <a-icon type="download" />-->
<!-- 模板下载-->
</div>
<div class="table-operator operator-select">
<div class="operator-text">
<!-- <a-icon type="download" />-->
<!-- 模板下载-->
<div class="operator-select-type">
<span class="operator-file-type"><i class="operator-i">*</i>{{$t('fileType')}}</span>
<a-select v-model="fileGroup" style='min-width: 295px' :placeholder="$t('selectFileType')" class="file-type-select">
<a-select-option value="GSO" key="GSO" :title="$t('GSO')">
{{$t('GSO')}}
</a-select-option>
<a-select-option value="KMVSS_Table" key="KMVSS_Table" :title="$t('KMVSS_Table')">
{{$t('KMVSS_Table')}}
</a-select-option>
<a-select-option value="KMVSS_Article" key="KMVSS_Article" :title="$t('KMVSS_Article')">
{{$t('KMVSS_Article')}}
</a-select-option>
<a-select-option value="CFR" key="CFR" :title="$t('CFR')">
{{$t('CFR')}}
</a-select-option>
<a-select-option value="UNECE" key="UNECE" :title="$t('UNECE')">
{{$t('UNECE')}}
</a-select-option>
<a-select-option value="JPN_Attachment" key="JPN_Attachment" :title="$t('JPN_Attachment')">
{{$t('JPN_Attachment')}}
</a-select-option>
<a-select-option value="JPN_Article" key="JPN_Article" :title="$t('JPN_Article')">
{{$t('JPN_Article')}}
</a-select-option>
<a-select-option value="GB" key="GB" :title="$t('GB')">
{{$t('GB')}}
</a-select-option>
<a-select-option value="GBT" key="GBT" :title="$t('GBT')">
{{$t('GBT')}}
</a-select-option>
</a-select>
</div>
<div class="operator-select-type">
<span class="operator-file-type"><i class="operator-i">*</i>{{$t('fileType')}}</span>
<a-select v-model="fileGroup" style='min-width: 295px' :placeholder="$t('selectFileType')"
class="file-type-select">
<a-select-option value="GSO" key="GSO" :title="$t('GSO')">
{{$t('GSO')}}
</a-select-option>
<a-select-option value="KMVSS_Table" key="KMVSS_Table" :title="$t('KMVSS_Table')">
{{$t('KMVSS_Table')}}
</a-select-option>
<a-select-option value="KMVSS_Article" key="KMVSS_Article" :title="$t('KMVSS_Article')">
{{$t('KMVSS_Article')}}
</a-select-option>
<a-select-option value="CFR" key="CFR" :title="$t('CFR')">
{{$t('CFR')}}
</a-select-option>
<a-select-option value="UNECE" key="UNECE" :title="$t('UNECE')">
{{$t('UNECE')}}
</a-select-option>
<a-select-option value="JPN_Attachment" key="JPN_Attachment" :title="$t('JPN_Attachment')">
{{$t('JPN_Attachment')}}
</a-select-option>
<a-select-option value="JPN_Article" key="JPN_Article" :title="$t('JPN_Article')">
{{$t('JPN_Article')}}
</a-select-option>
<a-select-option value="GB" key="GB" :title="$t('GB')">
{{$t('GB')}}
</a-select-option>
<a-select-option value="GBT" key="GBT" :title="$t('GBT')">
{{$t('GBT')}}
</a-select-option>
</a-select>
</div>
</div>
<div class="split-table-detail">
<tableData
:flag="'header'"
:url="url"
:type="type"
:showAction="false"
:OperationList="OperationList"
@onSelectChange="onSelectChange"
/>
</div>
<div class="split-table-detail">
<tableData
:flag="'header'"
:url="url"
:type="type"
:showAction="false"
:OperationList="OperationList"
@onSelectChange="onSelectChange"
/>
</div>
<div class="split-footer" style='display: flex;justify-content: flex-end'>
<div class="split-footer-wrap">
<a-button class="split-btn" type="primary" @click="cancelSplit"
style='background-color: #f5222d;border: none;margin-right: 15px'>{{$t('cancel')}}
</a-button>
<a-button class="split-btn split-chai" type="primary" @click="submitSplit"
v-has="'split:sarFileSplitInfo:add'">{{$t('submit')}}
</a-button>
</div>
<div class="split-footer" style='display: flex;justify-content: flex-end'>
<div class="split-footer-wrap">
<a-button class="split-btn" type="primary" @click="cancelSplit" style='background-color: #f5222d;border: none;margin-right: 15px'>{{$t('cancel')}}</a-button>
<a-button class="split-btn split-chai" type="primary" @click="submitSplit" v-has="'split:sarFileSplitInfo:add'">{{$t('submit')}}</a-button>
</div>
</div>
</a-drawer>
</div>
</div>
<JLoading :loading="loading">{{$t('Submitting')}}</JLoading>
</a-drawer>
</div>
</template>
<script>
@@ -85,203 +90,210 @@
export default {
name: 'split',
components:{
components: {
SearchAlone,
TableData,
TableData
},
data(){
return{
visible:false,
fileGroup:'',
tableSource:[], //列表数据
selectedRowKeys:[],
queryParams:{
pageNo:1,
pageSize:10
data() {
return {
visible: false,
loading: false,
fileGroup: '',
tableSource: [], //列表数据
selectedRowKeys: [],
queryParams: {
pageNo: 1,
pageSize: 10
}, //搜索条件
total:0,
total: 0,
columns: [
{
title:this.$t('standard'),
title: this.$t('standard'),
key: 'standNumber',
align:"center",
align: 'center',
dataIndex: 'standNumber',
ellipsis: true,
ellipsis: true
},
{
title:this.$t('title'),
title: this.$t('title'),
key: 'standName',
align:"center",
align: 'center',
dataIndex: 'standName',
ellipsis: true,
ellipsis: true
},
{
title:this.$t('fileName'),
title: this.$t('fileName'),
key: 'fileName',
align:"center",
align: 'center',
dataIndex: 'fileName',
ellipsis: true,
ellipsis: true
},
{
title:this.$t('TextStatus'),
title: this.$t('TextStatus'),
key: 'fileType_dictText',
align:"center",
align: 'center',
dataIndex: 'fileType_dictText',
ellipsis: true,
},
ellipsis: true
}
],
spinning:false, //loading标识
url:{
spinning: false, //loading标识
url: {
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //表格头部字段
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //搜索字段
tableList: 'split/sarFileSplitInfo/splitFilePageInfo', //表格数据
tableList: 'split/sarFileSplitInfo/splitFilePageInfo' //表格数据
},
type:'pdfdoc',
OperationList:[],
token:Vue.ls.get(ACCESS_TOKEN),
cut:'',
submitFlag:false
type: 'pdfdoc',
OperationList: [],
token: Vue.ls.get(ACCESS_TOKEN),
cut: '',
submitFlag: false
}
},
props:{
splitVisible:{
type:Boolean,
default:false
},
props: {
splitVisible: {
type: Boolean,
default: false
}
},
mounted() {
this.visible=this.splitVisible
this.visible = this.splitVisible
// console.log('visibleSplit',this.visible)
},
methods:{
methods: {
//获取列表数据
loadData(){
this.spinning=true
let params={
loadData() {
this.spinning = true
let params = {}
getAction(``, params).then(res => {
}
getAction(``,params).then(res=>{
}).finally(()=>{
this.spinning=false
}).finally(() => {
this.spinning = false
})
},
afterVisibleChange(val) {
console.log('visible', val);
console.log('visible', val)
},
onClose() {
this.visible = false;
this.$emit('visible',false)
this.visible = false
this.$emit('visible', false)
},
onSelectChange(keys,rows){
this.selectedRowKeys=keys
if(keys.length>1){
onSelectChange(keys, rows) {
this.selectedRowKeys = keys
if (keys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
}else{
this.rowId=keys[0]
} else {
this.rowId = keys[0]
}
this.rows=[...rows]
this.rows = [...rows]
},
//搜索
searchQuery(){
searchQuery() {
},
//清空
searchReset(){
searchReset() {
},
//点击页数
onChangePage(page,pageSize){
onChangePage(page, pageSize) {
this.queryParams.pageNo = page
this.loadData()
},
//一页显示条数
SizeChange(page,pageSize){
SizeChange(page, pageSize) {
this.queryParams.pageSize = pageSize
this.queryParams.pageNo = 1
this.loadData()
},
cancelSplit(){
this.$emit('visible',false)
cancelSplit() {
this.visible = false
this.$emit('visible', false)
},
//拆分
submitSplit(){
if(this.fileGroup.length == 0||this.fileGroup==undefined){
submitSplit() {
if (this.fileGroup.length == 0 || this.fileGroup == undefined) {
this.$message.warning(this.$t('selectFileType'))
}else if(this.rows&&this.rows.length>1){
} else if (this.rows && this.rows.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
}else if(this.rows==undefined||this.rows.length===0){
} else if (this.rows == undefined || this.rows.length === 0) {
this.$message.warning(this.$t('selectLeastOne'))
}else if(this.rows&&this.rows.length==1) {
} else if (this.rows && this.rows.length == 1) {
let file = this.rows[0]
if (file.file_name) {
let name = file.file_name.split('.')
let nameSuffix = name[name.length - 1]
if(this.fileGroup === 'GSO') {
if (nameSuffix.toLowerCase() === 'doc'||nameSuffix.toLowerCase() === 'docx'||nameSuffix.toLowerCase() === 'pdf') {
if (this.fileGroup === 'GSO') {
if (nameSuffix.toLowerCase() === 'doc' || nameSuffix.toLowerCase() === 'docx' || nameSuffix.toLowerCase() === 'pdf') {
let params = {
attId: file.id,
title: file.title,
titleEn:file.title_en,
fileName:file.file_name,
titleEn: file.title_en,
fileName: file.file_name,
serialNumber: file.serial_number,
connectId: file.connect_id,
fileGroup: this.fileGroup,
fileType:file.text_info_id
fileType: file.text_info_id
}
if(!this.submitFlag){
this.submitFlag=true
if (!this.submitFlag) {
this.submitFlag = true
this.loading = true
postAction(`split/sarFileSplitInfo/add`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
this.visible = false;
eventBUs.$emit('searchGetData')
this.visible = false
this.loading = false
this.$emit('visible', false)
} else {
this.loading = false
this.$message.warning(res.message)
}
}).finally(()=>{
this.submitFlag =false
}).finally(() => {
this.loading = false
this.submitFlag = false
})
this.$emit('exportVisible',true)
this.$emit('exportVisible', true)
}
} else {
this.$message.warning(this.$t('OnlyWord'))
}
} else {
if (nameSuffix.toLowerCase() === 'doc'||nameSuffix.toLowerCase() === 'docx') {
if (nameSuffix.toLowerCase() === 'doc' || nameSuffix.toLowerCase() === 'docx') {
let params = {
attId: file.id,
title: file.title,
fileName:file.file_name,
titleEn:file.title_en,
fileName: file.file_name,
titleEn: file.title_en,
serialNumber: file.serial_number,
connectId: file.connect_id,
fileGroup: this.fileGroup,
fileType:file.text_info_id
fileType: file.text_info_id
}
if(!this.submitFlag){
this.submitFlag=true
if (!this.submitFlag) {
this.submitFlag = true
this.loading = true
postAction(`split/sarFileSplitInfo/add`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
this.visible = false;
eventBUs.$emit('searchGetData')
this.visible = false
this.loading = false
this.$emit('visible', false)
} else {
this.loading = false
this.$message.warning(res.message)
}
}).finally(()=>{
this.submitFlag =false
}).finally(() => {
this.submitFlag = false
this.loading = false
})
this.$emit('exportVisible',true)
this.$emit('exportVisible', true)
}
} else {
this.$message.warning(this.$t('OnlyWordItem'))
@@ -291,59 +303,66 @@
}
}
}
}
</script>
<style lang="less" scoped>
.split-table-content{
.split-header{
margin-bottom: 20px;
.split-item{
display: flex;
}
.split-table-content {
.split-header {
margin-bottom: 20px;
.split-item {
display: flex;
}
}
.split-table-detail{
.page{
}
}
.split-table-detail {
.page {
margin: 20px 0;
text-align: right;
}
}
.split-footer{
.split-footer-wrap{
margin:20px 0;
.split-footer {
.split-footer-wrap {
margin: 20px 0;
text-align: center;
.split-chai{
.split-chai {
margin-right: 20px;
}
}
}
.operator-select{
.operator-select {
margin-bottom: 20px;
/*margin-left: 60px;*/
.operator-file-type{
.operator-file-type {
/*width: 100px;*/
min-width: 110px;
text-align: right;
line-height: 32px;
display: inline-block;
margin-right: 16px;
.operator-i{
.operator-i {
display: inline-block;
width: 10px;
height: 38px;
line-height: 38px;
text-align: center;
color:#f5222d;
color: #f5222d;
}
}
.operator-select-type{
.operator-select-type {
display: flex;
justify-content: start;
.file-type-select{
.file-type-select {
min-width: 120px;
}
@@ -354,15 +373,17 @@
<style lang="less">
.split-table-content {
.split-header {
.ant-col-sm-24{
.ant-col-sm-24 {
display: flex;
}
}
}
.operator-select-type{
.ant-select-selection{
.operator-select-type {
.ant-select-selection {
height: 38px;
.ant-select-selection__rendered{
.ant-select-selection__rendered {
height: 38px;
line-height: 38px;
}
@@ -196,6 +196,11 @@
getAction(`sys/dictItem/page`, params).then(res => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.queryParams.pageNo = 1
this.loadData()
return
}
this.total = res.result.total
this.tableData = [...res.result.records]
this.dataFlag = true
@@ -210,6 +215,11 @@
sysDictId: this.record.id,
isTagDict: 1
}).then(res => {
if (res.result.current > 1 && res.result.records.length == 0) {
this.queryParams.pageNo = 1
this.loadData()
return
}
this.tabletreeDataSource = [...res.result.records]
this.total = res.result.total
let data = this.toTree(this.tabletreeDataSource)
@@ -88,7 +88,7 @@
show-size-changer
:page-size.sync="queryParams.pageSize"
:total="total"
:current="pageNo"
:current="queryParams.pageNo"
@change="onChangePage"
@showSizeChange="SizeChange"
/>
@@ -233,12 +233,21 @@
// sys/dict/page
postAction(`sys/dict/tagDictPage`, params).then(res => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.queryParams.pageNo = 1
this.loadData()
return
}
this.loading = false
this.total = res.result.total
this.tableData = [...res.result.records]
}else{
this.loading = false
}
}).finally(() => {
this.loading = false
})
// .finally(() => {
// this.loading = false
//})
},
//查询
searchQuery() {
@@ -260,7 +269,7 @@
},
hideModal() {
this.form.dictName = this.form.dictName.trim()
if (this.form.description){
if (this.form.description) {
this.form.description = this.form.description.trim()
}
let params = {
@@ -305,6 +305,16 @@
}
postAction(`tag/onlCgformTag/page`, paramsItem).then(res => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
if (this.key == 1) {
this.queryParamOne.pageNo = 1
this.loadData(1)
} else if (this.key == 2) {
this.queryParamTwo.pageNo = 1
this.loadData(0)
}
return
}
this.total = res.result.total
this.tableData = [...res.result.records]
this.spinning = false
@@ -65,10 +65,10 @@
<a-tab-pane :key="$t('whole')" :tab="$t('whole')"></a-tab-pane>
<a-tab-pane :key="$t('DocumentLibrary')" :tab="$t('DocumentLibrary')" force-render>
</a-tab-pane>
<!-- <a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')" force-render>-->
<!-- </a-tab-pane>-->
<!-- <a-tab-pane :key="$t('monthlyReportRegulations')" :tab="$t('monthlyReportRegulations')" force-render>-->
<!-- </a-tab-pane>-->
<a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')" force-render>
</a-tab-pane>
<a-tab-pane :key="$t('monthlyReportRegulations')" :tab="$t('monthlyReportRegulations')" force-render>
</a-tab-pane>
</a-tabs>
</div>
</div>
+2 -2
View File
@@ -733,11 +733,11 @@ export default {
// console.log('parms',params)
putAction(`extRepo/extRepoFolder/edit`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.$message.success(res.message)
this.form = {}
this.loadMenuData()
} else {
this.$message.warning(this.$t('operationFailed'))
this.$message.warning(res.message)
}
}).finally(() => {
this.flag = false
@@ -10,7 +10,7 @@
ref="table"
:loading="loading"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:columns="columns"
>
@@ -41,31 +41,36 @@
title: this.$t('OperationContent'),
dataIndex: 'taskDefinitionKeyName',
align: 'center',
width: '20%'
width: '20%',
ellipsis: true
},
{
title: this.$t('opinion'),
dataIndex: 'approvalOpinion',
align: 'center',
width: '20%'
width: '20%',
ellipsis: true
},
{
title: this.$t('Operator'),
dataIndex: 'createBy',
align: 'center',
width: '20%'
width: '20%',
ellipsis: true
},
{
title: this.$t('role'),
dataIndex: 'operatorRoleName',
align: 'center',
width: '20%'
width: '20%',
ellipsis: true
},
{
title: this.$t('OperationTime'),
dataIndex: 'createTime',
align: 'center',
width: '20%',
ellipsis: true,
customRender: function(t, r, index) {
return moment(t).format('YYYY-MM-DD HH:mm:ss')
}
@@ -187,7 +187,7 @@
let json = Object.assign(this.queryBy, { handlingTime: handlingTime }, value)
let data = JSON.stringify(json).replace(/\"/g, '\'')
Object.keys(data).forEach(res => {
if (data[res] && data[res] instanceof String) {
if (data[res] && typeof data[res] == 'string') {
data[res] = data[res].replace(/\"/g, '“')
data[res] = data[res].replace(/\'/g, '')
}
@@ -13,7 +13,8 @@
</div>
<div class="action-bar">
</div>
<regulatoryCirculationHistory v-if="$route.query.prcType == '5' || $route.query.prcType == '6'"/>
<regulatoryCirculationHistory :isTrue="isTrue"
v-if="$route.query.prcType == '5' || $route.query.prcType == '6'"/>
<circulationHistory v-else/>
</div>
</template>
@@ -33,7 +34,8 @@
},
data() {
return {
processStep: null
processStep: null,
isTrue: false
}
},
created() {
@@ -41,6 +43,11 @@
},
mounted() {
this.processNum()
if (this.$route.query.prcType == '6') {
this.isTrue = true
} else {
this.isTrue = false
}
},
methods: {
back() {
@@ -81,9 +81,11 @@
<!-- {{ $t('batSetting') }}-->
<!-- </div>-->
<div @click="BatchMaintenanceProgress" class="operator-text">
<a-icon type="setting"/>
{{$t('BatchMaintenanceProgress')}}
</div>
<div @click="BatchChangeStatus" class="operator-text">
<a-icon type="setting"/>
{{$t('BatchChangeStatus')}}
</div>
<div @click="CertificationDirectory" class="operator-text">
@@ -804,6 +804,49 @@
</div>
</a-col>
</a-row>
<div class="header-text" v-if="rejectCauseList && rejectCauseList.length > 0">
{{$t('reasonsForRejection')}}
</div>
<div v-if="rejectCauseList && rejectCauseList.length > 0"
v-for="(item,index) in rejectCauseList">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectedBy')">{{$t('rejectedBy')}}</span>
</div>
<div class="itemModel-reject">
{{item.createBy ? item.createBy : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectionTime')">{{$t('rejectionTime')}}</span>
</div>
<div class="itemModel-reject">
{{item.rejectTime ? item.rejectTime : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectReason')">{{$t('rejectReason')}}</span>
</div>
<div class="itemModel-reject">
{{item.rejectCause ? item.rejectCause : '--'}}
</div>
</div>
</a-col>
</a-row>
</div>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -907,7 +950,8 @@
verifyDutyIdDisabled: false,
verifyInitiatorIdDisabled: false,
DeliverableTreeList: [],
userInfoQuery: {}
userInfoQuery: {},
rejectCauseList: []
}
},
mounted() {
@@ -916,6 +960,18 @@
},
methods: {
...mapGetters(['userInfo']),
getRejectCause(id) {
let query = {
projectLawsInventoryId: id
}
getAction('/project/projectLawsInventoryRejectCauseEO/list', query).then((res) => {
if (res.success) {
this.rejectCauseList = res.result
} else {
this.rejectCauseList = []
}
})
},
getDeliverableTree() {
getAction('/sys/category/getDeliverableTree', {}).then((res) => {
if (res.success) {
@@ -1110,6 +1166,7 @@
item.designDeliverableType = item.designDeliverableType ? item.designDeliverableType.split(',') : []
item.prehomoDeliverableType = item.prehomoDeliverableType ? item.prehomoDeliverableType.split(',') : []
item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : []
this.getRejectCause(item.id)
if (item.dutyTerritory) {
this.queryPersonByProject(item)
} else {
@@ -1400,6 +1457,15 @@
margin-top: 2px;
}
.itemModel-reject {
width: calc(100% - 130px);
display: inline-block;
font-size: 16px;
word-break: break-all;
color: #040B29;
padding-top: 11px;
}
.Required {
color: red;
margin-right: 4px;
@@ -220,6 +220,11 @@
@click="edit(record)">
{{ $t('edit') }}
</a>
<a class="text-operation"
v-else
@click="viewClick(record)">
{{$t('view')}}
</a>
<a class="text-operation"
v-if="(record.inventoryAffirmStatus == 'Not started' || record.inventoryAffirmStatus == 'Rejected') && record.roleCode == 0"
@click="deleteLib(record)">
@@ -229,10 +234,13 @@
@click="resultReportedClick(record)">
{{$t('resultReported')}}
</a>
<a class="text-operation"
@click="viewClick(record)">
</span>
<span slot="operationOne" slot-scope="text,record">
<a class="text-operation"
@click="viewClick(record)">
{{$t('view')}}
</a>
</a>
</span>
<span slot="titleName" slot-scope="text,record" :title="text">
<span class="textName">
@@ -745,6 +753,13 @@
fixed: 'right',
width: 240,
scopedSlots: { customRender: 'operation' }
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 140,
scopedSlots: { customRender: 'operationOne' }
}
],
columnsFileAll: [
@@ -1014,7 +1029,14 @@
let columnResult = JSON.parse(JSON.stringify(this.columnsAll))
if (!this.isRoleSwitching) {
for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('operation')) {
if (columnResult[i].title === this.$t('operation') && columnResult[i].width == 240) {
columnResult.splice(i, 1)
i--
}
}
} else if (this.isRoleSwitching) {
for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('operation') && columnResult[i].width == 140) {
columnResult.splice(i, 1)
i--
}
@@ -2019,15 +2041,18 @@
if (valid) {
let url = '/project/projectCommentEO/add'
let content = []
let ids = []
if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) {
this.rowKeysSuccessList.forEach(res => {
content.push(res.serialNumber)
ids.push(res.id)
})
}
let query = {
commentContent: this.$t('For') + content.join(',') + this.$t('markedRejection') + '' + this.formInlineComment.commentContent,
projectLibraryId: this.$route.query.id
}
this.rejectCauseAdd(this.formInlineComment.commentContent,ids)
this.confirmLoadingComment = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.updateStatusBatch(1, selectedRowKeys)
@@ -2042,6 +2067,19 @@
}
})
},
rejectCauseAdd(rejectCause,ids) {
let rejectTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
let query = {
rejectUserId:this.userInfo().id,
rejectTime:rejectTime,
rejectCause:rejectCause,
projectLawsInventoryId:ids.join(','),
rejectType:'0',
}
postAction('/project/projectLawsInventoryRejectCauseEO/add', query).then((res) => {
})
},
handleCancelComment() {
this.visibleComment = false
},
@@ -2368,7 +2406,7 @@
}
::v-deep .ant-table-row:first-child {
background: #fff!important;
background: #fff !important;
opacity: 0.9;
}
@@ -433,46 +433,49 @@
</div>
</a-col>
</a-row>
<!-- <div class="header-text">-->
<!-- {{$t('reasonsForRejection')}}-->
<!-- </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('rejectedBy')">{{$t('rejectedBy')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.verifyRemark ? formInline.verifyRemark : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('rejectionTime')">{{$t('rejectionTime')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.verifyRemark ? formInline.verifyRemark : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('rejectReason')">{{$t('rejectReason')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.verifyRemark ? formInline.verifyRemark : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<div class="header-text" v-if="rejectCauseList && rejectCauseList.length > 0">
{{$t('reasonsForRejection')}}
</div>
<div v-if="rejectCauseList && rejectCauseList.length > 0"
v-for="(item,index) in rejectCauseList">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectedBy')">{{$t('rejectedBy')}}</span>
</div>
<div class="itemModel">
{{item.createBy ? item.createBy : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectionTime')">{{$t('rejectionTime')}}</span>
</div>
<div class="itemModel">
{{item.rejectTime ? item.rejectTime : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectReason')">{{$t('rejectReason')}}</span>
</div>
<div class="itemModel">
{{item.rejectCause ? item.rejectCause : '--'}}
</div>
</div>
</a-col>
</a-row>
</div>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -486,7 +489,7 @@
<script>
import viewFileModel from '@/components/viewFileModel/index'
import { getAction, postAction, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
@@ -503,7 +506,8 @@
rulesData: {},
formInline: {},
disabled: false,
userInfoQuery: {}
userInfoQuery: {},
rejectCauseList:[]
}
},
mounted() {
@@ -514,8 +518,21 @@
editModel(item) {
this.visible = true
this.formInline = item
this.getRejectCause(item.id)
this.formInline = { ...this.formInline }
},
getRejectCause(id) {
let query = {
projectLawsInventoryId: id
}
getAction('/project/projectLawsInventoryRejectCauseEO/list', query).then((res) => {
if (res.success) {
this.rejectCauseList = res.result
} else {
this.rejectCauseList = []
}
})
},
handleCancel() {
this.visible = false
},
@@ -550,7 +567,7 @@
width: calc(100% - 130px);
display: inline-block;
font-size: 16px;
word-break: break-word;
word-break: break-all;
color: #040B29;
}
@@ -234,7 +234,13 @@
handleCompare() {
if (this.selectedRowKeys.length > 0) {
this.$nextTick(() => {
this.$refs.libraryPushRef.getPush(JSON.parse(JSON.stringify(this.selectedRowKeys)))
let flag = ''
if (this.activeTab == this.$t('ImplementationDate')) {
flag = 1
} else {
flag = 2
}
this.$refs.libraryPushRef.getPush(JSON.parse(JSON.stringify(this.selectedRowKeys)),flag)
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
@@ -267,32 +273,36 @@
},
clearSelected() {
let startTime = moment(new Date()).format('YYYY-MM-DD')
let endTime = this.haflYear()
let endTime = this.getNowdate()
this.searchParmes['WarnTime'] = [startTime, endTime]
this.searchParmes = { ...this.searchParmes }
this.pageNo = 1
this.getList()
},
haflYear() {
// 获取当前时间
var curDate = (new Date()).getTime()
// 将半年的时间单位换算成毫秒
var halfYear = 365 / 2 * 24 * 3600 * 1000
// 半年前的时间毫秒单位
var pastResult = curDate + halfYear
// 日期函数定义起点为半年前
var pastDate = new Date(pastResult)
var pastYear = pastDate.getFullYear()
var pastMonth = pastDate.getMonth() + 1
var pastDay = pastDate.getDate()
if (pastMonth >= 1 && pastMonth <= 9) {
pastMonth = '0' + pastMonth
getNowdate(){
var date_now = new Date()//获取当前时间
var year = date_now.getFullYear()//获取当前时间的年份
var month = date_now.getMonth()//获取当前时间的月份
var day = date_now.getDate()//获取当前时间的日
var days = new Date(year,month,0)//将获取到的年月赋值给days
days = days.getDate()//获取当前年月的日
var year2 = year
var month2 = parseInt(month+7)//获取当前月份的1一个月以后的月份
if(month2 > 12){
year2 = parseInt(year2) + 1
month2 = parseInt(month2) % 12
}//考虑到12月要是获取一个月以后就是一月年份需要加一 一年没有13月所以%12取得来年1月
var day2 = day
var days2 = new Date(year2,month2,0)
days2 = days2.getDate()
if(day2>days2){
day2 = days2
}//获取了当前年份的日和6个月以后的日为的就是判断如果前一个月是有31号后一个月没有就将一个月以后的日期取到赋值给day2
if(month2 < 10){
month2 = '0' + month2
}
if (pastDay >= 0 && pastDay <= 9) {
pastDay = '0' + pastDay
}
var endDate = pastYear + '-' + pastMonth + '-' + (pastDay + 1)
return endDate
var time = year2 + '-' + month2 + '-' + day2
return time
},
pageOnChange(page) {
this.pageNo = page
@@ -119,6 +119,8 @@
'17':this.$t('listConfirmation'),
'18':this.$t('taskAffirm'),
'19':this.$t('complianceConfirmation'),
'20':this.$t('collectionLegislativeComments'),
'21':this.$t('regulatoryAndTechnicalAssessment'),
},
columns: [
{