Merge remote-tracking branch 'origin/master'
This commit is contained in:
+40
-15
@@ -1,7 +1,6 @@
|
|||||||
package com.jero.modules.cert.template.controller;
|
package com.jero.modules.cert.template.controller;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -10,6 +9,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
|||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||||
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
||||||
|
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||||
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -24,6 +24,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,6 +40,9 @@ import java.util.List;
|
|||||||
public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParamsInfoEOService> {
|
public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParamsInfoEOService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IParamsInfoEOService paramsInfoEOService;
|
private IParamsInfoEOService paramsInfoEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IParamsInfoPublishEOService paramsInfoPublishEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@@ -55,6 +59,8 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
public Result<?> queryPageList(ParamsInfoEO paramsInfoEO,
|
public Result<?> queryPageList(ParamsInfoEO paramsInfoEO,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
@RequestParam(name="orderByField", required = false) String orderByField,
|
||||||
|
@RequestParam(name="orderBy", required = false) String orderBy,
|
||||||
@RequestParam(name="cut") String cut,
|
@RequestParam(name="cut") String cut,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
LambdaQueryWrapper<ParamsInfoEO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ParamsInfoEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
@@ -62,6 +68,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
.like(StringUtils.isNotEmpty(paramsInfoEO.getNioNumber()), ParamsInfoEO::getNioNumber, paramsInfoEO.getNioNumber())
|
.like(StringUtils.isNotEmpty(paramsInfoEO.getNioNumber()), ParamsInfoEO::getNioNumber, paramsInfoEO.getNioNumber())
|
||||||
.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), ParamsInfoEO::getParamsName, paramsInfoEO.getParamsName())
|
.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), ParamsInfoEO::getParamsName, paramsInfoEO.getParamsName())
|
||||||
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), ParamsInfoEO::getDutyTerritory, paramsInfoEO.getDutyTerritory())
|
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), ParamsInfoEO::getDutyTerritory, paramsInfoEO.getDutyTerritory())
|
||||||
|
.orderBy(StringUtils.isNotBlank(orderByField), "1".equals(orderBy)?true:false, ParamsInfoEO::getNioNumber)
|
||||||
.orderByDesc(ParamsInfoEO::getCreateTime);
|
.orderByDesc(ParamsInfoEO::getCreateTime);
|
||||||
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
|
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
|
||||||
IPage<ParamsInfoEO> pageList = paramsInfoEOService.page(page, queryWrapper);
|
IPage<ParamsInfoEO> pageList = paramsInfoEOService.page(page, queryWrapper);
|
||||||
@@ -112,8 +119,12 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
@ApiOperation(value="参数项基本信息表-添加", notes="参数项基本信息表-添加")
|
@ApiOperation(value="参数项基本信息表-添加", notes="参数项基本信息表-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
public Result<?> add(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
||||||
paramsInfoEOService.add(paramsInfoEO);
|
boolean isSuccess = paramsInfoEOService.add(paramsInfoEO);
|
||||||
return Result.OK("添加成功!");
|
if (isSuccess) {
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
} else {
|
||||||
|
return Result.error("添加失败!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -126,8 +137,12 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
@ApiOperation(value="参数项基本信息表-编辑", notes="参数项基本信息表-编辑")
|
@ApiOperation(value="参数项基本信息表-编辑", notes="参数项基本信息表-编辑")
|
||||||
@PostMapping(value = "/edit")
|
@PostMapping(value = "/edit")
|
||||||
public Result<?> edit(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
public Result<?> edit(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
||||||
paramsInfoEOService.editById(paramsInfoEO);
|
boolean isSuccess = paramsInfoEOService.editById(paramsInfoEO);
|
||||||
return Result.OK("编辑成功!");
|
if (isSuccess) {
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
} else {
|
||||||
|
return Result.error("编辑失败!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,6 +196,20 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
return Result.OK(paramsInfoEO);
|
return Result.OK(paramsInfoEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布版本
|
||||||
|
*
|
||||||
|
* @param paramsTemplateId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "参数项基本信息表-发布版本")
|
||||||
|
@ApiOperation(value="参数项基本信息表-发布版本", notes="参数项基本信息表-发布版本")
|
||||||
|
@GetMapping(value = "/publish")
|
||||||
|
public Result<?> publish(@RequestParam(name="paramsTemplateId") String paramsTemplateId) {
|
||||||
|
int publishVersion = paramsInfoPublishEOService.publishTemplate(paramsTemplateId);
|
||||||
|
return Result.OK("发布版本:" + publishVersion + "成功!");
|
||||||
|
}
|
||||||
|
|
||||||
@AutoLog(value = "参数项基本信息表-模板下载")
|
@AutoLog(value = "参数项基本信息表-模板下载")
|
||||||
@ApiOperation(value = "参数项基本信息表-模板下载", notes="参数项基本信息表-模板下载")
|
@ApiOperation(value = "参数项基本信息表-模板下载", notes="参数项基本信息表-模板下载")
|
||||||
@GetMapping(value = "/exportTemplate")
|
@GetMapping(value = "/exportTemplate")
|
||||||
@@ -195,20 +224,16 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
* 导出zip
|
* 导出zip
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param parameter
|
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "参数项基本信息表-导出")
|
@AutoLog(value = "参数项基本信息表-导出")
|
||||||
@ApiOperation(value = "参数项基本信息表-导出", notes="参数项基本信息表-导出")
|
@ApiOperation(value = "参数项基本信息表-导出", notes="参数项基本信息表-导出")
|
||||||
@PostMapping(value = "/exportParamsInfoZip")
|
@PostMapping(value = "/exportParamsInfoZip")
|
||||||
public void exportParamsInfoZip(@RequestParam(value = "cut") String cut,
|
public void exportParamsInfoZip(@RequestParam Map<String, Object> map,
|
||||||
@RequestParam(value = "exportName", required = false) String exportName,
|
HttpServletResponse response,
|
||||||
@RequestParam(value = "paramsInfoVO", required = false) String parameter,
|
HttpServletRequest request) {
|
||||||
HttpServletResponse response,
|
String cut = (String) map.get("cut");
|
||||||
HttpServletRequest request) {
|
String exportName = (String) map.get("exportName");
|
||||||
ParamsInfoVO paramsInfoVO = new ParamsInfoVO();
|
ParamsInfoVO paramsInfoVO = (ParamsInfoVO) map.get("paramsInfoVO");
|
||||||
if (StringUtils.isNotBlank(parameter)) {
|
|
||||||
paramsInfoVO = JSONObject.parseObject(parameter, ParamsInfoVO.class);
|
|
||||||
}
|
|
||||||
paramsInfoEOService.exportParamsInfo(cut, paramsInfoVO, exportName, response, request);
|
paramsInfoEOService.exportParamsInfo(cut, paramsInfoVO, exportName, response, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+19
-3
@@ -3,11 +3,11 @@ package com.jero.modules.cert.template.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
|
||||||
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
||||||
|
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -156,7 +156,23 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
|
|||||||
return Result.OK(paramsTemplateEO);
|
return Result.OK(paramsTemplateEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 复制参数模板
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "参数模板表-复制")
|
||||||
|
@ApiOperation(value="参数模板表-复制", notes="参数模板表-复制")
|
||||||
|
@GetMapping(value = "/copyById")
|
||||||
|
public Result<?> copyById(@RequestParam(name="id") String id,
|
||||||
|
@RequestParam(name="paramsTemplateName") String paramsTemplateName) {
|
||||||
|
ParamsTemplateEO paramsTemplateEO = paramsTemplateEOService.copyById(id, paramsTemplateName);
|
||||||
|
return Result.OK("复制成功", paramsTemplateEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
* 导出excel
|
* 导出excel
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
|
|||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
package com.jero.modules.cert.template.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 认证类别参数信息表发布版
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("cert_category_params_info_publish")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="cert_category_params_info_publish对象", description="认证类别参数信息表发布版")
|
||||||
|
public class CertCategoryParamsInfoPublishEO extends CertCategoryParamsInfoEO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**发布时版本*/
|
||||||
|
@ApiModelProperty(value = "发布时版本")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
package com.jero.modules.cert.template.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 参数项基本信息表发布版
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("params_info_publish")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="params_info_publish对象", description="参数项基本信息表发布版")
|
||||||
|
public class ParamsInfoPublishEO extends ParamsInfoEO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**发布时版本*/
|
||||||
|
@ApiModelProperty(value = "发布时版本")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
+4
@@ -21,5 +21,9 @@ public interface CertCategoryParamsInfoEOMapper extends BaseMapper<CertCategoryP
|
|||||||
*/
|
*/
|
||||||
List<CertCategoryParamsInfoEO> selectListByNioNumber(@Param("nioNumber") String nioNumber);
|
List<CertCategoryParamsInfoEO> selectListByNioNumber(@Param("nioNumber") String nioNumber);
|
||||||
|
|
||||||
|
List<CertCategoryParamsInfoEO> selectListByParamsTemplateIds(@Param("paramsTemplateIds") String paramsTemplateIds);
|
||||||
|
|
||||||
int deleteByNioNumberList(@Param("list") List<String> nioNumberList);
|
int deleteByNioNumberList(@Param("list") List<String> nioNumberList);
|
||||||
|
|
||||||
|
int deleteByParamsTemplateIds(@Param("paramsTemplateIds") String paramsTemplateIds);
|
||||||
}
|
}
|
||||||
|
|||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.jero.modules.cert.template.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 认证类别参数信息表发布版
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface CertCategoryParamsInfoPublishEOMapper extends BaseMapper<CertCategoryParamsInfoPublishEO> {
|
||||||
|
|
||||||
|
}
|
||||||
+6
-1
@@ -17,6 +17,11 @@ import java.util.List;
|
|||||||
public interface ParamsInfoEOMapper extends BaseMapper<ParamsInfoEO> {
|
public interface ParamsInfoEOMapper extends BaseMapper<ParamsInfoEO> {
|
||||||
|
|
||||||
List<ParamsInfoEO> selectListWithCert(@Param("paramsInfoVO") ParamsInfoVO paramsInfoVO);
|
List<ParamsInfoEO> selectListWithCert(@Param("paramsInfoVO") ParamsInfoVO paramsInfoVO);
|
||||||
|
|
||||||
List<ParamsInfoEnExport> selectListWithCertForEnExport(@Param("paramsInfoVO") ParamsInfoVO paramsInfoVO);
|
List<ParamsInfoEnExport> selectListWithCertForEnExport(@Param("paramsInfoVO") ParamsInfoVO paramsInfoVO);
|
||||||
|
|
||||||
|
int deleteByParamsTemplateIds(@Param("paramsTemplateIds") String paramsTemplateIds);
|
||||||
|
|
||||||
|
List<ParamsInfoEO> selectListByParamsTemplateIds(@Param("paramsTemplateIds") String paramsTemplateIds);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.jero.modules.cert.template.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 参数项基本信息表发布版
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ParamsInfoPublishEOMapper extends BaseMapper<ParamsInfoPublishEO> {
|
||||||
|
|
||||||
|
}
|
||||||
+17
@@ -25,6 +25,15 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectListByParamsTemplateIds" resultMap="CertCategoryParamsInfoEOResultMap" parameterType="java.lang.String">
|
||||||
|
select *
|
||||||
|
from cert_category_params_info
|
||||||
|
where params_template_id in
|
||||||
|
<foreach collection="paramsTemplateIds.split(',')" index="index" separator="," open="(" close=")" item="item">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
<delete id="deleteByNioNumberList" parameterType="java.util.List">
|
<delete id="deleteByNioNumberList" parameterType="java.util.List">
|
||||||
delete from cert_category_params_info
|
delete from cert_category_params_info
|
||||||
where nio_number in
|
where nio_number in
|
||||||
@@ -32,4 +41,12 @@
|
|||||||
#{nioNumber}
|
#{nioNumber}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByParamsTemplateIds" parameterType="java.lang.String">
|
||||||
|
delete from cert_category_params_info
|
||||||
|
where params_template_id in
|
||||||
|
<foreach collection="paramsTemplateIds.split(',')" index="index" separator="," open="(" close=")" item="item">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.cert.template.mapper.CertCategoryParamsInfoPublishEOMapper">
|
||||||
|
<resultMap id="CertCategoryParamsInfoPublishEOResultMap" type="com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="params_number" property="paramsNumber" />
|
||||||
|
<result column="params_name" property="paramsName" />
|
||||||
|
<result column="description" property="description" />
|
||||||
|
<result column="nio_number" property="nioNumber" />
|
||||||
|
<result column="cert_category" property="certCategory" />
|
||||||
|
<result column="params_template_id" property="paramsTemplateId" />
|
||||||
|
<result column="version" property="version" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+20
@@ -117,6 +117,9 @@
|
|||||||
<sql id="BaseQuerySql">
|
<sql id="BaseQuerySql">
|
||||||
<where>
|
<where>
|
||||||
<if test="paramsInfoVO != null">
|
<if test="paramsInfoVO != null">
|
||||||
|
<if test="paramsInfoVO.paramsTemplateId !=null and paramsInfoVO.paramsTemplateId !=''">
|
||||||
|
AND params_template_id LIKE CONCAT(CONCAT('%',#{paramsInfoVO.paramsTemplateId}),'%')
|
||||||
|
</if>
|
||||||
<if test="paramsInfoVO.nioNumber !=null and paramsInfoVO.nioNumber !=''">
|
<if test="paramsInfoVO.nioNumber !=null and paramsInfoVO.nioNumber !=''">
|
||||||
AND nio_number LIKE CONCAT(CONCAT('%',#{paramsInfoVO.nioNumber}),'%')
|
AND nio_number LIKE CONCAT(CONCAT('%',#{paramsInfoVO.nioNumber}),'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -153,4 +156,21 @@
|
|||||||
<include refid="BaseQuerySql"/>
|
<include refid="BaseQuerySql"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectListByParamsTemplateIds" resultMap="ParamsInfoEOResultMap" parameterType="java.lang.String">
|
||||||
|
select *
|
||||||
|
from params_info
|
||||||
|
where params_template_id in
|
||||||
|
<foreach collection="paramsTemplateIds.split(',')" index="index" separator="," open="(" close=")" item="item">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<delete id="deleteByParamsTemplateIds" parameterType="java.lang.String">
|
||||||
|
delete from params_info
|
||||||
|
where params_template_id in
|
||||||
|
<foreach collection="paramsTemplateIds.split(',')" index="index" separator="," open="(" close=")" item="item">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.cert.template.mapper.ParamsInfoPublishEOMapper">
|
||||||
|
<resultMap id="ParamsInfoPublishEOResultMap" type="com.jero.modules.cert.template.entity.ParamsInfoPublishEO">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="nio_number" property="nioNumber" />
|
||||||
|
<result column="is_must" property="isMust" />
|
||||||
|
<result column="params_name" property="paramsName" />
|
||||||
|
<result column="technology_territory" property="technologyTerritory" />
|
||||||
|
<result column="params_batch" property="paramsBatch" />
|
||||||
|
<result column="duty_territory" property="dutyTerritory" />
|
||||||
|
<result column="description" property="description" />
|
||||||
|
<result column="cert_category" property="certCategory" />
|
||||||
|
<result column="control_type" property="controlType" />
|
||||||
|
<result column="control_values" property="controlValues" />
|
||||||
|
<result column="control_verify" property="controlVerify" />
|
||||||
|
<result column="file_template_connect_id" property="fileTemplateConnectId" />
|
||||||
|
<result column="params_template_id" property="paramsTemplateId" />
|
||||||
|
<result column="version" property="version" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+6
@@ -2,6 +2,8 @@ package com.jero.modules.cert.template.service;
|
|||||||
|
|
||||||
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO;
|
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,5 +63,9 @@ public interface ICertCategoryParamsInfoEOService extends IService<CertCategoryP
|
|||||||
|
|
||||||
List<CertCategoryParamsInfoEO> selectListByNioNumber(String nioNumber);
|
List<CertCategoryParamsInfoEO> selectListByNioNumber(String nioNumber);
|
||||||
|
|
||||||
|
List<CertCategoryParamsInfoEO> selectListByParamsTemplateIds(String paramsTemplateIds);
|
||||||
|
|
||||||
int deleteByNioNumberList(List<String> nioNumberList);
|
int deleteByNioNumberList(List<String> nioNumberList);
|
||||||
|
|
||||||
|
int deleteByParamsTemplateIds(String paramsTemplateIds);
|
||||||
}
|
}
|
||||||
|
|||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
package com.jero.modules.cert.template.service;
|
||||||
|
|
||||||
|
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 认证类别参数信息表发布版
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ICertCategoryParamsInfoPublishEOService extends IService<CertCategoryParamsInfoPublishEO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param certCategoryParamsInfoPublishEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(CertCategoryParamsInfoPublishEO certCategoryParamsInfoPublishEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param certCategoryParamsInfoPublishEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(CertCategoryParamsInfoPublishEO certCategoryParamsInfoPublishEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
CertCategoryParamsInfoPublishEO queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CertCategoryParamsInfoPublishEO> queryList();
|
||||||
|
}
|
||||||
+7
-2
@@ -28,7 +28,7 @@ public interface IParamsInfoEOService extends IService<ParamsInfoEO> {
|
|||||||
* @param paramsInfoEO
|
* @param paramsInfoEO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void add(ParamsInfoEO paramsInfoEO);
|
boolean add(ParamsInfoEO paramsInfoEO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
@@ -36,7 +36,7 @@ public interface IParamsInfoEOService extends IService<ParamsInfoEO> {
|
|||||||
* @param paramsInfoEO
|
* @param paramsInfoEO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void editById(ParamsInfoEO paramsInfoEO);
|
boolean editById(ParamsInfoEO paramsInfoEO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
@@ -96,4 +96,9 @@ public interface IParamsInfoEOService extends IService<ParamsInfoEO> {
|
|||||||
String unzipfilepath,
|
String unzipfilepath,
|
||||||
String paramsTemplateId,
|
String paramsTemplateId,
|
||||||
String cut);
|
String cut);
|
||||||
|
|
||||||
|
|
||||||
|
int deleteByParamsTemplateIds(String paramsTemplateIds);
|
||||||
|
|
||||||
|
List<ParamsInfoEO> selectListByParamsTemplateIds(String paramsTemplateIds);
|
||||||
}
|
}
|
||||||
|
|||||||
+64
@@ -0,0 +1,64 @@
|
|||||||
|
package com.jero.modules.cert.template.service;
|
||||||
|
|
||||||
|
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 参数项基本信息表发布版
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IParamsInfoPublishEOService extends IService<ParamsInfoPublishEO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param paramsInfoPublishEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(ParamsInfoPublishEO paramsInfoPublishEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param paramsInfoPublishEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(ParamsInfoPublishEO paramsInfoPublishEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ParamsInfoPublishEO queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ParamsInfoPublishEO> queryList();
|
||||||
|
|
||||||
|
int publishTemplate(String paramsTemplateId);
|
||||||
|
|
||||||
|
}
|
||||||
+2
@@ -53,6 +53,8 @@ public interface IParamsTemplateEOService extends IService<ParamsTemplateEO> {
|
|||||||
*/
|
*/
|
||||||
ParamsTemplateEO queryById(String id);
|
ParamsTemplateEO queryById(String id);
|
||||||
|
|
||||||
|
ParamsTemplateEO copyById(String id, String paramsTemplateName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
|
|||||||
+10
@@ -93,8 +93,18 @@ public class CertCategoryParamsInfoEOServiceImpl extends ServiceImpl<CertCategor
|
|||||||
return baseMapper.selectListByNioNumber(nioNumber);
|
return baseMapper.selectListByNioNumber(nioNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CertCategoryParamsInfoEO> selectListByParamsTemplateIds(String paramsTemplateIds) {
|
||||||
|
return baseMapper.selectListByParamsTemplateIds(paramsTemplateIds);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteByNioNumberList(List<String> nioNumberList) {
|
public int deleteByNioNumberList(List<String> nioNumberList) {
|
||||||
return baseMapper.deleteByNioNumberList(nioNumberList);
|
return baseMapper.deleteByNioNumberList(nioNumberList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteByParamsTemplateIds(String paramsTemplateIds) {
|
||||||
|
return baseMapper.deleteByParamsTemplateIds(paramsTemplateIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+90
@@ -0,0 +1,90 @@
|
|||||||
|
package com.jero.modules.cert.template.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO;
|
||||||
|
import com.jero.modules.cert.template.mapper.CertCategoryParamsInfoPublishEOMapper;
|
||||||
|
import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 认证类别参数信息表发布版
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CertCategoryParamsInfoPublishEOServiceImpl extends ServiceImpl<CertCategoryParamsInfoPublishEOMapper, CertCategoryParamsInfoPublishEO> implements ICertCategoryParamsInfoPublishEOService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param certCategoryParamsInfoPublishEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(CertCategoryParamsInfoPublishEO certCategoryParamsInfoPublishEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
certCategoryParamsInfoPublishEO.setCreateTime(now);
|
||||||
|
certCategoryParamsInfoPublishEO.setUpdateTime(now);
|
||||||
|
save(certCategoryParamsInfoPublishEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param certCategoryParamsInfoPublishEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(CertCategoryParamsInfoPublishEO certCategoryParamsInfoPublishEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
certCategoryParamsInfoPublishEO.setUpdateTime(now);
|
||||||
|
saveOrUpdate(certCategoryParamsInfoPublishEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CertCategoryParamsInfoPublishEO queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CertCategoryParamsInfoPublishEO> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
}
|
||||||
+125
-41
@@ -1,7 +1,7 @@
|
|||||||
package com.jero.modules.cert.template.service.impl;
|
package com.jero.modules.cert.template.service.impl;
|
||||||
|
|
||||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
|
||||||
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
|
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
@@ -36,8 +36,8 @@ import org.apache.commons.lang3.ObjectUtils;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
||||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -68,6 +68,7 @@ import static com.jero.modules.split.util.ExcelUtil.checkObjAllFieldsIsNull;
|
|||||||
@Service
|
@Service
|
||||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||||
public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, ParamsInfoEO> implements IParamsInfoEOService {
|
public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, ParamsInfoEO> implements IParamsInfoEOService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
|
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
|
||||||
|
|
||||||
@@ -81,6 +82,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
|
|
||||||
@Value(value = "${jero.path.upload}")
|
@Value(value = "${jero.path.upload}")
|
||||||
private String uploadpath;
|
private String uploadpath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -88,9 +90,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(ParamsInfoEO paramsInfoEO) {
|
public boolean add(ParamsInfoEO paramsInfoEO) {
|
||||||
String nioNumber = paramsInfoEO.getNioNumber();
|
String nioNumber = paramsInfoEO.getNioNumber();
|
||||||
String paramsInfoId = UUID.randomUUID().toString().replace("-", "");
|
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
|
||||||
// 校验nio编号 格式:字母数字横杠(-)
|
// 校验nio编号 格式:字母数字横杠(-)
|
||||||
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
||||||
if (!nioNumber.matches(nioNumberRegex)) {
|
if (!nioNumber.matches(nioNumberRegex)) {
|
||||||
@@ -108,7 +110,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
throw new JeroBootException("不同类别间参数编号必须唯一!");
|
throw new JeroBootException("不同类别间参数编号必须唯一!");
|
||||||
}
|
}
|
||||||
certCategoryParamsInfoEOList.forEach(certCategoryParamsInfoEO -> {
|
certCategoryParamsInfoEOList.forEach(certCategoryParamsInfoEO -> {
|
||||||
certCategoryParamsInfoEO.setParamsTemplateId(paramsInfoId);
|
certCategoryParamsInfoEO.setParamsTemplateId(paramsTemplateId);
|
||||||
certCategoryParamsInfoEO.setNioNumber(nioNumber);
|
certCategoryParamsInfoEO.setNioNumber(nioNumber);
|
||||||
});
|
});
|
||||||
certCategoryParamsInfoEOService.saveBatch(certCategoryParamsInfoEOList);
|
certCategoryParamsInfoEOService.saveBatch(certCategoryParamsInfoEOList);
|
||||||
@@ -130,11 +132,11 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
paramsInfoEO.setId(paramsInfoId);
|
paramsInfoEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
paramsInfoEO.setCreateTime(now);
|
paramsInfoEO.setCreateTime(now);
|
||||||
paramsInfoEO.setUpdateTime(now);
|
paramsInfoEO.setUpdateTime(now);
|
||||||
save(paramsInfoEO);
|
return save(paramsInfoEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -144,9 +146,10 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(ParamsInfoEO paramsInfoEO) {
|
public boolean editById(ParamsInfoEO paramsInfoEO) {
|
||||||
String nioNumber = paramsInfoEO.getNioNumber();
|
String nioNumber = paramsInfoEO.getNioNumber();
|
||||||
String paramsInfoId = paramsInfoEO.getId();
|
String paramsInfoId = paramsInfoEO.getId();
|
||||||
|
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
|
||||||
|
|
||||||
// 校验nio编号 格式:字母数字横杠(-)
|
// 校验nio编号 格式:字母数字横杠(-)
|
||||||
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
||||||
@@ -171,14 +174,14 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
}
|
}
|
||||||
|
|
||||||
certCategoryParamsInfoEOList.forEach(certCategoryParamsInfoEO -> {
|
certCategoryParamsInfoEOList.forEach(certCategoryParamsInfoEO -> {
|
||||||
certCategoryParamsInfoEO.setParamsTemplateId(paramsInfoId);
|
certCategoryParamsInfoEO.setParamsTemplateId(paramsTemplateId);
|
||||||
certCategoryParamsInfoEO.setNioNumber(nioNumber);
|
certCategoryParamsInfoEO.setNioNumber(nioNumber);
|
||||||
});
|
});
|
||||||
certCategoryParamsInfoEOService.saveBatch(certCategoryParamsInfoEOList);
|
certCategoryParamsInfoEOService.saveBatch(certCategoryParamsInfoEOList);
|
||||||
}
|
}
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
paramsInfoEO.setUpdateTime(now);
|
paramsInfoEO.setUpdateTime(now);
|
||||||
updateById(paramsInfoEO);
|
return updateById(paramsInfoEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -808,6 +811,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
importDto.setFileTemplateConnectId(connectId);
|
importDto.setFileTemplateConnectId(connectId);
|
||||||
ParamsInfoEO target = new ParamsInfoEO();
|
ParamsInfoEO target = new ParamsInfoEO();
|
||||||
BeanUtils.copyProperties(importDto, target);
|
BeanUtils.copyProperties(importDto, target);
|
||||||
|
target.setId(UUID.randomUUID().toString().replace("-",""));
|
||||||
target.setParamsTemplateId(paramsTemplateId);
|
target.setParamsTemplateId(paramsTemplateId);
|
||||||
paramsInfoEOS.add(target);
|
paramsInfoEOS.add(target);
|
||||||
}
|
}
|
||||||
@@ -877,7 +881,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
|
|
||||||
//存放数据验证结果信息
|
//存放数据验证结果信息
|
||||||
List<String> stringMessage = new ArrayList<>();
|
List<String> stringMessage = new ArrayList<>();
|
||||||
int i = 2; //记录行号
|
int i = 1; //记录行号
|
||||||
int num = 0; //记录是第几条数据
|
int num = 0; //记录是第几条数据
|
||||||
//循环验证数据
|
//循环验证数据
|
||||||
for (ParamsInfoCnImport dto : paramsInfoEOList) {
|
for (ParamsInfoCnImport dto : paramsInfoEOList) {
|
||||||
@@ -895,9 +899,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
errorMsg = i + " line:";
|
errorMsg = i + " line:";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
// nio编号
|
// nio编号
|
||||||
String nioNumber = dto.getNioNumber();
|
String nioNumber = dto.getNioNumber();
|
||||||
validateMustAndLength(nioNumber, "nio编号", IsMustEnum.YES.getValue(),"15", errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(nioNumber, "nio编号", IsMustEnum.YES.getValue(),"15", false, cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
if (StringUtils.isNotEmpty(dto.getNioNumber())) {
|
if (StringUtils.isNotEmpty(dto.getNioNumber())) {
|
||||||
// 校验nio编号 格式:字母数字横杠(-)
|
// 校验nio编号 格式:字母数字横杠(-)
|
||||||
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
||||||
@@ -909,56 +916,97 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
|
|
||||||
// 是否必填
|
// 是否必填
|
||||||
String isMust = dto.getIsMust();
|
String isMust = dto.getIsMust();
|
||||||
validateMustAndLength(isMust, "是否必填", IsMustEnum.YES.getValue(), "50",errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(isMust, "是否必填", IsMustEnum.YES.getValue(), "50", false, cut);
|
||||||
getCodeByName(isMust,"是否必填","enum",paramsIsMustEnumMap,null,null,errorMsg,countError,cut);
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
resultMap = getCodeByName(isMust,"是否必填","enum",paramsIsMustEnumMap,null,null,cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
isMust = (String)resultMap.get("value");
|
||||||
dto.setIsMust(isMust);
|
dto.setIsMust(isMust);
|
||||||
|
|
||||||
// 参数名称
|
// 参数名称
|
||||||
String paramsName = dto.getParamsName();
|
String paramsName = dto.getParamsName();
|
||||||
validateMustAndLength(paramsName, "参数名称", IsMustEnum.YES.getValue(), "30",errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(paramsName, "参数名称", IsMustEnum.YES.getValue(), "30", false, cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
|
||||||
// 技术领域
|
// 技术领域
|
||||||
String technologyTerritory = dto.getTechnologyTerritory();
|
String technologyTerritory = dto.getTechnologyTerritory();
|
||||||
validateMustAndLength(technologyTerritory, "技术领域", IsMustEnum.YES.getValue(), "1000",errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(technologyTerritory, "技术领域", IsMustEnum.YES.getValue(), "1000", false, cut);
|
||||||
getCodeByName(technologyTerritory,"技术领域","treeDicCode",null,treeNameList,categoryList,errorMsg,countError,cut);
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
resultMap = getCodeByName(technologyTerritory,"技术领域","treeDicCode",null,treeNameList,categoryList,cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
technologyTerritory = (String)resultMap.get("value");
|
||||||
dto.setTechnologyTerritory(technologyTerritory);
|
dto.setTechnologyTerritory(technologyTerritory);
|
||||||
|
|
||||||
// 参数批次
|
// 参数批次
|
||||||
String paramsBatch = dto.getParamsBatch();
|
String paramsBatch = dto.getParamsBatch();
|
||||||
validateMustAndLength(paramsBatch, "参数批次", IsMustEnum.YES.getValue(), "50",errorMsg, countError, true, cut);
|
resultMap = validateMustAndLength(paramsBatch, "参数批次", IsMustEnum.YES.getValue(), "50", true, cut);
|
||||||
getCodeByName(paramsBatch,"参数批次","dicCode",null,itemNameList,dictItemList,errorMsg,countError,cut);
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
resultMap = getCodeByName(paramsBatch,"参数批次","dicCode",null,itemNameList,dictItemList,cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
paramsBatch = (String)resultMap.get("value");
|
||||||
dto.setParamsBatch(paramsBatch);
|
dto.setParamsBatch(paramsBatch);
|
||||||
|
|
||||||
// 责任领域
|
// 责任领域
|
||||||
String dutyTerritory = dto.getDutyTerritory();
|
String dutyTerritory = dto.getDutyTerritory();
|
||||||
validateMustAndLength(dutyTerritory, "责任领域", IsMustEnum.YES.getValue(), "50",errorMsg, countError, true, cut);
|
resultMap = validateMustAndLength(dutyTerritory, "责任领域", IsMustEnum.YES.getValue(), "50",true, cut);
|
||||||
getCodeByName(dutyTerritory,"责任领域","dicCode",null,itemNameList,dictItemList,errorMsg,countError,cut);
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
resultMap = getCodeByName(dutyTerritory,"责任领域","dicCode",null,itemNameList,dictItemList,cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
dutyTerritory = (String)resultMap.get("value");
|
||||||
dto.setDutyTerritory(dutyTerritory);
|
dto.setDutyTerritory(dutyTerritory);
|
||||||
|
|
||||||
// 参数说明
|
// 参数说明
|
||||||
String description = dto.getDescription();
|
String description = dto.getDescription();
|
||||||
validateMustAndLength(description,"参数说明",IsMustEnum.YES.getValue(),"200",errorMsg,countError,false,cut);
|
resultMap = validateMustAndLength(description,"参数说明",IsMustEnum.NO.getValue(),"200",false,cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
|
||||||
// 认证类别
|
// 认证类别
|
||||||
String certCategory = dto.getCertCategory();
|
String certCategory = dto.getCertCategory();
|
||||||
validateMustAndLength(certCategory, "认证类别", IsMustEnum.YES.getValue(), "1000",errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(certCategory, "认证类别", IsMustEnum.YES.getValue(), "1000", false, cut);
|
||||||
getCodeByName(certCategory,"认证类别","dicCode",null,itemNameList,dictItemList,errorMsg,countError,cut);
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
resultMap = getCodeByName(certCategory,"认证类别","dicCode",null,itemNameList,dictItemList,cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
certCategory = (String)resultMap.get("value");
|
||||||
dto.setCertCategory(certCategory);
|
dto.setCertCategory(certCategory);
|
||||||
|
|
||||||
// 控件类型
|
// 控件类型
|
||||||
String controlType = dto.getControlType();
|
String controlType = dto.getControlType();
|
||||||
validateMustAndLength(controlType, "控件类型", IsMustEnum.YES.getValue(), "50",errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(controlType, "控件类型", IsMustEnum.YES.getValue(), "50", false, cut);
|
||||||
getCodeByName(controlType,"控件类型","enum",controlTypeEnumMap,null,null,errorMsg,countError,cut);
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
resultMap = getCodeByName(controlType,"控件类型","enum",controlTypeEnumMap,null,null,cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
controlType = (String)resultMap.get("value");
|
||||||
dto.setControlType(controlType);
|
dto.setControlType(controlType);
|
||||||
|
|
||||||
// 控件备选值
|
// 控件备选值
|
||||||
String controlValues = dto.getControlValues();
|
String controlValues = dto.getControlValues();
|
||||||
validateMustAndLength(controlValues, "控件备选值", IsMustEnum.YES.getValue(), "500",errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(controlValues, "控件备选值", IsMustEnum.NO.getValue(), "500",false, cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
|
||||||
// 控件校验
|
// 控件校验
|
||||||
String controlVerify = dto.getControlVerify();
|
String controlVerify = dto.getControlVerify();
|
||||||
validateMustAndLength(controlVerify, "控件校验", IsMustEnum.YES.getValue(), "50",errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(controlVerify, "控件校验", IsMustEnum.NO.getValue(), "50", false, cut);
|
||||||
getCodeByName(controlVerify,"控件校验","enum",controlVerifyEnumMap,null,null,errorMsg,countError,cut);
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
resultMap = getCodeByName(controlVerify,"控件校验","enum",controlVerifyEnumMap,null,null,cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
controlVerify = (String)resultMap.get("value");
|
||||||
dto.setControlVerify(controlVerify);
|
dto.setControlVerify(controlVerify);
|
||||||
|
|
||||||
// 附件模板
|
// 附件模板
|
||||||
@@ -1004,24 +1052,28 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
for (Map.Entry<String, List<CertCategoryParamsInfoCnImport>> ccDtoMap : certCategoryParamsInfoEOListMap.entrySet()) {
|
for (Map.Entry<String, List<CertCategoryParamsInfoCnImport>> ccDtoMap : certCategoryParamsInfoEOListMap.entrySet()) {
|
||||||
String certCategory = ccDtoMap.getKey();
|
String certCategory = ccDtoMap.getKey();
|
||||||
List<CertCategoryParamsInfoCnImport> ccDtoList = ccDtoMap.getValue();
|
List<CertCategoryParamsInfoCnImport> ccDtoList = ccDtoMap.getValue();
|
||||||
|
int j = 1;
|
||||||
for (CertCategoryParamsInfoCnImport ccDto : ccDtoList) {
|
for (CertCategoryParamsInfoCnImport ccDto : ccDtoList) {
|
||||||
//判断此行数据是否全部为空,是则不读取
|
//判断此行数据是否全部为空,是则不读取
|
||||||
if (checkObjAllFieldsIsNull(ccDto)) {
|
if (checkObjAllFieldsIsNull(ccDto)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
j++;
|
||||||
int countError = 0; //记录失败数据数量
|
int countError = 0; //记录失败数据数量
|
||||||
String errorMsg = "";
|
String errorMsg = "";
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
errorMsg = certCategory + " 第" + i + "行:";
|
errorMsg = certCategory + " 第" + j + "行:";
|
||||||
} else {
|
} else {
|
||||||
errorMsg = i + " line:";
|
errorMsg = j + " line:";
|
||||||
}
|
}
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
||||||
// nio编号
|
// nio编号
|
||||||
String nioNumber = ccDto.getNioNumber();
|
String nioNumber = ccDto.getNioNumber();
|
||||||
validateMustAndLength(nioNumber, "nio编号", IsMustEnum.YES.getValue(),"15", errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(nioNumber, "nio编号", IsMustEnum.YES.getValue(),"15", false, cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
if (StringUtils.isNotEmpty(ccDto.getNioNumber())) {
|
if (StringUtils.isNotEmpty(ccDto.getNioNumber())) {
|
||||||
// 校验nio编号 格式:字母数字横杠(-)
|
// 校验nio编号 格式:字母数字横杠(-)
|
||||||
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
||||||
@@ -1032,13 +1084,19 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
}
|
}
|
||||||
// 编号
|
// 编号
|
||||||
String paramsNumber = ccDto.getParamsNumber();
|
String paramsNumber = ccDto.getParamsNumber();
|
||||||
validateMustAndLength(paramsNumber, "编号", IsMustEnum.YES.getValue(),"15", errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(paramsNumber, "编号", IsMustEnum.YES.getValue(),"15", false, cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
// 参数名称
|
// 参数名称
|
||||||
String paramsName = ccDto.getParamsName();
|
String paramsName = ccDto.getParamsName();
|
||||||
validateMustAndLength(paramsName, "参数名称", IsMustEnum.YES.getValue(),"30", errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(paramsName, "参数名称", IsMustEnum.YES.getValue(),"30", false, cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
// 参数说明
|
// 参数说明
|
||||||
String description = ccDto.getDescription();
|
String description = ccDto.getDescription();
|
||||||
validateMustAndLength(description, "参数说明", IsMustEnum.YES.getValue(),"200", errorMsg, countError, false, cut);
|
resultMap = validateMustAndLength(description, "参数说明", IsMustEnum.NO.getValue(),"200", false, cut);
|
||||||
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
|
countError += (int)resultMap.get("countError");
|
||||||
|
|
||||||
if (countError > 0) {
|
if (countError > 0) {
|
||||||
stringMessage.add(errorMsg);
|
stringMessage.add(errorMsg);
|
||||||
@@ -1072,8 +1130,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateMustAndLength (String fieldData, String fieldName, String mustInput, String dbLength, String errorMsg, int countError, Boolean isSingle, String cut) {
|
private Map<String, Object> validateMustAndLength (String value, String fieldName, String mustInput, String dbLength, Boolean isSingle, String cut) {
|
||||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isEmpty(fieldData)) {
|
String errorMsg = "";
|
||||||
|
int countError= 0;
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
||||||
|
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isEmpty(value)) {
|
||||||
if(CutEnum.CN.getValue().equals(cut)) {
|
if(CutEnum.CN.getValue().equals(cut)) {
|
||||||
errorMsg += fieldName + "为必填项,不能为空;";
|
errorMsg += fieldName + "为必填项,不能为空;";
|
||||||
} else {
|
} else {
|
||||||
@@ -1082,7 +1144,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
countError++;
|
countError++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(fieldData) && fieldData.length() > Long.parseLong(dbLength)) {
|
if (StringUtils.isNotBlank(value) && value.length() > Long.parseLong(dbLength)) {
|
||||||
if(CutEnum.CN.getValue().equals(cut)) {
|
if(CutEnum.CN.getValue().equals(cut)) {
|
||||||
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
errorMsg += fieldName + "不能超过" + dbLength + "个字符;";
|
||||||
} else {
|
} else {
|
||||||
@@ -1093,7 +1155,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
|
|
||||||
if (isSingle) {
|
if (isSingle) {
|
||||||
//判断是否是单选
|
//判断是否是单选
|
||||||
if (StringUtils.isNotBlank(fieldData) && fieldData.contains(",")) {
|
if (StringUtils.isNotBlank(value) && value.contains(",")) {
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
errorMsg += fieldName + "为单选项;";
|
errorMsg += fieldName + "为单选项;";
|
||||||
} else {
|
} else {
|
||||||
@@ -1103,9 +1165,16 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultMap.put("errorMsg", errorMsg);
|
||||||
|
resultMap.put("countError", countError);
|
||||||
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getCodeByName(String value, String fieldName, String type, Map enumMap, List judgeData, List coverData,String errorMsg, int countError,String cut) {
|
private Map<String, Object> getCodeByName(String value, String fieldName, String type, Map enumMap, List judgeData, List coverData,String cut) {
|
||||||
|
String errorMsg = "";
|
||||||
|
int countError= 0;
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
||||||
if ("treeDicCode".equals(type)) {
|
if ("treeDicCode".equals(type)) {
|
||||||
// 树形字典类型
|
// 树形字典类型
|
||||||
List<String> treeNameList = judgeData;
|
List<String> treeNameList = judgeData;
|
||||||
@@ -1220,6 +1289,10 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultMap.put("value", value);
|
||||||
|
resultMap.put("errorMsg", errorMsg);
|
||||||
|
resultMap.put("countError", countError);
|
||||||
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1237,4 +1310,15 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteByParamsTemplateIds(String paramsTemplateIds) {
|
||||||
|
return baseMapper.deleteByParamsTemplateIds(paramsTemplateIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ParamsInfoEO> selectListByParamsTemplateIds(String paramsTemplateIds) {
|
||||||
|
return baseMapper.selectListByParamsTemplateIds(paramsTemplateIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+155
@@ -0,0 +1,155 @@
|
|||||||
|
package com.jero.modules.cert.template.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.modules.cert.template.entity.*;
|
||||||
|
import com.jero.modules.cert.template.mapper.ParamsInfoPublishEOMapper;
|
||||||
|
import com.jero.modules.cert.template.service.*;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 参数项基本信息表发布版
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ParamsInfoPublishEOServiceImpl extends ServiceImpl<ParamsInfoPublishEOMapper, ParamsInfoPublishEO> implements IParamsInfoPublishEOService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IParamsTemplateEOService paramsTemplateEOService;
|
||||||
|
@Autowired
|
||||||
|
private IParamsInfoEOService paramsInfoEOService;
|
||||||
|
@Autowired
|
||||||
|
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
|
||||||
|
@Autowired
|
||||||
|
private ICertCategoryParamsInfoPublishEOService certCategoryParamsInfoPublishEOService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param paramsInfoPublishEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(ParamsInfoPublishEO paramsInfoPublishEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
paramsInfoPublishEO.setCreateTime(now);
|
||||||
|
paramsInfoPublishEO.setUpdateTime(now);
|
||||||
|
save(paramsInfoPublishEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param paramsInfoPublishEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(ParamsInfoPublishEO paramsInfoPublishEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
paramsInfoPublishEO.setUpdateTime(now);
|
||||||
|
saveOrUpdate(paramsInfoPublishEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ParamsInfoPublishEO queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ParamsInfoPublishEO> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int publishTemplate(String paramsTemplateId) {
|
||||||
|
ParamsTemplateEO source = paramsTemplateEOService.queryById(paramsTemplateId);
|
||||||
|
List<ParamsInfoEO> sourceParamsInfoEOList = paramsInfoEOService.selectListByParamsTemplateIds(paramsTemplateId);
|
||||||
|
List<CertCategoryParamsInfoEO> sourceCertCategoryParamsInfoEOList = certCategoryParamsInfoEOService.selectListByParamsTemplateIds(paramsTemplateId);
|
||||||
|
|
||||||
|
List<ParamsInfoPublishEO> targetParamsInfoPublishEOList = new ArrayList<>();
|
||||||
|
List<CertCategoryParamsInfoPublishEO> targetCertCategoryParamsInfoPublishEOList = new ArrayList<>();
|
||||||
|
|
||||||
|
int newVersion = source.getVersion() + 1;
|
||||||
|
ParamsTemplateEO updateSource = new ParamsTemplateEO();
|
||||||
|
updateSource.setId(paramsTemplateId);
|
||||||
|
updateSource.setVersion(newVersion);
|
||||||
|
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
||||||
|
for (ParamsInfoEO sourceParamsInfoEO : sourceParamsInfoEOList) {
|
||||||
|
ParamsInfoPublishEO targetParamsInfoEO = new ParamsInfoPublishEO();
|
||||||
|
BeanUtils.copyProperties(sourceParamsInfoEO, targetParamsInfoEO);
|
||||||
|
targetParamsInfoEO.setParamsTemplateId(paramsTemplateId);
|
||||||
|
targetParamsInfoEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||||
|
targetParamsInfoEO.setVersion(newVersion); // 设置发布版本
|
||||||
|
targetParamsInfoEO.setCreateTime(new Date());
|
||||||
|
targetParamsInfoEO.setCreateBy(sysUser.getUsername());
|
||||||
|
targetParamsInfoEO.setUpdateTime(new Date());
|
||||||
|
targetParamsInfoEO.setUpdateBy(sysUser.getUsername());
|
||||||
|
targetParamsInfoPublishEOList.add(targetParamsInfoEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (CertCategoryParamsInfoEO sourceCertCategoryParamsInfoEO : sourceCertCategoryParamsInfoEOList) {
|
||||||
|
CertCategoryParamsInfoPublishEO targetCertCategoryParamsInfoEO = new CertCategoryParamsInfoPublishEO();
|
||||||
|
BeanUtils.copyProperties(sourceCertCategoryParamsInfoEO, targetCertCategoryParamsInfoEO);
|
||||||
|
targetCertCategoryParamsInfoEO.setParamsTemplateId(paramsTemplateId);
|
||||||
|
targetCertCategoryParamsInfoEO.setVersion(newVersion); // 设置发布版本
|
||||||
|
targetCertCategoryParamsInfoEO.setId(null);
|
||||||
|
targetCertCategoryParamsInfoEO.setCreateTime(new Date());
|
||||||
|
targetCertCategoryParamsInfoEO.setCreateBy(sysUser.getUsername());
|
||||||
|
targetCertCategoryParamsInfoEO.setUpdateTime(new Date());
|
||||||
|
targetCertCategoryParamsInfoEO.setUpdateBy(sysUser.getUsername());
|
||||||
|
targetCertCategoryParamsInfoPublishEOList.add(targetCertCategoryParamsInfoEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.saveBatch(targetParamsInfoPublishEOList);
|
||||||
|
certCategoryParamsInfoPublishEOService.saveBatch(targetCertCategoryParamsInfoPublishEOList);
|
||||||
|
paramsTemplateEOService.updateById(updateSource);
|
||||||
|
|
||||||
|
return newVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
+84
-3
@@ -1,13 +1,24 @@
|
|||||||
package com.jero.modules.cert.template.service.impl;
|
package com.jero.modules.cert.template.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO;
|
||||||
|
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||||
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
import com.jero.modules.cert.template.entity.ParamsTemplateEO;
|
||||||
import com.jero.modules.cert.template.mapper.ParamsTemplateEOMapper;
|
import com.jero.modules.cert.template.mapper.ParamsTemplateEOMapper;
|
||||||
|
import com.jero.modules.cert.template.service.ICertCategoryParamsInfoEOService;
|
||||||
|
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
||||||
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
|
import com.jero.modules.cert.template.service.IParamsTemplateEOService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 参数模板表
|
* @Description: 参数模板表
|
||||||
@@ -18,6 +29,12 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class ParamsTemplateEOServiceImpl extends ServiceImpl<ParamsTemplateEOMapper, ParamsTemplateEO> implements IParamsTemplateEOService {
|
public class ParamsTemplateEOServiceImpl extends ServiceImpl<ParamsTemplateEOMapper, ParamsTemplateEO> implements IParamsTemplateEOService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IParamsInfoEOService paramsInfoEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -26,6 +43,7 @@ public class ParamsTemplateEOServiceImpl extends ServiceImpl<ParamsTemplateEOMap
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(ParamsTemplateEO paramsTemplateEO) {
|
public void add(ParamsTemplateEO paramsTemplateEO) {
|
||||||
|
paramsTemplateEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
// 设置默认版本0
|
// 设置默认版本0
|
||||||
paramsTemplateEO.setVersion(0);
|
paramsTemplateEO.setVersion(0);
|
||||||
@@ -56,7 +74,9 @@ public class ParamsTemplateEOServiceImpl extends ServiceImpl<ParamsTemplateEOMap
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteById(String id) {
|
public void deleteById(String id) {
|
||||||
// TODO 关联删除参数项
|
// 关联删除参数项
|
||||||
|
certCategoryParamsInfoEOService.deleteByParamsTemplateIds(id);
|
||||||
|
paramsInfoEOService.deleteByParamsTemplateIds(id);
|
||||||
removeById(id);
|
removeById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +88,9 @@ public class ParamsTemplateEOServiceImpl extends ServiceImpl<ParamsTemplateEOMap
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteByIds(List<String> ids) {
|
public void deleteByIds(List<String> ids) {
|
||||||
// TODO 关联删除参数项
|
// 关联删除参数项
|
||||||
|
certCategoryParamsInfoEOService.deleteByParamsTemplateIds(StringUtils.join(ids, ","));
|
||||||
|
paramsInfoEOService.deleteByParamsTemplateIds(StringUtils.join(ids, ","));
|
||||||
removeByIds(ids);
|
removeByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +105,66 @@ public class ParamsTemplateEOServiceImpl extends ServiceImpl<ParamsTemplateEOMap
|
|||||||
return getById(id);
|
return getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 复制模板
|
||||||
|
* @param id
|
||||||
|
* @param paramsTemplateName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ParamsTemplateEO copyById(String id, String paramsTemplateName) {
|
||||||
|
ParamsTemplateEO source = getById(id);
|
||||||
|
List<ParamsInfoEO> sourceParamsInfoEOList = paramsInfoEOService.selectListByParamsTemplateIds(id);
|
||||||
|
List<CertCategoryParamsInfoEO> sourceCertCategoryParamsInfoEOList = certCategoryParamsInfoEOService.selectListByParamsTemplateIds(id);
|
||||||
|
|
||||||
|
ParamsTemplateEO target = new ParamsTemplateEO();
|
||||||
|
List<ParamsInfoEO> targetParamsInfoEOList = new ArrayList<>();
|
||||||
|
List<CertCategoryParamsInfoEO> targetCertCategoryParamsInfoEOList = new ArrayList<>();
|
||||||
|
|
||||||
|
BeanUtils.copyProperties(source, target);
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String paramsTemplateId = UUID.randomUUID().toString().replace("-","");
|
||||||
|
|
||||||
|
target.setId(paramsTemplateId);
|
||||||
|
target.setParamsTemplateName(paramsTemplateName);
|
||||||
|
target.setVersion(0);
|
||||||
|
target.setCreateTime(new Date());
|
||||||
|
target.setCreateBy(sysUser.getUsername());
|
||||||
|
target.setUpdateTime(new Date());
|
||||||
|
target.setUpdateBy(sysUser.getUsername());
|
||||||
|
|
||||||
|
for (ParamsInfoEO sourceParamsInfoEO : sourceParamsInfoEOList) {
|
||||||
|
ParamsInfoEO targetParamsInfoEO = new ParamsInfoEO();
|
||||||
|
BeanUtils.copyProperties(sourceParamsInfoEO, targetParamsInfoEO);
|
||||||
|
targetParamsInfoEO.setParamsTemplateId(paramsTemplateId);
|
||||||
|
targetParamsInfoEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||||
|
targetParamsInfoEO.setCreateTime(new Date());
|
||||||
|
targetParamsInfoEO.setCreateBy(sysUser.getUsername());
|
||||||
|
targetParamsInfoEO.setUpdateTime(new Date());
|
||||||
|
targetParamsInfoEO.setUpdateBy(sysUser.getUsername());
|
||||||
|
targetParamsInfoEOList.add(targetParamsInfoEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (CertCategoryParamsInfoEO sourceCertCategoryParamsInfoEO : sourceCertCategoryParamsInfoEOList) {
|
||||||
|
CertCategoryParamsInfoEO targetCertCategoryParamsInfoEO = new CertCategoryParamsInfoEO();
|
||||||
|
BeanUtils.copyProperties(sourceCertCategoryParamsInfoEO, targetCertCategoryParamsInfoEO);
|
||||||
|
targetCertCategoryParamsInfoEO.setParamsTemplateId(paramsTemplateId);
|
||||||
|
targetCertCategoryParamsInfoEO.setId(null);
|
||||||
|
targetCertCategoryParamsInfoEO.setCreateTime(new Date());
|
||||||
|
targetCertCategoryParamsInfoEO.setCreateBy(sysUser.getUsername());
|
||||||
|
targetCertCategoryParamsInfoEO.setUpdateTime(new Date());
|
||||||
|
targetCertCategoryParamsInfoEO.setUpdateBy(sysUser.getUsername());
|
||||||
|
targetCertCategoryParamsInfoEOList.add(targetCertCategoryParamsInfoEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
paramsInfoEOService.saveBatch(targetParamsInfoEOList);
|
||||||
|
certCategoryParamsInfoEOService.saveBatch(targetCertCategoryParamsInfoEOList);
|
||||||
|
save(target);
|
||||||
|
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
+4
-4
@@ -42,22 +42,22 @@ public class CertCategoryParamsInfoCnImport {
|
|||||||
private String sysOrgCode;
|
private String sysOrgCode;
|
||||||
|
|
||||||
/**编号*/
|
/**编号*/
|
||||||
@Excel(name = "*number", width = 15, orderNum = "2")
|
@Excel(name = "*编号", width = 15, orderNum = "2")
|
||||||
@ApiModelProperty(value = "编号")
|
@ApiModelProperty(value = "编号")
|
||||||
private String paramsNumber;
|
private String paramsNumber;
|
||||||
|
|
||||||
/**参数名称*/
|
/**参数名称*/
|
||||||
@Excel(name = "*params name", width = 15, orderNum = "3")
|
@Excel(name = "*参数名称", width = 15, orderNum = "3")
|
||||||
@ApiModelProperty(value = "参数名称")
|
@ApiModelProperty(value = "参数名称")
|
||||||
private String paramsName;
|
private String paramsName;
|
||||||
|
|
||||||
/**参数说明*/
|
/**参数说明*/
|
||||||
@Excel(name = "description", width = 36, orderNum = "4")
|
@Excel(name = "参数说明", width = 36, orderNum = "4")
|
||||||
@ApiModelProperty(value = "参数说明")
|
@ApiModelProperty(value = "参数说明")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**nio编号*/
|
/**nio编号*/
|
||||||
@Excel(name = "*nio number", width = 15, orderNum = "1")
|
@Excel(name = "*nio编号", width = 15, orderNum = "1")
|
||||||
@ApiModelProperty(value = "nio编号")
|
@ApiModelProperty(value = "nio编号")
|
||||||
private String nioNumber;
|
private String nioNumber;
|
||||||
|
|
||||||
|
|||||||
+1
@@ -13,4 +13,5 @@ public class ParamsInfoVO {
|
|||||||
private String paramsName; // 参数名称
|
private String paramsName; // 参数名称
|
||||||
private String dutyTerritory; // 责任领域
|
private String dutyTerritory; // 责任领域
|
||||||
private String ids; // 勾选的参数项id
|
private String ids; // 勾选的参数项id
|
||||||
|
private String paramsTemplateId; // 参数模板id
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -4267,6 +4267,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
|
|
||||||
|
|
||||||
} else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(fieldShowType)) {
|
} else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(fieldShowType)) {
|
||||||
|
value = value.replaceAll("/","-");
|
||||||
//单选日期
|
//单选日期
|
||||||
//判断是否必填
|
//判断是否必填
|
||||||
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
if (IsMustEnum.YES.getValue().equals(mustInput) && StringUtils.isBlank(value)) {
|
||||||
|
|||||||
+17
-12
@@ -484,10 +484,14 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//对应标准 iBussDocumentLibraryEOService
|
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = new ArrayList<>();
|
||||||
LambdaQueryWrapper<BussDocumentLibraryEO> wrapperTemp = new LambdaQueryWrapper<>();
|
if(correspondingStandardSet.size() != 0){
|
||||||
wrapperTemp.in(BussDocumentLibraryEO::getId,correspondingStandardSet);
|
//对应标准 iBussDocumentLibraryEOService
|
||||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = iBussDocumentLibraryEOService.list(wrapperTemp);
|
LambdaQueryWrapper<BussDocumentLibraryEO> wrapperTemp = new LambdaQueryWrapper<>();
|
||||||
|
wrapperTemp.in(BussDocumentLibraryEO::getId,correspondingStandardSet);
|
||||||
|
bussDocumentLibraryEOList = iBussDocumentLibraryEOService.list(wrapperTemp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -801,7 +805,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
List<SysCategory> categoryList = sysCategoryService.list();
|
List<SysCategory> categoryList = sysCategoryService.list();
|
||||||
//普通数据字典
|
//普通数据字典
|
||||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||||
importDatas(datas, categoryList, dictItemList, zipEntryName,saveDirectory,dummyInventoryInfoEO.getCut());
|
importDatas(datas, categoryList, dictItemList, zipEntryName,saveDirectory,dummyInventoryInfoEO);
|
||||||
//删除原上传文件
|
//删除原上传文件
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
|
|
||||||
@@ -813,17 +817,17 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
List<SysDictItem> dictItemList,
|
List<SysDictItem> dictItemList,
|
||||||
String zipEntryName,
|
String zipEntryName,
|
||||||
File saveDirectory,
|
File saveDirectory,
|
||||||
String cut) {
|
DummyInventoryInfoEO dummyInventoryInfoEOTemp) {
|
||||||
int i = 3;
|
int i = 3;
|
||||||
List<String> msgList = new ArrayList<>();
|
List<String> msgList = new ArrayList<>();
|
||||||
String value = "";
|
String value = "";
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
//编号验证
|
//编号验证
|
||||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = verifySerialNumber(dataList);
|
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = verifySerialNumber(dataList,dummyInventoryInfoEOTemp);
|
||||||
for (DummyInventoryInfoEO dummyInventoryInfoEO : dataList) {
|
for (DummyInventoryInfoEO dummyInventoryInfoEO : dataList) {
|
||||||
i++;
|
i++;
|
||||||
String errorMsg = "";
|
String errorMsg = "";
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEOTemp.getCut())){
|
||||||
errorMsg = "第" + i + "行:";
|
errorMsg = "第" + i + "行:";
|
||||||
}else{
|
}else{
|
||||||
errorMsg = i + " line:";
|
errorMsg = i + " line:";
|
||||||
@@ -998,7 +1002,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<BussDocumentLibraryEO> verifySerialNumber(List<DummyInventoryInfoEO> dataList) {
|
private List<BussDocumentLibraryEO> verifySerialNumber(List<DummyInventoryInfoEO> dataList,DummyInventoryInfoEO dummyInventoryInfoEOTemp) {
|
||||||
//文档库数据
|
//文档库数据
|
||||||
List<String> serialNumberList = dataList.stream().map(DummyInventoryInfoEO::getSerialNumber).collect(Collectors.toList());
|
List<String> serialNumberList = dataList.stream().map(DummyInventoryInfoEO::getSerialNumber).collect(Collectors.toList());
|
||||||
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
@@ -1009,8 +1013,9 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
|
|
||||||
//虚拟清单数据
|
//虚拟清单数据
|
||||||
LambdaQueryWrapper<DummyInventoryInfoEO> wrapperTemp = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<DummyInventoryInfoEO> wrapperTemp = new LambdaQueryWrapper<>();
|
||||||
wrapperTemp.in(DummyInventoryInfoEO::getSerialNumber,serialNumberList);
|
wrapperTemp.in(DummyInventoryInfoEO::getSerialNumber,serialNumberList).in(DummyInventoryInfoEO::getDummyInventoryBaseId,dummyInventoryInfoEOTemp.getDummyInventoryBaseId());
|
||||||
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = this.list(wrapperTemp);
|
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = this.list(wrapperTemp);
|
||||||
|
List<String> serialNumberTempList = dummyInventoryInfoEOList.stream().map(DummyInventoryInfoEO::getSerialNumber).collect(Collectors.toList());
|
||||||
if(serialNumberList.size() != serialNumberListTemp.size()){
|
if(serialNumberList.size() != serialNumberListTemp.size()){
|
||||||
//存在文档库没有的数据
|
//存在文档库没有的数据
|
||||||
List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||||
@@ -1023,9 +1028,9 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
}
|
}
|
||||||
if(dummyInventoryInfoEOList.size() > 0){
|
if(dummyInventoryInfoEOList.size() > 0){
|
||||||
if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){
|
if(CutEnum.CN.getValue().equals(dataList.get(0).getCut())){
|
||||||
throw new JeroBootException(StringUtils.join(serialNumberList,",")+"已存在,不能重复添加");
|
throw new JeroBootException(StringUtils.join(serialNumberTempList,",")+"已存在,不能重复添加");
|
||||||
}else{
|
}else{
|
||||||
throw new JeroBootException(StringUtils.join(serialNumberList,",")+" already exists and cannot be added again");
|
throw new JeroBootException(StringUtils.join(serialNumberTempList,",")+" already exists and cannot be added again");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//通过编号将导入的数据与文档库进行关联
|
//通过编号将导入的数据与文档库进行关联
|
||||||
|
|||||||
+171
@@ -0,0 +1,171 @@
|
|||||||
|
package com.jero.modules.project.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.project.entity.ProjectCommentEO;
|
||||||
|
import com.jero.modules.project.service.IProjectCommentEOService;
|
||||||
|
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.modules.project.vo.ProjectCommentVO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单评论表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="法规清单评论表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project/projectCommentEO")
|
||||||
|
@Slf4j
|
||||||
|
public class ProjectCommentEOController extends JeroController<ProjectCommentEO, IProjectCommentEOService> {
|
||||||
|
@Autowired
|
||||||
|
private IProjectCommentEOService projectCommentEOService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param projectCommentEO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单评论表-分页列表查询")
|
||||||
|
@ApiOperation(value="法规清单评论表-分页列表查询", notes="法规清单评论表-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(ProjectCommentEO projectCommentEO,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ProjectCommentEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCommentEO, req.getParameterMap());
|
||||||
|
Page<ProjectCommentEO> page = new Page<ProjectCommentEO>(pageNo, pageSize);
|
||||||
|
IPage<ProjectCommentEO> pageList = projectCommentEOService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单评论表-列表查询")
|
||||||
|
@ApiOperation(value="法规清单评论表-列表查询", notes="法规清单评论表-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<ProjectCommentVO>> queryList(ProjectCommentEO projectCommentEO) {
|
||||||
|
List<ProjectCommentVO> list = projectCommentEOService.getInfoList(projectCommentEO);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param projectCommentEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单评论表-添加")
|
||||||
|
@ApiOperation(value="法规清单评论表-添加", notes="法规清单评论表-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody ProjectCommentEO projectCommentEO) {
|
||||||
|
projectCommentEOService.add(projectCommentEO);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param projectCommentEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单评论表-编辑")
|
||||||
|
@ApiOperation(value="法规清单评论表-编辑", notes="法规清单评论表-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody ProjectCommentEO projectCommentEO) {
|
||||||
|
projectCommentEOService.editById(projectCommentEO);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单评论表-通过id删除")
|
||||||
|
@ApiOperation(value="法规清单评论表-通过id删除", notes="法规清单评论表-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
projectCommentEOService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单评论表-批量删除")
|
||||||
|
@ApiOperation(value="法规清单评论表-批量删除", notes="法规清单评论表-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.projectCommentEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单评论表-通过id查询")
|
||||||
|
@ApiOperation(value="法规清单评论表-通过id查询", notes="法规清单评论表-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ProjectCommentEO projectCommentEO = projectCommentEOService.queryById(id);
|
||||||
|
if(projectCommentEO==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(projectCommentEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param projectCommentEO
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ProjectCommentEO projectCommentEO) {
|
||||||
|
return super.exportXls(request, projectCommentEO, ProjectCommentEO.class, "法规清单评论表");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, ProjectCommentEO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+175
@@ -0,0 +1,175 @@
|
|||||||
|
package com.jero.modules.project.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.project.entity.ProjectHistoryVersionsEO;
|
||||||
|
import com.jero.modules.project.service.IProjectHistoryVersionsEOService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单历史版本表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="法规清单历史版本表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project/projectHistoryVersionsEO")
|
||||||
|
@Slf4j
|
||||||
|
public class ProjectHistoryVersionsEOController extends JeroController<ProjectHistoryVersionsEO, IProjectHistoryVersionsEOService> {
|
||||||
|
@Autowired
|
||||||
|
private IProjectHistoryVersionsEOService projectHistoryVersionsEOService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param projectHistoryVersionsEO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单历史版本表-分页列表查询")
|
||||||
|
@ApiOperation(value="法规清单历史版本表-分页列表查询", notes="法规清单历史版本表-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(ProjectHistoryVersionsEO projectHistoryVersionsEO,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ProjectHistoryVersionsEO> queryWrapper = QueryGenerator.initQueryWrapper(projectHistoryVersionsEO, req.getParameterMap());
|
||||||
|
Page<ProjectHistoryVersionsEO> page = new Page<ProjectHistoryVersionsEO>(pageNo, pageSize);
|
||||||
|
IPage<ProjectHistoryVersionsEO> pageList = projectHistoryVersionsEOService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单历史版本表-列表查询")
|
||||||
|
@ApiOperation(value="法规清单历史版本表-列表查询", notes="法规清单历史版本表-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<ProjectHistoryVersionsEO>> queryList(ProjectHistoryVersionsEO projectHistoryVersionsEO) {
|
||||||
|
LambdaQueryWrapper<ProjectHistoryVersionsEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(ProjectHistoryVersionsEO::getProjectLibraryId,projectHistoryVersionsEO.getProjectLibraryId());
|
||||||
|
wrapper.orderByDesc(ProjectHistoryVersionsEO::getCreateTime);
|
||||||
|
List<ProjectHistoryVersionsEO> list = projectHistoryVersionsEOService.list(wrapper);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param projectHistoryVersionsEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单历史版本表-添加")
|
||||||
|
@ApiOperation(value="法规清单历史版本表-添加", notes="法规清单历史版本表-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody ProjectHistoryVersionsEO projectHistoryVersionsEO) {
|
||||||
|
projectHistoryVersionsEOService.add(projectHistoryVersionsEO);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param projectHistoryVersionsEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单历史版本表-编辑")
|
||||||
|
@ApiOperation(value="法规清单历史版本表-编辑", notes="法规清单历史版本表-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody ProjectHistoryVersionsEO projectHistoryVersionsEO) {
|
||||||
|
projectHistoryVersionsEOService.editById(projectHistoryVersionsEO);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单历史版本表-通过id删除")
|
||||||
|
@ApiOperation(value="法规清单历史版本表-通过id删除", notes="法规清单历史版本表-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
projectHistoryVersionsEOService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单历史版本表-批量删除")
|
||||||
|
@ApiOperation(value="法规清单历史版本表-批量删除", notes="法规清单历史版本表-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.projectHistoryVersionsEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单历史版本表-通过id查询")
|
||||||
|
@ApiOperation(value="法规清单历史版本表-通过id查询", notes="法规清单历史版本表-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ProjectHistoryVersionsEO projectHistoryVersionsEO = projectHistoryVersionsEOService.queryById(id);
|
||||||
|
if(projectHistoryVersionsEO==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(projectHistoryVersionsEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param projectHistoryVersionsEO
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ProjectHistoryVersionsEO projectHistoryVersionsEO) {
|
||||||
|
return super.exportXls(request, projectHistoryVersionsEO, ProjectHistoryVersionsEO.class, "法规清单历史版本表");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, ProjectHistoryVersionsEO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+1
-1
@@ -326,7 +326,7 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
|||||||
QueryWrapper<DummyInventoryBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryBaseEO, req.getParameterMap());
|
QueryWrapper<DummyInventoryBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryBaseEO, req.getParameterMap());
|
||||||
queryWrapper.orderByDesc("create_time");
|
queryWrapper.orderByDesc("create_time");
|
||||||
Page<DummyInventoryBaseEO> page = new Page<DummyInventoryBaseEO>(pageNo, pageSize);
|
Page<DummyInventoryBaseEO> page = new Page<DummyInventoryBaseEO>(pageNo, pageSize);
|
||||||
IPage<DummyInventoryBaseEO> pageList = dummyInventoryBaseEOService.getPageInfo(page,queryWrapper);
|
IPage<DummyInventoryBaseEO> pageList = dummyInventoryBaseEOService.getPageInfoDummy(page,queryWrapper);
|
||||||
return Result.OK(dummyInventoryBaseEO.getCut(),pageList);
|
return Result.OK(dummyInventoryBaseEO.getCut(),pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+170
@@ -0,0 +1,170 @@
|
|||||||
|
package com.jero.modules.project.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.project.entity.ProjectReplyEO;
|
||||||
|
import com.jero.modules.project.service.IProjectReplyEOService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单回复表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="法规清单回复表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project/projectReplyEO")
|
||||||
|
@Slf4j
|
||||||
|
public class ProjectReplyEOController extends JeroController<ProjectReplyEO, IProjectReplyEOService> {
|
||||||
|
@Autowired
|
||||||
|
private IProjectReplyEOService projectReplyEOService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param projectReplyEO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单回复表-分页列表查询")
|
||||||
|
@ApiOperation(value="法规清单回复表-分页列表查询", notes="法规清单回复表-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(ProjectReplyEO projectReplyEO,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ProjectReplyEO> queryWrapper = QueryGenerator.initQueryWrapper(projectReplyEO, req.getParameterMap());
|
||||||
|
Page<ProjectReplyEO> page = new Page<ProjectReplyEO>(pageNo, pageSize);
|
||||||
|
IPage<ProjectReplyEO> pageList = projectReplyEOService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单回复表-列表查询")
|
||||||
|
@ApiOperation(value="法规清单回复表-列表查询", notes="法规清单回复表-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<ProjectReplyEO>> queryList() {
|
||||||
|
List<ProjectReplyEO> list = projectReplyEOService.queryList();
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param projectReplyEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单回复表-添加")
|
||||||
|
@ApiOperation(value="法规清单回复表-添加", notes="法规清单回复表-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@RequestBody ProjectReplyEO projectReplyEO) {
|
||||||
|
projectReplyEOService.add(projectReplyEO);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param projectReplyEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单回复表-编辑")
|
||||||
|
@ApiOperation(value="法规清单回复表-编辑", notes="法规清单回复表-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody ProjectReplyEO projectReplyEO) {
|
||||||
|
projectReplyEOService.editById(projectReplyEO);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单回复表-通过id删除")
|
||||||
|
@ApiOperation(value="法规清单回复表-通过id删除", notes="法规清单回复表-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
projectReplyEOService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单回复表-批量删除")
|
||||||
|
@ApiOperation(value="法规清单回复表-批量删除", notes="法规清单回复表-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.projectReplyEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单回复表-通过id查询")
|
||||||
|
@ApiOperation(value="法规清单回复表-通过id查询", notes="法规清单回复表-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ProjectReplyEO projectReplyEO = projectReplyEOService.queryById(id);
|
||||||
|
if(projectReplyEO==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(projectReplyEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param projectReplyEO
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ProjectReplyEO projectReplyEO) {
|
||||||
|
return super.exportXls(request, projectReplyEO, ProjectReplyEO.class, "法规清单回复表");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, ProjectReplyEO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+74
@@ -0,0 +1,74 @@
|
|||||||
|
package com.jero.modules.project.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单评论表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("project_comment")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="project_comment对象", description="法规清单评论表")
|
||||||
|
public class ProjectCommentEO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private java.lang.String id;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
|
/**项目库id*/
|
||||||
|
@Excel(name = "项目库id", width = 15)
|
||||||
|
@ApiModelProperty(value = "项目库id")
|
||||||
|
private java.lang.String projectLibraryId;
|
||||||
|
|
||||||
|
/**评论内容*/
|
||||||
|
@Excel(name = "评论内容", width = 15)
|
||||||
|
@ApiModelProperty(value = "评论内容")
|
||||||
|
private java.lang.String commentContent;
|
||||||
|
|
||||||
|
}
|
||||||
+74
@@ -0,0 +1,74 @@
|
|||||||
|
package com.jero.modules.project.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单历史版本表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("project_history_versions")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="project_history_versions对象", description="法规清单历史版本表")
|
||||||
|
public class ProjectHistoryVersionsEO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private java.lang.String id;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
|
/**版本名称*/
|
||||||
|
@Excel(name = "版本名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "版本名称")
|
||||||
|
private java.lang.String versionsName;
|
||||||
|
|
||||||
|
/**项目库id*/
|
||||||
|
@Excel(name = "项目库id", width = 15)
|
||||||
|
@ApiModelProperty(value = "项目库id")
|
||||||
|
private java.lang.String projectLibraryId;
|
||||||
|
|
||||||
|
}
|
||||||
+74
@@ -0,0 +1,74 @@
|
|||||||
|
package com.jero.modules.project.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单回复表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("project_reply")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="project_reply对象", description="法规清单回复表")
|
||||||
|
public class ProjectReplyEO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private java.lang.String id;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
|
/**法规清单评论表id*/
|
||||||
|
@Excel(name = "法规清单评论表id", width = 15)
|
||||||
|
@ApiModelProperty(value = "法规清单评论表id")
|
||||||
|
private java.lang.String projectCommentId;
|
||||||
|
|
||||||
|
/**回复内容*/
|
||||||
|
@Excel(name = "回复内容", width = 15)
|
||||||
|
@ApiModelProperty(value = "回复内容")
|
||||||
|
private java.lang.String replyContent;
|
||||||
|
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.project.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.jero.modules.project.entity.ProjectCommentEO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单评论表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ProjectCommentEOMapper extends BaseMapper<ProjectCommentEO> {
|
||||||
|
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.project.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.jero.modules.project.entity.ProjectHistoryVersionsEO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单历史版本表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ProjectHistoryVersionsEOMapper extends BaseMapper<ProjectHistoryVersionsEO> {
|
||||||
|
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.project.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.jero.modules.project.entity.ProjectReplyEO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单回复表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ProjectReplyEOMapper extends BaseMapper<ProjectReplyEO> {
|
||||||
|
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.project.mapper.ProjectCommentEOMapper">
|
||||||
|
<resultMap id="ProjectCommentEOResultMap" type="com.jero.modules.project.entity.ProjectCommentEO">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="project_library_id" property="projectLibraryId" />
|
||||||
|
<result column="comment_content" property="commentContent" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.project.mapper.ProjectHistoryVersionsEOMapper">
|
||||||
|
<resultMap id="ProjectHistoryVersionsEOResultMap" type="com.jero.modules.project.entity.ProjectHistoryVersionsEO">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="versions_name" property="versionsName" />
|
||||||
|
<result column="project_library_id" property="projectLibraryId" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.project.mapper.ProjectReplyEOMapper">
|
||||||
|
<resultMap id="ProjectReplyEOResultMap" type="com.jero.modules.project.entity.ProjectReplyEO">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="project_comment_id" property="projectCommentId" />
|
||||||
|
<result column="reply_content" property="replyContent" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProjectCommentEO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.jero.modules.project.vo.ProjectCommentVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单评论表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IProjectCommentEOService extends IService<ProjectCommentEO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param projectCommentEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(ProjectCommentEO projectCommentEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param projectCommentEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(ProjectCommentEO projectCommentEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ProjectCommentEO queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ProjectCommentEO> queryList();
|
||||||
|
|
||||||
|
|
||||||
|
List<ProjectCommentVO> getInfoList(ProjectCommentEO projectCommentEO);
|
||||||
|
}
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProjectHistoryVersionsEO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单历史版本表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IProjectHistoryVersionsEOService extends IService<ProjectHistoryVersionsEO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param projectHistoryVersionsEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(ProjectHistoryVersionsEO projectHistoryVersionsEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param projectHistoryVersionsEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(ProjectHistoryVersionsEO projectHistoryVersionsEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ProjectHistoryVersionsEO queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ProjectHistoryVersionsEO> queryList();
|
||||||
|
}
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProjectReplyEO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单回复表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IProjectReplyEOService extends IService<ProjectReplyEO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param projectReplyEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(ProjectReplyEO projectReplyEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param projectReplyEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(ProjectReplyEO projectReplyEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ProjectReplyEO queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ProjectReplyEO> queryList();
|
||||||
|
}
|
||||||
+145
@@ -0,0 +1,145 @@
|
|||||||
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.modules.project.entity.ProjectCommentEO;
|
||||||
|
import com.jero.modules.project.entity.ProjectReplyEO;
|
||||||
|
import com.jero.modules.project.mapper.ProjectCommentEOMapper;
|
||||||
|
import com.jero.modules.project.service.IProjectCommentEOService;
|
||||||
|
import com.jero.modules.project.service.IProjectReplyEOService;
|
||||||
|
import com.jero.modules.project.vo.ProjectCommentVO;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单评论表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProjectCommentEOServiceImpl extends ServiceImpl<ProjectCommentEOMapper, ProjectCommentEO> implements IProjectCommentEOService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProjectReplyEOService iProjectReplyEOService;
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param projectCommentEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(ProjectCommentEO projectCommentEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
projectCommentEO.setCreateTime(now);
|
||||||
|
projectCommentEO.setUpdateTime(now);
|
||||||
|
save(projectCommentEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param projectCommentEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(ProjectCommentEO projectCommentEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
projectCommentEO.setUpdateTime(now);
|
||||||
|
saveOrUpdate(projectCommentEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ProjectCommentEO queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProjectCommentEO> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProjectCommentVO> getInfoList(ProjectCommentEO projectCommentEOTemp) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
//评论的内容
|
||||||
|
LambdaQueryWrapper<ProjectCommentEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(ProjectCommentEO::getCreateBy,sysUser.getUsername()).in(ProjectCommentEO::getProjectLibraryId,projectCommentEOTemp.getProjectLibraryId());
|
||||||
|
wrapper.orderByDesc(ProjectCommentEO::getCreateTime);
|
||||||
|
List<ProjectCommentEO> projectCommentEOS = this.list(wrapper);
|
||||||
|
List<String> projectCommentIdList = projectCommentEOS.stream().map(ProjectCommentEO::getId).collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<ProjectCommentVO> projectCommentVOList = new ArrayList<>();
|
||||||
|
if(projectCommentIdList.size() != 0){
|
||||||
|
//回复的内容
|
||||||
|
LambdaQueryWrapper<ProjectReplyEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(ProjectReplyEO::getProjectCommentId,projectCommentIdList);
|
||||||
|
List<ProjectReplyEO> projectReplyEOList = iProjectReplyEOService.list(lambdaQueryWrapper);
|
||||||
|
//封装数据
|
||||||
|
for (ProjectCommentEO projectCommentEO : projectCommentEOS) {
|
||||||
|
//每条评论对应的回复
|
||||||
|
List<ProjectReplyEO> projectReplyEOS = projectReplyEOList.stream()
|
||||||
|
.filter(e -> projectCommentEO.getId().equals(e.getProjectCommentId())).collect(Collectors.toList());
|
||||||
|
ProjectCommentVO projectCommentVO = new ProjectCommentVO();
|
||||||
|
projectCommentVO.setId(projectCommentEO.getId());
|
||||||
|
projectCommentVO.setName(projectCommentEO.getCreateBy());
|
||||||
|
projectCommentVO.setCreateTime(projectCommentEO.getCreateTime());
|
||||||
|
projectCommentVO.setContent(projectCommentEO.getCommentContent());
|
||||||
|
List<ProjectCommentVO> projectCommentVOS = new ArrayList<>();
|
||||||
|
if(projectReplyEOS.size() != 0){
|
||||||
|
for (ProjectReplyEO projectReplyEO : projectReplyEOS) {
|
||||||
|
ProjectCommentVO projectCommentVOTemp = new ProjectCommentVO();
|
||||||
|
projectCommentVOTemp.setName(projectReplyEO.getCreateBy());
|
||||||
|
projectCommentVOTemp.setCreateTime(projectReplyEO.getCreateTime());
|
||||||
|
projectCommentVOTemp.setContent(projectReplyEO.getReplyContent());
|
||||||
|
projectCommentVOS.add(projectCommentVOTemp);
|
||||||
|
}
|
||||||
|
projectCommentVO.setProjectCommentVOList(projectCommentVOS);
|
||||||
|
}
|
||||||
|
projectCommentVOList.add(projectCommentVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return projectCommentVOList;
|
||||||
|
}
|
||||||
|
}
|
||||||
+89
@@ -0,0 +1,89 @@
|
|||||||
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProjectHistoryVersionsEO;
|
||||||
|
import com.jero.modules.project.mapper.ProjectHistoryVersionsEOMapper;
|
||||||
|
import com.jero.modules.project.service.IProjectHistoryVersionsEOService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单历史版本表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProjectHistoryVersionsEOServiceImpl extends ServiceImpl<ProjectHistoryVersionsEOMapper, ProjectHistoryVersionsEO> implements IProjectHistoryVersionsEOService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param projectHistoryVersionsEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(ProjectHistoryVersionsEO projectHistoryVersionsEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
projectHistoryVersionsEO.setCreateTime(now);
|
||||||
|
projectHistoryVersionsEO.setUpdateTime(now);
|
||||||
|
save(projectHistoryVersionsEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param projectHistoryVersionsEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(ProjectHistoryVersionsEO projectHistoryVersionsEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
projectHistoryVersionsEO.setUpdateTime(now);
|
||||||
|
saveOrUpdate(projectHistoryVersionsEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ProjectHistoryVersionsEO queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProjectHistoryVersionsEO> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
}
|
||||||
+22
-6
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.constant.CommonConstant;
|
import com.jero.common.constant.CommonConstant;
|
||||||
import com.jero.common.constant.WebsocketConst;
|
import com.jero.common.constant.WebsocketConst;
|
||||||
@@ -24,7 +25,13 @@ import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
|||||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||||
import com.jero.modules.project.enums.*;
|
import com.jero.modules.project.enums.InventoryAffirmStatusEnum;
|
||||||
|
import com.jero.modules.project.enums.MsgTypeEnum;
|
||||||
|
import com.jero.modules.project.enums.OperatorResultEnum;
|
||||||
|
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||||
|
import com.jero.modules.project.enums.ProjectRoleEnum;
|
||||||
|
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||||
|
import com.jero.modules.project.enums.TaskAffirmStatusEnum;
|
||||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||||
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||||
@@ -44,15 +51,18 @@ import org.springframework.beans.BeanUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 项目库-法规清单表
|
* @Description: 项目库-法规清单表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
@@ -121,6 +131,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO();
|
ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO();
|
||||||
projectLawsInventoryEOTemp.setProjectLibraryId(projectLawsInventoryEO.getProjectLibraryId());
|
projectLawsInventoryEOTemp.setProjectLibraryId(projectLawsInventoryEO.getProjectLibraryId());
|
||||||
BeanUtils.copyProperties(dummyInventoryInfoEO,projectLawsInventoryEOTemp);
|
BeanUtils.copyProperties(dummyInventoryInfoEO,projectLawsInventoryEOTemp);
|
||||||
|
projectLawsInventoryEOTemp.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
projectLawsInventoryEOTemp.setTaskAffirmStatus(TaskAffirmStatusEnum.NOT_STARTED.getValue());
|
||||||
|
projectLawsInventoryEOTemp.setInventoryAffirmStatus(InventoryAffirmStatusEnum.NOT_STARTED.getValue());
|
||||||
projectLawsInventoryEOS.add(projectLawsInventoryEOTemp);
|
projectLawsInventoryEOS.add(projectLawsInventoryEOTemp);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@@ -139,6 +152,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO();
|
ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO();
|
||||||
projectLawsInventoryEOTemp.setProjectLibraryId(projectLawsInventoryEO.getProjectLibraryId());
|
projectLawsInventoryEOTemp.setProjectLibraryId(projectLawsInventoryEO.getProjectLibraryId());
|
||||||
BeanUtils.copyProperties(dummyInventoryInfoEO,projectLawsInventoryEOTemp);
|
BeanUtils.copyProperties(dummyInventoryInfoEO,projectLawsInventoryEOTemp);
|
||||||
|
projectLawsInventoryEOTemp.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
projectLawsInventoryEOTemp.setTaskAffirmStatus(TaskAffirmStatusEnum.NOT_STARTED.getValue());
|
||||||
|
projectLawsInventoryEOTemp.setInventoryAffirmStatus(InventoryAffirmStatusEnum.NOT_STARTED.getValue());
|
||||||
projectLawsInventoryEOS.add(projectLawsInventoryEOTemp);
|
projectLawsInventoryEOS.add(projectLawsInventoryEOTemp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-23
@@ -13,7 +13,6 @@ import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
|||||||
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
||||||
import com.jero.modules.project.util.ExcelLangUtils;
|
import com.jero.modules.project.util.ExcelLangUtils;
|
||||||
import com.jero.modules.system.entity.SysUser;
|
import com.jero.modules.system.entity.SysUser;
|
||||||
import com.jero.modules.system.mapper.SysDictItemMapper;
|
|
||||||
import com.jero.modules.system.mapper.SysDictMapper;
|
import com.jero.modules.system.mapper.SysDictMapper;
|
||||||
import com.jero.modules.system.mapper.SysUserMapper;
|
import com.jero.modules.system.mapper.SysUserMapper;
|
||||||
import com.jero.modules.system.service.ISysDictService;
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
@@ -60,8 +59,6 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysDictMapper sysDictMapper;
|
private SysDictMapper sysDictMapper;
|
||||||
@Autowired
|
|
||||||
private SysDictItemMapper sysDictItemMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -382,11 +379,11 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
try {
|
try {
|
||||||
//中英切换
|
//中英切换
|
||||||
if(CutEnum.CN.getValue().equals(cut)) {
|
if(CutEnum.CN.getValue().equals(cut)) {
|
||||||
exportParams=new ExportParams(title , "导出人:" + sysUser.getUsername(), title);
|
exportParams=new ExportParams(title , null, title);
|
||||||
mv.addObject(NormalExcelConstants.CLASS, ExcelLangUtils.chooseLang(clazz, CutEnum.CN.getValue()));
|
mv.addObject(NormalExcelConstants.CLASS, ExcelLangUtils.chooseLang(clazz, CutEnum.CN.getValue()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
exportParams=new ExportParams(title , "Exporter:" + sysUser.getUsername(), title);
|
exportParams=new ExportParams(title , null, title);
|
||||||
mv.addObject(NormalExcelConstants.CLASS, ExcelLangUtils.chooseLang(clazz, CutEnum.EN.getValue()));
|
mv.addObject(NormalExcelConstants.CLASS, ExcelLangUtils.chooseLang(clazz, CutEnum.EN.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,30 +405,23 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ModelAndView setExporTemplate(HttpServletRequest request, Class<ProjectRelatedPersonnel> clazz, String title,String cut){
|
public ModelAndView setExporTemplate(HttpServletRequest request, Class<ProjectRelatedPersonnel> clazz, String title,String cut){
|
||||||
List<ProjectRelatedPersonnel> records = new ArrayList<>();;
|
List<ProjectRelatedPersonnel> records=new ArrayList<>();
|
||||||
|
// ProjectRelatedPersonnel projectRelatedPersonnel=new ProjectRelatedPersonnel();
|
||||||
// Step.1 组装查询条件
|
// Step.1 组装查询条件
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
ExportParams exportParams=null;
|
ExportParams exportParams=null;
|
||||||
// Step.2 AutoPoi 导出Excel
|
// Step.2 AutoPoi 导出Excel
|
||||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||||
try {
|
try {
|
||||||
String fillingExplanationCN="填写说明\n" +
|
|
||||||
"1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据\n" +
|
|
||||||
"2.所有带*号的字段必须填写\n" +
|
|
||||||
"3.填写人员时,必须使用人员账号进行填写。\n" +
|
|
||||||
"4.填写的人员账号必须与系统中账号保持一致";
|
|
||||||
//中英切换模板
|
//中英切换模板
|
||||||
/* if(CutEnum.CN.getValue().equals(cut)) {
|
if(CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
//projectRelatedPersonnel.setDutyTerritory(ExportTemplateEnum.DUTY_TERRITORY_FIELD_of_PRODUCTION.getName());
|
||||||
exportParams=new ExportParams(title , fillingExplanationCN, title);
|
exportParams=new ExportParams(title , null, title);
|
||||||
}else{
|
}else{
|
||||||
|
//projectRelatedPersonnel.setDutyTerritory(ExportTemplateEnum.DUTY_TERRITORY_FIELD_of_PRODUCTION.getValue());
|
||||||
exportParams=new ExportParams(title , ExportTemplateEnum.FILLING_EXPLANATION_EN.getName(), title);
|
exportParams=new ExportParams(title , null, title);
|
||||||
}*/
|
}
|
||||||
exportParams=new ExportParams();
|
//查标签内容里的责任领域数据
|
||||||
exportParams.setSheetName(title);
|
|
||||||
//查标签内容里的责任领域数据
|
|
||||||
List<String> dictItemNameList = sysDictMapper.queryDictNameByCode(DictCodeEnum.DUTY_TERRITORY.getValue());
|
List<String> dictItemNameList = sysDictMapper.queryDictNameByCode(DictCodeEnum.DUTY_TERRITORY.getValue());
|
||||||
//新建相关人员表里的责任领域数据
|
//新建相关人员表里的责任领域数据
|
||||||
if (CollectionUtils.isNotEmpty(dictItemNameList)) {
|
if (CollectionUtils.isNotEmpty(dictItemNameList)) {
|
||||||
@@ -441,7 +431,6 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
records.add(projectRelatedPersonnel);
|
records.add(projectRelatedPersonnel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
|
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
|
||||||
mv.addObject(NormalExcelConstants.CLASS, clazz);//!!!!这里设置中英切换
|
mv.addObject(NormalExcelConstants.CLASS, clazz);//!!!!这里设置中英切换
|
||||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||||
@@ -466,7 +455,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
MultipartFile file = entity.getValue();// 获取上传文件对象
|
||||||
ImportParams params = new ImportParams();
|
ImportParams params = new ImportParams();
|
||||||
params.setTitleRows(2);
|
params.setTitleRows(1);
|
||||||
params.setHeadRows(1);
|
params.setHeadRows(1);
|
||||||
params.setNeedSave(true);
|
params.setNeedSave(true);
|
||||||
try {
|
try {
|
||||||
|
|||||||
+89
@@ -0,0 +1,89 @@
|
|||||||
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProjectReplyEO;
|
||||||
|
import com.jero.modules.project.mapper.ProjectReplyEOMapper;
|
||||||
|
import com.jero.modules.project.service.IProjectReplyEOService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单回复表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProjectReplyEOServiceImpl extends ServiceImpl<ProjectReplyEOMapper, ProjectReplyEO> implements IProjectReplyEOService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param projectReplyEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(ProjectReplyEO projectReplyEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
projectReplyEO.setCreateTime(now);
|
||||||
|
projectReplyEO.setUpdateTime(now);
|
||||||
|
save(projectReplyEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param projectReplyEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(ProjectReplyEO projectReplyEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
projectReplyEO.setUpdateTime(now);
|
||||||
|
saveOrUpdate(projectReplyEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ProjectReplyEO queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProjectReplyEO> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -198,6 +198,14 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
|||||||
}
|
}
|
||||||
// 排序
|
// 排序
|
||||||
Collections.sort(timeNodeVOS, listConfirmationVO);
|
Collections.sort(timeNodeVOS, listConfirmationVO);
|
||||||
|
//设置在已过时,和未发生之间的数据的状态为进行中
|
||||||
|
for(int i=0;i<timeNodeVOS.size();i++){
|
||||||
|
if(timeNodeVOS.get(i).getStatus().equals(PlanStatusEnum.OUT_OF_DATE.getValue())
|
||||||
|
&& timeNodeVOS.get(i+1).getStatus().equals(PlanStatusEnum.LESS_THAN_TIME.getValue())){
|
||||||
|
timeNodeVOS.get(i+1).setStatus(PlanStatusEnum.ON_GOING.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return timeNodeVOS;
|
return timeNodeVOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
package com.jero.modules.project.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 法规清单评论表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-04-29
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="project_comment对象", description="法规清单评论表")
|
||||||
|
public class ProjectCommentVO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "评论人或回复人")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "评论内容或回复内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
private List<ProjectCommentVO> ProjectCommentVOList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+13
-3
@@ -83,6 +83,7 @@ import java.io.*;
|
|||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardOpenOption;
|
import java.nio.file.StandardOpenOption;
|
||||||
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -917,6 +918,9 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
itemsMap.put(dbFieldName+"_id", itemsMap.get(dbFieldName).toString());
|
itemsMap.put(dbFieldName+"_id", itemsMap.get(dbFieldName).toString());
|
||||||
itemsMap.put(dbFieldName, StringUtils.join(names,","));
|
itemsMap.put(dbFieldName, StringUtils.join(names,","));
|
||||||
|
|
||||||
|
} else { // TODO 可能是只有机构id, 也可能是错误数据
|
||||||
|
itemsMap.put(dbFieldName+"_id", itemsMap.get(dbFieldName).toString());
|
||||||
|
itemsMap.put(dbFieldName, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1731,12 +1735,18 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
}
|
}
|
||||||
String cellValue = null;
|
String cellValue = null;
|
||||||
|
|
||||||
if (cell.getCellTypeEnum().equals("NUMERIC") && HSSFDateUtil.isCellDateFormatted(cell)) {
|
if (HSSFCell.CELL_TYPE_NUMERIC == cell.getCellType() && HSSFDateUtil.isCellDateFormatted(cell)) {
|
||||||
// 获取日期类型的单元格的值
|
// 获取日期类型的单元格的值
|
||||||
Date d = cell.getDateCellValue();
|
Date d = cell.getDateCellValue();
|
||||||
// 进行格式转换
|
// 进行格式转换
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
cellValue = formatter.format(d);
|
cellValue = df.format(d);
|
||||||
|
map.put(dbfieldList.get(y), cellValue);
|
||||||
|
if (map.get(dbfieldList.get(y)) == null || "".equals(map.get(dbfieldList.get(y)))) {
|
||||||
|
a++;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//设置单元格类型
|
//设置单元格类型
|
||||||
cell.setCellType(CellType.STRING);
|
cell.setCellType(CellType.STRING);
|
||||||
|
|||||||
@@ -113,6 +113,21 @@ export function downFile(url,parameter){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载文件 用于excel导出 -- post
|
||||||
|
* @param url
|
||||||
|
* @param parameter
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function downFilePost(url,parameter){
|
||||||
|
return axios({
|
||||||
|
url: url,
|
||||||
|
data: parameter,
|
||||||
|
method:'post' ,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载文件
|
* 下载文件
|
||||||
* @param url 文件路径
|
* @param url 文件路径
|
||||||
|
|||||||
@@ -706,6 +706,9 @@ module.exports = {
|
|||||||
uploadTime: 'Upload time',
|
uploadTime: 'Upload time',
|
||||||
enclosure: 'enclosure',
|
enclosure: 'enclosure',
|
||||||
// 认证
|
// 认证
|
||||||
|
pleaseSelectData: 'please Select Data',
|
||||||
|
templateCopy: 'template Copy',
|
||||||
|
NiOnumberalreadyexists: 'NiO number already exists, please replace NiO number',
|
||||||
attachmentTemplate: 'attachment Template',
|
attachmentTemplate: 'attachment Template',
|
||||||
controlAlternatives: 'control Alternatives',
|
controlAlternatives: 'control Alternatives',
|
||||||
controlVerification: 'control Verification',
|
controlVerification: 'control Verification',
|
||||||
@@ -734,4 +737,9 @@ module.exports = {
|
|||||||
Submitting:'Submitting',
|
Submitting:'Submitting',
|
||||||
Returning:'Returning',
|
Returning:'Returning',
|
||||||
terminationProcessing:'Termination process',
|
terminationProcessing:'Termination process',
|
||||||
|
publishComment:'publish comment',
|
||||||
|
record:'record',
|
||||||
|
replyToComments:'Reply to comments',
|
||||||
|
noComment:'No comment',
|
||||||
|
theReceived:'The final version can be made only when the list confirmation status and task confirmation status of all data are received',
|
||||||
}
|
}
|
||||||
@@ -712,6 +712,9 @@ module.exports = {
|
|||||||
uploadTime:'上传时间',
|
uploadTime:'上传时间',
|
||||||
enclosure:'附件',
|
enclosure:'附件',
|
||||||
// 认证
|
// 认证
|
||||||
|
pleaseSelectData: '请选择数据',
|
||||||
|
templateCopy: '模板复制',
|
||||||
|
NiOnumberalreadyexists: 'NIO编号已存在,请更换NIO编号',
|
||||||
attachmentTemplate: '附件模板',
|
attachmentTemplate: '附件模板',
|
||||||
controlAlternatives: '控件备选值',
|
controlAlternatives: '控件备选值',
|
||||||
controlVerification: '控件校验',
|
controlVerification: '控件校验',
|
||||||
@@ -739,4 +742,9 @@ module.exports = {
|
|||||||
Submitting:'提交中...',
|
Submitting:'提交中...',
|
||||||
Returning:'退回中',
|
Returning:'退回中',
|
||||||
terminationProcessing:'终止流程中',
|
terminationProcessing:'终止流程中',
|
||||||
|
publishComment:'发表评论',
|
||||||
|
record:'记录',
|
||||||
|
replyToComments:'回复评论',
|
||||||
|
noComment:'暂无评论',
|
||||||
|
theReceived:'所有数据的清单确认状态和任务确认状态都为接受才可以定版',
|
||||||
}
|
}
|
||||||
@@ -40,6 +40,10 @@
|
|||||||
dummyInventoryBaseId: {
|
dummyInventoryBaseId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
|
},
|
||||||
|
paramsTemplateId: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -54,6 +58,8 @@
|
|||||||
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&projectId=' + this.projectId
|
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&projectId=' + this.projectId
|
||||||
} else if (this.dummyInventoryBaseId) {
|
} else if (this.dummyInventoryBaseId) {
|
||||||
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&dummyInventoryBaseId=' + this.dummyInventoryBaseId
|
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&dummyInventoryBaseId=' + this.dummyInventoryBaseId
|
||||||
|
} else if (this.paramsTemplateId) {
|
||||||
|
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '¶msTemplateId=' + this.paramsTemplateId
|
||||||
}
|
}
|
||||||
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut
|
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,8 @@
|
|||||||
{{$t('DocumentStandard')}}
|
{{$t('DocumentStandard')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" v-has="'document:importZip'" v-if="isTrue">
|
<div class="operator-text" v-has="'document:importZip'" v-if="isTrue">
|
||||||
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" @getList="getPersonnelList" :accept="'.zip'"/>
|
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" @getList="getPersonnelList"
|
||||||
|
:accept="'.zip'"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 模板下载-->
|
<!-- 模板下载-->
|
||||||
<div @click="handleModule" class="operator-text" v-if="isTrue">
|
<div @click="handleModule" class="operator-text" v-if="isTrue">
|
||||||
@@ -560,6 +561,8 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
|
this.$refs.globalAdvancedQueryRef.resetLine()
|
||||||
|
this.$refs.globalAdvancedQueryRef.emitCallback()
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
@@ -625,8 +628,8 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getPersonnelList(){
|
getPersonnelList() {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
batSettingList() {
|
batSettingList() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|||||||
@@ -88,6 +88,25 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||||
|
<a-modal class="show-copy" v-model="areaVisible" :title="$t('templateCopy')" :footer="null" @cancel="hideModal">
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model="paramsTemplateName"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -120,7 +139,8 @@ export default {
|
|||||||
add: 'params/template/add',
|
add: 'params/template/add',
|
||||||
edit: 'params/template/edit',
|
edit: 'params/template/edit',
|
||||||
deleteBatch: 'params/template/delete',
|
deleteBatch: 'params/template/delete',
|
||||||
deleteAll: 'params/template/deleteBatch'
|
deleteAll: 'params/template/deleteBatch',
|
||||||
|
copy: 'params/template/copyById'
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -169,13 +189,29 @@ export default {
|
|||||||
scopedSlots: { customRender: 'operation' }
|
scopedSlots: { customRender: 'operation' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
queryParam: {}
|
queryParam: {},
|
||||||
|
areaVisible:false,
|
||||||
|
paramsTemplateName: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleCancel() {
|
||||||
|
this.areaVisible=false
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
getAction(this.url.copy + `?id=${this.selectedRowKeys[0]}¶msTemplateName=${this.paramsTemplateName}`, {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.areaVisible=false
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleToggleSearch() {
|
handleToggleSearch() {
|
||||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||||
},
|
},
|
||||||
@@ -189,7 +225,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 复制
|
// 复制
|
||||||
handlecody(){
|
handlecody(){
|
||||||
|
if (this.selectedRowKeys.length > 1) {
|
||||||
|
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||||
|
} else if(this.selectedRowKeys.length == 0){
|
||||||
|
this.$message.warning(this.$t('pleaseSelectData'))
|
||||||
|
} else {
|
||||||
|
this.areaVisible=true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hideModal(){
|
||||||
|
this.visible = false;
|
||||||
},
|
},
|
||||||
//批量删除
|
//批量删除
|
||||||
handleDel() {
|
handleDel() {
|
||||||
|
|||||||
@@ -213,7 +213,7 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="24" >
|
<a-col :span="24" >
|
||||||
<a-tabs>
|
<a-tabs>
|
||||||
<a-tab-pane v-for='(item,index) in tt' :tab="item.textVal" :key="index + 1">
|
<a-tab-pane v-for='(item,index) in contentList' :tab="item.textVal" :key="index + 1">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
@@ -287,32 +287,28 @@ export default {
|
|||||||
props: ['url'],
|
props: ['url'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isRequired: [ // 是否必填
|
|
||||||
{value:1, label: '是' },
|
|
||||||
{value:0, label: '否' }
|
|
||||||
],
|
|
||||||
controlType: [ // 控件类型
|
controlType: [ // 控件类型
|
||||||
{value:1, label: '文本' },
|
{value:'1', label: '文本' },
|
||||||
{value:2, label: '下拉单选' },
|
{value:'2', label: '下拉单选' },
|
||||||
{value:3, label: '下拉多选' },
|
{value:'3', label: '下拉多选' },
|
||||||
{value:4, label: '附件' },
|
{value:'4', label: '附件' },
|
||||||
{value:5, label: '文本+下拉单选' },
|
{value:'5', label: '文本+下拉单选' },
|
||||||
{value:6, label: '文本+下拉多选' },
|
{value:'6', label: '文本+下拉多选' },
|
||||||
{value:7, label: '文本+附件' },
|
{value:'7', label: '文本+附件' },
|
||||||
{value:8, label: '下拉单选+附件' },
|
{value:'8', label: '下拉单选+附件' },
|
||||||
{value:9, label: '下拉多选+附件' },
|
{value:'9', label: '下拉多选+附件' },
|
||||||
{value:10, label: '文本+下拉单选+附件' },
|
{value:'10', label: '文本+下拉单选+附件' },
|
||||||
],
|
],
|
||||||
controlVerification: [ // 控件校验
|
controlVerification: [ // 控件校验
|
||||||
{value:1, label: '无' },
|
{value:'1', label: '无' },
|
||||||
{value:2, label: '中文' },
|
{value:'2', label: '中文' },
|
||||||
{value:3, label: '正整数' },
|
{value:'3', label: '正整数' },
|
||||||
{value:4, label: '正浮点数' },
|
{value:'4', label: '正浮点数' },
|
||||||
{value:5, label: '整数或小数' },
|
{value:'5', label: '整数或小数' },
|
||||||
{value:6, label: '一位小数' },
|
{value:'6', label: '一位小数' },
|
||||||
{value:7, label: '两位小数' },
|
{value:'7', label: '两位小数' },
|
||||||
{value:8, label: '三位小数' },
|
{value:'8', label: '三位小数' },
|
||||||
{value:9, label: '四位小数' },
|
{value:'9', label: '四位小数' },
|
||||||
],
|
],
|
||||||
CategoryTreeList: [], // 技术领域
|
CategoryTreeList: [], // 技术领域
|
||||||
certCategoryParamsInfoEOList: [], // 认证类别得tab栏
|
certCategoryParamsInfoEOList: [], // 认证类别得tab栏
|
||||||
@@ -343,7 +339,7 @@ export default {
|
|||||||
projectNameList: [],
|
projectNameList: [],
|
||||||
title: '',
|
title: '',
|
||||||
stateOne: '',
|
stateOne: '',
|
||||||
tt : []
|
contentList : []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -380,7 +376,7 @@ export default {
|
|||||||
|
|
||||||
// this.formInline.certCategoryParamsInfoEOList = []
|
// this.formInline.certCategoryParamsInfoEOList = []
|
||||||
val.forEach((item) => {
|
val.forEach((item) => {
|
||||||
this.tt.push({
|
this.contentList.push({
|
||||||
textVal: item.text, // tab
|
textVal: item.text, // tab
|
||||||
certCategory: '', // 所属认证类别
|
certCategory: '', // 所属认证类别
|
||||||
paramsNumber: '', // 编号
|
paramsNumber: '', // 编号
|
||||||
@@ -429,38 +425,45 @@ export default {
|
|||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
// 校验nio编号
|
||||||
if (valid) {
|
getAction(this.url.checkNIOnumber + `?nioNumber=${this.formInline.nioNumber}`, {} ).then((res) => {
|
||||||
let url = ''
|
if (res) {
|
||||||
let Action
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (this.formInline.id) {
|
if (valid) {
|
||||||
url = this.url.edit
|
let url = ''
|
||||||
Action = postAction
|
let Action
|
||||||
} else {
|
this.formInline.paramsTemplateId = this.$route.query.id
|
||||||
url = this.url.add
|
if (this.formInline.id) {
|
||||||
Action = postAction
|
url = this.url.edit
|
||||||
}
|
Action = postAction
|
||||||
let query = JSON.parse(JSON.stringify(this.formInline))
|
} else {
|
||||||
console.log(query,'queryqueryqueryquery')
|
url = this.url.add
|
||||||
Object.keys(query).forEach(res => {
|
Action = postAction
|
||||||
if (query[res] && query[res] instanceof Array) {
|
}
|
||||||
query[res] = query[res].join(',')
|
let query = JSON.parse(JSON.stringify(this.formInline))
|
||||||
}
|
Object.keys(query).forEach(res => {
|
||||||
})
|
if (query[res] && query[res] instanceof Array) {
|
||||||
let querytt = JSON.parse(JSON.stringify(this.tt))
|
query[res] = query[res].join(',')
|
||||||
query.certCategoryParamsInfoEOList = querytt
|
}
|
||||||
this.confirmLoading = true
|
})
|
||||||
Action(url, query).then((res) => {
|
let querycontentList = JSON.parse(JSON.stringify(this.contentList))
|
||||||
if (res.success) {
|
query.certCategoryParamsInfoEOList = querycontentList
|
||||||
this.confirmLoading = false
|
this.confirmLoading = true
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
Action(url, query).then((res) => {
|
||||||
this.visible = false
|
if (res.success) {
|
||||||
this.$emit('addModelList')
|
this.confirmLoading = false
|
||||||
} else {
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
this.$message.warning(res.message)
|
this.visible = false
|
||||||
this.confirmLoading = false
|
this.$emit('addModelList')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
this.confirmLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('NiOnumberalreadyexists'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -44,9 +44,16 @@
|
|||||||
<a-icon type="plus"/>
|
<a-icon type="plus"/>
|
||||||
{{$t('add')}}
|
{{$t('add')}}
|
||||||
</div>
|
</div>
|
||||||
<div @click="handlecody" class="operator-text" v-has="'document:getInfoById'">
|
<div @click="handleExport" class="operator-text" v-has="'document:exportExcel'">
|
||||||
<a-icon type="copy"/>
|
<a-icon type="export" :rotate="-90"/>
|
||||||
{{$t('copy')}}
|
{{$t('dataExport')}}
|
||||||
|
</div>
|
||||||
|
<div @click="handleModule" class="operator-text" v-has="'document:exportTemplate'">
|
||||||
|
<a-icon type="download"/>
|
||||||
|
{{$t('templateDownload')}}
|
||||||
|
</div>
|
||||||
|
<div class="operator-text" v-has="'document:importZip'">
|
||||||
|
<ImportFile :url="url" :isTrue="false" :accept="'.zip'" :paramsTemplateId='this.$route.query.id'/>
|
||||||
</div>
|
</div>
|
||||||
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
|
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
|
||||||
<a-icon type="delete"/>
|
<a-icon type="delete"/>
|
||||||
@@ -65,6 +72,7 @@
|
|||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
>
|
>
|
||||||
|
<!-- @change="tableOnChange"-->
|
||||||
<span slot="projectName" slot-scope="text,record">
|
<span slot="projectName" slot-scope="text,record">
|
||||||
<a @click="entryNameClick(record)">{{text}}</a>
|
<a @click="entryNameClick(record)">{{text}}</a>
|
||||||
</span>
|
</span>
|
||||||
@@ -90,18 +98,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, deleteAction, downFilePost } from '@/api/manage'
|
||||||
import addModel from './components/addModel'
|
import addModel from './components/addModel'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
import ImportFile from '@/components/ImportFile/index'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
components: {
|
components: {
|
||||||
addModel,
|
addModel,
|
||||||
|
ImportFile
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
orderBy: '1',
|
||||||
selectedRowKeysArray: '',
|
selectedRowKeysArray: '',
|
||||||
token:Vue.ls.get(ACCESS_TOKEN),
|
token:Vue.ls.get(ACCESS_TOKEN),
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -113,12 +124,14 @@ export default {
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
url: {
|
url: {
|
||||||
queryById: 'params/paramsInfo/queryById',
|
queryById: 'params/paramsInfo/queryById', // 编辑 通过id进行查询
|
||||||
list: 'params/paramsInfo/page',
|
list: 'params/paramsInfo/page', // 查询列表
|
||||||
add: 'params/paramsInfo/add',
|
add: 'params/paramsInfo/add', // 添加 -- 提交
|
||||||
edit: 'params/paramsInfo/edit',
|
edit: 'params/paramsInfo/edit', // 编辑 -- 提交
|
||||||
deleteBatch: 'params/paramsInfo/delete',
|
deleteBatch: 'params/paramsInfo/delete', // 单个删除
|
||||||
deleteAll: 'params/paramsInfo/deleteBatch'
|
deleteAll: 'params/paramsInfo/deleteBatch', // 批量删除
|
||||||
|
importZipUrl: 'params/paramsInfo/importParamsInfo', // 导入
|
||||||
|
checkNIOnumber: 'params/paramsInfo/verifyNioNumber', // 校验nio编号
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -130,6 +143,7 @@ export default {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: '10%',
|
width: '10%',
|
||||||
dataIndex: 'nioNumber',
|
dataIndex: 'nioNumber',
|
||||||
|
sorter: (a, b) => a.nioNumber - b.nioNumber,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('ParameterName'),
|
title: this.$t('ParameterName'),
|
||||||
@@ -167,6 +181,43 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// tableOnChange(pagination, filters, sorter) {
|
||||||
|
// console.log(pagination,'pagination')
|
||||||
|
// console.log(filters,'filters')
|
||||||
|
// console.log(sorter,'sorter')
|
||||||
|
// // this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||||
|
// // this.orderByField = sorter.columnKey
|
||||||
|
// this.getList()
|
||||||
|
// },
|
||||||
|
//导出
|
||||||
|
handleExport() {
|
||||||
|
// let _tt = {
|
||||||
|
// pageNo: this.pageNo,
|
||||||
|
// pageSize: this.pageSize,
|
||||||
|
// paramsTemplateId: this.$route.query.id,
|
||||||
|
// ...this.queryParam,
|
||||||
|
// ids: this.selectedRowKeys.join(','),
|
||||||
|
// // exportName: '参数项列表.xlsx'
|
||||||
|
// }
|
||||||
|
// let _xx = JSON.stringify(_tt)
|
||||||
|
// let _yy = {
|
||||||
|
// paramsInfoVO : _xx
|
||||||
|
// }
|
||||||
|
// downloadFile('params/paramsInfo/exportParamsInfoZip', '参数项列表.xlsx', _yy, this.Deselect)
|
||||||
|
let _tt = {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
paramsTemplateId: this.$route.query.id,
|
||||||
|
...this.queryParam,
|
||||||
|
ids: this.selectedRowKeys.join(','),
|
||||||
|
// exportName: '参数项列表.xlsx'
|
||||||
|
}
|
||||||
|
downFilePost('params/paramsInfo/exportParamsInfoZip',{ paramsInfoVO : _tt }, this.Deselect)
|
||||||
|
},
|
||||||
|
//下载模板
|
||||||
|
handleModule() {
|
||||||
|
downloadFile('params/paramsInfo/exportTemplate', '参数项列表.xls', {})
|
||||||
|
},
|
||||||
handleToggleSearch() {
|
handleToggleSearch() {
|
||||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||||
},
|
},
|
||||||
@@ -289,6 +340,7 @@ export default {
|
|||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
|
paramsTemplateId: this.$route.query.id,
|
||||||
...this.queryParam
|
...this.queryParam
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="Virtual-detail-text-right" v-if="textTitle === '法规清单'">
|
<div class="Virtual-detail-text-right" v-if="textTitle === '法规清单'">
|
||||||
<div class="operator-text">
|
<div class="operator-text" @click="commentClick">
|
||||||
<a-icon type="message"/>
|
<a-icon type="message"/>
|
||||||
{{$t('comment')}}
|
{{$t('comment')}}
|
||||||
</div>
|
</div>
|
||||||
@@ -58,7 +58,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<updateLog :url="url" ref="updateLogRef"/>
|
<updateLog :url="url" ref="updateLogRef"/>
|
||||||
<historicalVersionList :url="url" ref="historicalVersionListRef"/>
|
<historicalVersionList ref="historicalVersionListRef"/>
|
||||||
|
<commentList ref="commentListRef"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -70,6 +71,7 @@
|
|||||||
import nonConformance from '../components/nonConformance'
|
import nonConformance from '../components/nonConformance'
|
||||||
import updateLog from '@/components/UpdateLog/index'
|
import updateLog from '@/components/UpdateLog/index'
|
||||||
import historicalVersionList from '../components/historicalVersionList'
|
import historicalVersionList from '../components/historicalVersionList'
|
||||||
|
import commentList from '../components/commentList'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProjectDetails',
|
name: 'ProjectDetails',
|
||||||
@@ -80,7 +82,8 @@
|
|||||||
TaskParameterCollection,
|
TaskParameterCollection,
|
||||||
nonConformance,
|
nonConformance,
|
||||||
updateLog,
|
updateLog,
|
||||||
historicalVersionList
|
historicalVersionList,
|
||||||
|
commentList
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -120,6 +123,9 @@
|
|||||||
},
|
},
|
||||||
historicalVersionClick() {
|
historicalVersionClick() {
|
||||||
this.$refs.historicalVersionListRef.getList()
|
this.$refs.historicalVersionListRef.getList()
|
||||||
|
},
|
||||||
|
commentClick() {
|
||||||
|
this.$refs.commentListRef.getData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,364 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-drawer
|
||||||
|
:title="$t('comment')"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="482"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible">
|
||||||
|
<div class="button-box">
|
||||||
|
<a-button @click="handleSubmit" type="primary">{{$t('publishComment')}}</a-button>
|
||||||
|
</div>
|
||||||
|
<div class="comment-box" v-if="dataList && dataList.length > 0">
|
||||||
|
<div class="comment-box-top-box" v-for="(item,index) in dataList" :key="index">
|
||||||
|
<div class="title-text">{{$t('record')+(index + 1)}}</div>
|
||||||
|
<div class="box-content">
|
||||||
|
<div class="img-box">
|
||||||
|
<img src="../../../assets/daiban.png" class="img" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="box-text">
|
||||||
|
<span class="box-text-name">{{item.name}}</span>
|
||||||
|
<span calss="box-text-time">{{item.createTime}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="box-text-text">
|
||||||
|
{{item.content}}
|
||||||
|
</div>
|
||||||
|
<div class="box-icon" @click="messageClick(item)">
|
||||||
|
<a-icon type="message"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inside-box" v-if="item.ProjectCommentVOList && item.ProjectCommentVOList.length > 0">
|
||||||
|
<div class="box-content-inside" v-for="(val,indexOne) in item.ProjectCommentVOList" :key="indexOne">
|
||||||
|
<div class="img-box">
|
||||||
|
<img src="../../../assets/daiban.png" class="img" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="box-text">
|
||||||
|
<span class="box-text-name">{{val.name}}</span>
|
||||||
|
<span calss="box-text-time">{{val.createTime}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="box-text-text">
|
||||||
|
{{val.content}}
|
||||||
|
</div>
|
||||||
|
<div class="box-icon" @click="messageClick(val)">
|
||||||
|
<a-icon type="message"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="comment-box-text" v-else>{{$t('noComment')}}</div>
|
||||||
|
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||||
|
</a-drawer>
|
||||||
|
<a-modal
|
||||||
|
:title="title"
|
||||||
|
:width="500"
|
||||||
|
:visible="visibleComment"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
:maskClosable="false"
|
||||||
|
@ok="handleOkComment"
|
||||||
|
@cancel="handleCancelComment"
|
||||||
|
>
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="title">{{title}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item v-if="title == $t('replyToComments')" class="itemModel" :prop="'replyContent'">
|
||||||
|
<a-textarea
|
||||||
|
:placeholder="$t('PleaseEnter')+title"
|
||||||
|
:disabled="false"
|
||||||
|
v-model="formInline.replyContent" :rows="4"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
<a-form-model-item v-else-if="title == $t('publishComment')" class="itemModel" :prop="'commentContent'">
|
||||||
|
<a-textarea
|
||||||
|
:placeholder="$t('PleaseEnter')+title"
|
||||||
|
:disabled="false"
|
||||||
|
v-model="formInline.commentContent" :rows="4"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-modal>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'commentList',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
dataList: [],
|
||||||
|
formInline: {},
|
||||||
|
loading: false,
|
||||||
|
title: this.$t('comment'),
|
||||||
|
confirmLoading: false,
|
||||||
|
visibleComment: false,
|
||||||
|
url: {
|
||||||
|
list: '/project/projectCommentEO/list',
|
||||||
|
add: '/project/projectCommentEO/add',
|
||||||
|
edit: '/project/projectReplyEO/add'
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
commentContent: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('publishComment') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
replyContent: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('replyToComments') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
this.visible = true
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
this.title = this.$t('publishComment')
|
||||||
|
this.formInline = {}
|
||||||
|
this.visibleComment = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
getAction(this.url.list, { projectLibraryId: this.$route.query.id }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.loading = false
|
||||||
|
this.dataList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.loading = false
|
||||||
|
this.dataList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleOkComment() {
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let url = ''
|
||||||
|
let query = {}
|
||||||
|
if (this.title == this.$t('publishComment')) {
|
||||||
|
url = this.url.add
|
||||||
|
query = {
|
||||||
|
commentContent: this.formInline.commentContent,
|
||||||
|
projectLibraryId: this.$route.query.id
|
||||||
|
}
|
||||||
|
} else if (this.title == this.$t('replyToComments')) {
|
||||||
|
url = this.url.edit
|
||||||
|
query = {
|
||||||
|
replyContent: this.formInline.replyContent,
|
||||||
|
projectCommentId: this.formInline.projectCommentId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.confirmLoading = true
|
||||||
|
postAction(url, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visibleComment = false
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$message.success(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancelComment() {
|
||||||
|
this.visibleComment = false
|
||||||
|
},
|
||||||
|
messageClick(row) {
|
||||||
|
this.formInline = {}
|
||||||
|
this.formInline.projectCommentId = row.id
|
||||||
|
this.title = this.$t('replyToComments')
|
||||||
|
this.visibleComment = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.comment-box {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
height: calc(100% - 140px);
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 0 24px 24px 24px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-box-top-box {
|
||||||
|
padding: 30px 24px 24px 24px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid #F1F2F4;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-box {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 8px;
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
.img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-text {
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
margin-left: 40px;
|
||||||
|
|
||||||
|
.box-text-name {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #040B29;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-text-time {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #6F7385;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-text-text {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #040B29;
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 22px;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #040B29;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-content {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-content-inside {
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-icon {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inside-box {
|
||||||
|
background: #F6F7FA;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-left: 40px;
|
||||||
|
width: calc(100% - 40px);
|
||||||
|
padding: 18px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-box {
|
||||||
|
text-align: right;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
/*align-items: center;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 74px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemModel {
|
||||||
|
width: calc(100% - 64px);
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-box-text {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
:title="$t('fixedPlate')"
|
||||||
|
:width="500"
|
||||||
|
:visible="visible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
:maskClosable="false"
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
>
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('versionName')">{{$t('versionName')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="'versionsName'">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model="formInline.versionsName"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('versionName')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'fixedPlateForm',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
formInline: {},
|
||||||
|
loading: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
url: {
|
||||||
|
add: '/project/projectHistoryVersionsEO/add'
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
versionsName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('publishComment') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
this.visible = true
|
||||||
|
this.formInline = {}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let query = {
|
||||||
|
projectLibraryId: this.$route.query.id,
|
||||||
|
...this.formInline
|
||||||
|
}
|
||||||
|
this.confirmLoading = true
|
||||||
|
postAction(this.url.add, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visible = false
|
||||||
|
this.confirmLoading = false
|
||||||
|
} else {
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$message.success(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
/*align-items: center;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 74px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemModel {
|
||||||
|
width: calc(100% - 64px);
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -20,17 +20,6 @@
|
|||||||
<a @click="seeClick(record)">{{$t('See')}}</a>
|
<a @click="seeClick(record)">{{$t('See')}}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="page" v-if="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"
|
|
||||||
@change="onChange"
|
|
||||||
@showSizeChange="SizeChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -38,16 +27,15 @@
|
|||||||
import { getAction, postAction, } from '@/api/manage'
|
import { getAction, postAction, } from '@/api/manage'
|
||||||
export default {
|
export default {
|
||||||
name: 'historicalVersionList',
|
name: 'historicalVersionList',
|
||||||
props:['url'],
|
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
visible:false,
|
visible:false,
|
||||||
confirmLoading:false,
|
confirmLoading:false,
|
||||||
dataSource:[],
|
dataSource:[],
|
||||||
loading:false,
|
loading:false,
|
||||||
pageNo: 1,
|
url:{
|
||||||
pageSize: 10,
|
list:'project/projectHistoryVersionsEO/list',
|
||||||
total: 0,
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('versionName'),
|
title: this.$t('versionName'),
|
||||||
@@ -76,7 +64,6 @@
|
|||||||
methods:{
|
methods:{
|
||||||
getList(){
|
getList(){
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.pageNo = 1
|
|
||||||
this.historicalList()
|
this.historicalList()
|
||||||
},
|
},
|
||||||
handleOk() {
|
handleOk() {
|
||||||
@@ -85,26 +72,14 @@
|
|||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
onChange(page, pageSize) {
|
|
||||||
this.pageNo = page
|
|
||||||
this.historicalList()
|
|
||||||
},
|
|
||||||
SizeChange(page, pageSize) {
|
|
||||||
this.pageNo = 1
|
|
||||||
this.pageSize = pageSize
|
|
||||||
this.historicalList()
|
|
||||||
},
|
|
||||||
historicalList(){
|
historicalList(){
|
||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNo,
|
projectLibraryId: this.$route.query.id
|
||||||
pageSize: this.pageSize,
|
|
||||||
documentId: this.$route.query.id
|
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.historicalVersionUrl, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataSource = res.result.records
|
this.dataSource = res.result || []
|
||||||
this.total = res.result.total
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
} else {
|
} else {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-drawer
|
<a-drawer
|
||||||
:title="'编辑'"
|
:title="$t('edit')"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
:width="900"
|
:width="900"
|
||||||
placement="right"
|
placement="right"
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<a-icon type="file-search"/>
|
<a-icon type="file-search"/>
|
||||||
{{ $t('alteration') }}
|
{{ $t('alteration') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text">
|
<div class="operator-text" @click="fixedPlateClick">
|
||||||
<a-icon type="bulb"/>
|
<a-icon type="bulb"/>
|
||||||
{{ $t('fixedPlate') }}
|
{{ $t('fixedPlate') }}
|
||||||
</div>
|
</div>
|
||||||
@@ -184,6 +184,7 @@
|
|||||||
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
|
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
|
||||||
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
|
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
|
||||||
<transferList :url="url" @transferListForm="addModelList" ref="transferListRef"/>
|
<transferList :url="url" @transferListForm="addModelList" ref="transferListRef"/>
|
||||||
|
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
|
||||||
<a-modal
|
<a-modal
|
||||||
:title="$t('ListConfirmationDeadline')"
|
:title="$t('ListConfirmationDeadline')"
|
||||||
:width="500"
|
:width="500"
|
||||||
@@ -258,6 +259,7 @@
|
|||||||
import listEditModel from './listEditModel'
|
import listEditModel from './listEditModel'
|
||||||
import batSetting from './batSetting'
|
import batSetting from './batSetting'
|
||||||
import transferList from './transferList'
|
import transferList from './transferList'
|
||||||
|
import fixedPlate from './fixedPlateForm'
|
||||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
@@ -272,7 +274,8 @@
|
|||||||
listEditModel,
|
listEditModel,
|
||||||
batSetting,
|
batSetting,
|
||||||
transferList,
|
transferList,
|
||||||
globalAdvancedQuery
|
globalAdvancedQuery,
|
||||||
|
fixedPlate
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -635,6 +638,23 @@
|
|||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
fixedPlateClick() {
|
||||||
|
if (this.dataSource && this.dataSource.length > 0) {
|
||||||
|
let isTrue
|
||||||
|
for (let i = 0; i < this.dataSource.length; i++) {
|
||||||
|
if (this.dataSource[i].taskAffirmStatus == 'accepted' && this.dataSource[i].inventoryAffirmStatus == 'accepted') {
|
||||||
|
isTrue = true
|
||||||
|
} else {
|
||||||
|
isTrue = false
|
||||||
|
this.$message.warning(this.$t('theReceived'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isTrue) {
|
||||||
|
this.$refs.fixedPlateRef.getData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.addModelRef.addModel()
|
this.$refs.addModelRef.addModel()
|
||||||
},
|
},
|
||||||
@@ -689,6 +709,8 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
|
this.$refs.globalAdvancedQueryRef.resetLine()
|
||||||
|
this.$refs.globalAdvancedQueryRef.emitCallback()
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
@@ -735,8 +757,8 @@
|
|||||||
for (let i = 0; i < this.dataSource.length; i++) {
|
for (let i = 0; i < this.dataSource.length; i++) {
|
||||||
for (let j = 0; j < selectedRowKeys.length; j++) {
|
for (let j = 0; j < selectedRowKeys.length; j++) {
|
||||||
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
||||||
if ((this.dataSource.inventoryAffirmStatus == 'Not started' || this.dataSource.inventoryAffirmStatus == 'rejected') &&
|
if ((this.dataSource[i].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'rejected') &&
|
||||||
this.dataSource.homologationEngineerId && this.dataSource.regulationOwnerId) {
|
this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId) {
|
||||||
isTrue = true
|
isTrue = true
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('dataConfirmation'))
|
this.$message.warning(this.$t('dataConfirmation'))
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('creater'),
|
title: this.$t('creater'),
|
||||||
dataIndex: 'createByCn',
|
dataIndex: 'createBy',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user