Commit 88c27c71 authored by 宋源硕's avatar 宋源硕

Merge branch 'songyuanshuo' into 'dev'

1.版本号问题=>当子任务通过之后 会获取当前关联的standard的最新版本为version字段赋值

See merge request !442
parents 369c11da 099c42e0
......@@ -178,4 +178,7 @@ public class CarReviewTask implements Serializable {
@ApiModelProperty("企业名称")
private String enterpriseName;
@ApiModelProperty("版本")
private String version;
}
......@@ -64,4 +64,10 @@ public class Standard {
@ApiModelProperty("展示状态")
private Long status;
@ApiModelProperty("原始版本")
private String originalVersion;
@ApiModelProperty("最新版本")
private String currentVersion;
}
......@@ -182,4 +182,7 @@ public class SystemReviewTask {
@ApiModelProperty("企业名称")
private String enterpriseName;
@ApiModelProperty("版本")
private String version;
}
......@@ -26,4 +26,6 @@ public interface StandardMapper extends BaseMapper<Standard> {
* @return
*/
List<Standard> findStandardList(StandardListRequest request);
Standard getById(@Param("standardId") Long standardId);
}
......@@ -83,6 +83,8 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Autowired
private ISysUserService sysUserService;
@Autowired
private StandardMapper standardMapper;
// PENDING状态下
// 1.standard字段查询当前最新问卷
......@@ -147,6 +149,11 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
setDetailsResult(standardTree, results,carReviewTask);
carReviewTask.setStandard(standardTree);
//问卷全部完成,那么设置任务的版本
Long standardId = carReviewTask.getStandardId();
Standard standard = standardMapper.getById(standardId);
carReviewTask.setVersion(standard.getCurrentVersion());
carReviewTaskMapper.updateById(carReviewTask);
// 4. 修改任务状态为 SIGNED 待签字
carReviewTask.setTaskStatus(CarReviewTask.TASK_STATUS_SIGNED);
......
......@@ -73,6 +73,9 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Autowired
private ISysUserService sysUserService;
@Autowired
private StandardMapper standardMapper;
@Override
public void doStart(SystemReviewTask systemReviewTask) {
throw new ServiceException("不能开始一个已经开始的任务", HttpStatus.ERROR);
......@@ -110,6 +113,11 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
systemReviewTask.setStandard(standardTree);
//问卷全部完成,那么设置任务的版本
Long standardId = systemReviewTask.getStandardId();
Standard standard = standardMapper.getById(standardId);
systemReviewTask.setVersion(standard.getCurrentVersion());
systemReviewTaskMapper.updateById(systemReviewTask);
// 4. 修改任务状态为 SIGNED 待签字
systemReviewTask.setTaskStatus(SystemReviewTask.STATUS_SIGNED);
......
package com.ruoyi.web;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
......
......@@ -62,4 +62,9 @@
</if>
</where>
</select>
<select id="getById" resultType="com.ruoyi.domain.Standard">
select *
from t_standard
where id = #{standardId}
</select>
</mapper>
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