| | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.zy.crm.manager.utils.TimeCalculatorUtils; |
| | | import com.zy.crm.system.entity.Dept; |
| | | import com.zy.crm.system.entity.Dic; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.DeptService; |
| | | import com.zy.crm.system.service.DicService; |
| | | import com.zy.crm.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | @ApiModelProperty(value= "出发日期") |
| | | @TableField("business_start_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date businessStartTime; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value= "结束日期") |
| | | @TableField("business_end_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date businessEndTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "出差时长") |
| | | @TableField("business_duration") |
| | | private Long businessDuration; |
| | | private Double businessDuration; |
| | | |
| | | /** |
| | | * 出差天数 |
| | |
| | | @ApiModelProperty(value= "hostId") |
| | | @TableField("host_id") |
| | | private Long hostId; |
| | | |
| | | /** |
| | | * 跟踪项目ID |
| | | */ |
| | | @ApiModelProperty(value= "跟踪项目ID") |
| | | @TableField("order_id") |
| | | private Long orderId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | |
| | | @TableField("business_end_time_day") |
| | | private Integer businessEndTimeDay; |
| | | |
| | | @ApiModelProperty(value= "业务员") |
| | | @TableField("member_id") |
| | | private Long memberId; |
| | | |
| | | @TableField(exist = false) |
| | | private String pcdStart; |
| | | |
| | |
| | | |
| | | public BusinessTrip() {} |
| | | |
| | | public BusinessTrip(String businessTripReasons, Integer businessTransportation, Integer businessReturn, String businessStartProvince, String businessStartCity, String businessStartDistrict, String businessStartTown, String businessStartAddr, String businessEndProvince, String businessEndCity, String businessEndDistrict, String businessEndTown, String businessEndAddr, Date businessStartTime, Date businessEndTime, Long businessDuration, Integer businessTripDays, String businessNotes, String businessPeers, Long businessPeersId, String carNumber, String kilometers, Long userId, Long deptId, Long hostId, Date createTime, Date updateTime, Long updateId, String form, Integer settle, String settleMsg, Integer status, Integer businessTripType, Integer businessStartTimeDay, Integer businessEndTimeDay) { |
| | | public BusinessTrip(String businessTripReasons, Integer businessTransportation, Integer businessReturn, String businessStartProvince, String businessStartCity, String businessStartDistrict, String businessStartTown, String businessStartAddr, String businessEndProvince, String businessEndCity, String businessEndDistrict, String businessEndTown, String businessEndAddr, Date businessStartTime, Date businessEndTime, Double businessDuration, Integer businessTripDays, String businessNotes, String businessPeers, Long businessPeersId, String carNumber, String kilometers, Long userId, Long deptId, Long hostId, Date createTime, Date updateTime, Long updateId, String form, Integer settle, String settleMsg, Integer status, Integer businessTripType, Integer businessStartTimeDay, Integer businessEndTimeDay) { |
| | | this.businessTripReasons = businessTripReasons; |
| | | this.businessTransportation = businessTransportation; |
| | | this.businessReturn = businessReturn; |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getUpdateId$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateId); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUserId$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.userId); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getDeptId$(){ |
| | | DeptService service = SpringUtils.getBean(DeptService.class); |
| | | Dept dept = service.selectById(this.deptId); |
| | | if (!Cools.isEmpty(dept)){ |
| | | return String.valueOf(dept.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSettle$(){ |
| | | if (null == this.settle){ return null; } |
| | | switch (this.settle){ |
| | | case 1: |
| | | return "等待批准"; |
| | | case 2: |
| | | return "申请通过"; |
| | | default: |
| | | return String.valueOf(this.settle); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | |
| | | if (null == this.businessStartTimeDay){ return null; } |
| | | switch (this.businessStartTimeDay){ |
| | | case 1: |
| | | return TimeCalculatorUtils.getYestMonthDay(this.businessStartTime)+ "上午"; |
| | | return TimeCalculatorUtils.timeYestMonthDay(this.businessStartTime)+ "上午"; |
| | | case 2: |
| | | return TimeCalculatorUtils.getYestMonthDay(this.businessStartTime)+ "下午"; |
| | | return TimeCalculatorUtils.timeYestMonthDay(this.businessStartTime)+ "下午"; |
| | | default: |
| | | // return String.valueOf(this.status); |
| | | return "未知"; |
| | |
| | | |
| | | public String getBusinessEndTimeDay$(){ |
| | | if (null == this.businessEndTimeDay){ return null; } |
| | | switch (this.businessTransportation){ |
| | | switch (this.businessEndTimeDay){ |
| | | case 1: |
| | | return TimeCalculatorUtils.getYestMonthDay(this.businessEndTime)+ "上午"; |
| | | return TimeCalculatorUtils.timeYestMonthDay(this.businessEndTime)+ "上午"; |
| | | case 2: |
| | | return TimeCalculatorUtils.getYestMonthDay(this.businessEndTime)+ "下午"; |
| | | return TimeCalculatorUtils.timeYestMonthDay(this.businessEndTime)+ "下午"; |
| | | default: |
| | | // return String.valueOf(this.status); |
| | | return "未知"; |
| | | } |
| | | } |
| | | |
| | | public String getBusinessDuration$(){ |
| | | if (null == this.businessDuration) return null; |
| | | return this.businessDuration+"\t天"; |
| | | } |
| | | |
| | | public String getBusinessTripDays$(){ |
| | | if (null == this.businessTripDays) return null; |
| | | return this.businessTripDays+"\t天"; |
| | | } |
| | | |
| | | public String getPcdStart() { |
| | | StringBuilder sb = new StringBuilder(); |