|
@@ -3,12 +3,15 @@ package com.rongwei.bscommon.sys.service.impl;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.rongwei.bscommon.sys.service.ZhcxItpProjectNodesService;
|
|
|
+import com.rongwei.bsentity.domain.ZhcxItpProjectNodesDo;
|
|
|
import com.rongwei.bsentity.domain.ZhcxOutsideInspectionComponentTrackDo;
|
|
|
import com.rongwei.bscommon.sys.dao.ZhcxOutsideInspectionComponentTrackDao;
|
|
|
import com.rongwei.bscommon.sys.service.ZhcxOutsideInspectionComponentTrackService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpDo;
|
|
|
import com.rongwei.rwcommon.utils.SecurityUtil;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
/**
|
|
@@ -22,6 +25,9 @@ import org.springframework.stereotype.Service;
|
|
|
@Service
|
|
|
public class ZhcxOutsideInspectionComponentTrackServiceImpl extends ServiceImpl<ZhcxOutsideInspectionComponentTrackDao, ZhcxOutsideInspectionComponentTrackDo> implements ZhcxOutsideInspectionComponentTrackService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ZhcxItpProjectNodesService zhcxItpProjectNodesService;
|
|
|
+
|
|
|
/**
|
|
|
* 保存跟踪
|
|
|
*
|
|
@@ -117,6 +123,26 @@ public class ZhcxOutsideInspectionComponentTrackServiceImpl extends ServiceImpl<
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ //报验点属性
|
|
|
+ LambdaQueryWrapper<ZhcxItpProjectNodesDo> tWrapper = Wrappers.lambdaQuery();
|
|
|
+ tWrapper.eq(ZhcxItpProjectNodesDo::getPid, itpDo.getStructureid())
|
|
|
+ .eq(ZhcxItpProjectNodesDo::getDeleted, "0")
|
|
|
+ .eq(ZhcxItpProjectNodesDo::getNodename, itpDo.getInspectioncontent())
|
|
|
+ .eq(ZhcxItpProjectNodesDo::getProjectid, itpDo.getProjectid());
|
|
|
+ ZhcxItpProjectNodesDo nodesDo = zhcxItpProjectNodesService.getOne(tWrapper);
|
|
|
+ if(ObjectUtil.isNull(nodesDo)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(nodesDo.getIsneedinput()) || !"true".equals(nodesDo.getIsneedinput())) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ //总装机号或者机构机号存在多选时,不存在添加校验跟踪
|
|
|
+ if(itpDo.getMachineno().split(",").length > 1 || itpDo.getStructuremachineno().split(",").length > 1) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
//已保存的构件和报验点,不再重新保存
|
|
|
LambdaQueryWrapper<ZhcxOutsideInspectionComponentTrackDo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
queryWrapper.eq(ZhcxOutsideInspectionComponentTrackDo::getStructurename, itpDo.getStructurename())
|