|
@@ -11,15 +11,18 @@ import cn.cslg.pas.common.utils.LoginUtils;
|
|
|
import cn.cslg.pas.common.vo.invalidVO.GroupFeatureHistoryVO;
|
|
|
import cn.cslg.pas.common.vo.invalidVO.QueryEvidenceReasonVO;
|
|
|
import cn.cslg.pas.common.vo.invalidVO.QueryInvalidHistoryVO;
|
|
|
+import cn.cslg.pas.domain.BaseEntity;
|
|
|
import cn.cslg.pas.domain.business.*;
|
|
|
import cn.cslg.pas.exception.XiaoShiException;
|
|
|
import cn.cslg.pas.mapper.InvalidReport.EvidenceReasonMapper;
|
|
|
import cn.cslg.pas.service.business.CompareLiteratureService;
|
|
|
import cn.cslg.pas.service.business.FeatureService;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -427,15 +430,31 @@ public class EvidenceReasonService extends ServiceImpl<EvidenceReasonMapper, Evi
|
|
|
throw new XiaoShiException("请输入值");
|
|
|
}
|
|
|
domainFieldDTOS.forEach(item -> {
|
|
|
- try {
|
|
|
- if (item.getValue() != null) {
|
|
|
- GenerateObjectUtil.setObjectProperty(evidenceReason, item.getField(), item.getValue());
|
|
|
+// try {
|
|
|
+// if (item.getValue() != null) {
|
|
|
+// GenerateObjectUtil.setObjectProperty(evidenceReason, item.getField(), item.getValue());
|
|
|
+// }
|
|
|
+// } catch (Exception e) {
|
|
|
+// throw new XiaoShiException("装载失败");
|
|
|
+// }
|
|
|
+ String value = item.getValue().toString();
|
|
|
+ if (item.getField().equals("ifPresentOpinions1") && StringUtils.isEmpty(value)) {
|
|
|
+ LambdaUpdateWrapper<EvidenceReason> wrapper = new LambdaUpdateWrapper<EvidenceReason>()
|
|
|
+ .eq(BaseEntity::getId, id)
|
|
|
+ .set(EvidenceReason::getIfPresentOpinions1, null);
|
|
|
+ evidenceReason.update(wrapper);
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
+ if (item.getValue() != null) {
|
|
|
+ GenerateObjectUtil.setObjectProperty(evidenceReason, item.getField(), item.getValue());
|
|
|
+ evidenceReason.updateById();
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new XiaoShiException("装载失败");
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- throw new XiaoShiException("装载失败");
|
|
|
}
|
|
|
});
|
|
|
- evidenceReason.updateById();
|
|
|
+// evidenceReason.updateById();
|
|
|
}
|
|
|
return true;
|
|
|
|