Commit 1a28f043 authored by wdy's avatar wdy

Merge branch 'dev' into 'master'

dev - master 11

See merge request !326
parents b66748d5 06c02c5c
package com.ruoyi.domain;
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.experimental.Accessors;
@ApiModel(value = "StandardInspectionItemRelation", description = "标准-检验项关系")
@TableName(value ="t_standard_inspection_item_relation", autoResultMap = true)
@Accessors(chain = true)
@Data
public class StandardInspectionItemRelation {
@ApiModelProperty("主键")
@TableId(type = IdType.ASSIGN_ID)
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
/**
* 标准id
*/
@ApiModelProperty("标准id")
private Long standardId;
/**
* 检验项id
*/
@ApiModelProperty("检验项id")
private Long dictCode;
}
package com.ruoyi.domain.vo;
import lombok.Data;
@Data
public class DictDataVO {
private Long dictCode;
}
package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.StandardInspectionItemRelation;
import com.ruoyi.domain.vo.DictDataVO;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface StandardInspectionItemRelationMapper extends BaseMapper<StandardInspectionItemRelation> {
List<DictDataVO> getListByStandardId(Long standardId);
/**
* 根据标准id获取列表
* @param standardId
* @return
*/
List<StandardInspectionItemRelation> getListByStandard(Long standardId);
}
package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.StandardInspectionItemRelation;
import com.ruoyi.domain.vo.DictDataVO;
import java.util.List;
public interface StandardInspectionItemRelationService extends IService<StandardInspectionItemRelation> {
List<DictDataVO> getByStandardId(Long standardId);
}
......@@ -5,6 +5,7 @@ import com.ruoyi.domain.Standard;
import com.ruoyi.web.request.StandardEditRequest;
import com.ruoyi.web.request.StandardGetInfoRequest;
import com.ruoyi.web.request.StandardListRequest;
import com.ruoyi.web.response.StandardResponse;
import java.util.List;
......@@ -21,5 +22,5 @@ public interface StandardService extends IService<Standard> {
void editStandard(StandardEditRequest request);
Standard getInfo(StandardGetInfoRequest request);
StandardResponse getInfo(StandardGetInfoRequest request);
}
......@@ -3,6 +3,7 @@ package com.ruoyi.service;
import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.domain.TestUseCase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.vo.UseCaseUrlVO;
import com.ruoyi.web.request.TestUseCaseByScenarioRequest;
import com.ruoyi.web.request.TestUseCaseIdListRequest;
import com.ruoyi.web.request.TestUserCaseRequest;
......@@ -64,4 +65,12 @@ public interface TestUseCaseService extends IService<TestUseCase> {
* @throws IOException
*/
UseCaseResponse getUseCaseMsg(String request) throws IOException;
/**
* 科恩根据章节查询用例列表
* @param request
* @return
* @throws IOException
*/
List<UseCaseUrlVO> getUseCaseByChapter(String request) throws IOException;
}
......@@ -359,6 +359,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
PdfPTable pictureTable = new PdfPTable(new float[]{25, 25, 25, 25});
pictureTable.setWidthPercentage(90);
pictureTable.setSpacingBefore(10);
if (samplePhoto != null) {
List<String> pictureList = Arrays.stream(samplePhoto.split(",")).filter(StringUtils::isNotBlank).collect(Collectors.toList());
int result = pictureList.size();
while (result % 4 != 0) {
......@@ -382,6 +383,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
}
document.addContent(pictureTable);
}
}
/**
* 车型试验原始记录 - 1.检验依据
......
package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.StandardInspectionItemRelation;
import com.ruoyi.domain.vo.DictDataVO;
import com.ruoyi.mapper.StandardInspectionItemRelationMapper;
import com.ruoyi.service.StandardInspectionItemRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
@Service
public class StandardInspectionItemRelationServiceImpl extends ServiceImpl<StandardInspectionItemRelationMapper, StandardInspectionItemRelation> implements StandardInspectionItemRelationService {
@Autowired
private StandardInspectionItemRelationMapper standardInspectionItemRelationMapper;
@Override
public List<DictDataVO> getByStandardId(Long standardId) {
return standardInspectionItemRelationMapper.getListByStandardId(standardId);
}
}
......@@ -3,14 +3,20 @@ package com.ruoyi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.Standard;
import com.ruoyi.domain.StandardInspectionItemRelation;
import com.ruoyi.domain.vo.DictDataVO;
import com.ruoyi.mapper.StandardInspectionItemRelationMapper;
import com.ruoyi.mapper.StandardMapper;
import com.ruoyi.service.StandardInspectionItemRelationService;
import com.ruoyi.service.StandardService;
import com.ruoyi.web.request.StandardEditRequest;
import com.ruoyi.web.request.StandardGetInfoRequest;
import com.ruoyi.web.request.StandardListRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.response.StandardResponse;
import java.util.ArrayList;
import java.util.List;
@Service
......@@ -22,6 +28,12 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
@Autowired
private StandardService standardService;
@Autowired
private StandardInspectionItemRelationMapper standardInspectionItemRelationMapper;
@Autowired
private StandardInspectionItemRelationService standardInspectionItemRelationService;
/**
* 分页查询
* @param
......@@ -47,11 +59,36 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
Standard standard = new Standard();
BeanUtils.copyBeanProp(standard, request);
List<StandardInspectionItemRelation> list = standardInspectionItemRelationMapper.getListByStandard(request.getId());
if (list != null && list.size() != 0) {
standardInspectionItemRelationService.removeBatchByIds(list);
}
List<DictDataVO> relations = request.getDictList();
List<StandardInspectionItemRelation> relationList = new ArrayList<>();
if (relations != null && relations.size() != 0) {
for (DictDataVO vo : relations) {
StandardInspectionItemRelation relation = new StandardInspectionItemRelation();
relation.setStandardId(request.getId());
relation.setDictCode(vo.getDictCode());
relationList.add(relation);
}
standardInspectionItemRelationService.saveBatch(relationList);
}
standardService.updateById(standard);
}
@Override
public Standard getInfo(StandardGetInfoRequest request) {
return standardMapper.selectById(request.getId());
public StandardResponse getInfo(StandardGetInfoRequest request) {
StandardResponse response = new StandardResponse();
Standard standard = standardMapper.selectById(request.getId());
List<DictDataVO> list = standardInspectionItemRelationMapper.getListByStandardId(request.getId());
BeanUtils.copyBeanProp(response, standard);
response.setDictList(list);
return response;
}
}
......@@ -2,11 +2,13 @@ package com.ruoyi.service.impl;
import com.ruoyi.common.DataStatisticsUtils;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.*;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO;
import com.ruoyi.mapper.*;
import com.ruoyi.service.*;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.response.CarReviewTaskViewResponse;
import com.ruoyi.web.response.UserNameResponse;
import org.springframework.beans.factory.InitializingBean;
......@@ -79,6 +81,9 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Autowired
private AutomobileEnterpriseMapper automobileEnterpriseMapper;
@Autowired
private ISysUserService sysUserService;
// PENDING状态下
// 1.standard字段查询当前最新问卷
// 2.查询场景变更任务
......@@ -145,12 +150,17 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
// 4. 修改任务状态为 SIGNED 待签字
carReviewTask.setTaskStatus(CarReviewTask.TASK_STATUS_SIGNED);
// 7. 设置问卷结果
// 5. 设置问卷结果
if (reviewDetailsResultMapper.findNotPass(carReviewTask.getId()) > 0) {
carReviewTask.setTaskResult("REJECT");
} else {
carReviewTask.setTaskResult("PASS");
}
// 6. 设置签字图片
SysUser sysUser = sysUserService.selectUserById(carReviewTask.getLeaderId());
carReviewTask.setImagesUrl(sysUser.getSignaturePicture());
carReviewTaskMapper.updateById(carReviewTask);
}
}
......
......@@ -202,8 +202,10 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali
}
// 测试通过率
if (response.getTestPassNum() != null) {
BigDecimal num = new BigDecimal(((double) response.getTestPassNum() / response.getUseCaseNum()) * 100);
response.setTestPass(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
}
}
......
......@@ -4,11 +4,13 @@ import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.ModelTestTask;
import com.ruoyi.mapper.ModelTestTaskMapper;
import com.ruoyi.service.StrategyModelTestTask;
import com.ruoyi.service.TestUseCaseService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.response.ModelTestResponse;
import com.ruoyi.web.response.ModelTestUrlResponse;
import lombok.Data;
......@@ -42,6 +44,9 @@ public class StrategyModelTestTaskPending implements StrategyModelTestTask, Init
@Autowired
private TestUseCaseService testUseCaseService;
@Autowired
private ISysUserService sysUserService;
private static String url = "https://10.12.48.78:8090/DescribeProjectTestResult";
@Override
......@@ -78,12 +83,15 @@ public class StrategyModelTestTaskPending implements StrategyModelTestTask, Init
}
// 进行中的任务, 点击返回后, 判断当前用例完成程度, 用例都完成后状态改为待签字
if (sumCount.equals(currentCount.get())) {
SysUser sysUser = sysUserService.selectUserById(modelTestTask.getLeaderId());
modelTestTaskMapper.update(new ModelTestTask(),
new LambdaUpdateWrapper<ModelTestTask>()
.set(ModelTestTask::getTaskEndTime, new Date())
.set(ModelTestTask::getTaskStatus, ModelTestTask.TASK_STATUS_SIGNED)
.set(failedCount.get() > 0, ModelTestTask::getTaskResult, ModelTestTask.TASK_STATUS_REJECT)
.set(failedCount.get().equals(0), ModelTestTask::getTaskResult, ModelTestTask.TASK_STATUS_PASS)
.set(ModelTestTask::getImagesUrl,sysUser.getSignaturePicture())
.eq(ModelTestTask::getId, modelTestTask.getId()));
}
}
......
......@@ -65,7 +65,6 @@ public class StrategyModelTestTaskSigned implements StrategyModelTestTask, Initi
@Override
public void doSubmitTest(ModelTestTask modelTestTask, List<String> imagesUrl) {
SysUser user = SecurityUtils.getLoginUser().getUser();
if (imagesUrl != null && imagesUrl.size() != 0) {
modelTestTaskMapper.update(new ModelTestTask(),
new LambdaUpdateWrapper<ModelTestTask>()
.set(ModelTestTask::getTaskStatus, ModelTestTask.TASK_STATUS_FINISH)
......@@ -81,10 +80,6 @@ public class StrategyModelTestTaskSigned implements StrategyModelTestTask, Initi
Task task = taskList.get(0);
taskStateFacade.doSubmit(task);
}
} else {
throw new ServiceException("请提交签字图片", HttpStatus.ERROR);
}
}
@Override
......
......@@ -2,11 +2,13 @@ package com.ruoyi.service.impl;
import com.ruoyi.common.DataStatisticsUtils;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.domain.*;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO;
import com.ruoyi.mapper.*;
import com.ruoyi.service.*;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.response.SystemReviewTaskViewResponse;
import com.ruoyi.web.response.UserNameResponse;
import org.springframework.beans.factory.InitializingBean;
......@@ -68,6 +70,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Autowired
private AutomobileEnterpriseMapper automobileEnterpriseMapper;
@Autowired
private ISysUserService sysUserService;
@Override
public void doStart(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能开始一个已经开始的任务", HttpStatus.ERROR);
......@@ -114,6 +119,11 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
} else {
systemReviewTask.setTaskResult("PASS");
}
// 6. 设置签字图片
SysUser sysUser = sysUserService.selectUserById(systemReviewTask.getLeaderId());
systemReviewTask.setImagesUrl(sysUser.getSignaturePicture());
systemReviewTaskMapper.updateById(systemReviewTask);
}
}
......
......@@ -108,7 +108,7 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
MediaType mediaType = MediaType.parse("application/json");
// 创建请求体
RequestBody body = RequestBody.create(mediaType, "{\"query\":\"query useCases($offset:OffsetConnectionInput$orderBy:OrderByInput$filter:Map$search:String){useCases(offset:$offset orderBy:$orderBy filterFields:$filter search:$search){nodes{id displayID class name description remediation requirements riskLevel method{name}scenario{name}}totalCount}}\",\"variables\":"+ request +"}");
RequestBody body = RequestBody.create(mediaType, "{\"query\":\"query useCases($offset:OffsetConnectionInput$orderBy:OrderByInput$filter:Map$search:String$searchFields:Map){useCases(offset:$offset orderBy:$orderBy filterFields:$filter search:$search searchFields:$searchFields){nodes{id displayID class name description remediation requirements riskLevel method{name}scenario{name}}totalCount}}\",\"variables\":"+ request +"}");
Request requestKE = new Request.Builder()
.url("http://10.12.48.80:8089/api/query")
......@@ -185,6 +185,45 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
return caseResponse;
}
/**
* 科恩根据章节查询用例列表
* @param request
* @return
* @throws IOException
*/
@Override
public List<UseCaseUrlVO> getUseCaseByChapter(String request) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"query\":\"query regulationItemDetail($regulationItemID:ID!){node(id:$regulationItemID){...on RegulationItem{id serialNumber testMethod requirements useCases{id displayID name description scenario{name}method{name}}}}}\",\"variables\":"+request+"}");
Request requestKE = new Request.Builder()
.url("http://10.12.48.80:8089/api/query")
.method("POST", body)
.addHeader("Content-Type", "application/json")
// TODO 连接
// .addHeader("Host", "10.12.48.80:8089")
// .addHeader("Origin", "http://10.12.48.80:8089")
// .addHeader("Referer", "http://10.12.48.80:8089/api/graphql/playground")
// .addHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36")
.build();
Response response = client.newCall(requestKE).execute();
String string = response.body().string();
JSONObject jsonObject = JSONObject.parseObject(string);
// 获取测试用例
List<UseCaseUrlVO> list = new ArrayList<>();
if (jsonObject.getJSONObject("data").getJSONObject("node") != null) {
list = jsonObject.getJSONObject("data").getJSONObject("node").getList("useCases", UseCaseUrlVO.class);
}
return list;
}
}
......
......@@ -7,10 +7,11 @@ import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.Standard;
import com.ruoyi.domain.vo.DictDataVO;
import com.ruoyi.service.StandardInspectionItemRelationService;
import com.ruoyi.service.StandardService;
import com.ruoyi.web.request.*;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import com.ruoyi.web.response.TaskGetInfoResponse;
import com.ruoyi.web.response.StandardResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag;
......@@ -31,6 +32,9 @@ public class StandardController extends BaseController {
@Autowired
private StandardService standardService;
@Autowired
private StandardInspectionItemRelationService standardInspectionItemRelationService;
/**
* 分页查询
* @return
......@@ -58,9 +62,18 @@ public class StandardController extends BaseController {
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getById")
public R<Standard> getInfo(@Validated @RequestBody StandardGetInfoRequest request) {
public R<StandardResponse> getInfo(@Validated @RequestBody StandardGetInfoRequest request) {
StandardResponse response = standardService.getInfo(request);
return R.ok(response);
}
@ApiOperation("根据标准查询检验项")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getByStandardId")
public TableDataInfo<DictDataVO> getByStandardId(@Validated @RequestBody StandardGetInfoRequest request) {
Standard standard = standardService.getInfo(request);
return R.ok(standard);
return getDataTable(standardInspectionItemRelationService.getByStandardId(request.getId()));
}
}
......@@ -3,6 +3,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.TestUseCase;
import com.ruoyi.domain.vo.UseCaseUrlVO;
import com.ruoyi.service.TestUseCaseService;
import com.ruoyi.web.request.TestUseCaseByScenarioRequest;
import com.ruoyi.web.request.TestUseCaseIdListRequest;
......@@ -94,4 +95,21 @@ public class TestUserCaseController extends BaseController{
}
/**
* 科恩根据章节查询用例列表
* @param request
* @return
* @throws IOException
*/
@ApiOperation("科恩根据章节查询用例列表")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getUseCaseByChapter", produces="application/json;charset=UTF-8")
public TableDataInfo<UseCaseUrlVO> getUseCaseByChapter(@Validated @RequestBody String request) throws IOException {
List<UseCaseUrlVO> list = testUseCaseService.getUseCaseByChapter(request);
return getDataTable(list);
}
}
package com.ruoyi.web.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.domain.StandardInspectionItemRelation;
import com.ruoyi.domain.vo.DictDataVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
@ApiModel(value = "StandardEditRequest", description = "编辑标准")
@Data
......@@ -36,4 +38,7 @@ public class StandardEditRequest {
@ApiModelProperty("实施日期")
private Date implementationDate;
@ApiModelProperty("检验项id")
List<DictDataVO> dictList;
}
......@@ -9,6 +9,17 @@ import lombok.Data;
@Data
public class StandardListRequest extends PageDomain {
@ApiModelProperty("关键字")
private String keyWord;
@ApiModelProperty("标准号")
private String standardNo;
@ApiModelProperty("标准名称")
private String name;
@ApiModelProperty("标准分类")
private String standardType;
@ApiModelProperty("标准状态")
private String standardStatus;
}
package com.ruoyi.web.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.domain.vo.DictDataVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
@ApiModel(value = "StandardResponse", description = "标准库详情")
@Data
public class StandardResponse {
@ApiModelProperty("主键")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
@ApiModelProperty("标准名称")
private String name;
@ApiModelProperty("标准号")
private String standardNo;
@ApiModelProperty("文件路径")
private String file;
@ApiModelProperty("标准分类")
private String standardType;
@ApiModelProperty("标准状态")
private String standardStatus;
@ApiModelProperty("发布日期")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date releaseDate;
@ApiModelProperty("实施日期")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date implementationDate;
@ApiModelProperty("检验项")
private List<DictDataVO> dictList;
}
<?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.ruoyi.mapper.StandardInspectionItemRelationMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.StandardInspectionItemRelation">
<result property="id" column="id" jdbcType="BIGINT"/>
<result property="standardId" column="standard_id" jdbcType="BIGINT"/>
<result property="dictCode" column="dict_code" jdbcType="BIGINT"/>
</resultMap>
<select id="getListByStandardId" resultType="com.ruoyi.domain.vo.DictDataVO">
SELECT dict_code FROM t_standard_inspection_item_relation
WHERE standard_id = #{standardId}
</select>
<select id="getListByStandard" resultType="com.ruoyi.domain.StandardInspectionItemRelation">
SELECT id, standard_id, dict_code FROM t_standard_inspection_item_relation
WHERE standard_id = #{standardId}
</select>
</mapper>
......@@ -19,8 +19,17 @@
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date
FROM t_standard
<where>
<if test="keyWord != null and keyWord != ''">
name like concat('%',#{keyWord},'%') OR standard_no like concat('%',#{keyWord},'%')
<if test="standardType != null and standardType != ''">
standard_type = #{standardType}
</if>
<if test="standardNo != null and standardNo != ''">
and standard_no like concat('%', #{standardNo}, '%')
</if>
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
<if test="standardStatus != null and standardStatus != ''">
and standard_status = #{standardStatus}
</if>
</where>
</select>
......
......@@ -28,12 +28,13 @@
<select id="selectStandardCategoryStatistics" resultType="com.ruoyi.domain.vo.StandardCategoryStatisticsVO">
SELECT
count( id ) AS value,
standard_type AS name
count( ta.id ) AS value,
st.standard_type AS name
FROM
t_standard
t_task ta
LEFT JOIN t_standard st ON ta.standard_id = st.id
GROUP BY
standard_type
st.standard_type
</select>
<select id="selectConfidentialityLevelStatistics" resultType="com.ruoyi.domain.vo.ConfidentialityLevelProportionVO">
......
......@@ -65,6 +65,7 @@ public class SysProfileController extends BaseController
currentUser.setEmail(user.getEmail());
currentUser.setPhonenumber(user.getPhonenumber());
currentUser.setSex(user.getSex());
currentUser.setSignaturePicture(user.getSignaturePicture());
if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser))
{
return error("修改用户'" + loginUser.getUsername() + "'失败,手机号码已存在");
......
......@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.service.*;
import com.ruoyi.web.request.UserByRoleRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -36,10 +37,6 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
/**
* 用户信息
......
......@@ -169,6 +169,10 @@
<artifactId>itext-asian</artifactId>
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>
</project>
......@@ -3,6 +3,7 @@ package com.ruoyi.common.core.domain.entity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.*;
import com.baomidou.mybatisplus.annotation.TableField;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
......@@ -89,6 +90,9 @@ public class SysUser extends BaseEntity
/** 角色ID */
private Long roleId;
/** 用户签字图片 */
private String signaturePicture;
public SysUser()
{
......@@ -297,6 +301,14 @@ public class SysUser extends BaseEntity
this.roleId = roleId;
}
public String getSignaturePicture() {
return signaturePicture;
}
public void setSignaturePicture(String signaturePicture) {
this.signaturePicture = signaturePicture;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......@@ -319,6 +331,7 @@ public class SysUser extends BaseEntity
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("dept", getDept())
.append("signaturePicture", getSignaturePicture())
.toString();
}
}
......@@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="signaturePicture" column="signature_picture" />
<association property="dept" javaType="SysDept" resultMap="deptResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
</resultMap>
......@@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.signature_picture,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u
......@@ -168,6 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="signaturePicture != null and signaturePicture != ''">signature_picture,</if>
create_time
)values(
<if test="userId != null and userId != ''">#{userId},</if>
......@@ -182,6 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="signaturePicture != null and signaturePicture != ''">#{signaturePicture},</if>
sysdate()
)
</insert>
......@@ -202,6 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="loginDate != null">login_date = #{loginDate},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="signaturePicture != null">signature_picture = #{signaturePicture},</if>
update_time = sysdate()
</set>
where user_id = #{userId}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment