Browse Source

Merge branch 'prod-5.1.3' of http://175.6.40.68:8081/Jone/hzims-back into prod-5.1.3

zhongwei
liwen 4 months ago
parent
commit
76a0202bb9
  1. 7
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/abstracts/ProcessAbstractService.java
  2. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java
  3. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/DangerSourceClient.java

7
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/abstracts/ProcessAbstractService.java

@ -45,8 +45,9 @@ public abstract class ProcessAbstractService implements ProcessService {
@Override @Override
public R startFlow(String userId, String dictValue, String taskId, String processName, Map<String, Object> variables) { public R startFlow(String userId, String dictValue, String taskId, String processName, Map<String, Object> variables) {
log.info("开启流程....."); log.info("开启流程.....");
R<BladeFlow> result = flowClient.startProcessInstanceContainNameByKey(dictValue, taskId, processName, variables);
R r = new R(); R r = new R();
try {
R<BladeFlow> result = flowClient.startProcessInstanceContainNameByKey(dictValue, taskId, processName, variables);
r.setCode(result.getCode()); r.setCode(result.getCode());
r.setMsg(result.getMsg()); r.setMsg(result.getMsg());
// 更新任务流程Id // 更新任务流程Id
@ -61,6 +62,10 @@ public abstract class ProcessAbstractService implements ProcessService {
pushStartFailMessage(dictValue,Long.valueOf(taskId),userId,processName,result.getMsg()); pushStartFailMessage(dictValue,Long.valueOf(taskId),userId,processName,result.getMsg());
} }
return r; return r;
}catch (Exception e){
log.error(e.toString()) ;
}
return R.fail("开启流程失败");
} }
// public R compensateFlow(String userId,String dictValue,String taskId,String processName,Map<String, Object> variables) { // public R compensateFlow(String userId,String dictValue,String taskId,String processName,Map<String, Object> variables) {
// R<BladeFlow> result = flowClient.startProcessInstanceContainNameByKey(dictValue, taskId, processName, variables); // R<BladeFlow> result = flowClient.startProcessInstanceContainNameByKey(dictValue, taskId, processName, variables);

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java

@ -112,6 +112,11 @@ public class DefectCheckServiceImpl extends ServiceImpl<OperPhenomenonMapper, Op
if (StringUtils.isNotBlank(AuthUtil.getNickName())){ if (StringUtils.isNotBlank(AuthUtil.getNickName())){
entity.setCreateUserName(AuthUtil.getNickName()); entity.setCreateUserName(AuthUtil.getNickName());
} }
if (StringUtils.isNotBlank(entity.getInitResult())){
entity.setInitResult( entity.getInitResult().replaceAll("\n",""));
entity.setInitResult( entity.getInitResult().replaceAll("</p>",""));
entity.setInitResult( entity.getInitResult().replaceAll("<p>",""));
}
R r=new R(); R r=new R();
//加锁 //加锁
Boolean lock = redisTemplate.opsForValue().setIfAbsent("SysUserLock" + entity.getCreateDept(), entity.getCreateDept(), 30, TimeUnit.SECONDS); Boolean lock = redisTemplate.opsForValue().setIfAbsent("SysUserLock" + entity.getCreateDept(), entity.getCreateDept(), 30, TimeUnit.SECONDS);

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/DangerSourceClient.java

@ -31,7 +31,7 @@ public class DangerSourceClient implements IDangerSourceClient {
@Override @Override
@GetMapping(DETAILS) @GetMapping(DETAILS)
public List<DangerSourceEntity> details(@RequestParam String[] ids) { public List<DangerSourceEntity> details(@RequestParam("ids") String[] ids) {
List<DangerSourceEntity> resp = service.listByIds(Arrays.asList(ids)); List<DangerSourceEntity> resp = service.listByIds(Arrays.asList(ids));
//未查到数据返回空集合 //未查到数据返回空集合
if (CollectionUtils.isEmpty(resp)) { if (CollectionUtils.isEmpty(resp)) {

Loading…
Cancel
Save