소스 검색

请假,补卡

zxz 3 년 전
부모
커밋
0e7b0908c4

+ 14 - 14
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/ClockInfoController.java

@@ -3,6 +3,7 @@ package com.yh.saas.plugin.yiliangyiyun.controller;
 
 import com.baomidou.mybatisplus.plugins.Page;
 import com.yh.saas.plugin.yiliangyiyun.entity.ClockInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.FuelFillingInfo;
 import com.yh.saas.plugin.yiliangyiyun.service.IClockInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -57,23 +58,22 @@ public class ClockInfoController {
     /**
      * 添加补卡信息
      *
-     * @param clockInfo
+     * @param clockInfo1
      * @return
      */
     @PostMapping("/api/suppClock")
-    public String suppClock(@RequestBody ClockInfo clockInfo) {
-        return clockInfoService.suppClock(clockInfo);
+    public String suppClock(@RequestBody ClockInfo clockInfo1) {
+        return clockInfoService.suppClock(clockInfo1);
+    }
+    /**
+     * 查看补卡信息
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("/getSuppClock")
+    public ClockInfo getSuppClock(@RequestParam String id) {
+        return clockInfoService.getSuppClock(id);
     }
-
-//    /**
-//     * 补卡信息审核
-//     *
-//     * @param clockInfo
-//     * @return
-//     */
-//    @PostMapping("/api/examineClock")
-//    public String examineClock(@RequestBody ClockInfo clockInfo) {
-//        return clockInfoService.examineClock(clockInfo);
-//    }
 }
 

+ 11 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/LeaveInfoController.java

@@ -2,6 +2,7 @@ package com.yh.saas.plugin.yiliangyiyun.controller;
 
 
 import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.ClockInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.LeaveInfo;
 import com.yh.saas.plugin.yiliangyiyun.service.ILeaveInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -51,5 +52,15 @@ public class LeaveInfoController {
     public Page<LeaveInfo> selectLeaveInfoPc(LeaveInfo leaveInfo) {
         return leaveInfoService.selectLeaveInfoPc(leaveInfo);
     }
+    /**
+     * 查看请假信息
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("/getLeaveInfo")
+    public LeaveInfo getLeaveInfo(@RequestParam String id) {
+        return leaveInfoService.getLeaveInfo(id);
+    }
 }
 

+ 3 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/ClockInfo.java

@@ -163,6 +163,9 @@ public class ClockInfo extends BaseModel<ClockInfo> {
     @TableField(exist = false)
     private Date endDate;
 
+    @TableField(exist = false)
+    private String taskId;
+
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 3 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/LeaveInfo.java

@@ -128,6 +128,9 @@ public class LeaveInfo extends BaseModel<LeaveInfo> {
     @TableField(exist = false)
     private Date theEndDate;
 
+    @TableField(exist = false)
+    private String taskId;
+
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 8 - 9
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IClockInfoService.java

@@ -3,6 +3,7 @@ package com.yh.saas.plugin.yiliangyiyun.service;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.yh.saas.plugin.yiliangyiyun.entity.ClockInfo;
 import com.baomidou.mybatisplus.service.IService;
+import com.yh.saas.plugin.yiliangyiyun.entity.FuelFillingInfo;
 
 /**
  * <p>
@@ -40,14 +41,12 @@ public interface IClockInfoService extends IService<ClockInfo> {
     /**
      * 添加补卡信息
      *
-     * @param clockInfo
+     * @param clockInfo1
      */
-    String suppClock(ClockInfo clockInfo);
-
-//    /**
-//     * 补卡信息审核
-//     *
-//     * @param clockInfo
-//     */
-//    String examineClock(ClockInfo clockInfo);
+    String suppClock(ClockInfo clockInfo1);
+    /**
+     * 查看补卡信息
+     * @param id
+     */
+    ClockInfo getSuppClock(String id);
 }

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ILeaveInfoService.java

@@ -1,6 +1,7 @@
 package com.yh.saas.plugin.yiliangyiyun.service;
 
 import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.ClockInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.LeaveInfo;
 import com.baomidou.mybatisplus.service.IService;
 
@@ -33,4 +34,9 @@ public interface ILeaveInfoService extends IService<LeaveInfo> {
      * @return
      */
     Page<LeaveInfo> selectLeaveInfoPc(LeaveInfo leaveInfo);
+    /**
+     * 查看请假信息
+     * @param id
+     */
+    LeaveInfo getLeaveInfo(String id);
 }

+ 67 - 43
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ClockInfoServiceImpl.java

@@ -1,18 +1,23 @@
 package com.yh.saas.plugin.yiliangyiyun.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.google.common.collect.Lists;
+import com.winsea.svc.base.workflow.entity.Workflow;
 import com.yh.saas.common.support.util.IdGenerator;
-import com.yh.saas.common.support.util.StringUtils;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
 import com.yh.saas.plugin.yiliangyiyun.entity.ClockInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.FuelFillingInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.LeaveInfo;
+import com.yh.saas.plugin.yiliangyiyun.exception.YException;
+import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.ClockInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IClockInfoService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
-import com.yh.saas.plugin.yiliangyiyun.service.ILeaveInfoService;
+import com.yh.saas.plugin.yiliangyiyun.service.INewWorkflowService;
 import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -32,7 +37,7 @@ public class ClockInfoServiceImpl extends ServiceImpl<ClockInfoMapper, ClockInfo
     @Autowired
     private IClockInfoService clockInfoService;
     @Autowired
-    private ILeaveInfoService leaveInfoService;
+    private INewWorkflowService workflowService;
 
     /**
      * 添加打卡信息
@@ -127,11 +132,21 @@ public class ClockInfoServiceImpl extends ServiceImpl<ClockInfoMapper, ClockInfo
         pageView.put("compId", clockInfo.getCompId());
         pageView.put("commonId", clockInfo.getCommonId());
         pageView.put("pageSize", clockInfo.getPageSize());
-        pageView.put("yearMonth",clockInfo.getYearMonth());
+        pageView.put("yearMonth", clockInfo.getYearMonth());
         pageView.put("currentPage", clockInfo.getCurrentPage());
         // 查询总数
         Integer dataCount = baseMapper.getCountByCondition(pageView);
         List<ClockInfo> dataList = baseMapper.getListByCondition(pageView);
+        dataList.forEach(clockInfo1 -> {
+            String taskId = "";
+            // 只有待审核状态才有taskId
+            if (StringUtils.isNotBlank(clockInfo1.getWorkflowId())) {
+                JSONObject jsonObject = workflowService.getActiveTask(Lists.newArrayList(clockInfo1.getWorkflowId()), clockInfo1.getId());
+                taskId = jsonObject.getString("taskId");
+                clockInfo1.setTaskId(taskId);
+            }
+
+        });
         Page<ClockInfo> page = new Page<>();
         page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
         page.setTotal(dataCount == null ? 0 : dataCount);
@@ -183,50 +198,59 @@ public class ClockInfoServiceImpl extends ServiceImpl<ClockInfoMapper, ClockInfo
     /**
      * 添加补卡信息
      *
-     * @param clockInfo
+     * @param clockInfo1
      * @return
      */
     @Override
-    public String suppClock(ClockInfo clockInfo) {
+    public String suppClock(ClockInfo clockInfo1) {
         //查询打卡信息
-        ClockInfo clockInfo1 = this.selectById(clockInfo.getId());
-        if (clockInfo1 != null) {
-            clockInfo1.setSupplementClockType(clockInfo.getSupplementClockType());
-            clockInfo1.setReasonForApplication(clockInfo.getReasonForApplication());
-            //补卡状态改为审核中
-            clockInfo1.setStatus(StatusEnum.SUPP_REVIEWED.getName());
-            clockInfo1.setStatusFlag(StatusEnum.SUPP_REVIEWED.getFlag());
-            this.updateById(clockInfo1);
+        ClockInfo clockInfo = this.selectById(clockInfo1.getId());
+        if (clockInfo != null) {
+            clockInfo.setSupplementClockType(clockInfo1.getSupplementClockType());
+            clockInfo.setReasonForApplication(clockInfo1.getReasonForApplication());
+            this.updateById(clockInfo);
+
+            boolean isStartWorkflow = StringUtils.isBlank(clockInfo.getWorkflowId());
+            // 不是退回的单子
+            if (isStartWorkflow) {
+                Workflow workflow = workflowService
+                        .findLatestWorkflowByBusinessCodeByApp(clockInfo.getCompId(), "BUKA-APPROVE");
+                // 没配置审核流程,直接结束并处理信息
+                if (workflow == null) {
+                    throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
+                }
+                // 开启审核流
+                else {
+                    // 设置状态 已提交审核
+                    clockInfo.setWorkflowId(workflow.getId());
+                    clockInfoService.updateById(clockInfo);
+                    workflowService.startInstance(workflow.getId(), clockInfo.getId());
+                }
+            }
+            // 退回的单子 再启用
+            else {
+                clockInfoService.updateById(clockInfo);
+                workflowService.activateInstance(clockInfo.getWorkflowId(), clockInfo.getId());
+            }
         }
         return "OK";
     }
-
-//    /**
-//     * 补卡信息审核
-//     *
-//     * @param clockInfo
-//     * @return
-//     */
-//    @Override
-//    public String examineClock(ClockInfo clockInfo) {
-//        //查询打卡信息
-//        ClockInfo clockInfo1 = this.selectById(clockInfo.getId());
-//        if (clockInfo1 != null && "1".equals(clockInfo1.getStatusFlag())) {
-//            //通过
-//            if (clockInfo.getExamineFlag() == 1) {
-//                //补卡状态改为补卡成功
-//                clockInfo1.setStatus(StatusEnum.SUPP_SUCCESS.getName());
-//                clockInfo1.setStatusFlag(StatusEnum.SUPP_SUCCESS.getFlag());
-//            }
-//            //驳回
-//            else {
-//                //补卡状态改为补卡失败
-//                clockInfo1.setStatus(StatusEnum.SUPP_FAIL.getName());
-//                clockInfo1.setStatusFlag(StatusEnum.SUPP_FAIL.getFlag());
-//            }
-//            //更新数据
-//            this.updateById(clockInfo1);
-//        }
-//        return null;
-//    }
+    /**
+     * 查看补卡信息
+     * @param id
+     * @return
+     */
+    @Override
+    public ClockInfo getSuppClock(String id) {
+        //根据id查询补卡信息
+        ClockInfo clockInfo = this.selectById(id);
+        String taskId = "";
+        // 只有待审核状态才有taskId
+        if (StringUtils.isNotBlank(clockInfo.getWorkflowId())) {
+            JSONObject jsonObject = workflowService.getActiveTask(Lists.newArrayList(clockInfo.getWorkflowId()), clockInfo.getId());
+            taskId = jsonObject.getString("taskId");
+            clockInfo.setTaskId(taskId);
+        }
+        return clockInfo;
+    }
 }

+ 57 - 9
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/LeaveInfoServiceImpl.java

@@ -1,15 +1,21 @@
 package com.yh.saas.plugin.yiliangyiyun.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.google.common.collect.Lists;
+import com.winsea.svc.base.workflow.entity.Workflow;
 import com.yh.saas.common.support.util.IdGenerator;
 import com.yh.saas.plugin.yiliangyiyun.entity.ClockInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.LeaveInfo;
+import com.yh.saas.plugin.yiliangyiyun.exception.YException;
+import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.LeaveInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IClockInfoService;
 import com.yh.saas.plugin.yiliangyiyun.service.ILeaveInfoService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.yh.saas.plugin.yiliangyiyun.service.INewWorkflowService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -29,6 +35,10 @@ import java.util.*;
 public class LeaveInfoServiceImpl extends ServiceImpl<LeaveInfoMapper, LeaveInfo> implements ILeaveInfoService {
     @Autowired
     private IClockInfoService clockInfoService;
+    @Autowired
+    private INewWorkflowService workflowService;
+    @Autowired
+    private ILeaveInfoService leaveInfoService;
 
     /**
      * 添加请假信息
@@ -50,22 +60,41 @@ public class LeaveInfoServiceImpl extends ServiceImpl<LeaveInfoMapper, LeaveInfo
         //新增主键id
         leaveInfo.setId(IdGenerator.generateUUID());
         leaveInfo.setClockId(ClockId);
-        leaveInfo.setStatus("待审核");
-        leaveInfo.setStatusFlag("1");
         this.insert(leaveInfo);
+        boolean isStartWorkflow = StringUtils.isBlank(leaveInfo.getWorkflowId());
+        // 不是退回的单子
+        if (isStartWorkflow) {
+            Workflow workflow = workflowService
+                    .findLatestWorkflowByBusinessCodeByApp(leaveInfo.getCompId(), "QINGJIA-APPROVE");
+            // 没配置审核流程,直接结束并处理信息
+            if (workflow == null) {
+                throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
+            }
+            // 开启审核流
+            else {
+                // 设置状态 已提交审核
+                leaveInfo.setWorkflowId(workflow.getId());
+                leaveInfoService.updateById(leaveInfo);
+                workflowService.startInstance(workflow.getId(), leaveInfo.getId());
+            }
+        }
+        // 退回的单子 再启用
+        else {
+            leaveInfoService.updateById(leaveInfo);
+            workflowService.activateInstance(leaveInfo.getWorkflowId(), leaveInfo.getId());
+        }
         //查询打卡信息
         ClockInfo clockInfo1 = clockInfoService.selectOne(new EntityWrapper<ClockInfo>()
-                    .eq("comp_id",leaveInfo.getCompId())
-                    .eq("common_id",leaveInfo.getCommonId())
-                    .eq("delete_flag","0")
-                    .gt("create_date",timeOfDay));
-        if(clockInfo1 != null){
+                .eq("comp_id", leaveInfo.getCompId())
+                .eq("common_id", leaveInfo.getCommonId())
+                .eq("delete_flag", "0")
+                .gt("create_date", timeOfDay));
+        if (clockInfo1 != null) {
             clockInfo1.setLeaveId(leaveInfo.getId());
             clockInfo1.setLeaveType(leaveInfo.getLeaveType());
             //修改数据
             clockInfoService.updateById(clockInfo1);
-        }
-        else {
+        } else {
             //新增打卡信息
             ClockInfo clockInfo = new ClockInfo();
             clockInfo.setId(ClockId);
@@ -111,6 +140,7 @@ public class LeaveInfoServiceImpl extends ServiceImpl<LeaveInfoMapper, LeaveInfo
 
     /**
      * 请假记录查询(PC)
+     *
      * @param leaveInfo
      * @return
      */
@@ -136,4 +166,22 @@ public class LeaveInfoServiceImpl extends ServiceImpl<LeaveInfoMapper, LeaveInfo
         page.setSize(leaveInfo.getPageSize());
         return page;
     }
+    /**
+     * 查看请假信息
+     * @param id
+     * @return
+     */
+    @Override
+    public LeaveInfo getLeaveInfo(String id) {
+        //根据id查询补卡信息
+        LeaveInfo leaveInfo = this.selectById(id);
+        String taskId = "";
+        // 只有待审核状态才有taskId
+        if (StringUtils.isNotBlank(leaveInfo.getWorkflowId())) {
+            JSONObject jsonObject = workflowService.getActiveTask(Lists.newArrayList(leaveInfo.getWorkflowId()), leaveInfo.getId());
+            taskId = jsonObject.getString("taskId");
+            leaveInfo.setTaskId(taskId);
+        }
+        return leaveInfo;
+    }
 }

+ 4 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/workflow/BukaListener.java

@@ -22,8 +22,8 @@ public class BukaListener extends AbstractWorkflowTaskListener {
             return;
         }
         if (processIsEnd) {
-            clockInfo.setStatusFlag(StatusEnum.ORDER_PASSED.getFlag());
-            clockInfo.setStatus(StatusEnum.ORDER_PASSED.getName());
+            clockInfo.setStatusFlag(StatusEnum.SUPP_SUCCESS.getFlag());
+            clockInfo.setStatus(StatusEnum.SUPP_SUCCESS.getName());
             clockInfo.setWorkflowId(null);
             clockInfo.setApproveStatus(null);
         } else {
@@ -38,8 +38,8 @@ public class BukaListener extends AbstractWorkflowTaskListener {
         if (clockInfo == null) {
             return;
         }
-        clockInfo.setStatusFlag(StatusEnum.PURCHASE_FAILED.getFlag());
-        clockInfo.setStatus(StatusEnum.PURCHASE_FAILED.getName());
+        clockInfo.setStatusFlag(StatusEnum.SUPP_FAIL.getFlag());
+        clockInfo.setStatus(StatusEnum.SUPP_FAIL.getName());
         clockInfo.setApproveStatus(null);
         clockInfoService.updateAllColumnById(clockInfo);
 

+ 17 - 19
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/workflow/QingjiaListener.java

@@ -3,10 +3,8 @@ package com.yh.saas.plugin.yiliangyiyun.workflow;
 import com.yh.saas.common.support.workflow.AbstractWorkflowTaskListener;
 import com.yh.saas.common.support.workflow.annotation.WorkflowTaskListener;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
-import com.yh.saas.plugin.yiliangyiyun.entity.ClockInfo;
-import com.yh.saas.plugin.yiliangyiyun.entity.PurchasePrice;
-import com.yh.saas.plugin.yiliangyiyun.service.IClockInfoService;
-import com.yh.saas.plugin.yiliangyiyun.service.IPurchasePriceService;
+import com.yh.saas.plugin.yiliangyiyun.entity.LeaveInfo;
+import com.yh.saas.plugin.yiliangyiyun.service.ILeaveInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 
 @WorkflowTaskListener(name = "考勤管理", group = "请假管理")
@@ -15,35 +13,35 @@ public class QingjiaListener extends AbstractWorkflowTaskListener {
     private static final long serialVersionUID = 4103656734835351132L;
 
     @Autowired
-    private IClockInfoService clockInfoService;
+    private ILeaveInfoService leaveInfoService;
 
     @Override
     public void handleStatusChanged(String businessKey, String status, String statusEn, boolean processIsEnd) {
-        ClockInfo clockInfo = clockInfoService.selectById(businessKey);
-        if (clockInfo == null) {
+        LeaveInfo leaveInfo = leaveInfoService.selectById(businessKey);
+        if (leaveInfo == null) {
             return;
         }
         if (processIsEnd) {
-            clockInfo.setStatusFlag(StatusEnum.ORDER_PASSED.getFlag());
-            clockInfo.setStatus(StatusEnum.ORDER_PASSED.getName());
-            clockInfo.setWorkflowId(null);
-            clockInfo.setApproveStatus(null);
+            leaveInfo.setStatusFlag(StatusEnum.ORDER_PASSED.getFlag());
+            leaveInfo.setStatus(StatusEnum.ORDER_PASSED.getName());
+            leaveInfo.setWorkflowId(null);
+            leaveInfo.setApproveStatus(null);
         } else {
-            clockInfo.setApproveStatus(status);
+            leaveInfo.setApproveStatus(status);
         }
-        clockInfoService.updateAllColumnById(clockInfo);
+        leaveInfoService.updateAllColumnById(leaveInfo);
     }
 
     @Override
     public void handleRejectApplicationRepulsed(String workflowId, String businessKey, boolean needReapply) {
-        ClockInfo clockInfo = clockInfoService.selectById(businessKey);
-        if (clockInfo == null) {
+        LeaveInfo leaveInfo = leaveInfoService.selectById(businessKey);
+        if (leaveInfo == null) {
             return;
         }
-        clockInfo.setStatusFlag(StatusEnum.PURCHASE_FAILED.getFlag());
-        clockInfo.setStatus(StatusEnum.PURCHASE_FAILED.getName());
-        clockInfo.setApproveStatus(null);
-        clockInfoService.updateAllColumnById(clockInfo);
+        leaveInfo.setStatusFlag(StatusEnum.PURCHASE_FAILED.getFlag());
+        leaveInfo.setStatus(StatusEnum.PURCHASE_FAILED.getName());
+        leaveInfo.setApproveStatus(null);
+        leaveInfoService.updateAllColumnById(leaveInfo);
 
     }
 

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/ClockInfoMapper.xml

@@ -33,6 +33,7 @@
         leave_type as leaveType,
         leave_early_flag as leaveEarlyFlag,
         late_flag as lateFlag,
+        workflow_id as workflowId,
         status,
         status_flag as statusFlag,
         approve_status as approveStatus,

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/LeaveInfoMapper.xml

@@ -28,6 +28,7 @@
         leave_type as leaveType,
         leave_type_key as leaveTypeKey,
         leave_duration as leaveDuration,
+        workflow_id as workflowId,
         status,
         status_flag as statusFlag,
         approve_status as approveStatus,