Browse Source

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into feature_v1.0

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
be4e6a8684
8 changed files with 40 additions and 17 deletions
  1. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java
  2. +3
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java
  3. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/workorder/QueryWorkOrderPageListRequest.java
  4. +5
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java
  5. +1
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateInspectionStatusService.java
  6. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/export/GenerateReportWordService.java
  7. +10
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml
  8. +16
    -8
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/WorkOrderMapper.xml

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java View File

@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

@@ -22,6 +23,7 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_inspection")
@ToString(callSuper = true)
public class Inspection extends BaseEntity {

private static final long serialVersionUID = 1L;

+ 3
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java View File

@@ -47,7 +47,9 @@ public interface InspectionMapper extends BaseMapper<Inspection> {
* @param inspection 巡检任务
* @return 结果
*/
int update(Inspection inspection);
int update(Inspection inspection);

int updateStatus(Inspection inspection);

int updateByPrimaryKeySelective(Inspection request);


+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/workorder/QueryWorkOrderPageListRequest.java View File

@@ -31,14 +31,14 @@ public class QueryWorkOrderPageListRequest extends BaseQuery {
/**
* 工单生成开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date beginTime;

/**
* 工单生成结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;


+ 5
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java View File

@@ -53,7 +53,6 @@ public class UpdateFlightStatusService {
Inspection inspectionUpdate = new Inspection();
inspectionUpdate.setId(inspection.getId());
JsonResult result = startAI(missionStatusRequest);

if (0 != result.getCode()) {
//如果调用DSP失败就直接失败!
log.info("修改任务状态业务接口:调用DSP数据失败:{}", result.getMsg());
@@ -66,13 +65,14 @@ public class UpdateFlightStatusService {
log.info("dsp响应体:{}", JacksonUtil.obj2StringPretty(dspCallbackVo));

log.info("修改inspection status 开始");
log.info("inspectionUpdate id : {}", inspectionUpdate.getId());
log.info("inspectionUpdate status", InspectionStatusEnum.IN_FLIGHT.getCode());
inspectionUpdate.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode());
log.info("修改inspection:{}", inspectionUpdate);
Integer count = inspectionMapper.updateById(inspectionUpdate);
inspectionUpdate.setUpdateTime(DateUtils.now());
log.info("inspectionUpdate:{}", inspectionUpdate);
Integer count = inspectionMapper.updateStatus(inspectionUpdate);
if (count <= 0) {
log.info("修改inspection status 失败");
} else {
log.info("修改inspection status 成功");
}
log.info("修改inspection status 结束");


+ 1
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateInspectionStatusService.java View File

@@ -78,6 +78,7 @@ public class UpdateInspectionStatusService {
.eq(Inspection::getId, missionStatusRequest.getRequestId())
.eq(Inspection::getInspectionLine, missionStatusRequest.getId()));
if (ObjectUtil.isEmpty(inspection)) {
log.info("任务不存在");
return JsonResult.error(EditInspectionStatusCodeEnum.INSPECTION_IS_NOT_EXIST.getCode(), EditInspectionStatusCodeEnum.INSPECTION_IS_NOT_EXIST.getMsg());
}
return JsonResult.success(inspection);

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/export/GenerateReportWordService.java View File

@@ -354,7 +354,7 @@ public class GenerateReportWordService {
} else {
imageTileCell = this.getCell(font, "处理图片" + (i+1));
}
imageUrl = CommonConfig.imageURL + list.get(i);
imageUrl = list.get(i);
Cell imageCell = this.getImageCell(imageUrl);
table.addCell(imageTileCell);
table.addCell(imageCell);

+ 10
- 0
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml View File

@@ -188,6 +188,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>

<update id="updateStatus" parameterType="com.tuoheng.admin.entity.Inspection">
update th_inspection
<trim prefix="SET" suffixOverrides=",">
<if test="status != null"> status = #{status}, </if>
<if test="updateUser != null and updateUser != ''"> update_user = #{updateUser},</if>
<if test="updateTime != null and updateTime != ''"> update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>

<update id="updateByPrimaryKeySelective" parameterType="com.tuoheng.admin.entity.Inspection">
update th_inspection
<set>

+ 16
- 8
tuoheng-service/tuoheng-admin/src/main/resources/mapper/WorkOrderMapper.xml View File

@@ -48,18 +48,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="1 == 1"> and mark = 1 </if>
<if test="request.code != null and request.code != 0"> and code = #{request.code} </if>
<if test="request.status != null and request.status != ''"> and status = #{request.status} </if>
<if test="request.userDeptId != null and request.userDeptId != ''"> and assign_dept_id = #{request.userDeptId} </if>
<if test="request.deptIdList != null and request.deptIdList.size() > 0">
or dept_id in
<foreach item="deptId" collection="request.deptIdList" open="(" separator="," close=")">
#{deptId}
</foreach>
<if test="(request.userDeptId != null and request.userDeptId != '') or (request.deptIdList != null and request.deptIdList.size() > 0)">
and (
<trim prefixOverrides="or">
<if test="(request.userDeptId != null and request.userDeptId != '')">
or assign_dept_id = #{request.userDeptId}
</if>
<if test="request.deptIdList != null and request.deptIdList.size() > 0">
or dept_id in
<foreach item="deptId" collection="request.deptIdList" open="(" separator="," close=")">
#{deptId}
</foreach>
</if>
</trim>
)
</if>
<if test="request.beginTime != null">
and check_time &gt;= #{request.beginTime}
and create_time &gt;= #{request.beginTime}
</if>
<if test="request.endTime != null">
and check_time &lt;= #{request.endTime}
and create_time &lt;= #{request.endTime}
</if>
</where>
order by create_time desc

Loading…
Cancel
Save