This commit is contained in:
parent
1ae03b6b81
commit
2d4643e61f
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.aqgqj.basis.dao;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.AuditHistoryVo;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalDetailVo;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalVo;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
|
|
@ -40,6 +41,7 @@ public interface ExamineMapper {
|
|||
|
||||
/**
|
||||
* 查询试验设备数量
|
||||
*
|
||||
* @param experId
|
||||
* @return List<Map < String, String>>
|
||||
* @author cwchen
|
||||
|
|
@ -47,4 +49,13 @@ public interface ExamineMapper {
|
|||
*/
|
||||
@MapKey("id")
|
||||
List<Map<String, String>> getExperDevItemsNum(Long experId);
|
||||
|
||||
/**
|
||||
* 添加审核数据
|
||||
* @param vo
|
||||
* @return void
|
||||
* @author cwchen
|
||||
* @date 2024/7/24 20:49
|
||||
*/
|
||||
void checkData(AuditHistoryVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class AuditHistoryVo {
|
|||
@NotNull(message = "收样ID不能为空", groups = {Query.class})
|
||||
private Long sampleId;
|
||||
/**试验信息表id*/
|
||||
private Long[] experId;
|
||||
private Long[] experIds;
|
||||
/**审核时间*/
|
||||
private Date auditTime = new Date();
|
||||
/**审核人*/
|
||||
|
|
@ -41,6 +41,8 @@ public class AuditHistoryVo {
|
|||
@NotNull(message = "审批类型不能为空", groups = {Query.class})
|
||||
private Integer auditType;
|
||||
|
||||
private Long experId;
|
||||
|
||||
public interface Query {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,10 +85,18 @@ public class ExamineServiceImpl implements ExamineService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public ServerResponse checkData(AuditHistoryVo vo) {
|
||||
try {
|
||||
if(vo.getExperIds() == null || vo.getExperIds().length == 0){
|
||||
return ServerResponse.createByErrorMsg(HttpStatus.ERROR, "参数不完整");
|
||||
}
|
||||
String validResult = validatorsUtils.valid(vo, AuditHistoryVo.Query.class);
|
||||
if (StringUtils.isNotBlank(validResult)) {
|
||||
return ServerResponse.createByErrorMsg(HttpStatus.ERROR, validResult);
|
||||
}
|
||||
for (Long experId : vo.getExperIds()) {
|
||||
vo.setExperId(experId);
|
||||
mapper.checkData(vo);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.aqgqj.basis.dao.ExamineMapper">
|
||||
<!--添加审核数据-->
|
||||
<insert id="checkData">
|
||||
INSERT INTO tb_audit_history(id,exper_id,audit_time,audit_user_id,audit_user_name,audit_status,audit_remark,audit_type) VALUES
|
||||
(null,#{experId},#{auditTime},#{auditUserId},#{auditUserName},#{auditStatus},#{auditRemark},#{auditType})
|
||||
</insert>
|
||||
|
||||
<!--试验审查列表-->
|
||||
<select id="getList" resultType="com.bonus.aqgqj.basis.entity.vo.ExperimentalVo">
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ function saveData(data) {
|
|||
let loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0});
|
||||
let url = dataUrl + "/examine/checkData";
|
||||
let obj = data.field;
|
||||
obj.experId = experIdParam.split(",");
|
||||
obj.experIds = experIdParam.split(",");
|
||||
obj.sampleId = parseInt(sampleIdParam);
|
||||
obj.auditStatus = typeParam;
|
||||
obj.auditType = auditTypeParam;
|
||||
|
|
|
|||
Loading…
Reference in New Issue