Commit 02888ff9 authored by 盖献康's avatar 盖献康

Merge branch 'dev' of...

Merge branch 'dev' of ssh://gitlab.91isoft.com:10022/wangfei/vehicle-quality-review into gaixiankang
parents 3ad06b1d 6e731c28
...@@ -18,7 +18,7 @@ public interface TaskService extends IService<Task> { ...@@ -18,7 +18,7 @@ public interface TaskService extends IService<Task> {
*/ */
List<Task> findList(TaskListRequest request); List<Task> findList(TaskListRequest request);
void createTask(TaskCreateRequest request,Long userId); void createTask(TaskCreateRequest request);
/** /**
* 查询进行中的任务 * 查询进行中的任务
......
...@@ -92,7 +92,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -92,7 +92,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
} }
@Override @Override
public void createTask(TaskCreateRequest request,Long userId) { public void createTask(TaskCreateRequest request) {
// 构建任务创建者 // 构建任务创建者
LoginUser loginUser = SecurityUtils.getLoginUser(); LoginUser loginUser = SecurityUtils.getLoginUser();
...@@ -167,9 +167,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -167,9 +167,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
taskStateFacade.doCreate(task, request.getTaskList()); taskStateFacade.doCreate(task, request.getTaskList());
TaskGetInfoResponse temporaryStorageTask = taskService.getByUserId(userId); TaskGetInfoResponse temporaryStorageTask = taskService.getByUserId(loginUser.getUserId());
taskMapper.deleteById(temporaryStorageTask.getId()); if(temporaryStorageTask != null) {
taskMapper.deleteById(temporaryStorageTask.getId());
}
} }
@Override @Override
...@@ -219,24 +220,26 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -219,24 +220,26 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
BeanUtils.copyBeanProp(task, request); BeanUtils.copyBeanProp(task, request);
Task oldTask = taskMapper.selectById(request.getId()); Task oldTask = taskMapper.selectById(request.getId());
if (task.getTaskStatus() == Task.TASK_STATUS_NEW) {
if(request.getTaskList().contains(Task.SUB_TASK_GRFIS) && oldTask.getCarReviewTaskId() == null) { if(request.getTaskList().contains(Task.SUB_TASK_GRFIS) && oldTask.getCarReviewTaskId() == null) {
// 保存车型审查问卷任务 // 保存车型审查问卷任务
TaskCreateRequest createRequest = new TaskCreateRequest(); TaskCreateRequest createRequest = new TaskCreateRequest();
BeanUtils.copyBeanProp(createRequest, request); BeanUtils.copyBeanProp(createRequest, request);
task.setCarReviewTaskId(saveCarReview(createRequest,initiator,standard,leader)); task.setCarReviewTaskId(saveCarReview(createRequest,initiator,standard,leader));
} }
if ( !request.getTaskList().contains(Task.SUB_TASK_GRFIS) && oldTask.getCarReviewTaskId() != null) { if ( !request.getTaskList().contains(Task.SUB_TASK_GRFIS) && oldTask.getCarReviewTaskId() != null) {
carReviewTaskMapper.deleteById(oldTask.getCarReviewTaskId()); carReviewTaskMapper.deleteById(oldTask.getCarReviewTaskId());
} }
if(request.getTaskList().contains(Task.SUB_TASK_SRAIF) && oldTask.getSystemReviewTaskId() == null) { if(request.getTaskList().contains(Task.SUB_TASK_SRAIF) && oldTask.getSystemReviewTaskId() == null) {
// 保存体系审查任务 // 保存体系审查任务
TaskCreateRequest createRequest = new TaskCreateRequest(); TaskCreateRequest createRequest = new TaskCreateRequest();
BeanUtils.copyBeanProp(createRequest, request); BeanUtils.copyBeanProp(createRequest, request);
task.setSystemReviewTaskId(saveSystemReview(createRequest,initiator,standard,leader)); task.setSystemReviewTaskId(saveSystemReview(createRequest,initiator,standard,leader));
} }
if ( !request.getTaskList().contains(Task.SUB_TASK_SRAIF) && oldTask.getSystemReviewTaskId() != null) { if ( !request.getTaskList().contains(Task.SUB_TASK_SRAIF) && oldTask.getSystemReviewTaskId() != null) {
systemReviewTaskMapper.deleteById(oldTask.getSystemReviewTaskId()); systemReviewTaskMapper.deleteById(oldTask.getSystemReviewTaskId());
}
taskStateFacade.doCreate(task, request.getTaskList());
} }
taskService.updateById(task); taskService.updateById(task);
...@@ -280,31 +283,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -280,31 +283,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
if (sampleRelations.size() != 0 && sampleRelations != null) { if (sampleRelations.size() != 0 && sampleRelations != null) {
// 获取之前的第一个企业名称 // 获取之前的第一个企业名称
TaskSampleRelation taskSampleRelation = sampleRelations.get(0); TaskSampleRelation taskSampleRelation = sampleRelations.get(0);
Sample sample = sampleManagementMapper.selectSampleManagementById(taskSampleRelation.getSampleId()); Sample oldSample = sampleManagementMapper.selectSampleManagementById(taskSampleRelation.getSampleId());
// 获取编辑任务后的第一个企业名称 // 获取编辑任务后的第一个企业名称
TaskSampleRelation taskSampleRelation1 = relations.get(0); TaskSampleRelation newTaskSampleRelation = relations.get(0);
Sample sample1 = sampleManagementMapper.selectSampleManagementById(taskSampleRelation1.getSampleId()); Sample newSample = sampleManagementMapper.selectSampleManagementById(newTaskSampleRelation.getSampleId());
// 第一个企业名称不相同则修改 // 第一个企业名称不相同则修改
if (!Objects.equals(sample.getManufacturingEnterprise(), sample1.getManufacturingEnterprise())){ if (!Objects.equals(oldSample.getManufacturingEnterprise(), newSample.getManufacturingEnterprise())){
Task task1 = taskMapper.selectById(request.getId()); // 留档文件
// 体系审查对应的留档文件 List<ReviewEnterpriseArchive> reviewEnterpriseArchiveList = reviewEnterpriseArchiveMapper.findList(request.getId());
List<ReviewEnterpriseArchive> reviewEnterpriseArchiveList = reviewEnterpriseArchiveMapper.findList(task1.getSystemReviewTaskId());
for (ReviewEnterpriseArchive reviewEnterpriseArchive : reviewEnterpriseArchiveList) { for (ReviewEnterpriseArchive reviewEnterpriseArchive : reviewEnterpriseArchiveList) {
reviewEnterpriseArchive.setEnterpriseName(sample1.getManufacturingEnterprise()); reviewEnterpriseArchive.setEnterpriseName(newSample.getManufacturingEnterprise());
} }
reviewEnterpriseArchiveService.updateBatchById(reviewEnterpriseArchiveList); reviewEnterpriseArchiveService.updateBatchById(reviewEnterpriseArchiveList);
// 车辆对应的留档文件
List<ReviewEnterpriseArchive> reviewEnterpriseArchiveList1 = reviewEnterpriseArchiveMapper.findList(task1.getCarReviewTaskId());
for (ReviewEnterpriseArchive reviewEnterpriseArchive1 : reviewEnterpriseArchiveList1) {
reviewEnterpriseArchive1.setEnterpriseName(sample1.getManufacturingEnterprise());
}
reviewEnterpriseArchiveService.updateBatchById(reviewEnterpriseArchiveList1);
} }
} }
} }
......
...@@ -58,7 +58,7 @@ public class TaskController extends BaseController { ...@@ -58,7 +58,7 @@ public class TaskController extends BaseController {
@Log(title = "总任务", businessType = BusinessType.INSERT) @Log(title = "总任务", businessType = BusinessType.INSERT)
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/add")
public R<String> createTask(@Validated @RequestBody TaskCreateRequest request) { public R<String> createTask(@Validated @RequestBody TaskCreateRequest request) {
taskService.createTask(request,getUserId()); taskService.createTask(request);
return R.ok(); return R.ok();
} }
......
...@@ -27,6 +27,9 @@ public class TaskFindResponse { ...@@ -27,6 +27,9 @@ public class TaskFindResponse {
@ApiModelProperty("标准名称(检验依据)") @ApiModelProperty("标准名称(检验依据)")
private String name; private String name;
@ApiModelProperty("标准号")
private String standardNo;
@ApiModelProperty("任务编号") @ApiModelProperty("任务编号")
private String taskNo; private String taskNo;
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<result property="leader" column="leader" jdbcType="VARCHAR"/> <result property="leader" column="leader" jdbcType="VARCHAR"/>
<result property="reviewStatus" column="review_status" jdbcType="VARCHAR"/> <result property="reviewStatus" column="review_status" jdbcType="VARCHAR"/>
<result property="carReviewStatus" column="car_review_status" jdbcType="VARCHAR"/> <result property="carReviewStatus" column="car_review_status" jdbcType="VARCHAR"/>
<result property="standardNo" column="standard_no" jdbcType="BIGINT"/>
</resultMap> </resultMap>
<select id="findList" parameterType="com.ruoyi.web.request.TaskListRequest" resultMap="BaseResultMap"> <select id="findList" parameterType="com.ruoyi.web.request.TaskListRequest" resultMap="BaseResultMap">
...@@ -87,6 +88,7 @@ ...@@ -87,6 +88,7 @@
t.leader_id,t.leader, t.leader_id,t.leader,
t.task_begin_time, t.task_begin_time,
t.product_model, t.product_model,
t.standard_no,
srt.task_begin_time system_task_begin_time, srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time, srt.task_end_time system_task_end_time,
srt.task_status review_status, srt.task_status review_status,
...@@ -167,6 +169,7 @@ ...@@ -167,6 +169,7 @@
t.leader_id,t.leader, t.leader_id,t.leader,
t.task_begin_time, t.task_begin_time,
t.task_end_time, t.task_end_time,
t.standard_no,
srt.task_begin_time system_task_begin_time, srt.task_begin_time system_task_begin_time,
srt.task_end_time system_task_end_time, srt.task_end_time system_task_end_time,
srt.task_status review_status, srt.task_status review_status,
......
...@@ -141,7 +141,7 @@ xss: ...@@ -141,7 +141,7 @@ xss:
# 排除链接(多个用逗号分隔) # 排除链接(多个用逗号分隔)
excludes: /system/notice excludes: /system/notice
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /*
minio: minio:
url: ${MINIO_URL} url: ${MINIO_URL}
......
...@@ -143,7 +143,7 @@ xss: ...@@ -143,7 +143,7 @@ xss:
# 排除链接(多个用逗号分隔) # 排除链接(多个用逗号分隔)
excludes: /system/notice excludes: /system/notice
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /*
minio: minio:
url: http://49.232.167.247:22038 url: http://49.232.167.247:22038
......
...@@ -89,16 +89,16 @@ ...@@ -89,16 +89,16 @@
</appender> </appender>
<!-- 系统模块日志级别控制 --> <!-- 系统模块日志级别控制 -->
<logger name="com.ruoyi" level="info" /> <logger name="com.ruoyi" level="debug" />
<!-- Spring日志级别控制 --> <!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" /> <logger name="org.springframework" level="warn" />
<root level="info"> <root level="debug">
<appender-ref ref="console" /> <appender-ref ref="console" />
</root> </root>
<!--系统操作日志--> <!--系统操作日志-->
<root level="info"> <root level="debug">
<appender-ref ref="file_info" /> <appender-ref ref="file_info" />
<appender-ref ref="file_error" /> <appender-ref ref="file_error" />
<appender-ref ref="console"/> <appender-ref ref="console"/>
...@@ -106,8 +106,9 @@ ...@@ -106,8 +106,9 @@
</root> </root>
<!--系统用户操作日志--> <!--系统用户操作日志-->
<logger name="sys-user" level="info"> <logger name="sys-user" level="debug">
<appender-ref ref="sys-user"/> <appender-ref ref="sys-user"/>
<appender-ref ref="console" />
</logger> </logger>
......
...@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求 // 过滤请求
.authorizeRequests() .authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage").permitAll() .antMatchers("/login", "/register", "/captchaImage", "/prod-api/captchaImage").permitAll()
// 静态资源,可匿名访问 // 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/websocket/**", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/swagger-ui.html", "/websocket/**", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
......
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