parent
981d8d273b
commit
b8feaefe86
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* LuckyFrame 自动化测试平台 SQL脚本从V2.7.2升级至V3.1的生产事故数据迁移
|
||||
* Version 3.1
|
||||
* Author Seagull
|
||||
* Date 2019-08-27
|
||||
|
||||
************ WARNING ************
|
||||
执行此脚本会将V2.7.2中生产事故的相关数据迁移到最新V3.1的表中
|
||||
如果你没有V2.7.2这个版本,不用执行此脚本
|
||||
*/
|
||||
-- ----------------------------
|
||||
-- 质量管理-生产事故登记数据迁移
|
||||
-- ----------------------------
|
||||
insert into qa_accident (accident_id,project_id,accident_status,accident_time,report_time,accident_description,accident_level,accident_analysis,accident_type,accident_consequence,corrective_action,resolution_time,resolutioner,preventive_action,preventiver,preventive_plan_date,preventive_over_date,duration_time,impact_time,accident_file_name,create_by)
|
||||
select id,projectid,accstatus,eventtime,reporttime,accdescription,acclevel,causalanalysis,causaltype,consequenceanalysis,correctiveaction,resolutiontime,resolutioner,preventiveaction,preventiver,preventiveplandate,preventiveaccdate,trouble_duration,impact_time,filename,reporter from luckyframedb.qa_accident qa
|
||||
where 1=1 and NOT EXISTS(select 1 from qa_accident where accident_id = qa.id);
|
||||
|
||||
/*修改NULL字符串为空*/
|
||||
update qa_accident t set t.resolution_time='' where t.resolution_time='NULL';
|
||||
update qa_accident t set t.resolutioner='' where t.resolutioner='NULL';
|
||||
update qa_accident t set t.preventive_plan_date='' where t.preventive_plan_date='NULL';
|
||||
update qa_accident t set t.preventive_over_date='' where t.preventive_over_date='NULL';
|
||||
update qa_accident t set t.preventiver='' where t.preventiver='NULL';
|
||||
update qa_accident t set t.report_time='' where t.report_time='NULL';
|
||||
|
||||
/*不是跟踪处理完成状态的记录,把解决时间跟解决人员修改成NULL*/
|
||||
update qa_accident t set t.resolution_time=null,t.resolutioner=null where t.accident_status!='跟踪处理完成'
|
|
@ -79,12 +79,12 @@ public interface ProjectCaseMapper
|
|||
|
||||
/**
|
||||
* 检查测试用例名称唯一性
|
||||
* @param caseName
|
||||
* @param projectCase
|
||||
* @return
|
||||
* @author Seagull
|
||||
* @date 2019年2月28日
|
||||
* @date 2019年10月8日
|
||||
*/
|
||||
public ProjectCase checkProjectCaseNameUnique(String caseName);
|
||||
public List<ProjectCase> checkProjectCaseNameUnique(ProjectCase projectCase);
|
||||
|
||||
/**
|
||||
* 查询测试用例项目序号
|
||||
|
|
|
@ -212,8 +212,8 @@ public class ProjectCaseServiceImpl implements IProjectCaseService
|
|||
public String checkProjectCaseNameUnique(ProjectCase projectCase)
|
||||
{
|
||||
Long caseId = StringUtils.isNull(projectCase.getCaseId()) ? -1L : projectCase.getCaseId();
|
||||
ProjectCase info = projectCaseMapper.checkProjectCaseNameUnique(projectCase.getCaseName());
|
||||
if (StringUtils.isNotNull(info) && info.getCaseId().longValue() != caseId.longValue())
|
||||
List<ProjectCase> info = projectCaseMapper.checkProjectCaseNameUnique(projectCase);
|
||||
if (info.size()>0 && (info.get(0).getCaseId().longValue() != caseId.longValue() || projectCase.getPriority()==99999999))
|
||||
{
|
||||
return ProjectCaseConstants.PROJECTCASE_NAME_NOT_UNIQUE;
|
||||
}
|
||||
|
|
|
@ -112,9 +112,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select IFNULL(MAX(case_serial_number),0) from project_case where project_id=#{project_id}
|
||||
</select>
|
||||
|
||||
<select id="checkProjectCaseNameUnique" parameterType="String" resultMap="ProjectCaseResult">
|
||||
<select id="checkProjectCaseNameUnique" parameterType="ProjectCase" resultMap="ProjectCaseResult">
|
||||
<include refid="selectProjectCaseVo"/>
|
||||
where pc.case_name=#{case_name}
|
||||
<where>
|
||||
<if test="caseName != null and caseName != '' "> and pc.case_name = #{caseName}</if>
|
||||
<if test="projectId != null and projectId != 0"> and pc.project_id = #{projectId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertProjectCase" parameterType="ProjectCase" useGeneratedKeys="true" keyProperty="caseId">
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
$("#form-projectCase-add").validate({
|
||||
myEditValidate = $("#form-projectCase-add").validate({
|
||||
rules:{
|
||||
projectId:{
|
||||
required:true,
|
||||
|
@ -79,6 +79,9 @@
|
|||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"projectId": function() {
|
||||
return $("#projectId").val();
|
||||
},
|
||||
name: function () {
|
||||
return $.common.trim($("#caseName").val());
|
||||
}
|
||||
|
@ -125,6 +128,8 @@
|
|||
|
||||
/*选择项目初始化模块树*/
|
||||
function initializeModuleTree() {
|
||||
$.validate.resetForm();
|
||||
$.validate.form();
|
||||
var projectId=$("#projectId").val();
|
||||
$.ajax({
|
||||
cache : true,
|
||||
|
|
|
@ -74,9 +74,15 @@
|
|||
data: {
|
||||
"caseId": function() {
|
||||
return $("#caseId").val();
|
||||
},
|
||||
"projectId": function() {
|
||||
return $("#projectId").val();
|
||||
},
|
||||
name: function () {
|
||||
return $.common.trim($("#caseName").val());
|
||||
},
|
||||
priority: function () {
|
||||
return 99999999;
|
||||
}
|
||||
},
|
||||
dataFilter: function (data, type) {
|
||||
|
@ -121,6 +127,8 @@
|
|||
|
||||
/*选择项目初始化模块树*/
|
||||
function initializeModuleTree() {
|
||||
$.validate.resetForm();
|
||||
$.validate.form();
|
||||
var projectId=$("#projectId").val();
|
||||
$.ajax({
|
||||
cache : true,
|
||||
|
|
|
@ -72,6 +72,9 @@
|
|||
data: {
|
||||
"caseId": function() {
|
||||
return $("#caseId").val();
|
||||
},
|
||||
"projectId": function() {
|
||||
return $("#projectId").val();
|
||||
},
|
||||
name: function () {
|
||||
return $.common.trim($("#caseName").val());
|
||||
|
|
Loading…
Reference in New Issue