|
|
@@ -0,0 +1,49 @@
|
|
|
+package cn.start.tz.module.pressure2.service.dynamicOFData.comm;
|
|
|
+
|
|
|
+import cn.start.tz.module.pressure2.controller.admin.dynamictbins.vo.CreateInstantiateWithRuleVO;
|
|
|
+import cn.start.tz.module.pressure2.dal.dataobject.boilertaskorderitemreport.BoilerTaskOrderItemReportDO;
|
|
|
+import cn.start.tz.module.pressure2.dal.mysql.boilertaskorderitemreport.BoilerTaskOrderItemReportMapper;
|
|
|
+import cn.start.tz.module.pressure2.service.dynamicOFData.IDynamicOFData;
|
|
|
+import cn.start.tz.module.pressure2.service.dynamicOFData.util.AutoDataBoilerService;
|
|
|
+import cn.start.tz.module.pressure2.service.dynamicOFData.util.GenerateReportJsonService;
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 硬度检测报告
|
|
|
+ */
|
|
|
+@Service("QC47001_202400RecordOFData")
|
|
|
+public class QC47001_202400RecordOFData implements IDynamicOFData {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private BoilerTaskOrderItemReportMapper boilerTaskOrderItemReportMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private GenerateReportJsonService generateReportJsonService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private AutoDataBoilerService autoDataBoilerService;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject getOFData(JSONObject params) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject getOfDataByVO(CreateInstantiateWithRuleVO ruleVO) {
|
|
|
+ //设备报表ID
|
|
|
+ String refId = ruleVO.getRefId();
|
|
|
+
|
|
|
+ JSONObject result = new JSONObject();
|
|
|
+ BoilerTaskOrderItemReportDO itemReportDO = boilerTaskOrderItemReportMapper.selectById(refId);
|
|
|
+
|
|
|
+ if (itemReportDO != null) {
|
|
|
+ //根据记录字段动态生成报告字段
|
|
|
+ result = generateReportJsonService.generateReportFromRecord(ruleVO.getReportType(), ruleVO.getTemplateId(), refId);
|
|
|
+ result = autoDataBoilerService.autoGenerateBoilerReportData(result, refId);
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+}
|