Commit 0592f77d authored by helinlin's avatar helinlin

修改bug

parent 42388b5d
...@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component; ...@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
import com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto; import com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto;
import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
* @description: * @description:
* @author: tw * @author: tw
...@@ -28,65 +29,61 @@ public class SeismometeorologyDtoDao { ...@@ -28,65 +29,61 @@ public class SeismometeorologyDtoDao {
/** /**
* 保存对象SeismometeorologyDto * 保存对象SeismometeorologyDto
* @param
* *
* @param
*/ */
public void saveObj(SeismometeorologyDto book) { public void saveObj(SeismometeorologyDto book) {
mongoTemplate.save(book); mongoTemplate.save(book);
} }
/** /**
*
* 24小時预警 * 24小時预警
* **/
* **/ public List<SeismometeorologyDto> findCarStateByWatchSn() {
public List<SeismometeorologyDto> findCarStateByWatchSn(){ System.out.println(new Date().getTime());
System.out.println(new Date().getTime()); Query query = new Query(Criteria.where("releaseTime").gte(getStartTime())
Query query = new Query(Criteria.where("releaseTime").gte(getStartTime()) .lte(getEndTime()));
.lte(getEndTime())); Sort sort = Sort.by(Sort.Direction.DESC, "releaseTime");
Sort sort= Sort.by(Sort.Direction.DESC, "releaseTime"); query.with(sort);
query.with(sort); List<SeismometeorologyDto> gpsList = mongoTemplate.find(query, SeismometeorologyDto.class);
List<SeismometeorologyDto> gpsList = mongoTemplate.find(query, SeismometeorologyDto.class); return gpsList;
return gpsList;
} }
/** /**
* * 当天气象预警
*当天气象预警 **/
* public List<SeismometeorologyDto> findDutyCarStateBy() {
* **/
public List<SeismometeorologyDto> findDutyCarStateBy(){
System.out.println(new Date().getTime()); System.out.println(new Date().getTime());
Query query = new Query(Criteria.where("releaseTime").gte(getStartTime()) Query query = new Query(Criteria.where("releaseTime").gte(getStartTime())
.lte(getEndTime())); .lte(getEndTime()));
Sort sort= Sort.by(Sort.Direction.DESC, "releaseTime"); Sort sort = Sort.by(Sort.Direction.DESC, "releaseTime");
query.with(sort); query.with(sort);
List<SeismometeorologyDto> gpsList = mongoTemplate.find(query, SeismometeorologyDto.class); List<SeismometeorologyDto> gpsList = mongoTemplate.find(query, SeismometeorologyDto.class);
return gpsList; return gpsList;
} }
private static Date getStartTime() { private static Date getStartTime() {
Calendar todayStart = Calendar.getInstance(); Calendar todayStart = Calendar.getInstance();
todayStart.set(Calendar.HOUR_OF_DAY,0); todayStart.set(Calendar.HOUR_OF_DAY, 0);
todayStart.set(Calendar.MINUTE,0); todayStart.set(Calendar.MINUTE, 0);
todayStart.set(Calendar.SECOND,0); todayStart.set(Calendar.SECOND, 0);
todayStart.set(Calendar.MILLISECOND,0); todayStart.set(Calendar.MILLISECOND, 0);
return todayStart.getTime(); return todayStart.getTime();
} }
private static Date getEndTime() { private static Date getEndTime() {
Calendar todayEnd = Calendar.getInstance(); Calendar todayEnd = Calendar.getInstance();
todayEnd.set(Calendar.HOUR_OF_DAY,23); todayEnd.set(Calendar.HOUR_OF_DAY, 23);
todayEnd.set(Calendar.MINUTE,59); todayEnd.set(Calendar.MINUTE, 59);
todayEnd.set(Calendar.SECOND,59); todayEnd.set(Calendar.SECOND, 59);
todayEnd.set(Calendar.MILLISECOND,999); todayEnd.set(Calendar.MILLISECOND, 999);
return todayEnd.getTime(); return todayEnd.getTime();
} }
} }
...@@ -90,7 +90,7 @@ public class LatentDanger extends BasicEntity { ...@@ -90,7 +90,7 @@ public class LatentDanger extends BasicEntity {
/** /**
* 限制时间 * 限制时间
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date reformLimitDate; private Date reformLimitDate;
private Integer overtimeState; private Integer overtimeState;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<dependency> <dependency>
<groupId>cn.afterturn</groupId> <groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId> <artifactId>easypoi-base</artifactId>
<version>3.0.3</version> <version>4.0.0</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>poi-ooxml</artifactId> <artifactId>poi-ooxml</artifactId>
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
<dependency> <dependency>
<groupId>cn.afterturn</groupId> <groupId>cn.afterturn</groupId>
<artifactId>easypoi-web</artifactId> <artifactId>easypoi-web</artifactId>
<version>3.0.3</version> <version>4.0.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.afterturn</groupId> <groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId> <artifactId>easypoi-annotation</artifactId>
<version>3.0.3</version> <version>4.0.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jsoup</groupId> <groupId>org.jsoup</groupId>
......
...@@ -8,300 +8,327 @@ import java.util.List; ...@@ -8,300 +8,327 @@ import java.util.List;
/** /**
* The persistent class for the p_check_input database table. * The persistent class for the p_check_input database table.
*
*/ */
@Entity @Entity
@Table(name="p_check_input") @Table(name = "p_check_input")
@NamedQuery(name="CheckInput.findAll", query="SELECT c FROM CheckInput c") @NamedQuery(name = "CheckInput.findAll", query = "SELECT c FROM CheckInput c")
public class CheckInput extends BasicEntity { public class CheckInput extends BasicEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 巡检记录id * 巡检记录id
*/ */
@Column(name="check_id") @Column(name = "check_id")
private Long checkId; private Long checkId;
/** /**
* 检查项id * 检查项id
*/ */
@Column(name="input_id") @Column(name = "input_id")
private Long inputId; private Long inputId;
/** /**
* 检查项名称 * 检查项名称
*/ */
@Column(name="input_name") @Column(name = "input_name")
private String inputName; private String inputName;
/** /**
* 巡检点检查项 * 巡检点检查项
*/ */
@Column(name="route_point_item_id") @Column(name = "route_point_item_id")
private Long routePointItemId; private Long routePointItemId;
/** /**
* 输入值 * 输入值
*/ */
@Column(name="input_value") @Column(name = "input_value")
private String inputValue; private String inputValue;
/** /**
* 是否合格 * 是否合格
*/ */
@Column(name="is_ok") @Column(name = "is_ok")
private String isOk; private String isOk;
/** /**
* 序号 * 序号
*/ */
@Column(name="order_no") @Column(name = "order_no")
private int orderNo; private int orderNo;
/** /**
* 权限系统org code * 权限系统org code
*/ */
@Column(name="org_code") @Column(name = "org_code")
private String orgCode; private String orgCode;
/** /**
* 检查点分类id * 检查点分类id
*/ */
@Column(name="point_classify_id") @Column(name = "point_classify_id")
private Long pointClassifyId; private Long pointClassifyId;
/** /**
* 检查点分类名称 * 检查点分类名称
*/ */
@Column(name="point_classify_name") @Column(name = "point_classify_name")
private String pointClassifyName; private String pointClassifyName;
/** /**
* 评分 * 评分
*/ */
private int score; private int score;
/** /**
* 备注 * 备注
*/ */
private String remark; private String remark;
/** /**
* 执行人ids * 执行人ids
*/ */
@Column(name="user_id") @Column(name = "user_id")
private String userId; private String userId;
/** /**
* 执行人名称 * 执行人名称
*/ */
@Column(name="user_name") @Column(name = "user_name")
private String userName; private String userName;
/** /**
* 执行部门ids * 陪同检查人ids
*/ */
@Column(name="dep_id") @Column(name = "accompany_user_id")
private String depId; private String accompanyUserId;
/** /**
* 执行部门名称 * 陪同检查人名称
*/ */
@Column(name="dep_name") @Column(name = "accompany_user_name")
private String depName; private String accompanyUserName;
/** /**
* 安全隐患个数 * 执行部门ids
*/ */
@Column(name="safety_danger_num") @Column(name = "dep_id")
private int safetyDangerNum; private String depId;
/** /**
* 重大隐患个数 * 执行部门名称
*/ */
@Column(name="major_danger_num") @Column(name = "dep_name")
private int majorDangerNum; private String depName;
private List<DangerDto> dangerDtoList; /**
* 安全隐患个数
@Transient */
public List<CheckShot> getCheckShotList() { @Column(name = "safety_danger_num")
return checkShotList; private int safetyDangerNum;
}
/**
public void setCheckShotList(List<CheckShot> checkShotList) { * 重大隐患个数
this.checkShotList = checkShotList; */
} @Column(name = "major_danger_num")
private int majorDangerNum;
private List<CheckShot> checkShotList;
private List<DangerDto> dangerDtoList;
public String getRemark() {
return remark; @Transient
} public List<CheckShot> getCheckShotList() {
return checkShotList;
public void setRemark(String remark) { }
this.remark = remark;
} public void setCheckShotList(List<CheckShot> checkShotList) {
this.checkShotList = checkShotList;
public CheckInput() { }
}
private List<CheckShot> checkShotList;
private Check check;
public String getRemark() {
return remark;
public Long getCheckId() { }
return this.checkId;
} public void setRemark(String remark) {
this.remark = remark;
public void setCheckId(Long checkId) { }
this.checkId = checkId;
} public CheckInput() {
}
public Long getInputId() {
return this.inputId; private Check check;
}
public void setInputId(Long inputId) { public Long getCheckId() {
this.inputId = inputId; return this.checkId;
} }
public String getInputValue() { public void setCheckId(Long checkId) {
return this.inputValue; this.checkId = checkId;
} }
public void setInputValue(String inputValue) { public Long getInputId() {
this.inputValue = inputValue; return this.inputId;
} }
public String getIsOk() { public void setInputId(Long inputId) {
return this.isOk; this.inputId = inputId;
} }
public void setIsOk(String isOk) { public String getInputValue() {
this.isOk = isOk; return this.inputValue;
} }
public int getOrderNo() { public void setInputValue(String inputValue) {
return this.orderNo; this.inputValue = inputValue;
} }
public void setOrderNo(int orderNo) { public String getIsOk() {
this.orderNo = orderNo; return this.isOk;
} }
public String getOrgCode() { public void setIsOk(String isOk) {
return this.orgCode; this.isOk = isOk;
} }
public void setOrgCode(String orgCode) { public int getOrderNo() {
this.orgCode = orgCode; return this.orderNo;
} }
public int getScore() { public void setOrderNo(int orderNo) {
return this.score; this.orderNo = orderNo;
} }
public void setScore(int score) { public String getOrgCode() {
this.score = score; return this.orgCode;
} }
@ManyToOne public void setOrgCode(String orgCode) {
@JoinColumn(name = "checkId", referencedColumnName = "id", updatable = false, insertable = false) this.orgCode = orgCode;
public Check getCheck() { }
return check;
} public int getScore() {
return this.score;
public void setCheck(Check check) { }
this.check = check;
} public void setScore(int score) {
this.score = score;
public String getInputName() { }
return inputName;
} @ManyToOne
@JoinColumn(name = "checkId", referencedColumnName = "id", updatable = false, insertable = false)
public void setInputName(String inputName) { public Check getCheck() {
this.inputName = inputName; return check;
} }
public Long getRoutePointItemId() { public void setCheck(Check check) {
return routePointItemId; this.check = check;
} }
public void setRoutePointItemId(Long routePointItemId) { public String getInputName() {
this.routePointItemId = routePointItemId; return inputName;
} }
public Long getPointClassifyId() { public void setInputName(String inputName) {
return pointClassifyId; this.inputName = inputName;
} }
public void setPointClassifyId(Long pointClassifyId) { public Long getRoutePointItemId() {
this.pointClassifyId = pointClassifyId; return routePointItemId;
} }
public String getPointClassifyName() { public void setRoutePointItemId(Long routePointItemId) {
return pointClassifyName; this.routePointItemId = routePointItemId;
} }
public void setPointClassifyName(String pointClassifyName) { public Long getPointClassifyId() {
this.pointClassifyName = pointClassifyName; return pointClassifyId;
} }
public String getUserId() { public void setPointClassifyId(Long pointClassifyId) {
return userId; this.pointClassifyId = pointClassifyId;
} }
public void setUserId(String userId) { public String getPointClassifyName() {
this.userId = userId; return pointClassifyName;
} }
public String getUserName() { public void setPointClassifyName(String pointClassifyName) {
return userName; this.pointClassifyName = pointClassifyName;
} }
public void setUserName(String userName) { public String getUserId() {
this.userName = userName; return userId;
} }
public String getDepId() { public void setUserId(String userId) {
return depId; this.userId = userId;
} }
public void setDepId(String depId) { public String getUserName() {
this.depId = depId; return userName;
} }
public String getDepName() { public void setUserName(String userName) {
return depName; this.userName = userName;
} }
public void setDepName(String depName) { public String getDepId() {
this.depName = depName; return depId;
} }
public int getMajorDangerNum() { public void setDepId(String depId) {
return majorDangerNum; this.depId = depId;
} }
public void setMajorDangerNum(int majorDangerNum) { public String getDepName() {
this.majorDangerNum = majorDangerNum; return depName;
} }
public int getSafetyDangerNum() { public void setDepName(String depName) {
return safetyDangerNum; this.depName = depName;
} }
public void setSafetyDangerNum(int safetyDangerNum) { public int getMajorDangerNum() {
this.safetyDangerNum = safetyDangerNum; return majorDangerNum;
} }
@Transient public void setMajorDangerNum(int majorDangerNum) {
public List<DangerDto> getDangerDtoList() { this.majorDangerNum = majorDangerNum;
return dangerDtoList; }
}
public int getSafetyDangerNum() {
public void setDangerDtoList(List<DangerDto> dangerDtoList) { return safetyDangerNum;
this.dangerDtoList = dangerDtoList; }
}
public void setSafetyDangerNum(int safetyDangerNum) {
this.safetyDangerNum = safetyDangerNum;
}
@Transient
public List<DangerDto> getDangerDtoList() {
return dangerDtoList;
}
public void setDangerDtoList(List<DangerDto> dangerDtoList) {
this.dangerDtoList = dangerDtoList;
}
public String getAccompanyUserId() {
return accompanyUserId;
}
public void setAccompanyUserId(String accompanyUserId) {
this.accompanyUserId = accompanyUserId;
}
public String getAccompanyUserName() {
return accompanyUserName;
}
public void setAccompanyUserName(String accompanyUserName) {
this.accompanyUserName = accompanyUserName;
}
} }
\ No newline at end of file
...@@ -39,7 +39,9 @@ import io.swagger.annotations.Api; ...@@ -39,7 +39,9 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.exception.BaseException; import org.typroject.tyboot.core.foundation.exception.BaseException;
...@@ -146,6 +148,8 @@ public class CommandController extends BaseController { ...@@ -146,6 +148,8 @@ public class CommandController extends BaseController {
@Autowired @Autowired
IUserCarService userCarService; IUserCarService userCarService;
@Autowired
RestTemplate restTemplate;
/** /**
* 警情列表 * 警情列表
...@@ -1530,4 +1534,13 @@ public class CommandController extends BaseController { ...@@ -1530,4 +1534,13 @@ public class CommandController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "getAMapWeather", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取百度地图天气", notes = "获取百度地图天气")
public ResponseModel<Object> getAMapWeather() {
ResponseEntity<HashMap> weather = restTemplate.getForEntity(
"https://restapi.amap.com/v3/weather/weatherInfo?key=4bee67717254d93067fdbc09cd61c7d9&city=610100&extensions=all",
HashMap.class);
return ResponseHelper.buildResponse(weather);
}
} }
\ No newline at end of file
...@@ -4,10 +4,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams; ...@@ -4,10 +4,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.supervision.business.constants.XJConstant; import com.yeejoin.amos.supervision.business.constants.XJConstant;
import com.yeejoin.amos.supervision.business.dto.CheckDto; import com.yeejoin.amos.supervision.business.dto.CheckDto;
import com.yeejoin.amos.supervision.business.dto.CheckInputItemDto; import com.yeejoin.amos.supervision.business.dto.CheckInputItemDto;
import com.yeejoin.amos.supervision.business.param.CheckInfoPageParam; import com.yeejoin.amos.supervision.business.param.*;
import com.yeejoin.amos.supervision.business.param.CheckPageParam;
import com.yeejoin.amos.supervision.business.param.CheckRecordParam;
import com.yeejoin.amos.supervision.business.param.CheckStatisticalParam;
import com.yeejoin.amos.supervision.business.service.intfc.ICheckService; import com.yeejoin.amos.supervision.business.service.intfc.ICheckService;
import com.yeejoin.amos.supervision.business.service.intfc.IPlanTaskService; import com.yeejoin.amos.supervision.business.service.intfc.IPlanTaskService;
import com.yeejoin.amos.supervision.business.service.intfc.ISafety3DDataSendService; import com.yeejoin.amos.supervision.business.service.intfc.ISafety3DDataSendService;
...@@ -50,6 +47,7 @@ import java.util.Date; ...@@ -50,6 +47,7 @@ import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Consumer;
@RestController @RestController
@RequestMapping(value = "/api/check") @RequestMapping(value = "/api/check")
...@@ -546,8 +544,15 @@ public class CheckController extends AbstractBaseController { ...@@ -546,8 +544,15 @@ public class CheckController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存检查记录", notes = "保存检查记录") @ApiOperation(value = "保存检查记录", notes = "保存检查记录")
@RequestMapping(value = "/saveRecord", produces = "application/json;charset=UTF-8", method = RequestMethod.POST) @RequestMapping(value = "/saveRecord", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public ResponseModel saveSupervisionCheckRecord(@ApiParam(value = "检查信息", required = false) @RequestBody(required = true) CheckRecordParam requestParam) { public ResponseModel saveSupervisionCheckRecord(
@ApiParam(value = "检查信息", required = false)
@RequestBody CheckRecordParam requestParam) {
try { try {
//存放检查人信息
requestParam.getCheckItems().forEach(checkInputParam -> {
checkInputParam.setUserId(getUserId());
checkInputParam.setUserName(getUserInfo().getRealName());
});
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String orgCode = getOrgCode(reginParams); String orgCode = getOrgCode(reginParams);
requestParam.setOrgCode(orgCode); requestParam.setOrgCode(orgCode);
......
...@@ -12,21 +12,23 @@ import java.util.List; ...@@ -12,21 +12,23 @@ import java.util.List;
*/ */
@Data @Data
public class CheckInputParam { public class CheckInputParam {
private Long id; private Long id;
private long inputItemId; private long inputItemId;
private String inputValue; private String inputValue;
private String selectName; private String selectName;
private boolean isCheck; private boolean isCheck;
private String remark; private String remark;
private Long routePointItemId; private Long routePointItemId;
private String userId; private String userId;//检查人ID
private String userName; private String userName;//检查人姓名
private String depId; private String accompanyUserId;//陪同检查人姓名
private String depName; private String accompanyUserName;//陪同检查人姓名
private List<CheckShot> checkInputShot = new ArrayList<>(); private String depId;
private String depName;
private List<CheckShot> checkInputShot = new ArrayList<>();
/** /**
* 隐患列表 * 隐患列表
*/ */
private List<DangerDto> dangerList = new ArrayList<>(); private List<DangerDto> dangerList = new ArrayList<>();
} }
...@@ -1455,6 +1455,8 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1455,6 +1455,8 @@ public class CheckServiceImpl implements ICheckService {
checkInput.setRemark(item.getRemark()); checkInput.setRemark(item.getRemark());
checkInput.setUserId(item.getUserId()); checkInput.setUserId(item.getUserId());
checkInput.setUserName(item.getUserName()); checkInput.setUserName(item.getUserName());
checkInput.setAccompanyUserId(item.getAccompanyUserId());
checkInput.setAccompanyUserName(item.getAccompanyUserName());
checkInput.setDepId(item.getDepId()); checkInput.setDepId(item.getDepId());
checkInput.setDepName(item.getDepName()); checkInput.setDepName(item.getDepName());
//1.校验结果 //1.校验结果
......
...@@ -315,6 +315,10 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService { ...@@ -315,6 +315,10 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
List<CheckShot> shotList = iCheckShotDao.findAllByCheckIdAndCheckInputId(checkInput.getCheckId(), checkInput.getId()); List<CheckShot> shotList = iCheckShotDao.findAllByCheckIdAndCheckInputId(checkInput.getCheckId(), checkInput.getId());
result.put("checkUserId", checkInput.getUserId()); result.put("checkUserId", checkInput.getUserId());
result.put("checkUserName", checkInput.getUserName()); result.put("checkUserName", checkInput.getUserName());
result.put("accompanyUserId", checkInput.getAccompanyUserId());
result.put("accompanyUserName", checkInput.getAccompanyUserName());
result.put("accompanyingUserId", checkInput.getAccompanyUserId());
result.put("accompanyingUserName",checkInput.getAccompanyUserName());
result.put("planExecuteTime", checkInput.getCreateDate()); result.put("planExecuteTime", checkInput.getCreateDate());
result.put("checkPhotoUrl", shotList.stream().map(CheckShot::getPhotoData).collect(Collectors.joining(","))); result.put("checkPhotoUrl", shotList.stream().map(CheckShot::getPhotoData).collect(Collectors.joining(",")));
} }
......
...@@ -5,7 +5,6 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil; ...@@ -5,7 +5,6 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams; import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.alibaba.excel.metadata.Sheet;
import com.google.zxing.BarcodeFormat; import com.google.zxing.BarcodeFormat;
import com.google.zxing.MultiFormatWriter; import com.google.zxing.MultiFormatWriter;
import com.google.zxing.client.j2se.MatrixToImageWriter; import com.google.zxing.client.j2se.MatrixToImageWriter;
...@@ -13,7 +12,6 @@ import com.google.zxing.common.BitMatrix; ...@@ -13,7 +12,6 @@ import com.google.zxing.common.BitMatrix;
import com.yeejoin.amos.supervision.business.vo.PointVo; import com.yeejoin.amos.supervision.business.vo.PointVo;
import com.yeejoin.amos.supervision.exception.YeeException; import com.yeejoin.amos.supervision.exception.YeeException;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.poi.hslf.usermodel.HSLFSlideShow;
import org.apache.poi.hssf.usermodel.*; import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
......
...@@ -44,7 +44,10 @@ public class CheckVo { ...@@ -44,7 +44,10 @@ public class CheckVo {
* 检查人 * 检查人
*/ */
private String userName; private String userName;
/**
* 陪同检查人
*/
private String accompanyUserName;
/** /**
* 责任单位ID * 责任单位ID
*/ */
......
...@@ -16,10 +16,6 @@ ...@@ -16,10 +16,6 @@
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>easypoi-base</artifactId>
<groupId>cn.afterturn</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml</artifactId> <artifactId>poi-ooxml</artifactId>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
</exclusion> </exclusion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"> http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet author="suhuiguang" id="1587367889717-2"> <changeSet author="suhuiguang" id="1587367889717-2">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
<not> <not>
<columnExists tableName="p_point" columnName="last_check_id"/> <columnExists tableName="p_point" columnName="last_check_id"/>
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
</preConditions> </preConditions>
<comment>p_point ADD COLUMN last_check_id</comment> <comment>p_point ADD COLUMN last_check_id</comment>
<sql> <sql>
ALTER TABLE p_point ADD COLUMN `last_check_id` varchar(32) DEFAULT NULL COMMENT '最近检查记录(漏检不算)' AFTER `original_id`; ALTER TABLE p_point ADD COLUMN `last_check_id` varchar(32) DEFAULT NULL COMMENT '最近检查记录(漏检不算)' AFTER
`original_id`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -25,7 +26,8 @@ ...@@ -25,7 +26,8 @@
</preConditions> </preConditions>
<comment>p_input_item ADD COLUMN check_type</comment> <comment>p_input_item ADD COLUMN check_type</comment>
<sql> <sql>
ALTER TABLE p_input_item ADD COLUMN `check_type` varchar(32) DEFAULT NULL COMMENT '检查类别' AFTER `test_requirement`; ALTER TABLE p_input_item ADD COLUMN `check_type` varchar(32) DEFAULT NULL COMMENT '检查类别' AFTER
`test_requirement`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -37,7 +39,8 @@ ...@@ -37,7 +39,8 @@
</preConditions> </preConditions>
<comment>p_input_item ADD COLUMN item_parent</comment> <comment>p_input_item ADD COLUMN item_parent</comment>
<sql> <sql>
ALTER TABLE p_input_item ADD COLUMN `item_parent` varchar(50) DEFAULT NULL COMMENT '父类检查项id' AFTER `check_type`; ALTER TABLE p_input_item ADD COLUMN `item_parent` varchar(50) DEFAULT NULL COMMENT '父类检查项id' AFTER
`check_type`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -49,7 +52,8 @@ ...@@ -49,7 +52,8 @@
</preConditions> </preConditions>
<comment>p_input_item ADD COLUMN item_classify</comment> <comment>p_input_item ADD COLUMN item_classify</comment>
<sql> <sql>
ALTER TABLE p_input_item ADD COLUMN `item_classify` varchar(50) DEFAULT NULL COMMENT '检查项分类' AFTER `item_parent`; ALTER TABLE p_input_item ADD COLUMN `item_classify` varchar(50) DEFAULT NULL COMMENT '检查项分类' AFTER
`item_parent`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -61,7 +65,8 @@ ...@@ -61,7 +65,8 @@
</preConditions> </preConditions>
<comment>p_input_item ADD COLUMN item_type_classify</comment> <comment>p_input_item ADD COLUMN item_type_classify</comment>
<sql> <sql>
ALTER TABLE p_input_item ADD COLUMN `item_type_classify` varchar(50) DEFAULT NULL COMMENT '适用检查类别' AFTER `item_classify`; ALTER TABLE p_input_item ADD COLUMN `item_type_classify` varchar(50) DEFAULT NULL COMMENT '适用检查类别' AFTER
`item_classify`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -73,7 +78,8 @@ ...@@ -73,7 +78,8 @@
</preConditions> </preConditions>
<comment>p_input_item ADD COLUMN item_level</comment> <comment>p_input_item ADD COLUMN item_level</comment>
<sql> <sql>
ALTER TABLE p_input_item ADD COLUMN `item_level` varchar(50) DEFAULT NULL COMMENT '检查项等级' AFTER `item_type_classify`;修改列 ALTER TABLE p_input_item ADD COLUMN `item_level` varchar(50) DEFAULT NULL COMMENT '检查项等级' AFTER
`item_type_classify`;修改列
</sql> </sql>
</changeSet> </changeSet>
...@@ -107,7 +113,8 @@ ...@@ -107,7 +113,8 @@
</preConditions> </preConditions>
<comment>p_plan_task_detail ADD COLUMN executor_name</comment> <comment>p_plan_task_detail ADD COLUMN executor_name</comment>
<sql> <sql>
ALTER TABLE `p_plan_task_detail` ADD COLUMN `executor_name` text DEFAULT null COMMENT '执行人名称' AFTER `executor_id`; ALTER TABLE `p_plan_task_detail` ADD COLUMN `executor_name` text DEFAULT null COMMENT '执行人名称' AFTER
`executor_id`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -119,7 +126,8 @@ ...@@ -119,7 +126,8 @@
</preConditions> </preConditions>
<comment>p_plan_task_detail ADD COLUMN item_num</comment> <comment>p_plan_task_detail ADD COLUMN item_num</comment>
<sql> <sql>
ALTER TABLE `p_plan_task_detail` ADD COLUMN `item_num` int(11) DEFAULT 0 COMMENT '检查项个数' AFTER `executor_name`; ALTER TABLE `p_plan_task_detail` ADD COLUMN `item_num` int(11) DEFAULT 0 COMMENT '检查项个数' AFTER
`executor_name`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -131,7 +139,8 @@ ...@@ -131,7 +139,8 @@
</preConditions> </preConditions>
<comment>p_plan_task_detail ADD COLUMN executed_num</comment> <comment>p_plan_task_detail ADD COLUMN executed_num</comment>
<sql> <sql>
ALTER TABLE `p_plan_task_detail` ADD COLUMN `executed_num` int(11) DEFAULT 0 COMMENT '已执行个数' AFTER `item_num`; ALTER TABLE `p_plan_task_detail` ADD COLUMN `executed_num` int(11) DEFAULT 0 COMMENT '已执行个数' AFTER
`item_num`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -143,7 +152,8 @@ ...@@ -143,7 +152,8 @@
</preConditions> </preConditions>
<comment>p_plan_task_detail ADD COLUMN safety_danger_num</comment> <comment>p_plan_task_detail ADD COLUMN safety_danger_num</comment>
<sql> <sql>
ALTER TABLE `p_plan_task_detail` ADD COLUMN `safety_danger_num` int(11) DEFAULT 0 COMMENT '安全隐患个数' AFTER `executed_num`; ALTER TABLE `p_plan_task_detail` ADD COLUMN `safety_danger_num` int(11) DEFAULT 0 COMMENT '安全隐患个数' AFTER
`executed_num`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -155,7 +165,8 @@ ...@@ -155,7 +165,8 @@
</preConditions> </preConditions>
<comment>p_plan_task_detail ADD COLUMN major_danger_num</comment> <comment>p_plan_task_detail ADD COLUMN major_danger_num</comment>
<sql> <sql>
ALTER TABLE `p_plan_task_detail` ADD COLUMN `major_danger_num` int(11) DEFAULT 0 COMMENT '重大隐患个数' AFTER `safety_danger_num`; ALTER TABLE `p_plan_task_detail` ADD COLUMN `major_danger_num` int(11) DEFAULT 0 COMMENT '重大隐患个数' AFTER
`safety_danger_num`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -165,7 +176,8 @@ ...@@ -165,7 +176,8 @@
</preConditions> </preConditions>
<comment>p_plan_task_detail modify column is_finish</comment> <comment>p_plan_task_detail modify column is_finish</comment>
<sql> <sql>
alter table `p_plan_task_detail` modify column `is_finish` int(11) COMMENT '0-未开始,1-执行中,2-已完成,3-超时漏检(有一个检查项漏检则为漏检)' after `create_date`; alter table `p_plan_task_detail` modify column `is_finish` int(11) COMMENT
'0-未开始,1-执行中,2-已完成,3-超时漏检(有一个检查项漏检则为漏检)' after `create_date`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -189,7 +201,8 @@ ...@@ -189,7 +201,8 @@
</preConditions> </preConditions>
<comment>p_check ADD COLUMN company_name</comment> <comment>p_check ADD COLUMN company_name</comment>
<sql> <sql>
ALTER TABLE `p_check` ADD COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '责任单位名称' AFTER `company_id`; ALTER TABLE `p_check` ADD COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '责任单位名称' AFTER
`company_id`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -201,7 +214,8 @@ ...@@ -201,7 +214,8 @@
</preConditions> </preConditions>
<comment>p_check_input ADD COLUMN safety_danger_num</comment> <comment>p_check_input ADD COLUMN safety_danger_num</comment>
<sql> <sql>
ALTER TABLE `p_check_input` ADD COLUMN `safety_danger_num` int(11) DEFAULT NULL COMMENT '安全隐患个数' AFTER `danger_handle_state`; ALTER TABLE `p_check_input` ADD COLUMN `safety_danger_num` int(11) DEFAULT NULL COMMENT '安全隐患个数' AFTER
`danger_handle_state`;
</sql> </sql>
</changeSet> </changeSet>
...@@ -213,7 +227,8 @@ ...@@ -213,7 +227,8 @@
</preConditions> </preConditions>
<comment>p_check_input ADD COLUMN major_danger_num</comment> <comment>p_check_input ADD COLUMN major_danger_num</comment>
<sql> <sql>
ALTER TABLE `p_check_input` ADD COLUMN `major_danger_num` int(11) DEFAULT NULL COMMENT '重大隐患个数' AFTER `safety_danger_num`; ALTER TABLE `p_check_input` ADD COLUMN `major_danger_num` int(11) DEFAULT NULL COMMENT '重大隐患个数' AFTER
`safety_danger_num`;
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="gaojianqiang" id="1630567666-1"> <changeSet author="gaojianqiang" id="1630567666-1">
...@@ -224,7 +239,7 @@ ...@@ -224,7 +239,7 @@
</preConditions> </preConditions>
<comment>p_input_item ADD COLUMN check_type_id</comment> <comment>p_input_item ADD COLUMN check_type_id</comment>
<sql> <sql>
ALTER TABLE `p_input_item` ADD COLUMN `check_type_id` varchar(32) DEFAULT NULL COMMENT '检查类别字典值'; ALTER TABLE `p_input_item` ADD COLUMN `check_type_id` varchar(32) DEFAULT NULL COMMENT '检查类别字典值';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="gaojianqiang" id="1630567666-2"> <changeSet author="gaojianqiang" id="1630567666-2">
...@@ -257,7 +272,7 @@ ...@@ -257,7 +272,7 @@
</preConditions> </preConditions>
<comment>p_input_item ADD COLUMN item_type_classify_ids</comment> <comment>p_input_item ADD COLUMN item_type_classify_ids</comment>
<sql> <sql>
ALTER TABLE `p_input_item` ADD COLUMN `item_type_classify_ids` varchar(64) DEFAULT NULL COMMENT '检查类别IDS'; ALTER TABLE `p_input_item` ADD COLUMN `item_type_classify_ids` varchar(64) DEFAULT NULL COMMENT '检查类别IDS';
</sql> </sql>
</changeSet> </changeSet>
...@@ -269,10 +284,11 @@ ...@@ -269,10 +284,11 @@
</preConditions> </preConditions>
<comment>add p_check_report table</comment> <comment>add p_check_report table</comment>
<sql> <sql>
CREATE TABLE `p_check_report` ( CREATE TABLE `p_check_report` (
`id` bigint(30) NOT NULL COMMENT '主键', `id` bigint(30) NOT NULL COMMENT '主键',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报告名称', `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '报告名称',
`plan_type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '计划类型(0单位级/1公司级)', `plan_type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT
'计划类型(0单位级/1公司级)',
`plan_task_id` bigint(30) NULL DEFAULT NULL COMMENT '关联计划任务id', `plan_task_id` bigint(30) NULL DEFAULT NULL COMMENT '关联计划任务id',
`check_user` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行人', `check_user` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行人',
`start_check_date` datetime NULL DEFAULT NULL COMMENT '检查实际开始时间', `start_check_date` datetime NULL DEFAULT NULL COMMENT '检查实际开始时间',
...@@ -312,4 +328,29 @@ ...@@ -312,4 +328,29 @@
ALTER TABLE `p_plan` MODIFY COLUMN `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'; ALTER TABLE `p_plan` MODIFY COLUMN `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="helinlin" id="2022-1-5 16:53:48">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="p_check_input" columnName="accompany_user_id"/>
</not>
</preConditions>
<comment>p_check_input add column</comment>
<sql>
alter table `p_check_input` add column `accompany_user_id` text DEFAULT NULL COMMENT '陪同检查人ids';
</sql>
</changeSet>
<changeSet author="helinlin" id="2022-1-5 16:53:48">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="p_check_input" columnName="accompany_user_name"/>
</not>
</preConditions>
<comment>p_check_input add column</comment>
<sql>
alter table `p_check_input` add column `accompany_user_name` text DEFAULT NULL COMMENT '陪同检查人名称';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -2012,6 +2012,7 @@ ...@@ -2012,6 +2012,7 @@
ci.major_danger_num, ci.major_danger_num,
ci.create_date checkTime, ci.create_date checkTime,
ci.user_name, ci.user_name,
ci.accompany_user_name,
pp.original_id, pp.original_id,
pp.name companyName, pp.name companyName,
......
...@@ -1152,6 +1152,8 @@ ...@@ -1152,6 +1152,8 @@
pii.picture_json picJson, pii.picture_json picJson,
pci.user_id userId, pci.user_id userId,
pci.user_name userName, pci.user_name userName,
pci.accompany_user_id accompanyUserId,
pci.accompany_user_name accompanyUserName,
pii.id itemId, pii.id itemId,
group_concat(pcs.photo_data) photoData, group_concat(pcs.photo_data) photoData,
COALESCE (pci.input_value, '') selectValue, COALESCE (pci.input_value, '') selectValue,
......
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