浏览代码

预约开票申请相关

jiangbiao 3 年之前
父节点
当前提交
401a350fea
共有 20 个文件被更改,包括 1598 次插入64 次删除
  1. 5 0
      master/src/main/java/com/ruoyi/config/ActivitiConfig.java
  2. 19 0
      master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java
  3. 186 0
      master/src/main/java/com/ruoyi/project/invoice/controller/TApproveReserveInvoiceController.java
  4. 334 0
      master/src/main/java/com/ruoyi/project/invoice/domain/TApproveReserveInvoice.java
  5. 65 0
      master/src/main/java/com/ruoyi/project/invoice/mapper/TApproveReserveInvoiceMapper.java
  6. 11 9
      master/src/main/java/com/ruoyi/project/invoice/mapper/TInvoiceBookingworkticketMapper.java
  7. 11 9
      master/src/main/java/com/ruoyi/project/invoice/mapper/TInvoiceWorkcontentMapper.java
  8. 62 0
      master/src/main/java/com/ruoyi/project/invoice/service/ITApproveReserveInvoiceService.java
  9. 11 9
      master/src/main/java/com/ruoyi/project/invoice/service/ITInvoiceBookingworkticketService.java
  10. 11 9
      master/src/main/java/com/ruoyi/project/invoice/service/ITInvoiceWorkcontentService.java
  11. 94 0
      master/src/main/java/com/ruoyi/project/invoice/service/impl/TApproveReserveInvoiceServiceImpl.java
  12. 7 5
      master/src/main/java/com/ruoyi/project/invoice/service/impl/TInvoiceBookingworkticketServiceImpl.java
  13. 7 5
      master/src/main/java/com/ruoyi/project/invoice/service/impl/TInvoiceWorkcontentServiceImpl.java
  14. 1 1
      master/src/main/resources/application.yml
  15. 151 0
      master/src/main/resources/mybatis/invoice/TApproveReserveInvoiceMapper.xml
  16. 117 0
      master/src/main/resources/processes/reserveInvoice.bpmn
  17. 53 0
      ui/src/api/invoice/invoice.js
  18. 8 0
      ui/src/views/approve/myapprove/index.vue
  19. 406 0
      ui/src/views/invoice/approveinvoice/index.vue
  20. 39 17
      ui/src/views/invoice/bookingworkticket/index.vue

+ 5 - 0
master/src/main/java/com/ruoyi/config/ActivitiConfig.java

@@ -132,6 +132,11 @@ public class ActivitiConfig {
         DeploymentBuilder deploymentBuilder10 = repositoryService().createDeployment();
         Resource spec10 = resourceLoader.getResource("classpath:/processes/kekao/reliability.bpmn"); //加载流程图资源文件
         deploymentBuilder10.enableDuplicateFiltering().addInputStream(spec10.getFilename(), spec10.getInputStream()).name("可靠性管理申请流程").deploy();//按流程id部署
+
+        DeploymentBuilder deploymentBuilder11 = repositoryService().createDeployment();
+        Resource spec11 = resourceLoader.getResource("classpath:/processes/reserveInvoice.bpmn"); //加载流程图资源文件
+        deploymentBuilder11.enableDuplicateFiltering().addInputStream(spec11.getFilename(), spec11.getInputStream()).name("预约开票审批流程").deploy();//按流程id部署
+
     }
 }
 

+ 19 - 0
master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java

@@ -21,6 +21,8 @@ import com.ruoyi.project.intact.domain.TApproveMaintenance;
 import com.ruoyi.project.intact.domain.TIntactApprove;
 import com.ruoyi.project.intact.service.ITApproveMaintenanceService;
 import com.ruoyi.project.intact.service.ITIntactApproveService;
+import com.ruoyi.project.invoice.domain.TApproveReserveInvoice;
+import com.ruoyi.project.invoice.service.ITApproveReserveInvoiceService;
 import com.ruoyi.project.listener.*;
 import com.ruoyi.project.reliability.domain.TKekaoApprove;
 import com.ruoyi.project.reliability.service.ITKekaoApproveService;
@@ -109,6 +111,8 @@ public class TApproveDangerController extends BaseController
     private ITIntactApproveService tIntactApproveService;
     @Autowired
     private ITKekaoApproveService tKekaoApproveService;
+    @Autowired
+    private ITApproveReserveInvoiceService tApproveReserveInvoiceService;
     /**
      * 任务申请
      */
@@ -267,6 +271,10 @@ public class TApproveDangerController extends BaseController
                     TKekaoApprove approve = tKekaoApproveService.selectTKekaoApproveById(Long.parseLong(pi.getBusinessKey()));
                     devProcess.setApproveObject(approve);
                     devProcess.setApNo(approve.getApNo());
+                }else if(pi.getProcessDefinitionName().equals("预约开票审批流程")){
+                    TApproveReserveInvoice approve = tApproveReserveInvoiceService.selectTApproveReserveInvoiceById(Long.parseLong(pi.getBusinessKey()));
+                    devProcess.setApproveObject(approve);
+                    devProcess.setApNo(approve.getApNo());
                 }
                 devProcess.setBusinessKey(pi.getBusinessKey());
                 devProcess.setProcessCreateTime(pi.getStartTime());
@@ -367,6 +375,11 @@ public class TApproveDangerController extends BaseController
                     devTask.setApproveObj(approve);
                     devTask.setApNo(approve.getApNo());
                 }
+                else if(pi.getProcessDefinitionName().equals("预约开票审批流程")){
+                    TApproveReserveInvoice approve = tApproveReserveInvoiceService.selectTApproveReserveInvoiceById(Long.parseLong(pi.getBusinessKey()));
+                    devTask.setApproveObject(approve);
+                    devTask.setApNo(approve.getApNo());
+                }
                 list.add(devTask);
             }
         }
@@ -447,6 +460,12 @@ public class TApproveDangerController extends BaseController
                     devProcess.setApNo(approve.getApNo());
                     devProcess.setApName(user.getNickName());
                     devProcess.setApproveObject(approve);
