Browse Source

#操作票、工作票关联数据

zhongwei
yang_shj 1 year ago
parent
commit
be89067b6f
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenancePhenomenonVo.java
  2. 5
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java
  3. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java
  4. 9
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java
  5. 6
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.java
  6. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketInfoMapper.xml
  7. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java
  8. 29
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
  9. 31
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/OperateVo.java
  10. 11
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketInfoController.java
  11. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java
  12. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml
  13. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java
  14. 24
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java
  15. 31
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/vo/WorkVO.java

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/MaintenancePhenomenonVo.java

@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode;
public class MaintenancePhenomenonVo extends BusinessQueryVo {
@ApiModelProperty("缺陷名称")
private String name;
private String faultName;
@ApiModelProperty("是否为缺陷")
private Integer isDefect;

5
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java

@ -10,6 +10,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.*;
import org.springblade.core.mp.support.QueryField;
import org.springblade.core.mp.support.SqlCondition;
@ -486,4 +487,8 @@ public class WorkTicketInfoEntity extends TenantEntity implements Serializable {
@ApiModelProperty("每日开工和收工时间附页")
private Boolean isStart;
@ApiModelProperty("是否合格 : 1-合格")
@TableField(exist=false)
private Integer isQualified;
}

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java

@ -1144,8 +1144,8 @@ public class TargetServiceImpl implements TargetService {
public IPage<OperPhenomenonVO> phenomenon(IPage<OperPhenomenonEntity> page, MaintenancePhenomenonVo business) {
Wrapper<OperPhenomenonEntity> queryWrapper = new LambdaQueryWrapper<OperPhenomenonEntity>() {{
orderByDesc(OperPhenomenonEntity::getCreateTime);
if (!StringUtil.isEmpty(business.getName())) {
like(OperPhenomenonEntity::getName,business.getName());
if (!StringUtil.isEmpty(business.getFaultName())) {
like(OperPhenomenonEntity::getFaultName,business.getFaultName());
}
if (!ObjectUtil.isEmpty(business.getIsDefect())) {
eq(OperPhenomenonEntity::getIsDefect,business.getIsDefect());

9
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java

@ -13,6 +13,7 @@ import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.standardTicket.dto.StandardTicketInfoDto;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService;
import com.hnac.hzims.ticket.standardTicket.vo.OperateVo;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -21,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil;
@ -127,4 +129,11 @@ public class StandardTicketInfoController extends BladeController {
standardTicketInfoService.areaMonthlyWithOperation(areaMonthlyVo, searchPage);
return R.data(standardTicketInfoEntity);
}
@GetMapping("/operate")
@ApiOperationSupport(order = 90)
@ApiOperation(value = "操作票-关联数据")
public R<IPage<StandardTicketInfoVO>> operate(OperateVo operate, Query query) {
return R.data(standardTicketInfoService.operate(Condition.getPage(query),operate));
}
}

6
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.java

@ -1,11 +1,15 @@
package com.hnac.hzims.ticket.standardTicket.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.vo.OperateTicketStatisticVO;
import com.hnac.hzims.ticket.standardTicket.vo.OperateVo;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.vo.SafeCheckStatisticVO;
import org.apache.ibatis.annotations.Mapper;
@ -58,4 +62,6 @@ public interface StandardTicketInfoMapper extends UserDataScopeBaseMapper<Standa
@Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper);
List<Map> selectTicketList(@Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper);
IPage<StandardTicketInfoEntity> pageCondition(IPage<StandardTicketInfoEntity> page, @Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper);
}

7
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketInfoMapper.xml

@ -87,4 +87,11 @@
left join hzims_ticket_info_evaluate tie on ti.id = tie.ticket_id and tie.is_deleted = 0
${ew.customSqlSegment}
</select>
<select id="pageCondition" resultType="com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity">
SELECT oper.*,eva.`status` isQualified FROM hzims_standard_ticket_info oper
LEFT JOIN hzims_ticket_info_evaluate eva
ON oper.id = eva.ticket_id
${ew.customSqlSegment}
</select>
</mapper>

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java

@ -8,6 +8,7 @@ import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.standardTicket.dto.StandardTicketInfoDto;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.vo.OperateVo;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
import com.hnac.hzims.ticket.twoTicket.vo.ticket.StandardTicketCountQueryVo;
import com.hnac.hzims.ticket.twoTicket.vo.ticket.TicketCountQueryVo;
@ -138,4 +139,6 @@ public interface IStandardTicketInfoService extends BaseService<StandardTicketIn
* @return
*/
IPage<StandardTicketInfoVO> listByOperationTicketWithKeyword(Page<StandardTicketInfoEntity> entityPage, StandardTicketCountQueryVo ticketCountQueryVo);
IPage<StandardTicketInfoVO> operate(IPage<StandardTicketInfoEntity> page,OperateVo operate);
}

29
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java

@ -1,6 +1,7 @@
package com.hnac.hzims.ticket.standardTicket.service.impl;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -8,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity;
import com.hnac.hzims.ticket.allTicket.entity.TicketInfoEvaluateEntity;
import com.hnac.hzims.ticket.allTicket.service.TicketInfoEvaluateService;
import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO;
@ -25,6 +27,7 @@ import com.hnac.hzims.ticket.standardTicket.mapper.StandardTicketInfoMapper;
import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService;
import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketMeasureService;
import com.hnac.hzims.ticket.standardTicket.vo.OperateTicketStatisticVO;
import com.hnac.hzims.ticket.standardTicket.vo.OperateVo;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketMeasureVO;
import com.hnac.hzims.ticket.standardTicket.wrapper.StandardTicketInfoWrapper;
@ -49,10 +52,7 @@ import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.*;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.flow.core.vo.ComleteTask;
import org.springblade.system.cache.DictCache;
@ -775,4 +775,25 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl<StandardTicke
page.setRecords(StandardTicketInfoWrapper.build().listVO(entityPage1.getRecords()));
return page;
}
/**
* 操作票-关联数据
* @param page
* @param business
* @return
*/
@Override
public IPage<StandardTicketInfoVO> operate(IPage<StandardTicketInfoEntity> page,OperateVo business) {
QueryWrapper<StandardTicketInfoEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.ge(Func.isNotEmpty(business.getStartTime()), "oper.create_time", business.getStartTime());
queryWrapper.le(Func.isNotEmpty(business.getEndTime()), "oper.create_time", business.getEndTime());
queryWrapper.in(Func.isNotEmpty(business.getDeptIds()), "oper.create_dept",Func.toLongList(",",business.getDeptIds()));
queryWrapper.like(Func.isNotEmpty(business.getCode()), "oper.code", business.getCode());
queryWrapper.eq(Func.isNotEmpty(business.getTicketType()), "oper.ticket_type", business.getTicketType());
queryWrapper.eq(Func.isNotEmpty(business.getStatus()), "eva.status", business.getStatus());
IPage pages = this.baseMapper.pageCondition(page, queryWrapper);
pages.setRecords(StandardTicketInfoWrapper.build().listVO(pages.getRecords()));
return pages;
}
}

31
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/vo/OperateVo.java

@ -0,0 +1,31 @@
package com.hnac.hzims.ticket.standardTicket.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author ysj
*/
@Data
@EqualsAndHashCode
public class OperateVo {
@ApiModelProperty("开始时间")
private String startTime;
@ApiModelProperty("结束时间")
private String endTime;
@ApiModelProperty("机构Id")
private String deptIds;
@ApiModelProperty("开票种类")
private String ticketType;
@ApiModelProperty("操作票编码")
private String code;
@ApiModelProperty("是否合格:0-合格 1-不合格")
private Integer status;
}

11
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketInfoController.java

@ -13,6 +13,8 @@ import com.hnac.hzims.ticket.areamonthly.vo.AreaMonthlyVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo;
import com.hnac.hzims.ticket.constants.DictConstants;
import com.hnac.hzims.ticket.standardTicket.vo.OperateVo;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
import com.hnac.hzims.ticket.workTicket.dto.TicketAccessTaskDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkInfoFlowDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto;
@ -20,10 +22,12 @@ import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketBillVO;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketInfoVO;
import com.hnac.hzims.ticket.workTicket.vo.WorkVO;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
@ -207,5 +211,12 @@ public class WorkTicketInfoController {
return R.data(workTicketInfoService.getWorkTicketBill(emCode, startTime, endTime));
}
@GetMapping("/work")
@ApiOperationSupport(order = 90)
@ApiOperation(value = "工作票-关联数据")
public R<IPage<WorkTicketInfoVO>> work(WorkVO work, Query query) {
return R.data(workTicketInfoService.work(Condition.getPage(query),work));
}
}

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java

