动火作业

This commit is contained in:
pengjie 2024-05-16 21:58:13 +08:00
parent be389f94c8
commit ad72c12d5f
5 changed files with 59 additions and 0 deletions

View File

@ -396,6 +396,9 @@ public class WorkerInfo implements Serializable {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "证书等生效时间截止时间") @ApiModelProperty(value = "证书等生效时间截止时间")
private String effectTime; private String effectTime;
@TableField(exist = false)
@ApiModelProperty(value = "动火证编号")
private String fireCertificate;
/** /**
* 通知的人员id * 通知的人员id
*/ */

View File

@ -196,6 +196,14 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
} else { } else {
list = workerInfoMapper.selectWorkerInfoList(page, map); list = workerInfoMapper.selectWorkerInfoList(page, map);
} }
List<Long> workerIds = list.stream().map(l -> l.getId()).collect(Collectors.toList());
List<WorkerCertificate> workerCertificate = workerCertificateService.list(Wrappers.<WorkerCertificate>lambdaQuery()
.in(WorkerCertificate::getWorkerId, workerIds)
.eq(WorkerCertificate::getCertificateType, 45));
for (WorkerInfo workerInfo : list) {
List<WorkerCertificate> collect = workerCertificate.stream().filter(w -> w.getWorkerId().toString().equals(workerInfo.getId().toString())).collect(Collectors.toList());
workerInfo.setFireCertificate(collect.size() > 0 ? collect.get(0).getCertificateNumber() : "");
}
return page.setRecords(list); return page.setRecords(list);
} }

View File

@ -1,5 +1,6 @@
package com.zhgd.xmgl.modules.xz.special.controller; package com.zhgd.xmgl.modules.xz.special.controller;
import com.alibaba.fastjson.JSONObject;
import com.zhgd.xmgl.modules.xz.special.entity.XzBlindPlatePlugSafe; import com.zhgd.xmgl.modules.xz.special.entity.XzBlindPlatePlugSafe;
import com.zhgd.xmgl.modules.xz.special.service.IXzBlindPlatePlugSafeService; import com.zhgd.xmgl.modules.xz.special.service.IXzBlindPlatePlugSafeService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -78,6 +79,19 @@ public class XzBlindPlatePlugSafeController {
return Result.ok(); return Result.ok();
} }
/**
* 添加
*
* @param paramMap
* @return
*/
@ApiOperation(value = "添加星纵-盲板抽堵安全信息", notes = "添加星纵-盲板抽堵安全信息", httpMethod = "POST")
@PostMapping(value = "/save")
public Result<XzBlindPlatePlugSafe> save(@RequestBody JSONObject paramMap) {
log.info("盲板抽堵信息同步" + paramMap);
return Result.ok();
}
/** /**
* 编辑 * 编辑
* *

View File

@ -181,6 +181,39 @@ public class XzLimitSpaceSafeController {
} }
} }
paramMap.put("gasAnalysisData", JSON.toJSONString(gasAnalysisData)); paramMap.put("gasAnalysisData", JSON.toJSONString(gasAnalysisData));
String [] param2 = {"name", "flag"};
JSONArray safeMeasures = paramMap.getJSONArray("safeMeasure");
JSONArray safeMeasure = new JSONArray();
if (safeMeasures != null) {
for (int i = 0; i < safeMeasures.size(); i++) {
JSONObject detailObj = new JSONObject();
JSONObject j = safeMeasures.getJSONObject(i);
int k = 0;
for (String s : j.keySet()) {
detailObj.put(param2[k], j.get(s));
k++;
}
safeMeasure.add(detailObj);
}
}
paramMap.put("safeMeasure", JSON.toJSONString(safeMeasure));
String [] param3 = {"content", "person"};
JSONArray otherSafeMeasures = paramMap.getJSONArray("otherSafeMeasure");
JSONArray otherSafeMeasure = new JSONArray();
if (otherSafeMeasures != null) {
for (int i = 0; i < otherSafeMeasures.size(); i++) {
JSONObject detailObj = new JSONObject();
JSONObject j = otherSafeMeasures.getJSONObject(i);
int k = 0;
for (String s : j.keySet()) {
detailObj.put(param3[k], j.get(s));
k++;
}
otherSafeMeasure.add(detailObj);
}
}
paramMap.put("otherSafeMeasure", JSON.toJSONString(otherSafeMeasure));
xzLimitSpaceSafeService.add(JSONObject.parseObject(JSON.toJSONString(paramMap), XzLimitSpaceSafe.class)); xzLimitSpaceSafeService.add(JSONObject.parseObject(JSON.toJSONString(paramMap), XzLimitSpaceSafe.class));
return Result.ok(); return Result.ok();
} }

View File

@ -370,6 +370,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/xmgl/xzSpecialOperationFireSafety/save").permitAll() .antMatchers("/xmgl/xzSpecialOperationFireSafety/save").permitAll()
.antMatchers("/xmgl/xzLimitSpaceSafe/save").permitAll() .antMatchers("/xmgl/xzLimitSpaceSafe/save").permitAll()
.antMatchers("/xmgl/workerCertificate/queryByType").permitAll() .antMatchers("/xmgl/workerCertificate/queryByType").permitAll()
.antMatchers("/xmgl/xzBlindPlatePlugSafe/save").permitAll()
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous() .antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
.anyRequest().authenticated() // 剩下所有的验证都需要验证. .anyRequest().authenticated() // 剩下所有的验证都需要验证.
.and() .and()