Commit d20f5c18 authored by kongfm's avatar kongfm

Merge remote-tracking branch 'origin/developer' into developer

parents a97d4879 07fb0caf
package com.yeejoin.amos.boot.biz.common.service.impl; package com.yeejoin.amos.boot.biz.common.service.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Random;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.service.IWorkflowExcuteService; import com.yeejoin.amos.boot.biz.common.service.IWorkflowExcuteService;
import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService; import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
...@@ -25,6 +26,8 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService { ...@@ -25,6 +26,8 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService {
@Override @Override
public void startAndComplete(String key, String condition) throws Exception { public void startAndComplete(String key, String condition) throws Exception {
JSONObject body = new JSONObject(); JSONObject body = new JSONObject();
String businessKey = buildOrderNo();
body.put("businessKey", businessKey);
body.put("processDefinitionKey", key); body.put("processDefinitionKey", key);
JSONObject jsonObject = workflowFeignService.startByVariable(body); JSONObject jsonObject = workflowFeignService.startByVariable(body);
if (jsonObject == null || jsonObject.getJSONObject("data") == null) { if (jsonObject == null || jsonObject.getJSONObject("data") == null) {
...@@ -132,4 +135,14 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService { ...@@ -132,4 +135,14 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService {
} }
return true; return true;
} }
public static String buildOrderNo() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String newDate = sdf.format(new Date());
String result = "";
Random random = new Random();
for (int i = 0; i < 3; i++) {
result += random.nextInt(10);
}
return newDate + result;
}
} }
...@@ -18,10 +18,11 @@ public class OrgusrDataxDto { ...@@ -18,10 +18,11 @@ public class OrgusrDataxDto {
@ApiModelProperty(value = "单位基本信息") @ApiModelProperty(value = "单位基本信息")
private OrgUsrzhDto OrgUsrzhDto; private OrgUsrzhDto OrgUsrzhDto;
@ApiModelProperty(value = "现场图片") @ApiModelProperty(value = "消防通道布置图")
private List<String> scenePicture; private List<String> scenePicture;
@ApiModelProperty(value = "平面图") @ApiModelProperty(value = "建筑平面图")
private List<String> planePicture; private List<String> planePicture;
@ApiModelProperty(value = "建筑立面图")
private List<String> facadePicture;
} }
...@@ -12,7 +12,7 @@ public enum PlanStatusEnum { ...@@ -12,7 +12,7 @@ public enum PlanStatusEnum {
EXAMINE_TWO("二级待审核",2), EXAMINE_TWO("二级待审核",2),
EXAMINE_THREE("三级待审核",3), EXAMINE_THREE("三级待审核",3),
EXAMINE_FORMULATE("已审核/检查内容未制定",4), EXAMINE_FORMULATE("已审核/检查内容未制定",4),
EXAMINE_DEVELOPED("已审核/检查内容已制定",5); EXAMINE_DEVELOPED("检查内容已制定/未执行",5);
/** /**
* 名称 * 名称
......
package com.yeejoin.amos.supervision.core.common.dto;
import lombok.Data;
/**
* @author xixinzhao
*/
@Data
public class DangerDto {
/**
* 检查项记录id
*/
private Long checkInputId;
/**
* 隐患级别
*/
private String dangerLevel;
/**
* 隐患id
*/
private Long dangerId;
/**
* 隐患名称
*/
private String name;
/**
* 状态
*/
private Long state;
/**
* 是否删除
* 0:未删除 1:已删除
*/
private String deleted;
}
package com.yeejoin.amos.supervision.dao.entity; package com.yeejoin.amos.supervision.dao.entity;
import com.yeejoin.amos.supervision.core.common.dto.DangerDto;
import javax.persistence.*; import javax.persistence.*;
import java.util.List; import java.util.List;
...@@ -121,6 +123,8 @@ public class CheckInput extends BasicEntity { ...@@ -121,6 +123,8 @@ public class CheckInput extends BasicEntity {
@Column(name="major_danger_num") @Column(name="major_danger_num")
private int majorDangerNum; private int majorDangerNum;
private List<DangerDto> dangerDtoList;
@Transient @Transient
public List<CheckShot> getCheckShotList() { public List<CheckShot> getCheckShotList() {
return checkShotList; return checkShotList;
...@@ -291,4 +295,13 @@ public class CheckInput extends BasicEntity { ...@@ -291,4 +295,13 @@ public class CheckInput extends BasicEntity {
public void setSafetyDangerNum(int safetyDangerNum) { public void setSafetyDangerNum(int safetyDangerNum) {
this.safetyDangerNum = safetyDangerNum; this.safetyDangerNum = safetyDangerNum;
} }
@Transient
public List<DangerDto> getDangerDtoList() {
return dangerDtoList;
}
public void setDangerDtoList(List<DangerDto> dangerDtoList) {
this.dangerDtoList = dangerDtoList;
}
} }
\ No newline at end of file
package com.yeejoin.amos.supervision.dao.entity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @author xixinzhao
*/
@Data
@Entity
@Table(name="p_hidden_danger")
public class HiddenDanger extends BasicEntity {
private static final long serialVersionUID = 1L;
/**
* 隐患id
*/
@Column(name="latent_danger_id")
private Long latentDangerId;
/**
* 检查记录id
*/
@Column(name="check_id")
private Long checkId;
/**
* 检查项记录id
*/
@Column(name="check_input_id")
private Long checkInputId;
/**
* 计划id
*/
@Column(name="plan_id")
private Long planId;
/**
* 点id
*/
@Column(name="point_id")
private Long pointId;
/**
* 隐患类型(1-防火监督检查;2-自行检查)
*/
@Column(name="danger_type")
private Long dangerType;
/**
* 隐患类型名称
*/
@Column(name="danger_type_name")
private Long dangerTypeName;
}
...@@ -222,10 +222,10 @@ public class InputItem extends BasicEntity { ...@@ -222,10 +222,10 @@ public class InputItem extends BasicEntity {
private Integer itemStart; private Integer itemStart;
/** /**
* 扩展属性 * 检查类别IDS
*/ */
// @Transient @Column(name = "item_type_classify_ids")
// private String ext; private Integer itemTypeClassifyIds;
public Integer getItemStart() { public Integer getItemStart() {
return itemStart; return itemStart;
...@@ -514,4 +514,12 @@ public class InputItem extends BasicEntity { ...@@ -514,4 +514,12 @@ public class InputItem extends BasicEntity {
public void setCheckTypeId(String checkTypeId) { public void setCheckTypeId(String checkTypeId) {
this.checkTypeId = checkTypeId; this.checkTypeId = checkTypeId;
} }
public Integer getItemTypeClassifyIds() {
return itemTypeClassifyIds;
}
public void setItemTypeClassifyIds(Integer itemTypeClassifyIds) {
this.itemTypeClassifyIds = itemTypeClassifyIds;
}
} }
\ No newline at end of file
...@@ -845,11 +845,7 @@ public class CommandController extends BaseController { ...@@ -845,11 +845,7 @@ public class CommandController extends BaseController {
buildId = orgUsrzhDto.get(0).getBuildId(); buildId = orgUsrzhDto.get(0).getBuildId();
} }
} }
if (buildId != null) {
//现场照片 待完成,
//平面图。待完成orgUsrzhDto.getBuildId()
if (buildId != null) {
List<Map<String, Object>> list = equipFeignClient.findImgByFileCategory(buildId, "fourImg").getResult(); List<Map<String, Object>> list = equipFeignClient.findImgByFileCategory(buildId, "fourImg").getResult();
List<String> url = new ArrayList<>(); List<String> url = new ArrayList<>();
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
...@@ -857,7 +853,26 @@ public class CommandController extends BaseController { ...@@ -857,7 +853,26 @@ public class CommandController extends BaseController {
url.add(map.get("filePath").toString()); url.add(map.get("filePath").toString());
}); });
} }
//通道
List<Map<String, Object>> list1 = equipFeignClient.findImgByFileCategory(buildId, "secondImg").getResult();
List<String> url1 = new ArrayList<>();
if (list1 != null && list1.size() > 0) {
list1.stream().forEach(map -> {
url1.add(map.get("filePath").toString());
});
}
//立面
List<Map<String, Object>> list2 = equipFeignClient.findImgByFileCategory(buildId, "threeImg").getResult();
List<String> url2 = new ArrayList<>();
if (list2 != null && list2.size() > 0) {
list2.stream().forEach(map -> {
url2.add(map.get("filePath").toString());
});
}
orgusrDataxDto.setPlanePicture(url); orgusrDataxDto.setPlanePicture(url);
orgusrDataxDto.setScenePicture(url1);
orgusrDataxDto.setFacadePicture(url2);
} }
return ResponseHelper.buildResponse(orgusrDataxDto); return ResponseHelper.buildResponse(orgusrDataxDto);
} }
......
...@@ -422,9 +422,9 @@ public class OrgUsrController extends BaseController { ...@@ -422,9 +422,9 @@ public class OrgUsrController extends BaseController {
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getLoginUserDetails", method = RequestMethod.GET) @RequestMapping(value = "/getLoginUserDetails/{userId}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取登陆人绑定的人员关系", notes = "获取登陆人绑定的人员关系") @ApiOperation(httpMethod = "GET", value = "获取登陆人绑定的人员关系", notes = "获取登陆人绑定的人员关系")
public ResponseModel<List<Map<String, Object>>> getLoginUserDetails(@RequestParam(value = "userId", required = false) String userId) { public ResponseModel<List<Map<String, Object>>> getLoginUserDetails(@PathVariable String userId) {
AgencyUserModel user = getUserInfo(); AgencyUserModel user = getUserInfo();
String userIds = userId; String userIds = userId;
if (StringUtils.isEmpty(userIds)) { if (StringUtils.isEmpty(userIds)) {
......
package com.yeejoin.amos.supervision.business.dao.mapper;
/**
* @author DELL
*/
public interface HiddenDangerMapper extends BaseMapper {
}
...@@ -16,6 +16,6 @@ public interface JCSFeignClient { ...@@ -16,6 +16,6 @@ public interface JCSFeignClient {
* @param userId 用户id * @param userId 用户id
* @return ResponseModel<ReginParams.PersonIdentity> * @return ResponseModel<ReginParams.PersonIdentity>
*/ */
@GetMapping(value = "jcs/org-usr/getLoginUserDetails?userId={userId}") @GetMapping(value = "jcs/org-usr/getLoginUserDetails/{userId}")
FeignClientResult getUserUnit(@PathVariable String userId); FeignClientResult getUserUnit(@PathVariable String userId);
} }
package com.yeejoin.amos.supervision.business.param; package com.yeejoin.amos.supervision.business.param;
import com.yeejoin.amos.supervision.core.common.dto.DangerDto;
import com.yeejoin.amos.supervision.dao.entity.CheckShot; import com.yeejoin.amos.supervision.dao.entity.CheckShot;
import lombok.Data; import lombok.Data;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/**
* @author DELL
*/
@Data @Data
public class CheckInputParam { public class CheckInputParam {
private Long id; private Long id;
...@@ -21,4 +25,8 @@ public class CheckInputParam { ...@@ -21,4 +25,8 @@ public class CheckInputParam {
private String depName; private String depName;
private List<CheckShot> checkInputShot = new ArrayList<>(); private List<CheckShot> checkInputShot = new ArrayList<>();
/**
* 隐患列表
*/
private List<DangerDto> dangerList = new ArrayList<>();
} }
package com.yeejoin.amos.supervision.business.service.impl;
import com.yeejoin.amos.supervision.business.service.intfc.IHiddenDangerService;
/**
* @author DELL
*/
public class HiddenDangerServiceImpl implements IHiddenDangerService {
}
package com.yeejoin.amos.supervision.business.service.intfc;
/**
* @author DELL
*/
public interface IHiddenDangerService {
}
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.supervision.business.dao.mapper.HiddenDangerMapper">
</mapper>
\ No newline at end of file
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<if test="itemClassify != null ">item_classify=#{itemClassify},</if> <if test="itemClassify != null ">item_classify=#{itemClassify},</if>
<if test="itemTypeClassify != null ">item_type_classify=#{itemTypeClassify},</if> <if test="itemTypeClassify != null ">item_type_classify=#{itemTypeClassify},</if>
<if test="itemLevel != null ">item_level=#{itemLevel},</if> <if test="itemLevel != null ">item_level=#{itemLevel},</if>
<if test="itemTypeClassifyIds != null ">item_type_classify_ids=#{itemTypeClassifyIds},</if>
</trim> </trim>
WHERE id=#{id} WHERE id=#{id}
</update> </update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment