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

This commit is contained in:
gaosong
2022-08-08 17:49:01 +08:00
34 changed files with 1093 additions and 134 deletions
@@ -827,6 +827,12 @@ CREATE TABLE `sar_file_compare_res_comment` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- 法规技术评估-条款信息评估结果表 字段增加长度 2022-08-08
ALTER TABLE `laws_weilai`.`laws_technology_evaluation_item_result`
MODIFY COLUMN `technical_file_name` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '技术文件名称' AFTER `evaluation_methods`,
MODIFY COLUMN `section` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '章节' AFTER `technical_file_name`;
-- 问题知识库 字段长度修改 2022-08-08
ALTER TABLE `laws_weilai`.`problem_knowledge_base`
MODIFY COLUMN `buss_document_library_id` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文档库id' AFTER `target_market`,
MODIFY COLUMN `stand_number` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准编号' AFTER `buss_document_library_id`,
MODIFY COLUMN `stand_title` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准标题' AFTER `stand_number`;
@@ -0,0 +1,52 @@
package com.jero.modules.system.enums;
/**
* 数据字典code枚举类
*/
public enum DicCodeEnum {
REGION("适用地区","0","region"),
;
String name;
String value;
String code;
private DicCodeEnum(String name, String value, String code) {
this.name = name;
this.value = value;
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public static String getTextByValue(String value) {
DicCodeEnum[] values = values();
for (DicCodeEnum dicCodeEnum : values) {
if (dicCodeEnum.value.equals(value)) {
return dicCodeEnum.name;
}
}
return null;
}
}
@@ -459,7 +459,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
sysUserQueryWrapper.lambda().in(SysUser::getId,userIdList);
List<SysUser> sysUsers = this.baseMapper.selectList(sysUserQueryWrapper);
List<SysUser> sysUsers = new ArrayList<>();
if(CollectionUtils.isNotEmpty(userIdList)){
sysUsers = this.baseMapper.selectList(sysUserQueryWrapper);
}
return sysUsers;
}
@@ -56,6 +56,7 @@ public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGat
@RequestParam(name="cut", defaultValue="cn") String cut,
HttpServletRequest req) {
QueryWrapper<LawsOpinionGatherEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsOpinionGatherEO, req.getParameterMap());
queryWrapper.orderByDesc("start_time");
Page<LawsOpinionGatherEO> page = new Page<LawsOpinionGatherEO>(pageNo, pageSize);
IPage<LawsOpinionGatherEO> pageList = lawsOpinionGatherEOService.page(page, queryWrapper);
this.lawsOpinionGatherEOService.disposeData(pageList.getRecords(),cut);
@@ -59,6 +59,7 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
@RequestParam(name="cut", defaultValue="cn") String cut,
HttpServletRequest req) {
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationEO, req.getParameterMap());
queryWrapper.orderByDesc("start_time");
Page<LawsTechnologyEvaluationEO> page = new Page<LawsTechnologyEvaluationEO>(pageNo, pageSize);
IPage<LawsTechnologyEvaluationEO> pageList = lawsTechnologyEvaluationEOService.page(page, queryWrapper);
this.lawsTechnologyEvaluationEOService.disposeData(pageList.getRecords(),cut);
@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.DictModel;
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -185,4 +186,16 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
this.countryCardManageReleaseEOService.batchUpdateReleaseStatus(json);
return Result.OK("批量更新发布状态成功!");
}
/**
* 管理发布查询适用市场下拉选,只获取管理发布中没有的适用市场。
* @return
*/
@AutoLog(value = "问题知识库-country_card-管理发布-获取适用市场下拉选")
@ApiOperation(value="问题知识库-country_card-管理发布-获取适用市场下拉选", notes="问题知识库-country_card-管理发布-获取适用市场下拉选")
@GetMapping(value = "/getApplyMarketList")
public Result<List<DictModel>> getApplyMarketList() {
Result<List<DictModel>> result = this.countryCardManageReleaseEOService.getApplyMarketList();
return result;
}
}
@@ -56,6 +56,7 @@ public class ProblemKnowledgeBaseClassifyEOController extends JeroController<Pro
queryWrapper.orderByDesc("create_time");
Page<ProblemKnowledgeBaseClassifyEO> page = new Page<ProblemKnowledgeBaseClassifyEO>(pageNo, pageSize);
IPage<ProblemKnowledgeBaseClassifyEO> pageList = problemKnowledgeBaseClassifyEOService.page(page, queryWrapper);
this.problemKnowledgeBaseClassifyEOService.disposeData(pageList.getRecords());
return Result.OK(pageList);
}
@@ -69,6 +70,7 @@ public class ProblemKnowledgeBaseClassifyEOController extends JeroController<Pro
@GetMapping(value = "/list")
public Result<List<ProblemKnowledgeBaseClassifyEO>> queryList() {
List<ProblemKnowledgeBaseClassifyEO> list = problemKnowledgeBaseClassifyEOService.queryList();
this.problemKnowledgeBaseClassifyEOService.disposeData(list);
return Result.OK(list);
}
@@ -53,6 +53,7 @@ public class ProblemKnowledgeBaseEOController extends JeroController<ProblemKnow
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
this.problemKnowledgeBaseEOService.createQueryPermission(queryWrapper,problemKnowledgeBaseEO);
queryWrapper.orderByDesc("create_time");
Page<ProblemKnowledgeBaseEO> page = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
IPage<ProblemKnowledgeBaseEO> pageList = problemKnowledgeBaseEOService.page(page, queryWrapper);
@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@@ -70,5 +71,7 @@ public class ProblemKnowledgeBaseClassifyEO implements Serializable {
@Excel(name = "负责人id", width = 15)
@ApiModelProperty(value = "负责人id")
private java.lang.String chargePersonId;
@TableField(exist = false)
private java.lang.String chargePersonIdName;
}
@@ -73,8 +73,12 @@ public class ProblemKnowledgeBaseEO implements Serializable {
@Excel(name = "问题分类", width = 15)
@ApiModelProperty(value = "问题分类")
private java.lang.String problemType;
/**问题分类展示名称*/
@TableField(exist = false)
private java.lang.String problemTypeName;
/**市场*/
@Dict(dicCode = "region")
@Excel(name = "市场", width = 15)
@ApiModelProperty(value = "市场")
private java.lang.String targetMarket;
@@ -171,4 +175,8 @@ public class ProblemKnowledgeBaseEO implements Serializable {
/**中英文切换*/
@TableField(exist = false)
private String cut;
/**模糊搜索全部输入字段条件*/
@TableField(exist = false)
private String searchStr;
}
@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@@ -70,5 +71,8 @@ public class ProblemKnowledgeBaseUserEO implements Serializable {
@Excel(name = "用户id", width = 15)
@ApiModelProperty(value = "用户id")
private java.lang.String userId;
/**用户姓名*/
@TableField(exist = false)
private String userName;
}
@@ -1,6 +1,8 @@
package com.jero.modules.problemKnowledgeBase.service;
import com.alibaba.fastjson.JSONObject;
import com.jero.common.api.vo.Result;
import com.jero.common.system.vo.DictModel;
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
@@ -72,4 +74,10 @@ public interface ICountryCardManageReleaseEOService extends IService<CountryCard
* @param json
*/
void batchUpdateReleaseStatus(JSONObject json);
/**
* 获取适用市场
* @return
*/
Result<List<DictModel>> getApplyMarketList();
}
@@ -58,4 +58,10 @@ public interface IProblemKnowledgeBaseClassifyEOService extends IService<Problem
* @return
*/
List<ProblemKnowledgeBaseClassifyEO> queryList();
/**
* 处理数据
* @param datas
*/
void disposeData(List<ProblemKnowledgeBaseClassifyEO> datas);
}
@@ -1,5 +1,6 @@
package com.jero.modules.problemKnowledgeBase.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -68,4 +69,10 @@ public interface IProblemKnowledgeBaseEOService extends IService<ProblemKnowledg
* @param cut
*/
void disposeData(List<ProblemKnowledgeBaseEO> datas,String cut);
/**
* 创建查询权限
* @param queryWrapper
*/
void createQueryPermission(QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper,ProblemKnowledgeBaseEO problemKnowledgeBaseEO);
}
@@ -58,4 +58,11 @@ public interface IProblemKnowledgeBaseUserEOService extends IService<ProblemKnow
* @return
*/
List<ProblemKnowledgeBaseUserEO> queryList();
/**
* 处理数据
* @param datas
* @param cut
*/
void disposeData(List<ProblemKnowledgeBaseUserEO> datas,String cut);
}
@@ -2,17 +2,22 @@ package com.jero.modules.problemKnowledgeBase.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.system.vo.DictModel;
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseEOMapper;
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
import com.jero.modules.system.enums.DicCodeEnum;
import com.jero.modules.system.service.ISysDictService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
@@ -34,6 +39,8 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
@Autowired
private ICountryCardManageReleaseDetailEOService countryCardManageReleaseDetailEOService;
@Autowired
private ISysDictService sysDictService;
/**
* 保存
@@ -159,4 +166,34 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
this.updateBatchById(countryCardManageReleaseEOList);
}
@Override
public Result<List<DictModel>> getApplyMarketList() {
List<DictModel> result = new ArrayList<>();
//获取所有的适用地区
List<DictModel> dictModelList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
//获取已经创建了country Card的适用地区,该接口只返回,在country Card里面没有的适用地区。
List<CountryCardManageReleaseEO> countryCardManageReleaseEOList = this.list();
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
result = dictModelList;
}else {
for (DictModel dictModel : dictModelList) {
boolean flag = true;
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())){
flag = false;
break;
}
}
if(flag){
result.add(dictModel);
}
}
}
return Result.OK(result);
}
}
@@ -3,9 +3,19 @@ package com.jero.modules.problemKnowledgeBase.service.impl;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseClassifyEOMapper;
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseClassifyEOService;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.util.StringUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@@ -19,6 +29,8 @@ import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseClassifyEOMapper, ProblemKnowledgeBaseClassifyEO> implements IProblemKnowledgeBaseClassifyEOService {
@Autowired
private ISysUserService sysUserService;
/**
* 保存
@@ -89,4 +101,40 @@ public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<Probl
public List<ProblemKnowledgeBaseClassifyEO> queryList() {
return list();
}
@Override
public void disposeData(List<ProblemKnowledgeBaseClassifyEO> datas) {
if (CollectionUtils.isNotEmpty(datas)) {
StringBuffer userIdSb = new StringBuffer();
for (ProblemKnowledgeBaseClassifyEO data : datas) {
userIdSb.append(data.getChargePersonId() + ",");
}
List<String> userIdList = new ArrayList<>();
if(StringUtils.isNotEmpty(userIdSb.toString())){
userIdList = Arrays.asList(userIdSb.toString().substring(0,userIdSb.length()-1).split(","));
}
List<SysUser> userList = this.sysUserService.querySysUserListByIdList(userIdList);
datas.forEach(data -> {
if(CollectionUtils.isNotEmpty(userList)){
String chargePersonId = data.getChargePersonId();
if(StringUtils.isNotEmpty(chargePersonId)){
String[] chargePersonIdArr = chargePersonId.split(",");
String chargePersonIdName = userList.stream().filter(user -> {
boolean flag = false;
for (String chargePerson : chargePersonIdArr) {
if(StringUtils.equals(user.getId(),chargePerson)){
flag = true;
}
}
return flag;
}).map(SysUser::getUsername).collect(Collectors.joining(","));
data.setChargePersonIdName(chargePersonIdName);
}
}
});
}
}
}
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.problemKnowledgeBase.entity.*;
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum;
import com.jero.modules.problemKnowledgeBase.enums.ShowPermissionsEnum;
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper;
import com.jero.modules.problemKnowledgeBase.service.*;
@@ -14,9 +16,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Propagation;
@@ -42,6 +46,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
private IProblemKnowledgeBaseCollectEOService problemKnowledgeBaseCollectEOService;
@Autowired
private IProblemKnowledgeBaseBrowsingHistoryEOService problemKnowledgeBaseBrowsingHistoryEOService;
@Autowired
private IProblemKnowledgeBaseClassifyEOService problemKnowledgeBaseClassifyEOService;
/**
* 保存
@@ -129,6 +135,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
public List<ProblemKnowledgeBaseEO> queryList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
HttpServletRequest req) {
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
this.createQueryPermission(queryWrapper,problemKnowledgeBaseEO);
queryWrapper.orderByDesc("create_time");
List<ProblemKnowledgeBaseEO> result = this.list(queryWrapper);
this.disposeData(result,problemKnowledgeBaseEO.getCut());
@@ -166,6 +173,11 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
if (CollectionUtils.isNotEmpty(datas)) {
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
StringBuffer problemTypeSb = new StringBuffer();
for (ProblemKnowledgeBaseEO data : datas) {
problemTypeSb.append(data.getProblemType() + ",");
}
List<String> probleKnowledgeBaseIdList = datas.stream().map(ProblemKnowledgeBaseEO::getId).distinct().collect(Collectors.toList());
//查询出数据的所有点赞数量
QueryWrapper<ProblemKnowledgeBasePraiseEO> praiseQueryWrapper = new QueryWrapper<>();
@@ -182,6 +194,22 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
collectQueryWrapper.lambda().in(ProblemKnowledgeBaseCollectEO::getProblemKnowledgeBaseId,probleKnowledgeBaseIdList);
List<ProblemKnowledgeBaseCollectEO> collectEOList = this.problemKnowledgeBaseCollectEOService.list(collectQueryWrapper);
//查询出数据的所有的权限用户
QueryWrapper<ProblemKnowledgeBaseUserEO> permissionUserQueryWrapper = new QueryWrapper<>();
permissionUserQueryWrapper.lambda().in(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId,probleKnowledgeBaseIdList);
List<ProblemKnowledgeBaseUserEO> permissionUserEOList = this.problemKnowledgeBaseUserEOService.list(permissionUserQueryWrapper);
this.problemKnowledgeBaseUserEOService.disposeData(permissionUserEOList,cut);
List<ProblemKnowledgeBaseClassifyEO> problemKnowledgeBaseClassifyEOList = new ArrayList<>();
if(StringUtils.isNotEmpty(problemTypeSb.toString())){
List<String> problemTypeList = Arrays.asList(problemTypeSb.toString().substring(0, problemTypeSb.toString().length() - 1).split(",")).stream().distinct().collect(Collectors.toList());
QueryWrapper<ProblemKnowledgeBaseClassifyEO> classifyEOQueryWrapper = new QueryWrapper<>();
classifyEOQueryWrapper.lambda().in(ProblemKnowledgeBaseClassifyEO::getId,problemTypeList);
problemKnowledgeBaseClassifyEOList = this.problemKnowledgeBaseClassifyEOService.list(classifyEOQueryWrapper);
}
List<ProblemKnowledgeBaseClassifyEO> finalProblemKnowledgeBaseClassifyEOList = problemKnowledgeBaseClassifyEOList;
datas.forEach(data -> {
if(StringUtils.isNotEmpty(data.getShowPermissions())){
data.setShowPermissions_dicText(ShowPermissionsEnum.getTextByValue(data.getShowPermissions(),cut));
@@ -189,7 +217,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
long praiseCount = praiseEOList.stream().filter(praiseEO -> {
boolean flag = false;
if(StringUtils.equals(data.getId(),praiseEO.getProblemKnowledgeBaseId())){
if(StringUtils.equals(data.getId(),praiseEO.getProblemKnowledgeBaseId())
&&StringUtils.equals(praiseEO.getPraiseStatus(), PraiseStatusEnum.PRAISE.getValue())){
flag = true;
}
return flag;
@@ -209,9 +238,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
data.setPraiseEO(poblemKnowledgeBasePraiseEOS.get(0));
}
long browsingHistoryCount = browsingHistoryEOList.stream().filter(praiseEO -> {
long browsingHistoryCount = browsingHistoryEOList.stream().filter(baseBrowsingHistoryEO -> {
boolean flag = false;
if(StringUtils.equals(data.getId(),praiseEO.getProblemKnowledgeBaseId())){
if(StringUtils.equals(data.getId(),baseBrowsingHistoryEO.getProblemKnowledgeBaseId())){
flag = true;
}
return flag;
@@ -220,7 +249,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
long collectCount = collectEOList.stream().filter(collectEO -> {
boolean flag = false;
if(StringUtils.equals(data.getId(),collectEO.getProblemKnowledgeBaseId())){
if(StringUtils.equals(data.getId(),collectEO.getProblemKnowledgeBaseId())
&& StringUtils.equals(collectEO.getCollectStatus(), CollectStatusEnum.COLLECT.getValue())){
flag = true;
}
return flag;
@@ -239,6 +269,69 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
if(CollectionUtils.isNotEmpty(problemKnowledgeBaseCollectEOS)){
data.setCollectEO(problemKnowledgeBaseCollectEOS.get(0));
}
List<ProblemKnowledgeBaseUserEO> permissionUserEOS = permissionUserEOList.stream().filter(permissionUserEO -> {
boolean flag = false;
if (StringUtils.equals(data.getId(), permissionUserEO.getProblemKnowledgeBaseId())) {
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(permissionUserEOS)){
data.setPermissionUserList(permissionUserEOS);
}
String problemType = data.getProblemType();
if(StringUtils.isNotEmpty(problemType)){
String[] problemTypeArr = problemType.split(",");
String problemTypeName = finalProblemKnowledgeBaseClassifyEOList.stream().filter(problemKnowledgeBaseClassifyEO -> {
boolean flag = false;
for (String type : problemTypeArr) {
if (StringUtils.equals(type, problemKnowledgeBaseClassifyEO.getId())) {
flag = true;
}
}
return flag;
}).map(ProblemKnowledgeBaseClassifyEO::getProblemLabel).collect(Collectors.joining(","));
data.setProblemTypeName(problemTypeName);
}
});
}
}
@Override
public void createQueryPermission(QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper,ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
/**
* 查询权限
* 公开:所有人都可以看到。
* 私密:只有配置了的权限用户可以看到。
*/
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<ProblemKnowledgeBaseUserEO> userPermissionQueryWrapper = new QueryWrapper<>();
userPermissionQueryWrapper.lambda().eq(ProblemKnowledgeBaseUserEO::getUserId,currentUser.getId());
List<ProblemKnowledgeBaseUserEO> problemKnowledgeBaseUserEOList = problemKnowledgeBaseUserEOService.list(userPermissionQueryWrapper);
List<String> problemKnowledgeBaseIdList = problemKnowledgeBaseUserEOList.stream().map(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
queryWrapper.lambda().and(query -> {
query.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.OPEN.getValue()).
or(o -> {
o.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.PRIVACY.getValue());
o.in(ProblemKnowledgeBaseEO::getId,problemKnowledgeBaseIdList);
});
});
String searchStr = problemKnowledgeBaseEO.getSearchStr();
if(StringUtils.isNotEmpty(searchStr)){
queryWrapper.lambda().and(query -> {
query.like(ProblemKnowledgeBaseEO::getTitle,searchStr);
query.or().like(ProblemKnowledgeBaseEO::getProblemType,searchStr);
query.or().like(ProblemKnowledgeBaseEO::getTargetMarket,searchStr);
query.or().like(ProblemKnowledgeBaseEO::getStandNumber,searchStr);
query.or().like(ProblemKnowledgeBaseEO::getStandTitle,searchStr);
query.or().like(ProblemKnowledgeBaseEO::getContent,searchStr);
});
}
}
@@ -3,9 +3,16 @@ package com.jero.modules.problemKnowledgeBase.service.impl;
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseUserEOMapper;
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseUserEOService;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@@ -20,6 +27,9 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
public class ProblemKnowledgeBaseUserEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseUserEOMapper, ProblemKnowledgeBaseUserEO> implements IProblemKnowledgeBaseUserEOService {
@Autowired
private ISysUserService sysUserService;
/**
* 保存
*
@@ -89,4 +99,30 @@ public class ProblemKnowledgeBaseUserEOServiceImpl extends ServiceImpl<ProblemKn
public List<ProblemKnowledgeBaseUserEO> queryList() {
return list();
}
@Override
public void disposeData(List<ProblemKnowledgeBaseUserEO> datas, String cut) {
if(CollectionUtils.isNotEmpty(datas)){
List<String> userIdList = datas.stream().map(ProblemKnowledgeBaseUserEO::getUserId).distinct().collect(Collectors.toList());
List<SysUser> userList = sysUserService.querySysUserListByIdList(userIdList);
datas.forEach(data -> {
if(CollectionUtils.isNotEmpty(userList)){
String userName = "";
for (SysUser user : userList) {
if (StringUtils.equals(data.getUserId(), user.getId())) {
userName = user.getUsername();
break;
}
}
if(StringUtils.isNotEmpty(userName)){
data.setUserName(userName);
}
}
});
}
}
}
@@ -132,14 +132,24 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
saveOrUpdate(lawsMonthlyReportWriteEO);
if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新征求意见清单模板
//新征求意见清单模板(先删除在新增)
//删除
LambdaQueryWrapper<NewOpinionTemplateEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(NewOpinionTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportWriteEO.getId());
iNewOpinionTemplateEOService.remove(wrapper);
//新增
List<NewOpinionTemplateEO> newOpinionTemplateEOList = lawsMonthlyReportWriteEO.getNewOpinionTemplateEOList();
iNewOpinionTemplateEOService.updateBatchById(newOpinionTemplateEOList);
iNewOpinionTemplateEOService.saveBatch(newOpinionTemplateEOList);
}else if (ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
//新发布标准清单模板
//新发布标准清单模板(先删除在新增)
//删除
LambdaQueryWrapper<NewStandardTemplateEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(NewStandardTemplateEO::getLawsMonthlyReportWriteId,lawsMonthlyReportWriteEO.getId());
iNewStandardTemplateEOService.remove(lambdaQueryWrapper);
//新增
List<NewStandardTemplateEO> newStandardTemplateEOList = lawsMonthlyReportWriteEO.getNewStandardTemplateEOList();
iNewStandardTemplateEOService.updateBatchById(newStandardTemplateEOList);
iNewStandardTemplateEOService.saveBatch(newStandardTemplateEOList);
}
}
+13 -9
View File
@@ -408,8 +408,8 @@ module.exports = {
NewLabelItem: 'Newly Added Tag Item',
editLabelItem: 'Edit Tag Item',
NodeQuickLookup: 'Node Quick Lookup',
AreAllLabelsRead: 'Are All Labels Read',
AllLabelsRead: 'Labels Read',
AreAllLabelsRead: 'Are All Mark as Read',
AllLabelsRead: 'Mark as Read',
SubscriptionNotification: 'Subscription Notification',
warningInformation: 'Warning Information',
ForwardPush: 'Forward Push',
@@ -608,7 +608,7 @@ module.exports = {
engineeringInterfacePerson: 'Engineering Interface',
typeOfDeliverables: 'Deliverable Type',
deliverableTemplate: 'Deliverable Template',
entryName: 'Project',
entryName: 'Project Name',
targetMarket: 'Target Market',
projectStatus: 'Development',
StudioEngineer: 'R&H Studio',
@@ -801,7 +801,7 @@ module.exports = {
parameterBatch: 'Parameter Batch',
releaseVersion: 'Release Version',
parameterTemplate: 'Parameter Template',
contentDescription: 'Content Description',
contentDescription: 'Description',
WhetherMergeParameters: 'Whether to merge parameters',
merge: 'Merge',
nonjoinder: 'Nonjoinder',
@@ -884,10 +884,10 @@ module.exports = {
toTrack: 'To be tracked',
Launch: 'Launch',
maintainProgress: 'Maintain',
redSchedule: 'Red: not in conformity, and there is no acceptable scheme and schedule',
yellowSchedule: 'Yellow: non conformance / to be tracked, with acceptable scheme and schedule',
greenRequirements: 'Green: confirm that it meets or meets the current requirements',
blueUndeterminedState: 'Blue: undetermined state',
redSchedule: 'Red: unqualified without available solutions or timeline. ',
yellowSchedule: 'Yellow: unqualified and with available solutions and timeline. ',
greenRequirements: 'Green: qualified and confirmed.',
blueUndeterminedState: 'Blue: pending',
authenticationMessage: 'Homo Parameter Task',
taskRegulationComplianceTask: 'Regulation Compliance Task',
accept: 'Accept',
@@ -1241,5 +1241,9 @@ module.exports = {
turnOnAutoMatch:'Turn on auto match',
Adjustareasofresponsibility:'Adjust areas of responsibility',
regulatoryTechnicalAssessment:'Regulatory Technical Assessment',
punctuationmark:'Only English punctuation marks other than the # sign can be entered',
punctuationmark:'You can only enter English punctuation marks except the # sign and commas',
created: 'Created',
updated:'Updated',
OpenOne:'Open',
Privacy:'Privacy',
}
+5 -1
View File
@@ -1344,5 +1344,9 @@ module.exports = {
turnOnAutoMatch:'打开自动匹配',
Adjustareasofresponsibility:'调整责任领域',
regulatoryTechnicalAssessment:'法规技术评估',
punctuationmark:'只能输入除#号外的英文标点符号',
OpenOne:'公开',
Privacy:'私密',
punctuationmark:'只能输入除#号和逗号外的英文标点符号',
created: '创建时间',
updated:'更新时间',
}
@@ -40,7 +40,7 @@
:dataSource='areaTable'
:pagination='false'
:loading='loading'
:scroll='{x: 600}'
:scroll="{x: '100%',y:'calc(100vh - 130px)'}"
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'>
@@ -32,12 +32,12 @@
<span class="Required">*</span>
<span class="title-text-text" :title="$t('personCharge')">{{$t('personCharge')}}</span>
</div>
<a-form-model-item class="itemModel" prop="personChargeName">
<a-form-model-item class="itemModel" prop="chargePersonIdName">
<PersonnelSelection
:query="{db_field_name:'personCharge',db_field_txt:$t('personCharge')}"
:query="{db_field_name:'chargePersonId',db_field_txt:$t('personCharge')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.personChargeName"/>
v-model="formInline.chargePersonIdName"/>
</a-form-model-item>
</div>
</a-col>
@@ -48,7 +48,8 @@
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile } from '@/api/manage'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
export default {
name: 'classificationMaintenanceAdd',
components: {
@@ -60,16 +61,11 @@
confirmLoading: false,
formInline: {},
rules: {
personChargeName: [
chargePersonIdName: [
{
required: true,
message: this.$t('personCharge') + this.$t('cannotEmpty'),
trigger: 'change'
},
{
max: 100,
message: this.$t('personCharge') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'change'
}
],
problemLabel: [
@@ -85,7 +81,11 @@
}
]
},
title: ''
title: '',
url: {
add: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/add',
edit: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/edit'
}
}
},
mounted() {
@@ -114,7 +114,24 @@
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.confirmLoading = true
let url = ''
if (this.formInline.id) {
url = this.url.edit
} else {
url = this.url.add
}
postAction(url, this.formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('classificationMaintenanceAddForm')
} else {
this.confirmLoading = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
},
@@ -24,7 +24,7 @@
:loading="loading">
<span slot="operation" slot-scope="text,record">
<a style="margin-right: 8px" @click="edit(record)">{{$t('edit')}}</a>
<a @click="deleteData">{{$t('delete')}}</a>
<a @click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="dataList.length > 0">
@@ -63,12 +63,12 @@
data() {
return {
url: {
list: '',
deleteOne: ''
list: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/page',
deleteOne: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/deleteBatch'
},
visible: false,
selectedRowKeys: [],
dataList: [{}],
dataList: [],
loading: false,
pageNo: 1,
pageSize: 10,
@@ -84,14 +84,16 @@
},
{
title: this.$t('problemLabel'),
dataIndex: 'title',
dataIndex: 'problemLabel',
align: 'center',
width: 240,
ellipsis: true
},
{
title: this.$t('personCharge'),
dataIndex: 'region',
dataIndex: 'chargePersonName',
align: 'center',
width: 240,
ellipsis: true
},
{
@@ -109,6 +111,7 @@
methods: {
getData() {
this.visible = true
this.replacePage()
},
handleCancel() {
this.visible = false
@@ -128,10 +131,10 @@
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
deleteAction(_this.url.deleteOne, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
_this.replacePage()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
@@ -154,7 +157,7 @@
pageSize: this.pageSize
}
this.loading = true
postAction(this.url.list, query).then((res) => {
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
@@ -0,0 +1,315 @@
<template>
<a-drawer
:title="$t('bringInDocumentInformation')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serial_number"></a-input>
</div>
</a-col>
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParam.title"></a-input>
</div>
</a-col>
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('status')">
<span>{{$t('status')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.state"
:placeholder="$t('PleaseSelect')+$t('status')"
:type="'select'"
:triggerChange="false" :dictCode="'state'"/>
</div>
</a-col>
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-table
:columns="columns"
:rowKey="(record)=>JSON.stringify(record)"
:scroll="{x: 1200}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:loading="loading">
</a-table>
<div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+`${total}`+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</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" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
export default {
name: 'listAddModel',
components: {
globalAdvancedQuery
},
props: ['url'],
data() {
return {
visible: false,
queryParam: {},
confirmLoading: false,
selectedRowKeys: [],
selectedRowKeysValue: [],
columns: [
{
title: this.$t('standard'),
dataIndex: 'serial_number',
align: 'center',
ellipsis: true
},
{
title: this.$t('title'),
dataIndex: 'title',
align: 'center',
ellipsis: true
},
{
title: this.$t('zoneOfApplication'),
dataIndex: 'region',
align: 'center',
ellipsis: true
},
{
title: this.$t('ImplementationDate'),
dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1',
align: 'center',
ellipsis: true
},
{
title: this.$t('vehicleInProductionDate'),
dataIndex: 'implement_time',
align: 'center',
ellipsis: true
}
],
dataList: [],
content: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
fieldList: [],
queryConditionVOList: [],
bussDocument: []
}
},
mounted() {
},
methods: {
addModel(value) {
this.pageNo = 1
this.visible = true
this.queryParam = {}
this.selectedRowKeys = []
this.queryConditionVOList = []
this.replacePage()
this.queryConditionInventory()
if (value.bussDocumentLibraryId) {
this.bussDocument = value.bussDocumentLibraryId
}
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
this.replacePage()
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
let queryConditionVOList = JSON.parse(JSON.stringify(this.queryConditionVOList))
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam,
queryConditionVOList: JSON.stringify(queryConditionVOList)
}
this.loading = true
postAction('/project/projectLawsInventoryEO/queryPageDummy', query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
if (this.bussDocument && this.bussDocument.length > 0) {
this.dataList.forEach(val => {
if (this.bussDocument.includes(val.id)) {
this.selectedRowKeys.push(JSON.stringify(val))
}
})
}
this.total = res.result.total
this.loading = false
} else {
this.dataList = []
this.total = 0
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
this.content = []
this.selectedRowKeys.forEach(res => {
this.content.push(JSON.parse(res))
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let number = []
let id = []
this.content.forEach(res => {
id.push(res.id)
number.push(res.serial_number)
})
this.$emit('listAddModelForm', id.join(','), number.join(','))
this.visible = false
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
queryConditionInventory() {
let query = {
flag: 1
}
getAction('/project/projectLawsInventoryEO/queryConditionInventory', query).then((res) => {
if (res.success) {
this.fieldList = res.result || []
} else {
this.fieldList = []
}
})
},
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
this.queryConditionVOList = params
this.queryConditionVOList.forEach(res => {
res.type = matchType
})
}
this.replacePage()
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.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;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 33px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 100%;
height: 38px;
}
.box-button {
height: 38px;
}
</style>
@@ -3,7 +3,7 @@
<div class="doc-detail-wrap">
<div class="doc-detail-header" style="position: fixed;top: 0">
<div class="doc-detail-title">
<span style="line-height: 66px;display: inline-block;float: left">
<span style="line-height: 66px;display: inline-block;float: left;cursor: pointer" @click="backClick">
<a-icon type="arrow-left" style="margin-right: 6px;"/>
</span>
{{$t('newlyAdded')}}
@@ -19,28 +19,28 @@
<span class="Required">*</span>
<span class="title-text-text" :title="$t('displayPermission')">{{$t('displayPermission')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectNameId">
<a-form-model-item class="itemModel" prop="showPermissions">
<a-select :placeholder="$t('PleaseSelect')+$t('displayPermission')"
@change="projectNameChange"
v-model="formInline.projectNameId">
@change="showPermissionsChange"
v-model="formInline.showPermissions">
<a-select-option v-for="(item, key) in projectNameList"
:key="key"
:value="item.id">
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
{{ item.projectName}}
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="8">
<a-col :span="8" v-if="isDisplay">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('authorizedUser')">{{$t('authorizedUser')}}</span>
</div>
<a-form-model-item class="itemModel" prop="yearNameId">
<a-form-model-item class="itemModel" prop="studioEngineerName">
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('authorizedUser')}"
:isSingleChoice="true"
:personneQuery="formInline"
@@ -57,7 +57,7 @@
<span class="Required">*</span>
<span class="title-text-text" :title="$t('title')">{{$t('title')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="title">
<a-form-model-item class="itemModel" prop="title">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.title"
@@ -72,13 +72,17 @@
<span class="title-text-text"
:title="$t('problemClassification')">{{$t('problemClassification')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectStatus">
<j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
:disabled="disabled"
@input="handleInput('projectStatus')"
:placeholder="$t('PleaseSelect')+$t('problemClassification')"
:type="'select'"
:triggerChange="false" :dictCode="'project_status'"/>
<a-form-model-item class="itemModel" prop="problemType">
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
v-model="formInline.problemType">
<a-select-option v-for="(item, key) in problemTypeList"
:key="key"
:value="item.id">
<span style="display: inline-block;width: 100%" :title="item.problemLabel ">
{{item.problemLabel}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
@@ -88,13 +92,13 @@
<span class="Required">*</span>
<span class="title-text-text" :title="$t('market')">{{$t('market')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectStatus">
<j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
<a-form-model-item class="itemModel" prop="targetMarket">
<j-dict-select-tag class="box-input" v-model="formInline.targetMarket"
:disabled="disabled"
@input="handleInput('projectStatus')"
@input="handleInput('targetMarket')"
:placeholder="$t('PleaseSelect')+$t('market')"
:type="'select'"
:triggerChange="false" :dictCode="'project_status'"/>
:triggerChange="false" :dictCode="'region'"/>
</a-form-model-item>
</div>
</a-col>
@@ -105,10 +109,10 @@
<div class="title-text">
<span class="title-text-text" :title="$t('standardNo')">{{$t('standardNo')}}</span>
</div>
<a-form-model-item class="itemModel" prop="vehiclePlatform">
<a-form-model-item class="itemModel" prop="standNumber">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.vehiclePlatform"
:disabled="true"
v-model="formInline.standNumber"
:placeholder="$t('PleaseEnter')+$t('standardNo')"/>
</a-form-model-item>
</div>
@@ -150,10 +154,10 @@
</div>
<a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('enclosure')">
{{ (formInline.enclosure === 'null' || formInline.enclosure === ''
@click="clickButtonToUpload('accessoryFile')">
{{ (formInline.accessoryFile === 'null' || formInline.accessoryFile === ''
||
formInline.enclosure == null) ? $t('clickUpload') : $t('viewUploadedFiles')
formInline.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
@@ -161,9 +165,14 @@
</a-col>
</a-row>
</a-form-model>
<div class="submit-button">
<a-button class="box-button" type="primary" @click="submit">{{$t('submit')}}</a-button>
</div>
</div>
</div>
</div>
<JLoading :loading="loading">{{$t('pleaseWaitWhileRunning')}}</JLoading>
<listAddModel ref="listAddModelRef" @listAddModelForm="listAddModelForm"/>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
</div>
</template>
@@ -175,6 +184,7 @@
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import listAddModel from './listAddModel'
import { quillEditor } from 'vue-quill-editor'
export default {
@@ -182,14 +192,72 @@
components: {
PersonnelSelection,
uploadFile,
quillEditor
quillEditor,
listAddModel
},
data() {
return {
formInline: {},
rules: {},
loading: false,
problemTypeList: [],
rules: {
showPermissions: [
{
required: true,
message: this.$t('displayPermission') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
studioEngineerName: [
{
required: true,
message: this.$t('authorizedUser') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
title: [
{
required: true,
message: this.$t('title') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('title') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
problemType: [
{
required: true,
message: this.$t('problemClassification') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
targetMarket: [
{
required: true,
message: this.$t('market') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
url: {
add: '/problemKnowledgeBase/problemKnowledgeBaseEO/add',
edit: '/problemKnowledgeBase/problemKnowledgeBaseEO/edit'
},
isDisplay: false,
disabled: false,
projectNameList: [],
projectNameList: [
{
value: 'Open',
name: this.$t('OpenOne')
},
{
value: 'Privacy',
name: this.$t('Privacy')
}
],
content: '<h2>I am Example</h2>',
editorOption: {
// Some Quill options...
@@ -203,34 +271,92 @@
},
mounted() {
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
this.getBase()
if (this.$route.query.id) {
this.queryById()
}
},
methods: {
getBase() {
getAction('/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/list', {}).then((res) => {
if (res.success) {
this.problemTypeList = res.result || []
} else {
this.problemTypeList = []
}
})
},
queryById() {
let query = {
id: this.$route.query.id
}
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
if (res.success) {
this.formInline = res.result || {}
this.formInline = { ...this.formInline }
if (this.formInline.showPermissions == 'Privacy'){
this.isDisplay = true
}else{
this.isDisplay = false
}
} else {
this.formInline = {}
}
})
},
backClick() {
this.$router.push({
path: '/problemknowledgeBase'
})
}
,
showPermissionsChange(event) {
if (event == 'Open') {
this.isDisplay = false
} else {
this.isDisplay = true
}
}
,
onEditorBlur(quill) {
console.log('editor blur!', quill)
},
}
,
onEditorFocus(quill) {
console.log('editor focus!', quill)
},
}
,
onEditorReady(quill) {
console.log('editor ready!', quill)
},
}
,
onEditorChange({ quill, html, text }) {
console.log('editor change!', quill, html, text)
this.content = html
},
}
,
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
}
,
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
}
,
bringInDocumentInformationClick() {
},
this.$refs.listAddModelRef.addModel(this.formInline)
}
,
listAddModelForm(id, number) {
this.formInline.standNumber = number
this.formInline.bussDocumentLibraryId = id
this.formInline = { ...this.formInline }
}
,
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
@@ -242,7 +368,8 @@
this.$refs.uploadFile.perentHandleFunc()
}
})
},
}
,
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
@@ -255,6 +382,47 @@
this.formInline[this.uploadName] = attIdList.join(',')
this.formInline = { ...this.formInline }
}
,
submit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let formInline = JSON.parse(JSON.stringify(this.formInline))
this.loading = true
this.confirmLoading = true
let url = ''
if (this.formInline.id) {
url = this.url.edit
} else {
url = this.url.add
}
formInline.permissionUserList = []
if (formInline.showPermissions == 'Privacy') {
let studioEngineer = formInline.studioEngineer.split(',')
studioEngineer.forEach(res => {
formInline.permissionUserList.push({
userId: res
})
})
}
postAction(url, formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.loading = false
if (this.$route.query.id) {
} else {
this.$router.push({
path: '/problemknowledgeBase'
})
}
} else {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
}
}
}
</script>
@@ -381,4 +549,13 @@
.box-button {
height: 38px;
}
.submit-button {
width: 100%;
margin-top: 20px;
text-align: right;
padding: 0 32px;
box-sizing: border-box;
}
</style>
@@ -99,7 +99,7 @@
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
pageNo: 1,
url: {
getInfoList: 'search/document/getFullTextInfoList'
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page'
}
}
},
@@ -108,10 +108,13 @@
},
methods: {
onSearch() {
this.pageNo = 1
this.getList()
},
ResetSearch() {
this.searchContent = ''
this.pageNo = 1
this.getList()
},
classificationClick() {
this.$refs.classificationMaintenanceModelRef.getData()
@@ -124,11 +127,14 @@
window.open(newUrl.href, '_blank')
},
newlyAddedClick() {
let newUrl = this.$router.resolve({
path: '/problemKnowledgeBaseAdd',
query: {}
this.$router.push({
path: '/problemKnowledgeBaseAdd'
})
window.open(newUrl.href, '_blank')
// let newUrl = this.$router.resolve({
// path: '/problemKnowledgeBaseAdd',
// query: {}
// })
// window.open(newUrl.href, '_blank')
},
pageOnChange(page, pageSize) {
this.pageNo = page
@@ -144,7 +150,7 @@
pageNo: this.pageNo,
pageSize: this.pageSize
}
postAction(this.url.getInfoList, query).then((res) => {
getAction(this.url.getInfoList, query).then((res) => {
if (res.success) {
this.conList = res.result.records
this.total = res.result.total
@@ -156,7 +162,9 @@
titleClick(item) {
let newUrl = this.$router.resolve({
path: '/problemKnowledgeBaseView',
query: {}
query: {
id: item.id
}
})
window.open(newUrl.href, '_blank')
}
@@ -21,30 +21,23 @@
<span class="text-field-right"
:title="queryForm[item.value]" v-else>
{{queryForm[item.value]}}fdgdgdfg
{{queryForm[item.value]}}
</span>
</div>
</div>
<div class="content">
sfdsfdsf的防控流感的飞机过来看的结果东法兰克感觉地方给了地方国家的分开两个就地方孤苦伶仃附件给领导反馈
独守空房了就收到付款了的角色发看来都是风景但是考虑附件第三方库老师积分迪斯科浪费绝对是分类的课时费
是反抗拉萨的飞机罗斯福就点十六分就但是发
迪斯科浪费电视机分厘卡的设计分类的水库附近的说服力但是积分的历史房价多少发了多少给京东方管理看豆腐干豆腐干看
a fjsd fklsdjfk s是否考虑技术的反抗类毒素就发的撒开了房间但是发离开打扫房间是开了房间都是老师JFK了的身份圣诞快乐就是的反抗类毒素解放迪斯科浪费是
考虑到房价打开拉萨附近分离技术的领导是否打开拉萨范德萨发了开始就发的考虑是否就但是考虑发及代理商开发就十分大师傅看
</div>
<div class="content" v-html="queryForm.content"></div>
<div class="content-icon">
<span class="content-icon-text">
<a-icon class="icon" type="eye"/>
<span>123456</span>
<span>{{this.queryForm.browsingHistoryCount}}</span>
</span>
<span class="content-icon-text">
<a-icon class="icon" type="like"/>
<span>123456</span>
<span class="content-icon-text" @click="likeClick()">
<a-icon class="icon" :class="{'icon-active':this.isPraise}" type="like"/>
<span>{{this.queryForm.praiseCount}}</span>
</span>
<span class="content-icon-text">
<a-icon class="icon" type="star"/>
<span>123456</span>
<span class="content-icon-text" @click="starClick()">
<a-icon class="icon" :class="{'icon-active':this.isCollect}" type="star"/>
<span>{{this.queryForm.collectCount}}</span>
</span>
</div>
<div class="box-text">
@@ -107,7 +100,8 @@
<script>
import viewFileModel from '@/components/viewFileModel/index'
import { getAction, postAction, downloadFile } from '@/api/manage'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name: 'problemKnowledgeBaseView',
@@ -119,35 +113,114 @@
standardContentList: [
{
title: this.$t('problemClassification'),
value: ''
value: 'problemType'
},
{
title: this.$t('market'),
value: ''
value: 'targetMarket'
},
{
title: this.$t('standardNo'),
value: ''
value: 'standNumber'
},
{
title: this.$t('standardName'),
value: ''
value: 'title'
},
{
title: this.$t('enclosure'),
type: 2,
value: ''
value: 'accessoryFile'
}
],
queryForm: {},
formInline: {},
rules: {}
rules: {},
isPraise: false,
isCollect: false
}
},
mounted() {
document.title = this.$t('applicableInstructionsMarketList')
this.viewAdd()
this.queryById()
},
methods: {
...mapGetters(['userInfo']),
queryById() {
let query = {
id: this.$route.query.id
}
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
if (res.success) {
this.queryForm = res.result || {}
this.queryForm = { ...this.queryForm }
if (this.formInline.showPermissions == 'Privacy') {
this.isDisplay = true
} else {
this.isDisplay = false
}
if (this.queryForm.praiseEO && this.queryForm.praiseEO.praiseStatus == 'Praise') {
this.isPraise = true
} else {
this.isPraise = false
}
if (this.queryForm.collectEO && this.queryForm.collectEO.collectStatus == 'Collect') {
this.isCollect = true
} else {
this.isCollect = false
}
} else {
this.formInline = {}
}
})
},
viewAdd() {
let query = {
problemKnowledgeBaseId: this.$route.query.id,
browsingUserId: this.userInfo().id
}
postAction('/problemKnowledgeBase/problemKnowledgeBaseBrowsingHistoryEO/add', query).then((res) => {
})
},
likeClick() {
let praiseStatus = ''
this.isPraise = !this.isPraise
if (this.isPraise) {
praiseStatus = 'Praise'
this.queryForm.praiseCount = this.queryForm.praiseCount + 1
} else {
praiseStatus = 'Cancel praise'
this.queryForm.praiseCount = this.queryForm.praiseCount - 1
}
let query = {
problemKnowledgeBaseId: this.$route.query.id,
praiseUserId: this.userInfo().id,
praiseStatus: praiseStatus,
id: this.queryForm.praiseEO ? this.queryForm.praiseEO.id : undefined
}
putAction('/problemKnowledgeBase/problemKnowledgeBasePraiseEO/edit', query).then((res) => {
})
},
starClick() {
let collectStatus = ''
this.isCollect = !this.isCollect
if (this.isCollect) {
collectStatus = 'Collect'
this.queryForm.collectCount = this.queryForm.collectCount + 1
} else {
collectStatus = 'Cancel Collect'
this.queryForm.collectCount = this.queryForm.collectCount - 1
}
let query = {
problemKnowledgeBaseId: this.$route.query.id,
collectUserId: this.userInfo().id,
collectStatus: collectStatus,
id: this.queryForm.collectEO ? this.queryForm.collectEO.id : undefined
}
putAction('/problemKnowledgeBase/problemKnowledgeBaseCollectEO/edit', query).then((res) => {
})
},
clickButtonToUpload(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
},
@@ -287,13 +360,17 @@
font-weight: 400;
text-align: right;
margin-top: 20px;
display: flex;
justify-content: end;
}
.content-icon-text {
display: inline-block;
/*display: inline-block;*/
padding: 0 20px;
cursor: pointer;
line-height: 40px;
display: flex;
align-items: center;
}
.content-icon-text .icon {
@@ -301,6 +378,11 @@
color: #3b4249 !important;
}
.content-icon-text .icon-active {
font-size: 24px;
color: #00B3BE !important;
}
.content-icon-text span {
display: inline-block;
margin-left: 4px;
@@ -176,7 +176,7 @@
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'releaseState'
dataIndex: 'releaseStateTitle'
},
{
title: this.$t('remarks'),
@@ -301,9 +301,9 @@
onOk() {
let releaseState = ''
if (record.releaseState == 'draft') {
releaseState = 'published'
} else {
releaseState = 'draft'
} else {
releaseState = 'published'
}
let query = {
releaseState: releaseState,
@@ -177,14 +177,14 @@ export default {
// scopedSlots: { customRender: 'titleName' }
},
{
title: this.$t('createTime'),
title: this.$t('created'),
align: 'center',
dataIndex: 'createTime',
width: 160,
ellipsis: true,
},
{
title: this.$t('updateTime'),
title: this.$t('updated'),
align: 'center',
width: 160,
ellipsis: true,
@@ -78,7 +78,7 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if='!required'>
<a-row :gutter="24" v-if='combineFlag'>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
@@ -122,18 +122,20 @@ export default {
data() {
return {
formInline: {
},
confirmLoading: false,
description:false,
dictOptions:[],
visible: false,
combineFlag:false,
required:false,
disabled:false,
rules: {
separator:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('MergeSeparator'), trigger: 'change' },
{
pattern: /[`~!@$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~@¥%……&*()——\-+={}|《》?:“”【】、;‘'。、]/,
pattern: /[`~!@$%^&*()_\-+=<>?:"{}|.\/;'\\[\]·~@¥%……&*()——\-+={}|《》?:“”【】、;‘'。、]/,
message: this.$t('punctuationmark'),
trigger: 'blur'
}
@@ -166,11 +168,11 @@ export default {
},
mounted() {
this.getNameList()
if(this.formInline.combineFlag == '1'){
this.required = false
}else{
this.required = true
}
// if(this.formInline.combineFlag == '1'){
// this.required = false
// }else{
// this.required = true
// }
},
methods: {
uploadSuccess(data) {
@@ -196,11 +198,10 @@ export default {
})
},
flagChange(value){
console.log(value.target.value)
if(value.target.value == 2){
this.required = false
this.combineFlag = true
}else{
this.required = true
this.combineFlag = false
}
},
getNameList() {
@@ -216,7 +217,8 @@ export default {
this.visible = true
this.title = this.$t('ConventionalExport')
this.formInline = {}
this.formInline.separator = ','
this.formInline.separator = ';'
this.formInline.combineFlag = '1',
this.formInline = {...this.formInline}
this.getConfigure()
this.$nextTick(() => {
@@ -90,7 +90,7 @@
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
<uploadFileChange ref="uploadFile" :accept="'.doc,.doxc,.xls,.xlsx'" @uploadSuccess="uploadSuccess"></uploadFileChange>
<uploadFileChange ref="uploadFile" :accept="'.doc,.docx,.xls,.xlsx'" @uploadSuccess="uploadSuccess"></uploadFileChange>
</div>
</template>
@@ -184,7 +184,7 @@ export default {
ellipsis: true,
},
{
title: this.$t('createTime'),
title: this.$t('created'),
align: 'center',
dataIndex: 'createTime',
width: 180,