@ -1,6 +1,7 @@
package com.hnac.hzims.ticket.workTicket.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
@ -70,4 +71,6 @@ public interface WorkTicketInfoMapper extends UserDataScopeBaseMapper<WorkTicket
@UserDataAuth
List<Map> selectTicketList(@Param(Constants.WRAPPER) QueryWrapper<WorkTicketInfoEntity> queryWrapper);
IPage<WorkTicketInfoEntity> pageCondition(IPage<WorkTicketInfoEntity> page, @Param(Constants.WRAPPER) QueryWrapper<WorkTicketInfoEntity> queryWrapper);
}

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml

@ -111,6 +111,10 @@
left join hzims_ticket_info_evaluate tie on ti.id = tie.ticket_id and tie.is_deleted = 0
${ew.customSqlSegment}
</select>
<select id="pageCondition" resultType="com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity">
SELECT works.*,eva.`status` isQualified FROM hzims_work_ticket_info works
LEFT JOIN hzims_ticket_info_evaluate eva
ON works.id = eva.ticket_id
${ew.customSqlSegment}
</select>
</mapper>

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java

@ -11,6 +11,7 @@ import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketBillVO;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketInfoVO;
import com.hnac.hzims.ticket.workTicket.vo.WorkVO;
import com.hnac.hzims.vo.SafeCheckStatisticVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.BladePage;
@ -180,4 +181,5 @@ public interface IWorkTicketInfoService extends BaseService<WorkTicketInfoEntity
IPage<WorkTicketInfoVO> listByTicketWithKeyword(Page<WorkTicketInfoEntity> entityPage, TicketCountQueryVo ticketCountQueryVo);
IPage<WorkTicketInfoVO> work(IPage<WorkTicketInfoEntity> page, WorkVO work);
}

