Browse Source

修改消缺流程相关字段

zhongwei
tyty 1 year ago
parent
commit
425b4db3f7
  1. 17
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperAppearanceEntity.java
  2. 16
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectEntity.java
  3. 25
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectStatisticsEntity.java
  4. 26
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperPhenomenonEntity.java
  5. 27
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectStatisticsVO.java
  6. 30
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java
  7. 23
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java
  8. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectService.java
  9. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java
  10. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperAppearanceServiceImpl.java
  11. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectServiceImpl.java
  12. 55
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java

17
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperAppearanceEntity.java

@ -96,12 +96,6 @@ public class OperAppearanceEntity extends TenantEntity {
*/ */
@ApiModelProperty(value = "现象文件附件,多个文件url通过,隔开") @ApiModelProperty(value = "现象文件附件,多个文件url通过,隔开")
private String fileUrls; private String fileUrls;
/**
* 初步分析结果
*/
@ApiModelProperty(value = "初步分析结果")
private String initResult;
/** /**
* 甄别人 * 甄别人
@ -121,15 +115,6 @@ public class OperAppearanceEntity extends TenantEntity {
@ApiModelProperty(value = "甄别时间") @ApiModelProperty(value = "甄别时间")
private Date discriminateTime; private Date discriminateTime;
/**
* 甄别状态已甄别 1 和未甄别 0 默认0
*/
@QueryField(condition = SqlCondition.EQUAL)
@ApiModelProperty(value = "甄别状态:已甄别 1 和未甄别 0 ,默认0")
private String discriminateStatus;
/** /**
* 是否为缺陷 * 是否为缺陷
*/ */
@ -165,5 +150,5 @@ public class OperAppearanceEntity extends TenantEntity {
*/ */
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "已有缺陷编码") @ApiModelProperty(value = "已有缺陷编码")
private Long existDefectId; private String existDefectId;
} }

16
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectEntity.java

@ -127,6 +127,13 @@ public class OperDefectEntity extends TenantEntity {
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "处理人") @ApiModelProperty(value = "处理人")
private Long handler; private Long handler;
/**
* 发现人
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "发现人")
private Long finder;
/** /**
* 缺陷等级 * 缺陷等级
*/ */
@ -163,7 +170,7 @@ public class OperDefectEntity extends TenantEntity {
*/ */
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "已有缺陷编码") @ApiModelProperty(value = "已有缺陷编码")
private Long existDefectId; private String existDefectId;
/** /**
* 定论人 * 定论人
*/ */
@ -192,5 +199,10 @@ public class OperDefectEntity extends TenantEntity {
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "计划工时") @ApiModelProperty(value = "计划工时")
private Integer planHours; private Integer planHours;
/**
* 故障名称
*/
@QueryField(condition = SqlCondition.LIKE)
@ApiModelProperty(value = "故障名称")
private String faultName;
} }

25
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperDefectStatisticsEntity.java

@ -225,7 +225,13 @@ public class OperDefectStatisticsEntity extends TenantEntity {
) )
@ApiModelProperty(value = "定论时间") @ApiModelProperty(value = "定论时间")
private Date conclusionTime; private Date conclusionTime;
/**
* 是否为缺陷
*/
@QueryField(condition = SqlCondition.EQUAL)
@JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "是否为缺陷,0 否,1是")
private Integer isDefect;
/** /**
* 计划处理人 * 计划处理人
*/ */
@ -274,6 +280,21 @@ public class OperDefectStatisticsEntity extends TenantEntity {
*/ */
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "已有缺陷编码") @ApiModelProperty(value = "已有缺陷编码")
private Long existDefectId; private String existDefectId;
/**
* 操作票负责人
*/
@ApiModelProperty("操作票负责人")
private Long principal;
/**
* 手填值班负责人
*/
@ApiModelProperty(value = "手填操作票负责人")
private String principalManual;
/**
* 操作票
*/
@ApiModelProperty(value = "操作票")
private String ticketId;
} }

26
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/entity/OperPhenomenonEntity.java

