Browse Source

# 第一种工作票线下预览

zhongwei
haungxing 11 months ago
parent
commit
461ca6f4ce
  1. 4
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/fegin/IWorkTaskClient.java
  2. 19
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java
  3. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java
  4. 17
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java

4
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/repair/fegin/IWorkTaskClient.java

@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.RequestBody;
* @author ysj * @author ysj
*/ */
@FeignClient( @FeignClient(
value = TicketConstants.APP_NAME, value = TicketConstants.APP_NAME//,
fallback = RepairClientFallback.class //fallback = RepairClientFallback.class
) )
public interface IWorkTaskClient { public interface IWorkTaskClient {

19
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java

@ -1,9 +1,19 @@
package com.hnac.hzims.ticket.twoTicket.controller; package com.hnac.hzims.ticket.twoTicket.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.common.utils.Condition;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* <p> * <p>
* 工作结束 前端控制器 * 工作结束 前端控制器
@ -14,7 +24,16 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@RestController @RestController
@RequestMapping("/p/work-ticket-finish") @RequestMapping("/p/work-ticket-finish")
@AllArgsConstructor
public class WorkTicketFinishController { public class WorkTicketFinishController {
private final IWorkTicketFinishService finishService;
@GetMapping("/list")
public R<List<WorkTicketFinish>> list (WorkTicketFinish req) {
LambdaQueryWrapper<WorkTicketFinish> queryWrapper = Condition.getQueryWrapper(WorkTicketFinish.class, req);
return R.data(finishService.list(queryWrapper));
}
} }

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java

@ -1,14 +1,13 @@
package com.hnac.hzims.ticket.twoTicket.entity; package com.hnac.hzims.ticket.twoTicket.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; 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 lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springblade.core.mp.support.QueryField;
import org.springblade.core.mp.support.SqlCondition;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
@ -40,6 +39,7 @@ public class WorkTicketFinish implements Serializable {
* 工作票编号 * 工作票编号
*/ */
@ApiModelProperty("工作票编号") @ApiModelProperty("工作票编号")
@QueryField(condition = SqlCondition.EQUAL)
@TableField("ticket_id") @TableField("ticket_id")
private Long ticketId; private Long ticketId;

17
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java

@ -371,12 +371,23 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa
WorkTicketFinish finish = workTicketFinishService.selectByTicketId(ticketId); WorkTicketFinish finish = workTicketFinishService.selectByTicketId(ticketId);
if(ObjectUtil.isNotEmpty(finish)) { if(ObjectUtil.isNotEmpty(finish)) {
if(Func.isNotEmpty(finish.getWorkEndTime())) { if(Func.isNotEmpty(finish.getWorkEndTime())) {
params.put("principalName3",params.get("principalName")); if(workTicketInfoEntity.getIsOffline()) {
params.put("licensorName1",params.get("licensorName")); params.put("principalName3",finish.getEndPrincipalName());
params.put("licensorName1",finish.getFinishLicensorName());
}
else {
params.put("principalName3",params.get("principalName"));
params.put("licensorName1",params.get("licensorName"));
}
params.putAll(ObjectUtils.LocalDateConvertMap(finish.getWorkEndTime(),"f","_")); params.putAll(ObjectUtils.LocalDateConvertMap(finish.getWorkEndTime(),"f","_"));
} }
if(Func.isNotEmpty(finish.getLicensorEndTime())) { if(Func.isNotEmpty(finish.getLicensorEndTime())) {
params.put("licensorName2",params.get("licensorName")); if(workTicketInfoEntity.getIsOffline()) {
params.put("licensorName2",finish.getEndLicensorName());
}
else {
params.put("licensorName2",params.get("licensorName"));
}
params.put("groundNum",finish.getGroundNum()); params.put("groundNum",finish.getGroundNum());
params.put("dismantleNum",finish.getDismantleNum()); params.put("dismantleNum",finish.getDismantleNum());
params.put("retainNum",finish.getRetainNum()); params.put("retainNum",finish.getRetainNum());

Loading…
Cancel
Save