试验管理

This commit is contained in:
cwchen 2024-07-22 15:11:50 +08:00
parent 7630ed04c6
commit 9c33b375a6
6 changed files with 53 additions and 11 deletions

View File

@ -100,4 +100,12 @@ public class ExperimentalController {
public ServerResponse viewTestData(EncryptedReq<ParamsDto> data) {
return service.viewTestData(data.getData());
}
@PostMapping(value = "commitCheckTestData")
@DecryptAndVerify(decryptedClass = ParamsDto.class)//加解密统一管理
@LogAnnotation(operModul = "试验管理", operation = "提交审查数据", operDesc = "系统级事件", operType = "提交审查")
// @PreAuthorize("@pms.hasPermission('sys:experimentalTest:commitCheck')")
public ServerResponse commitCheckTestData(EncryptedReq<ParamsDto> data) {
return service.commitCheckTestData(data.getData());
}
}

View File

@ -37,4 +37,9 @@ public class ParamsDto extends PageEntity {
*/
private String keyWord;
/**
* 收样ID数组
*/
private Long[] ids;
}

View File

@ -49,15 +49,9 @@ public class ExperimentalVo {
* 试验班组
*/
private String teamName;
/**
* 审核状态 0 待审核 1审核通过 2审核不通过
*/
private String audtiStatus;
/**
* 流程状态 0.待试验 1.待审阅 2.待审核 3.待审批 4.试验结束 5.待重新审阅
*/
private String processStatus;
/**
* 备注
*/

View File

@ -78,10 +78,20 @@ public interface ExperimentalService {
/**
* 试验数据详情
*
* @param data
* @return ServerResponse
* @author cwchen
* @date 2024/7/21 20:06
*/
ServerResponse viewTestData(ParamsDto data);
/**
* 试验管理-提交审查
* @param data
* @return ServerResponse
* @author cwchen
* @date 2024/7/22 14:25
*/
ServerResponse commitCheckTestData(ParamsDto data);
}

View File

@ -303,6 +303,22 @@ public class ExperimentalServiceImpl implements ExperimentalService {
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse commitCheckTestData(ParamsDto dto) {
try {
if(dto.getIds() == null || dto.getIds().length == 0){
return ServerResponse.createByErrorMsg(HttpStatus.ERROR,"未提交审查数据");
}
} catch (Exception e) {
log.error(e.toString(), e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ServerResponse.createByErrorMsg(HttpStatus.ERROR, "操作失败");
}
return ServerResponse.createBySuccessMsg("操作成功");
}
/**
* 验证参数是否为空
*

View File

@ -234,8 +234,17 @@
su2.user_name AS dispatchUserName,
DATE_FORMAT(ts.sample_date, '%Y-%m-%d') AS sampleDate,
tt.team_name AS teamName,
ts.audti_status AS audtiStatus,
ts.process_status AS processStatus,
CASE WHEN process_status IS NULL THEN '待试验'
WHEN process_status = 0 AND audti_status = 0 THEN '待提交'
WHEN process_status = 1 AND audti_status = 0 THEN '待审阅'
WHEN process_status = 1 AND audti_status = 2 THEN '审阅不通过'
WHEN process_status = 2 AND audti_status = 0 THEN '待审核'
WHEN process_status = 2 AND audti_status = 2 THEN '审核不通过'
WHEN process_status = 3 AND audti_status = 0 THEN '待审批'
WHEN process_status = 3 AND audti_status = 2 THEN '审批不通过'
WHEN process_status = 4 AND audti_status = 1 THEN '试验结束'
ELSE '待试验'
END AS audtiStatus,
ts.remarks
FROM tb_sample ts
LEFT JOIN tb_custom tc ON ts.custom_id = tc.id
@ -248,7 +257,7 @@
WHERE del_falg = 0
GROUP BY sample_id
) tsd ON tsd.sample_id = ts.id
WHERE ts.del_flag = 0 AND process_status IN (0,5)
WHERE ts.del_flag = 0
<if test="keyWord != null and keyWord!=''">
AND (
INSTR(tt.team_name,#{keyWord}) > 0 OR
@ -264,7 +273,7 @@
<if test="devTypeCode != null and devTypeCode!=''">
AND INSTR(tsd.sampleDevCode,#{devTypeCode})
</if>
ORDER BY dispatch_time ASC
ORDER BY FIELD(audtiStatus, '审阅不通过','审核不通过','审批不通过','待试验','待提交','待审阅','待审核','待审批','试验结束') ASC,dispatch_time ASC
</select>
<!--试验详情列表-->
<select id="getDetailList" resultType="com.bonus.aqgqj.basis.entity.vo.ExperimentalDetailVo">