合并分支 'dev_third_stage' 到 'master'
Dev third stage 查看合并请求 laws-nio/laws-weilai!83
This commit is contained in:
@@ -359,4 +359,24 @@ ALTER TABLE `laws_weilai`.`params_report_detail`
|
||||
|
||||
ALTER TABLE `laws_weilai`.`report_cert_category_params_info`
|
||||
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`;
|
||||
--以上SQL 2022年7月12日 已同步正式环境
|
||||
--以上SQL 2022年7月12日 已同步正式环境
|
||||
|
||||
-- 参数项清单表 添加字段 标题默认值 2022-07-13
|
||||
ALTER TABLE `laws_weilai`.`params_info`
|
||||
ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `params_template_id`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_info_publish`
|
||||
ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `version`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_collect_manifest`
|
||||
ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `add_flag`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_collect_manifest_history`
|
||||
ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `params_manifest_id`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_report_detail`
|
||||
ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `sync_time`;
|
||||
|
||||
-- 法规技术评估 反馈评估表中,增加符合性结果表id关联 2022-07-14
|
||||
ALTER TABLE `laws_technology_evaluation_result`
|
||||
ADD COLUMN `compliance_result_id` varchar(64) NULL COMMENT '符合性结果id' AFTER `acti_proc_inst_id`;
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.jero.common.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class FileUtils {
|
||||
/**
|
||||
* 复制文件
|
||||
* @param in
|
||||
* @param newFile
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void copyFile(InputStream in, String newFile) throws IOException {
|
||||
File file2 = new File(newFile);
|
||||
if (!file2.exists()) {
|
||||
file2.createNewFile();
|
||||
}
|
||||
try (FileOutputStream ou = new FileOutputStream(newFile);) {
|
||||
byte[] bs = new byte[1024];
|
||||
int count = 0;
|
||||
while ((count = in.read(bs, 0, bs.length)) != -1) {
|
||||
ou.write(bs, 0, count);
|
||||
}
|
||||
ou.flush();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new IOException("复制文件失败!");
|
||||
} finally {
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
-14
@@ -5,20 +5,17 @@ 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.aspect.annotation.AutoLog;
|
||||
import com.jero.common.aspect.annotation.PermissionData;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService;
|
||||
import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -77,19 +74,20 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
public Result<?> queryList(ParamsCollectManifestEO paramsCollectManifestEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="100") Integer pageSize,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) {
|
||||
paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) {
|
||||
paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) {
|
||||
paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%"));
|
||||
}
|
||||
@RequestParam(name = "cut") String cut,
|
||||
HttpServletRequest req) {
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) {
|
||||
// paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%"));
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) {
|
||||
// paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%"));
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) {
|
||||
// paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%"));
|
||||
// }
|
||||
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestEO, cut);
|
||||
IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestEO, cut, req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@@ -279,6 +277,25 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改责任领域
|
||||
*
|
||||
* @param paramsCollectManifestVO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "参数项收集清单-修改责任领域")
|
||||
@ApiOperation(value="参数项收集清单-修改责任领域", notes="参数项收集清单-修改责任领域")
|
||||
@PostMapping(value = "/updateDutyTerritory")
|
||||
// @RequiresPermissions("params:collectManifest:sdt")
|
||||
public Result<?> updateDutyTerritory(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
boolean isSuccess = paramsCollectManifestEOService.updateDutyTerritory(paramsCollectManifestVO);
|
||||
if (isSuccess) {
|
||||
return Result.OK("修改责任领域成功!");
|
||||
} else {
|
||||
return Result.error("修改责任领域失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分配工程接口人
|
||||
*
|
||||
|
||||
+15
-13
@@ -6,6 +6,7 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestHistoryEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsConfigHistoryEO;
|
||||
import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService;
|
||||
import com.jero.modules.cert.collect.service.IParamsCollectManifestHistoryEOService;
|
||||
@@ -13,13 +14,13 @@ import com.jero.modules.cert.collect.service.IParamsConfigHistoryEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -66,22 +67,23 @@ public class ParamsCollectManifestHistoryEOController extends JeroController<Par
|
||||
@ApiOperation(value="历史参数项收集清单-列表查询", notes="历史参数项收集清单-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
// @RequiresPermissions("params:manifest:history")
|
||||
public Result<?> queryList(ParamsCollectManifestEO paramsCollectManifestEO,
|
||||
public Result<?> queryList(ParamsCollectManifestHistoryEO paramsCollectManifestHistoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="500") Integer pageSize,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) {
|
||||
paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) {
|
||||
paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) {
|
||||
paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%"));
|
||||
}
|
||||
@RequestParam(name = "cut") String cut,
|
||||
HttpServletRequest req) {
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestHistoryEO.getNioNumber())) {
|
||||
// paramsCollectManifestHistoryEO.setNioNumber(paramsCollectManifestHistoryEO.getNioNumber().replace("%","\\%"));
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestHistoryEO.getParamsName())) {
|
||||
// paramsCollectManifestHistoryEO.setParamsName(paramsCollectManifestHistoryEO.getParamsName().replace("%","\\%"));
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(paramsCollectManifestHistoryEO.getDre())) {
|
||||
// paramsCollectManifestHistoryEO.setDre(paramsCollectManifestHistoryEO.getDre().replace("%","\\%"));
|
||||
// }
|
||||
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage list = paramsCollectManifestHistoryEOService.queryList(page, paramsCollectManifestEO, cut);
|
||||
IPage list = paramsCollectManifestHistoryEOService.queryList(page, paramsCollectManifestHistoryEO, cut, req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -137,4 +137,9 @@ public class ParamsCollectManifestBaseEO implements Serializable {
|
||||
@Excel(name = "参数清单id", width = 15)
|
||||
@ApiModelProperty(value = "参数清单id")
|
||||
private String paramsManifestId;
|
||||
|
||||
/**标题默认值*/
|
||||
@Excel(name = "默认值", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
}
|
||||
|
||||
+8
-5
@@ -1,11 +1,11 @@
|
||||
package com.jero.modules.cert.collect.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 参数收集清单
|
||||
@@ -17,5 +17,8 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectM
|
||||
|
||||
List<ParamsCollectManifestEO> listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
|
||||
// 查询控件类型为 标题的 参数项
|
||||
List<ParamsCollectManifestEO> listInfoOfTitle(@Param("paramsManifestId") String paramsManifestId);
|
||||
|
||||
IPage pageInfo(@Param("page") IPage page, @Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO);
|
||||
}
|
||||
|
||||
+9
@@ -29,6 +29,7 @@
|
||||
<result column="change_flag" property="changeFlag" />
|
||||
<result column="del_flag" property="delFlag" />
|
||||
<result column="add_flag" property="addFlag" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
<sql id="BaseQuerySql">
|
||||
<where>
|
||||
@@ -79,10 +80,18 @@
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="listInfoOfTitle" resultMap="ParamsCollectManifestEOResultMap">
|
||||
select *
|
||||
from params_collect_manifest
|
||||
where params_manifest_id = #{paramsManifestId} and control_type = '11'
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="pageInfo" resultMap="ParamsCollectManifestEOResultMap">
|
||||
select *
|
||||
from params_collect_manifest
|
||||
<include refid="BaseQuerySql"/>
|
||||
and control_type != '11'
|
||||
order by del_flag desc, add_flag desc, change_flag desc, nio_number asc
|
||||
</select>
|
||||
|
||||
|
||||
+2
@@ -26,6 +26,7 @@
|
||||
<result column="dre" property="dre" />
|
||||
<result column="deadline" property="deadline" />
|
||||
<result column="params_manifest_id" property="paramsManifestId" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
<sql id="BaseQuerySql">
|
||||
<where>
|
||||
@@ -66,6 +67,7 @@
|
||||
select *
|
||||
from params_collect_manifest_history
|
||||
<include refid="BaseQuerySql"/>
|
||||
and control_type != '11'
|
||||
order by nio_number asc
|
||||
</select>
|
||||
</mapper>
|
||||
+5
-2
@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -64,7 +64,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut);
|
||||
IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
@@ -116,6 +116,9 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
// 批量设置截止时间
|
||||
boolean updateDeadlineBatch(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
|
||||
// 修改责任领域
|
||||
boolean updateDutyTerritory(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
|
||||
// 修改工程接口人
|
||||
boolean updateSdt(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@ package com.jero.modules.cert.collect.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestHistoryEO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -19,11 +19,11 @@ public interface IParamsCollectManifestHistoryEOService extends IService<ParamsC
|
||||
/**
|
||||
* 列表查询
|
||||
* @param page
|
||||
* @param paramsCollectManifestEO
|
||||
* @param paramsCollectManifestHistoryEO
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut);
|
||||
IPage queryList(IPage page, ParamsCollectManifestHistoryEO paramsCollectManifestHistoryEO, String cut, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
|
||||
+86
-7
@@ -12,6 +12,7 @@ import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
@@ -61,6 +62,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -248,7 +250,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut) {
|
||||
public IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut, HttpServletRequest req) {
|
||||
QueryWrapper<ParamsCollectManifestEO> queryWrapper = QueryGenerator.initQueryWrapper(paramsCollectManifestEO, req.getParameterMap());
|
||||
queryWrapper.lambda().notIn(ParamsCollectManifestEO::getControlType, ControlTypeEnum.Title.getValue())
|
||||
.orderByDesc(ParamsCollectManifestEO::getDelFlag)
|
||||
.orderByDesc(ParamsCollectManifestEO::getAddFlag)
|
||||
.orderByDesc(ParamsCollectManifestEO::getChangeFlag)
|
||||
.orderByAsc(ParamsCollectManifestEO::getNioNumber);
|
||||
|
||||
String paramsManifestId = paramsCollectManifestEO.getParamsManifestId();
|
||||
|
||||
String userTypes = paramsCollectManifestEO.getUserTypes();
|
||||
@@ -268,16 +277,21 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
|
||||
if ("sdt".equals(userTypes)) {
|
||||
paramsCollectManifestEO.setSdt(loginUser.getUsername());
|
||||
// paramsCollectManifestEO.setSdt(loginUser.getUsername());
|
||||
queryWrapper.lambda().eq(ParamsCollectManifestEO::getSdt, loginUser.getUsername())
|
||||
.in(ParamsCollectManifestEO::getState, '2','4','5','6','7','8');
|
||||
} else if ("dre".equals(userTypes)) {
|
||||
paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
||||
} else if ("sdt,dre".equals(userTypes)) {
|
||||
// paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
||||
queryWrapper.lambda().eq(ParamsCollectManifestEO::getDre, loginUser.getUsername())
|
||||
.in(ParamsCollectManifestEO::getState, '4','6','7','8');
|
||||
}/* else if ("sdt,dre".equals(userTypes)) {
|
||||
paramsCollectManifestEO.setSdt(loginUser.getUsername());
|
||||
paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
||||
} else if ("guest".equals(userTypes)) {
|
||||
}*/ else if ("guest".equals(userTypes)) {
|
||||
return page;
|
||||
}
|
||||
IPage pageInfo = paramsCollectManifestEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列
|
||||
// IPage pageInfo = paramsCollectManifestEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列
|
||||
IPage pageInfo = page(page, queryWrapper); // 查询固定列
|
||||
List<ParamsCollectManifestEO> list = pageInfo.getRecords(); // 查询固定列
|
||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列
|
||||
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
@@ -356,6 +370,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
});
|
||||
}
|
||||
|
||||
// 处理负责领域
|
||||
Map<String, Object> dutyTerritoryMap = new HashMap<>();
|
||||
dutyTerritoryMap.put("id", collectManifestEO.getId());
|
||||
dutyTerritoryMap.put("state", collectManifestEO.getState());
|
||||
dutyTerritoryMap.put("dataValue", collectManifestEO.getDutyTerritory());
|
||||
manifestMap.put("dutyTerritory", dutyTerritoryMap);
|
||||
|
||||
// 处理工程接口人
|
||||
Map<String, Object> sdtMap = new HashMap<>();
|
||||
sdtMap.put("id", collectManifestEO.getId());
|
||||
@@ -641,6 +662,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
if ("description".equals(dbFieldName)) {
|
||||
indexOfDescription = i;
|
||||
}
|
||||
if ("duty_territory".equals(dbFieldName)) {
|
||||
map.put("click1", true);
|
||||
}
|
||||
if ("sdt".equals(dbFieldName)) {
|
||||
map.put("click", true);
|
||||
}
|
||||
@@ -911,6 +935,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> getLoginUserTypes(ParamsCollectManifestVO paramsCollectManifestVO, String cut) {
|
||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getProjectId()) || StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId())) {
|
||||
throw new JeroBootException("参数不能为空!");
|
||||
}
|
||||
|
||||
String projectId = paramsCollectManifestVO.getProjectId();
|
||||
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||
|
||||
@@ -1055,6 +1083,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
LambdaQueryWrapper<ParamsCollectManifestEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ParamsCollectManifestEO::getParamsManifestId, paramsManifestId)
|
||||
.notIn(ParamsCollectManifestEO::getControlType, ControlTypeEnum.Title.getValue())
|
||||
.orderByDesc(ParamsCollectManifestEO::getUpdateTime); // 按修改时间降序
|
||||
List<ParamsCollectManifestEO> list = list(queryWrapper);
|
||||
int collectFinishNumber = (int) list.stream().filter(e->CollectManifestStateEnum.SYNC_REPORT.getValue().equals(e.getState())).count();
|
||||
@@ -1173,6 +1202,37 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
return updateBatchById(updateEOList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateDutyTerritory(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds())
|
||||
|| StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId())
|
||||
|| StringUtils.isEmpty(paramsCollectManifestVO.getDutyTerritory())) {
|
||||
throw new JeroBootException("参数不能为空!");
|
||||
}
|
||||
String paramsCollectManifestId = paramsCollectManifestVO.getIds();
|
||||
String dutyTerritory = paramsCollectManifestVO.getDutyTerritory();
|
||||
ParamsManifestEO paramsManifestEO = paramsManifestEOService.getById(paramsCollectManifestVO.getParamsManifestId());
|
||||
String projectId = paramsManifestEO.getProjectId();
|
||||
|
||||
ParamsCollectManifestEO updateEO = new ParamsCollectManifestEO();
|
||||
updateEO.setId(paramsCollectManifestId);
|
||||
updateEO.setDutyTerritory(dutyTerritory);
|
||||
|
||||
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
||||
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectId, dutyTerritory);
|
||||
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
||||
SysUser sysUser = sysUserService.getById(sdtId);
|
||||
if (ObjectUtil.isNotEmpty(sysUser)) {
|
||||
updateEO.setSdt(sysUser.getUsername()); // 设置工程接口人
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return updateById(updateEO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateSdt(ParamsCollectManifestVO paramsCollectManifestVO) {
|
||||
if (StringUtils.isEmpty(paramsCollectManifestVO.getIds()) || StringUtils.isEmpty(paramsCollectManifestVO.getSdt())) {
|
||||
@@ -1545,8 +1605,27 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
|
||||
// 复制认证类别参数
|
||||
List<String> nioNumberList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList());
|
||||
// 单独添加 控件类型为标题的参数项
|
||||
if (!isSync) { // 未上报
|
||||
List<ParamsCollectManifestEO> paramsCollectManifestEOListOfTitle = paramsCollectManifestEOMapper.listInfoOfTitle(paramsManifestId);
|
||||
if(CollectionUtil.isNotEmpty(paramsCollectManifestEOListOfTitle)) {
|
||||
for(ParamsCollectManifestEO item : paramsCollectManifestEOListOfTitle) {
|
||||
ParamsReportDetailEO addReportDetailEO = new ParamsReportDetailEO();
|
||||
BeanUtils.copyProperties(item, addReportDetailEO);
|
||||
String reportDetailId = UUID.randomUUID().toString().replace("-","");
|
||||
addReportDetailEO.setId(reportDetailId);
|
||||
addReportDetailEO.setParamsManifestId(reportId);
|
||||
addReportDetailEO.setSyncTime(syncTime);
|
||||
addReportDetailEOList.add(addReportDetailEO);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> nioNumberListOfTitle = paramsCollectManifestEOListOfTitle.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList());
|
||||
nioNumberList.addAll(nioNumberListOfTitle);
|
||||
}
|
||||
|
||||
// 复制认证类别参数
|
||||
List<CertCategoryParamsInfoPublishEO> certCategoryParamsInfoPublishEOS = certCategoryParamsInfoPublishEOService.queryListByVersionAndNio(paramsManifestEO.getParamsTemplateId(), paramsManifestEO.getParamsTemplatePublishVersion(), nioNumberList);
|
||||
for (CertCategoryParamsInfoPublishEO ccpi : certCategoryParamsInfoPublishEOS) {
|
||||
ReportCertCategoryParamsInfoEO addCcpi = new ReportCertCategoryParamsInfoEO();
|
||||
|
||||
+11
-3
@@ -2,11 +2,13 @@ package com.jero.modules.cert.collect.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.cert.collect.entity.*;
|
||||
@@ -27,6 +29,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.lang.reflect.Field;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@@ -74,10 +77,15 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage queryList(IPage page, ParamsCollectManifestEO paramsCollectManifestEO, String cut) {
|
||||
String paramsManifestId = paramsCollectManifestEO.getParamsManifestId();
|
||||
public IPage queryList(IPage page, ParamsCollectManifestHistoryEO paramsCollectManifestHistoryEO, String cut, HttpServletRequest req) {
|
||||
QueryWrapper<ParamsCollectManifestHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(paramsCollectManifestHistoryEO, req.getParameterMap());
|
||||
queryWrapper.lambda().notIn(ParamsCollectManifestHistoryEO::getControlType, ControlTypeEnum.Title.getValue())
|
||||
.orderByAsc(ParamsCollectManifestHistoryEO::getNioNumber);
|
||||
|
||||
IPage pageInfo = paramsCollectManifestHistoryEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列
|
||||
String paramsManifestId = paramsCollectManifestHistoryEO.getParamsManifestId();
|
||||
|
||||
IPage pageInfo = page(page, queryWrapper); // 查询固定列
|
||||
// IPage pageInfo = paramsCollectManifestHistoryEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列
|
||||
List<ParamsCollectManifestHistoryEO> list = pageInfo.getRecords(); // 查询固定列
|
||||
List<ParamsConfigHistoryEO> paramsConfigEOList = paramsConfigHistoryEOService.queryList(paramsManifestId); // 查询配置列
|
||||
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
|
||||
+11
-8
@@ -23,6 +23,7 @@ import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO;
|
||||
import com.jero.modules.cert.report.service.IParamsReportEOService;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
||||
import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
||||
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
@@ -126,14 +127,16 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
target.setChangeFlag(CollectManifestChangeFlagEnum.CHANGE_BEFORE.getValue()); // 设置变更标识
|
||||
|
||||
|
||||
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
||||
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectId(), source.getDutyTerritory());
|
||||
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||
if (StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
||||
SysUser sysUser = sysUserService.getById(sdtId);
|
||||
if (ObjectUtil.isNotEmpty(sysUser)) {
|
||||
target.setSdt(sysUser.getUsername());
|
||||
if (!ControlTypeEnum.Title.getValue().equals(source.getControlType())) {
|
||||
// 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段
|
||||
ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectId(), source.getDutyTerritory());
|
||||
if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) {
|
||||
String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||
if (StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段
|
||||
SysUser sysUser = sysUserService.getById(sdtId);
|
||||
if (ObjectUtil.isNotEmpty(sysUser)) {
|
||||
target.setSdt(sysUser.getUsername());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -27,6 +27,7 @@
|
||||
<result column="deadline" property="deadline" />
|
||||
<result column="params_manifest_id" property="paramsManifestId" />
|
||||
<result column="sync_time" property="syncTime" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="BaseQuerySql">
|
||||
@@ -104,6 +105,7 @@
|
||||
prd.nio_number as nio_number,
|
||||
prd.params_name as params_name,
|
||||
prd.control_type as control_type,
|
||||
prd.title_default_value as title_default_value,
|
||||
rccpi.params_number as cert_number,
|
||||
rccpi.params_name as cert_params_name
|
||||
from params_report_detail prd
|
||||
|
||||
+70
-49
@@ -411,6 +411,17 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
}
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO configDataVO = new ParamsConfigDataVO();
|
||||
configDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
configDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
configDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
if (StringUtils.isNotEmpty(paramsCollectManifestEO.getTitleDefaultValue())) {
|
||||
configDataVO.setDataValue(paramsCollectManifestEO.getTitleDefaultValue());
|
||||
}
|
||||
paramsConfigDataVOList.add(configDataVO);
|
||||
|
||||
}
|
||||
return paramsConfigDataVOList;
|
||||
}
|
||||
@@ -824,6 +835,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
for (Map<String, Object> record1 : dataList) {
|
||||
|
||||
String paramsCollectManifestId = (String) record1.get("id");
|
||||
String controlType = (String) record1.get("control_type");
|
||||
String titleDefaultValue = (String) record1.get("title_default_value");
|
||||
|
||||
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||
List<OSSFile> fileList = new ArrayList<>();
|
||||
@@ -832,70 +845,78 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
paramsConfigEOList = paramsConfigEOList.stream().filter(e->configIdList.contains(e.getId())).collect(Collectors.toList()); // 过滤出要导出的配置列
|
||||
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
||||
|
||||
String paramsConfigId = paramsConfigEO.getId();
|
||||
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("&");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData()).append("&");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(ossFileList.get(0).getFileName()).append("&");
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
||||
record1.put(paramsConfigEO.getId(), titleDefaultValue);
|
||||
} else {
|
||||
String paramsConfigId = paramsConfigEO.getId();
|
||||
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("&");
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData()).append("&");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(ossFileList.get(0).getFileName()).append("&");
|
||||
|
||||
String configData = configDataBuilder.toString();
|
||||
if (configData.contains("&")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("&"));
|
||||
}
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
}
|
||||
|
||||
record1.put(paramsConfigEO.getId(), configData);
|
||||
String configData = configDataBuilder.toString();
|
||||
if (configData.contains("&")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("&"));
|
||||
}
|
||||
|
||||
record1.put(paramsConfigEO.getId(), configData);
|
||||
}
|
||||
});
|
||||
|
||||
} else if ("2".equals(paramsReportDetailVO.getCombineFlag())) { // 合并
|
||||
String configData = "";
|
||||
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
|
||||
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
||||
record1.put("params_value", titleDefaultValue);
|
||||
} else {
|
||||
List<ParamsReportConfigDataEO> paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId);
|
||||
|
||||
String textDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getTextData()))
|
||||
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
|
||||
String textDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getTextData()))
|
||||
.map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
|
||||
|
||||
String pullDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getPullData()))
|
||||
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
|
||||
String pullDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getPullData()))
|
||||
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
|
||||
|
||||
List<String> fileNameList = new ArrayList<>();
|
||||
paramsReportConfigDataEOS.forEach(paramsReportConfigDataEO -> {
|
||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
fileNameList.add(ossFileList.get(0).getFileName());
|
||||
List<String> fileNameList = new ArrayList<>();
|
||||
paramsReportConfigDataEOS.forEach(paramsReportConfigDataEO -> {
|
||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
fileNameList.add(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("&");
|
||||
}
|
||||
});
|
||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
||||
configDataBuilder.append(pullDatas).append("&");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
||||
configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("&");
|
||||
}
|
||||
configData = configDataBuilder.toString();
|
||||
if (configData.contains("&")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("&"));
|
||||
}
|
||||
record1.put("params_value", configData);
|
||||
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("&");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
||||
configDataBuilder.append(pullDatas).append("&");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
||||
configDataBuilder.append(StringUtils.join(fileNameList, ",")).append("&");
|
||||
}
|
||||
configData = configDataBuilder.toString();
|
||||
if (configData.contains("&")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("&"));
|
||||
}
|
||||
record1.put("params_value", configData);
|
||||
|
||||
}
|
||||
record1.put("fileList", fileList);
|
||||
}
|
||||
|
||||
+7
-2
@@ -106,7 +106,7 @@ public class ParamsInfoEO implements Serializable {
|
||||
private String certCategory;
|
||||
|
||||
/**控件类型*/
|
||||
@Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10"})
|
||||
@Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10","标题_11"})
|
||||
@ApiModelProperty(value = "控件类型")
|
||||
private String controlType;
|
||||
|
||||
@@ -120,7 +120,12 @@ public class ParamsInfoEO implements Serializable {
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**附件模板*/
|
||||
/**标题默认值*/
|
||||
@Excel(name = "默认值", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
|
||||
/**附件模板*/
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplateConnectId;
|
||||
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@ public enum ControlTypeEnum {
|
||||
TEXT_FILE("文本+附件","Text+File","7"),
|
||||
PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"),
|
||||
PULL_MORE_FILE("下拉多选+附件","Pull more+File","9"),
|
||||
TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10");
|
||||
TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10"),
|
||||
Title("标题","Title","11");
|
||||
|
||||
String name;
|
||||
String enName;
|
||||
|
||||
+4
@@ -21,6 +21,7 @@
|
||||
<result column="control_verify" property="controlVerify" />
|
||||
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||
<result column="params_template_id" property="paramsTemplateId" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ParamsInfoEOResultMapWithCert" type="com.jero.modules.cert.template.entity.ParamsInfoEO">
|
||||
@@ -43,6 +44,7 @@
|
||||
<result column="control_verify" property="controlVerify" />
|
||||
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||
<result column="params_template_id" property="paramsTemplateId" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
<collection property="certCategoryParamsInfoEOList" javaType="java.util.List" ofType="com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO">
|
||||
<id column="ccpi_id" property="id" />
|
||||
<result column="ccpi_params_number" property="paramsNumber" />
|
||||
@@ -74,6 +76,7 @@
|
||||
<result column="control_verify" property="controlVerify" />
|
||||
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||
<result column="params_template_id" property="paramsTemplateId" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
<collection property="certCategoryParamsInfoEnExportList" javaType="java.util.List" ofType="com.jero.modules.cert.template.vo.CertCategoryParamsInfoEnExport">
|
||||
<id column="ccpi_id" property="id" />
|
||||
<result column="ccpi_params_number" property="paramsNumber" />
|
||||
@@ -105,6 +108,7 @@
|
||||
pi.control_verify as control_verify,
|
||||
pi.file_template_connect_id as file_template_connect_id,
|
||||
pi.params_template_id as params_template_id,
|
||||
pi.title_default_value as title_default_value,
|
||||
ccpi.id as ccpi_id,
|
||||
ccpi.params_number as ccpi_params_number,
|
||||
ccpi.params_name as ccpi_params_name,
|
||||
|
||||
+1
@@ -22,6 +22,7 @@
|
||||
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||
<result column="params_template_id" property="paramsTemplateId" />
|
||||
<result column="version" property="version" />
|
||||
<result column="title_default_value" property="titleDefaultValue" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getNewestVersion" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
|
||||
+54
-22
@@ -840,7 +840,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
if (numSheet == 0) { // 企业参数表
|
||||
if (CutEnum.EN.getValue().equals(cut)) {
|
||||
String fields[] ={ "*NIO Number", "*Is Must", "*Params Name","*Params Batch","*Duty Territory",
|
||||
"Description", "*Control Type", "Control Verify", "Control Values", "File Template"};
|
||||
"Description", "*Control Type", "Control Verify", "Control Values", "Default Value", "File Template"};
|
||||
params.setImportFields(fields);
|
||||
|
||||
ExcelImportResult<ParamsInfoEnImport> resultEn = ExcelImportUtil.importExcelMore(excelfile,ParamsInfoEnImport.class, params);
|
||||
@@ -848,7 +848,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
copyParamsInfoList(paramsInfoEOListEn, paramsInfoEOList);
|
||||
} else {
|
||||
String fields[] ={ "*NIO编号", "*是否必填", "*参数名称","*参数批次","*责任领域",
|
||||
"参数说明", "*控件类型", "控件校验", "控件备选值", "附件模板"};
|
||||
"参数说明", "*控件类型", "控件校验", "控件备选值", "默认值", "附件模板"};
|
||||
params.setImportFields(fields);
|
||||
|
||||
ExcelImportResult<ParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, ParamsInfoCnImport.class, params);
|
||||
@@ -1255,6 +1255,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
resultMap = validateMustAndLength(controlValues, "控件备选值", "Control Values", IsMustEnum.YES.getValue(), "500", false, cut);
|
||||
} else {
|
||||
resultMap = validateMustAndLength(controlValues, "控件备选值", "Control Values", IsMustEnum.NO.getValue(), "500", false, cut);
|
||||
dto.setControlValues(null);
|
||||
}
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
@@ -1267,51 +1268,81 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|| ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
resultMap = validateMustAndLength(controlVerify, "控件校验", "Control Verify", IsMustEnum.YES.getValue(), "50", false, cut);
|
||||
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(controlVerify,"控件校验", "Control Verify", "enum",controlVerifyEnumMap,null,null,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
controlVerify = (String)resultMap.get("value");
|
||||
dto.setControlVerify(controlVerify);
|
||||
|
||||
} else {
|
||||
resultMap = validateMustAndLength(controlVerify, "控件校验", "Control Verify", IsMustEnum.NO.getValue(), "50", false, cut);
|
||||
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(controlVerify,"控件校验", "Control Verify", "enum",controlVerifyEnumMap,null,null,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
dto.setControlVerify(null);
|
||||
}
|
||||
|
||||
|
||||
// 标题默认值
|
||||
String titleDefaultValue = dto.getTitleDefaultValue();
|
||||
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
||||
resultMap = validateMustAndLength(titleDefaultValue,"默认值", "Default Value", IsMustEnum.YES.getValue(),"100",false, cut);
|
||||
} else {
|
||||
resultMap = validateMustAndLength(controlVerify, "默认值", "Default Value", IsMustEnum.NO.getValue(), "100", false, cut);
|
||||
dto.setTitleDefaultValue(null);
|
||||
}
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
resultMap = getCodeByName(controlVerify,"控件校验", "Control Verify", "enum",controlVerifyEnumMap,null,null,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
controlVerify = (String)resultMap.get("value");
|
||||
dto.setControlVerify(controlVerify);
|
||||
|
||||
// 附件模板
|
||||
String fileTemplateName = dto.getFileTemplateName();
|
||||
if (StringUtils.isNotBlank(fileTemplateName)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
fileTemplateName = fileTemplateName.replace(",",",");
|
||||
fileTemplateName = fileTemplateName.replace(",", ",");
|
||||
if (fileTemplateName.contains(",")) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "附件模板只能上传一个文件;";
|
||||
} else {
|
||||
errorMsg += "File template only can upload one;";
|
||||
}
|
||||
}
|
||||
for (String fileName : fileTemplateName.split(",")) {
|
||||
List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName,null,null,null,null,null);
|
||||
List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName, null, null, null, null, null);
|
||||
// List<File> nowFileList = FileUnZip.readFileByFilename(filepath, fileName);
|
||||
if (nowFileList.size() == 0) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "附件模板压缩包中没有" + fileName + "文件; ";
|
||||
} else {
|
||||
errorMsg += "File template " + fileName + "isn't present in the cabinet;";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
try {
|
||||
FileInputStream input = new FileInputStream(nowFileList.get(0));
|
||||
MultipartFile multipartFile =
|
||||
new MockMultipartFile(nowFileList.get(0).getName(), nowFileList.get(0).getName(), "text/plain", input);
|
||||
//文件存入文件表
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(multipartFile, "", null,null);
|
||||
if (ObjectUtils.isNotEmpty(ossFile)) {
|
||||
sb.append(ossFile.getId() + ",");
|
||||
if (ControlTypeEnum.FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
try {
|
||||
FileInputStream input = new FileInputStream(nowFileList.get(0));
|
||||
MultipartFile multipartFile =
|
||||
new MockMultipartFile(nowFileList.get(0).getName(), nowFileList.get(0).getName(), "text/plain", input);
|
||||
//文件存入文件表
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(multipartFile, "", null, null);
|
||||
if (ObjectUtils.isNotEmpty(ossFile)) {
|
||||
sb.append(ossFile.getId() + ",");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} else {
|
||||
dto.setFileTemplateName(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1321,6 +1352,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
dto.setFileTemplateName(fileTemplateId);
|
||||
}
|
||||
}
|
||||
|
||||
if (countError > 0) {
|
||||
stringMessage.add(errorMsg);
|
||||
}
|
||||
@@ -1513,7 +1545,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += fieldNameCn + "不能超过" + dbLength + "个字符;";
|
||||
} else {
|
||||
errorMsg += fieldNameEn + " can not be more than" + dbLength + "char;";
|
||||
errorMsg += fieldNameEn + " can not be more than " + dbLength + " char;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
+5
@@ -67,6 +67,11 @@ public class ParamsInfoCnImport {
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**标题默认值*/
|
||||
@Excel(name = "默认值", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
|
||||
/**附件模板*/
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplateConnectId;
|
||||
|
||||
+6
-1
@@ -89,7 +89,7 @@ public class ParamsInfoEnExport {
|
||||
private String certCategory;
|
||||
|
||||
/**控件类型*/
|
||||
@Excel(name = "*Control Type", width = 15, replace = {"Text_1","Pull single_2","Pull more_3","File_4","Text+Pull single_5","Text+Pull more_6","Text+File_7","Pull single+File_8","Pull more+File_9","Text+Pull single+File_10"})
|
||||
@Excel(name = "*Control Type", width = 15, replace = {"Text_1","Pull single_2","Pull more_3","File_4","Text+Pull single_5","Text+Pull more_6","Text+File_7","Pull single+File_8","Pull more+File_9","Text+Pull single+File_10","Title_11"})
|
||||
@ApiModelProperty(value = "控件类型")
|
||||
private String controlType;
|
||||
|
||||
@@ -103,6 +103,11 @@ public class ParamsInfoEnExport {
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**标题默认值*/
|
||||
@Excel(name = "Default Value", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
|
||||
/**附件模板*/
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplateConnectId;
|
||||
|
||||
+5
@@ -67,6 +67,11 @@ public class ParamsInfoEnImport {
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**标题默认值*/
|
||||
@Excel(name = "Default Value", width = 15)
|
||||
@ApiModelProperty(value = "标题默认值")
|
||||
private String titleDefaultValue;
|
||||
|
||||
/**附件模板*/
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplateConnectId;
|
||||
|
||||
+7
-2
@@ -11,10 +11,12 @@ import com.jero.modules.lawsOpinionGather.enums.LawsOpinionGatherNodeEnum;
|
||||
import com.jero.modules.lawsOpinionGather.enums.OperatorRoleCodeEnum;
|
||||
import com.jero.modules.lawsOpinionGather.mapper.LawsProcessHistoryEOMapper;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsProcessHistoryEOService;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.job.LawsTechnologyEvaluationNodeEnum;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -120,9 +122,12 @@ public class LawsProcessHistoryEOServiceImpl extends ServiceImpl<LawsProcessHist
|
||||
if(StringUtils.isNotEmpty(data.getOperatorRoleCode())){
|
||||
data.setOperatorRoleName(OperatorRoleCodeEnum.getTextByValue(data.getOperatorRoleCode(),cut));
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(data.getTaskDefinitionKey())){
|
||||
data.setTaskDefinitionKeyName(LawsOpinionGatherNodeEnum.getTextByValue(data.getTaskDefinitionKey(),cut));
|
||||
if(StringUtils.equals(data.getFlowType(), FlowTypeEnum.FGYJSJLC.getValue())){
|
||||
data.setTaskDefinitionKeyName(LawsOpinionGatherNodeEnum.getTextByValue(data.getTaskDefinitionKey(),cut));
|
||||
}else if(StringUtils.equals(data.getFlowType(),FlowTypeEnum.FGJSPG.getValue())){
|
||||
data.setTaskDefinitionKeyName(LawsTechnologyEvaluationNodeEnum.getTextByValue(data.getTaskDefinitionKey(),cut));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+21
-3
@@ -2,11 +2,13 @@ package com.jero.modules.lawsTechnologyEvaluation.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
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.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -35,7 +37,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
public class LawsTechnologyEvaluationComplianceResultEOController extends JeroController<LawsTechnologyEvaluationComplianceResultEO, ILawsTechnologyEvaluationComplianceResultEOService> {
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationComplianceResultEOService lawsTechnologyEvaluationComplianceResultEOService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
@@ -66,8 +68,10 @@ public class LawsTechnologyEvaluationComplianceResultEOController extends JeroCo
|
||||
@AutoLog(value = "法规技术评估-评估人反馈-符合性结果表-列表查询")
|
||||
@ApiOperation(value="法规技术评估-评估人反馈-符合性结果表-列表查询", notes="法规技术评估-评估人反馈-符合性结果表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsTechnologyEvaluationComplianceResultEO>> queryList() {
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> list = lawsTechnologyEvaluationComplianceResultEOService.queryList();
|
||||
public Result<List<LawsTechnologyEvaluationComplianceResultEO>> queryList(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
|
||||
HttpServletRequest req,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut) {
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> list = lawsTechnologyEvaluationComplianceResultEOService.queryList(lawsTechnologyEvaluationComplianceResultEO,req,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@@ -155,6 +159,20 @@ public class LawsTechnologyEvaluationComplianceResultEOController extends JeroCo
|
||||
return super.exportXls(request, lawsTechnologyEvaluationComplianceResultEO, LawsTechnologyEvaluationComplianceResultEO.class, "法规技术评估-评估人反馈-符合性结果表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出zip压缩包,带文件。
|
||||
* @param response
|
||||
* @param request
|
||||
* @param lawsTechnologyEvaluationComplianceResultEO
|
||||
* @param params
|
||||
*/
|
||||
@RequestMapping(value = "/exportZip")
|
||||
public void exportZip(HttpServletResponse response,HttpServletRequest request,
|
||||
LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
|
||||
@RequestParam Map<String,Object> params) {
|
||||
this.lawsTechnologyEvaluationComplianceResultEOService.exportZip(response,request, lawsTechnologyEvaluationComplianceResultEO,params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
|
||||
+27
@@ -2,6 +2,7 @@ package com.jero.modules.lawsTechnologyEvaluation.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -15,9 +16,11 @@ 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.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -183,4 +186,28 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
return this.lawsTechnologyEvaluationEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
@ApiOperation(value="法规意见收集表中添加选择条款调用文档库数据--分页", notes="法规意见收集表中选择条款调用文档库数据--分页")
|
||||
@PostMapping(value = "/queryPageDummy")
|
||||
@ResponseBody
|
||||
public net.sf.json.JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = this.lawsTechnologyEvaluationEOService.getPageDummy(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
net.sf.json.JSONObject jsonResult = net.sf.json.JSONObject.fromObject(ok);
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
@AutoLog(value = "条款导入模板下载")
|
||||
@ApiOperation(value = "条款导入模板下载")
|
||||
@GetMapping(value = "/exportItemTemplate")
|
||||
public void exportItemTemplate(@RequestParam(name = "cut") String cut, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
this.lawsTechnologyEvaluationEOService.exportItemTemplate(cut,response,request);
|
||||
}
|
||||
|
||||
@AutoLog(value = "条款导入")
|
||||
@ApiOperation(value = "条款导入")
|
||||
@PostMapping(value = "/importItemExcel")
|
||||
public Result<?> importItemExcel(MultipartFile file, @RequestParam(name = "cut") String cut, HttpServletRequest request) throws Exception {
|
||||
List<Map<String,Object>> result = this.lawsTechnologyEvaluationEOService.importItemExcel(file,cut,request);
|
||||
return Result.OK(result);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -53,10 +53,12 @@ public class LawsTechnologyEvaluationFlowDetailEOController extends JeroControll
|
||||
public Result<?> queryPageList(LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationFlowDetailEO, req.getParameterMap());
|
||||
Page<LawsTechnologyEvaluationFlowDetailEO> page = new Page<LawsTechnologyEvaluationFlowDetailEO>(pageNo, pageSize);
|
||||
IPage<LawsTechnologyEvaluationFlowDetailEO> pageList = lawsTechnologyEvaluationFlowDetailEOService.page(page, queryWrapper);
|
||||
this.lawsTechnologyEvaluationFlowDetailEOService.disposeData(pageList.getRecords(),cut);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
+20
-2
@@ -2,6 +2,7 @@ package com.jero.modules.lawsTechnologyEvaluation.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -68,8 +69,11 @@ public class LawsTechnologyEvaluationItemResultEOController extends JeroControll
|
||||
@AutoLog(value = "法规技术评估-条款信息评估结果表-列表查询")
|
||||
@ApiOperation(value="法规技术评估-条款信息评估结果表-列表查询", notes="法规技术评估-条款信息评估结果表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsTechnologyEvaluationItemResultEO>> queryList() {
|
||||
List<LawsTechnologyEvaluationItemResultEO> list = lawsTechnologyEvaluationItemResultEOService.queryList();
|
||||
public Result<List<LawsTechnologyEvaluationItemResultEO>> queryList(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO,
|
||||
HttpServletRequest req,
|
||||
String cut) {
|
||||
List<LawsTechnologyEvaluationItemResultEO> list = lawsTechnologyEvaluationItemResultEOService.queryList(lawsTechnologyEvaluationItemResultEO,req,cut);
|
||||
this.lawsTechnologyEvaluationItemResultEOService.disposeData(list,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@@ -157,6 +161,20 @@ public class LawsTechnologyEvaluationItemResultEOController extends JeroControll
|
||||
return super.exportXls(request, lawsTechnologyEvaluationItemResultEO, LawsTechnologyEvaluationItemResultEO.class, "法规技术评估-条款信息评估结果表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出zip压缩包,带文件。
|
||||
* @param response
|
||||
* @param request
|
||||
* @param lawsTechnologyEvaluationItemResultEO
|
||||
* @param params
|
||||
*/
|
||||
@RequestMapping(value = "/exportZip")
|
||||
public void exportZip(HttpServletResponse response,HttpServletRequest request,
|
||||
LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO,
|
||||
@RequestParam Map<String,Object> params) {
|
||||
this.lawsTechnologyEvaluationItemResultEOService.exportZip(response,request, lawsTechnologyEvaluationItemResultEO,params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
|
||||
+18
-2
@@ -68,8 +68,9 @@ public class LawsTechnologyEvaluationResultEOController extends JeroController<L
|
||||
@AutoLog(value = "法规技术评估-评估结果表-列表查询")
|
||||
@ApiOperation(value="法规技术评估-评估结果表-列表查询", notes="法规技术评估-评估结果表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsTechnologyEvaluationResultEO>> queryList() {
|
||||
List<LawsTechnologyEvaluationResultEO> list = lawsTechnologyEvaluationResultEOService.queryList();
|
||||
public Result<List<LawsTechnologyEvaluationResultEO>> queryList(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO,
|
||||
HttpServletRequest req) {
|
||||
List<LawsTechnologyEvaluationResultEO> list = lawsTechnologyEvaluationResultEOService.queryList(lawsTechnologyEvaluationResultEO,req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@@ -183,4 +184,19 @@ public class LawsTechnologyEvaluationResultEOController extends JeroController<L
|
||||
lawsTechnologyEvaluationResultEOService.evaluatorSaveResult(json);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据流程实例id、法规技术评估id 查询评估结果与符合性结果接口
|
||||
* @param lawsTechnologyEvaluationResultEO
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规技术评估流程-查询评估结果与符合性结果接口")
|
||||
@ApiOperation(value="法规技术评估流程-查询评估结果与符合性结果接口", notes="法规技术评估流程-查询评估结果与符合性结果接口")
|
||||
@GetMapping(value = "/queryEvaluationResultAndComplianceResult")
|
||||
public Result<?> queryEvaluationResultAndComplianceResult(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO,
|
||||
HttpServletRequest req) {
|
||||
JSONObject json = lawsTechnologyEvaluationResultEOService.queryEvaluationResultAndComplianceResult(lawsTechnologyEvaluationResultEO,req);
|
||||
return Result.OK(json);
|
||||
}
|
||||
}
|
||||
|
||||
+8
-4
@@ -1,21 +1,19 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
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;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
@@ -36,6 +34,8 @@ public class LawsTechnologyEvaluationComplianceResultEO implements Serializable
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String ids;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@@ -70,10 +70,14 @@ public class LawsTechnologyEvaluationComplianceResultEO implements Serializable
|
||||
@Excel(name = "符合性结果", width = 15)
|
||||
@ApiModelProperty(value = "符合性结果")
|
||||
private java.lang.String complianceResult;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String complianceResultName;
|
||||
|
||||
/**流程实例id*/
|
||||
@Excel(name = "流程实例id", width = 15)
|
||||
@ApiModelProperty(value = "流程实例id")
|
||||
private java.lang.String actiProcInstId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<LawsTechnologyEvaluationResultEO> lawsTechnologyEvaluationResultEOList;
|
||||
}
|
||||
|
||||
+4
@@ -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;
|
||||
@@ -86,4 +87,7 @@ public class LawsTechnologyEvaluationFlowDetailEO implements Serializable {
|
||||
@ApiModelProperty(value = "评估人id")
|
||||
private java.lang.String evaluatorId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String evaluatorName;
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -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;
|
||||
@@ -85,6 +86,8 @@ public class LawsTechnologyEvaluationItemResultEO implements Serializable {
|
||||
@Excel(name = "评估方式", width = 15)
|
||||
@ApiModelProperty(value = "评估方式")
|
||||
private java.lang.String evaluationMethods;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String evaluationMethodsName;
|
||||
|
||||
/**技术文件名称*/
|
||||
@Excel(name = "技术文件名称", width = 15)
|
||||
@@ -105,11 +108,15 @@ public class LawsTechnologyEvaluationItemResultEO implements Serializable {
|
||||
@Excel(name = "附件", width = 15)
|
||||
@ApiModelProperty(value = "附件")
|
||||
private java.lang.String accessoryFile;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String accessoryFileName;
|
||||
|
||||
/**符合性结果*/
|
||||
@Excel(name = "符合性结果", width = 15)
|
||||
@ApiModelProperty(value = "符合性结果")
|
||||
private java.lang.String complianceResult;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String complianceResultName;
|
||||
|
||||
/**评估人id*/
|
||||
@Excel(name = "评估人id", width = 15)
|
||||
|
||||
+6
-5
@@ -1,22 +1,18 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.entity;
|
||||
|
||||
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;
|
||||
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: 法规技术评估-评估结果表
|
||||
@@ -85,6 +81,8 @@ public class LawsTechnologyEvaluationResultEO implements Serializable {
|
||||
@Excel(name = "附件", width = 15)
|
||||
@ApiModelProperty(value = "附件")
|
||||
private java.lang.String accessoryFile;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String accessoryFileName;
|
||||
|
||||
/**提出时间*/
|
||||
@Excel(name = "提出时间", width = 15, format = "yyyy-MM-dd")
|
||||
@@ -98,4 +96,7 @@ public class LawsTechnologyEvaluationResultEO implements Serializable {
|
||||
@ApiModelProperty(value = "流程实例id")
|
||||
private java.lang.String actiProcInstId;
|
||||
|
||||
@ApiModelProperty(value = "符合性结果id")
|
||||
private java.lang.String complianceResultId;
|
||||
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.enums;
|
||||
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
|
||||
/**
|
||||
* 符合性结果枚举类
|
||||
*/
|
||||
public enum ComplianceResultEnum {
|
||||
CONFORMITY("符合","Compliance","Compliance"),
|
||||
INCONFORMITY("不符合","Non-Compliance","Non-Compliance"),
|
||||
;
|
||||
|
||||
String name;
|
||||
String enName;
|
||||
String value;
|
||||
|
||||
private ComplianceResultEnum(String name,String enName, String value) {
|
||||
this.name = name;
|
||||
this.enName = enName;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
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 getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value, String cut) {
|
||||
ComplianceResultEnum[] values = values();
|
||||
for (ComplianceResultEnum complianceResultEnum : values) {
|
||||
if (complianceResultEnum.value.equals(value)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return complianceResultEnum.name;
|
||||
}else {
|
||||
return complianceResultEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
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.wkflow.feginClient.WorkFlowFeignClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.jeecg.modules.jmreport.common.constant.CommonConstant;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 法规技术评估 - 定时器
|
||||
* 作用:当前日期大于等于截止日志的时候,把该数据的流程状态,更新为已完成,同时把当前这条数据的所有待办任务提交
|
||||
*/
|
||||
@Slf4j
|
||||
public class LawsTechnologyEvaluationJob implements Job {
|
||||
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationEOService lawsTechnologyEvaluationEOService;
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationFlowDetailEOService lawsTechnologyEvaluationFlowDetailEOService;
|
||||
@Autowired
|
||||
private WorkFlowFeignClient workFlowFeignClient;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("法规技术评估流程,定时任务开启 =====================================================");
|
||||
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus, GatherResultEnum.UNDERWAY.getValue());
|
||||
List<LawsTechnologyEvaluationEO> lawsTechnologyEvaluationEOList = this.lawsTechnologyEvaluationEOService.list(queryWrapper);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(lawsTechnologyEvaluationEOList)) {
|
||||
Date currentDate = new Date();
|
||||
//过滤截止日期小于当前日期的法规技术评估数据
|
||||
List<LawsTechnologyEvaluationEO> updateLawsTechnologyEvaluationEOList = lawsTechnologyEvaluationEOList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
if(currentDate.after(e.getEndTime())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(updateLawsTechnologyEvaluationEOList)){
|
||||
List<String> lawsTechnologyEvaluationIdList = updateLawsTechnologyEvaluationEOList.stream().map(LawsTechnologyEvaluationEO::getId).distinct().collect(Collectors.toList());
|
||||
|
||||
//获取这些法规技术评估数据的下级流程明细数据。
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> flowDetailEOQueryWrapper = new QueryWrapper<>();
|
||||
flowDetailEOQueryWrapper.lambda().in(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationIdList);
|
||||
List<LawsTechnologyEvaluationFlowDetailEO> lawsTechnologyEvaluationFlowDetailEOList = lawsTechnologyEvaluationFlowDetailEOService.list(flowDetailEOQueryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationFlowDetailEOList)){
|
||||
String actiProcInstIds = lawsTechnologyEvaluationFlowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(","));
|
||||
Result<String> result = this.workFlowFeignClient.completeTaskByPids(actiProcInstIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
updateLawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> {
|
||||
lawsTechnologyEvaluationEO.setFlowStatus(GatherResultEnum.COMPLETED.getValue());
|
||||
});
|
||||
this.lawsTechnologyEvaluationEOService.updateBatchById(updateLawsTechnologyEvaluationEOList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
log.info("法规技术评估流程,定时任务结束 =====================================================");
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.job;
|
||||
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
|
||||
/**
|
||||
* 法规技术评估 节点枚举类
|
||||
*/
|
||||
public enum LawsTechnologyEvaluationNodeEnum {
|
||||
|
||||
ENGINEER_INITIATED("fggcsfq","法规工程师发起","Engineer initiated"),
|
||||
APPRAISERS_EVALUATION("pgrqr","评估人评估","Appraiser's evaluation"),
|
||||
SPONSOR_REVIEW("fqrsc","发起人审查","Sponsor review"),
|
||||
;
|
||||
|
||||
String key;
|
||||
String cnName;
|
||||
String enName;
|
||||
|
||||
private LawsTechnologyEvaluationNodeEnum(String key, String cnName, String enName) {
|
||||
this.key = key;
|
||||
this.cnName = cnName;
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getCnName() {
|
||||
return cnName;
|
||||
}
|
||||
|
||||
public void setCnName(String cnName) {
|
||||
this.cnName = cnName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String key,String cut) {
|
||||
LawsTechnologyEvaluationNodeEnum[] values = values();
|
||||
for (LawsTechnologyEvaluationNodeEnum lawsOpinionGatherNodeEnum : values) {
|
||||
if (lawsOpinionGatherNodeEnum.key.equals(key)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return lawsOpinionGatherNodeEnum.cnName;
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
return lawsOpinionGatherNodeEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+12
-1
@@ -2,7 +2,12 @@ package com.jero.modules.lawsTechnologyEvaluation.service;
|
||||
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 法规技术评估-评估人反馈-符合性结果表
|
||||
@@ -57,5 +62,11 @@ public interface ILawsTechnologyEvaluationComplianceResultEOService extends ISer
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> queryList();
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> queryList(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
|
||||
HttpServletRequest req,
|
||||
String cut);
|
||||
|
||||
void exportZip(HttpServletResponse response, HttpServletRequest request,
|
||||
LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
|
||||
Map<String, Object> params);
|
||||
}
|
||||
|
||||
+12
@@ -1,10 +1,16 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 法规技术评估
|
||||
@@ -74,4 +80,10 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<LawsTechnologyEvaluationEO> records, String cut);
|
||||
|
||||
IPage getPageDummy(Map<String, Object> parameter);
|
||||
|
||||
void exportItemTemplate(String cut, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
List<Map<String,Object>> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception;
|
||||
}
|
||||
|
||||
+7
@@ -67,4 +67,11 @@ public interface ILawsTechnologyEvaluationFlowDetailEOService extends IService<L
|
||||
* @return
|
||||
*/
|
||||
Result<?> processCall(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<LawsTechnologyEvaluationFlowDetailEO> datas, String cut);
|
||||
}
|
||||
|
||||
+13
-1
@@ -4,7 +4,11 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 法规技术评估-条款信息评估结果表
|
||||
@@ -59,7 +63,9 @@ public interface ILawsTechnologyEvaluationItemResultEOService extends IService<L
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<LawsTechnologyEvaluationItemResultEO> queryList();
|
||||
List<LawsTechnologyEvaluationItemResultEO> queryList(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO,
|
||||
HttpServletRequest req,
|
||||
String cut);
|
||||
|
||||
/**
|
||||
* 流程调用
|
||||
@@ -73,4 +79,10 @@ public interface ILawsTechnologyEvaluationItemResultEOService extends IService<L
|
||||
* @param jsonObject
|
||||
*/
|
||||
void batchUpdate(JSONObject jsonObject);
|
||||
|
||||
void disposeData(List<LawsTechnologyEvaluationItemResultEO> datas, String cut);
|
||||
|
||||
void exportZip(HttpServletResponse response, HttpServletRequest request, LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, Map<String, Object> params);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+14
-1
@@ -3,6 +3,8 @@ package com.jero.modules.lawsTechnologyEvaluation.service;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -58,11 +60,22 @@ public interface ILawsTechnologyEvaluationResultEOService extends IService<LawsT
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<LawsTechnologyEvaluationResultEO> queryList();
|
||||
List<LawsTechnologyEvaluationResultEO> queryList(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO,
|
||||
HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 评估人保存/提交
|
||||
* @param json
|
||||
*/
|
||||
void evaluatorSaveResult(JSONObject json);
|
||||
|
||||
/**
|
||||
* 根据流程实例id、法规技术评估id 查询评估结果与符合性结果接口
|
||||
* @param lawsTechnologyEvaluationResultEO
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
JSONObject queryEvaluationResultAndComplianceResult(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, HttpServletRequest req);
|
||||
|
||||
void disposeData(List<LawsTechnologyEvaluationResultEO> datas, String cut);
|
||||
}
|
||||
|
||||
+247
-2
@@ -1,12 +1,49 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
import com.aliyuncs.utils.IOUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.FileUtils;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationComplianceResultEOMapper;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.util.PDFUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
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;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @Description: 法规技术评估-评估人反馈-符合性结果表
|
||||
@@ -15,7 +52,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends ServiceImpl<LawsTechnologyEvaluationComplianceResultEOMapper, LawsTechnologyEvaluationComplianceResultEO> implements ILawsTechnologyEvaluationComplianceResultEOService {
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationResultEOService evaluationResultEOService;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -83,7 +127,208 @@ public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends Servi
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsTechnologyEvaluationComplianceResultEO> queryList() {
|
||||
return list();
|
||||
public List<LawsTechnologyEvaluationComplianceResultEO> queryList(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
|
||||
HttpServletRequest req,
|
||||
String cut) {
|
||||
QueryWrapper<LawsTechnologyEvaluationComplianceResultEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationComplianceResultEO, req.getParameterMap());
|
||||
if(org.apache.commons.lang3.StringUtils.isNotEmpty(lawsTechnologyEvaluationComplianceResultEO.getIds())){
|
||||
queryWrapper.lambda().in(LawsTechnologyEvaluationComplianceResultEO::getId,lawsTechnologyEvaluationComplianceResultEO.getIds().split(","));
|
||||
}
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> complianceResultEOList = this.baseMapper.selectList(queryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(complianceResultEOList)){
|
||||
|
||||
List<String> complianceResultIdList = complianceResultEOList.stream().map(LawsTechnologyEvaluationComplianceResultEO::getId).distinct().collect(Collectors.toList());
|
||||
QueryWrapper<LawsTechnologyEvaluationResultEO> evaluationResultEOQueryWrapper = new QueryWrapper<>();
|
||||
evaluationResultEOQueryWrapper.lambda().in(LawsTechnologyEvaluationResultEO::getComplianceResultId,complianceResultIdList);
|
||||
List<LawsTechnologyEvaluationResultEO> evaluationResultEOList = this.evaluationResultEOService.list(evaluationResultEOQueryWrapper);
|
||||
this.evaluationResultEOService.disposeData(evaluationResultEOList,cut);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(evaluationResultEOList)){
|
||||
for (LawsTechnologyEvaluationComplianceResultEO complianceResultEO : complianceResultEOList) {
|
||||
List<LawsTechnologyEvaluationResultEO> lawsTechnologyEvaluationResultEOList = evaluationResultEOList.stream().filter(evaluationResultEO ->{
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(complianceResultEO.getId(),evaluationResultEO.getComplianceResultId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
complianceResultEO.setLawsTechnologyEvaluationResultEOList(lawsTechnologyEvaluationResultEOList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return complianceResultEOList;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void exportZip(HttpServletResponse response, HttpServletRequest request,
|
||||
LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO,
|
||||
Map<String, Object> params) {
|
||||
String ids = (String)params.get("ids");
|
||||
String cut = (String)params.get("cut");
|
||||
|
||||
if(!StringUtils.isEmpty(ids)){
|
||||
lawsTechnologyEvaluationComplianceResultEO.setIds(ids);
|
||||
}
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> exportData = this.queryList(lawsTechnologyEvaluationComplianceResultEO, request, cut);
|
||||
this.disposeData(exportData,cut);
|
||||
|
||||
String title = "";
|
||||
String bottomTitle = "";
|
||||
String fileName = "";
|
||||
if(org.apache.commons.lang3.StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
title = "相关章节,问题说明,附件";
|
||||
bottomTitle = "符合性结果:";
|
||||
fileName = "评估结果 " + ".xlsx";
|
||||
}else if(org.apache.commons.lang3.StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Related section,Problem description,Accessory";
|
||||
bottomTitle = "Compliance results:";
|
||||
fileName = "Evaluation results " + ".xlsx";
|
||||
}
|
||||
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
|
||||
String path = uploadpath + "/tempZip/itemEvaluationResults/" + System.currentTimeMillis();
|
||||
|
||||
try {
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + fileName);
|
||||
response.setContentType("application/force-download");
|
||||
|
||||
//设置导出数据
|
||||
if(CollectionUtils.isNotEmpty(exportData)) {
|
||||
int size = exportData.size();
|
||||
for (int i = 0; i < exportData.size(); i++){
|
||||
//使用评估人的名字命名sheet页
|
||||
HSSFSheet sheet = workbook.createSheet(exportData.get(i).getCreateBy());
|
||||
|
||||
CellStyle titleCellStyle = workbook.createCellStyle();
|
||||
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
titleCellStyle.setWrapText(true);//自动换行
|
||||
|
||||
Row firstRow = sheet.createRow(0);
|
||||
|
||||
//创建表头
|
||||
String[] titleArr = title.split(",");
|
||||
for (int j=0; j<=3; j++){
|
||||
sheet.setColumnWidth(j,4000);
|
||||
Cell cell = firstRow.createCell(j);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(titleArr[j]);
|
||||
}
|
||||
|
||||
//获取这个评估人填写的评估结果
|
||||
List<LawsTechnologyEvaluationResultEO> lawsTechnologyEvaluationResultEOList = exportData.get(i).getLawsTechnologyEvaluationResultEOList();
|
||||
int evaluationResultListSize = lawsTechnologyEvaluationResultEOList.size();
|
||||
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationResultEOList)){
|
||||
for (int dataIndex = 0; dataIndex < lawsTechnologyEvaluationResultEOList.size(); dataIndex++) {
|
||||
Row dataRow = sheet.createRow(dataIndex + 1);
|
||||
dataRow.createCell(0).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getRelatedSection());
|
||||
dataRow.createCell(1).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getIssueOrSuggest());
|
||||
dataRow.createCell(2).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getAccessoryFileName());
|
||||
}
|
||||
}
|
||||
|
||||
//把符合性结果设置进excel表格中。
|
||||
Row bottomRow = sheet.createRow(evaluationResultListSize + 1);
|
||||
Cell bottomRowFirstCell = bottomRow.getCell(0);
|
||||
bottomRowFirstCell.setCellStyle(titleCellStyle);
|
||||
bottomRowFirstCell.setCellValue(bottomTitle);
|
||||
|
||||
Cell bottomRowSecondCell = bottomRow.getCell(1);
|
||||
bottomRowSecondCell.setCellValue(exportData.get(i).getComplianceResultName());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
File fileTemp = new File(path);
|
||||
if (fileTemp.exists()) {
|
||||
fileTemp.delete();
|
||||
}
|
||||
fileTemp.mkdirs();
|
||||
//excel
|
||||
OutputStream excelOS = new FileOutputStream(path + File.separator + fileName);
|
||||
workbook.write(excelOS);
|
||||
excelOS.flush();
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
for (LawsTechnologyEvaluationComplianceResultEO data : exportData) {
|
||||
List<LawsTechnologyEvaluationResultEO> evaluationResultEOList = data.getLawsTechnologyEvaluationResultEOList();
|
||||
if(CollectionUtils.isNotEmpty(evaluationResultEOList)){
|
||||
for (LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO : evaluationResultEOList) {
|
||||
String accessoryFile = lawsTechnologyEvaluationResultEO.getAccessoryFile();
|
||||
|
||||
List<OSSFile> fileInfosList = iOSSFileService.getFileInfos(accessoryFile);
|
||||
if (fileInfosList.size() != 0) {
|
||||
for (OSSFile ossFile : fileInfosList) {
|
||||
String url = ossFile.getUrl();
|
||||
//判断文件是否存在
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(url)){
|
||||
//判断文件是否存在
|
||||
boolean b = CosBootUtil.doesObjectExist(url);
|
||||
if(b){
|
||||
InputStream download = CosBootUtil.download(url);
|
||||
if(url.endsWith(".pdf") || url.endsWith(".PDF")){
|
||||
String currentTime = sdf.format(new Date());
|
||||
String waterContent = loginUser.getUsername() + " " + currentTime;
|
||||
File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent);
|
||||
download = new FileInputStream(newFile.getPath());
|
||||
}
|
||||
//复制文件
|
||||
FileUtils.copyFile(download, path + File.separator + ossFile.getFileName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
ZipUtil.zip(path, path + ".zip");
|
||||
//文件
|
||||
FileInputStream fis = new FileInputStream(path + ".zip");
|
||||
os = response.getOutputStream();
|
||||
|
||||
int len = 0;
|
||||
while ((len = fis.read()) != -1) {
|
||||
os.write(len);
|
||||
}
|
||||
os.flush();
|
||||
fis.close();
|
||||
excelOS.close();
|
||||
|
||||
}catch (IOException ex){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("下载文件失败");
|
||||
}else{
|
||||
throw new JeroBootException("Failed to download file");
|
||||
}
|
||||
}finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
File file = new File(path);
|
||||
FileUtil.deleteContents(file);
|
||||
File fileTemp = new File(path + ".zip");
|
||||
FileUtil.deleteContents(fileTemp);
|
||||
}
|
||||
}
|
||||
|
||||
public void disposeData(List<LawsTechnologyEvaluationComplianceResultEO> datas,String cut){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
for (LawsTechnologyEvaluationComplianceResultEO data : datas) {
|
||||
if(!StringUtils.isEmpty(data.getComplianceResult())){
|
||||
data.setComplianceResultName(ComplianceResultEnum.getTextByValue(data.getComplianceResult(),cut));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+262
-4
@@ -1,29 +1,55 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.ModuleEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
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.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
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.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.io.File;
|
||||
import java.io.OutputStream;
|
||||
import java.util.*;
|
||||
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;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @Description: 法规技术评估
|
||||
@@ -32,10 +58,23 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechnologyEvaluationEOMapper, LawsTechnologyEvaluationEO> implements ILawsTechnologyEvaluationEOService {
|
||||
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
@Autowired
|
||||
private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private BussDocumentLibraryEOMapper bussDocumentLibraryEOMapper;
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
@Autowired
|
||||
private ISarFileSplitInfoService sarFileSplitInfoService;
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -154,6 +193,225 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage getPageDummy(Map<String, Object> parameter) {
|
||||
String cut = (String) parameter.get("cut");//中英文切换标识
|
||||
//文档库字段
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
|
||||
//需要查询的字段
|
||||
List<String> fieldListQuery = new ArrayList<>();
|
||||
fieldListQuery.add("serial_number");
|
||||
fieldListQuery.add("title");
|
||||
fieldListQuery.add("title_en");
|
||||
fieldListQuery.add("state");
|
||||
fieldListQuery.add("region");
|
||||
fieldListQuery.add("technology_territory");
|
||||
fieldListQuery.add("xin1_che1_xing2_shi2_shi1_ri4_qi1");
|
||||
fieldListQuery.add("implement_time");
|
||||
fieldListQuery.add("corresponding_standard");
|
||||
|
||||
List<String> fieldListNew = new ArrayList<>();
|
||||
fieldListNew.add("id");
|
||||
|
||||
//过滤出文件字段
|
||||
List<OnlCgformField> fileFieldList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType()))
|
||||
.collect(Collectors.toList());
|
||||
for (OnlCgformField onlCgformField : fileFieldList) {
|
||||
fieldListQuery.add(onlCgformField.getDbFieldName());
|
||||
}
|
||||
|
||||
//转时间格式
|
||||
for (String field : fieldListQuery) {
|
||||
String fieldTemp = null;
|
||||
if ("xin1_che1_xing2_shi2_shi1_ri4_qi1".equals(field) || "implement_time".equals(field)) {
|
||||
String fieldNew = "date_format(" + field + ", '%Y-%m-%d')";
|
||||
fieldTemp = "case when " + fieldNew + " is null then \"\" else " + fieldNew + " end " + field;
|
||||
fieldListNew.add(fieldTemp);
|
||||
} else {
|
||||
fieldTemp = "case when " + field + " is null then \"\" else " + field + " end " + field;
|
||||
fieldListNew.add(fieldTemp);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> fileFieldStrList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())).map(OnlCgformField::getDbFieldName)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//封装查询条件
|
||||
String condition = this.bussDocumentLibraryEOService.getConditionStr(parameter);
|
||||
int pageNo = Integer.parseInt(parameter.get("pageNo").toString());
|
||||
int pageSize = Integer.parseInt(parameter.get("pageSize").toString());
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
|
||||
IPage infoPage = this.bussDocumentLibraryEOMapper.getInfoPage(page, " " + com.jero.modules.system.util.StringUtils.join(fieldListNew, ","), condition);
|
||||
|
||||
//树形数据字典
|
||||
List<SysCategory> categoryList = this.sysCategoryService.list();
|
||||
//过滤出树形字段
|
||||
List<OnlCgformField> treeFieldList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
||||
List<Map> records = infoPage.getRecords();
|
||||
//数据字典
|
||||
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.selectItemsAll();
|
||||
//下拉选处理数据字典
|
||||
for (Map record : records) {
|
||||
Map<String, Object> record1 = (Map) record;
|
||||
String technology_territory = (String)record1.get("technology_territory");
|
||||
|
||||
List<String> connectIdList = new ArrayList<>();
|
||||
|
||||
for (Map.Entry<String, Object> entry : record1.entrySet()) {
|
||||
//下拉选处理数据字典
|
||||
this.bussDocumentLibraryEOService.dictItem(sysDictItems, entry, cut, fieldList,null);
|
||||
this.bussDocumentLibraryEOService.treeDictItem(categoryList, entry, treeFieldList, cut,null);
|
||||
if(fileFieldStrList.contains(entry.getKey())){
|
||||
if(entry.getValue()!=null){
|
||||
connectIdList.add(entry.getValue().toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
record1.put("technology_territory_id",technology_territory);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(connectIdList)){
|
||||
//根据id查询当前文档库数据是否有拆分数据。
|
||||
QueryWrapper<SarFileSplitInfoEO> splitInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
splitInfoEOQueryWrapper.lambda().in(SarFileSplitInfoEO::getConnectId,connectIdList);
|
||||
List<SarFileSplitInfoEO> sarFileSplitInfoList = new ArrayList<>();
|
||||
|
||||
List<SarFileSplitInfoEO> sarFileSplitInfoListTemp = sarFileSplitInfoService.list(splitInfoEOQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(sarFileSplitInfoListTemp)){
|
||||
sarFileSplitInfoListTemp.forEach(splitInfo -> {
|
||||
//查询出已回传的数据
|
||||
String flag = ""; // 1 已回传 0未回传。
|
||||
if(StringUtils.isNotEmpty(splitInfo.getFileId())){
|
||||
flag = "1";
|
||||
sarFileSplitInfoList.add(splitInfo);
|
||||
}else {
|
||||
flag = "0";
|
||||
}
|
||||
splitInfo.setFlag(flag);
|
||||
});
|
||||
record1.put("sarFileSplitInfoList",sarFileSplitInfoList);
|
||||
}
|
||||
}
|
||||
}
|
||||
return infoPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportItemTemplate(String cut, HttpServletResponse response, HttpServletRequest request) {
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
String fileOriName = "";
|
||||
String filePath = uploadpath + File.separator + fileOriName;
|
||||
try {
|
||||
String title = "";
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
title = "条款号,条款名称,条款内容";
|
||||
fileOriName = "条款信息导入模板.xls";
|
||||
} else {
|
||||
title = "Item num,Item name,Item Contents";
|
||||
fileOriName = "Item information is imported into the template.xls";
|
||||
}
|
||||
|
||||
//创建临时文件夹
|
||||
File nowFile = new File(filePath);
|
||||
if (nowFile.exists()) {
|
||||
nowFile.delete();
|
||||
}
|
||||
nowFile.mkdirs();
|
||||
|
||||
HSSFSheet sheet = workbook.createSheet("sheet1");
|
||||
sheet.setDefaultColumnWidth(16);//列宽
|
||||
HSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||
cellStyle.setWrapText(true);//自动换行
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
|
||||
HSSFCellStyle cellStyleTemp = workbook.createCellStyle();
|
||||
cellStyleTemp.setWrapText(true);//自动换行
|
||||
|
||||
String explainInfo = null;
|
||||
|
||||
HSSFRichTextString explain = new HSSFRichTextString(explainInfo);
|
||||
|
||||
//表头
|
||||
Row row = sheet.createRow(0);//开始创建标题行
|
||||
String[] headerArr = title.split(",");
|
||||
for (int m = 0; m < headerArr.length; m++) {
|
||||
row.createCell(m).setCellValue(headerArr[m]);
|
||||
}
|
||||
|
||||
/*Row rowExplain = sheet.createRow(1);
|
||||
short height = (short) (7 * 200);
|
||||
rowExplain.setHeight((short) height);
|
||||
Cell cell = rowExplain.createCell(0);
|
||||
cell.setCellValue(explain);
|
||||
cell.setCellStyle(cellStyleTemp);*/
|
||||
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=\"" + fileOriName + ".xls");
|
||||
response.setContentType("application/force-download");
|
||||
response.flushBuffer();
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception {
|
||||
//校验文件格式
|
||||
int pos = file.getOriginalFilename().lastIndexOf(".");
|
||||
String fileSuffixStr = file.getOriginalFilename().substring(pos+1).toLowerCase();
|
||||
if(!StringUtils.equals(fileSuffixStr,"xls")){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("请上传xls文件");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Please upload a xls file");
|
||||
}
|
||||
}
|
||||
String fileName = file.getOriginalFilename();
|
||||
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
||||
File excelFile = File.createTempFile(fileName, fileSuffixStr);
|
||||
file.transferTo(excelFile);
|
||||
Workbook workbook = WorkbookFactory.create(excelFile);
|
||||
if (workbook != null) {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
if (sheet != null) {
|
||||
int rowNos = sheet.getPhysicalNumberOfRows();// 得到excel的总记录条数
|
||||
for (int i = 0; i < rowNos ; i++) {
|
||||
Row row = sheet.getRow(i + 1);
|
||||
if(row != null){
|
||||
String itemNum = row.getCell(0, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString();
|
||||
String itemName = row.getCell(1, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString();
|
||||
String itemContents = row.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString();
|
||||
Map<String,Object> itemInfoMap = new HashMap<>();
|
||||
String itemId = UUID.randomUUID().toString().replace("-", "");
|
||||
itemInfoMap.put("itemId",itemId);
|
||||
itemInfoMap.put("itemNum",itemNum);
|
||||
itemInfoMap.put("itemName",itemName);
|
||||
itemInfoMap.put("itemContent",itemContents);
|
||||
result.add(itemInfoMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
|
||||
+55
@@ -2,6 +2,7 @@ package com.jero.modules.lawsTechnologyEvaluation.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||
@@ -9,14 +10,21 @@ import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluation
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationFlowDetailEOService;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
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.ArrayList;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Description: 法规技术评估表-流程明细
|
||||
@@ -25,8 +33,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class LawsTechnologyEvaluationFlowDetailEOServiceImpl extends ServiceImpl<LawsTechnologyEvaluationFlowDetailEOMapper, LawsTechnologyEvaluationFlowDetailEO> implements ILawsTechnologyEvaluationFlowDetailEOService {
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -122,8 +134,51 @@ public class LawsTechnologyEvaluationFlowDetailEOServiceImpl extends ServiceImpl
|
||||
if(CollectionUtils.isNotEmpty(detailList)){
|
||||
this.saveBatch(detailList);
|
||||
}
|
||||
}else if(StringUtils.equals(operatorType, OperatorTypeEnum.QUERY.getValue())){
|
||||
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationId);
|
||||
List<LawsTechnologyEvaluationFlowDetailEO> lawsTechnologyEvaluationFlowDetailEOS = this.baseMapper.selectList(queryWrapper);
|
||||
Result<List<LawsTechnologyEvaluationFlowDetailEO>> objectResult = new Result<>();
|
||||
objectResult.setResult(lawsTechnologyEvaluationFlowDetailEOS);
|
||||
objectResult.setSuccess(true);
|
||||
return objectResult;
|
||||
}
|
||||
|
||||
return new Result<>().success("调用成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<LawsTechnologyEvaluationFlowDetailEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
for (LawsTechnologyEvaluationFlowDetailEO data : datas) {
|
||||
String evaluatorId = data.getEvaluatorId();
|
||||
if(StringUtils.isNotEmpty(evaluatorId)){
|
||||
userIdList.add(evaluatorId);
|
||||
}
|
||||
}
|
||||
List<SysUser> sysUserList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||
sysUserList = sysUserService.querySysUserListByIdList(userIdList);
|
||||
}
|
||||
|
||||
for (LawsTechnologyEvaluationFlowDetailEO data : datas) {
|
||||
if(CollectionUtils.isNotEmpty(sysUserList)){
|
||||
String evaluatorId = data.getEvaluatorId();
|
||||
if(StringUtils.isNotEmpty(evaluatorId)){
|
||||
String evaluatorName = sysUserList.stream().filter(sysUser -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(sysUser.getId(), data.getEvaluatorId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(SysUser::getUsername).distinct().collect(Collectors.joining(","));
|
||||
data.setEvaluatorName(evaluatorName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+236
-6
@@ -1,23 +1,50 @@
|
||||
package com.jero.modules.lawsTechnologyEvaluation.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyuncs.utils.IOUtils;
|
||||
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.exception.JeroBootException;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.FileUtils;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationItemResultEOMapper;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationItemResultEOService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.util.PDFUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.io.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
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;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @Description: 法规技术评估-条款信息评估结果表
|
||||
@@ -26,8 +53,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl<LawsTechnologyEvaluationItemResultEOMapper, LawsTechnologyEvaluationItemResultEO> implements ILawsTechnologyEvaluationItemResultEOService {
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -94,8 +129,12 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsTechnologyEvaluationItemResultEO> queryList() {
|
||||
return list();
|
||||
public List<LawsTechnologyEvaluationItemResultEO> queryList(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO,
|
||||
HttpServletRequest req,
|
||||
String cut) {
|
||||
QueryWrapper<LawsTechnologyEvaluationItemResultEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationItemResultEO, req.getParameterMap());
|
||||
List<LawsTechnologyEvaluationItemResultEO> itemResultEOList = this.baseMapper.selectList(queryWrapper);
|
||||
return itemResultEOList;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -147,4 +186,195 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
||||
this.updateBatchById(itemResultEOList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<LawsTechnologyEvaluationItemResultEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
for (LawsTechnologyEvaluationItemResultEO data : datas) {
|
||||
String evaluationMethods = data.getEvaluationMethods();
|
||||
List<String> evaluationMethodsList = Arrays.asList(evaluationMethods.split(","));
|
||||
String name = getTreeName(cut, categoryList, evaluationMethodsList);
|
||||
data.setEvaluationMethodsName(name);
|
||||
if(StringUtils.isNotEmpty(data.getComplianceResult())){
|
||||
data.setComplianceResultName(ComplianceResultEnum.getTextByValue(data.getComplianceResult(),cut));
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(data.getAccessoryFile())){
|
||||
List<OSSFile> accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile());
|
||||
String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
data.setAccessoryFileName(accessoryFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportZip(HttpServletResponse response, HttpServletRequest request, LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, Map<String, Object> params) {
|
||||
String ids = (String)params.get("ids");
|
||||
String cut = (String)params.get("cut");
|
||||
QueryWrapper<LawsTechnologyEvaluationItemResultEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationItemResultEO, request.getParameterMap());
|
||||
if(StringUtils.isNotEmpty(ids)){
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
queryWrapper.lambda().in(LawsTechnologyEvaluationItemResultEO::getId,idList);
|
||||
}
|
||||
List<LawsTechnologyEvaluationItemResultEO> exportData = this.baseMapper.selectList(queryWrapper);
|
||||
this.disposeData(exportData,cut);
|
||||
|
||||
String title = "";
|
||||
String fileName = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
title = "条款号,条款名称,条款内容,评估人,评估方式,技术文件名称,章节,符合性结果,意见,附件,反馈时间";
|
||||
fileName = "条款评估结果 " + ".xlsx";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Item num,Item name,Item Contents,Evaluator,Evaluation methods,Name of technical document,Section,Compliance results,Opinion,Accessory,Feedback time ";
|
||||
fileName = "Item Evaluation results " + ".xlsx";
|
||||
}
|
||||
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
|
||||
String path = uploadpath + "/tempZip/itemEvaluationResults/" + System.currentTimeMillis();
|
||||
|
||||
try {
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + fileName);
|
||||
response.setContentType("application/force-download");
|
||||
|
||||
HSSFSheet sheet = workbook.createSheet("sheet1");
|
||||
|
||||
CellStyle titleCellStyle = workbook.createCellStyle();
|
||||
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
titleCellStyle.setWrapText(true);//自动换行
|
||||
|
||||
Row firstRow = sheet.createRow(0);
|
||||
|
||||
//创建表头
|
||||
String[] titleArr = title.split(",");
|
||||
for (int i=0; i<=5; i++){
|
||||
sheet.setColumnWidth(i,4000);
|
||||
Cell cell = firstRow.createCell(i);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(titleArr[i]);
|
||||
}
|
||||
|
||||
//设置导出数据
|
||||
if(CollectionUtils.isNotEmpty(exportData)) {
|
||||
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
|
||||
Row dataRow = sheet.createRow(dataIndex + 1);
|
||||
dataRow.createCell(0).setCellValue(exportData.get(dataIndex).getItemNum());
|
||||
dataRow.createCell(1).setCellValue(exportData.get(dataIndex).getItemName());
|
||||
dataRow.createCell(2).setCellValue(exportData.get(dataIndex).getItemContent());
|
||||
dataRow.createCell(3).setCellValue(exportData.get(dataIndex).getCreateBy());
|
||||
dataRow.createCell(4).setCellValue(exportData.get(dataIndex).getEvaluationMethodsName());
|
||||
dataRow.createCell(5).setCellValue(exportData.get(dataIndex).getTechnicalFileName());
|
||||
dataRow.createCell(6).setCellValue(exportData.get(dataIndex).getSection());
|
||||
dataRow.createCell(7).setCellValue(exportData.get(dataIndex).getComplianceResultName());
|
||||
dataRow.createCell(8).setCellValue(exportData.get(dataIndex).getOpinion());
|
||||
dataRow.createCell(9).setCellValue(exportData.get(dataIndex).getAccessoryFileName());
|
||||
String feedBackTimeStr = disposeDate(exportData.get(dataIndex).getCreateTime());
|
||||
dataRow.createCell(10).setCellValue(feedBackTimeStr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File fileTemp = new File(path);
|
||||
if (fileTemp.exists()) {
|
||||
fileTemp.delete();
|
||||
}
|
||||
fileTemp.mkdirs();
|
||||
//excel
|
||||
OutputStream excelOS = new FileOutputStream(path + File.separator + fileName);
|
||||
workbook.write(excelOS);
|
||||
excelOS.flush();
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
for (LawsTechnologyEvaluationItemResultEO data : exportData) {
|
||||
String accessoryFile = data.getAccessoryFile();
|
||||
|
||||
List<OSSFile> fileInfosList = iOSSFileService.getFileInfos(accessoryFile);
|
||||
if (fileInfosList.size() != 0) {
|
||||
for (OSSFile ossFile : fileInfosList) {
|
||||
String url = ossFile.getUrl();
|
||||
//判断文件是否存在
|
||||
if(StringUtils.isNotBlank(url)){
|
||||
//判断文件是否存在
|
||||
boolean b = CosBootUtil.doesObjectExist(url);
|
||||
if(b){
|
||||
InputStream download = CosBootUtil.download(url);
|
||||
if(url.endsWith(".pdf") || url.endsWith(".PDF")){
|
||||
String currentTime = sdf.format(new Date());
|
||||
String waterContent = loginUser.getUsername() + " " + currentTime;
|
||||
File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent);
|
||||
download = new FileInputStream(newFile.getPath());
|
||||
}
|
||||
FileUtils.copyFile(download, path + File.separator + ossFile.getFileName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ZipUtil.zip(path, path + ".zip");
|
||||
//文件
|
||||
FileInputStream fis = new FileInputStream(path + ".zip");
|
||||
os = response.getOutputStream();
|
||||
|
||||
int len = 0;
|
||||
while ((len = fis.read()) != -1) {
|
||||
os.write(len);
|
||||
}
|
||||
os.flush();
|
||||
fis.close();
|
||||
excelOS.close();
|
||||
|
||||
}catch (IOException ex){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("下载文件失败");
|
||||
}else{
|
||||
throw new JeroBootException("Failed to download file");
|
||||
}
|
||||
}finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
File file = new File(path);
|
||||
FileUtil.deleteContents(file);
|
||||
File fileTemp = new File(path + ".zip");
|
||||
FileUtil.deleteContents(fileTemp);
|
||||
}
|
||||
}
|
||||
|
||||
public String disposeDate(Date date){
|
||||
String result = "";
|
||||
try {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
if(date != null){
|
||||
result = sdf.format(date);
|
||||
}
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("处理日期失败:" +ex.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> evaluationMethodsList) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String evaluationMethods : evaluationMethodsList) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> evaluationMethods.equals(e.getId())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
sb.append(collect.get(0).getName() + ",");
|
||||
} else {
|
||||
sb.append(collect.get(0).getEnName()+ ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
String evaluationMethodsName = "";
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
evaluationMethodsName = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
return evaluationMethodsName;
|
||||
}
|
||||
}
|
||||
|
||||
+54
-2
@@ -3,11 +3,15 @@ package com.jero.modules.lawsTechnologyEvaluation.service.impl;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationResultEOMapper;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -15,7 +19,14 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
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;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 法规技术评估-评估结果表
|
||||
@@ -24,10 +35,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class LawsTechnologyEvaluationResultEOServiceImpl extends ServiceImpl<LawsTechnologyEvaluationResultEOMapper, LawsTechnologyEvaluationResultEO> implements ILawsTechnologyEvaluationResultEOService {
|
||||
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationComplianceResultEOService complianceResultEOService;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -95,8 +109,11 @@ public class LawsTechnologyEvaluationResultEOServiceImpl extends ServiceImpl<Law
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsTechnologyEvaluationResultEO> queryList() {
|
||||
return list();
|
||||
public List<LawsTechnologyEvaluationResultEO> queryList(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsTechnologyEvaluationResultEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationResultEO, req.getParameterMap());
|
||||
List<LawsTechnologyEvaluationResultEO> evaluationResultEOList = this.baseMapper.selectList(queryWrapper);
|
||||
return evaluationResultEOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -113,6 +130,8 @@ public class LawsTechnologyEvaluationResultEOServiceImpl extends ServiceImpl<Law
|
||||
complianceResultEOService.remove(removeComplianceResultWrapper);
|
||||
|
||||
LawsTechnologyEvaluationComplianceResultEO complianceResultEO = new LawsTechnologyEvaluationComplianceResultEO();
|
||||
String complianceResultId = UUID.randomUUID().toString().replace("-", "");
|
||||
complianceResultEO.setId(complianceResultId);
|
||||
complianceResultEO.setActiProcInstId(actiProcInstId);
|
||||
complianceResultEO.setLawsTechnologyEvaluationId(lawsTechnologyEvaluationId);
|
||||
complianceResultEO.setComplianceResult(complianceResult);
|
||||
@@ -129,10 +148,43 @@ public class LawsTechnologyEvaluationResultEOServiceImpl extends ServiceImpl<Law
|
||||
LawsTechnologyEvaluationResultEO evaluationResultEO = null;
|
||||
for (Object evaluationResult : evaluationResultList) {
|
||||
evaluationResultEO = JSONObject.parseObject(JSONObject.toJSONString(evaluationResult),LawsTechnologyEvaluationResultEO.class);
|
||||
evaluationResultEO.setActiProcInstId(actiProcInstId);
|
||||
evaluationResultEO.setLawsTechnologyEvaluationId(lawsTechnologyEvaluationId);
|
||||
evaluationResultEO.setSubmitTime(new Date());
|
||||
evaluationResultEO.setComplianceResultId(complianceResultId);
|
||||
evaluationResultEOList.add(evaluationResultEO);
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(evaluationResultEOList)){
|
||||
this.saveBatch(evaluationResultEOList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject queryEvaluationResultAndComplianceResult(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, HttpServletRequest req) {
|
||||
JSONObject result = new JSONObject();
|
||||
List<LawsTechnologyEvaluationResultEO> evaluationResultEOList = this.queryList(lawsTechnologyEvaluationResultEO, req);
|
||||
result.put("evaluationResultEOList",evaluationResultEOList);
|
||||
|
||||
QueryWrapper<LawsTechnologyEvaluationComplianceResultEO> complianceResultEOQueryWrapper = new QueryWrapper<>();
|
||||
complianceResultEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationComplianceResultEO::getActiProcInstId,lawsTechnologyEvaluationResultEO.getActiProcInstId());
|
||||
complianceResultEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationComplianceResultEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationResultEO.getLawsTechnologyEvaluationId());
|
||||
List<LawsTechnologyEvaluationComplianceResultEO> complianceResultEOList = complianceResultEOService.list(complianceResultEOQueryWrapper);
|
||||
if(CollectionUtils.isNotEmpty(complianceResultEOList)){
|
||||
result.put("complianceResult",complianceResultEOList.get(0));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<LawsTechnologyEvaluationResultEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
for (LawsTechnologyEvaluationResultEO data : datas) {
|
||||
if(StringUtils.isNotEmpty(data.getAccessoryFile())){
|
||||
List<OSSFile> accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile());
|
||||
String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
data.setAccessoryFileName(accessoryFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -198,7 +198,7 @@ public class FileUnZip {
|
||||
File[] filesTemp = fi.listFiles();
|
||||
for (File fileTemp : filesTemp) {
|
||||
// 对文件进行过滤
|
||||
if (fileTemp.getName().equals(filenameTwo) && fileTemp.getPath().contains(filenameOne) && StringUtils.isNotBlank(filenameOne)) {
|
||||
if (fileTemp.getName().equals(filenameTwo) && fi.getName().equals(filenameOne) && StringUtils.isNotBlank(filenameOne)) {
|
||||
resultlist.add(fileTemp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1055,6 +1055,7 @@ module.exports = {
|
||||
NcontrolType: 'Control Type',
|
||||
NcontrolVerification: 'Control Verify',
|
||||
NcontrolAlternatives: 'Control Values',
|
||||
DefaultValue: 'Default Value',
|
||||
NattachmentTemplate: 'File Template',
|
||||
Ntext: 'Text',
|
||||
NDropdownradio: 'Pull single',
|
||||
@@ -1066,6 +1067,7 @@ module.exports = {
|
||||
Dtext: 'Pull single+File',
|
||||
Etext: 'Pull more+File',
|
||||
Ftext: 'Text+Pull single+File',
|
||||
Gtext: 'Title',
|
||||
Nnothing: 'Null',
|
||||
Nchinese: 'Chinese',
|
||||
NpositiveInteger: 'Integer',
|
||||
@@ -1124,4 +1126,16 @@ module.exports = {
|
||||
engineerFeedbackResults:'Engineer feedback results',
|
||||
fileExport:'File export',
|
||||
feedbackTime:'Feedback time',
|
||||
regulatoryTechnologyAssessmentProcess:'Regulatory technology assessment process',
|
||||
feedbackEvaluation:'Feedback evaluation',
|
||||
clauseEvaluation:'Clause evaluation',
|
||||
standardDocuments:'Standard documents',
|
||||
pleaseCompleteTheEvaluationMethodorEvaluator:'Please complete the evaluation method or evaluator in the list',
|
||||
reviewComments:'Review comments',
|
||||
PleaseCompleteList:'Please complete the compliance results in the list',
|
||||
sponsorFeedback:'Sponsor feedback',
|
||||
processNumber:'Process number',
|
||||
processName:'Process Name',
|
||||
feedbackResults:'Feedback results',
|
||||
theDoesNotSupportPreview:'The current file format does not support Preview',
|
||||
}
|
||||
@@ -1065,6 +1065,7 @@ module.exports = {
|
||||
NcontrolType: '控件类型',
|
||||
NcontrolVerification: '控件校验',
|
||||
NcontrolAlternatives: '控件备选值',
|
||||
DefaultValue: '默认值',
|
||||
NattachmentTemplate: '附件模板',
|
||||
Ntext: '文本',
|
||||
NDropdownradio: '下拉单选',
|
||||
@@ -1076,6 +1077,7 @@ module.exports = {
|
||||
Dtext: '下拉单选+附件',
|
||||
Etext:'下拉多选+附件',
|
||||
Ftext: '文本+下拉单选+附件',
|
||||
Gtext: '标题',
|
||||
Nnothing: '无',
|
||||
Nchinese: '中文',
|
||||
NpositiveInteger: '整数',
|
||||
@@ -1128,4 +1130,16 @@ module.exports = {
|
||||
engineerFeedbackResults:'工程师反馈结果',
|
||||
fileExport:'文件导出',
|
||||
feedbackTime:'反馈时间',
|
||||
regulatoryTechnologyAssessmentProcess:'法规技术评估流程',
|
||||
feedbackEvaluation:'反馈评估',
|
||||
clauseEvaluation:'条款评估',
|
||||
standardDocuments:'标准文件',
|
||||
pleaseCompleteTheEvaluationMethodorEvaluator:'请补全列表中评估方式或评估人',
|
||||
reviewComments:'审核意见',
|
||||
PleaseCompleteList:'请补全列表中符合性结果',
|
||||
sponsorFeedback:'发起人反馈',
|
||||
processNumber:'流程编号',
|
||||
processName:'流程名称',
|
||||
feedbackResults:'反馈结果',
|
||||
theDoesNotSupportPreview:'当前文件格式不支持预览',
|
||||
}
|
||||
@@ -96,6 +96,31 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 默认值-->
|
||||
<div v-if='detailDate.controlType === "11"' class='add_flex'>
|
||||
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
|
||||
<div v-if='item.type==="text"'>
|
||||
<!-- 文本校验 分情况-->
|
||||
<!-- 1 无-->
|
||||
<!-- 2 中文-->
|
||||
<!-- 3 正整数-->
|
||||
<!-- 4 政府点数-->
|
||||
<!-- 5 证书或小数-->
|
||||
<!-- 6 一位小数-->
|
||||
<!-- 7 两位小数-->
|
||||
<!-- 8 三位小数-->
|
||||
<!-- 9 四为小数-->
|
||||
<!-- 无 -->
|
||||
<div>
|
||||
<a-input class="box-input inputWid"
|
||||
:maxLength="1000"
|
||||
:disabled="item.isLock == '1' ? true: false"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="item.dataValue"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 纯下拉单选-->
|
||||
<div v-else-if='detailDate.controlType === "2"' class='add_flex'>
|
||||
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
})
|
||||
} else {
|
||||
if (this.isTrue) {
|
||||
this.$emit('getList')
|
||||
this.$emit('getList',info.file.response.result)
|
||||
} else {
|
||||
eventBUs.$emit('searchReset')
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<span
|
||||
v-if='record.state == "待发起收集" || record.state == "工程接口人退回" || record.state == "变更" || record.state == "Wait Collect" || record.state == "Sdt Back" || record.state == "Change"'>
|
||||
<span
|
||||
@click='ondataValueTobeinitiated(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}}</span>
|
||||
@click='areaOfResponsibility(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}}</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
<span @click='dataValueTobeinitiated(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}}</span>
|
||||
@@ -41,6 +41,23 @@
|
||||
<span @click='dataValueTobeinitiated(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}}</span>
|
||||
</span>
|
||||
</span>
|
||||
<span slot="operationzr" slot-scope="record">
|
||||
<span v-if='currentPersonRole === "homo"'>
|
||||
<!-- 认证工程师 -->
|
||||
<span
|
||||
v-if='record.state == "待发起收集" || record.state == "工程接口人退回"'>
|
||||
<span :title='record.dataValue'
|
||||
@click='ondataValueTobe(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }}</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
<span :title='record.dataValue' @click='dataValueTobe(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }}</span>
|
||||
</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
<span :title='record.dataValue' @click='dataValueTobe(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }}</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span slot="detailClick" slot-scope="text,record">
|
||||
<collection-type :detailDate='text'/>
|
||||
</span>
|
||||
@@ -95,6 +112,46 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 修改责任领域--->
|
||||
<a-modal v-model="areaVisiblezr" :title="$t('areaOfResponsibility')" width='620px' :footer="null"
|
||||
@cancel="cancel">
|
||||
<a-form-model
|
||||
class='tag-module'
|
||||
ref='ruleForm'
|
||||
:model='Dateline'
|
||||
:rules='rules'
|
||||
:label-col='labelCol'
|
||||
:wrapper-col='wrapperCol'
|
||||
|
||||
>
|
||||
<a-row :gutter='24'>
|
||||
<a-col :span='24'>
|
||||
<a-form-model-item ref='region' :label="$t('areaOfResponsibility')" prop='queryzr'>
|
||||
<!-- <a-select allowClear :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"-->
|
||||
<!-- v-model="Dateline.querySdt">-->
|
||||
<!-- <a-select-option v-for="(item, key) in querySdtList" :key="key" :value="item.value">-->
|
||||
<!-- <span style="display: inline-block;width: 100%" :title=" item.label ">-->
|
||||
<!-- {{ item.label }}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<j-dict-select-tag class="box-input" v-model="Dateline.queryzr"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<div class="imports-footer">
|
||||
<div class="imports-footer-wrap">
|
||||
|
||||
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmitzr">{{$t('preservation')}}
|
||||
</a-button>
|
||||
<a-button class="imports-btn" type="primary" @click="cancel">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 配置信息--->
|
||||
<a-modal v-model="areaVisibleView" :title="$t('configurationInformation')" width='550px' :footer="null">
|
||||
<div class="content-text">
|
||||
@@ -161,6 +218,10 @@
|
||||
type: Object,
|
||||
default: true
|
||||
},
|
||||
queryParamQuery: {
|
||||
type: Object,
|
||||
default: true
|
||||
},
|
||||
currentPersonRole: {
|
||||
type: String,
|
||||
default: true
|
||||
@@ -232,6 +293,7 @@
|
||||
sdt: 0, // 工程接口人
|
||||
dre: 0, // 填写人
|
||||
areaVisible: false,
|
||||
areaVisiblezr:false,
|
||||
form: {},
|
||||
rules: {
|
||||
querySdt: [
|
||||
@@ -240,6 +302,13 @@
|
||||
message: this.$t('PleaseSelect') + this.$t('engineeringInterfacePerson'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
queryzr: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('PleaseSelect') + this.$t('areaOfResponsibility'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
wrapperCol: {
|
||||
@@ -342,6 +411,44 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 责任领域 保存
|
||||
handleSubmitzr(record) {
|
||||
let _this = this
|
||||
let param = { dutyTerritory: this.Dateline.queryzr, ids: this.getquerySdtId,paramsManifestId: this.$route.query.id, }
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/updateDutyTerritory',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function(data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': _this.token
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.areaVisiblezr = false
|
||||
this.getLoginUserType()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 工程接口人 保存
|
||||
handleSubmit(record) {
|
||||
let _this = this
|
||||
@@ -385,8 +492,12 @@
|
||||
this.areaVisible = false
|
||||
this.$refs['ruleForm'].resetFields()
|
||||
},
|
||||
cancel(){
|
||||
this.areaVisiblezr = false
|
||||
this.$refs['ruleForm'].resetFields()
|
||||
},
|
||||
// 点击工程接口人的详情人员 有权限
|
||||
ondataValueTobeinitiated(record) {
|
||||
areaOfResponsibility(record) {
|
||||
this.areaVisible = true
|
||||
// this.$refs.ruleForm.clearValidate()
|
||||
this.$nextTick(() => {
|
||||
@@ -395,9 +506,22 @@
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
// 点击责任领域的详情人员 有权限
|
||||
ondataValueTobe(record) {
|
||||
this.areaVisiblezr = true
|
||||
// this.$refs.ruleForm.clearValidate()
|
||||
this.$nextTick(() => {
|
||||
this.Dateline = { ...this.Dateline }
|
||||
this.getquerySdtId = record.id
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
dataValueTobeinitiated() {
|
||||
this.$message.warning(this.$t('certifiedEngineer') + this.$t('and') + this.$t('Statusis') + this.$t('CollectionInitiated') + this.$t('ReturnedPerson') + this.$t('alteration') + this.$t('toHavePermission'))
|
||||
},
|
||||
dataValueTobe() {
|
||||
this.$message.warning(this.$t('certifiedEngineer') + this.$t('and') + this.$t('Statusis') + this.$t('CollectionInitiated') + this.$t('ReturnedPerson') + this.$t('toHavePermission'))
|
||||
},
|
||||
// 点击工程接口人的详情人员 无权限
|
||||
ondataValueNot() {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
@@ -487,9 +611,15 @@
|
||||
sorter: res.sort,
|
||||
width: 160
|
||||
})
|
||||
console.log(res)
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'titleName'
|
||||
}
|
||||
if(res.click1){
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'operationzr'
|
||||
}
|
||||
}
|
||||
if (res.click) {
|
||||
// 工程接口人列表修改
|
||||
this.columns[index].scopedSlots = {
|
||||
@@ -507,6 +637,7 @@
|
||||
console.log(pagination, filters, sorter, 'iiiiiiiiiiiiiiiii')
|
||||
},
|
||||
getTableListReset() {
|
||||
this.formInline = {}
|
||||
let params = {
|
||||
paramsManifestId: this.$route.query.id,
|
||||
pageNo: this.pageNo,
|
||||
@@ -591,7 +722,8 @@
|
||||
pageSize: this.pageSize,
|
||||
userTypes: this.currentPersonRole || currentPersonRole,
|
||||
paramsManifestId: paramsManifestid,
|
||||
...this.formInline
|
||||
...this.formInline,
|
||||
...currentPersonRole
|
||||
}
|
||||
this.loading = true
|
||||
getAction(url, params).then((res) => {
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'technologyTerritory'
|
||||
dataIndex: 'technologyTerritoryName'
|
||||
},
|
||||
{
|
||||
title: this.$t('collectResults'),
|
||||
|
||||
+41
-6
@@ -26,10 +26,10 @@
|
||||
<a-icon type="cloud-upload"/>
|
||||
{{$t('uploadMonthly')}}
|
||||
</div>
|
||||
<div @click="BatchDeleteClick" class="operator-text">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
<!-- <div @click="BatchDeleteClick" class="operator-text">-->
|
||||
<!-- <a-icon type="delete"/>-->
|
||||
<!-- {{$t('BatchDelete')}}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
@@ -46,13 +46,21 @@
|
||||
<span slot="language" slot-scope="text,record">
|
||||
<span>{{text == 1?$t('chinese'):$t('English')}}</span>
|
||||
</span>
|
||||
<span slot="RegulationMonthlyName" slot-scope="text,record">
|
||||
<a @click="preview(record)">{{text}}</a>
|
||||
</span>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userData.username"
|
||||
@click="withdraw(record)">
|
||||
{{record.issueStatus == 2 ? $t('release') : $t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userData.username && record.issueStatus == 2"
|
||||
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userData.username || record.issueStatus == 1"
|
||||
@click="download(record)">{{$t('download')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource && dataSource.length > 0">
|
||||
@@ -75,7 +83,9 @@
|
||||
<script>
|
||||
import eventBUs from '../../../../common/event'
|
||||
import managementAdd from './modules/managementAdd'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
export default {
|
||||
name: 'RegulationMonthlyManagement',
|
||||
@@ -97,13 +107,16 @@
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
queryParam: {},
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
userData: {},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('RegulationMonthlyName'),
|
||||
align: 'center',
|
||||
dataIndex: 'name',
|
||||
width: 190,
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'RegulationMonthlyName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('monthlyLanguage'),
|
||||
@@ -146,8 +159,10 @@
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.userData = this.userInfo()
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
@@ -191,6 +206,26 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
preview(item) {
|
||||
let fileName = item.name
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
if (fileSuffix === '.pdf') {
|
||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + item.fileId + '&userName=' + this.userInfo().username))
|
||||
} else if (fileSuffix === '.docx') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + item.fileId + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
this.$message.warning(this.$t('theDoesNotSupportPreview'))
|
||||
}
|
||||
},
|
||||
download(item) {
|
||||
downloadFile('/sys/common/downLoadFile', item.name, { id: item.fileId, userName: this.userInfo().username })
|
||||
},
|
||||
uploadMonthlyClick() {
|
||||
this.$refs.managementAddRef.add()
|
||||
},
|
||||
|
||||
+111
-18
@@ -1,11 +1,30 @@
|
||||
<template>
|
||||
<div class="box" style="margin-bottom: 20px">
|
||||
<div style="margin-bottom: 10px;text-align: right">
|
||||
<div @click="handleModule" class="operator-text">
|
||||
<a-icon type="download"/>
|
||||
{{$t('templateDownload')}}
|
||||
</div>
|
||||
<div class="operator-text">
|
||||
<ImportFile :url="url" :isTrue="true" :accept="'.xls'"
|
||||
@getList="getPersonnelList"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:scroll="{x: '100%'}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:loading="loading">
|
||||
<div slot="clauseContent" slot-scope="text,result">
|
||||
<a-tooltip placement="topLeft">
|
||||
<template slot="title">
|
||||
<span v-html="text"></span>
|
||||
</template>
|
||||
<div class="clauseContent-text" v-html="text"></div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<span slot="evaluationMethod" slot-scope="text,result">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
@@ -17,12 +36,12 @@
|
||||
:tree-data="gatherResultList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('evaluationMethod')"
|
||||
/>
|
||||
/>
|
||||
</span>
|
||||
<span slot="Assessor" slot-scope="text,result">
|
||||
<span slot="Assessor" slot-scope="text,result,index">
|
||||
<PersonnelSelection class="box-input"
|
||||
:personneQuery="result"
|
||||
:query="{db_field_name:'evaluatorIds',db_field_txt:$t('Assessor')}"
|
||||
:query="{db_field_name:'evaluatorIds',db_field_txt:$t('Assessor'),subscript:index}"
|
||||
:isInput="true"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="result.evaluatorIdsName"/>
|
||||
@@ -36,36 +55,43 @@
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import ImportFile from '@/components/ImportFile/index'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'TermInformation',
|
||||
components:{
|
||||
PersonnelSelection
|
||||
components: {
|
||||
PersonnelSelection,
|
||||
ImportFile
|
||||
},
|
||||
props:['gatherResultList'],
|
||||
props: ['gatherResultList'],
|
||||
data() {
|
||||
return {
|
||||
url: {
|
||||
importZipUrl: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/importItemExcel'
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('clauseNo'),
|
||||
dataIndex: 'items_num',
|
||||
dataIndex: 'itemNum',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseName'),
|
||||
dataIndex: 'items_name',
|
||||
dataIndex: 'itemName',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseContent'),
|
||||
dataIndex: 'iterms_conditions',
|
||||
dataIndex: 'itemContent',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
scopedSlots: { customRender: 'clauseContent' }
|
||||
},
|
||||
{
|
||||
title: this.$t('evaluationMethod'),
|
||||
dataIndex: 'evaluationMethod',
|
||||
dataIndex: 'evaluationMethods',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'evaluationMethod' }
|
||||
},
|
||||
@@ -77,26 +103,80 @@
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'Assessor',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
dataList: [{}],
|
||||
dataList: [],
|
||||
ImportFileData: [],
|
||||
dataListData: [],
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
deleteData() {
|
||||
|
||||
deleteData(item) {
|
||||
this.dataList = this.dataList.filter(res => {
|
||||
return res.itemId != item.itemId
|
||||
})
|
||||
this.dataListData = this.dataListData.filter(res => {
|
||||
return res.itemId != item.itemId
|
||||
})
|
||||
this.ImportFileData = this.ImportFileData.filter(res => {
|
||||
return res.itemId != item.itemId
|
||||
})
|
||||
this.$emit('TermInformationRefForm', item)
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
PersonnelSelectionChange(value, id, index) {
|
||||
this.dataList[index][value] = id
|
||||
this.dataList = [...this.dataList]
|
||||
},
|
||||
getData(value) {
|
||||
this.dataListData = []
|
||||
if (value && value.length > 0) {
|
||||
value.forEach(res => {
|
||||
this.dataListData.push({
|
||||
itemId: res.id,
|
||||
itemNum: res.items_num,
|
||||
itemName: res.items_name,
|
||||
itemContent: res.iterms_conditions
|
||||
})
|
||||
})
|
||||
}
|
||||
this.dataList = this.ImportFileData.concat(this.dataListData)
|
||||
this.dataList = [...this.dataList]
|
||||
},
|
||||
getPersonnelList(res) {
|
||||
this.ImportFileData = this.ImportFileData.concat(res)
|
||||
this.dataList = this.dataListData.concat(this.ImportFileData)
|
||||
this.dataList = [...this.dataList]
|
||||
},
|
||||
getUUID() {
|
||||
var str = []
|
||||
var Chars = '0123456789abcdefghijklmnopqrstuvwxyz'
|
||||
for (var i = 0; i < 36; i++) {
|
||||
str[i] = Chars.substr(Math.floor(Math.random() * 16), 1)
|
||||
}
|
||||
str[0] = str[8] = str[13] = str[18] = str[23] = '-'
|
||||
return str.join('')
|
||||
},
|
||||
submitData(callback) {
|
||||
let dataList = JSON.parse(JSON.stringify(this.dataList))
|
||||
for (let i = 0; i < dataList.length; i++) {
|
||||
dataList[i].evaluationMethods = dataList[i].evaluationMethods.join(',')
|
||||
dataList[i].lawsTechnologyEvaluationId = this.getUUID
|
||||
if (!dataList[i].evaluationMethods || !dataList[i].evaluatorIds) {
|
||||
this.$message.warning(this.$t('pleaseCompleteTheEvaluationMethodorEvaluator'))
|
||||
return
|
||||
}
|
||||
}
|
||||
callback && callback(dataList)
|
||||
},
|
||||
handleModule() {
|
||||
downloadFile('/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/exportItemTemplate', this.$t('clauseEvaluation') + '.xls', {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -107,4 +187,17 @@
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.clauseContent-text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
text-overflow: ellipsis;
|
||||
/*! autoprefixer: off */
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
/*! autoprefixer: on;*/
|
||||
text-justify: inter-ideograph;
|
||||
word-break: break-all
|
||||
}
|
||||
</style>
|
||||
+139
-46
@@ -6,7 +6,7 @@
|
||||
<!-- <span style="line-height: 66px;display: inline-block;float: left">-->
|
||||
<!-- <a-icon type="home" style="margin-right: 6px;"/>-->
|
||||
<!-- </span>-->
|
||||
{{$t('regulatoryTechnicalEvaluationResults')}}
|
||||
{{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
@@ -19,7 +19,7 @@
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="processBackground-text">
|
||||
dskf' ;sdfl';s sd稍等景点风光大家分工法规地方官给,。不买;两个客人坦克;量大幅高开的管理骨科大夫给的快感的法律公开大家赶快来的风格
|
||||
{{$route.query.processBackground}}
|
||||
</div>
|
||||
<div class="header-text">
|
||||
{{$t('engineerFeedbackResults')}}
|
||||
@@ -35,10 +35,10 @@
|
||||
</div>
|
||||
<PersonnelSelection class="box-input"
|
||||
:personneQuery="queryParam"
|
||||
:query="{db_field_name:'Assessor',db_field_txt:$t('Assessor')}"
|
||||
:query="{db_field_name:'evaluators',db_field_txt:$t('Assessor')}"
|
||||
:isInput="true"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="queryParam.AssessorName"/>
|
||||
v-model="queryParam.evaluatorsName"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -46,8 +46,18 @@
|
||||
<div class="title-text" :title="$t('complianceResults')">
|
||||
<span>{{$t('complianceResults')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('complianceResults')"
|
||||
v-model="queryParam.title"></j-input>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('complianceResults')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="queryParam.complianceResult">
|
||||
<a-select-option v-for="(item, key) in complianceResultsList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title="item.name ">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
@@ -61,7 +71,7 @@
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="fileExportClick" class="operator-text">
|
||||
<a-icon type="apartment"/>
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('fileExport')}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,142 +81,203 @@
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 100px)'}"
|
||||
rowKey="id"
|
||||
:data-source="dataSource"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:columns="columns"
|
||||
>
|
||||
<div slot="clauseContent" slot-scope="text,result">
|
||||
<a-tooltip placement="topLeft">
|
||||
<template slot="title">
|
||||
<span v-html="text"></span>
|
||||
</template>
|
||||
<div class="clauseContent-text" v-html="text"></div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<span slot="accessoryFile" slot-scope="text,result">
|
||||
<a v-if="text" @click="accessoryFileClick(text)">
|
||||
{{ $t('viewFile') }}
|
||||
</a>
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
</a-table>
|
||||
<!-- <div class="page" v-if="dataSource && dataSource.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="pageOnChange"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<viewFileModel ref="viewFileModelRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
|
||||
export default {
|
||||
name: 'evaluationResultsClause',
|
||||
components:{
|
||||
PersonnelSelection
|
||||
components: {
|
||||
PersonnelSelection,
|
||||
viewFileModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParam: {},
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
complianceResultsList: [
|
||||
{
|
||||
name: this.$t('accord'),
|
||||
value: 'Compliance'
|
||||
},
|
||||
{
|
||||
name: this.$t('nonConformity'),
|
||||
value: 'Non-Compliance'
|
||||
}
|
||||
],
|
||||
loading: false,
|
||||
url: {
|
||||
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/list',
|
||||
exportData: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/exportZip'
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('clauseNo'),
|
||||
dataIndex: 'items_num',
|
||||
dataIndex: 'itemNum',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseName'),
|
||||
dataIndex: 'items_name',
|
||||
dataIndex: 'itemName',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseContent'),
|
||||
dataIndex: 'iterms_conditions',
|
||||
dataIndex: 'itemContent',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
width: 260,
|
||||
scopedSlots: { customRender: 'clauseContent' }
|
||||
},
|
||||
{
|
||||
title: this.$t('Assessor'),
|
||||
dataIndex: 'Assessor',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
title: this.$t('evaluationMethod'),
|
||||
dataIndex: 'evaluationMethod',
|
||||
dataIndex: 'evaluationMethodsName',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
title: this.$t('nameTechnicalDocument'),
|
||||
dataIndex: 'nameTechnicalDocument',
|
||||
dataIndex: 'technicalFileName',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 260
|
||||
},
|
||||
{
|
||||
title: this.$t('chapter'),
|
||||
dataIndex: 'chapter',
|
||||
dataIndex: 'section',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 260
|
||||
},
|
||||
{
|
||||
title: this.$t('complianceResults'),
|
||||
dataIndex: 'complianceResults',
|
||||
dataIndex: 'complianceResultName',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
title: this.$t('opinion'),
|
||||
dataIndex: 'opinion',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 260
|
||||
},
|
||||
{
|
||||
title: this.$t('enclosure'),
|
||||
dataIndex: 'enclosure',
|
||||
dataIndex: 'accessoryFile',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 160,
|
||||
scopedSlots: { customRender: 'accessoryFile' }
|
||||
},
|
||||
{
|
||||
title: this.$t('feedbackTime'),
|
||||
dataIndex: 'feedbackTime',
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
width: 160
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
CurrentStandard() {
|
||||
|
||||
},
|
||||
onSelectChange(value) {
|
||||
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
lawsTechnologyEvaluationId: this.$route.query.id,
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataSource = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
fileExportClick() {
|
||||
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
let query = {
|
||||
...this.queryParam,
|
||||
ids: selectedRowKeys.join(','),
|
||||
lawsTechnologyEvaluationId: this.$route.query.id
|
||||
}
|
||||
downloadFile(this.url.exportData, this.$route.query.serialNumber + ' ' + this.$t('regulatoryTechnicalEvaluationResults') + '.zip',
|
||||
query, this.Deselect)
|
||||
},
|
||||
Deselect() {
|
||||
this.selectedRowKeys = []
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.queryParam[value] = id
|
||||
this.queryParam = { ...this.queryParam }
|
||||
},
|
||||
accessoryFileClick(item) {
|
||||
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -228,6 +299,7 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px #eff1f3 solid;
|
||||
z-index: 1000;
|
||||
background: #fff;
|
||||
|
||||
.doc-detail-title {
|
||||
@@ -326,9 +398,30 @@
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.clauseContent-text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
text-overflow: ellipsis;
|
||||
/*! autoprefixer: off */
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
/*! autoprefixer: on;*/
|
||||
text-justify: inter-ideograph;
|
||||
word-break: break-all
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.box-clause .ant-card-body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
+60
-47
@@ -6,7 +6,7 @@
|
||||
<!-- <span style="line-height: 66px;display: inline-block;float: left">-->
|
||||
<!-- <a-icon type="home" style="margin-right: 6px;"/>-->
|
||||
<!-- </span>-->
|
||||
{{$t('regulatoryTechnicalEvaluationResults')}}
|
||||
{{$route.query.serialNumber +' '+$t('regulatoryTechnicalEvaluationResults')}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
@@ -19,18 +19,18 @@
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="processBackground-text">
|
||||
dskf' ;sdfl';s sd稍等景点风光大家分工法规地方官给,。不买;两个客人坦克;量大幅高开的管理骨科大夫给的快感的法律公开大家赶快来的风格
|
||||
{{$route.query.processBackground}}
|
||||
</div>
|
||||
<!-- <div class="header-text">-->
|
||||
<!-- {{$t('engineerFeedbackResults')}}-->
|
||||
<!-- </div>-->
|
||||
<a-card :bordered="false" class="box-clause" style="margin-top: 20px" v-for="item in dataSource">
|
||||
<a-card :bordered="false" class="box-clause" style="margin-top: 20px" v-for="(item,index) in dataSource">
|
||||
<div class="table-operator">
|
||||
<div @click="fileExportClick" class="operator-text" style="float: left;font-size: 16px">
|
||||
{{$t('engineerFeedbackResults')}}
|
||||
<div class="operator-text" style="float: left;font-size: 16px">
|
||||
{{$t('engineer')+item.createBy+$t('feedbackResults')}}
|
||||
</div>
|
||||
<div @click="fileExportClick" class="operator-text">
|
||||
<a-icon type="apartment"/>
|
||||
<div @click="fileExportClick" v-if="index == 0" class="operator-text">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('fileExport')}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -40,77 +40,77 @@
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
:data-source="item.dataList"
|
||||
:scroll="{x: '100%',y:350}"
|
||||
:data-source="item.lawsTechnologyEvaluationResultEOList"
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="accessoryFile" slot-scope="text,result">
|
||||
<a v-if="text" @click="accessoryFileClick(text)">
|
||||
{{ $t('viewFile') }}
|
||||
</a>
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="text-results">
|
||||
{{$t('complianceResults')}}:{{item.complianceResultName}}
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<viewFileModel ref="viewFileModelRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
|
||||
export default {
|
||||
name: 'evaluationResultsWhole',
|
||||
components: {
|
||||
PersonnelSelection
|
||||
PersonnelSelection,
|
||||
viewFileModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParam: {},
|
||||
dataSource: [
|
||||
{
|
||||
dataList:[
|
||||
{
|
||||
relevantSections:111,
|
||||
problemDescription:222,
|
||||
enclosure:'',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
dataList:[
|
||||
{
|
||||
relevantSections:111,
|
||||
problemDescription:222,
|
||||
enclosure:'',
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
url: {
|
||||
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/list',
|
||||
exportData:'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip',
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
loading: false,
|
||||
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('relevantSections'),
|
||||
dataIndex: 'relevantSections',
|
||||
dataIndex: 'relatedSection',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('problemDescription'),
|
||||
dataIndex: 'problemDescription',
|
||||
dataIndex: 'issueOrSuggest',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('enclosure'),
|
||||
dataIndex: 'enclosure',
|
||||
dataIndex: 'accessoryFile',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'accessoryFile' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
CurrentStandard() {
|
||||
@@ -118,22 +118,30 @@
|
||||
},
|
||||
onSelectChange(value) {
|
||||
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
fileExportClick() {
|
||||
|
||||
let query = {
|
||||
lawsTechnologyEvaluationId: this.$route.query.id
|
||||
}
|
||||
downloadFile(this.url.exportData, this.$route.query.serialNumber + ' ' + this.$t('regulatoryTechnicalEvaluationResults') + '.zip', query)
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.queryParam[value] = id
|
||||
this.queryParam = { ...this.queryParam }
|
||||
getList() {
|
||||
let query = {
|
||||
lawsTechnologyEvaluationId: this.$route.query.id
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataSource = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
accessoryFileClick(item) {
|
||||
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,6 +158,7 @@
|
||||
.doc-detail-header {
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
z-index: 1000;
|
||||
line-height: 68px;
|
||||
padding: 0 0 0 32px;
|
||||
box-sizing: border-box;
|
||||
@@ -254,6 +263,10 @@
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.text-results {
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.box-clause .ant-card-body {
|
||||
|
||||
+73
-30
@@ -127,6 +127,7 @@
|
||||
tree-node-filter-prop="title"
|
||||
v-model="formInline.evaluationMethods"
|
||||
:maxTagCount="1"
|
||||
@change="evaluationMethodsChange"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
@@ -155,7 +156,13 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<TermInformation :gatherResultList="gatherResultList" v-if="isTrue"/>
|
||||
|
||||
<TermInformation
|
||||
ref="TermInformationRef"
|
||||
@TermInformationRefForm="TermInformationRefForm"
|
||||
:gatherResultList="gatherResultList"
|
||||
v-if="isTrue"/>
|
||||
|
||||
<footerProcess
|
||||
@submit="submit"
|
||||
:isSubmit="true"
|
||||
@@ -199,7 +206,8 @@
|
||||
//url传参严格按照当前命名
|
||||
url: {
|
||||
seachList: 'document/bussDocumentLibraryEO/queryCondition', //搜索字段
|
||||
addModelList: '/dummy/dummyInventoryInfoEO/queryPageDummy'
|
||||
addModelList: '/dummy/dummyInventoryInfoEO/queryPageDummy',
|
||||
addModelListOne: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/queryPageDummy'
|
||||
},
|
||||
loading: false,
|
||||
JLoading: false,
|
||||
@@ -210,6 +218,7 @@
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
formInline: {},
|
||||
standardDecomposition: [],
|
||||
gatherResultList: [],
|
||||
rules: {
|
||||
endTime: [
|
||||
@@ -322,7 +331,13 @@
|
||||
...this.searchParmes
|
||||
}
|
||||
this.loading = true
|
||||
postAction(this.url.addModelList, query).then((res) => {
|
||||
let url = ''
|
||||
if (this.$route.query.whetherTobring == '1') {
|
||||
url = this.url.addModelListOne
|
||||
} else {
|
||||
url = this.url.addModelList
|
||||
}
|
||||
postAction(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records || []
|
||||
this.total = res.result.total
|
||||
@@ -351,16 +366,20 @@
|
||||
technologyTerritory: content[0].technology_territory_id
|
||||
})
|
||||
}
|
||||
this.standardDecomposition = content
|
||||
},
|
||||
standardDecompositionDocumentClick() {
|
||||
if (this.selectedRowKeysRecord && this.selectedRowKeysRecord.length > 0) {
|
||||
this.$refs.standardDecompositionSheetRef.getData(JSON.parse(JSON.stringify(this.selectedRowKeysRecord[0])))
|
||||
if (this.standardDecomposition && this.standardDecomposition.length > 0) {
|
||||
this.$refs.standardDecompositionSheetRef.getData(JSON.parse(JSON.stringify(this.standardDecomposition[0])))
|
||||
} else {
|
||||
this.$message.warning(this.$t('pleaseSelectStandardFirst'))
|
||||
}
|
||||
},
|
||||
standardDecompositionSheetForm(value) {
|
||||
|
||||
this.$refs.TermInformationRef.getData(JSON.parse(JSON.stringify(value)))
|
||||
},
|
||||
TermInformationRefForm(value) {
|
||||
this.$refs.standardDecompositionSheetRef.getRowList(JSON.parse(JSON.stringify(value)))
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
@@ -390,6 +409,11 @@
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
evaluationMethodsChange(key, name) {
|
||||
this.formInline.evaluationMethods = key
|
||||
this.formInline.evaluationMethodsName = []
|
||||
this.formInline.evaluationMethodsName = name
|
||||
},
|
||||
dateChange(item) {
|
||||
this.formInline[item] = this.formInline[item] ? moment(this.formInline[item]).format('YYYY-MM-DD') : ''
|
||||
},
|
||||
@@ -408,37 +432,56 @@
|
||||
if (this.selectedRowKeysRecord && this.selectedRowKeysRecord.length == 0) {
|
||||
this.$message.warning(this.$t('pleaseSelectStandard'))
|
||||
} else {
|
||||
this.JLoading = true
|
||||
let value = Object.assign(this.formInline, this.selectedRowKeysRecord[0])
|
||||
if (this.isTrue) {
|
||||
value.evaluationType = 'Item evaluation'
|
||||
this.$refs.TermInformationRef.submitData((dataList) => {
|
||||
this.submitData(startTime, dataList)
|
||||
})
|
||||
} else {
|
||||
value.evaluationType = 'Feedback evaluation'
|
||||
this.submitData(startTime)
|
||||
}
|
||||
value.startTime = startTime
|
||||
value.flowStatus = 'Underway'
|
||||
value.taskAffirmDueDate = value.endTime
|
||||
value.lawsTechnologyEvaluationId = this.getUUID()
|
||||
value.regulationOwnerId = this.userInfo().id
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof Array) {
|
||||
value[res] = value[res].join(',')
|
||||
}
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
})
|
||||
this.startProcess(value)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
startProcess(value) {
|
||||
let query = {
|
||||
type: 6,
|
||||
...value,
|
||||
msg: JSON.stringify(value.evaluators).replace(/\"/g, '\'')
|
||||
submitData(startTime, dataList) {
|
||||
this.JLoading = true
|
||||
let value = Object.assign(this.formInline, this.selectedRowKeysRecord[0])
|
||||
if (this.isTrue) {
|
||||
value.evaluationType = 'Item evaluation'
|
||||
} else {
|
||||
value.evaluationType = 'Feedback evaluation'
|
||||
}
|
||||
value.startTime = startTime
|
||||
value.flowStatus = 'Underway'
|
||||
value.taskAffirmDueDate = value.endTime
|
||||
value.lawsTechnologyEvaluationId = this.getUUID()
|
||||
value.regulationOwnerId = this.userInfo().id
|
||||
value.regulationOwnerName = this.userInfo().username
|
||||
Object.keys(value).forEach(res => {
|
||||
if (value[res] && value[res] instanceof Array) {
|
||||
value[res] = value[res].join(',')
|
||||
}
|
||||
if (value[res] && value[res] instanceof String) {
|
||||
value[res] = value[res].replace(/\"/g, '“')
|
||||
value[res] = value[res].replace(/\'/g, '‘')
|
||||
}
|
||||
})
|
||||
this.startProcess(value, dataList)
|
||||
},
|
||||
startProcess(value, dataList) {
|
||||
let query = {}
|
||||
if (this.isTrue) {
|
||||
query = {
|
||||
type: 6,
|
||||
...value,
|
||||
msg: JSON.stringify({ itemList: dataList }).replace(/\"/g, '\'')
|
||||
}
|
||||
} else {
|
||||
query = {
|
||||
type: 6,
|
||||
...value,
|
||||
msg: JSON.stringify({ evaluators: value.evaluators }).replace(/\"/g, '\'')
|
||||
}
|
||||
}
|
||||
postAction('/workFlow/startProcess', query).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="$t('circulationHistory')"
|
||||
:width="800"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
@cancel="visible = false"
|
||||
>
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="visible = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-table
|
||||
class="table"
|
||||
:columns="columns"
|
||||
:pagination="false"
|
||||
:scroll="{x:700,y: 400}"
|
||||
:data-source="dataSource"
|
||||
:loading="loading"
|
||||
>
|
||||
<span slot="fileOperation" slot-scope="record">
|
||||
<a class="text" @click="preview(record)">
|
||||
{{$t('See')}}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource && dataSource.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="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, putAction, downloadFile } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'processInformation',
|
||||
data() {
|
||||
return {
|
||||
dataSource: [],
|
||||
loading: false,
|
||||
visible: false,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
pageNo: 1,
|
||||
lawsTechnologyEvaluationId: '',
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('processNumber'),
|
||||
dataIndex: 'prcNum',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('processName'),
|
||||
dataIndex: 'prcName',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('Assessor'),
|
||||
dataIndex: 'evaluatorName',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
width: 130,
|
||||
scopedSlots: { customRender: 'fileOperation' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
preview(row) {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/processDetails',
|
||||
query: {
|
||||
prcNum: row.prcNum,
|
||||
prcType: 6,
|
||||
prcId: row.actiProcInstId
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
pageOnChange(page) {
|
||||
this.pageNo = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChange(pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
getData(row) {
|
||||
this.visible = true
|
||||
this.lawsTechnologyEvaluationId = row.id
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
lawsTechnologyEvaluationId: this.lawsTechnologyEvaluationId,
|
||||
pageSize: this.pageSize,
|
||||
pageNo: this.pageNo
|
||||
}
|
||||
this.loading = true
|
||||
getAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationFlowDetailEO/page', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
this.dataSource = []
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
+98
-32
@@ -2,7 +2,7 @@
|
||||
<a-drawer
|
||||
:title="$t('StandardBreakdown')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
:width="1200"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
@@ -14,37 +14,55 @@
|
||||
<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 class="title-text" :title="$t('standardDocuments')">
|
||||
<span>{{$t('standardDocuments')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serial_number"></a-input>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('standardDocuments')"
|
||||
class="box-input"
|
||||
@change="standardDocumentsChange"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="queryParam.info_id">
|
||||
<a-select-option v-for="(item, key) in sarFileSplitInfoList"
|
||||
:key="key"
|
||||
:value="item.id">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.fileName ">
|
||||
{{ item.fileName }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-top: 4px" class="table-page-search-submitButtons">
|
||||
<a-col :md="12" :sm="24">
|
||||
<div @click="handleModule" class="operator-text">
|
||||
<a-icon type="download"/>
|
||||
{{$t('templateDownload')}}
|
||||
</div>
|
||||
<div class="operator-text">
|
||||
<ImportFile :url="url" :projectId="$route.query.id" :isTrue="true" :accept="'.xls'"
|
||||
@getList="getPersonnelList"/>
|
||||
</div>
|
||||
</a-col>
|
||||
</span>
|
||||
<!-- <span style="float: right;overflow: hidden;margin-top: 4px" class="table-page-search-submitButtons">-->
|
||||
<!-- <a-col :md="12" :sm="24">-->
|
||||
<!-- <div @click="handleModule" class="operator-text">-->
|
||||
<!-- <a-icon type="download"/>-->
|
||||
<!-- {{$t('templateDownload')}}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="operator-text">-->
|
||||
<!-- <ImportFile :url="url" :projectId="$route.query.id" :isTrue="true" :accept="'.xls'"-->
|
||||
<!-- @getList="getPersonnelList"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </span>-->
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:scroll="{x: 1200}"
|
||||
:scroll="{x: '100%'}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:loading="loading">
|
||||
|
||||
<div slot="clauseContent" slot-scope="text,result">
|
||||
<a-tooltip placement="topLeft">
|
||||
<template slot="title">
|
||||
<span v-html="text"></span>
|
||||
</template>
|
||||
<div class="clauseContent-text" v-html="text"></div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
@@ -82,6 +100,7 @@
|
||||
queryParam: {},
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
sarFileSplitInfoList: [],
|
||||
url: {
|
||||
list: '/split/sarFileSplitItems/getSplitItemsByPage'
|
||||
},
|
||||
@@ -90,30 +109,34 @@
|
||||
title: this.$t('clauseNo'),
|
||||
dataIndex: 'items_num',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseName'),
|
||||
dataIndex: 'items_name',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseContent'),
|
||||
dataIndex: 'iterms_conditions',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
scopedSlots: { customRender: 'clauseContent' }
|
||||
},
|
||||
{
|
||||
title: this.$t('technicalField'),
|
||||
dataIndex: 'technology_territory',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('informationCategory'),
|
||||
dataIndex: 'information_category',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
}
|
||||
],
|
||||
@@ -125,18 +148,40 @@
|
||||
total: 0,
|
||||
standData: {},
|
||||
fieldList: [],
|
||||
queryConditionVOList: []
|
||||
queryConditionVOList: [],
|
||||
info_id: '',
|
||||
selectedRowKeysData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleModule() {
|
||||
|
||||
},
|
||||
getData(row) {
|
||||
this.standData = row
|
||||
this.visible = true
|
||||
standardDocumentsChange(value) {
|
||||
this.replacePage()
|
||||
},
|
||||
getData(row) {
|
||||
this.total = 0
|
||||
this.dataList = []
|
||||
this.standData = row
|
||||
this.sarFileSplitInfoList = this.standData.sarFileSplitInfoList || []
|
||||
this.sarFileSplitInfoList = [...this.sarFileSplitInfoList]
|
||||
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : ''
|
||||
this.visible = true
|
||||
if (this.queryParam.info_id) {
|
||||
this.replacePage()
|
||||
}
|
||||
},
|
||||
getRowList(value) {
|
||||
if (value && value.itemId) {
|
||||
this.selectedRowKeys = this.selectedRowKeys.filter(res=>{
|
||||
return value.itemId != res
|
||||
})
|
||||
this.selectedRowKeysData = this.selectedRowKeysData.filter(res=>{
|
||||
return value.itemId != res.id
|
||||
})
|
||||
}
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
@@ -144,6 +189,7 @@
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : ''
|
||||
this.replacePage()
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
@@ -160,12 +206,13 @@
|
||||
this.replacePage()
|
||||
},
|
||||
replacePage() {
|
||||
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
|
||||
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
info_id: this.standData.id,
|
||||
menu_id:'',
|
||||
...this.queryParam
|
||||
pageNo: pageNo + '',
|
||||
pageSize: pageSize + '',
|
||||
info_id: this.queryParam.info_id,
|
||||
menu_id: ''
|
||||
}
|
||||
this.loading = true
|
||||
postAction(this.url.list, query).then((res) => {
|
||||
@@ -184,10 +231,16 @@
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$emit('standardDecompositionSheetForm', this.selectedRowKeysData)
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('PleaseSelectData'))
|
||||
}
|
||||
},
|
||||
onSelectChange() {
|
||||
|
||||
onSelectChange(value, record) {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowKeysData = record
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,4 +297,17 @@
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.clauseContent-text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
text-overflow: ellipsis;
|
||||
/*! autoprefixer: off */
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
/*! autoprefixer: on;*/
|
||||
text-justify: inter-ideograph;
|
||||
word-break: break-all
|
||||
}
|
||||
</style>
|
||||
@@ -92,10 +92,10 @@
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:columns="columns"
|
||||
>
|
||||
<!-- v-if="record.gatherResult == 'Completed'"-->
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<!-- -->
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="viewProcessClick(record)">{{$t('viewProcess')}}</a>
|
||||
<a class="text-operation"
|
||||
<a class="text-operation" v-if="record.flowStatus == 'Completed'"
|
||||
@click="evaluationResultsClick(record)">{{$t('evaluationResults')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
@@ -149,14 +149,19 @@
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<processInformation ref="processInformationRef"/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import processInformation from './components/processInformation'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
processInformation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//url传参严格按照当前命名
|
||||
@@ -353,22 +358,30 @@
|
||||
})
|
||||
},
|
||||
viewProcessClick(row) {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/processDetails',
|
||||
query: {
|
||||
prcNum: row.prcNum,
|
||||
prcType: 6,
|
||||
prcId: row.actiProcInstId
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
this.$refs.processInformationRef.getData(JSON.parse(JSON.stringify(row)))
|
||||
},
|
||||
evaluationResultsClick(row) {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/evaluationResultsWhole',
|
||||
query: row
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
if (row.evaluationType == 'Feedback evaluation') {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/evaluationResultsWhole',
|
||||
query: {
|
||||
id:row.id,
|
||||
processBackground:row.processBackground,
|
||||
serialNumber:row.serialNumber
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
} else {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/evaluationResultsClause',
|
||||
query: {
|
||||
id:row.id,
|
||||
processBackground:row.processBackground,
|
||||
serialNumber:row.serialNumber
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,12 @@
|
||||
query: row
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}else if (row.prcType == '6') {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/evaluationProcess',
|
||||
query: row
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,9 @@
|
||||
:title="$t('NcontrolType')">{{$t('NcontrolType')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="controlType">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('NcontrolType')" allowClear v-model="formInline.controlType">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('NcontrolType')"
|
||||
@change="controlTypeChange"
|
||||
allowClear v-model="formInline.controlType">
|
||||
<a-select-option v-for="(item, key) in controlType" :key="key" :value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.label ">
|
||||
{{ item.label }}
|
||||
@@ -191,6 +193,23 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12" v-else-if='this.formInline.controlType =="11"'>
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('DefaultValue')">{{$t('DefaultValue')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="titleDefaultValue">
|
||||
<a-input class="box-input"
|
||||
style="height:33px"
|
||||
:disabled="disabled"
|
||||
:maxlength="100"
|
||||
v-model="formInline.titleDefaultValue"
|
||||
:placeholder="$t('PleaseEnter')+$t('DefaultValue')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 控件备选值-->
|
||||
<a-row :gutter="24">
|
||||
@@ -210,6 +229,8 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
|
||||
<!-- 附件模板-->
|
||||
<a-col :span="12" v-if='this.formInline.controlType =="4" || this.formInline.controlType =="7" || this.formInline.controlType =="8" || this.formInline.controlType =="9" || this.formInline.controlType =="10"'>
|
||||
<div class="box-title-text">
|
||||
@@ -332,6 +353,7 @@ export default {
|
||||
{value:'8', label: this.$t('Dtext') },
|
||||
{value:'9', label: this.$t('Etext') },
|
||||
{value:'10', label: this.$t('Ftext') },
|
||||
{value:'11', label: this.$t('Gtext') },
|
||||
],
|
||||
controlVerification: [ // 控件校验
|
||||
{value:'1', label: this.$t('Nnothing') },
|
||||
@@ -391,6 +413,10 @@ export default {
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlAlternatives'), trigger: 'blur' },
|
||||
{ min:1, max: 500, message: this.$t('cantExeed')+'500'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
titleDefaultValue: [
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('DefaultValue'), trigger: 'blur' },
|
||||
{ min:1, max: 100, message: this.$t('cantExeed')+'100'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
rulesItem: {
|
||||
paramsNumber: [
|
||||
@@ -442,6 +468,9 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
controlTypeChange(value){
|
||||
this.$refs.ruleForm.clearValidate(['controlVerify','titleDefaultValue','controlValues'])
|
||||
},
|
||||
uploadSuccess(data) {
|
||||
let attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
|
||||
@@ -11,15 +11,19 @@
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="Required" v-if="!disabled">*</span>
|
||||
<span class="title-text-text" :title="$t('complianceResults')">{{$t('complianceResults')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="flag">
|
||||
<a-radio-group style="margin-top: 2px" class="box-input" v-model="formInline.flag">
|
||||
<a-radio value="0">
|
||||
<div class="title-text-right" v-if="disabled">
|
||||
{{formInline.complianceResult == 'Compliance'?$t('accord'):$t('nonConformity')}}
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" v-if="!disabled" :prop="!disabled?'complianceResult':''">
|
||||
<a-radio-group style="margin-top: 2px" class="box-input"
|
||||
v-model="formInline.complianceResult">
|
||||
<a-radio value="Compliance">
|
||||
{{$t('accord')}}
|
||||
</a-radio>
|
||||
<a-radio value="1">
|
||||
<a-radio value="Non-Compliance">
|
||||
{{$t('nonConformity')}}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -32,21 +36,24 @@
|
||||
{{$t('feedbackPoint')+(index+1)}}
|
||||
<a-icon class="icon-size"
|
||||
@click="addData"
|
||||
v-if="(formInline.dataList.length-1) == index"
|
||||
v-if="(formInline.dataList.length-1) == index && !disabled"
|
||||
type="plus-circle"/>
|
||||
<a-icon class="icon-size"
|
||||
@click="deleteData"
|
||||
v-if="formInline.dataList.length > 1 && (formInline.dataList.length - 1) == index"
|
||||
v-if="formInline.dataList.length > 1 && (formInline.dataList.length - 1) == index && !disabled"
|
||||
type="minus-circle"/>
|
||||
</div>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="Required" v-if="!disabled">*</span>
|
||||
<span class="title-text-text" :title="$t('relevantSections')">{{$t('relevantSections')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel"
|
||||
<div class="title-text-right" :title="item.relatedSection" v-if="disabled">
|
||||
{{item.relatedSection}}
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" v-if="!disabled"
|
||||
:prop="'dataList.'+index+'.relatedSection'"
|
||||
:rules="[{ required: true, message: $t('relevantSections') + $t('cannotEmpty'), trigger: 'blur'},
|
||||
{max: 300,message: $t('relevantSections') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
||||
@@ -61,11 +68,14 @@
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="Required" v-if="!disabled">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('problemDescription')">{{$t('problemDescription')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'dataList.'+index+'.issueOrSuggest'"
|
||||
<div class="title-text-right" :title="item.issueOrSuggest" v-if="disabled">
|
||||
{{item.issueOrSuggest}}
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'dataList.'+index+'.issueOrSuggest'" v-if="!disabled"
|
||||
:rules="[{ required: true, message: $t('problemDescription') + $t('cannotEmpty'), trigger: 'blur'},
|
||||
{max: 300,message: $t('problemDescription') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
||||
}]">
|
||||
@@ -83,7 +93,16 @@
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('enclosure')">{{$t('enclosure')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="accessoryFile">
|
||||
<div class="title-text-right" v-if="disabled">
|
||||
<span style="color: #21c9cc;cursor: pointer"
|
||||
v-if="item.accessoryFile" @click="viewUploadedFilesClick(item.accessoryFile)">
|
||||
{{$t('viewFile')}}
|
||||
</span>
|
||||
<span v-else>
|
||||
--
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="accessoryFile" v-if="!disabled">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('accessoryFile',index)">
|
||||
{{ (item.accessoryFile === 'null' || item.accessoryFile === '' ||
|
||||
@@ -95,20 +114,42 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="box-text" style="margin-top: 10px" v-if="disabled">
|
||||
<div class="header-text">
|
||||
{{$t('sponsorReview')}}
|
||||
</div>
|
||||
</div>
|
||||
<a-row :gutter="24" v-if="disabled">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('reviewComments')">{{$t('reviewComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="approvalOpinion">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('reviewComments')" v-model="formInline.approvalOpinion"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</div>
|
||||
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||
<viewFileModel ref="viewFileModelRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
|
||||
export default {
|
||||
name: 'evaluatorFeedback',
|
||||
components: {
|
||||
uploadFile
|
||||
uploadFile,
|
||||
viewFileModel
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
@@ -120,19 +161,34 @@
|
||||
default: (() => {
|
||||
return []
|
||||
})
|
||||
},
|
||||
complianceResult: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
disabled: false,
|
||||
rules: {
|
||||
flag:[
|
||||
complianceResult: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('complianceResults') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
approvalOpinion: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('reviewComments') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('reviewComments') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
relatedSection: [
|
||||
{
|
||||
@@ -159,6 +215,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
disabled: false,
|
||||
uploadIndex: '',
|
||||
dataList: []
|
||||
}
|
||||
@@ -177,8 +234,16 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
if (this.complianceResult.complianceResult) {
|
||||
this.formInline.complianceResult = this.complianceResult.complianceResult
|
||||
}
|
||||
this.formInline = { ...this.formInline }
|
||||
})
|
||||
if (this.$route.query.taskDefinitionKey == 'pgrqr') {
|
||||
this.disabled = false
|
||||
} else {
|
||||
this.disabled = true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickButtonToUpload(item, index) {
|
||||
@@ -204,7 +269,10 @@
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline.dataList[this.uploadIndex][this.uploadName] = attIdList.join(',')
|
||||
this.formInline = [...this.formInline]
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
viewUploadedFilesClick(item) {
|
||||
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||||
},
|
||||
addData() {
|
||||
this.formInline.dataList.push({
|
||||
@@ -213,19 +281,22 @@
|
||||
reason: '',
|
||||
accessoryFile: ''
|
||||
})
|
||||
this.formInline = [...this.formInline]
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
deleteData() {
|
||||
this.formInline.dataList.pop()
|
||||
this.formInline = [...this.formInline]
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
submitData(callBack){
|
||||
submitData(callBack) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
callBack && callBack(this.formInline)
|
||||
}
|
||||
})
|
||||
},
|
||||
preservationData(callBack) {
|
||||
callBack && callBack(this.formInline)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -277,12 +348,23 @@
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
width: calc(100% - 110px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.title-text-right {
|
||||
display: inline-block;
|
||||
width: calc(100% - 130px);
|
||||
padding-top: 12px;
|
||||
font-size: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
@@ -302,7 +384,7 @@
|
||||
}
|
||||
|
||||
.feedbackPoint {
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
margin-bottom: 10px;
|
||||
|
||||
@@ -14,100 +14,287 @@
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
<div slot="clauseContent" slot-scope="text,result">
|
||||
<a-tooltip placement="topLeft">
|
||||
<template slot="title">
|
||||
<span v-html="text"></span>
|
||||
</template>
|
||||
<div class="clauseContent-text" v-html="text"></div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
|
||||
<span slot="nameTechnicalDocument" slot-scope="text,result">
|
||||
<a-input class="box-input"
|
||||
:maxLength="100"
|
||||
v-model="result.technicalFileName"
|
||||
:placeholder="$t('PleaseEnter')+$t('nameTechnicalDocument')"/>
|
||||
</span>
|
||||
<span slot="chapter" slot-scope="text,result">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('chapter')"
|
||||
v-model="result.section"
|
||||
:maxLength="300"
|
||||
:rows="2"/>
|
||||
</span>
|
||||
<span slot="opinion" slot-scope="text,result">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('opinion')"
|
||||
v-model="result.opinion"
|
||||
:maxLength="300"
|
||||
:rows="2"/>
|
||||
</span>
|
||||
<span slot="enclosure" slot-scope="text,result,index">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('accessoryFile',index)">
|
||||
{{ (result.accessoryFile === 'null' || result.accessoryFile === '' ||
|
||||
result.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</span>
|
||||
<span slot="complianceResults" slot-scope="text,result">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('complianceResults')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
v-model="result.complianceResult">
|
||||
<a-select-option v-for="(item, key) in complianceResultsList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title="item.name ">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</span>
|
||||
<span slot="accessoryFile" slot-scope="text,result">
|
||||
<a v-if="text" @click="accessoryFileClick(text)">
|
||||
{{ $t('viewFile') }}
|
||||
</a>
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
<span slot="Results" slot-scope="text,result">
|
||||
{{text == 'Compliance' ? $t('accord'):$t('nonConformity')}}
|
||||
</span>
|
||||
<span slot="sponsorFeedback" slot-scope="text,result">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('sponsorFeedback')"
|
||||
v-model="result.sponsorFeedback"
|
||||
:maxLength="300"
|
||||
:rows="2"/>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||
<viewFileModel ref="viewFileModelRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
|
||||
export default {
|
||||
name: 'evaluatorFeedback',
|
||||
|
||||
components: {
|
||||
uploadFile
|
||||
uploadFile,
|
||||
viewFileModel
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
evaluatorFeedbackList: {
|
||||
type: Array,
|
||||
default: (() => {
|
||||
return []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
disabled:false,
|
||||
loading:false,
|
||||
uploadIndex:'',
|
||||
dataSource:[],
|
||||
columns:[
|
||||
disabled: false,
|
||||
loading: false,
|
||||
uploadIndex: '',
|
||||
dataSource: [],
|
||||
complianceResultsList: [
|
||||
{
|
||||
name: this.$t('accord'),
|
||||
value: 'Compliance'
|
||||
},
|
||||
{
|
||||
name: this.$t('nonConformity'),
|
||||
value: 'Non-Compliance'
|
||||
}
|
||||
],
|
||||
columnsTwo: [
|
||||
{
|
||||
title: this.$t('clauseNo'),
|
||||
dataIndex: 'items_num',
|
||||
dataIndex: 'itemNum',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseName'),
|
||||
dataIndex: 'items_name',
|
||||
dataIndex: 'itemName',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseContent'),
|
||||
dataIndex: 'iterms_conditions',
|
||||
dataIndex: 'itemContent',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
width: 280,
|
||||
scopedSlots: { customRender: 'clauseContent' }
|
||||
},
|
||||
{
|
||||
title: this.$t('evaluationMethod'),
|
||||
dataIndex: 'evaluationMethod',
|
||||
dataIndex: 'evaluationMethodsName',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('nameTechnicalDocument'),
|
||||
dataIndex: 'nameTechnicalDocument',
|
||||
dataIndex: 'technicalFileName',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
scopedSlots: { customRender: 'nameTechnicalDocument' }
|
||||
},
|
||||
{
|
||||
title: this.$t('chapter'),
|
||||
dataIndex: 'section',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
scopedSlots: { customRender: 'chapter' }
|
||||
},
|
||||
{
|
||||
title: this.$t('opinion'),
|
||||
dataIndex: 'opinion',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
scopedSlots: { customRender: 'opinion' }
|
||||
},
|
||||
{
|
||||
title: this.$t('enclosure'),
|
||||
dataIndex: 'accessoryFile',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
scopedSlots: { customRender: 'enclosure' }
|
||||
},
|
||||
{
|
||||
title: this.$t('complianceResults'),
|
||||
dataIndex: 'complianceResult',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
scopedSlots: { customRender: 'complianceResults' }
|
||||
}
|
||||
],
|
||||
columnsThree: [
|
||||
{
|
||||
title: this.$t('clauseNo'),
|
||||
dataIndex: 'itemNum',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseName'),
|
||||
dataIndex: 'itemName',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseContent'),
|
||||
dataIndex: 'itemContent',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
scopedSlots: { customRender: 'clauseContent' }
|
||||
},
|
||||
{
|
||||
title: this.$t('evaluationMethod'),
|
||||
dataIndex: 'evaluationMethodsName',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('nameTechnicalDocument'),
|
||||
dataIndex: 'technicalFileName',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('chapter'),
|
||||
dataIndex: 'chapter',
|
||||
dataIndex: 'section',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('opinion'),
|
||||
dataIndex: 'opinion',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('enclosure'),
|
||||
dataIndex: 'enclosure',
|
||||
dataIndex: 'accessoryFile',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'accessoryFile' }
|
||||
},
|
||||
{
|
||||
title: this.$t('complianceResults'),
|
||||
dataIndex: 'complianceResults',
|
||||
dataIndex: 'complianceResult',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'Results' }
|
||||
},
|
||||
],
|
||||
{
|
||||
title: this.$t('sponsorFeedback'),
|
||||
dataIndex: 'sponsorFeedback',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'sponsorFeedback' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
if (this.evaluatorFeedbackList && this.evaluatorFeedbackList.length > 0) {
|
||||
this.dataSource = this.evaluatorFeedbackList
|
||||
if (this.$route.query.taskDefinitionKey != 'pgrqr') {
|
||||
this.dataSource.forEach(res => {
|
||||
res.sponsorFeedback = ''
|
||||
})
|
||||
this.dataSource = [...this.dataSource]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
columns() {
|
||||
if (this.$route.query.taskDefinitionKey == 'pgrqr') {
|
||||
return this.columnsTwo
|
||||
} else {
|
||||
return this.columnsThree
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickButtonToUpload(item,index) {
|
||||
clickButtonToUpload(item, index) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item
|
||||
this.uploadIndex = index
|
||||
getAction('sys/common/getFileInfos', { id: this.dataList[this.uploadIndex][this.uploadName] }).then((res) => {
|
||||
getAction('sys/common/getFileInfos', { id: this.dataSource[this.uploadIndex][this.uploadName] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
@@ -124,9 +311,24 @@
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.dataList[this.uploadIndex][this.uploadName] = attIdList.join(',')
|
||||
this.dataList = [...this.dataList]
|
||||
this.dataSource[this.uploadIndex][this.uploadName] = attIdList.join(',')
|
||||
this.dataSource = [...this.dataSource]
|
||||
},
|
||||
submitData(callBack) {
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
if (!this.dataSource[i].complianceResult) {
|
||||
this.$message.warning(this.$t('PleaseCompleteList'))
|
||||
return
|
||||
}
|
||||
}
|
||||
callBack && callBack(this.dataSource)
|
||||
},
|
||||
preservationData(callBack) {
|
||||
callBack && callBack(this.dataSource)
|
||||
},
|
||||
accessoryFileClick(item) {
|
||||
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -195,7 +397,7 @@
|
||||
|
||||
.button-text {
|
||||
height: 38px;
|
||||
width: calc(100% - 100px);
|
||||
width: calc(100%);
|
||||
line-height: 38px;
|
||||
background: #fff;
|
||||
border: 1px #00B3BE solid;
|
||||
@@ -214,4 +416,28 @@
|
||||
margin-left: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clauseContent-text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
text-overflow: ellipsis;
|
||||
/*! autoprefixer: off */
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
/*! autoprefixer: on;*/
|
||||
text-justify: inter-ideograph;
|
||||
word-break: break-all
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
@@ -68,7 +68,7 @@
|
||||
getList() {
|
||||
let query = {
|
||||
actiProcInstId: this.$route.query.prcId,
|
||||
flowType: '5'
|
||||
flowType: this.$route.query.prcType
|
||||
}
|
||||
getAction('/lawsOpinionGather/lawsProcessHistoryEO/list', query).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -13,22 +13,26 @@
|
||||
:standardContentQuery="queryProject"
|
||||
/>
|
||||
<evaluatorFeedback
|
||||
v-if="isDisplay"
|
||||
v-if="isDisplay && !isTrue"
|
||||
ref="evaluatorFeedbackRef"
|
||||
:complianceResult="complianceResult"
|
||||
:feedbackDataList="feedbackDataList"
|
||||
:title="$t('evaluatorFeedback')"
|
||||
/>
|
||||
<evaluatorFeedbackList
|
||||
v-if="isDisplay"
|
||||
v-if="isDisplay && isTrue"
|
||||
:evaluatorFeedbackList="evaluatorFeedbackList"
|
||||
ref="evaluatorFeedbackListRef"
|
||||
:title="$t('evaluatorFeedback')"
|
||||
/>
|
||||
<footerProcess
|
||||
v-if="isDisplay"
|
||||
isPreservation
|
||||
:isPreservation="isPreservation"
|
||||
:isSubmit="true"
|
||||
:isSendBack="isSendBack"
|
||||
@preservation="preservation"
|
||||
@submit="submit"
|
||||
@sendBack="sendBack"
|
||||
/>
|
||||
<circulationHistory v-if="isDisplay"/>
|
||||
</div>
|
||||
@@ -47,6 +51,7 @@
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'evaluationProcess',
|
||||
components: {
|
||||
@@ -62,16 +67,22 @@
|
||||
title: this.$t('collectionOfRegulatoryOpinions'),
|
||||
url: {
|
||||
queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds',
|
||||
list: '/lawsOpinionGather/lawsOpinionAssessmentResultEO/list'
|
||||
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationResultEO/queryEvaluationResultAndComplianceResult'
|
||||
},
|
||||
loading: false,
|
||||
isDisplay: true,
|
||||
feedbackDataList: [],
|
||||
queryProject: {},
|
||||
standardContentList: [
|
||||
evaluatorFeedbackList: [],
|
||||
complianceResult: {},
|
||||
isPreservation: false,
|
||||
isSendBack: false,
|
||||
isTrue: false,
|
||||
standardContentList: [],
|
||||
standardContent: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
value: 'serial_number'
|
||||
value: 'serialNumber'
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
@@ -79,7 +90,7 @@
|
||||
},
|
||||
{
|
||||
title: this.$t('regulatoryEngineer'),
|
||||
value: 'currentUserName'
|
||||
value: 'regulationOwnerName'
|
||||
},
|
||||
{
|
||||
title: this.$t('closingDate'),
|
||||
@@ -87,54 +98,106 @@
|
||||
},
|
||||
{
|
||||
title: this.$t('evaluationMethod'),
|
||||
value: 'evaluationMethod',
|
||||
value: 'evaluationMethodsName'
|
||||
},
|
||||
{
|
||||
title: this.$t('RelevantMaterials'),
|
||||
value: 'RelevantMaterials',
|
||||
value: 'relatedDataFileId',
|
||||
type: 2
|
||||
},
|
||||
{
|
||||
title: this.$t('processBackground'),
|
||||
value: 'processBackground'
|
||||
}
|
||||
// {
|
||||
// title: this.$t('remarks'),
|
||||
// value: 'remark'
|
||||
// }
|
||||
],
|
||||
evaluatorFeedback: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
value: 'serialNumber'
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
value: 'title'
|
||||
},
|
||||
{
|
||||
title: this.$t('regulatoryEngineer'),
|
||||
value: 'regulationOwnerName'
|
||||
},
|
||||
{
|
||||
title: this.$t('closingDate'),
|
||||
value: 'endTime'
|
||||
},
|
||||
{
|
||||
title: this.$t('RelevantMaterials'),
|
||||
value: 'relatedDataFileId',
|
||||
type: 2
|
||||
},
|
||||
{},
|
||||
{
|
||||
title: this.$t('processBackground'),
|
||||
value: 'processBackground'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.isDisplay = true
|
||||
// this.queryTaskDetailByTask(() => {
|
||||
// this.lawsOpinionAssessmentResult()
|
||||
// })
|
||||
this.isDisplay = false
|
||||
if (this.$route.query.taskDefinitionKey == 'pgrqr') {
|
||||
this.isPreservation = true
|
||||
this.isSendBack = false
|
||||
} else {
|
||||
this.isPreservation = false
|
||||
this.isSendBack = true
|
||||
}
|
||||
this.queryTaskDetailByTask()
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
queryTaskDetailByTask(callback) {
|
||||
queryTaskDetailByTask() {
|
||||
this.loading = true
|
||||
getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.$route.query.taskIds }).then((res) => {
|
||||
if (res instanceof String) {
|
||||
this.queryProject = JSON.parse(res) || {}
|
||||
callback && callback()
|
||||
} else {
|
||||
this.queryProject = res || {}
|
||||
callback && callback()
|
||||
}
|
||||
this.isTrue = this.queryProject.evaluationType == 'Feedback evaluation' ? false : true
|
||||
if (this.isTrue) {
|
||||
this.standardContentList = this.evaluatorFeedback
|
||||
this.lawsTechnologyEvaluationItem()
|
||||
} else {
|
||||
this.standardContentList = this.standardContent
|
||||
this.lawsOpinionAssessmentResult()
|
||||
}
|
||||
})
|
||||
},
|
||||
lawsTechnologyEvaluationItem() {
|
||||
getAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/list', {
|
||||
lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId,
|
||||
actiProcInstId: this.$route.query.prcId
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.evaluatorFeedbackList = res.result || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.evaluatorFeedbackList = []
|
||||
this.loading = false
|
||||
}
|
||||
this.isDisplay = true
|
||||
})
|
||||
},
|
||||
lawsOpinionAssessmentResult() {
|
||||
getAction(this.url.list, {
|
||||
lawsOpinionGatherId: this.queryProject.id,
|
||||
lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId,
|
||||
actiProcInstId: this.$route.query.prcId
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.feedbackDataList = res.result || []
|
||||
this.complianceResult = res.result.complianceResult || {}
|
||||
this.feedbackDataList = res.result.evaluationResultEOList || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.feedbackDataList = []
|
||||
this.complianceResult = {}
|
||||
this.loading = false
|
||||
}
|
||||
this.isDisplay = true
|
||||
@@ -142,21 +205,52 @@
|
||||
},
|
||||
preservation() {
|
||||
this.loading = true
|
||||
let dataList = this.$refs.feedbackInformationRef.dataList
|
||||
this.insertBatch(dataList, 1)
|
||||
if (this.isTrue) {
|
||||
this.$refs.evaluatorFeedbackListRef.preservationData((res) => {
|
||||
this.batchUpdate(res, 1)
|
||||
})
|
||||
} else {
|
||||
this.$refs.evaluatorFeedbackRef.preservationData((res) => {
|
||||
this.insertBatch(res, 1)
|
||||
})
|
||||
}
|
||||
},
|
||||
insertBatch(list, num) {
|
||||
list.forEach(res => {
|
||||
res.lawsOpinionGatherId = this.queryProject.id
|
||||
res.actiProcInstId = this.$route.query.prcId
|
||||
batchUpdate(val, num) {
|
||||
let query = {
|
||||
actiProcInstId: this.$route.query.prcId,
|
||||
lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId,
|
||||
itemResultList: val
|
||||
}
|
||||
postAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/batchUpdate', query).then((res) => {
|
||||
if (res.success) {
|
||||
if (num == 1) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loading = false
|
||||
} else {
|
||||
if (this.queryProject.msg) {
|
||||
delete this.queryProject.msg
|
||||
}
|
||||
this.completeTask()
|
||||
}
|
||||
} else {
|
||||
if (num == 1) {
|
||||
this.loading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}
|
||||
})
|
||||
postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', { dataList:list }).then((res) => {
|
||||
},
|
||||
insertBatch(val, num) {
|
||||
let query = {
|
||||
actiProcInstId: this.$route.query.prcId,
|
||||
lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId,
|
||||
complianceResult: val.complianceResult,
|
||||
evaluationResultList: val.dataList
|
||||
}
|
||||
postAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationResultEO/evaluatorSaveResult', query).then((res) => {
|
||||
if (res.success) {
|
||||
if (num == 1) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$router.push({
|
||||
path: '/collectionOfRegulatoryOpinions'
|
||||
})
|
||||
this.loading = false
|
||||
} else {
|
||||
this.completeTask()
|
||||
@@ -169,26 +263,61 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
sendBack() {
|
||||
if (this.isTrue) {
|
||||
this.$refs.evaluatorFeedbackListRef.preservationData((res) => {
|
||||
this.loading = true
|
||||
this.queryProject.flag = '2'
|
||||
this.batchUpdate(res, 2)
|
||||
})
|
||||
} else {
|
||||
this.$refs.evaluatorFeedbackRef.preservationData((res) => {
|
||||
this.loading = true
|
||||
this.queryProject.approvalOpinion = res.approvalOpinion
|
||||
this.queryProject.flag = '2'
|
||||
this.completeTask()
|
||||
})
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
this.$refs.evaluatorFeedbackRef.submitData()
|
||||
// let dataList = this.$refs.feedbackInformationRef.dataList
|
||||
// this.insertBatch(dataList, 2)
|
||||
if (this.isTrue) {
|
||||
this.$refs.evaluatorFeedbackListRef.submitData((res) => {
|
||||
if (this.$route.query.taskDefinitionKey == 'pgrqr') {
|
||||
this.loading = true
|
||||
this.batchUpdate(res, 2)
|
||||
} else {
|
||||
this.loading = true
|
||||
this.queryProject.flag = '1'
|
||||
this.batchUpdate(res, 2)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$refs.evaluatorFeedbackRef.submitData((res) => {
|
||||
if (this.$route.query.taskDefinitionKey == 'pgrqr') {
|
||||
this.loading = true
|
||||
this.insertBatch(res, 2)
|
||||
} else {
|
||||
this.loading = true
|
||||
this.queryProject.approvalOpinion = res.approvalOpinion
|
||||
this.queryProject.flag = '1'
|
||||
this.completeTask()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
completeTask() {
|
||||
let query = {
|
||||
userid: this.userInfo().id,
|
||||
taskId: this.$route.query.taskIds,
|
||||
flag: this.queryProject.flag,
|
||||
json: JSON.stringify(this.queryProject).replace(/\"/g, '\'')
|
||||
}
|
||||
postAction('/workFlow/completeTask', query).then((res) => {
|
||||
if (res.success) {
|
||||
// setTimeout(() => {
|
||||
// window.close()
|
||||
// }, 1000)
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loading = false
|
||||
this.$router.push({
|
||||
path: '/collectionOfRegulatoryOpinions'
|
||||
path: '/technologyAssessment'
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<div class="action-bar">
|
||||
</div>
|
||||
<regulatoryCirculationHistory v-if="$route.query.prcType == '5'"/>
|
||||
<regulatoryCirculationHistory v-if="$route.query.prcType == '5' || $route.query.prcType == '6'"/>
|
||||
<circulationHistory v-else/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -51,7 +51,8 @@
|
||||
selectedRowKeys: [],
|
||||
prcTypeName: {
|
||||
1: this.$t('taskConfirmationProcess'),
|
||||
5:this.$t('collectionOfRegulatoryOpinionsProcess')
|
||||
5:this.$t('collectionOfRegulatoryOpinionsProcess'),
|
||||
6:this.$t('regulatoryTechnologyAssessmentProcess')
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
selectedRowKeys: [],
|
||||
prcTypeName: {
|
||||
1: this.$t('taskConfirmationProcess'),
|
||||
5:this.$t('collectionOfRegulatoryOpinionsProcess')
|
||||
5:this.$t('collectionOfRegulatoryOpinionsProcess'),
|
||||
6:this.$t('regulatoryTechnologyAssessmentProcess')
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
selectedRowKeys: [],
|
||||
prcTypeName: {
|
||||
1: this.$t('taskConfirmationProcess'),
|
||||
5:this.$t('collectionOfRegulatoryOpinionsProcess')
|
||||
5:this.$t('collectionOfRegulatoryOpinionsProcess'),
|
||||
6:this.$t('regulatoryTechnologyAssessmentProcess')
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
selectedRowKeys: [],
|
||||
prcTypeName: {
|
||||
1: this.$t('taskConfirmationProcess'),
|
||||
5:this.$t('collectionOfRegulatoryOpinionsProcess')
|
||||
5:this.$t('collectionOfRegulatoryOpinionsProcess'),
|
||||
6:this.$t('regulatoryTechnologyAssessmentProcess')
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
@@ -168,6 +169,12 @@
|
||||
query: row
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
} else if (row.prcType == '6') {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/evaluationProcess',
|
||||
query: row
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<div class="title-text" :title="$t('newNiONumber')">
|
||||
<span>{{$t('newNiONumber')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('newNiONumber')"
|
||||
v-model="formInline.nioNumber"></a-input>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('newNiONumber')"
|
||||
v-model="formInline.nioNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -29,21 +29,21 @@
|
||||
<div class="title-text" :title="$t('ParameterName')">
|
||||
<span>{{$t('ParameterName')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ParameterName')"
|
||||
v-model="formInline.paramsName"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('certificationCategory')">
|
||||
<span>{{$t('certificationCategory')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.certCategory"
|
||||
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'cert_category'"/>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ParameterName')"
|
||||
v-model="formInline.paramsName"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <div class="box-title-text">-->
|
||||
<!-- <div class="title-text" :title="$t('certificationCategory')">-->
|
||||
<!-- <span>{{$t('certificationCategory')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.certCategory"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('certificationCategory')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'cert_category'"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('areaOfResponsibility')">
|
||||
@@ -60,33 +60,38 @@
|
||||
<div class="title-text" :title="$t('completedBy')">
|
||||
<span>{{$t('completedBy')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('completedBy')"
|
||||
v-model="formInline.dre"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('status')">
|
||||
<span>{{$t('status')}}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('status')"
|
||||
class="box-input"
|
||||
allowClear
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="formInline.state">
|
||||
<a-select-option v-for="(item, key) in statusList"
|
||||
:key="key"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name ">
|
||||
{{ item.name}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('completedBy')"
|
||||
v-model="formInline.dre"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <div class="box-title-text">-->
|
||||
<!-- <div class="title-text" :title="$t('status')">-->
|
||||
<!-- <span>{{$t('status')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('status')"-->
|
||||
<!-- class="box-input"-->
|
||||
<!-- allowClear-->
|
||||
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
||||
<!-- v-model="formInline.state">-->
|
||||
<!-- <a-select-option v-for="(item, key) in statusList"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
|
||||
<!-- {{ item.name}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px"
|
||||
class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<!-- v-if="this.$route.query.it === undefined"-->
|
||||
<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>
|
||||
@@ -187,7 +192,7 @@
|
||||
<div style="width: 100%">
|
||||
<!-- 表格-10控件-->
|
||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue'
|
||||
:formInline='formInline' :currentPersonRole='currentPersonRole'
|
||||
:formInline='formInline' :queryParamQuery='queryParamQuery' :currentPersonRole='currentPersonRole'
|
||||
@getDataSource="getDataSource"
|
||||
@handlePreservation="handlePreservation"
|
||||
@value='value'
|
||||
@@ -391,6 +396,7 @@
|
||||
import TableCollection from '@/components/tableCollection/index'
|
||||
import { getAction, postAction } from '../../../api/manage'
|
||||
import ParameterLibraryAdd from '@/components/ParameterLibraryAdd/index'
|
||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||
import SynchronousSubmissionLibrary from '@/components/SynchronousSubmissionLibrary/index'
|
||||
import TaskCutOffTime from '@/components/TaskCutOffTime/index'
|
||||
import ReferenceParameter from '@/components/ReferenceParameter/index'
|
||||
@@ -408,45 +414,55 @@
|
||||
AssignedBy,
|
||||
TaskCutOffTime,
|
||||
ReferenceParameter,
|
||||
SynchronousSubmissionLibrary
|
||||
SynchronousSubmissionLibrary,
|
||||
globalAdvancedQuery
|
||||
},
|
||||
data() {
|
||||
this.statusList = [
|
||||
{
|
||||
value: '1',
|
||||
name: this.$t('CollectionInitiated')
|
||||
title: this.$t('CollectionInitiated'),
|
||||
key:'1',
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
name: this.$t('handledInterface')
|
||||
title: this.$t('handledInterface'),
|
||||
key:'2',
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
name: this.$t('ReturnedPerson')
|
||||
title: this.$t('ReturnedPerson'),
|
||||
key:'3',
|
||||
},
|
||||
{
|
||||
value: '4',
|
||||
name: this.$t('completed')
|
||||
title: this.$t('completed'),
|
||||
key:'4',
|
||||
},
|
||||
{
|
||||
value: '5',
|
||||
name: this.$t('Filledreturn')
|
||||
title: this.$t('Filledreturn'),
|
||||
key:'5',
|
||||
},
|
||||
{
|
||||
value: '6',
|
||||
name: this.$t('Submitted')
|
||||
title: this.$t('Submitted'),
|
||||
key:'6',
|
||||
},
|
||||
{
|
||||
value: '7',
|
||||
name: this.$t('ReturnedEngineer')
|
||||
title: this.$t('ReturnedEngineer'),
|
||||
key:'7',
|
||||
},
|
||||
{
|
||||
value: '8',
|
||||
name: this.$t('SynchronizedLibrary')
|
||||
title: this.$t('SynchronizedLibrary'),
|
||||
key:'8',
|
||||
},
|
||||
{
|
||||
value: '9',
|
||||
name: this.$t('alteration')
|
||||
title: this.$t('alteration'),
|
||||
key:'9',
|
||||
}
|
||||
]
|
||||
return {
|
||||
@@ -502,9 +518,24 @@
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
fieldList: [
|
||||
{
|
||||
type: '',
|
||||
value: 'certCategory',
|
||||
text: this.$t('certificationCategory'),
|
||||
dictCode: 'cert_category'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
{
|
||||
type: '',
|
||||
value: 'state',
|
||||
text: this.$t('status'),
|
||||
options: this.statusList//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
],
|
||||
selectedRowKeys: [],
|
||||
textLoading: false,
|
||||
formInline: {},
|
||||
queryParamQuery:{},
|
||||
url: {
|
||||
tableHeader: 'params/collectManifest/getHeader',
|
||||
tableList: 'params/collectManifest/list',
|
||||
@@ -577,6 +608,8 @@
|
||||
},
|
||||
mounted() {
|
||||
this.GetgetLoginUserType()
|
||||
console.log(this.currentPersonRole)
|
||||
// this.LoginUserType()
|
||||
setTimeout(() => {
|
||||
if (this.currentPersonRole == 'dre') {
|
||||
this.handlePreservation()
|
||||
@@ -740,6 +773,20 @@
|
||||
return flag
|
||||
}
|
||||
},
|
||||
// 高级搜索
|
||||
handleSuperQuery(params, matchType) {
|
||||
let sqp = {}
|
||||
if (!params || (params && params.length == 0)) {
|
||||
sqp['superQueryParams'] = ''
|
||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
|
||||
} else {
|
||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
|
||||
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
|
||||
sqp['superQueryMatchType'] = matchType
|
||||
}
|
||||
this.queryParamQuery = sqp
|
||||
this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
|
||||
},
|
||||
// 认证工程师 批量删除 权限
|
||||
// 仅仅状态为 待发起收集 工程接口人退回 变更 可以批量删除
|
||||
homoJurisdictionBatchdelete() {
|
||||
@@ -1138,6 +1185,7 @@
|
||||
let itemIn = Object.keys(selectedRowKeysValue[i])
|
||||
for (let j = 0; j < itemIn.length; j++) {
|
||||
if (itemIn[j] !== 'sdt') {
|
||||
console.log(selectedRowKeysValue[i][itemIn[j]])
|
||||
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
|
||||
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
|
||||
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
|
||||
@@ -1391,7 +1439,10 @@
|
||||
this.$refs.CollectionTabel.getTableList()
|
||||
},
|
||||
searchReset() {
|
||||
this.formInline = {}
|
||||
this.$refs.CollectionTabel.getTableListReset()
|
||||
this.$refs.globalAdvancedQueryRef.handleReset()
|
||||
// this.$refs.globalAdvancedQueryRef.emitCallback()
|
||||
},
|
||||
// 批量删除 -- 与下发收集一致
|
||||
handleDelJurisdiction() {
|
||||
|
||||
Reference in New Issue
Block a user