@ -1,6 +1,7 @@
package com.hnac.hzims.operational.defect.entity; package com.hnac.hzims.operational.defect.entity;
import com.baomidou.mybatisplus.annotation.SqlCondition; import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@ -370,6 +371,29 @@ public class OperPhenomenonEntity extends TenantEntity {
*/ */
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
@ApiModelProperty(value = "已有缺陷编码") @ApiModelProperty(value = "已有缺陷编码")
private Long existDefectId; private String existDefectId;
/**
* 操作票负责人
*/
@ApiModelProperty("操作票负责人")
private Long principal;
/**
* 手填操作票负责人
*/
@ApiModelProperty(value = "手填操作票负责人")
private String principalManual;
/**
* 操作票
*/
@ApiModelProperty(value = "操作票")
private String ticketId;
/**
* 处理人
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@TableField(exist = false)
@ApiModelProperty(value = "处理人")
private Long flowHandler;
} }

27
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/OperDefectStatisticsVO.java

@ -1,9 +1,13 @@
package com.hnac.hzims.operational.defect.vo; package com.hnac.hzims.operational.defect.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity; import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/** /**
* 模型VO * 模型VO
@ -36,4 +40,27 @@ public class OperDefectStatisticsVO extends OperDefectStatisticsEntity {
@ApiModelProperty("机构名称") @ApiModelProperty("机构名称")
private String deptName; private String deptName;
/**
* 定论时间范围-最晚
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "定论时间范围-最晚")
private Date conclusionEndTime;
/**
* 定论时间范围-最晚
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "定论时间范围-最晚")
private Date createEndTime;
} }

30
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java

@ -2,7 +2,6 @@ package com.hnac.hzims.operational.defect.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.invalid.DictInvalid; import com.hnac.hzims.common.invalid.DictInvalid;
import com.hnac.hzims.common.invalid.ObjectRequiredInvalid; import com.hnac.hzims.common.invalid.ObjectRequiredInvalid;
@ -12,7 +11,6 @@ import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.defect.entity.OperDefectEntity; import com.hnac.hzims.operational.defect.entity.OperDefectEntity;
import com.hnac.hzims.operational.defect.service.IOperDefectService; import com.hnac.hzims.operational.defect.service.IOperDefectService;
import com.hnac.hzims.operational.defect.vo.OperDefectVO; import com.hnac.hzims.operational.defect.vo.OperDefectVO;
import com.hnac.hzims.operational.defect.wrapper.OperDefectWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -20,18 +18,15 @@ import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog; import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.flow.core.entity.BladeFlow; import org.springblade.flow.core.entity.BladeFlow;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.time.YearMonth;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -71,27 +66,10 @@ public class OperDefectController extends BladeController {
@OperationAnnotation(moduleName = "缺陷管理", @OperationAnnotation(moduleName = "缺陷管理",
title = "缺陷库", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, action title = "缺陷库", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, action
= "分页") = "分页")
public R<IPage<OperDefectVO>> list(OperDefectEntity defect, Query query) { public R<IPage<OperDefectEntity>> list(OperDefectVO defect, Query query) {
LambdaQueryWrapper<OperDefectEntity> queryWrapper = Condition.getQueryWrapper(new OperDefectEntity(), defect); LambdaQueryWrapper<OperDefectEntity> queryWrapper = defectService.getQueryWrapper(defect);
if (defect.getActStartTime() != null) { IPage<OperDefectEntity> page = defectService.page(Condition.getPage(query), queryWrapper);
queryWrapper.ge(OperDefectEntity::getActStartTime, defect.getActStartTime()); return R.data(page);
}
if (defect.getActEndTime() != null) {
queryWrapper.le(OperDefectEntity::getActEndTime, defect.getActEndTime());
}
if (defect.getStartTime() != null) {
queryWrapper.ge(OperDefectEntity::getCreateTime, defect.getStartTime());
}
if (defect.getEndTime() != null) {
queryWrapper.le(OperDefectEntity::getCreateTime, defect.getEndTime());
}
if (defect.getCreateDept() != null) {
queryWrapper.eq(OperDefectEntity::getCreateDept, defect.getCreateDept());
}
queryWrapper.orderByDesc(OperDefectEntity::getActStartTime);
IPage<OperDefectEntity> pages = defectService.page(Condition.getPage(query), queryWrapper);
IPage<OperDefectVO> vos = OperDefectWrapper.build().pageVO(pages);
return R.data(vos);
} }

23
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java

@ -7,9 +7,7 @@ import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO; import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO;
import com.hnac.hzims.operational.defect.entity.OperDefectEntity;
import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity; import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity;
import com.hnac.hzims.operational.defect.entity.OperFaultEntity;
import com.hnac.hzims.operational.defect.service.IOperDefectStatisticsService; import com.hnac.hzims.operational.defect.service.IOperDefectStatisticsService;
import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO;
import com.hnac.hzims.operational.defect.wrapper.OperDefectStatisticsWrapper; import com.hnac.hzims.operational.defect.wrapper.OperDefectStatisticsWrapper;
@ -24,13 +22,14 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.entity.Dept; import org.springblade.system.entity.Dept;
import org.springblade.system.feign.ISysClient; import org.springblade.system.feign.ISysClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -72,18 +71,8 @@ public class OperDefectStatisticsController extends BladeController {
}) })
@OperationAnnotation(moduleName = "缺陷管理",title = "缺陷记录",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action @OperationAnnotation(moduleName = "缺陷管理",title = "缺陷记录",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action
= "分页") = "分页")
public R<IPage<OperDefectStatisticsVO>> list( OperDefectStatisticsEntity entity, Query query) { public R<IPage<OperDefectStatisticsVO>> list( OperDefectStatisticsVO entity, Query query) {
LambdaQueryWrapper<OperDefectStatisticsEntity> queryWrapper = Condition.getQueryWrapper(new OperDefectStatisticsEntity(),entity); LambdaQueryWrapper<OperDefectStatisticsEntity> queryWrapper = statisticsService.getQueryWrapper(entity);
if(entity.getActStartTime()!=null){
queryWrapper.ge(OperDefectStatisticsEntity::getActStartTime,entity.getActStartTime());
}
if(entity.getActEndTime()!=null){
queryWrapper.le(OperDefectStatisticsEntity::getActStartTime,entity.getActEndTime());
}
if (entity.getCreateDept() != null) {
queryWrapper.eq(OperDefectStatisticsEntity::getCreateDept, entity.getCreateDept());
}
queryWrapper.orderByDesc(OperDefectStatisticsEntity::getActStartTime);
IPage<OperDefectStatisticsEntity> pages = statisticsService.page(Condition.getPage(query), queryWrapper); IPage<OperDefectStatisticsEntity> pages = statisticsService.page(Condition.getPage(query), queryWrapper);
IPage<OperDefectStatisticsVO> vos = OperDefectStatisticsWrapper.build().pageVO(pages); IPage<OperDefectStatisticsVO> vos = OperDefectStatisticsWrapper.build().pageVO(pages);
if(CollectionUtil.isNotEmpty(vos.getRecords())){ if(CollectionUtil.isNotEmpty(vos.getRecords())){

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectService.java

@ -101,5 +101,5 @@ public interface IOperDefectService extends BaseService<OperDefectEntity> {
*/ */
IPage<OperDefectEntity> selectPage(Page<OperDefectEntity> operDefectEntityPage, OperDefectEntity defect); IPage<OperDefectEntity> selectPage(Page<OperDefectEntity> operDefectEntityPage, OperDefectEntity defect);
LambdaQueryWrapper<OperDefectEntity> getQueryWrapper(OperDefectVO defectVO); LambdaQueryWrapper<OperDefectEntity> getQueryWrapper(OperDefectVO defect);
} }

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

