liukangdong
2025-02-06 563966210b041d0223ab004a3063029bf0c5378a
Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
已添加1个文件
已修改16个文件
380 ■■■■ 文件已修改
admin/src/views/business/trainTime.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/LogisticsRecord/operation.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/LogisticsRecord/operationCity.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/LogisticsRecord/subscribe.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/LogisticsRecord/waybill.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/java/com/doumee/config/CustomWebFilterConfig.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/service/business/third/model/response/TmsOutQtyAndVehicleQtyResponse.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformJobCloudController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/TrainTime.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/PlatformJobExportVo.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/TrainTimeServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/trainTime.vue
@@ -8,7 +8,7 @@
            <el-form-item label="组织" prop="companyName">
                <el-input v-model="searchForm.companyName" placeholder="请输入组织名称" @keypress.enter.native="search"></el-input>
            </el-form-item>
            <el-form-item label="起始时间" prop="eventType">
            <el-form-item label="培训开始时间" prop="eventType">
                <el-date-picker
                    @change="seleTime"
                    v-model="time"
@@ -81,11 +81,15 @@
      searchForm: {
        keyWords: '',
        companyName: '',
        startTime: '',
        endTime: '',
        radio: 0
        startTimeStart: '',
        startTimeEnd: '',
        endTimeStart: '',
        endTimeEnd: '',
        radio: 0,
        radio1: 0
      },
      time: []
      time: [],
      time1: []
    }
  },
  created () {
@@ -101,30 +105,58 @@
  methods: {
    changeRadio (e) {
      if (e === '0') {
        this.searchForm.startTime = timeForMat(0)[0]
        this.searchForm.endTime = timeForMat(0)[1]
        this.searchForm.startTimeStart = timeForMat(0)[0]
        this.searchForm.startTimeEnd = timeForMat(0)[1]
        this.time = timeForMat(0)
      } else if (e === '1') {
        this.searchForm.startTime = timeForMat(6)[0]
        this.searchForm.endTime = timeForMat(6)[1]
        this.searchForm.startTimeStart = timeForMat(6)[0]
        this.searchForm.startTimeEnd = timeForMat(6)[1]
        this.time = timeForMat(6)
      } else if (e === '2') {
        this.searchForm.startTime = timeForMat(29)[0]
        this.searchForm.endTime = timeForMat(29)[1]
        this.searchForm.startTimeStart = timeForMat(29)[0]
        this.searchForm.startTimeEnd = timeForMat(29)[1]
        this.time = timeForMat(29)
      }
      this.search()
    },
    seleTime (e) {
      this.searchForm.startTime = e[0]
      this.searchForm.endTime = e[1]
      this.searchForm.radio = null
      if(e && e.length > 1) {
        this.searchForm.startTimeStart = e[0]
        this.searchForm.startTimeEnd = e[1]
        this.searchForm.radio = null
        this.search()
      }
    },
    changeRadio1 (e) {
      if (e === '0') {
        this.searchForm.endTimeStart = timeForMat(0)[0]
        this.searchForm.endTimeEnd = timeForMat(0)[1]
        this.time1 = timeForMat(0)
      } else if (e === '1') {
        this.searchForm.endTimeStart = timeForMat(6)[0]
        this.searchForm.endTimeEnd = timeForMat(6)[1]
        this.time1 = timeForMat(6)
      } else if (e === '2') {
        this.searchForm.endTimeStart = timeForMat(29)[0]
        this.searchForm.endTimeEnd = timeForMat(29)[1]
        this.time1 = timeForMat(29)
      }
      this.search()
    },
    seleTime1 (e) {
      if (e && e.length > 1 ) {
        this.searchForm.endTimeStart = e[0]
        this.searchForm.endTimeEnd = e[1]
        this.searchForm.radio1 = null
        this.search()
      }
    },
    reset () {
      this.$refs.searchForm.resetFields()
      this.time = []
      this.time1 = []
      this.searchForm.radio = '0'
      this.searchForm.radio1 = '0'
      this.changeRadio('0')
      this.search()
    }
admin/src/views/platform/LogisticsRecord/operation.vue
@@ -150,7 +150,11 @@
        this.list.forEach(item => {
          item.inTypeTemp = item.inType == 0 ? '整托盘' : '件烟'
          item.taskOrigin = 'WMS获取'
          item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒');
          if(item.workTime && item.workTime>=24*60*60 ){
            item.workTime = dayjs.duration(item.workTime, 'seconds').format('D天H时m分s秒');
          }else{
            item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒');
          }
        })
        this.pagination.total = res.total || 0
      }, () => {
@@ -169,11 +173,17 @@
      this.$dialog.exportConfirm('确认导出吗?')
        .then(() => {
          this.exLoading = true
          const { filters } = this
          platformJobExport({
            page: this.pagination.page,
            capacity: 1000000,
            jobType: '0',
            model: this.filters
            model: {
              ...filters,
              jobType: 0,
              createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
              createDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
            },
            sorts: [{ direction: 'DESC', property: 'create_date' }],
            capacity: 10000,
            page: 1,
          })
            .then(response => {
              this.download(response)
admin/src/views/platform/LogisticsRecord/operationCity.vue
@@ -137,8 +137,8 @@
        model: {
          ...filters,
          jobType: 1,
          beginWorkDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
          beginWorkDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
          createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
          createDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
        },
        sorts: [{ direction: 'DESC', property: 'create_date' }],
        capacity: pagination.pageSize,
@@ -149,7 +149,12 @@
        this.list.forEach(item => {
          item.inTypeTemp = item.inType == 0 ? '整托盘' : '件烟'
          item.taskOrigin = 'WMS获取'
          item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒')
          if(item.workTime && item.workTime>=24*60*60 ){
            item.workTime = dayjs.duration(item.workTime, 'seconds').format('D天H时m分s秒');
          }else{
            item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒');
          }
          // item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒')
        })
        this.pagination.total = res.total || 0
      }, () => {
@@ -168,11 +173,17 @@
      this.$dialog.exportConfirm('确认导出吗?')
        .then(() => {
          this.exLoading = true
          const { filters } = this
          platformJobExport({
            page: this.pagination.page,
            capacity: 1000000,
            jobType: 1,
            model: this.filters
            model: {
              ...filters,
              jobType: 1,
              createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
              createDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null
            },
            sorts: [{ direction: 'DESC', property: 'create_date' }],
            capacity: 10000,
            page: 1,
          })
            .then(response => {
              this.download(response)
admin/src/views/platform/LogisticsRecord/subscribe.vue
@@ -256,11 +256,16 @@
    handleEx() {
      this.$dialog.exportConfirm('确认导出吗?')
        .then(() => {
          const { filters } = this
          this.exLoading = true
          platformBooksExport({
            page: this.pagination.page,
            capacity: 1000000,
            model: this.filters
            model: {
              ...filters,
              arriveDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
              arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
            },
          })
            .then(response => {
              this.download(response)
@@ -348,4 +353,4 @@
  color: #000000;
  margin-bottom: 15px;
}
</style>
</style>
admin/src/views/platform/LogisticsRecord/waybill.vue
@@ -201,11 +201,17 @@
      this.$dialog.exportConfirm('确认导出吗?')
        .then(() => {
          this.exLoading = true
          const { filters } = this
          platformJobExport({
            page: this.pagination.page,
            capacity: 1000000,
            jobType: '0',
            model: this.filters
            model: {
              ...filters,
              jobType: '0',
              createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
              createDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
            }
          })
            .then(response => {
              this.download(response)
admin/src/views/platform/config.js
@@ -11,7 +11,7 @@
  9: '已授权离园',
  10: '已离园',
  11: '已过号',
  12: '已取消',
  12: '已取消'
}
export const queryQueueUpConfig = {
  formItems: [
@@ -23,4 +23,4 @@
    },
  ],
  online: true
}
}
server/system_gateway/src/main/java/com/doumee/config/CustomWebFilterConfig.java
@@ -36,7 +36,6 @@
                String token = exchange.getRequest().getHeaders().getFirst(Constants.HEADER_USER_TOKEN);
                if (token == null || token.isEmpty()) {
                    return unAuthorize(exchange);
                }
                String userInfo =(String) stringRedisTemplate.opsForValue().get(Constants.REDIS_TOKEN_KEY + token);
                if (StringUtils.isBlank(userInfo)) {
server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -672,6 +672,27 @@
            throw e;
        }
    }
    public static String getTimeStrBySecond(Long seconds)  {
        String returnTime ="0时0分0秒";
        long longHour = 0;
        long longMinu = 0;
        long longSec =seconds ==null?0:seconds;
        try {
            if (longSec == 0) {
                returnTime = "0时0分0秒";
                return returnTime;
            }
            longHour = longSec / 3600; // å–得小时数
            longSec = longSec % 3600; // å–得余下的秒
            longMinu = longSec / 60; // å–得分数
            longSec = longSec % 60; // å–得余下的秒
            returnTime = longHour + "时" + longMinu + "分" + longSec + "秒";
            return returnTime;
        } catch (Exception e) {
              e.printStackTrace();
        }
        return returnTime;
    }
    /**
     * Descrption:取得当前日期,格式为:yyyy-MM-dd HH:mm:ss
server/system_service/src/main/java/com/doumee/service/business/third/model/response/TmsOutQtyAndVehicleQtyResponse.java
@@ -35,6 +35,6 @@
    private BigDecimal  totalOutT01Qty    ;//数字    è°ƒæ‹¨å‡ºåº“量(省内销售+省外销售)
    @ApiModelProperty(value = "其他出库量(省内其他+省外其他)")
    private BigDecimal  totalOutT03Qty    ;//数字    å…¶ä»–出库量(省内其他+省外其他)
    @ApiModelProperty(value = "累计出库量")
    @ApiModelProperty(value = "累计出库车次数")
    private Integer  vehicleQty    ;//数字    è½¦æ¬¡æ•°
}
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformJobCloudController.java
@@ -5,6 +5,7 @@
import com.doumee.config.annotation.LoginNoRequired;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.dao.business.vo.PlatformJobExportVo;
import com.doumee.service.business.third.model.ApiResponse;
import com.doumee.service.business.third.model.PageData;
import com.doumee.service.business.third.model.PageWrap;
@@ -15,12 +16,15 @@
import com.doumee.service.business.PlatformJobService;
import com.doumee.service.business.third.WmsService;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.mchange.v2.beans.BeansUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
@@ -100,7 +104,19 @@
                platformJob.setJobForm(Constants.ZERO);
            }
        }
        ExcelExporter.build(PlatformJob.class).export(platformJobList, "安泰物流作业任务", response);
        if(Constants.equalsInteger(pageWrap.getModel().getJobType(),1)){
            List<PlatformJobExportVo> exportVoList  =new ArrayList<>();
            if(platformJobList!=null){
                for(PlatformJob job : platformJobList){
                    PlatformJobExportVo t = new PlatformJobExportVo();
                    BeanUtils.copyProperties(job,t);
                    exportVoList.add(t);
                }
                ExcelExporter.build(PlatformJobExportVo.class).export(exportVoList, "预约入园作业记录", response);
            }
        }else{
            ExcelExporter.build(PlatformJob.class).export(platformJobList, "安泰物流作业任务", response);
        }
    }
    @ApiOperation("根据ID查询")
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/PlatformJobRunActController.java
@@ -120,7 +120,7 @@
//                                ,Constants.PlatformJobStatus.DONE.getKey()
                        )
                        .orderByDesc(PlatformJob::getSignNum)
                        .last(" limit 20 ")
//                        .last(" limit 20 ")
        );
        return ApiResponse.success(list);
    }
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java
@@ -32,7 +32,7 @@
    private Integer creator;
    @ApiModelProperty(value = "创建时间")
    @ExcelColumn(name="创建时间",index = 7, dateFormat = "yyyy-MM-dd hh:mm:ss")
    @ExcelColumn(name="创建时间",index = 12, dateFormat = "yyyy-MM-dd hh:mm:ss",width = 10)
    private Date createDate;
    @ApiModelProperty(value = "更新人编码", example = "1")
@@ -53,7 +53,7 @@
    private String remark;
    @ApiModelProperty(value = "状态 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 å·²è¿‡å·  12取消(WMS)" , example = "1")
    @ExcelColumn(name="状态",index = 8, valueMapping = "0=待确认;1=待签到;2=等待叫号;3=入园等待;4=已叫号;5=作业中;6=作业完成;7=转移中;8=异常挂起;9=已授权离园;10=已离园;11=已过号;12=取消(WMS);")
    @ExcelColumn(name="状态",index =13,width = 6, valueMapping = "0=待确认;1=待签到;2=等待叫号;3=入园等待;4=已叫号;5=作业中;6=作业完成;7=转移中;8=异常挂起;9=已授权离园;10=已离园;11=已过号;12=取消(WMS);")
    private Integer status;
    @ApiModelProperty(value = "车辆进入状态 0不在 1进入 " , example = "1")
@@ -66,24 +66,25 @@
    private String code;
    @ApiModelProperty(value = "作业唯一标识(承运单号)")
    @ExcelColumn(name="运单号",index = 0)
    @ExcelColumn(name="运单号",index = 0,width = 5)
    private String billCode;
    @ApiModelProperty(value = "司机编码", example = "1")
    private Integer driverId;
    @ApiModelProperty(value = "司机姓名")
    @ExcelColumn(name="司机姓名",index = 4)
    @ExcelColumn(name="司机姓名",index = 4,width = 6)
    private String driverName;
    @ApiModelProperty(value = "车牌号")
    private String plateNum;
    @ApiModelProperty(value = "司机手机号")
    @ExcelColumn(name="司机电话",index = 5)
    @ExcelColumn(name="司机电话",index = 5,width = 8)
    private String drivierPhone;
    @ApiModelProperty(value = "签到时间")
    @ExcelColumn(name="签到时间",index =7,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date signDate;
    @ApiModelProperty(value = "签到方式 0app签到 1扫码签到 2后台签到", example = "1")
@@ -108,6 +109,7 @@
    private BigDecimal signDistance;
    @ApiModelProperty(value = "作业月台名称集合,多个使用英文逗号隔开")
    @ExcelColumn(name="作业月台名称",index =17 ,width = 8)
    private String platformNames;
    @ApiModelProperty(value = "作业月台编码集合,多个使用英文逗号隔开")
@@ -126,6 +128,7 @@
    private Integer inwaitUserId;
    @ApiModelProperty(value = "叫号时间")
    @ExcelColumn(name="叫号时间",index =8 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date callDate;
    @ApiModelProperty(value = "叫号人编码", example = "1")
@@ -135,9 +138,11 @@
    private String callInfo;
    @ApiModelProperty(value = "开始作业时间")
    @ExcelColumn(name="开始作业时间",index =9 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date startDate;
    @ApiModelProperty(value = "作业完成时间(最终时间)")
    @ExcelColumn(name="作业完成时间",index =10 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date doneDate;
    @ApiModelProperty(value = "异常挂起时间")
@@ -191,14 +196,15 @@
    private Date inHkdate;
    @ApiModelProperty(value = "作业类型 0自有车卸货 1自有车装货 2外协车卸货 3外协车装货 4市公司外协车卸货", example = "1")
    @ExcelColumn(name="作业类型",index = 6,valueMapping = "0=自有车卸货;1=自有车装货;2=外协车卸货;3=外协车装货;4=市公司外协车卸货")
    @ExcelColumn(name="作业类型",index = 15,width = 6,valueMapping = "0=自有车卸货;1=自有车装货;2=外协车卸货;3=外协车装货;4=市公司外协车卸货")
    private Integer type;
    @ApiModelProperty(value = "前车牌号")
    @ExcelColumn(name="前车牌号",index = 2)
    @ExcelColumn(name="前车牌号",index = 2,width = 5)
    private String carCodeFront;
    @ApiModelProperty(value = "后车牌号")
    @ExcelColumn(name="后车牌号",index =3 ,width = 5)
    private String carCodeBack;
    @ApiModelProperty(value = "司机所属部门编码", example = "1")
@@ -229,9 +235,11 @@
    private Integer inType;
    @ApiModelProperty(value = "总运输量", example = "1")
    @ExcelColumn(name="总作业量(万支)",index = 1,width = 5)
    private BigDecimal totalNum;
    @ApiModelProperty(value = "确认任务时间")
    @ExcelColumn(name="确认时间",index =6 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date confirmTaskDate;
    @ApiModelProperty(value = "签到序号", example = "1")
@@ -287,8 +295,8 @@
    @ApiModelProperty(value = "WMS任务时间")
    @TableField(exist = false)
    @ExcelColumn(name="WMS创建时间",index =18,width = 10)
    private String ioCreatedate;
    @ApiModelProperty(value = "离场下发操作人名称", example = "1")
    @TableField(exist = false)
    private String outUserName;
@@ -302,7 +310,7 @@
    private Integer groupType ;
    @ApiModelProperty(value = "承运商")
    @ExcelColumn(name="运输公司",index = 3)
    @ExcelColumn(name="运输公司",index = 16,width = 10)
    @TableField(exist = false)
    private String carrierName ;
@@ -322,6 +330,10 @@
    @ApiModelProperty(value = "已作业时间")
    @TableField(exist = false)
    private Long workTime;
    @ApiModelProperty(value = "作业时长")
    @TableField(exist = false)
    @ExcelColumn(name="作业时长",index =11 ,width = 6)
    private String workTimeStr;
    @ApiModelProperty(value = "WMS任务信息")
    @TableField(exist = false)
@@ -347,12 +359,12 @@
    @TableField(exist = false)
    private Date beginWorkDateStart;
    @ApiModelProperty(value = "开始时间起")
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date createDateStart;
    @ApiModelProperty(value = "开始时间止")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createDateEnd;
    @ApiModelProperty(value = "开始作业时间止")
@@ -393,7 +405,7 @@
    private String queryStatusForPower;
    @ApiModelProperty(value = "任务来源")
    @ExcelColumn(name="任务来源",index = 1,valueMapping = "0=WMS获取;1=自主预约;")
    @ExcelColumn(name="任务来源",index =14,valueMapping = "0=WMS获取;1=自主预约;")
    @TableField(exist = false)
    private Integer jobForm;
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/TrainTime.java
@@ -98,5 +98,11 @@
    @ApiModelProperty(value = "关键字,姓名/手机号")
    @TableField(exist = false)
    private String keyWords;
    @ApiModelProperty(value = "查询开始时间")
    @TableField(exist = false)
    private Date startTimeStart;
    @ApiModelProperty(value = "查询截止时间")
    @TableField(exist = false)
    private Date startTimeEnd;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/PlatformJobExportVo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,86 @@
package com.doumee.dao.business.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.doumee.core.annotation.excel.ExcelColumn;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.PlatformWmsJob;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
 * æœˆå°è°ƒåº¦ä½œä¸šä¿¡æ¯è¡¨
 * @author æ±Ÿè¹„蹄
 * @date 2024/06/28 10:03
 */
@Data
@ApiModel("月台调度作业信息表到处")
public class PlatformJobExportVo {
    @ApiModelProperty(value = "合同号")
    @ExcelColumn(name="合同号",index = 0,width = 5)
    private String contractNum;
    @ApiModelProperty(value = "入园事由")
    @ExcelColumn(name="入园事由",index = 1,width = 10)
    private String reason;
    @ApiModelProperty(value = "前车牌号")
    @ExcelColumn(name="前车牌号",index = 2,width = 5)
    private String carCodeFront;
    @ApiModelProperty(value = "后车牌号")
    @ExcelColumn(name="后车牌号",index =3 ,width = 5)
    private String carCodeBack;
    @ApiModelProperty(value = "司机姓名")
    @ExcelColumn(name="司机姓名",index = 4,width = 6)
    private String driverName;
    @ApiModelProperty(value = "司机手机号")
    @ExcelColumn(name="司机电话",index = 5,width = 8)
    private String drivierPhone;
    @ApiModelProperty(value = "确认任务时间")
    @ExcelColumn(name="确认时间",index =6 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date confirmTaskDate;
    @ApiModelProperty(value = "签到时间")
    @ExcelColumn(name="签到时间",index =7,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date signDate;
    @ApiModelProperty(value = "叫号时间")
    @ExcelColumn(name="叫号时间",index =8 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date callDate;
    @ApiModelProperty(value = "开始作业时间")
    @ExcelColumn(name="开始作业时间",index =9 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date startDate;
    @ApiModelProperty(value = "作业完成时间(最终时间)")
    @ExcelColumn(name="作业完成时间",index =10 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
    private Date doneDate;
    @ApiModelProperty(value = "作业时长")
    @ExcelColumn(name="作业时长",index =11 ,width = 6)
    private String workTimeStr;
    @ApiModelProperty(value = "创建时间")
    @ExcelColumn(name="创建时间",index = 12, dateFormat = "yyyy-MM-dd hh:mm:ss",width = 10)
    private Date createDate;
    @ApiModelProperty(value = "状态 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 å·²è¿‡å·  12取消(WMS)" , example = "1")
    @ExcelColumn(name="状态",index =13,width = 6, valueMapping = "0=待确认;1=待签到;2=等待叫号;3=入园等待;4=已叫号;5=作业中;6=作业完成;7=转移中;8=异常挂起;9=已授权离园;10=已离园;11=已过号;12=取消(WMS);")
    private Integer status;
    @ApiModelProperty(value = "作业月台名称")
    @ExcelColumn(name="作业月台名称",index =14,width = 8)
    private String platformName ;
    @ApiModelProperty(value = "总运输量", example = "1")
    @ExcelColumn(name="总作业量(万支)",index = 15,width = 5)
    private BigDecimal totalNum;
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -297,8 +297,8 @@
                .apply(pageWrap.getModel().getQueryStatus() != null, " find_in_set(t.`STATUS`,'"+pageWrap.getModel().getQueryStatus()+"')")
                .apply(pageWrap.getModel().getQueryStatusForPower() != null, " find_in_set(t.`STATUS`,'"+pageWrap.getModel().getQueryStatusForPower()+"')")
                .apply(pageWrap.getModel().getQueryType() != null, " find_in_set(t.TYPE,'"+pageWrap.getModel().getQueryType()+"')")
                .ge(pageWrap.getModel().getCreateDateStart() != null, PlatformJob::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDateStart()))
                .le(pageWrap.getModel().getCreateDateEnd() != null, PlatformJob::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDateEnd()))
                .ge(pageWrap.getModel().getCreateDateStart() != null, PlatformJob::getCreateDate,  pageWrap.getModel().getCreateDateStart())
                .le(pageWrap.getModel().getCreateDateEnd() != null, PlatformJob::getCreateDate,  pageWrap.getModel().getCreateDateEnd())
                .ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getStartDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart()))
                .le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd()))
                .ge(pageWrap.getModel().getBeginDoneDateStart() != null, PlatformJob::getDoneDate, Utils.Date.getStart(pageWrap.getModel().getBeginDoneDateStart()))
@@ -471,7 +471,9 @@
                platformJob.setWaitTime("预计等待:-小时-分钟");
            }
        }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())
        || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){
        || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())
                || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
                || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.LEAVED.getKey())){
            //查询最后开始任务的月台记录  æ—¥å¿—表  å› ä¸ºå­˜åœ¨å¼‚常挂起 è½¬ç§» ç­‰é—®é¢˜
            PlatformLog platformLog = platformLogMapper.selectOne(new QueryWrapper<PlatformLog>().lambda()
                    .eq(PlatformLog::getJobId,platformJob.getId())
@@ -494,6 +496,7 @@
            }
        }
        platformJob.setWorkTimeStr(DateUtil.getTimeStrBySecond(platformJob.getWorkTime()));
    }
    
    
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/TrainTimeServiceImpl.java
@@ -145,6 +145,9 @@
        queryWrapper.selectAs(Company::getCompanyNamePath,TrainTime::getCompanyName);
        queryWrapper.selectAs(SystemUser::getRealname,TrainTime::getCreateName);
        queryWrapper.eq(TrainTime::getIsdeleted, Constants.ZERO);
        queryWrapper.ge(pageWrap.getModel().getStartTimeStart() != null, TrainTime::getStartTime,  pageWrap.getModel().getStartTimeStart());
        queryWrapper.le(pageWrap.getModel().getStartTimeEnd() != null, TrainTime::getStartTime, pageWrap.getModel().getStartTimeEnd());
        queryWrapper.and(StringUtils.isNotBlank(pageWrap.getModel().getName()), ms->ms.like(Member::getPhone,pageWrap.getModel().getName())
                .or().like(Member::getName,pageWrap.getModel().getName()));
        queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()),Company::getName,pageWrap.getModel().getCompanyName());
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -944,15 +944,16 @@
        Date lastMonth =  DateUtil.addMonthToDate(month,-1);//上月
        Date year = Utils.Date.getStart(new Date());//今年
        Date lastYear = DateUtil.addYearToDate(year,-1);//去年
        List<PlatformJob>  monthNum = platformJobMapper.selectJoinList(PlatformJob.class,
                    new MPJLambdaWrapper<PlatformJob>()
                        .selectAs(PlatformJob::getId,PlatformJob::getId)
                            .select(PlatformJob::getType,PlatformJob::getType)
                        .select(PlatformJob::getType,PlatformJob::getType)
                        .select(PlatformJob::getTotalNum,PlatformJob::getTotalNum)
                        .select(PlatformJob::getStatus,PlatformJob::getStatus)
                        .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),Constants.PlatformJobStatus.LEAVED.getKey(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey(),
                                Constants.PlatformJobStatus.LEAVED.getKey(),
                                Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())
                        .apply("year(done_date) = year('"+DateUtil.getPlusTime2(month)+"') and month(done_date) = month('"+DateUtil.getPlusTime2(month)+"') "));
        List<PlatformJob>  monthLastNum = platformJobMapper.selectJoinList(PlatformJob.class,
                new MPJLambdaWrapper<PlatformJob>()
@@ -1109,7 +1110,7 @@
        return r;
    }
    private BigDecimal getSumTotalByList(List<PlatformJob> list,Integer type,Integer status) {
    private BigDecimal  getSumTotalByList(List<PlatformJob> list,Integer type,Integer status) {
        BigDecimal r = new BigDecimal(0);
        if(list==null || list.size() == 0){
            return r;
@@ -2041,7 +2042,7 @@
        data.setFreePlatform(
                list.stream().filter(i->Constants.formatIntegerNum(i.getWorkStatus())<=Constants.ZERO).collect(Collectors.toList()).size()
        );
        //查询今日月台个状态作业数量
      /*  //查询今日月台个状态作业数量
        List<PlatformJob> jobList =  platformJobMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>()
                .selectAll(PlatformJob.class)
                .select("count(id)" ,PlatformJob::getCountum)
@@ -2049,8 +2050,8 @@
                .apply("to_days(create_date) = to_days(now())" )
                .groupBy(PlatformJob::getStatus)
        );
        if(jobList!=null){
        if(jobList!=null){
            //-------------TODO----------【看板】爱确认需求--------------
            //     * 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 å·²è¿‡å· 12已取消
            for(PlatformJob model : jobList){
@@ -2127,14 +2128,57 @@
                }
            }
      }*/
        //预约数
        data.setReservationCar(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>()
                .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                .apply("to_days(create_date) = to_days(now())" )).intValue());
        //作业中
        data.setWorkingCar(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>()
                .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.WORKING.getKey())
        ).intValue());
        //排队车
        data.setLineUpCar(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>()
                .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                .in(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey(),
                        Constants.PlatformJobStatus.WAIT_CALL.getKey(),
                        Constants.PlatformJobStatus.IN_WAIT.getKey())).intValue());
        //已叫号
        data.setCalledNum(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>()
                .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                .apply("to_days(call_date) = to_days(now())" )).intValue());
        //签到数
        data.setSignedNum(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>()
                .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                .apply("to_days(sign_date) = to_days(now())" )).intValue());
        //今日完成数
        data.setDoneNum(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>()
                .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                .in(PlatformJob::getStatus,Constants.PlatformJobStatus.LEAVED.getKey(),
                        Constants.PlatformJobStatus.AUTHED_LEAVE.getKey(),
                        Constants.PlatformJobStatus.DONE.getKey())
                .apply("to_days(done_date) = to_days(now())" )).intValue());
            data.setVideoPluginUrl(getVideoUrl());
            String indexCodes = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_CHANGNEI_SCREEN_INDEXCODES).getCode();
            if(StringUtils.isNotBlank(indexCodes)){
                data.setVideoIndexCodes(indexCodes.split(","));
            }
        //已作业数
        data.setWorkedNum(platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>()
                .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                .and(w->{w.eq(PlatformJob::getStatus,Constants.PlatformJobStatus.WORKING.getKey());})
                .and(w->{w.in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey()
                                ,Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
                                ,Constants.PlatformJobStatus.LEAVED.getKey())
                        .apply("to_days(done_date) = to_days(now())");})
                .and(w->{w.eq(PlatformJob::getStatus,Constants.PlatformJobStatus.EXCEPTION.getKey())
                        .apply("to_days(error_date) = to_days(now())");})
                .and(w->{w.eq(PlatformJob::getStatus,Constants.PlatformJobStatus.TRANSFERING.getKey())
                        .apply("to_days(trans_platform_date) = to_days(now())");})
        ).intValue());
        data.setVideoPluginUrl(getVideoUrl());
        String indexCodes = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_CHANGNEI_SCREEN_INDEXCODES).getCode();
        if(StringUtils.isNotBlank(indexCodes)){
            data.setVideoIndexCodes(indexCodes.split(","));
        }
        return  data;
    }
@@ -2453,7 +2497,7 @@
                data.setCurrentOutNum(data.getCurrentOutNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutQty())));
                data.setCurrentInNum(data.getCurrentInNum().add(Constants.formatBigdecimal(model.getInSideProvinceOutQty())));
                data.setTotalCarNum(data.getTotalCarNum()+Constants.formatIntegerNum(model.getVehicleQty()));//累计车次
                data.setCurrentProvinceNum(data.getCurrentProvinceNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutQty()))
                data.setCurrentProvinceNum(data.getCurrentProvinceNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutT01Qty()))
                        .add(Constants.formatBigdecimal(model.getInSideProvinceOutT01Qty())));//省内省外销售量
                data.setCurrentOtherNum(data.getCurrentOtherNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutT03Qty()))
                        .add(Constants.formatBigdecimal(model.getInSideProvinceOutT03Qty())));//省内省外其他出库量