bug修改

This commit is contained in:
tqzhang 2024-03-15 15:21:31 +08:00
parent c403f86bf9
commit 834a01b946
4 changed files with 26 additions and 31 deletions

View File

@ -496,13 +496,11 @@ public class New_SubCheckManageServiceImpl implements New_SubCheckManageService
}
checkPersonBean.setPersonFile(allBean);
//添加区分新人员与旧人员的功能
if (isNewPerson && ("0".equals(checkPersonBean.getProcessStatus()) || "3".equals(checkPersonBean.getProcessStatus()))) {
if (("0".equals(checkPersonBean.getProcessStatus()) || "3".equals(checkPersonBean.getProcessStatus()))) {
checkPersonBean.setPersonIndex("new");
isNewPerson = false;
} else {
if (isOldPerson && (!"0".equals(checkPersonBean.getProcessStatus()) && !"3".equals(checkPersonBean.getProcessStatus()))) {
if ((!"0".equals(checkPersonBean.getProcessStatus()) && !"3".equals(checkPersonBean.getProcessStatus()))) {
checkPersonBean.setPersonIndex("old");
isOldPerson = false;
}
}
}
@ -1278,6 +1276,8 @@ public class New_SubCheckManageServiceImpl implements New_SubCheckManageService
//写一个SQL 查询出下一级别审核人
AmProcessType amProcessType = checkManageDao.getFixeNextAuditId(o);
if (amProcessType == null || "null".equals(amProcessType.getPhone())) {
o.setIfFinal("1");
} else {
o.setNextAuditId(Objects.requireNonNull(amProcessType).getPhone());
@ -1314,8 +1314,8 @@ public class New_SubCheckManageServiceImpl implements New_SubCheckManageService
o.setAuditProcessId(id);
checkManageDao.updateCheckStatus(o);
//人员和工器具会有多个数据删掉无用数据
checkManageDao.updateCheckDataActive(o);
//如果是通过 1 改为 2, 0不改终审也不改
// checkManageDao.updateCheckDataActive(o);
//如果是通过 1 改为 2, 0不改终审也不改
if ("1".equals(o.getIfFinal())) {
o.setNextAuditId("-1");
} else if ("1".equals(o.getAuditResult())) {
@ -1331,8 +1331,5 @@ public class New_SubCheckManageServiceImpl implements New_SubCheckManageService
} else if ("1".equals((o.getIfFinal()))) {//终审
o.setAuditState("2");
}
}
}

View File

@ -12,7 +12,7 @@
<insert id="insertCheckMsg">
insert into message_table(name_id,message_theme,create_time,status,dist_info,audit_id,project_id)
values(#{id},#{msg},now(),"1",#{distInfo},#{msgId},#{proId})
values(#{id},#{msg},now(),'1',#{distInfo},#{msgId},#{proId})
</insert>
<update id="updateCheckData">
@ -258,21 +258,19 @@
*
FROM
audit_processon
HAVING
1 = 1
ORDER BY
create_time ASC
create_time
) table1
GROUP BY
cons_id
) r ON r.cons_id = ap.cons_id
LEFT JOIN sys_user ss ON ss.PHONE = r.audit_name_id
WHERE
ap.audit_id = #{params.auditProcessId} and ap.cons_id =#{params.id} and ap.is_active = '1'
ap.audit_id = #{params.auditProcessId} and ap.is_active = '1'
GROUP BY
ap.id
ap.id,ap.create_time
ORDER BY
ap.create_time ASC
ap.create_time desc
)r
</select>
@ -314,19 +312,17 @@
FROM
audit_processon
where audit_name_id is not null
HAVING
1 = 1
ORDER BY
create_time ASC
create_time
) table1
GROUP BY
cons_id
) r ON r.cons_id = ap.cons_id
LEFT JOIN sys_user ss ON ss.PHONE = r.audit_name_id
WHERE
ap.audit_id = #{params.auditProcessId} and ap.cons_id =#{params.id} and ap.is_active = '1'
ap.audit_id = #{params.auditProcessId} and ap.is_active = '1'
GROUP BY
ap.id
ap.id,ap.create_time
ORDER BY
ap.create_time desc
limit #{offset}, #{limit}

View File

@ -413,15 +413,17 @@
<select id="getFixeNextAuditId" resultType="com.bonus.nxdt.energy.basic.entity.AmProcessType">
SELECT
phone,
countersign_type as countersignType
FROM
`am_process_type`
WHERE
type = #{processType}
AND phone NOT IN ( SELECT next_audit_id FROM audit_processon WHERE audit_id = #{auditId})
ORDER BY
sort ASC
LIMIT 0,1
countersign_type AS countersignType
FROM
`am_process_type`
WHERE
type = #{processType}
AND phone NOT IN ( SELECT next_audit_id FROM audit_processon WHERE audit_id = #{auditId} and create_time >(
SELECT create_time from audit_processon WHERE audit_id = #{auditId} and audit_remark ='发起' ORDER BY id desc limit 1
))
ORDER BY
sort ASC
LIMIT 0,1;
</select>
<select id="getProcessType" resultType="java.lang.String">

View File

@ -239,7 +239,7 @@ SELECT
WHERE
cpq.contrator_id = #{contractorId}
and (cpq.appera_status != '2' OR cpq.appera_status is null)
and is_active ='1'
and cpq.is_active ='1' and cpq.check_process_status != '0'
ORDER BY
CASE cpq.check_process_status
WHEN '0' then 1