24
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java

@ -30,15 +30,15 @@ import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.twoTicket.service.TicketInfoDangerService;
import com.hnac.hzims.ticket.twoTicket.service.impl.WorkTicketFinishServiceImpl;
import com.hnac.hzims.ticket.twoTicket.vo.ticket.TicketCountQueryVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.twoTicket.vo.ticket.TicketCountQueryVo;
import com.hnac.hzims.ticket.utils.ExcelUtil;
import com.hnac.hzims.ticket.utils.PdfUtils;
import com.hnac.hzims.ticket.workTicket.dto.*;
import com.hnac.hzims.ticket.workTicket.entity.*;
import com.hnac.hzims.ticket.workTicket.mapper.WorkDelayNoScopeMapper;
import com.hnac.hzims.ticket.workTicket.mapper.WorkTicketInfoMapper;
import com.hnac.hzims.ticket.workTicket.service.*;
import com.hnac.hzims.ticket.utils.PdfUtils;
import com.hnac.hzims.ticket.workTicket.vo.*;
import com.hnac.hzims.ticket.workTicket.wrapper.WorkTicketDelayWrapper;
import com.hnac.hzims.ticket.workTicket.wrapper.WorkTicketInfoWrapper;
@ -1205,4 +1205,24 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
});
return workTicketInfoVOIPage;
}
/**
* 工作票-关联数据
* @param page
* @param business
* @return
*/
@Override
public IPage<WorkTicketInfoVO> work(IPage<WorkTicketInfoEntity> page, WorkVO business) {
QueryWrapper<WorkTicketInfoEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.ge(Func.isNotEmpty(business.getStartTime()), "works.create_time", business.getStartTime());
queryWrapper.le(Func.isNotEmpty(business.getEndTime()), "works.create_time", business.getEndTime());
queryWrapper.in(Func.isNotEmpty(business.getDeptIds()), "works.create_dept",Func.toLongList(",",business.getDeptIds()));
queryWrapper.like(Func.isNotEmpty(business.getCode()), "works.code", business.getCode());
queryWrapper.eq(Func.isNotEmpty(business.getType()), "works.type", business.getType());
queryWrapper.eq(Func.isNotEmpty(business.getStatus()), "eva.status", business.getStatus());
IPage pages = this.baseMapper.pageCondition(page,queryWrapper);
pages.setRecords(WorkTicketInfoWrapper.build().listVO(pages.getRecords()));
return pages;
}
}

31
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/vo/WorkVO.java

@ -0,0 +1,31 @@
package com.hnac.hzims.ticket.workTicket.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.QueryField;
import org.springblade.core.mp.support.SqlCondition;
/**
* @author ysj
*/
@Data
public class WorkVO {
@ApiModelProperty("开始时间")
private String startTime;
@ApiModelProperty("结束时间")
private String endTime;
@ApiModelProperty("机构Id")
private String deptIds;
@ApiModelProperty("工作票类型")
private String type;
@ApiModelProperty("工作票编码")
private String code;
@ApiModelProperty("状态")
private Integer status;
}
Loading…
Cancel
Save