|
@@ -8,7 +8,9 @@ import com.ktg.common.core.text.Convert;
|
|
|
import com.ktg.common.utils.bean.BeanUtils;
|
|
import com.ktg.common.utils.bean.BeanUtils;
|
|
|
import com.ktg.iscs.domain.IsSop;
|
|
import com.ktg.iscs.domain.IsSop;
|
|
|
import com.ktg.iscs.domain.IsSopPoints;
|
|
import com.ktg.iscs.domain.IsSopPoints;
|
|
|
|
|
+import com.ktg.iscs.domain.IsSopUser;
|
|
|
import com.ktg.iscs.domain.dto.sop.AddSopDTO;
|
|
import com.ktg.iscs.domain.dto.sop.AddSopDTO;
|
|
|
|
|
+import com.ktg.iscs.domain.dto.sop.AddSopUserDTO;
|
|
|
import com.ktg.iscs.domain.dto.sop.PageSopDTO;
|
|
import com.ktg.iscs.domain.dto.sop.PageSopDTO;
|
|
|
import com.ktg.iscs.domain.vo.points.PointDetailVO;
|
|
import com.ktg.iscs.domain.vo.points.PointDetailVO;
|
|
|
import com.ktg.iscs.domain.vo.sop.SopDetailVO;
|
|
import com.ktg.iscs.domain.vo.sop.SopDetailVO;
|
|
@@ -17,6 +19,7 @@ import com.ktg.iscs.mapper.IsSopMapper;
|
|
|
import com.ktg.iscs.service.IIsIsolationPointService;
|
|
import com.ktg.iscs.service.IIsIsolationPointService;
|
|
|
import com.ktg.iscs.service.IIsSopPointsService;
|
|
import com.ktg.iscs.service.IIsSopPointsService;
|
|
|
import com.ktg.iscs.service.IIsSopService;
|
|
import com.ktg.iscs.service.IIsSopService;
|
|
|
|
|
+import com.ktg.iscs.service.IIsSopUserService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -40,6 +43,8 @@ public class IsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implements
|
|
|
private IIsSopPointsService iIsSopPointsService;
|
|
private IIsSopPointsService iIsSopPointsService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IIsIsolationPointService iIsIsolationPointService;
|
|
private IIsIsolationPointService iIsIsolationPointService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IIsSopUserService iIsSopUserService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询SOP信息
|
|
* 查询SOP信息
|
|
@@ -63,6 +68,12 @@ public class IsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implements
|
|
|
// 3.1组合返回数据
|
|
// 3.1组合返回数据
|
|
|
sopDetailVO.setPointDetailVOList(pointDetailVOList);
|
|
sopDetailVO.setPointDetailVOList(pointDetailVOList);
|
|
|
}
|
|
}
|
|
|
|
|
+ // 4.查询人员信息
|
|
|
|
|
+ List<IsSopUser> sopUserList = iIsSopUserService.list(Wrappers.<IsSopUser>lambdaQuery()
|
|
|
|
|
+ .eq(IsSopUser::getSopId, sopId));
|
|
|
|
|
+ if (!sopUserList.isEmpty()) {
|
|
|
|
|
+ sopDetailVO.setTicketUserDTOList(BeanUtils.toBean(sopUserList, AddSopUserDTO.class));
|
|
|
|
|
+ }
|
|
|
return sopDetailVO;
|
|
return sopDetailVO;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -108,6 +119,17 @@ public class IsSopServiceImpl extends ServiceImpl<IsSopMapper, IsSop> implements
|
|
|
isSopPoints.setPointId(pointId);
|
|
isSopPoints.setPointId(pointId);
|
|
|
iIsSopPointsService.save(isSopPoints);
|
|
iIsSopPointsService.save(isSopPoints);
|
|
|
}
|
|
}
|
|
|
|
|
+ // 4.新增人员信息到模板
|
|
|
|
|
+ if (!dto.getTicketUserDTOList().isEmpty()) {
|
|
|
|
|
+ for (AddSopUserDTO addSopUserDTO : dto.getTicketUserDTOList()) {
|
|
|
|
|
+ IsSopUser sopUser = BeanUtils.toBean(addSopUserDTO, IsSopUser.class);
|
|
|
|
|
+ sopUser.setSopId(isSop.getSopId());
|
|
|
|
|
+ if (null == addSopUserDTO.getUserId() || addSopUserDTO.getUserId() == 0) {
|
|
|
|
|
+ addSopUserDTO.setUserId(0L);
|
|
|
|
|
+ }
|
|
|
|
|
+ iIsSopUserService.save(sopUser);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|