瀏覽代碼

修改根据巡检机场查询巡检任务列表

tags/v1.0.0^2
chengwang 1 年之前
父節點
當前提交
0b4ea1e966
共有 3 個文件被更改,包括 17 次插入18 次删除
  1. +4
    -10
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/query/InspectionQuery.java
  2. +13
    -5
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java
  3. +0
    -3
      tuoheng-service/tuoheng-miniprogram/src/main/resources/mapper/InspectionMapper.xml

+ 4
- 10
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/query/InspectionQuery.java 查看文件

@@ -61,17 +61,17 @@ public class InspectionQuery extends BaseQuery {
private Integer type;

/**
*起始日期(传入)
*日期(传入)
*/
private String startTime;
private String time;

/**
* 结束日期(传入)
*/
private String endTime;
// private String endTime;

/**
* 起始日期,日期类型
* 日期,日期类型
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@@ -91,12 +91,6 @@ public class InspectionQuery extends BaseQuery {
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date executionStartTime;

/**
*执行结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date executionEndTime;


}

+ 13
- 5
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java 查看文件

@@ -65,11 +65,19 @@ public class InspectionServiceImpl implements IInspectionService {
//获取登录人信息,登录人用户名
// String username = SecurityUserUtils.username();
//获取租户id
String tenantId = ShiroUtils.getTenantId();
//String tenantId = ShiroUtils.getTenantId();
String username = "admin";
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery()
.eq(StringUtils.isNotEmpty(username), User::getUsername, username)
.eq(User::getStatus, 1).eq(User::getMark, 1));
if(ObjectUtil.isNull(user)){
return null;
}
String tenantId = user.getTenantId();
if(StringUtils.isEmpty(tenantId)){
return null;
}
query.setTenantId(tenantId);
//查询部门及下级部门列表
List<Dept> list = deptMapper.selectList(Wrappers.<Dept>lambdaQuery()
.eq(Dept::getMark, 1));
@@ -87,9 +95,9 @@ public class InspectionServiceImpl implements IInspectionService {
IPage<InspectionInfoVo> pageDataVo = new Page<>(query.getPage(),query.getLimit());
Date startTime = null;
Date endTime = null;
if(StringUtils.isNotEmpty(query.getStartTime()) && StringUtils.isNotEmpty(query.getEndTime())){
startTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,query.getStartTime()+" 00:00:00");
endTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,query.getEndTime()+" 23:59:59");
if(null != query.getStartTimeDate()){
startTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,query.getTime()+" 00:00:00");
endTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,query.getTime()+" 23:59:59");
}
query.setStartTimeDate(startTime);
query.setEndTimeDate(endTime);
@@ -106,7 +114,7 @@ public class InspectionServiceImpl implements IInspectionService {
int problemsVerifiedNum = 0;
List<InspectionFile> inspectionFileList = inspectionFileMapper.selectList(Wrappers.<InspectionFile>lambdaQuery()
.eq(StringUtils.isNotEmpty(x.getId()), InspectionFile::getInspectionId, x.getId())
.eq(InspectionFile::getTenantId, 0)
.eq(InspectionFile::getTenantId, tenantId)
.eq(InspectionFile::getMark,1));
if(StringUtils.isEmpty(inspectionFileList)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);

+ 0
- 3
tuoheng-service/tuoheng-miniprogram/src/main/resources/mapper/InspectionMapper.xml 查看文件

@@ -82,9 +82,6 @@
<if test="request.inspectionType !=null">
and ti.inspection_type = #{request.inspectionType}
</if>
<if test="request.inspectionLine !=null">
and ti.inspection_line = #{request.inspectionLine}
</if>
<if test="request.type !=null">
and ti.type = #{request.type}
</if>

Loading…
取消
儲存