发布添加完成人数
This commit is contained in:
parent
5b6bc557e7
commit
4cb0e50a66
|
@ -46,4 +46,6 @@ public interface SysEvaluationRecordMapper extends BaseMapperPlus<SysEvaluationR
|
|||
List<StatisticNumVo> selectFactorNum(@Param("batchNo") Long batchNo, @Param("scaleId") Long scaleId);
|
||||
List<StatisticNumVo> selectFactorWarnNum(@Param("batchNo") Long batchNo, @Param("scaleId") Long scaleId,@Param("list")List<Integer> warnList);
|
||||
|
||||
int selectUndoneNumByBatchNoAndUserId(@Param("batchNo") Long batchNo,@Param("userId") Long userId);
|
||||
|
||||
}
|
||||
|
|
|
@ -37,4 +37,5 @@ public interface SysScalePublishMapper extends BaseMapperPlus<SysScalePublish, S
|
|||
|
||||
int selectCountScalePublish();
|
||||
|
||||
void addCompleteNum(Long batchNo);
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@ public class WebServiceImpl implements IWebService {
|
|||
}
|
||||
SysScalePublishVo scalePublishVo = recordMapper.selectPublishByUseRecord(recordId);
|
||||
//查询考核结果
|
||||
Long batchNo = scalePublishVo.getBatchNo();
|
||||
if (scalePublishVo.getAllowQueryResult() == 0) {
|
||||
allowQueryResult = false;
|
||||
}
|
||||
|
@ -167,6 +168,10 @@ public class WebServiceImpl implements IWebService {
|
|||
update.setUpdateTime(new Date());
|
||||
recordMapper.updateById(update);
|
||||
|
||||
int undoneNum = recordMapper.selectUndoneNumByBatchNoAndUserId(batchNo, loginUser.getUserId());
|
||||
if (undoneNum <= 1) {
|
||||
publishMapper.addCompleteNum(batchNo);
|
||||
}
|
||||
Integer riskLevel = -1;
|
||||
//选择风险等级最高
|
||||
for (SysEvaluationConclusionVo ec : list) {
|
||||
|
@ -177,13 +182,14 @@ public class WebServiceImpl implements IWebService {
|
|||
List<Integer> used = warnMapper.selectUseConfig();
|
||||
if (used.contains(riskLevel)) {
|
||||
SysWarnRecord wre = new SysWarnRecord();
|
||||
wre.setBatchNo(scalePublishVo.getBatchNo());
|
||||
wre.setBatchNo(batchNo);
|
||||
wre.setUserId(loginUser.getUserId());
|
||||
wre.setDeptId(loginUser.getDeptId());
|
||||
wre.setWarnTime(new Date());
|
||||
wre.setSituation(riskLevel);
|
||||
warnRecordService.insertByBo(wre);
|
||||
}
|
||||
|
||||
//不允许查看考核结果
|
||||
if (!allowQueryResult) {
|
||||
return null;
|
||||
|
|
|
@ -110,4 +110,12 @@
|
|||
where sf.scale_id = #{scaleId}
|
||||
group by sf.factor_id
|
||||
</select>
|
||||
|
||||
<select id="selectUndoneNumByBatchNoAndUserId" resultType="int">
|
||||
select count(*)
|
||||
from sys_evaluation_record
|
||||
where batch_no = #{batchNo}
|
||||
and user_id= #{userId}
|
||||
and status < 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -89,4 +89,10 @@
|
|||
select count(*)
|
||||
from sys_scale_publish
|
||||
</select>
|
||||
|
||||
<select id="addCompleteNum" >
|
||||
update sys_scale_publish
|
||||
set complete_num = complete_num + 1
|
||||
where batch_no = #{batchNo}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue