|
@@ -43,7 +43,9 @@ import cn.iocoder.yudao.module.pms.service.iotopeationfill.IotOpeationFillServic
|
|
|
import cn.iocoder.yudao.module.pms.service.iotrhdailyreport.IotRhDailyReportService;
|
|
import cn.iocoder.yudao.module.pms.service.iotrhdailyreport.IotRhDailyReportService;
|
|
|
import cn.iocoder.yudao.module.pms.service.iotrydailyreport.IotRyDailyReportService;
|
|
import cn.iocoder.yudao.module.pms.service.iotrydailyreport.IotRyDailyReportService;
|
|
|
import cn.iocoder.yudao.module.pms.service.yanfan.YfDeviceService;
|
|
import cn.iocoder.yudao.module.pms.service.yanfan.YfDeviceService;
|
|
|
|
|
+import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
|
|
|
import cn.iocoder.yudao.module.system.service.dept.DeptService;
|
|
import cn.iocoder.yudao.module.system.service.dept.DeptService;
|
|
|
|
|
+import cn.iocoder.yudao.module.system.service.dict.DictDataService;
|
|
|
import com.aliyun.tea.utils.StringUtils;
|
|
import com.aliyun.tea.utils.StringUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
@@ -102,6 +104,8 @@ public class IotOpeationFillController {
|
|
|
private IotProjectTaskMapper iotProjectTaskMapper;
|
|
private IotProjectTaskMapper iotProjectTaskMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IotOpeationFillOrderMapper iotOpeationFillOrderMapper;
|
|
private IotOpeationFillOrderMapper iotOpeationFillOrderMapper;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private DictDataService dictDataService;
|
|
|
|
|
|
|
|
@PostMapping("/create")
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "创建运行记录填报")
|
|
@Operation(summary = "创建运行记录填报")
|
|
@@ -937,14 +941,32 @@ public class IotOpeationFillController {
|
|
|
IotProjectTaskPageReqVO reqVO = new IotProjectTaskPageReqVO();
|
|
IotProjectTaskPageReqVO reqVO = new IotProjectTaskPageReqVO();
|
|
|
reqVO.setDeptId(iotOpeationFill.getDeptId());
|
|
reqVO.setDeptId(iotOpeationFill.getDeptId());
|
|
|
reqVO.setJobFlag("Y");
|
|
reqVO.setJobFlag("Y");
|
|
|
|
|
+ // 查询 瑞恒 施工工艺数据字典
|
|
|
|
|
+ Set<String> rhTechValues = new HashSet<>();
|
|
|
|
|
+ List<DictDataDO> rhTechs = dictDataService.getDictDataListByDictType("rq_iot_project_technology_rh");
|
|
|
|
|
+ if (CollUtil.isNotEmpty(rhTechs)) {
|
|
|
|
|
+ rhTechs.forEach(tech -> {
|
|
|
|
|
+ if ("NOGAS".equals(tech.getRemark())) {
|
|
|
|
|
+ rhTechValues.add(tech.getValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
List<IotProjectTaskDO> tasks = iotProjectTaskMapper.selectList(reqVO);
|
|
List<IotProjectTaskDO> tasks = iotProjectTaskMapper.selectList(reqVO);
|
|
|
if (CollUtil.isNotEmpty(tasks)) {
|
|
if (CollUtil.isNotEmpty(tasks)) {
|
|
|
|
|
+ // key任务井id value注气量是否必填
|
|
|
|
|
+ Set<Long> noGasTasks = new HashSet<>();
|
|
|
// 取最新的1个任务
|
|
// 取最新的1个任务
|
|
|
iotOpeationFill.setWellName(tasks.get(0).getWellName());
|
|
iotOpeationFill.setWellName(tasks.get(0).getWellName());
|
|
|
tasks.forEach(task -> {
|
|
tasks.forEach(task -> {
|
|
|
wellNamePair.put(task.getId(), task.getWellName());
|
|
wellNamePair.put(task.getId(), task.getWellName());
|
|
|
|
|
+ // 施工工艺为 调驱 或 泡沫 注气量 非必填
|
|
|
|
|
+ if (rhTechValues.contains(task.getTechnique())) {
|
|
|
|
|
+ // 施工工艺为 调驱 或 泡沫 注气量 非必填
|
|
|
|
|
+ noGasTasks.add(task.getId());
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
iotOpeationFill.setWellNamePair(wellNamePair);
|
|
iotOpeationFill.setWellNamePair(wellNamePair);
|
|
|
|
|
+ iotOpeationFill.setNoGasTasks(noGasTasks);
|
|
|
}
|
|
}
|
|
|
// 查询当前队伍是否已经生成日报 回显数据
|
|
// 查询当前队伍是否已经生成日报 回显数据
|
|
|
// 查询日报表中对应日期 对应部门的taskId
|
|
// 查询日报表中对应日期 对应部门的taskId
|
|
@@ -1100,6 +1122,16 @@ public class IotOpeationFillController {
|
|
|
TenantUtils.executeIgnore(() -> {
|
|
TenantUtils.executeIgnore(() -> {
|
|
|
fillList.forEach(fill -> {
|
|
fillList.forEach(fill -> {
|
|
|
if ("生产日报".equals(fill.getDeviceName())) {
|
|
if ("生产日报".equals(fill.getDeviceName())) {
|
|
|
|
|
+ // 查询施工工艺数据字典
|
|
|
|
|
+ Set<String> rhTechValues = new HashSet<>();
|
|
|
|
|
+ List<DictDataDO> rhTechs = dictDataService.getDictDataListByDictType("rq_iot_project_technology_rh");
|
|
|
|
|
+ if (CollUtil.isNotEmpty(rhTechs)) {
|
|
|
|
|
+ rhTechs.forEach(tech -> {
|
|
|
|
|
+ if ("NOGAS".equals(tech.getRemark())) {
|
|
|
|
|
+ rhTechValues.add(tech.getValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
fill.getDeptId();
|
|
fill.getDeptId();
|
|
|
IotProjectTaskPageReqVO reqVO = new IotProjectTaskPageReqVO();
|
|
IotProjectTaskPageReqVO reqVO = new IotProjectTaskPageReqVO();
|
|
|
reqVO.setDeptId(fill.getDeptId());
|
|
reqVO.setDeptId(fill.getDeptId());
|
|
@@ -1114,15 +1146,22 @@ public class IotOpeationFillController {
|
|
|
// 判断当前队伍是 瑞恒 还是 瑞鹰
|
|
// 判断当前队伍是 瑞恒 还是 瑞鹰
|
|
|
Set<Long> rhChildDeptIds = deptService.getChildDeptIdListFromCache(157l);
|
|
Set<Long> rhChildDeptIds = deptService.getChildDeptIdListFromCache(157l);
|
|
|
Set<Long> ryChildDeptIds = deptService.getChildDeptIdListFromCache(158l);
|
|
Set<Long> ryChildDeptIds = deptService.getChildDeptIdListFromCache(158l);
|
|
|
-
|
|
|
|
|
|
|
+ // key任务井id value任务井号
|
|
|
Map<Long, String> wellNamePair = new HashMap<>();
|
|
Map<Long, String> wellNamePair = new HashMap<>();
|
|
|
|
|
+ // key任务井id value注气量是否必填
|
|
|
|
|
+ Set<Long> noGasTasks = new HashSet<>();
|
|
|
if (CollUtil.isNotEmpty(tasks)) {
|
|
if (CollUtil.isNotEmpty(tasks)) {
|
|
|
// 取最新的1个任务
|
|
// 取最新的1个任务
|
|
|
fill.setWellName(tasks.get(0).getWellName());
|
|
fill.setWellName(tasks.get(0).getWellName());
|
|
|
tasks.forEach(task -> {
|
|
tasks.forEach(task -> {
|
|
|
wellNamePair.put(task.getId(), task.getWellName());
|
|
wellNamePair.put(task.getId(), task.getWellName());
|
|
|
|
|
+ if (rhTechValues.contains(task.getTechnique())) {
|
|
|
|
|
+ // 施工工艺为 调驱 或 泡沫 注气量 非必填
|
|
|
|
|
+ noGasTasks.add(task.getId());
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
fill.setWellNamePair(wellNamePair);
|
|
fill.setWellNamePair(wellNamePair);
|
|
|
|
|
+ fill.setNoGasTasks(noGasTasks);
|
|
|
}
|
|
}
|
|
|
if (ObjUtil.isNotEmpty(deptId) && StrUtil.isNotBlank(reportDateStr)) {
|
|
if (ObjUtil.isNotEmpty(deptId) && StrUtil.isNotBlank(reportDateStr)) {
|
|
|
if (rhChildDeptIds.contains(deptId)) {
|
|
if (rhChildDeptIds.contains(deptId)) {
|