1.监督计划功能调整

This commit is contained in:
2024-10-31 09:05:59 +08:00
parent a601af9479
commit 23ee3b1af2
3 changed files with 31 additions and 19 deletions

View File

@@ -75,6 +75,7 @@ public class PmsTemUserServiceImpl extends ServiceImpl<PmsTemUserMapper, PmsTemU
}
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean updatePmsTemUser(PmsTemUserParam.UpdatePmsTemUserParam updatePmsTemUserParam) {
PmsTemUserPO result = this.getById(updatePmsTemUserParam.getObjId());
PmsTemUserPO pmsTemUserPO = new PmsTemUserPO();
@@ -82,6 +83,14 @@ public class PmsTemUserServiceImpl extends ServiceImpl<PmsTemUserMapper, PmsTemU
if(!result.getMaintOrg().equals(updatePmsTemUserParam.getMaintOrg())){
assOrg(pmsTemUserPO);
}
if(!updatePmsTemUserParam.getConsName().equals(result.getConsName())){
//修改全过程表数据
LambdaUpdateWrapper<PmsTemProcessTrackPO> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(PmsTemProcessTrackPO::getTempUserDossierName,updatePmsTemUserParam.getConsName()).eq(PmsTemProcessTrackPO::getTempUserDossierId,result.getObjId());
pmsTemProcessTrackMapper.update(null,updateWrapper);
}
return this.updateById(pmsTemUserPO);
}

View File

@@ -1,5 +1,6 @@
package com.njcn.process.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -42,16 +43,28 @@ public class SupvPlanRel {
private String relObjName;
@JsonSerialize(using = TimestampAsLongSerializer.class)
private Timestamp createTime;
private Timestamp createTimes;
@JsonSerialize(using = TimestampAsLongSerializer.class)
private Timestamp updateTime;
@TableField(exist = false)
private Long createTime;
private Timestamp updateTimes;
@TableField(exist = false)
private Long updateTime;
private String isDelete;
@JsonSerialize(using = TimestampAsLongSerializer.class)
private Timestamp deleteTime;
private Timestamp deleteTimes;
@TableField(exist = false)
private Long deleteTime;
public void prepareForSerialization() {
this.createTime = (this.createTimes != null) ? this.createTimes.getTime() : null;
this.updateTime = (this.updateTimes != null) ? this.updateTimes.getTime() : null;
this.deleteTime = (this.deleteTimes != null) ? this.deleteTimes.getTime() : null;
}
}

View File

@@ -189,20 +189,9 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
//电容器组需要上送对象
List<SupvPlanRel> supvPlanRelList = supvPlanRelMapper.selectList(new LambdaQueryWrapper<SupvPlanRel>().eq(SupvPlanRel::getPlanId,supvPlan.getPlanId()));
if(CollUtil.isNotEmpty(supvPlanRelList)){
System.out.println("njcnnjcnnjcn");
ObjectMapper objectMapper = new ObjectMapper();
supvPlanRelList.forEach(item -> {
String jsonString = null;
try {
jsonString = objectMapper.writeValueAsString(item);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
System.out.println(jsonString);
});
supvPlanRelList.forEach(SupvPlanRel::prepareForSerialization);
supvPlan.setPlanRel(supvPlanRelList);
}
supvPlan.setPlanRel(supvPlanRelList);
}
//监督类型编码
@@ -272,6 +261,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
SendParam param = new SendParam();
param.setStats(planVOS);
param.setProvinceId(code);
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督工作计划数据接口数据:" + s + "结束----");
Map<String, String> send = send(param, getUrl(1), "pqPlanCreate");