+                }else if(pi.getProcessDefinitionName().equals("预约开票审批流程")){
+                    TApproveReserveInvoice approve = tApproveReserveInvoiceService.selectTApproveReserveInvoiceById(Long.parseLong(pi.getBusinessKey()));
+                    SysUser user = sysUserService.selectUserById(approve.getUserId());
+                    devProcess.setApNo(approve.getApNo());
+                    devProcess.setApName(user.getNickName());
+                    devProcess.setApproveObject(approve);
                 }else {
                     TApproveDanger approveDanger = tApproveDangerService.selectTApproveDangerById(Long.parseLong(pi.getBusinessKey()));
                     SysUser user = sysUserService.selectUserById(approveDanger.getRecorderId());

+ 186 - 0
master/src/main/java/com/ruoyi/project/invoice/controller/TApproveReserveInvoiceController.java

@@ -0,0 +1,186 @@
+package com.ruoyi.project.invoice.controller;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.approve.damain.DevTask;
+import com.ruoyi.project.invoice.domain.TApproveReserveInvoice;
+import com.ruoyi.project.invoice.domain.TInvoiceBookingworkticket;
+import com.ruoyi.project.invoice.service.ITApproveReserveInvoiceService;
+import com.ruoyi.project.invoice.service.ITInvoiceBookingworkticketService;
+import org.activiti.engine.ProcessEngine;
+import org.activiti.engine.ProcessEngines;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 预约开票申请Controller
+ *
+ * @author ruoyi
+ * @date 2022-08-29
+ */
+@RestController
+@RequestMapping("/approve/invoice")
+public class TApproveReserveInvoiceController extends BaseController {
+    @Autowired
+    private ITApproveReserveInvoiceService tApproveReserveInvoiceService;
+    @Autowired
+    private ITInvoiceBookingworkticketService workService;
+
+    @Autowired
+    private TaskService taskService;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+
+    /**
+     * 查询预约开票申请列表
+     */
+    @PreAuthorize("@ss.hasPermi('invoice:invoice:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TApproveReserveInvoice tApproveReserveInvoice) {
+        startPage();
+        List<TApproveReserveInvoice> list = tApproveReserveInvoiceService.selectTApproveReserveInvoiceList(tApproveReserveInvoice);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出预约开票申请列表
+     */
+    @PreAuthorize("@ss.hasPermi('invoice:invoice:export')")
+    @Log(title = "预约开票申请", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TApproveReserveInvoice tApproveReserveInvoice) {
+        List<TApproveReserveInvoice> list = tApproveReserveInvoiceService.selectTApproveReserveInvoiceList(tApproveReserveInvoice);
+        ExcelUtil<TApproveReserveInvoice> util = new ExcelUtil<TApproveReserveInvoice>(TApproveReserveInvoice.class);
+        return util.exportExcel(list, "invoice");
+    }
+
+    /**
+     * 获取预约开票申请详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('invoice:invoice:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(tApproveReserveInvoiceService.selectTApproveReserveInvoiceById(id));
+    }
+
+    /**
+     * 新增预约开票申请
+     */
+    @PreAuthorize("@ss.hasPermi('invoice:invoice:add')")
+    @Log(title = "预约开票申请", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TApproveReserveInvoice tApproveReserveInvoice) {
+        Long userid = getUserId();
+        tApproveReserveInvoice.setUserId(userid);
+        tApproveReserveInvoice.setApNo(DateUtils.dateTimeNow() + userid);
+        Authentication.setAuthenticatedUserId(userid.toString());
+        tApproveReserveInvoiceService.insertTApproveReserveInvoice(tApproveReserveInvoice);
+        long bussniseeKey = tApproveReserveInvoice.getId();
+        String[] ids;
+        ids = tApproveReserveInvoice.getInvoiceId().split(",");
+        for (String id : ids) {
+            TInvoiceBookingworkticket invoice = workService.getById(id);
+            invoice.setStatus(1L);
+            workService.updateById(invoice);
+        }
+        //开始工作流、监听
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("applyUser", userid.toString());
+        variables.put("yhzgusers", tApproveReserveInvoice.getUserSupId());//用户主管
+        variables.put("zzzgusers", tApproveReserveInvoice.getDevSupId());//装置主管
+        if ("1".equals(tApproveReserveInvoice.getIsToday()))
+            variables.put("zzgcsusers", tApproveReserveInvoice.getDevEngineerId());//装置工程师
+        if ("1".equals(tApproveReserveInvoice.getIsSpecial()))
+            variables.put("zzjlusers", tApproveReserveInvoice.getManagerconId());//装置经理
+        variables.put("bzusers", tApproveReserveInvoice.getMonitorId());//装置经理
+        //采用key来启动流程定义并设置流程变量,返回流程实例
+        ProcessInstance pi = runtimeService.startProcessInstanceByKey("reserveInvoice", String.valueOf(bussniseeKey), variables);
+        logger.info("流程部署id:" + pi.getDeploymentId());
+        logger.info("流程定义id:" + pi.getProcessDefinitionId());
+        logger.info("流程实例id:" + pi.getProcessInstanceId());
+        tApproveReserveInvoice.setProcessId(pi.getProcessInstanceId());
+        tApproveReserveInvoiceService.updateTApproveReserveInvoice(tApproveReserveInvoice);
+        return AjaxResult.success();
+    }
+
+    @Log(title = "预约开票审核处理", businessType = BusinessType.UPDATE)
+    @PutMapping("/handle")
+    public AjaxResult handle(@RequestBody DevTask devTask) {
+        //流程审批意见
+        String symbol= "";
+        if (devTask.getComment() != "") {
+            symbol = ",";
+        }
+        //使用任务服务完成任务(提交任务)
+        String taskId = devTask.getTaskId();
+        // 使用任务id,获取任务对象,获取流程实例id
+        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
+        //利用任务对象,获取流程实例id
+        String processInstancesId = task.getProcessInstanceId();
+        TApproveReserveInvoice invoice = tApproveReserveInvoiceService.selectTApproveReserveInvoiceById(Long.parseLong(devTask.getBusinessKey()));
+        if (devTask.getCondition().equals("1")) {
+            devTask.setComment("通过" + symbol + devTask.getComment());
+            invoice.setStatus(2L);
+            invoice.setEnddate(new Date());
+        }else if (devTask.getCondition().equals("0")) {
+            devTask.setComment("未通过" + symbol + devTask.getComment());
+            invoice.setStatus(3L);
+            invoice.setEnddate(new Date());
+        }
+        String[] ids;
+        ids = invoice.getInvoiceId().split(",");
+        for (String id : ids) {
+            TInvoiceBookingworkticket invoiceBook = workService.getById(id);
+            invoiceBook.setStatus(0L);
+            workService.updateById(invoiceBook);
+        }
+        Map<String, Object> param = new HashMap<>();
+        param.put("condition", devTask.getCondition());
+        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
+        TaskService taskService = processEngine.getTaskService();
+        //认领任务
+        processEngine.getTaskService()
+                .claim(taskId, getUserId().toString());
+        taskService.addComment(taskId, processInstancesId, devTask.getComment());
+        taskService.complete(taskId, param);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 修改预约开票申请
+     */
+    @PreAuthorize("@ss.hasPermi('invoice:invoice:edit')")
+    @Log(title = "预约开票申请", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TApproveReserveInvoice tApproveReserveInvoice) {
+        return toAjax(tApproveReserveInvoiceService.updateTApproveReserveInvoice(tApproveReserveInvoice));
+    }
+
+    /**
+     * 删除预约开票申请
+     */
+    @PreAuthorize("@ss.hasPermi('invoice:invoice:remove')")
+    @Log(title = "预约开票申请", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(tApproveReserveInvoiceService.deleteTApproveReserveInvoiceByIds(ids));
+    }
+}

+ 334 - 0
master/src/main/java/com/ruoyi/project/invoice/domain/TApproveReserveInvoice.java

@@ -0,0 +1,334 @@
+package com.ruoyi.project.invoice.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import com.ruoyi.framework.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 预约开票申请对象 t_approve_reserve_invoice
+ *
+ * @author ruoyi
+ * @date 2022-08-29
+ */
+public class TApproveReserveInvoice extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * $column.columnComment
+     */
+    private Long id;
+
+    /**
+     * 申请人id
+     */
+    @Excel(name = "申请人id")
+    private Long userId;
+
+    /**
+     * 装置经理
+     */
+    @Excel(name = "装置经理")
+    private Long managerconId;
+
+    /**
+     * 用户主管
+     */
+    @Excel(name = "用户主管")
+    private Long userSupId;
+
+    /**
+     * 装置工程师
+     */
+    @Excel(name = "装置工程师")
+    private Long devEngineerId;
+
+    /**
+     * 班长
+     */
+    @Excel(name = "班长")
+    private Long monitorId;
+
+    /**
+     * 设备类型:
+     */
+    @Excel(name = "设备类型:")
+    private Long devType;
+
+    /**
+     * 审批类型
+     */
+    @Excel(name = "审批类型")
+    private Long approveType;
+
+    /**
+     * 内容
+     */
+    @Excel(name = "内容")
+    private String content;
+
+    /**
+     * 附件url
+     */
+    @Excel(name = "附件url")
+    private String fileUrls;
+
+    /**
+     * 申请状态 0:审批中 1-通过 2-拒绝
+     */
+    @Excel(name = "申请状态 0:审批中 1-通过 2-拒绝")
+    private Long status;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date creattime;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date enddate;
+
+    /**
+     * 流程id
+     */
+    @Excel(name = "流程id")
+    private String processId;
+
+    /**
+     * 申请编号(唯一)
+     */
+    @Excel(name = "申请编号", readConverterExp = "唯=一")
+    private String apNo;
+
+    /**
+     * 删除标识
+     */
+    private Long delFlag;
+
+    /**
+     * 部门id
+     */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    /**
+     * 装置主管
+     */
+    @Excel(name = "装置主管")
+    private Long devSupId;
+
+    /**
+     * 装置主管
+     */
+    @Excel(name = "关联票据id")
+    private String invoiceId;
+
+    @TableField(exist = false)
+    private String isToday;
+    @TableField(exist = false)
+    private String isSpecial;
+
+    public String getIsToday() {
+        return isToday;
+    }
+
+    public void setIsToday(String isToday) {
+        this.isToday = isToday;
+    }
+
+    public String getIsSpecial() {
+        return isSpecial;
+    }
+
+    public void setIsSpecial(String isSpecial) {
+        this.isSpecial = isSpecial;
+    }
+
+    public String getInvoiceId() {
+        return invoiceId;
+    }
+
+    public void setInvoiceId(String invoiceId) {
+        this.invoiceId = invoiceId;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setManagerconId(Long managerconId) {
+        this.managerconId = managerconId;
+    }
+
+    public Long getManagerconId() {
+        return managerconId;
+    }
+
+    public void setUserSupId(Long userSupId) {
+        this.userSupId = userSupId;
+    }
+
+    public Long getUserSupId() {
+        return userSupId;
+    }
+
+    public void setDevEngineerId(Long devEngineerId) {
+        this.devEngineerId = devEngineerId;
+    }
+
+    public Long getDevEngineerId() {
+        return devEngineerId;
+    }
+
+    public void setMonitorId(Long monitorId) {
+        this.monitorId = monitorId;
+    }
+
+    public Long getMonitorId() {
+        return monitorId;
+    }
+
+    public void setDevType(Long devType) {
+        this.devType = devType;
+    }
+
+    public Long getDevType() {
+        return devType;
+    }
+
+    public void setApproveType(Long approveType) {
+        this.approveType = approveType;
+    }
+
+    public Long getApproveType() {
+        return approveType;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setFileUrls(String fileUrls) {
+        this.fileUrls = fileUrls;
+    }
+
+    public String getFileUrls() {
+        return fileUrls;
+    }
+
+    public void setStatus(Long status) {
+        this.status = status;
+    }
+
+    public Long getStatus() {
+        return status;
+    }
+
+    public void setCreattime(Date creattime) {
+        this.creattime = creattime;
+    }
+
+    public Date getCreattime() {
+        return creattime;
+    }
+
+    public void setEnddate(Date enddate) {
+        this.enddate = enddate;
+    }
+
+    public Date getEnddate() {
+        return enddate;
+    }
+
+    public void setProcessId(String processId) {
+        this.processId = processId;
+    }
+
+    public String getProcessId() {
+        return processId;
+    }
+
+    public void setApNo(String apNo) {
+        this.apNo = apNo;
+    }
+
+    public String getApNo() {
+        return apNo;
+    }
+
+    public void setDelFlag(Long delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDevSupId(Long devSupId) {
+        this.devSupId = devSupId;
+    }
+
+    public Long getDevSupId() {
+        return devSupId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("userId", getUserId())
+                .append("managerconId", getManagerconId())
+                .append("userSupId", getUserSupId())
+                .append("devEngineerId", getDevEngineerId())
+                .append("monitorId", getMonitorId())
+                .append("devType", getDevType())
+                .append("approveType", getApproveType())
+                .append("content", getContent())
+                .append("fileUrls", getFileUrls())
+                .append("status", getStatus())
+                .append("creattime", getCreattime())
+                .append("enddate", getEnddate())
+                .append("processId", getProcessId())
+                .append("apNo", getApNo())
+                .append("delFlag", getDelFlag())
+                .append("deptId", getDeptId())
+                .append("devSupId", getDevSupId())
+                .append("invoiceId", getInvoiceId())
+                .append("isSpecial", getIsSpecial())
+                .append("isToday", getIsToday())
+                .toString();
+    }
+}

+ 65 - 0
master/src/main/java/com/ruoyi/project/invoice/mapper/TApproveReserveInvoiceMapper.java

@@ -0,0 +1,65 @@
+package com.ruoyi.project.invoice.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.invoice.domain.TApproveReserveInvoice;
+
+import java.util.List;
+
+/**
+ * 预约开票申请Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-08-29
+ */
+public interface TApproveReserveInvoiceMapper extends BaseMapper<TApproveReserveInvoice>
+{
+    /**
+     * 查询预约开票申请
+     *
+     * @param id 预约开票申请ID
+     * @return 预约开票申请
+     */
+    public TApproveReserveInvoice selectTApproveReserveInvoiceById(Long id);
+
+    /**
+     * 查询预约开票申请列表
+     *
+     * @param tApproveReserveInvoice 预约开票申请
+     * @return 预约开票申请集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TApproveReserveInvoice> selectTApproveReserveInvoiceList(TApproveReserveInvoice tApproveReserveInvoice);
+
+    /**
+     * 新增预约开票申请
+     *
+     * @param tApproveReserveInvoice 预约开票申请
+     * @return 结果
+     */
+    public int insertTApproveReserveInvoice(TApproveReserveInvoice tApproveReserveInvoice);
+
+    /**
+     * 修改预约开票申请
+     *
+     * @param tApproveReserveInvoice 预约开票申请
+     * @return 结果
+     */
+    public int updateTApproveReserveInvoice(TApproveReserveInvoice tApproveReserveInvoice);
+
+    /**
+     * 删除预约开票申请
+     *
+     * @param id 预约开票申请ID
+     * @return 结果
+     */
+    public int deleteTApproveReserveInvoiceById(Long id);
+
+    /**
+     * 批量删除预约开票申请
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTApproveReserveInvoiceByIds(Long[] ids);
+}

+ 11 - 9
master/src/main/java/com/ruoyi/project/invoice/mapper/TInvoiceBookingworkticketMapper.java

@@ -1,20 +1,22 @@
 package com.ruoyi.project.invoice.mapper;
 
-import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.project.invoice.domain.TInvoiceBookingworkticket;
 
+import java.util.List;
+
 /**
  * 预约作业票台账Mapper接口
- * 
+ *
  * @author ruoyi
  * @date 2022-08-25
  */
-public interface TInvoiceBookingworkticketMapper 
+public interface TInvoiceBookingworkticketMapper  extends BaseMapper<TInvoiceBookingworkticket>
 {
     /**
      * 查询预约作业票台账
-     * 
+     *
      * @param id 预约作业票台账ID
      * @return 预约作业票台账
      */
@@ -22,7 +24,7 @@ public interface TInvoiceBookingworkticketMapper
 
     /**
      * 查询预约作业票台账列表
-     * 
+     *
      * @param tInvoiceBookingworkticket 预约作业票台账
      * @return 预约作业票台账集合
      */
@@ -31,7 +33,7 @@ public interface TInvoiceBookingworkticketMapper
 
     /**
      * 新增预约作业票台账
-     * 
+     *
      * @param tInvoiceBookingworkticket 预约作业票台账
      * @return 结果
      */
@@ -39,7 +41,7 @@ public interface TInvoiceBookingworkticketMapper
 
     /**
      * 修改预约作业票台账
-     * 
+     *
      * @param tInvoiceBookingworkticket 预约作业票台账
      * @return 结果
      */
@@ -47,7 +49,7 @@ public interface TInvoiceBookingworkticketMapper
 
     /**
      * 删除预约作业票台账
-     * 
+     *
      * @param id 预约作业票台账ID
      * @return 结果
      */
@@ -55,7 +57,7 @@ public interface TInvoiceBookingworkticketMapper
 
     /**
      * 批量删除预约作业票台账
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */

+ 11 - 9
master/src/main/java/com/ruoyi/project/invoice/mapper/TInvoiceWorkcontentMapper.java

@@ -1,20 +1,22 @@
 package com.ruoyi.project.invoice.mapper;
 
-import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.project.invoice.domain.TInvoiceWorkcontent;
 
+import java.util.List;
+
 /**
  * 预约作业内容Mapper接口
- * 
+ *
  * @author ruoyi
  * @date 2022-08-26
  */
-public interface TInvoiceWorkcontentMapper 
+public interface TInvoiceWorkcontentMapper extends BaseMapper<TInvoiceWorkcontent>
 {
     /**
      * 查询预约作业内容
-     * 
+     *
      * @param id 预约作业内容ID
      * @return 预约作业内容
      */
@@ -22,7 +24,7 @@ public interface TInvoiceWorkcontentMapper
 
     /**
      * 查询预约作业内容列表
-     * 
+     *
      * @param tInvoiceWorkcontent 预约作业内容
      * @return 预约作业内容集合
      */
@@ -31,7 +33,7 @@ public interface TInvoiceWorkcontentMapper
 
     /**
      * 新增预约作业内容
-     * 
+     *
      * @param tInvoiceWorkcontent 预约作业内容
      * @return 结果
      */
@@ -39,7 +41,7 @@ public interface TInvoiceWorkcontentMapper
 
     /**
      * 修改预约作业内容
-     * 
+     *
      * @param tInvoiceWorkcontent 预约作业内容
      * @return 结果
      */
@@ -47,7 +49,7 @@ public interface TInvoiceWorkcontentMapper
 
     /**
      * 删除预约作业内容
-     * 
+     *
      * @param id 预约作业内容ID
      * @return 结果
      */
@@ -55,7 +57,7 @@ public interface TInvoiceWorkcontentMapper
 
     /**
      * 批量删除预约作业内容
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */

+ 62 - 0
master/src/main/java/com/ruoyi/project/invoice/service/ITApproveReserveInvoiceService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.project.invoice.service;
+
+import com.ruoyi.project.invoice.domain.TApproveReserveInvoice;
+
+import java.util.List;
+
+/**
+ * 预约开票申请Service接口
+ *
+ * @author ruoyi
+ * @date 2022-08-29
+ */
+public interface ITApproveReserveInvoiceService
+{
+    /**
+     * 查询预约开票申请
+     *
+     * @param id 预约开票申请ID
+     * @return 预约开票申请
+     */
+    public TApproveReserveInvoice selectTApproveReserveInvoiceById(Long id);
+
+    /**
+     * 查询预约开票申请列表
+     *
+     * @param tApproveReserveInvoice 预约开票申请
+     * @return 预约开票申请集合
+     */
+    public List<TApproveReserveInvoice> selectTApproveReserveInvoiceList(TApproveReserveInvoice tApproveReserveInvoice);
+
+    /**
+     * 新增预约开票申请
+     *
+     * @param tApproveReserveInvoice 预约开票申请
+     * @return 结果
+     */
+    public int insertTApproveReserveInvoice(TApproveReserveInvoice tApproveReserveInvoice);
+
+    /**
+     * 修改预约开票申请
+     *
+     * @param tApproveReserveInvoice 预约开票申请
+     * @return 结果
+     */
+    public int updateTApproveReserveInvoice(TApproveReserveInvoice tApproveReserveInvoice);
+
+    /**
+     * 批量删除预约开票申请
+     *
+     * @param ids 需要删除的预约开票申请ID
+     * @return 结果
+     */
+    public int deleteTApproveReserveInvoiceByIds(Long[] ids);
+
+    /**
+     * 删除预约开票申请信息
+     *
+     * @param id 预约开票申请ID
+     * @return 结果
+     */
+    public int deleteTApproveReserveInvoiceById(Long id);
+}

+ 11 - 9
master/src/main/java/com/ruoyi/project/invoice/service/ITInvoiceBookingworkticketService.java

@@ -1,19 +1,21 @@
 package com.ruoyi.project.invoice.service;
 
-import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.project.invoice.domain.TInvoiceBookingworkticket;
 
+import java.util.List;
+
 /**
  * 预约作业票台账Service接口
- * 
+ *
  * @author ruoyi
  * @date 2022-08-25
  */
-public interface ITInvoiceBookingworkticketService 
+public interface ITInvoiceBookingworkticketService extends IService<TInvoiceBookingworkticket>
 {
     /**
      * 查询预约作业票台账
-     * 
+     *
      * @param id 预约作业票台账ID
      * @return 预约作业票台账
      */
@@ -21,7 +23,7 @@ public interface ITInvoiceBookingworkticketService
 
     /**
      * 查询预约作业票台账列表
-     * 
+     *
      * @param tInvoiceBookingworkticket 预约作业票台账
      * @return 预约作业票台账集合
      */
@@ -29,7 +31,7 @@ public interface ITInvoiceBookingworkticketService
 
     /**
      * 新增预约作业票台账
-     * 
+     *
      * @param tInvoiceBookingworkticket 预约作业票台账
      * @return 结果
      */
@@ -37,7 +39,7 @@ public interface ITInvoiceBookingworkticketService
 
     /**
      * 修改预约作业票台账
-     * 
+     *
      * @param tInvoiceBookingworkticket 预约作业票台账
      * @return 结果
      */
@@ -45,7 +47,7 @@ public interface ITInvoiceBookingworkticketService
 
     /**
      * 批量删除预约作业票台账
-     * 
+     *
      * @param ids 需要删除的预约作业票台账ID
      * @return 结果
      */
@@ -53,7 +55,7 @@ public interface ITInvoiceBookingworkticketService
 
     /**
      * 删除预约作业票台账信息
-     * 
+     *
      * @param id 预约作业票台账ID
      * @return 结果
      */

+ 11 - 9
master/src/main/java/com/ruoyi/project/invoice/service/ITInvoiceWorkcontentService.java

@@ -1,19 +1,21 @@
 package com.ruoyi.project.invoice.service;
 
-import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.project.invoice.domain.TInvoiceWorkcontent;
 
+import java.util.List;
+
 /**
  * 预约作业内容Service接口
- * 
+ *
  * @author ruoyi
  * @date 2022-08-26
  */
-public interface ITInvoiceWorkcontentService 
+public interface ITInvoiceWorkcontentService extends IService<TInvoiceWorkcontent>
 {
     /**
      * 查询预约作业内容
-     * 
+     *
      * @param id 预约作业内容ID
      * @return 预约作业内容
      */
@@ -29,7 +31,7 @@ public interface ITInvoiceWorkcontentService
 
     /**
      * 查询预约作业内容列表
-     * 
+     *
      * @param tInvoiceWorkcontent 预约作业内容
      * @return 预约作业内容集合
      */
@@ -37,7 +39,7 @@ public interface ITInvoiceWorkcontentService
 
     /**
      * 新增预约作业内容
-     * 
+     *
      * @param tInvoiceWorkcontent 预约作业内容
      * @return 结果
      */
@@ -45,7 +47,7 @@ public interface ITInvoiceWorkcontentService
 
     /**
      * 修改预约作业内容
-     * 
+     *
      * @param tInvoiceWorkcontent 预约作业内容
      * @return 结果
      */
@@ -54,7 +56,7 @@ public interface ITInvoiceWorkcontentService
 
     /**
      * 批量删除预约作业内容
-     * 
+     *
      * @param ids 需要删除的预约作业内容ID
      * @return 结果
      */
@@ -62,7 +64,7 @@ public interface ITInvoiceWorkcontentService
 
     /**
      * 删除预约作业内容信息
-     * 
+     *
      * @param id 预约作业内容ID
      * @return 结果
      */

+ 94 - 0
master/src/main/java/com/ruoyi/project/invoice/service/impl/TApproveReserveInvoiceServiceImpl.java

@@ -0,0 +1,94 @@
+package com.ruoyi.project.invoice.service.impl;
+
+import com.ruoyi.project.invoice.domain.TApproveReserveInvoice;
+import com.ruoyi.project.invoice.mapper.TApproveReserveInvoiceMapper;
+import com.ruoyi.project.invoice.service.ITApproveReserveInvoiceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 预约开票申请Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-08-29
+ */
+@Service
+public class TApproveReserveInvoiceServiceImpl implements ITApproveReserveInvoiceService
+{
+    @Autowired
+    private TApproveReserveInvoiceMapper tApproveReserveInvoiceMapper;
+
+    /**
+     * 查询预约开票申请
+     *
+     * @param id 预约开票申请ID
+     * @return 预约开票申请
+     */
+    @Override
+    public TApproveReserveInvoice selectTApproveReserveInvoiceById(Long id)
+    {
+        return tApproveReserveInvoiceMapper.selectTApproveReserveInvoiceById(id);
+    }
+
+    /**
+     * 查询预约开票申请列表
+     *
+     * @param tApproveReserveInvoice 预约开票申请
+     * @return 预约开票申请
+     */
+    @Override
+    public List<TApproveReserveInvoice> selectTApproveReserveInvoiceList(TApproveReserveInvoice tApproveReserveInvoice)
+    {
+        return tApproveReserveInvoiceMapper.selectTApproveReserveInvoiceList(tApproveReserveInvoice);
+    }
+
+    /**
+     * 新增预约开票申请
+     *
+     * @param tApproveReserveInvoice 预约开票申请
+     * @return 结果
+     */
+    @Override
+    public int insertTApproveReserveInvoice(TApproveReserveInvoice tApproveReserveInvoice)
+    {
+        return tApproveReserveInvoiceMapper.insertTApproveReserveInvoice(tApproveReserveInvoice);
+    }
+
+    /**
+     * 修改预约开票申请
+     *
+     * @param tApproveReserveInvoice 预约开票申请
+     * @return 结果
+     */
+    @Override
+    public int updateTApproveReserveInvoice(TApproveReserveInvoice tApproveReserveInvoice)
+    {
+        return tApproveReserveInvoiceMapper.updateTApproveReserveInvoice(tApproveReserveInvoice);
+    }
+
+    /**
+     * 批量删除预约开票申请
+     *
+     * @param ids 需要删除的预约开票申请ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTApproveReserveInvoiceByIds(Long[] ids)
+    {
+        return tApproveReserveInvoiceMapper.deleteTApproveReserveInvoiceByIds(ids);
+    }
+
+    /**
+     * 删除预约开票申请信息
+     *
+     * @param id 预约开票申请ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTApproveReserveInvoiceById(Long id)
+    {
+        return tApproveReserveInvoiceMapper.deleteTApproveReserveInvoiceById(id);
+    }
+}

+ 7 - 5
master/src/main/java/com/ruoyi/project/invoice/service/impl/TInvoiceBookingworkticketServiceImpl.java

@@ -1,12 +1,14 @@
 package com.ruoyi.project.invoice.service.impl;
 
-import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.project.invoice.mapper.TInvoiceBookingworkticketMapper;
 import com.ruoyi.project.invoice.domain.TInvoiceBookingworkticket;
+import com.ruoyi.project.invoice.mapper.TInvoiceBookingworkticketMapper;
 import com.ruoyi.project.invoice.service.ITInvoiceBookingworkticketService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 预约作业票台账Service业务层处理
@@ -15,7 +17,7 @@ import com.ruoyi.project.invoice.service.ITInvoiceBookingworkticketService;
  * @date 2022-08-25
  */
 @Service
-public class TInvoiceBookingworkticketServiceImpl implements ITInvoiceBookingworkticketService
+public class TInvoiceBookingworkticketServiceImpl extends ServiceImpl<TInvoiceBookingworkticketMapper, TInvoiceBookingworkticket>  implements ITInvoiceBookingworkticketService
 {
     @Autowired
     private TInvoiceBookingworkticketMapper tInvoiceBookingworkticketMapper;

+ 7 - 5
master/src/main/java/com/ruoyi/project/invoice/service/impl/TInvoiceWorkcontentServiceImpl.java

@@ -1,11 +1,13 @@
 package com.ruoyi.project.invoice.service.impl;
 
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.ruoyi.project.invoice.mapper.TInvoiceWorkcontentMapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.project.invoice.domain.TInvoiceWorkcontent;
+import com.ruoyi.project.invoice.mapper.TInvoiceWorkcontentMapper;
 import com.ruoyi.project.invoice.service.ITInvoiceWorkcontentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 预约作业内容Service业务层处理
@@ -14,7 +16,7 @@ import com.ruoyi.project.invoice.service.ITInvoiceWorkcontentService;
  * @date 2022-08-26
  */
 @Service
-public class TInvoiceWorkcontentServiceImpl implements ITInvoiceWorkcontentService
+public class TInvoiceWorkcontentServiceImpl extends ServiceImpl<TInvoiceWorkcontentMapper, TInvoiceWorkcontent> implements ITInvoiceWorkcontentService
 {
     @Autowired
     private TInvoiceWorkcontentMapper tInvoiceWorkcontentMapper;

+ 1 - 1
master/src/main/resources/application.yml

@@ -188,7 +188,7 @@ gen:
   # 作者
   author: ruoyi
   # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
-  packageName: com.ruoyi.project.reliability # 自动去除表前缀,默认是true
+  packageName: com.ruoyi.project.invoice # 自动去除表前缀,默认是true
   autoRemovePre: false
   # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
   tablePrefix: sys_

+ 151 - 0
master/src/main/resources/mybatis/invoice/TApproveReserveInvoiceMapper.xml

@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.invoice.mapper.TApproveReserveInvoiceMapper">
+
+    <resultMap type="TApproveReserveInvoice" id="TApproveReserveInvoiceResult">
+        <result property="id"    column="id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="managerconId"    column="managercon_id"    />
+        <result property="userSupId"    column="user_sup_id"    />
+        <result property="devEngineerId"    column="dev_engineer_id"    />
+        <result property="monitorId"    column="monitor_id"    />
+        <result property="devType"    column="dev_type"    />
+        <result property="approveType"    column="approve_type"    />
+        <result property="content"    column="content"    />
+        <result property="fileUrls"    column="file_urls"    />
+        <result property="status"    column="status"    />
+        <result property="creattime"    column="creattime"    />
+        <result property="enddate"    column="enddate"    />
+        <result property="processId"    column="process_id"    />
+        <result property="apNo"    column="ap_no"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="devSupId"    column="dev_sup_id"    />
+        <result property="deptName" column="dept_name" />
+        <result property="invoiceId" column="invoice_id" />
+    </resultMap>
+
+    <sql id="selectTApproveReserveInvoiceVo">
+        select d.id, d.user_id, d.managercon_id, d.user_sup_id, d.dev_engineer_id, d.monitor_id, d.dev_type, d.approve_type, d.content, d.file_urls, d.status, d.creattime, d.enddate, d.process_id, d.ap_no, d.del_flag, d.dept_id, d.dev_sup_id ,d.invoice_id,s.dept_name from t_approve_reserve_invoice d
+      left join sys_dept s on s.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTApproveReserveInvoiceList" parameterType="TApproveReserveInvoice" resultMap="TApproveReserveInvoiceResult">
+        <include refid="selectTApproveReserveInvoiceVo"/>
+        <where>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="managerconId != null "> and managercon_id = #{managerconId}</if>
+            <if test="userSupId != null "> and user_sup_id = #{userSupId}</if>
+            <if test="devEngineerId != null "> and dev_engineer_id = #{devEngineerId}</if>
+            <if test="monitorId != null "> and monitor_id = #{monitorId}</if>
+            <if test="devType != null "> and dev_type = #{devType}</if>
+            <if test="approveType != null "> and approve_type = #{approveType}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="fileUrls != null  and fileUrls != ''"> and file_urls = #{fileUrls}</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="creattime != null "> and creattime = #{creattime}</if>
+            <if test="enddate != null "> and enddate = #{enddate}</if>
+            <if test="processId != null  and processId != ''"> and process_id = #{processId}</if>
+            <if test="apNo != null  and apNo != ''"> and ap_no = #{apNo}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="devSupId != null "> and dev_sup_id = #{devSupId}</if>
+            <if test="invoiceId != null "> and invoice_id = #{invoiceId}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
+    <select id="selectTApproveReserveInvoiceById" parameterType="Long" resultMap="TApproveReserveInvoiceResult">
+        <include refid="selectTApproveReserveInvoiceVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTApproveReserveInvoice" parameterType="TApproveReserveInvoice">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_approve_reserve_invoice.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_approve_reserve_invoice
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="managerconId != null">managercon_id,</if>
+            <if test="userSupId != null">user_sup_id,</if>
+            <if test="devEngineerId != null">dev_engineer_id,</if>
+            <if test="monitorId != null">monitor_id,</if>
+            <if test="devType != null">dev_type,</if>
+            <if test="approveType != null">approve_type,</if>
+            <if test="content != null">content,</if>
+            <if test="fileUrls != null">file_urls,</if>
+            <if test="status != null">status,</if>
+            <if test="creattime != null">creattime,</if>
+            <if test="enddate != null">enddate,</if>
+            <if test="processId != null">process_id,</if>
+            <if test="apNo != null">ap_no,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="devSupId != null">dev_sup_id,</if>
+            <if test="invoiceId != null">invoice_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="managerconId != null">#{managerconId},</if>
+            <if test="userSupId != null">#{userSupId},</if>
+            <if test="devEngineerId != null">#{devEngineerId},</if>
+            <if test="monitorId != null">#{monitorId},</if>
+            <if test="devType != null">#{devType},</if>
+            <if test="approveType != null">#{approveType},</if>
+            <if test="content != null">#{content},</if>
+            <if test="fileUrls != null">#{fileUrls},</if>
+            <if test="status != null">#{status},</if>
+            <if test="creattime != null">#{creattime},</if>
+            <if test="enddate != null">#{enddate},</if>
+            <if test="processId != null">#{processId},</if>
+            <if test="apNo != null">#{apNo},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="devSupId != null">#{devSupId},</if>
+            <if test="invoiceId != null">#{invoiceId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTApproveReserveInvoice" parameterType="TApproveReserveInvoice">
+        update t_approve_reserve_invoice
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="managerconId != null">managercon_id = #{managerconId},</if>
+            <if test="userSupId != null">user_sup_id = #{userSupId},</if>
+            <if test="devEngineerId != null">dev_engineer_id = #{devEngineerId},</if>
+            <if test="monitorId != null">monitor_id = #{monitorId},</if>
+            <if test="devType != null">dev_type = #{devType},</if>
+            <if test="approveType != null">approve_type = #{approveType},</if>
+            <if test="content != null">content = #{content},</if>
+            <if test="fileUrls != null">file_urls = #{fileUrls},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="creattime != null">creattime = #{creattime},</if>
+            <if test="enddate != null">enddate = #{enddate},</if>
+            <if test="processId != null">process_id = #{processId},</if>
+            <if test="apNo != null">ap_no = #{apNo},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="devSupId != null">dev_sup_id = #{devSupId},</if>
+            <if test="invoiceId != null">invoice_id = #{invoiceId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTApproveReserveInvoiceById" parameterType="Long">
+        update t_approve_reserve_invoice set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTApproveReserveInvoiceByIds" parameterType="String">
+        update t_approve_reserve_invoice set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+</mapper>

+ 117 - 0
master/src/main/resources/processes/reserveInvoice.bpmn

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
+  <process id="reserveInvoice" name="预约开票审批流程" isExecutable="true">
+    <startEvent id="start" name="开始" activiti:initiator="${applyUserId}"></startEvent>
+    <userTask id="yhzgtask" name="用户主管签字确认" activiti:assignee="#{yhzgusers}"></userTask>
+    <userTask id="zzzgtask" name="装置主管签字确认" activiti:assignee="#{zzzgusers}"></userTask>
+    <sequenceFlow id="flow2" sourceRef="yhzgtask" targetRef="zzzgtask"></sequenceFlow>
+    <userTask id="istodaytask" name="作业开始时间是否为预约当天"></userTask>
+    <sequenceFlow id="flow5" sourceRef="zzzgtask" targetRef="istodaytask"></sequenceFlow>
+    <userTask id="zzgcstask" name="装置工程师签字确认" activiti:assignee="#{zzgcsusers}"></userTask>
+    <sequenceFlow id="flow6" name="是" sourceRef="istodaytask" targetRef="zzgcstask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='是'}]]></conditionExpression>
+    </sequenceFlow>
+    <userTask id="isspecialtask" name="是否涉及特技动火、受限空间"></userTask>
+    <sequenceFlow id="flow7" name="否" sourceRef="istodaytask" targetRef="isspecialtask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='否'}]]></conditionExpression>
+    </sequenceFlow>
+    <userTask id="zzjltask" name="装置经理签字确认" activiti:assignee="#{zzjlusers}"></userTask>
+    <sequenceFlow id="flow8" name="是" sourceRef="isspecialtask" targetRef="zzjltask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='是'}]]></conditionExpression>
+    </sequenceFlow>
+    <userTask id="confirmtask" name="各班班长、开票人员确认、整合信息关联至CTS系统" activiti:assignee="#{bzusers}"></userTask>
+    <sequenceFlow id="flow9" name="否" sourceRef="isspecialtask" targetRef="confirmtask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='否'}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow10" sourceRef="zzgcstask" targetRef="isspecialtask"></sequenceFlow>
+    <sequenceFlow id="flow11" sourceRef="zzjltask" targetRef="confirmtask"></sequenceFlow>
+    <endEvent id="end" name="结束"></endEvent>
+    <sequenceFlow id="flow12" sourceRef="confirmtask" targetRef="end"></sequenceFlow>
+    <sequenceFlow id="flow13" sourceRef="start" targetRef="yhzgtask"></sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_reserveInvoice">
+    <bpmndi:BPMNPlane bpmnElement="reserveInvoice" id="BPMNPlane_reserveInvoice">
+      <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
+        <omgdc:Bounds height="35.0" width="35.0" x="350.0" y="10.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="yhzgtask" id="BPMNShape_yhzgtask">
+        <omgdc:Bounds height="55.0" width="145.0" x="295.0" y="90.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="zzzgtask" id="BPMNShape_zzzgtask">
+        <omgdc:Bounds height="55.0" width="145.0" x="295.0" y="180.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="istodaytask" id="BPMNShape_istodaytask">
+        <omgdc:Bounds height="71.0" width="145.0" x="295.0" y="270.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="zzgcstask" id="BPMNShape_zzgcstask">
+        <omgdc:Bounds height="71.0" width="136.0" x="590.0" y="270.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="isspecialtask" id="BPMNShape_isspecialtask">
+        <omgdc:Bounds height="71.0" width="145.0" x="295.0" y="390.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="zzjltask" id="BPMNShape_zzjltask">
+        <omgdc:Bounds height="71.0" width="136.0" x="50.0" y="390.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="confirmtask" id="BPMNShape_confirmtask">
+        <omgdc:Bounds height="71.0" width="145.0" x="295.0" y="510.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
+        <omgdc:Bounds height="35.0" width="35.0" x="350.0" y="620.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
+        <omgdi:waypoint x="367.0" y="145.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="180.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
+        <omgdi:waypoint x="367.0" y="235.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="270.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
+        <omgdi:waypoint x="440.0" y="305.0"></omgdi:waypoint>
+        <omgdi:waypoint x="590.0" y="305.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="12.0" x="440.0" y="305.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
+        <omgdi:waypoint x="367.0" y="341.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="390.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="12.0" x="367.0" y="341.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
+        <omgdi:waypoint x="295.0" y="425.0"></omgdi:waypoint>
+        <omgdi:waypoint x="186.0" y="425.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="12.0" x="295.0" y="425.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
+        <omgdi:waypoint x="367.0" y="461.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="510.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="12.0" x="367.0" y="461.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
+        <omgdi:waypoint x="658.0" y="341.0"></omgdi:waypoint>
+        <omgdi:waypoint x="657.0" y="425.0"></omgdi:waypoint>
+        <omgdi:waypoint x="440.0" y="425.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
+        <omgdi:waypoint x="118.0" y="461.0"></omgdi:waypoint>
+        <omgdi:waypoint x="118.0" y="545.0"></omgdi:waypoint>
+        <omgdi:waypoint x="295.0" y="545.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
+        <omgdi:waypoint x="367.0" y="581.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="620.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
+        <omgdi:waypoint x="367.0" y="45.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="90.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>

+ 53 - 0
ui/src/api/invoice/invoice.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询预约开票申请列表
+export function listInvoice(query) {
+  return request({
+    url: '/approve/invoice/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询预约开票申请详细
+export function getInvoice(id) {
+  return request({
+    url: '/approve/invoice/' + id,
+    method: 'get'
+  })
+}
+
+// 新增预约开票申请
+export function addInvoice(data) {
+  return request({
+    url: '/approve/invoice',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改预约开票申请
+export function updateInvoice(data) {
+  return request({
+    url: '/approve/invoice',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除预约开票申请
+export function delInvoice(id) {
+  return request({
+    url: '/approve/invoice/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出预约开票申请
+export function exportInvoice(query) {
+  return request({
+    url: '/approve/invoice/export',
+    method: 'get',
+    params: query
+  })
+}

+ 8 - 0
ui/src/views/approve/myapprove/index.vue

@@ -48,6 +48,7 @@
     <spec-maintenance v-if="specMaintenanceVisible" ref="specMaintenance" @refreshDataList="getList"></spec-maintenance>
     <intact-detail v-if="intactDetailVisible" ref="intactDetail" @refreshDataList="getList"></intact-detail>
     <kekao-detail v-if="kekaoDetailVisible" ref="kekaoDetail" @refreshDataList="getList"></kekao-detail>
+    <invoice-detail v-if="invoiceDetailVisible" ref="invoiceDetail" @refreshDataList="getList"></invoice-detail>
   </div>
 </template>
 
@@ -78,6 +79,7 @@
         specMaintenanceVisible: false,
         intactDetailVisible:false,
         kekaoDetailVisible:false,
+        invoiceDetailVisible:false,
         // 选中数组
         ids: [],
         // 非单个禁用
@@ -200,6 +202,12 @@
             console.log(row.taskName)
             this.$refs.kekaoDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
           })
+        }else if (row.processName == "预约开票审批流程") {
+          this.invoiceDetailVisible = true
+          this.$nextTick(() => {
+            console.log(row.taskName)
+            this.$refs.invoiceDetail.init(row.approveObject.id, row.taskId, row.processId, row.taskName)
+          })
         }  else {
           this.approveInfo = row;
           this.infoTaskName = row.taskName;

+ 406 - 0
ui/src/views/invoice/approveinvoice/index.vue

@@ -0,0 +1,406 @@
+<template>
+  <div class="app-container">
+    <!-- 添加或修改预约开票申请对话框 -->
+    <el-dialog :title="$t('提交申请')" :visible.sync="visible" width="1200px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <el-form-item :label="$t('申请开票')">
+          <el-table :data="devList" border style="width: 100%;">
+            <el-table-column label="作业单位" align="center" prop="workUnit" :formatter="workUnitFormat"/>
+            <el-table-column label="作业区域" align="center" prop="workArea" :formatter="workAreaFormat"/>
+            <el-table-column label="单元号" align="center" prop="unitNumber" :formatter="unitNumberFormat"/>
+            <el-table-column label="楼层位置" align="center" prop="floorLocation" :formatter="floorLocationFormat"/>
+            <el-table-column label=" 作业开始时间" align="center" prop="workStartTime" width="100">
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.workStartTime, '{y}-{m}-{d}') }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="作业结束时间" align="center" prop="workEndTime" width="100">
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.workEndTime, '{y}-{m}-{d}') }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="联系人" align="center" prop="contact" :show-overflow-tooltip="true"/>
+            <el-table-column label="联系方式" align="center" prop="phonenumber" :show-overflow-tooltip="true"/>
+            <el-table-column label="状态" align="center" prop="status" width="100" :formatter="statusFormat"/>
+          </el-table>
+        </el-form-item>
+        <el-form-item label="内容">
+          <el-input type="textarea" :placeholder="$t('原因')+$t('空格')+$t('描述')"
+                    v-model="form.content"
+                    maxlength="200" show-word-limit
+                    :autosize="{ minRows: 2, maxRows: 10}"></el-input>
+        </el-form-item>
+        <el-form-item :label="$t('附件')" prop="fileUrl">
+          <el-upload
+            ref="doc"
+            :limit="5"
+            :headers="doc.headers"
+            :action="doc.url"
+            :disabled="doc.isUploading"
+            :on-progress="handleFileDocProgress"
+            :on-success="handleFileDocSuccess"
+            :on-remove="handleRemove"
+            :auto-upload="true"
+            :file-list="fileList"
+            drag
+          >
+            <i class="el-icon-upload"></i>
+            <div class="el-upload__text">
+              {{ $t('将文件拖到此处,或') }}
+              <em>{{ $t('点击上传') }}</em>
+            </div>
+            <div v-if="showDelay" class="el-upload__tip" slot="tip">{{ this.fileTips }}</div>
+          </el-upload>
+        </el-form-item>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item :label="$t('用户主管')" prop="userSupId">
+              <el-select v-model="form.userSupId" filterable :placeholder="$t('请选择') + $t('用户主管')">
+                <el-option
+                  v-for="dict in managerOptions"
+                  :key="dict.staffId"
+                  :label="dict.nickName"
+                  :value="dict.staffId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="装置主管" prop="devSupId">
+              <el-select v-model="form.devSupId" filterable :placeholder="$t('请选择') + $t('装置主管')">
+                <el-option
+                  v-for="dict in managerOptions"
+                  :key="dict.staffId"
+                  :label="dict.nickName"
+                  :value="dict.staffId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item v-if="this.isToday" label="装置工程师" prop="devEngineerId">
+              <el-select v-model="form.devEngineerId" filterable :placeholder="$t('请选择') + $t('装置工程师')">
+                <el-option
+                  v-for="dict in managerOptions"
+                  :key="dict.staffId"
+                  :label="dict.nickName"
+                  :value="dict.staffId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item v-if="this.isSpecial" :label="$t('装置经理')" prop="managerconId">
+              <el-select v-model="form.managerconId" filterable :placeholder="$t('请选择') + $t('装置经理')">
+                <el-option
+                  v-for="dict in managerOptions"
+                  :key="dict.staffId"
+                  :label="dict.nickName"
+                  :value="dict.staffId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="班长" prop="monitorId">
+              <el-select v-model="form.monitorId" filterable :placeholder="$t('请选择') + $t('班长')">
+                <el-option
+                  v-for="dict in managerOptions"
+                  :key="dict.staffId"
+                  :label="dict.nickName"
+                  :value="dict.staffId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listInvoice,
+  getInvoice,
+  delInvoice,
+  addInvoice,
+  updateInvoice,
+  exportInvoice,
+  importTemplate
+} from "@/api/invoice/invoice";
+import {treeselect} from "@/api/system/dept";
+import {getToken} from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import Editor from '@/components/Editor';
+import {listPostUser} from "@/api/system/user";
+import log from "@/views/monitor/job/log";
+
+export default {
+  name: "Invoice",
+  components: {Treeselect},
+  data() {
+    return {
+      isToday: false,
+      isSpecial: false,
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        showDelay: false,
+        fileList: [],
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specfile/uploadFile",
+        commonfileList: null,
+        pType: 'traning',
+        pId: null
+      },
+      // 遮罩层
+      loading: true,
+      managerOptions: [],
+      devList: [],
+      form: {},
+      // 状态字典
+      statusOptions: [],
+      // 作业单位字典
+      workUnitOptions: [],
+      // 作业区域字典
+      workAreaOptions: [],
+      // 单元号字典
+      unitNumberOptions: [],
+      // 楼层字典
+      floorLocationOptions: [],
+      // 用户单位字典
+      userUnitOptions: [],
+      // 用户主管字典
+      userMgOptions: [],
+      // 作业类型字典
+      workTypeOptions: [],
+      // 风险等级字典
+      riskLevelOptions: [],
+      // 监护人单位字典
+      guardianUnitOptions: [],
+      visible: false,
+      rules: {
+        userSupId: [
+          {required: true, message: this.$t('用户主管') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        devSupId: [
+          {required: true, message: this.$t('装置主管') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        managerconId: [
+          {required: true, message: this.$t('装置经理') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        devEngineerId: [
+          {required: true, message: this.$t('装置工程师') + this.$t('不能为空'), trigger: "blur"}
+        ],
+        monitorId: [
+          {required: true, message: this.$t('班长') + this.$t('不能为空'), trigger: "blur"}
+        ],
+      }
+
+    }
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 250
+    })
+    // this.getList();
+    this.getTreeselect();
+    this.getTreeselect();
+
+  },
+  methods: {
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+    },
+    handleRemove(file, fileList) {
+      this.fileList = fileList
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.fileList = fileList
+      if (response.code == 200) {
+        this.$alert(this.$t('导入成功'), this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else {
+        this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      }
+
+    },
+    init(rows) {
+      this.reset();
+      this.fileList = [];
+      this.getDicts("booking_work_status").then(response => {
+        this.statusOptions = response.data;
+      });
+      this.getDicts("book_work_area").then(response => {
+        this.workAreaOptions = response.data;
+      });
+      this.getDicts("book_unit_number").then(response => {
+        this.unitNumberOptions = response.data;
+      });
+      this.getDicts("book_floor_location").then(response => {
+        this.floorLocationOptions = response.data;
+      });
+      this.getDicts("book_user_mg").then(response => {
+        this.userMgOptions = response.data;
+      });
+      this.getDicts("book_user_unit").then(response => {
+        this.userUnitOptions = response.data;
+      });
+      this.getDicts("book_work_unit").then(response => {
+        this.workUnitOptions = response.data;
+      });
+      this.getDicts("book_work_type").then(response => {
+        this.workTypeOptions = response.data;
+      });
+      this.getDicts("book_risk_level").then(response => {
+        this.riskLevelOptions = response.data;
+      });
+      this.getDicts("book_guardian_unit").then(response => {
+        this.guardianUnitOptions = response.data;
+      });
+      console.log(rows)
+      this.devList = rows;
+      console.log(this.devList)
+      if (rows[0].workStartTime === rows[0].createdate)
+        this.isToday = true;
+      if (rows[0].workType === 1 || rows[0].workType === 2 || rows[0].workType === 14) {
+        this.form.isSpecial = 1;
+      }
+      this.form.invoiceId=rows[0].id;
+      listPostUser({
+        // postCode: 'wxjl'
+      }).then(response => {
+        this.managerOptions = response;
+        console.log(this.managerOptions)
+      });
+      this.visible = true
+    },
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.form.files = []
+          if (this.fileList.length > 0) {
+            for (let i = 0; i < this.fileList.length; i++) {
+              let obj = {}
+              obj.fileName = this.fileList[i].name
+              obj.fileUrl = this.fileList[i].response.msg
+              this.form.files.push(obj)
+            }
+          }
+          if (this.form.workStartTime != null && this.form.workStartTime != undefined && this.form.workStartTime != "" && this.form.workStartTime === this.form.createdate)
+            this.form.isToday = 1;
+          if (this.form.workType === 1 || this.form.workType === 2 || this.form.workType === 14) {
+            this.form.isSpecial = 1;
+          }
+          addInvoice(this.form).then(response => {
+            this.msgSuccess(this.$t('新增成功'));
+            this.visible = false;
+            // this.getList();
+          })
+        }
+      });
+    },
+    // 状态字典翻译
+    statusFormat(row, column) {
+      return this.selectDictLabel(this.statusOptions, row.status);
+    },
+    // 字典翻译
+    workUnitFormat(row, column) {
+      return this.selectDictLabel(this.workUnitOptions, row.workUnit);
+    },
+    // 字典翻译
+    workAreaFormat(row, column) {
+      return this.selectDictLabel(this.workAreaOptions, row.workArea);
+    },
+    // 字典翻译
+    unitNumberFormat(row, column) {
+      return this.selectDictLabel(this.unitNumberOptions, row.unitNumber);
+    },
+    // 字典翻译
+    floorLocationFormat(row, column) {
+      return this.selectDictLabel(this.floorLocationOptions, row.floorLocation);
+    },
+    // 字典翻译
+    userMgFormat(row, column) {
+      return this.selectDictLabel(this.userMgOptions, row.userMg);
+    },
+    // 字典翻译
+    userUnitFormat(row, column) {
+      return this.selectDictLabel(this.userUnitOptions, row.userUnit);
+    },
+    // 字典翻译
+    workTypeFormat(row, column) {
+      return this.selectDictLabel(this.workTypeOptions, row.workType);
+    },
+    // 字典翻译
+    riskLevelFormat(row, column) {
+      return this.selectDictLabel(this.riskLevelOptions, row.riskLevel);
+    },
+    // 字典翻译
+    guardianUnitFormat(row, column) {
+      return this.selectDictLabel(this.guardianUnitOptions, row.guardianUnit);
+    },
+    // 取消按钮
+    cancel() {
+      this.visible = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        userId: null,
+        managerconId: null,
+        userSupId: null,
+        devEngineerId: null,
+        monitorId: null,
+        devType: null,
+        approveType: null,
+        content: null,
+        fileUrls: null,
+        status: 0,
+        creattime: null,
+        enddate: null,
+        processId: null,
+        apNo: null,
+        delFlag: null,
+        deptId: null,
+        devSupId: null
+      };
+      this.resetForm("form");
+    }
+  }
+};
+</script>

+ 39 - 17
ui/src/views/invoice/bookingworkticket/index.vue

@@ -139,10 +139,6 @@
           <span>{{ parseTime(scope.row.workEndTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-        
-                 
-                   
-                   
       <el-table-column label="联系人" align="center" prop="contact" :show-overflow-tooltip="true"/>
       <el-table-column label="联系方式" align="center" prop="phonenumber" :show-overflow-tooltip="true"/>
       <el-table-column label="状态" align="center" prop="status" width="100" :formatter="statusFormat" />
@@ -182,6 +178,11 @@
             icon="el-icon-share"
             @click="billSee(scope.row)"
           >票据预览</el-button>
+          <el-button
+            type="text"
+            size="mini"
+            @click="addAprrove(scope.row)"
+          >{{ $t('预约开票申请') }}</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -298,13 +299,13 @@
             </el-col>
       </el-row>
       </el-form>
-        
+
             <el-form v-for="(ruleForm, index) in ruleForm" :key="index" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
     <el-divider><i class="el-icon-more" style="color:green;font-size:100%"></i><i class="el-icon-more" style="color:green;font-size:100%"></i> <span ><font color="green">关联的作业内容</font></span>
     <i class="el-icon-more" style="color:green;font-size:100%"></i><i class="el-icon-more" style="color:green;font-size:100%"></i></el-divider>
           <el-form-item label="作业内容描述" prop="workDescription">
             <el-input v-model="ruleForm.workDescription"></el-input>
-          </el-form-item> 
+          </el-form-item>
                <el-row>
         <el-col :span="12">
               <el-form-item label="作业类型" prop="workType">
@@ -354,7 +355,7 @@
         <el-input v-model="ruleForm.estimateWorktime"  style="width: 190px"></el-input>
       </el-form-item>
         </el-form>
-        
+
         <el-button @click="resetForm1()">重置</el-button>
         <el-button @click="add">+</el-button>
         <el-button @click="reduce" :disabled="flag">-</el-button>
@@ -394,6 +395,7 @@
               <el-button @click="upload.open = false">取 消</el-button>
           </div>
       </el-dialog>
+    <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
   </div>
 </template>
 
@@ -404,10 +406,11 @@ import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import AddApprove from "../approveinvoice/index"
 
 export default {
   name: "Bookingworkticket",
-  components: { Treeselect },
+  components: { Treeselect,AddApprove},
   data() {
     return {
       tInvoiceWorkcontentList:[],
@@ -415,6 +418,8 @@ export default {
       tabletou:['作业类型','风险等级','作业内容描述','作业人员数','作业预计时间','监护人单位'],
       //用户名和承包商名
       username:"",
+      addAprroveVisible: false,
+      hisAprroveVisible: false,
       //bookticked关联ID
       btid:"",
       // 遮罩层
@@ -456,7 +461,7 @@ export default {
       riskLevelOptions: [],
         // 监护人单位字典
       guardianUnitOptions: [],
-     
+
       // 是否显示弹出层
       open: false,
         // 用户导入参数
@@ -553,9 +558,26 @@ export default {
     this.getDicts("book_guardian_unit").then(response => {
       this.guardianUnitOptions = response.data;
     });
- 
+
   },
   methods: {
+    addAprrove(row) {
+      var rows = row ? [row] : this.bookingworkticketList.map(item => {
+        return item
+      })
+      for (let i = 0; i < rows.length; i++) {
+        if (rows[i].status != 0) {
+          this.$alert(this.$t('当前设备正在申请中,无法重复申请'), this.$t('提示'), {
+            type: 'warning'
+          })
+          return
+        }
+      }
+      this.$nextTick(() => {
+        this.$refs.addApprove.init(rows)
+      })
+      this.addAprroveVisible = true
+    },
 // 表单添加一行
     add() {
       var arr = { }
@@ -695,11 +717,11 @@ export default {
       this.reset();
       this.resetForm1();
         var roles =this.$store.state.user.roles
-  
+
    this.open = true;
       this.title = "添加预约作业票台账";
-    
-   
+
+
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -719,7 +741,7 @@ export default {
           if (this.form.id != null) {
               this.form.tInvoiceWorkcontentList=this.ruleForm
             updateBookingworkticket(this.form).then(response => {
-          
+
               this.msgSuccess("修改成功");
               this.open = false;
               this.getList();
@@ -733,12 +755,12 @@ export default {
               this.getList();
               this.resetForm1();
             });
-        
-              
+
+
           }
         }
       });
-      
+
     },
     /** 删除按钮操作 */
     handleDelete(row) {