@ -1,7 +1,9 @@
package com.hnac.hzims.operational.defect.service; package com.hnac.hzims.operational.defect.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO; import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO;
import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity; import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity;
import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
import java.util.List; import java.util.List;
@ -20,4 +22,7 @@ public interface IOperDefectStatisticsService extends BaseService<OperDefectStat
* @return * @return
*/ */
List<OperDefectStatisticsDTO> getEMStaticstic(String emCode); List<OperDefectStatisticsDTO> getEMStaticstic(String emCode);
LambdaQueryWrapper<OperDefectStatisticsEntity> getQueryWrapper(OperDefectStatisticsVO statistics);
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperAppearanceServiceImpl.java

@ -54,8 +54,8 @@ public class OperAppearanceServiceImpl extends BaseServiceImpl<OperAppearanceMap
if (Func.isNotEmpty(operAppearanceVO.getIsDiagnosis())) { if (Func.isNotEmpty(operAppearanceVO.getIsDiagnosis())) {
queryWrapper.eq(OperAppearanceEntity::getIsDiagnosis, operAppearanceVO.getIsDiagnosis()); queryWrapper.eq(OperAppearanceEntity::getIsDiagnosis, operAppearanceVO.getIsDiagnosis());
} }
queryWrapper.orderByDesc(OperAppearanceEntity::getUpdateTime);
} }
queryWrapper.orderByDesc(OperAppearanceEntity::getCreateTime);
return queryWrapper; return queryWrapper;
} }
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectServiceImpl.java

