LIVE_YE 2 days ago
parent
commit
f8e7c15af9

+ 132 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/chuchai/BusinessTripController.java

@@ -0,0 +1,132 @@
+package com.ruoyi.web.controller.chuchai;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.system.domain.RecordLeave;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.BusinessTrip;
+import com.ruoyi.system.service.IBusinessTripService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 出差记录信息Controller
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+@RestController
+@RequestMapping("/business/trip")
+public class BusinessTripController extends BaseController
+{
+    @Autowired
+    private IBusinessTripService businessTripService;
+
+    /**
+     * 查询出差记录信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:trip:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BusinessTrip businessTrip)
+    {
+        startPage();
+        List<BusinessTrip> list = businessTripService.selectBusinessTripList(businessTrip);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出出差记录信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:trip:export')")
+    @Log(title = "出差记录信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BusinessTrip businessTrip)
+    {
+        List<BusinessTrip> list = businessTripService.selectBusinessTripList(businessTrip);
+        ExcelUtil<BusinessTrip> util = new ExcelUtil<BusinessTrip>(BusinessTrip.class);
+        util.exportExcel(response, list, "出差记录信息数据");
+    }
+
+    /**
+     * 获取出差记录信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:trip:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(businessTripService.selectBusinessTripById(id));
+    }
+
+    /**
+     * 新增出差记录信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:trip:add')")
+    @Log(title = "出差记录信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BusinessTrip businessTrip)
+    {
+        return toAjax(businessTripService.insertBusinessTrip(businessTrip));
+    }
+
+    /**
+     * 修改出差记录信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:trip:edit')")
+    @Log(title = "出差记录信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody BusinessTrip businessTrip)
+    {
+        return toAjax(businessTripService.updateBusinessTrip(businessTrip));
+    }
+
+    /**
+     * 删除出差记录信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:trip:remove')")
+    @Log(title = "出差记录信息", businessType = BusinessType.DELETE)
+    @GetMapping(value = "/delete/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(businessTripService.deleteBusinessTripByIds(ids));
+    }
+
+    /***
+     * 出差审核
+     * @param id id
+     * @param isPass 是否通过 1:不通过,2:通过
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('business:trip:audit')")
+    @GetMapping(value = "/audit")
+    public AjaxResult audit(BusinessTrip businessTrip)
+    {
+        return toAjax(businessTripService.audit(businessTrip));
+    }
+
+
+    /**
+     * 获取当前账号下的出差审核列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:trippresentList')")
+    @GetMapping("/presentList")
+    public TableDataInfo presentList(BusinessTrip businessTrip)
+    {
+        startPage();
+        List<BusinessTrip> list = businessTripService.presentList(businessTrip);
+        return getDataTable(list);
+    }
+}

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/chuchai/BusinessUserController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.chuchai;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.BusinessUser;
+import com.ruoyi.system.service.IBusinessUserService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 出差人员信息Controller
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+@RestController
+@RequestMapping("/business/user")
+public class BusinessUserController extends BaseController
+{
+    @Autowired
+    private IBusinessUserService businessUserService;
+
+    /**
+     * 查询出差人员信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:user:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BusinessUser businessUser)
+    {
+        startPage();
+        List<BusinessUser> list = businessUserService.selectBusinessUserList(businessUser);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出出差人员信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:user:export')")
+    @Log(title = "出差人员信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BusinessUser businessUser)
+    {
+        List<BusinessUser> list = businessUserService.selectBusinessUserList(businessUser);
+        ExcelUtil<BusinessUser> util = new ExcelUtil<BusinessUser>(BusinessUser.class);
+        util.exportExcel(response, list, "出差人员信息数据");
+    }
+
+    /**
+     * 获取出差人员信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:user:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(businessUserService.selectBusinessUserById(id));
+    }
+
+    /**
+     * 新增出差人员信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:user:add')")
+    @Log(title = "出差人员信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BusinessUser businessUser)
+    {
+        return toAjax(businessUserService.insertBusinessUser(businessUser));
+    }
+
+    /**
+     * 修改出差人员信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:user:edit')")
+    @Log(title = "出差人员信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BusinessUser businessUser)
+    {
+        return toAjax(businessUserService.updateBusinessUser(businessUser));
+    }
+
+    /**
+     * 删除出差人员信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:user:remove')")
+    @Log(title = "出差人员信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(businessUserService.deleteBusinessUserByIds(ids));
+    }
+}

+ 40 - 33
ruoyi-admin/src/main/java/com/ruoyi/web/controller/kaoqin/KaoQinController.java

@@ -109,7 +109,7 @@ public class KaoQinController extends BaseController {
             String dictValue = sysDictDatum.getDictValue();
             if (!"1".equals(dictValue)) {
                 Long aLong = 0L;
-                map.put(dictValue, aLong);
+                map.put("num"+dictValue, aLong);
             }
         }
         for (KaoqinRecord kaoQinRecord : kaoQinRecords) {
@@ -118,20 +118,20 @@ public class KaoQinController extends BaseController {
             String kaTypePmIn = kaoQinRecord.getKaTypePmIn();
             String kaTypePmOut = kaoQinRecord.getKaTypePmOut();
             if (!"1".equals(kaTypeAmIn) && StringUtils.isNotBlank(kaTypeAmIn)) {
-                Long aLong = map.get(kaTypeAmIn);
-                map.put(kaTypeAmIn, aLong + 1);
+                Long aLong = map.get("num"+kaTypeAmIn);
+                map.put("num"+kaTypeAmIn, aLong + 1);
                 count = count + 1;
             }  if (!"1".equals(kaTypeAmOut) && StringUtils.isNotBlank(kaTypeAmOut)) {
-                Long aLong = map.get(kaTypeAmOut);
-                map.put(kaTypeAmOut, aLong + 1);
+                Long aLong = map.get("num"+kaTypeAmOut);
+                map.put("num"+kaTypeAmOut, aLong + 1);
                 count = count + 1;
             }  if (!"1".equals(kaTypePmIn) && StringUtils.isNotBlank(kaTypePmIn)) {
-                Long aLong = map.get(kaTypePmIn);
-                map.put(kaTypePmIn, aLong + 1);
+                Long aLong = map.get("num"+kaTypePmIn);
+                map.put("num"+kaTypePmIn, aLong + 1);
                 count = count + 1;
             }  if (!"1".equals(kaTypePmOut) && StringUtils.isNotBlank(kaTypePmOut)) {
-                Long aLong = map.get(kaTypePmOut);
-                map.put(kaTypePmOut, aLong + 1);
+                Long aLong = map.get("num"+kaTypePmOut);
+                map.put("num"+kaTypePmOut, aLong + 1);
                 count = count + 1;
             }
         }
@@ -296,20 +296,27 @@ public class KaoQinController extends BaseController {
         for (String s : todayMap.keySet()) {
             Map<String, Object> mapZj = new HashMap();
             String zz = "0%";
-            //1:正,2负
-            String zt = "1";
+            //1:正,2负 3:平
+            String zt = "3";
             mapZj.put("num", todayMap.get(s));
 
             BigDecimal todayBd = new BigDecimal(todayMap.get(s));
             BigDecimal yesterdayBd = new BigDecimal(yesterdayMap.get(s));
             BigDecimal fz = todayBd.subtract(yesterdayBd);
-            BigDecimal percentage = fz.multiply(new BigDecimal("100"))
-                    .divide(yesterdayBd, 3, RoundingMode.HALF_UP) // 先计算百分比并保留三位小数以处理可能的精度问题
-                    .setScale(1, RoundingMode.HALF_UP);     // 再设置为一位小数
-            zz = percentage.toString() + "%";
-            if(percentage.compareTo(BigDecimal.ZERO) < 0){
-                zt = "2";
-                zz = (percentage.multiply(new BigDecimal("-1"))).toString()+ "%";;
+            if (fz.compareTo(BigDecimal.ZERO) != 0) {
+                BigDecimal  percentage = BigDecimal.ZERO;
+                //昨天数据>0
+                if (yesterdayBd.compareTo(BigDecimal.ZERO)>0) {
+                      percentage = fz.multiply(new BigDecimal("100"))
+                            .divide(yesterdayBd, 3, RoundingMode.HALF_UP) // 先计算百分比并保留三位小数以处理可能的精度问题
+                            .setScale(1, RoundingMode.HALF_UP);     // 再设置为一位小数
+                }
+                zz = percentage + "%";
+                zt = "1";
+                if(percentage.compareTo(BigDecimal.ZERO) < 0){
+                    zt = "2";
+                    zz = (percentage.multiply(new BigDecimal("-1")))+ "%";;
+                }
             }
             mapZj.put("bfb", zz);
             mapZj.put("zf",zt);
@@ -350,7 +357,7 @@ public class KaoQinController extends BaseController {
             String dictValue = sysDictDatum.getDictValue();
             if (!"1".equals(dictValue)) {
                 Long aLong = 0L;
-                map.put(dictValue, aLong);
+                map.put("num"+dictValue, aLong);
             }
         }
         for (KaoqinRecord kaoQinRecord : kaoQinRecords) {
@@ -359,27 +366,27 @@ public class KaoQinController extends BaseController {
             String kaTypePmIn = kaoQinRecord.getKaTypePmIn();
             String kaTypePmOut = kaoQinRecord.getKaTypePmOut();
             if (!"1".equals(kaTypeAmIn) && StringUtils.isNotBlank(kaTypeAmIn)) {
-                Long aLong = map.get(kaTypeAmIn);
-                map.put(kaTypeAmIn, aLong + 1);
+                Long aLong = map.get("num"+kaTypeAmIn);
+                map.put("num"+kaTypeAmIn, aLong + 1);
                 count = count + 1;
             }  if (!"1".equals(kaTypeAmOut) && StringUtils.isNotBlank(kaTypeAmOut)) {
-                Long aLong = map.get(kaTypeAmOut);
-                map.put(kaTypeAmOut, aLong + 1);
+                Long aLong = map.get("num"+kaTypeAmOut);
+                map.put("num"+kaTypeAmOut, aLong + 1);
                 count = count + 1;
             }  if (!"1".equals(kaTypePmIn) && StringUtils.isNotBlank(kaTypePmIn)) {
-                Long aLong = map.get(kaTypePmIn);
-                map.put(kaTypePmIn, aLong + 1);
+                Long aLong = map.get("num"+kaTypePmIn);
+                map.put("num"+kaTypePmIn, aLong + 1);
                 count = count + 1;
             }  if (!"1".equals(kaTypePmOut) && StringUtils.isNotBlank(kaTypePmOut)) {
-                Long aLong = map.get(kaTypePmOut);
-                map.put(kaTypePmOut, aLong + 1);
+                Long aLong = map.get("num"+kaTypePmOut);
+                map.put("num"+kaTypePmOut, aLong + 1);
                 count = count + 1;
             }
         }
-        wq = map.get("3");
-        cd = map.get("2");
-        zt = map.get("4");
-        qk = map.get("5");
+        wq = map.get("num3");
+        cd = map.get("num2");
+        zt = map.get("num4");
+        qk = map.get("num5");
 
         mapCount.put("wq",wq);
         mapCount.put("cd",cd);
@@ -394,11 +401,11 @@ public class KaoQinController extends BaseController {
             BigDecimal percentage = num.multiply(new BigDecimal("100"))
                     .divide(countBd, 3, RoundingMode.HALF_UP) // 先计算百分比并保留三位小数以处理可能的精度问题
                     .setScale(1, RoundingMode.HALF_UP);     // 再设置为一位小数
-            zz = percentage.toString() + "%";
+            zz = percentage + "%";
             mapZj.put("bfb",zz);
             mapTj.put(s, mapZj);
         }
-        return AjaxResult.success(map);
+        return AjaxResult.success(mapTj);
     }
 
 

+ 305 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/BusinessTrip.java

@@ -0,0 +1,305 @@
+package com.ruoyi.system.domain;
+
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 出差记录信息对象 business_trip
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+public class BusinessTrip extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 单程/往返 1:单程 2:往返 */
+    @Excel(name = "单程/往返 1:单程 2:往返")
+    private String type;
+
+    /** 交通工具(1:高铁,2:飞机,3:大巴,4:轿车,5:轮船) */
+    @Excel(name = "交通工具1:高铁,2:飞机,3:大巴,4:轿车,5:轮船")
+    private String transportation;
+
+    /** 出发地 */
+    @Excel(name = "出发地")
+    private String departurePlace;
+
+    /** 目的地 */
+    @Excel(name = "目的地")
+    private String destination;
+
+    /** 开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date startTime;
+
+    /** 结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date endTime;
+
+    /** 时长(天) */
+    @Excel(name = "时长(天)")
+    private String duration;
+
+    /** 出差事由 */
+    @Excel(name = "出差事由")
+    private String reason;
+
+    /** 出差照片地址 */
+    @Excel(name = "出差照片地址")
+    private String photo;
+
+    /** 部门id */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    /** 部门名称 */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /** 同行人员 */
+    @Excel(name = "同行人员")
+    private String absenteeName;
+
+    /** 审批人员id */
+    @Excel(name = "审批人员id")
+    private Long examinersId;
+
+    /** 审批人员姓名 */
+    @Excel(name = "审批人员姓名")
+    private String examinersName;
+
+    /** 是否通过 0:未处理,1:不通过,2:通过 */
+    @Excel(name = "是否通过 0:未处理,1:不通过,2:通过")
+    private String isPass;
+
+    /** 驳回原因 */
+    @Excel(name = "驳回原因")
+    private String reject;
+
+    /** 提交时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date submitTime;
+
+    private List<BusinessUser> businessUserList;
+
+    private Long userId;
+
+    /** 当前所属部门id合集 */
+    private List<Long> deptIds;
+
+    public List<Long> getDeptIds() {
+        return deptIds;
+    }
+
+    public void setDeptIds(List<Long> deptIds) {
+        this.deptIds = deptIds;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+    public void setStartTime(Date startTime) 
+    {
+        this.startTime = startTime;
+    }
+
+    public Date getStartTime() 
+    {
+        return startTime;
+    }
+    public void setEndTime(Date endTime) 
+    {
+        this.endTime = endTime;
+    }
+
+    public Date getEndTime() 
+    {
+        return endTime;
+    }
+    public void setReason(String reason) 
+    {
+        this.reason = reason;
+    }
+
+    public String getReason() 
+    {
+        return reason;
+    }
+    public void setPhoto(String photo) 
+    {
+        this.photo = photo;
+    }
+
+    public String getPhoto() 
+    {
+        return photo;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+    public void setDeptName(String deptName) 
+    {
+        this.deptName = deptName;
+    }
+
+    public String getDeptName() 
+    {
+        return deptName;
+    }
+    public void setAbsenteeName(String absenteeName) 
+    {
+        this.absenteeName = absenteeName;
+    }
+
+    public String getAbsenteeName() 
+    {
+        return absenteeName;
+    }
+    public void setExaminersId(Long examinersId) 
+    {
+        this.examinersId = examinersId;
+    }
+
+    public Long getExaminersId() 
+    {
+        return examinersId;
+    }
+    public void setExaminersName(String examinersName) 
+    {
+        this.examinersName = examinersName;
+    }
+
+    public String getExaminersName() 
+    {
+        return examinersName;
+    }
+    public void setIsPass(String isPass) 
+    {
+        this.isPass = isPass;
+    }
+
+    public String getIsPass() 
+    {
+        return isPass;
+    }
+    public void setReject(String reject) 
+    {
+        this.reject = reject;
+    }
+
+    public String getReject() 
+    {
+        return reject;
+    }
+    public void setSubmitTime(Date submitTime) 
+    {
+        this.submitTime = submitTime;
+    }
+
+    public Date getSubmitTime() 
+    {
+        return submitTime;
+    }
+
+    public List<BusinessUser> getBusinessUserList() {
+        return businessUserList;
+    }
+
+    public void setBusinessUserList(List<BusinessUser> businessUserList) {
+        this.businessUserList = businessUserList;
+    }
+
+    public String getTransportation() {
+        return transportation;
+    }
+
+    public void setTransportation(String transportation) {
+        this.transportation = transportation;
+    }
+
+    public String getDeparturePlace() {
+        return departurePlace;
+    }
+
+    public void setDeparturePlace(String departurePlace) {
+        this.departurePlace = departurePlace;
+    }
+
+    public String getDestination() {
+        return destination;
+    }
+
+    public void setDestination(String destination) {
+        this.destination = destination;
+    }
+
+    public String getDuration() {
+        return duration;
+    }
+
+    public void setDuration(String duration) {
+        this.duration = duration;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("type", getType())
+            .append("startTime", getStartTime())
+            .append("endTime", getEndTime())
+            .append("reason", getReason())
+            .append("photo", getPhoto())
+            .append("deptId", getDeptId())
+            .append("deptName", getDeptName())
+            .append("absenteeName", getAbsenteeName())
+            .append("examinersId", getExaminersId())
+            .append("examinersName", getExaminersName())
+            .append("isPass", getIsPass())
+            .append("reject", getReject())
+            .append("submitTime", getSubmitTime())
+            .toString();
+    }
+}

+ 124 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/BusinessUser.java

@@ -0,0 +1,124 @@
+package com.ruoyi.system.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 出差人员信息对象 business_user
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+public class BusinessUser extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 出差id */
+    @Excel(name = "出差id")
+    private Long businessId;
+
+    /** 部门id */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    /** 部门名称 */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /** 出差人id */
+    @Excel(name = "出差人id")
+    private Long absenteeId;
+
+    /** 出差人姓名 */
+    @Excel(name = "出差人姓名")
+    private String absenteeName;
+
+    /** 提交时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date submitTime;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setBusinessId(Long businessId) 
+    {
+        this.businessId = businessId;
+    }
+
+    public Long getBusinessId() 
+    {
+        return businessId;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+    public void setDeptName(String deptName) 
+    {
+        this.deptName = deptName;
+    }
+
+    public String getDeptName() 
+    {
+        return deptName;
+    }
+    public void setAbsenteeId(Long absenteeId)
+    {
+        this.absenteeId = absenteeId;
+    }
+
+    public Long getAbsenteeId()
+    {
+        return absenteeId;
+    }
+    public void setAbsenteeName(String absenteeName) 
+    {
+        this.absenteeName = absenteeName;
+    }
+
+    public String getAbsenteeName() 
+    {
+        return absenteeName;
+    }
+    public void setSubmitTime(Date submitTime) 
+    {
+        this.submitTime = submitTime;
+    }
+
+    public Date getSubmitTime() 
+    {
+        return submitTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("businessId", getBusinessId())
+            .append("deptId", getDeptId())
+            .append("deptName", getDeptName())
+            .append("absenteeId", getAbsenteeId())
+            .append("absenteeName", getAbsenteeName())
+            .append("submitTime", getSubmitTime())
+            .toString();
+    }
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/BusinessTripMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.BusinessTrip;
+
+/**
+ * 出差记录信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+public interface BusinessTripMapper 
+{
+    /**
+     * 查询出差记录信息
+     * 
+     * @param id 出差记录信息主键
+     * @return 出差记录信息
+     */
+    public BusinessTrip selectBusinessTripById(Long id);
+
+    /**
+     * 查询出差记录信息列表
+     * 
+     * @param businessTrip 出差记录信息
+     * @return 出差记录信息集合
+     */
+    public List<BusinessTrip> selectBusinessTripList(BusinessTrip businessTrip);
+
+    /**
+     * 新增出差记录信息
+     * 
+     * @param businessTrip 出差记录信息
+     * @return 结果
+     */
+    public int insertBusinessTrip(BusinessTrip businessTrip);
+
+    /**
+     * 修改出差记录信息
+     * 
+     * @param businessTrip 出差记录信息
+     * @return 结果
+     */
+    public int updateBusinessTrip(BusinessTrip businessTrip);
+
+    /**
+     * 删除出差记录信息
+     * 
+     * @param id 出差记录信息主键
+     * @return 结果
+     */
+    public int deleteBusinessTripById(Long id);
+
+    /**
+     * 批量删除出差记录信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBusinessTripByIds(Long[] ids);
+
+    List<BusinessTrip> selectBusinessTripListLb(BusinessTrip businessTrip);
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/BusinessUserMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.BusinessUser;
+
+/**
+ * 出差人员信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+public interface BusinessUserMapper 
+{
+    /**
+     * 查询出差人员信息
+     * 
+     * @param id 出差人员信息主键
+     * @return 出差人员信息
+     */
+    public BusinessUser selectBusinessUserById(Long id);
+
+    /**
+     * 查询出差人员信息列表
+     * 
+     * @param businessUser 出差人员信息
+     * @return 出差人员信息集合
+     */
+    public List<BusinessUser> selectBusinessUserList(BusinessUser businessUser);
+
+    /**
+     * 新增出差人员信息
+     * 
+     * @param businessUser 出差人员信息
+     * @return 结果
+     */
+    public int insertBusinessUser(BusinessUser businessUser);
+
+    /**
+     * 修改出差人员信息
+     * 
+     * @param businessUser 出差人员信息
+     * @return 结果
+     */
+    public int updateBusinessUser(BusinessUser businessUser);
+
+    /**
+     * 删除出差人员信息
+     * 
+     * @param id 出差人员信息主键
+     * @return 结果
+     */
+    public int deleteBusinessUserById(Long id);
+
+    /**
+     * 批量删除出差人员信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBusinessUserByIds(Long[] ids);
+
+    void deleteBusinessUserByBusinessId(Long id);
+}

+ 65 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IBusinessTripService.java

@@ -0,0 +1,65 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.BusinessTrip;
+
+/**
+ * 出差记录信息Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+public interface IBusinessTripService 
+{
+    /**
+     * 查询出差记录信息
+     * 
+     * @param id 出差记录信息主键
+     * @return 出差记录信息
+     */
+    public BusinessTrip selectBusinessTripById(Long id);
+
+    /**
+     * 查询出差记录信息列表
+     * 
+     * @param businessTrip 出差记录信息
+     * @return 出差记录信息集合
+     */
+    public List<BusinessTrip> selectBusinessTripList(BusinessTrip businessTrip);
+
+    /**
+     * 新增出差记录信息
+     * 
+     * @param businessTrip 出差记录信息
+     * @return 结果
+     */
+    public int insertBusinessTrip(BusinessTrip businessTrip);
+
+    /**
+     * 修改出差记录信息
+     * 
+     * @param businessTrip 出差记录信息
+     * @return 结果
+     */
+    public int updateBusinessTrip(BusinessTrip businessTrip);
+
+    /**
+     * 批量删除出差记录信息
+     * 
+     * @param ids 需要删除的出差记录信息主键集合
+     * @return 结果
+     */
+    public int deleteBusinessTripByIds(Long[] ids);
+
+    /**
+     * 删除出差记录信息信息
+     * 
+     * @param id 出差记录信息主键
+     * @return 结果
+     */
+    public int deleteBusinessTripById(Long id);
+
+    int audit(BusinessTrip businessTrip);
+
+    List<BusinessTrip> presentList(BusinessTrip businessTrip);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IBusinessUserService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.BusinessUser;
+
+/**
+ * 出差人员信息Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+public interface IBusinessUserService 
+{
+    /**
+     * 查询出差人员信息
+     * 
+     * @param id 出差人员信息主键
+     * @return 出差人员信息
+     */
+    public BusinessUser selectBusinessUserById(Long id);
+
+    /**
+     * 查询出差人员信息列表
+     * 
+     * @param businessUser 出差人员信息
+     * @return 出差人员信息集合
+     */
+    public List<BusinessUser> selectBusinessUserList(BusinessUser businessUser);
+
+    /**
+     * 新增出差人员信息
+     * 
+     * @param businessUser 出差人员信息
+     * @return 结果
+     */
+    public int insertBusinessUser(BusinessUser businessUser);
+
+    /**
+     * 修改出差人员信息
+     * 
+     * @param businessUser 出差人员信息
+     * @return 结果
+     */
+    public int updateBusinessUser(BusinessUser businessUser);
+
+    /**
+     * 批量删除出差人员信息
+     * 
+     * @param ids 需要删除的出差人员信息主键集合
+     * @return 结果
+     */
+    public int deleteBusinessUserByIds(Long[] ids);
+
+    /**
+     * 删除出差人员信息信息
+     * 
+     * @param id 出差人员信息主键
+     * @return 结果
+     */
+    public int deleteBusinessUserById(Long id);
+}

+ 201 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BusinessTripServiceImpl.java

@@ -0,0 +1,201 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.BusinessUser;
+import com.ruoyi.system.domain.ProcessConfiguration;
+import com.ruoyi.system.mapper.BusinessUserMapper;
+import com.ruoyi.system.mapper.ProcessConfigurationMapper;
+import com.ruoyi.system.mapper.SysUserMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.BusinessTripMapper;
+import com.ruoyi.system.domain.BusinessTrip;
+import com.ruoyi.system.service.IBusinessTripService;
+
+/**
+ * 出差记录信息Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+@Service
+public class BusinessTripServiceImpl implements IBusinessTripService 
+{
+    @Autowired
+    private BusinessTripMapper businessTripMapper;
+
+    @Autowired
+    private SysUserMapper userMapper;
+
+    @Autowired
+    private BusinessUserMapper businessUserMapper;
+
+    @Autowired
+    private ProcessConfigurationMapper processConfigurationMapper;
+
+    /**
+     * 查询出差记录信息
+     * 
+     * @param id 出差记录信息主键
+     * @return 出差记录信息
+     */
+    @Override
+    public BusinessTrip selectBusinessTripById(Long id)
+    {
+        return businessTripMapper.selectBusinessTripById(id);
+    }
+
+    /**
+     * 查询出差记录信息列表
+     * 
+     * @param businessTrip 出差记录信息
+     * @return 出差记录信息
+     */
+    @Override
+    public List<BusinessTrip> selectBusinessTripList(BusinessTrip businessTrip)
+    {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        if (!"admin".equals(user.getUserName())){
+            businessTrip.setUserId(user.getUserId());
+        }
+        return businessTripMapper.selectBusinessTripListLb(businessTrip);
+    }
+
+    /**
+     * 新增出差记录信息
+     * 
+     * @param businessTrip 出差记录信息
+     * @return 结果
+     */
+    @Override
+    public int insertBusinessTrip(BusinessTrip businessTrip)
+    {
+        businessTrip.setSubmitTime(DateUtils.getNowDate());
+        int index = businessTripMapper.insertBusinessTrip(businessTrip);
+        if(businessTrip.getBusinessUserList()!=null && !businessTrip.getBusinessUserList().isEmpty()){
+            //保存人员表
+            StringBuilder sb = new StringBuilder();
+            List<BusinessUser> businessUserList = businessTrip.getBusinessUserList();
+            for (int i = 0; i < businessUserList.size(); i++) {
+                BusinessUser businessUser = businessUserList.get(i);
+
+                sb.append(businessUser.getAbsenteeName()).append("、");
+                if(i == businessUserList.size() - 1){
+                    sb.append(businessUser.getAbsenteeName());
+                }
+
+                businessUser.setBusinessId(businessTrip.getId());
+                //查询人员部门信息
+                SysUser sysUser = userMapper.selectUserById(businessUser.getAbsenteeId());
+                businessUser.setDeptId(sysUser.getDeptId());
+                businessUser.setDeptName(sysUser.getDept().getDeptName());
+                businessUser.setSubmitTime(DateUtils.getNowDate());
+                businessUserMapper.insertBusinessUser(businessUser);
+            }
+            //将随行人员放入主表
+            businessTrip.setAbsenteeName(sb.toString());
+            businessTripMapper.updateBusinessTrip(businessTrip);
+        }
+
+        return index;
+    }
+
+    /**
+     * 修改出差记录信息
+     * 
+     * @param businessTrip 出差记录信息
+     * @return 结果
+     */
+    @Override
+    public int updateBusinessTrip(BusinessTrip businessTrip)
+    {
+        if(!"0".equals(businessTrip.getIsPass())){
+            throw new ServiceException("当前出差已处理,无法修改");
+        }
+        //删除随行人员信息
+        businessUserMapper.deleteBusinessUserByBusinessId(businessTrip.getId());
+        if(businessTrip.getBusinessUserList()!=null && !businessTrip.getBusinessUserList().isEmpty()){
+            //保存人员表
+            StringBuilder sb = new StringBuilder();
+            List<BusinessUser> businessUserList = businessTrip.getBusinessUserList();
+            for (int i = 0; i < businessUserList.size(); i++) {
+                BusinessUser businessUser = businessUserList.get(i);
+
+                sb.append(businessUser.getAbsenteeName()).append("、");
+                if(i == businessUserList.size() - 1){
+                    sb.append(businessUser.getAbsenteeName());
+                }
+
+                businessUser.setBusinessId(businessTrip.getId());
+                //查询人员部门信息
+                /*SysUser sysUser = userMapper.selectUserById(businessUser.getAbsenteeId());
+                businessUser.setDeptId(sysUser.getDeptId());
+                businessUser.setDeptName(sysUser.getDept().getDeptName());*/
+                businessUser.setSubmitTime(DateUtils.getNowDate());
+                businessUserMapper.insertBusinessUser(businessUser);
+            }
+            //将随行人员放入主表
+            businessTrip.setAbsenteeName(sb.toString());
+            businessTripMapper.updateBusinessTrip(businessTrip);
+        }
+
+        return businessTripMapper.updateBusinessTrip(businessTrip);
+    }
+
+    /**
+     * 批量删除出差记录信息
+     * 
+     * @param ids 需要删除的出差记录信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBusinessTripByIds(Long[] ids)
+    {
+        return businessTripMapper.deleteBusinessTripByIds(ids);
+    }
+
+    /**
+     * 删除出差记录信息信息
+     * 
+     * @param id 出差记录信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBusinessTripById(Long id)
+    {
+        return businessTripMapper.deleteBusinessTripById(id);
+    }
+
+    @Override
+    public int audit(BusinessTrip businessTrip) {
+        //获取当前人员信息
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        businessTrip.setExaminersId(user.getUserId());
+        businessTrip.setExaminersName(user.getNickName());
+        return businessTripMapper.updateBusinessTrip(businessTrip);
+    }
+
+    @Override
+    public List<BusinessTrip> presentList(BusinessTrip businessTrip) {
+
+        //获取当前人员信息
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        if (!"admin".equals(user.getUserName())){
+            //获取当前人员补卡配置所在的部门id
+            ProcessConfiguration processConfiguration = new ProcessConfiguration();
+            processConfiguration.setUserId(user.getUserId());
+            processConfiguration.setType("3");
+            List<ProcessConfiguration> list = processConfigurationMapper.selectProcessConfigurationList(processConfiguration);
+            List<Long> deptIds = list.stream().map(ProcessConfiguration::getDeptId).collect(Collectors.toList());
+            businessTrip.setDeptIds(deptIds);
+        }
+        return businessTripMapper.selectBusinessTripList(businessTrip);
+    }
+}

+ 93 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BusinessUserServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.BusinessUserMapper;
+import com.ruoyi.system.domain.BusinessUser;
+import com.ruoyi.system.service.IBusinessUserService;
+
+/**
+ * 出差人员信息Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2025-06-23
+ */
+@Service
+public class BusinessUserServiceImpl implements IBusinessUserService 
+{
+    @Autowired
+    private BusinessUserMapper businessUserMapper;
+
+    /**
+     * 查询出差人员信息
+     * 
+     * @param id 出差人员信息主键
+     * @return 出差人员信息
+     */
+    @Override
+    public BusinessUser selectBusinessUserById(Long id)
+    {
+        return businessUserMapper.selectBusinessUserById(id);
+    }
+
+    /**
+     * 查询出差人员信息列表
+     * 
+     * @param businessUser 出差人员信息
+     * @return 出差人员信息
+     */
+    @Override
+    public List<BusinessUser> selectBusinessUserList(BusinessUser businessUser)
+    {
+        return businessUserMapper.selectBusinessUserList(businessUser);
+    }
+
+    /**
+     * 新增出差人员信息
+     * 
+     * @param businessUser 出差人员信息
+     * @return 结果
+     */
+    @Override
+    public int insertBusinessUser(BusinessUser businessUser)
+    {
+        return businessUserMapper.insertBusinessUser(businessUser);
+    }
+
+    /**
+     * 修改出差人员信息
+     * 
+     * @param businessUser 出差人员信息
+     * @return 结果
+     */
+    @Override
+    public int updateBusinessUser(BusinessUser businessUser)
+    {
+        return businessUserMapper.updateBusinessUser(businessUser);
+    }
+
+    /**
+     * 批量删除出差人员信息
+     * 
+     * @param ids 需要删除的出差人员信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBusinessUserByIds(Long[] ids)
+    {
+        return businessUserMapper.deleteBusinessUserByIds(ids);
+    }
+
+    /**
+     * 删除出差人员信息信息
+     * 
+     * @param id 出差人员信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBusinessUserById(Long id)
+    {
+        return businessUserMapper.deleteBusinessUserById(id);
+    }
+}

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CardReplacementRecordServiceImpl.java

@@ -7,6 +7,7 @@ import com.ruoyi.common.constant.HttpStatus;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.ProcessConfiguration;
@@ -73,6 +74,7 @@ public class CardReplacementRecordServiceImpl implements ICardReplacementRecordS
         cardReplacementRecord.setUserName(user.getNickName());
         cardReplacementRecord.setDeptId(user.getDeptId());
         cardReplacementRecord.setDeptName(user.getDept().getDeptName());
+        cardReplacementRecord.setCreateTime(DateUtils.getNowDate());
         return cardReplacementRecordMapper.insertCardReplacementRecord(cardReplacementRecord);
     }
 
@@ -133,6 +135,7 @@ public class CardReplacementRecordServiceImpl implements ICardReplacementRecordS
             //获取当前人员补卡配置所在的部门id
             ProcessConfiguration processConfiguration = new ProcessConfiguration();
             processConfiguration.setUserId(user.getUserId());
+            processConfiguration.setType("1");
             List<ProcessConfiguration> list = processConfigurationMapper.selectProcessConfigurationList(processConfiguration);
             List<Long> deptIds = list.stream().map(ProcessConfiguration::getDeptId).collect(Collectors.toList());
             cardReplacementRecord.setDeptIds(deptIds);

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordLeaveServiceImpl.java

@@ -141,6 +141,7 @@ public class RecordLeaveServiceImpl implements IRecordLeaveService
             //获取当前人员补卡配置所在的部门id
             ProcessConfiguration processConfiguration = new ProcessConfiguration();
             processConfiguration.setUserId(user.getUserId());
+            processConfiguration.setType("2");
             List<ProcessConfiguration> list = processConfigurationMapper.selectProcessConfigurationList(processConfiguration);
             List<Long> deptIds = list.stream().map(ProcessConfiguration::getDeptId).collect(Collectors.toList());
             recordLeave.setDeptIds(deptIds);

+ 168 - 0
ruoyi-system/src/main/resources/mapper/system/BusinessTripMapper.xml

@@ -0,0 +1,168 @@
+<?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.system.mapper.BusinessTripMapper">
+    
+    <resultMap type="BusinessTrip" id="BusinessTripResult">
+        <result property="id"    column="id"    />
+        <result property="type"    column="type"    />
+
+        <result property="transportation"    column="transportation"    />
+        <result property="departurePlace"    column="departure_place"    />
+        <result property="destination"    column="destination"    />
+
+        <result property="startTime"    column="start_time"    />
+        <result property="endTime"    column="end_time"    />
+
+        <result property="duration"    column="duration"    />
+
+        <result property="reason"    column="reason"    />
+        <result property="photo"    column="photo"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="absenteeName"    column="absentee_name"    />
+        <result property="examinersId"    column="examiners_id"    />
+        <result property="examinersName"    column="examiners_name"    />
+        <result property="isPass"    column="is_pass"    />
+        <result property="reject"    column="reject"    />
+        <result property="submitTime"    column="submit_time"    />
+    </resultMap>
+
+    <sql id="selectBusinessTripVo">
+        select id, type,transportation,departure_place,destination, start_time, end_time,duration, reason, photo, dept_id, dept_name, absentee_name, examiners_id, examiners_name, is_pass, reject, submit_time from business_trip
+    </sql>
+
+    <sql id="selectBusinessTripLbVo">
+        select t.id, t.type,t.transportation,t.departure_place,t.destination, t.start_time, t.end_time,t.duration, t.reason, t.photo, t.dept_id,
+               t.dept_name, t.absentee_name, t.examiners_id, t.examiners_name, t.is_pass, t.reject, t.submit_time from business_trip t
+        left join business_user u on t.id = u.business_id
+    </sql>
+
+    <select id="selectBusinessTripList" parameterType="BusinessTrip" resultMap="BusinessTripResult">
+        <include refid="selectBusinessTripVo"/>
+        <where>  
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+            <if test="transportation != null  and transportation != ''"> and transportation = #{transportation}</if>
+            <if test="departurePlace != null  and departurePlace != ''"> and departure_place like concat('%', #{departurePlace}, '%')</if>
+            <if test="destination != null  and destination != ''"> and destination like concat('%', #{destination}, '%')</if>
+            <if test="startTime != null "> and start_time = #{startTime}</if>
+            <if test="endTime != null "> and end_time = #{endTime}</if>
+            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
+            <if test="photo != null  and photo != ''"> and photo = #{photo}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="absenteeName != null  and absenteeName != ''"> and absentee_name like concat('%', #{absenteeName}, '%')</if>
+            <if test="examinersId != null "> and examiners_id = #{examinersId}</if>
+            <if test="examinersName != null  and examinersName != ''"> and examiners_name like concat('%', #{examinersName}, '%')</if>
+            <if test="isPass != null  and isPass != ''"> and is_pass = #{isPass}</if>
+            <if test="reject != null  and reject != ''"> and reject = #{reject}</if>
+            <if test="submitTime != null "> and submit_time = #{submitTime}</if>
+        </where>
+        order by is_pass, submit_time desc
+    </select>
+
+    <select id="selectBusinessTripListLb" parameterType="BusinessTrip" resultMap="BusinessTripResult">
+        <include refid="selectBusinessTripLbVo"/>
+        <where>
+            <if test="userId != null "> and u.absentee_id = #{userId}</if>
+            <if test="type != null  and type != ''"> and t.type = #{type}</if>
+            <if test="transportation != null  and transportation != ''"> and t.transportation = #{transportation}</if>
+            <if test="departurePlace != null  and departurePlace != ''"> and t.departure_place like concat('%', #{departurePlace}, '%')</if>
+            <if test="destination != null  and destination != ''"> and t.destination like concat('%', #{destination}, '%')</if>
+            <if test="startTime != null "> and t.start_time = #{startTime}</if>
+            <if test="endTime != null "> and t.end_time = #{endTime}</if>
+            <if test="reason != null  and reason != ''"> and t.reason = #{reason}</if>
+            <if test="deptId != null "> and t.dept_id = #{deptId}</if>
+            <if test="deptName != null  and deptName != ''"> and t.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="absenteeName != null  and absenteeName != ''"> and t.absentee_name like concat('%', #{absenteeName}, '%')</if>
+            <if test="examinersId != null "> and t.examiners_id = #{examinersId}</if>
+            <if test="examinersName != null  and examinersName != ''"> and t.examiners_name like concat('%', #{examinersName}, '%')</if>
+            <if test="isPass != null  and isPass != ''"> and t.is_pass = #{isPass}</if>
+            <if test="submitTime != null "> and t.submit_time = #{submitTime}</if>
+        </where>
+        order by t.is_pass, t.submit_time desc
+    </select>
+    
+    <select id="selectBusinessTripById" parameterType="Long" resultMap="BusinessTripResult">
+        <include refid="selectBusinessTripVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertBusinessTrip" parameterType="BusinessTrip" useGeneratedKeys="true" keyProperty="id">
+        insert into business_trip
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="type != null">type,</if>
+            <if test="transportation != null ">transportation ,</if>
+            <if test="departurePlace != null ">departure_place ,</if>
+            <if test="destination != null ">destination ,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="endTime != null">end_time,</if>
+            <if test="duration != null">duration,</if>
+            <if test="reason != null">reason,</if>
+            <if test="photo != null">photo,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="absenteeName != null">absentee_name,</if>
+            <if test="examinersId != null">examiners_id,</if>
+            <if test="examinersName != null">examiners_name,</if>
+            <if test="isPass != null">is_pass,</if>
+            <if test="reject != null">reject,</if>
+            <if test="submitTime != null">submit_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="type != null">#{type},</if>
+            <if test="transportation != null  ">#{transportation},</if>
+            <if test="departurePlace != null ">#{departurePlace},</if>
+            <if test="destination != null  "> #{destination}, </if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="endTime != null">#{endTime},</if>
+            <if test="duration != null">#{duration},</if>
+            <if test="reason != null">#{reason},</if>
+            <if test="photo != null">#{photo},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="absenteeName != null">#{absenteeName},</if>
+            <if test="examinersId != null">#{examinersId},</if>
+            <if test="examinersName != null">#{examinersName},</if>
+            <if test="isPass != null">#{isPass},</if>
+            <if test="reject != null">#{reject},</if>
+            <if test="submitTime != null">#{submitTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBusinessTrip" parameterType="BusinessTrip">
+        update business_trip
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null">type = #{type},</if>
+            <if test="transportation != null ">  transportation = #{transportation},</if>
+            <if test="departurePlace != null  ">  departure_place = #{departurePlace},</if>
+            <if test="destination != null ">  destination = #{destination}, </if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="endTime != null">end_time = #{endTime},</if>
+            <if test="duration != null">duration = #{duration},</if>
+            <if test="reason != null">reason = #{reason},</if>
+            <if test="photo != null">photo = #{photo},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="absenteeName != null">absentee_name = #{absenteeName},</if>
+            <if test="examinersId != null">examiners_id = #{examinersId},</if>
+            <if test="examinersName != null">examiners_name = #{examinersName},</if>
+            <if test="isPass != null">is_pass = #{isPass},</if>
+            <if test="reject != null">reject = #{reject},</if>
+            <if test="submitTime != null">submit_time = #{submitTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBusinessTripById" parameterType="Long">
+        delete from business_trip where id = #{id}
+    </delete>
+
+    <delete id="deleteBusinessTripByIds" parameterType="String">
+        delete from business_trip where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 84 - 0
ruoyi-system/src/main/resources/mapper/system/BusinessUserMapper.xml

@@ -0,0 +1,84 @@
+<?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.system.mapper.BusinessUserMapper">
+    
+    <resultMap type="BusinessUser" id="BusinessUserResult">
+        <result property="id"    column="id"    />
+        <result property="businessId"    column="business_id"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="absenteeId"    column="absentee_id"    />
+        <result property="absenteeName"    column="absentee_name"    />
+        <result property="submitTime"    column="submit_time"    />
+    </resultMap>
+
+    <sql id="selectBusinessUserVo">
+        select id, business_id, dept_id, dept_name, absentee_id, absentee_name, submit_time from business_user
+    </sql>
+
+    <select id="selectBusinessUserList" parameterType="BusinessUser" resultMap="BusinessUserResult">
+        <include refid="selectBusinessUserVo"/>
+        <where>  
+            <if test="businessId != null "> and business_id = #{businessId}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="absenteeId != null  and absenteeId != ''"> and absentee_id = #{absenteeId}</if>
+            <if test="absenteeName != null  and absenteeName != ''"> and absentee_name like concat('%', #{absenteeName}, '%')</if>
+            <if test="submitTime != null "> and submit_time = #{submitTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectBusinessUserById" parameterType="Long" resultMap="BusinessUserResult">
+        <include refid="selectBusinessUserVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertBusinessUser" parameterType="BusinessUser" useGeneratedKeys="true" keyProperty="id">
+        insert into business_user
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="businessId != null">business_id,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="absenteeId != null">absentee_id,</if>
+            <if test="absenteeName != null">absentee_name,</if>
+            <if test="submitTime != null">submit_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="businessId != null">#{businessId},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="absenteeId != null">#{absenteeId},</if>
+            <if test="absenteeName != null">#{absenteeName},</if>
+            <if test="submitTime != null">#{submitTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBusinessUser" parameterType="BusinessUser">
+        update business_user
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="businessId != null">business_id = #{businessId},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="absenteeId != null">absentee_id = #{absenteeId},</if>
+            <if test="absenteeName != null">absentee_name = #{absenteeName},</if>
+            <if test="submitTime != null">submit_time = #{submitTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBusinessUserById" parameterType="Long">
+        delete from business_user where id = #{id}
+    </delete>
+
+    <delete id="deleteBusinessUserByIds" parameterType="String">
+        delete from business_user where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <delete id="deleteBusinessUserByBusinessId">
+        delete from business_user where business_id = #{id}
+    </delete>
+</mapper>

+ 4 - 1
ruoyi-system/src/main/resources/mapper/system/CardReplacementRecordMapper.xml

@@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="examinersId"    column="examiners_id"    />
         <result property="examinersName"    column="examiners_name"    />
         <result property="isPass"    column="is_pass"    />
+        <result property="createTime" column="create_time" />
     </resultMap>
 
     <sql id="selectCardReplacementRecordVo">
-        select id, user_id, user_name, dept_id,dept_name, application_time, reason, examiners_id, examiners_name, is_pass from card_replacement_record
+        select id, user_id, user_name, dept_id,dept_name, application_time, reason, examiners_id, examiners_name, is_pass,create_time from card_replacement_record
     </sql>
 
     <select id="selectCardReplacementRecordList" parameterType="CardReplacementRecord" resultMap="CardReplacementRecordResult">
@@ -59,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examinersId != null">examiners_id,</if>
             <if test="examinersName != null">examiners_name,</if>
             <if test="isPass != null">is_pass,</if>
+            create_time
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="userId != null">#{userId},</if>
@@ -70,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="examinersId != null">#{examinersId},</if>
             <if test="examinersName != null">#{examinersName},</if>
             <if test="isPass != null">#{isPass},</if>
+            sysdate()
          </trim>
     </insert>