@ -173,8 +173,8 @@ public class OperDefectServiceImpl extends BaseServiceImpl<OperDefectMapper, Ope
if (Func.isNotEmpty(defectVO.getIsDiagnosis())) { if (Func.isNotEmpty(defectVO.getIsDiagnosis())) {
queryWrapper.eq(OperDefectEntity::getIsDiagnosis, defectVO.getIsDiagnosis()); queryWrapper.eq(OperDefectEntity::getIsDiagnosis, defectVO.getIsDiagnosis());
} }
queryWrapper.orderByDesc(OperDefectEntity::getUpdateTime);
} }
queryWrapper.orderByDesc(OperDefectEntity::getCreateTime);
return queryWrapper; return queryWrapper;
} }
/** /**

55
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java

@ -1,13 +1,15 @@
package com.hnac.hzims.operational.defect.service.impl; package com.hnac.hzims.operational.defect.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.defect.constants.DefectConstant; import com.hnac.hzims.operational.defect.constants.DefectConstant;
import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO; import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO;
import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity; import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity;
import com.hnac.hzims.operational.defect.mapper.OperDefectStatisticsMapper; import com.hnac.hzims.operational.defect.mapper.OperDefectStatisticsMapper;
import com.hnac.hzims.operational.defect.service.IOperDefectStatisticsService; import com.hnac.hzims.operational.defect.service.IOperDefectStatisticsService;
import org.apache.ibatis.annotations.Param; import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.mp.support.Condition;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.DictCache; import org.springblade.system.cache.DictCache;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -34,4 +36,53 @@ public class OperDefectStatisticsServiceImpl extends BaseServiceImpl<OperDefectS
} }
return this.baseMapper.getEMStaticstic(emCode); return this.baseMapper.getEMStaticstic(emCode);
} }
@Override
public LambdaQueryWrapper<OperDefectStatisticsEntity> getQueryWrapper(OperDefectStatisticsVO statistics) {
LambdaQueryWrapper<OperDefectStatisticsEntity> queryWrapper = Condition.getQueryWrapper(new OperDefectStatisticsEntity(),statistics);
if(statistics.getActStartTime()!=null){
queryWrapper.ge(OperDefectStatisticsEntity::getActStartTime,statistics.getActStartTime());
}
if(statistics.getActEndTime()!=null){
queryWrapper.le(OperDefectStatisticsEntity::getActStartTime,statistics.getActEndTime());
}
if (statistics.getDefectLevel() != null) {
queryWrapper.like(OperDefectStatisticsEntity::getDefectLevel, statistics.getDefectLevel());
}
if (statistics.getDisposer() != null) {
queryWrapper.eq(OperDefectStatisticsEntity::getDisposer, statistics.getDisposer());
}
if (statistics.getConclusion() != null) {
queryWrapper.like(OperDefectStatisticsEntity::getConclusion, statistics.getConclusion());
}
if (statistics.getConclusionTime() != null) {
queryWrapper.le(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionTime());
}
if (Func.isNotEmpty(statistics.getConclusionEndTime())) {
queryWrapper.ge(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionEndTime());
}
if (statistics.getCreateTime() != null) {
queryWrapper.le(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateTime());
}
if (Func.isNotEmpty(statistics.getCreateEndTime())) {
queryWrapper.ge(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateEndTime());
}
if (statistics.getEmCode() != null) {
queryWrapper.eq(OperDefectStatisticsEntity::getEmCode, statistics.getEmCode());
}
if (statistics.getIsWarehousing() != null) {
queryWrapper.eq(OperDefectStatisticsEntity::getIsWarehousing, statistics.getIsWarehousing());
}
if (statistics.getSourceCode() != null) {
queryWrapper.eq(OperDefectStatisticsEntity::getSourceCode, statistics.getSourceCode());
}
if (statistics.getConclusionPeople() != null) {
queryWrapper.eq(OperDefectStatisticsEntity::getConclusionPeople, statistics.getConclusionPeople());
}
if (statistics.getCreateDept() != null) {
queryWrapper.eq(OperDefectStatisticsEntity::getCreateDept, statistics.getCreateDept());
}
queryWrapper.orderByDesc(OperDefectStatisticsEntity::getCreateTime);
return queryWrapper;
}
} }

Loading…
Cancel
Save