Procházet zdrojové kódy

联查预算详情

lamphua před 1 rokem
rodič
revize
d2c2a64fec
25 změnil soubory, kde provedl 174 přidání a 84 odebrání
  1. 3
    3
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetCarController.java
  2. 3
    3
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetDeviceController.java
  3. 3
    3
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetSettleController.java
  4. 3
    3
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetStaffController.java
  5. 11
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetCar.java
  6. 11
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetDevice.java
  7. 11
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetSettle.java
  8. 15
    2
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetStaff.java
  9. 2
    2
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBudgetCarMapper.java
  10. 2
    2
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBudgetDeviceMapper.java
  11. 2
    2
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBudgetSettleMapper.java
  12. 2
    2
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBudgetStaffMapper.java
  13. 6
    6
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBudgetCarService.java
  14. 2
    2
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBudgetDeviceService.java
  15. 2
    2
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBudgetSettleService.java
  16. 2
    2
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBudgetStaffService.java
  17. 3
    3
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBudgetCarServiceImpl.java
  18. 3
    3
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBudgetDeviceServiceImpl.java
  19. 3
    3
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBudgetSettleServiceImpl.java
  20. 3
    3
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBudgetStaffServiceImpl.java
  21. 17
    10
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetCarMapper.xml
  22. 17
    7
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetDeviceMapper.xml
  23. 19
    8
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetSettleMapper.xml
  24. 16
    9
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetStaffMapper.xml
  25. 13
    4
      oa-ui/src/views/flowable/form/budget/budgetInfo.vue

+ 3
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetCarController.java Zobrazit soubor

@@ -62,10 +62,10 @@ public class CmcBudgetCarController extends BaseController
62 62
     /**
63 63
      * 获取cmc车辆预算详细信息
64 64
      */
65
-    @GetMapping(value = "/{budgetCarId}")
66
-    public AjaxResult getInfo(@PathVariable("budgetCarId") String budgetCarId)
65
+    @GetMapping(value = "/{budgetId}")
66
+    public AjaxResult getInfo(@PathVariable("budgetId") String budgetId)
67 67
     {
68
-        return success(cmcBudgetCarService.selectCmcBudgetCarByBudgetCarId(budgetCarId));
68
+        return success(cmcBudgetCarService.selectCmcBudgetCarByBudgetId(budgetId));
69 69
     }
70 70
 
71 71
     /**

+ 3
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetDeviceController.java Zobrazit soubor

@@ -62,10 +62,10 @@ public class CmcBudgetDeviceController extends BaseController
62 62
     /**
63 63
      * 获取cmc设备预算详细信息
64 64
      */
65
-    @GetMapping(value = "/{budgetDeviceId}")
66
-    public AjaxResult getInfo(@PathVariable("budgetDeviceId") String budgetDeviceId)
65
+    @GetMapping(value = "/{budgetId}")
66
+    public AjaxResult getInfo(@PathVariable("budgetId") String budgetId)
67 67
     {
68
-        return success(cmcBudgetDeviceService.selectCmcBudgetDeviceByBudgetDeviceId(budgetDeviceId));
68
+        return success(cmcBudgetDeviceService.selectCmcBudgetDeviceByBudgetId(budgetId));
69 69
     }
70 70
 
71 71
     /**

+ 3
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetSettleController.java Zobrazit soubor

@@ -62,10 +62,10 @@ public class CmcBudgetSettleController extends BaseController
62 62
     /**
63 63
      * 获取cmc预结算详细信息
64 64
      */
65
-    @GetMapping(value = "/{budgetSettleId}")
66
-    public AjaxResult getInfo(@PathVariable("budgetSettleId") String budgetSettleId)
65
+    @GetMapping(value = "/{budgetId}")
66
+    public AjaxResult getInfo(@PathVariable("budgetId") String budgetId)
67 67
     {
68
-        return success(cmcBudgetSettleService.selectCmcBudgetSettleByBudgetSettleId(budgetSettleId));
68
+        return success(cmcBudgetSettleService.selectCmcBudgetSettleByBudgetId(budgetId));
69 69
     }
70 70
 
71 71
     /**

+ 3
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetStaffController.java Zobrazit soubor

@@ -62,10 +62,10 @@ public class CmcBudgetStaffController extends BaseController
62 62
     /**
63 63
      * 获取cmc人员预算详细信息
64 64
      */
65
-    @GetMapping(value = "/{budgetStaffId}")
66
-    public AjaxResult getInfo(@PathVariable("budgetStaffId") String budgetStaffId)
65
+    @GetMapping(value = "/{budgetId}")
66
+    public AjaxResult getInfo(@PathVariable("budgetId") String budgetId)
67 67
     {
68
-        return success(cmcBudgetStaffService.selectCmcBudgetStaffByBudgetStaffId(budgetStaffId));
68
+        return success(cmcBudgetStaffService.selectCmcBudgetStaffByBudgetId(budgetId));
69 69
     }
70 70
 
71 71
     /**

+ 11
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetCar.java Zobrazit soubor

@@ -27,6 +27,8 @@ public class CmcBudgetCar extends BaseEntity
27 27
     @Excel(name = "车辆id")
28 28
     private Integer carId;
29 29
 
30
+    private CmcCar car;
31
+
30 32
     /** 天数 */
31 33
     @Excel(name = "天数")
32 34
     private Integer days;
@@ -74,6 +76,15 @@ public class CmcBudgetCar extends BaseEntity
74 76
     {
75 77
         return carId;
76 78
     }
79
+    public void setCar(CmcCar car)
80
+    {
81
+        this.car = car;
82
+    }
83
+
84
+    public CmcCar getCar()
85
+    {
86
+        return car;
87
+    }
77 88
     public void setDays(Integer days) 
78 89
     {
79 90
         this.days = days;

+ 11
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetDevice.java Zobrazit soubor

@@ -27,6 +27,8 @@ public class CmcBudgetDevice extends BaseEntity
27 27
     @Excel(name = "设备id")
28 28
     private Integer deviceId;
29 29
 
30
+    private CmcDevice device;
31
+
30 32
     /** 天数 */
31 33
     @Excel(name = "天数")
32 34
     private Integer days;
@@ -62,6 +64,15 @@ public class CmcBudgetDevice extends BaseEntity
62 64
     {
63 65
         return deviceId;
64 66
     }
67
+    public void setDevice(CmcDevice device)
68
+    {
69
+        this.device = device;
70
+    }
71
+
72
+    public CmcDevice getDevice()
73
+    {
74
+        return device;
75
+    }
65 76
     public void setDays(Integer days) 
66 77
     {
67 78
         this.days = days;

+ 11
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetSettle.java Zobrazit soubor

@@ -27,6 +27,8 @@ public class CmcBudgetSettle extends BaseEntity
27 27
     @Excel(name = "结算单价id")
28 28
     private Integer priceId;
29 29
 
30
+    private CmcPrice price;
31
+
30 32
     /** 工作量 */
31 33
     @Excel(name = "工作量")
32 34
     private Long workload;
@@ -66,6 +68,15 @@ public class CmcBudgetSettle extends BaseEntity
66 68
     {
67 69
         return priceId;
68 70
     }
71
+    public void setPrice(CmcPrice price)
72
+    {
73
+        this.price = price;
74
+    }
75
+
76
+    public CmcPrice getPrice()
77
+    {
78
+        return price;
79
+    }
69 80
     public void setWorkload(Long workload) 
70 81
     {
71 82
         this.workload = workload;

+ 15
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetStaff.java Zobrazit soubor

@@ -1,6 +1,8 @@
1 1
 package com.ruoyi.oa.domain;
2 2
 
3 3
 import java.math.BigDecimal;
4
+
5
+import com.ruoyi.common.core.domain.entity.SysUser;
4 6
 import org.apache.commons.lang3.builder.ToStringBuilder;
5 7
 import org.apache.commons.lang3.builder.ToStringStyle;
6 8
 import com.ruoyi.common.annotation.Excel;
@@ -27,12 +29,14 @@ public class CmcBudgetStaff extends BaseEntity
27 29
     @Excel(name = "人员id")
28 30
     private Long userId;
29 31
 
32
+    private SysUser user;
33
+
30 34
     /** 天数 */
31 35
     @Excel(name = "天数")
32 36
     private Integer days;
33 37
 
34
-    /** 固定成本 */
35
-    @Excel(name = "固定成本")
38
+    /** 人员成本 */
39
+    @Excel(name = "人员成本")
36 40
     private BigDecimal staffCost;
37 41
 
38 42
     /** 进出场单价 */
@@ -70,6 +74,15 @@ public class CmcBudgetStaff extends BaseEntity
70 74
     {
71 75
         return userId;
72 76
     }
77
+    public void setUser(SysUser user)
78
+    {
79
+        this.user = user;
80
+    }
81
+
82
+    public SysUser getUser()
83
+    {
84
+        return user;
85
+    }
73 86
     public void setDays(Integer days) 
74 87
     {
75 88
         this.days = days;

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBudgetCarMapper.java Zobrazit soubor

@@ -14,10 +14,10 @@ public interface CmcBudgetCarMapper
14 14
     /**
15 15
      * 查询cmc车辆预算
16 16
      * 
17
-     * @param budgetCarId cmc车辆预算主键
17
+     * @param budgetId cmc预算id
18 18
      * @return cmc车辆预算
19 19
      */
20
-    public CmcBudgetCar selectCmcBudgetCarByBudgetCarId(String budgetCarId);
20
+    public List<CmcBudgetCar> selectCmcBudgetCarByBudgetId(String budgetId);
21 21
 
22 22
     /**
23 23
      * 查询cmc车辆预算列表

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBudgetDeviceMapper.java Zobrazit soubor

@@ -14,10 +14,10 @@ public interface CmcBudgetDeviceMapper
14 14
     /**
15 15
      * 查询cmc设备预算
16 16
      * 
17
-     * @param budgetDeviceId cmc设备预算主键
17
+     * @param budgetId cmc预算id
18 18
      * @return cmc设备预算
19 19
      */
20
-    public CmcBudgetDevice selectCmcBudgetDeviceByBudgetDeviceId(String budgetDeviceId);
20
+    public List<CmcBudgetDevice> selectCmcBudgetDeviceByBudgetId(String budgetId);
21 21
 
22 22
     /**
23 23
      * 查询cmc设备预算列表

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBudgetSettleMapper.java Zobrazit soubor

@@ -14,10 +14,10 @@ public interface CmcBudgetSettleMapper
14 14
     /**
15 15
      * 查询cmc预结算
16 16
      * 
17
-     * @param budgetSettleId cmc预结算主键
17
+     * @param budgetId cmc预算id
18 18
      * @return cmc预结算
19 19
      */
20
-    public CmcBudgetSettle selectCmcBudgetSettleByBudgetSettleId(String budgetSettleId);
20
+    public List<CmcBudgetSettle> selectCmcBudgetSettleByBudgetId(String budgetId);
21 21
 
22 22
     /**
23 23
      * 查询cmc预结算列表

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBudgetStaffMapper.java Zobrazit soubor

@@ -14,10 +14,10 @@ public interface CmcBudgetStaffMapper
14 14
     /**
15 15
      * 查询cmc人员预算
16 16
      * 
17
-     * @param budgetStaffId cmc人员预算主键
17
+     * @param budgetId cmc预算id
18 18
      * @return cmc人员预算
19 19
      */
20
-    public CmcBudgetStaff selectCmcBudgetStaffByBudgetStaffId(String budgetStaffId);
20
+    public List<CmcBudgetStaff> selectCmcBudgetStaffByBudgetId(String budgetId);
21 21
 
22 22
     /**
23 23
      * 查询cmc人员预算列表

+ 6
- 6
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBudgetCarService.java Zobrazit soubor

@@ -14,10 +14,10 @@ public interface ICmcBudgetCarService
14 14
     /**
15 15
      * 查询cmc车辆预算
16 16
      * 
17
-     * @param budgetCarId cmc车辆预算主键
17
+     * @param budgetId cmc预算id
18 18
      * @return cmc车辆预算
19 19
      */
20
-    public CmcBudgetCar selectCmcBudgetCarByBudgetCarId(String budgetCarId);
20
+    public List<CmcBudgetCar> selectCmcBudgetCarByBudgetId(String budgetId);
21 21
 
22 22
     /**
23 23
      * 查询cmc车辆预算列表
@@ -46,16 +46,16 @@ public interface ICmcBudgetCarService
46 46
     /**
47 47
      * 批量删除cmc车辆预算
48 48
      * 
49
-     * @param budgetCarIds 需要删除的cmc车辆预算主键集合
49
+     * @param budgetIds 需要删除的cmc车辆预算主键集合
50 50
      * @return 结果
51 51
      */
52
-    public int deleteCmcBudgetCarByBudgetCarIds(String[] budgetCarIds);
52
+    public int deleteCmcBudgetCarByBudgetCarIds(String[] budgetIds);
53 53
 
54 54
     /**
55 55
      * 删除cmc车辆预算信息
56 56
      * 
57
-     * @param budgetCarId cmc车辆预算主键
57
+     * @param budgetId cmc车辆预算主键
58 58
      * @return 结果
59 59
      */
60
-    public int deleteCmcBudgetCarByBudgetCarId(String budgetCarId);
60
+    public int deleteCmcBudgetCarByBudgetCarId(String budgetId);
61 61
 }

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBudgetDeviceService.java Zobrazit soubor

@@ -14,10 +14,10 @@ public interface ICmcBudgetDeviceService
14 14
     /**
15 15
      * 查询cmc设备预算
16 16
      * 
17
-     * @param budgetDeviceId cmc设备预算主键
17
+     * @param budgetId cmc预算id
18 18
      * @return cmc设备预算
19 19
      */
20
-    public CmcBudgetDevice selectCmcBudgetDeviceByBudgetDeviceId(String budgetDeviceId);
20
+    public List<CmcBudgetDevice> selectCmcBudgetDeviceByBudgetId(String budgetId);
21 21
 
22 22
     /**
23 23
      * 查询cmc设备预算列表

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBudgetSettleService.java Zobrazit soubor

@@ -14,10 +14,10 @@ public interface ICmcBudgetSettleService
14 14
     /**
15 15
      * 查询cmc预结算
16 16
      * 
17
-     * @param budgetSettleId cmc预结算主键
17
+     * @param budgetId cmc预算id
18 18
      * @return cmc预结算
19 19
      */
20
-    public CmcBudgetSettle selectCmcBudgetSettleByBudgetSettleId(String budgetSettleId);
20
+    public List<CmcBudgetSettle> selectCmcBudgetSettleByBudgetId(String budgetId);
21 21
 
22 22
     /**
23 23
      * 查询cmc预结算列表

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBudgetStaffService.java Zobrazit soubor

@@ -14,10 +14,10 @@ public interface ICmcBudgetStaffService
14 14
     /**
15 15
      * 查询cmc人员预算
16 16
      * 
17
-     * @param budgetStaffId cmc人员预算主键
17
+     * @param budgetId cmc预算id
18 18
      * @return cmc人员预算
19 19
      */
20
-    public CmcBudgetStaff selectCmcBudgetStaffByBudgetStaffId(String budgetStaffId);
20
+    public List<CmcBudgetStaff> selectCmcBudgetStaffByBudgetId(String budgetId);
21 21
 
22 22
     /**
23 23
      * 查询cmc人员预算列表

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBudgetCarServiceImpl.java Zobrazit soubor

@@ -22,13 +22,13 @@ public class CmcBudgetCarServiceImpl implements ICmcBudgetCarService
22 22
     /**
23 23
      * 查询cmc车辆预算
24 24
      * 
25
-     * @param budgetCarId cmc车辆预算主键
25
+     * @param budgetId cmc预算id
26 26
      * @return cmc车辆预算
27 27
      */
28 28
     @Override
29
-    public CmcBudgetCar selectCmcBudgetCarByBudgetCarId(String budgetCarId)
29
+    public List<CmcBudgetCar> selectCmcBudgetCarByBudgetId(String budgetId)
30 30
     {
31
-        return cmcBudgetCarMapper.selectCmcBudgetCarByBudgetCarId(budgetCarId);
31
+        return cmcBudgetCarMapper.selectCmcBudgetCarByBudgetId(budgetId);
32 32
     }
33 33
 
34 34
     /**

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBudgetDeviceServiceImpl.java Zobrazit soubor

@@ -22,13 +22,13 @@ public class CmcBudgetDeviceServiceImpl implements ICmcBudgetDeviceService
22 22
     /**
23 23
      * 查询cmc设备预算
24 24
      * 
25
-     * @param budgetDeviceId cmc设备预算主键
25
+     * @param budgetId cmc预算id
26 26
      * @return cmc设备预算
27 27
      */
28 28
     @Override
29
-    public CmcBudgetDevice selectCmcBudgetDeviceByBudgetDeviceId(String budgetDeviceId)
29
+    public List<CmcBudgetDevice> selectCmcBudgetDeviceByBudgetId(String budgetId)
30 30
     {
31
-        return cmcBudgetDeviceMapper.selectCmcBudgetDeviceByBudgetDeviceId(budgetDeviceId);
31
+        return cmcBudgetDeviceMapper.selectCmcBudgetDeviceByBudgetId(budgetId);
32 32
     }
33 33
 
34 34
     /**

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBudgetSettleServiceImpl.java Zobrazit soubor

@@ -22,13 +22,13 @@ public class CmcBudgetSettleServiceImpl implements ICmcBudgetSettleService
22 22
     /**
23 23
      * 查询cmc预结算
24 24
      * 
25
-     * @param budgetSettleId cmc预结算主键
25
+     * @param budgetId cmc预算id
26 26
      * @return cmc预结算
27 27
      */
28 28
     @Override
29
-    public CmcBudgetSettle selectCmcBudgetSettleByBudgetSettleId(String budgetSettleId)
29
+    public List<CmcBudgetSettle> selectCmcBudgetSettleByBudgetId(String budgetId)
30 30
     {
31
-        return cmcBudgetSettleMapper.selectCmcBudgetSettleByBudgetSettleId(budgetSettleId);
31
+        return cmcBudgetSettleMapper.selectCmcBudgetSettleByBudgetId(budgetId);
32 32
     }
33 33
 
34 34
     /**

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBudgetStaffServiceImpl.java Zobrazit soubor

@@ -22,13 +22,13 @@ public class CmcBudgetStaffServiceImpl implements ICmcBudgetStaffService
22 22
     /**
23 23
      * 查询cmc人员预算
24 24
      * 
25
-     * @param budgetStaffId cmc人员预算主键
25
+     * @param budgetId cmc预算id
26 26
      * @return cmc人员预算
27 27
      */
28 28
     @Override
29
-    public CmcBudgetStaff selectCmcBudgetStaffByBudgetStaffId(String budgetStaffId)
29
+    public List<CmcBudgetStaff> selectCmcBudgetStaffByBudgetId(String budgetId)
30 30
     {
31
-        return cmcBudgetStaffMapper.selectCmcBudgetStaffByBudgetStaffId(budgetStaffId);
31
+        return cmcBudgetStaffMapper.selectCmcBudgetStaffByBudgetId(budgetId);
32 32
     }
33 33
 
34 34
     /**

+ 17
- 10
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetCarMapper.xml Zobrazit soubor

@@ -13,28 +13,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
13 13
         <result property="distance"    column="distance"    />
14 14
         <result property="mileage"    column="mileage"    />
15 15
         <result property="expense"    column="expense"    />
16
+        <association property="car"    javaType="CmcCar"         resultMap="CmcCarResult" />
17
+    </resultMap>
18
+
19
+    <resultMap type="CmcCar" id="CmcCarResult">
20
+        <result property="carId"    column="car_id"    />
21
+        <result property="licensePlate"    column="license_plate"    />
16 22
     </resultMap>
17 23
 
18 24
     <sql id="selectCmcBudgetCarVo">
19
-        select budget_car_id, budget_id, car_id, days, depreciation, distance, mileage, expense from cmc_budget_car
25
+        select bc.budget_car_id, bc.budget_id, bc.car_id, c.license_plate, bc.days, bc.depreciation, bc.distance, bc.mileage, bc.expense from cmc_budget_car as bc
26
+        left join cmc_car as c on c.car_id = bc.car_id
20 27
     </sql>
21 28
 
22 29
     <select id="selectCmcBudgetCarList" parameterType="CmcBudgetCar" resultMap="CmcBudgetCarResult">
23 30
         <include refid="selectCmcBudgetCarVo"/>
24 31
         <where>  
25
-            <if test="budgetId != null  and budgetId != ''"> and budget_id = #{budgetId}</if>
26
-            <if test="carId != null "> and car_id = #{carId}</if>
27
-            <if test="days != null "> and days = #{days}</if>
28
-            <if test="depreciation != null "> and depreciation = #{depreciation}</if>
29
-            <if test="distance != null "> and distance = #{distance}</if>
30
-            <if test="mileage != null "> and mileage = #{mileage}</if>
31
-            <if test="expense != null "> and expense = #{expense}</if>
32
+            <if test="budgetId != null  and budgetId != ''"> and bc.budget_id = #{budgetId}</if>
33
+            <if test="carId != null "> and bc.car_id = #{carId}</if>
34
+            <if test="days != null "> and bc.days = #{days}</if>
35
+            <if test="depreciation != null "> and bc.depreciation = #{depreciation}</if>
36
+            <if test="distance != null "> and bc.distance = #{distance}</if>
37
+            <if test="mileage != null "> and bc.mileage = #{mileage}</if>
38
+            <if test="expense != null "> and bc.expense = #{expense}</if>
32 39
         </where>
33 40
     </select>
34 41
     
35
-    <select id="selectCmcBudgetCarByBudgetCarId" parameterType="String" resultMap="CmcBudgetCarResult">
42
+    <select id="selectCmcBudgetCarByBudgetId" parameterType="String" resultMap="CmcBudgetCarResult">
36 43
         <include refid="selectCmcBudgetCarVo"/>
37
-        where budget_car_id = #{budgetCarId}
44
+        where bc.budget_id = #{budgetId}
38 45
     </select>
39 46
         
40 47
     <insert id="insertCmcBudgetCar" parameterType="CmcBudgetCar">

+ 17
- 7
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetDeviceMapper.xml Zobrazit soubor

@@ -10,25 +10,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
10 10
         <result property="deviceId"    column="device_id"    />
11 11
         <result property="days"    column="days"    />
12 12
         <result property="depreciation"    column="depreciation"    />
13
+        <association property="device"    javaType="CmcDevice"         resultMap="CmcDeviceResult" />
14
+    </resultMap>
15
+
16
+    <resultMap type="CmcDevice" id="CmcDeviceResult">
17
+        <result property="deviceId"    column="device_id"    />
18
+        <result property="code"    column="code"    />
19
+        <result property="name"    column="name"    />
20
+        <result property="series"    column="series"    />
21
+        <result property="brand"    column="brand"    />
13 22
     </resultMap>
14 23
 
15 24
     <sql id="selectCmcBudgetDeviceVo">
16
-        select budget_device_id, budget_id, device_id, days, depreciation from cmc_budget_device
25
+        select bd.budget_device_id, bd.budget_id, d.code, d.name, d.series, d.brand, bd.device_id, bd.days, bd.depreciation from cmc_budget_device as bd
26
+        left join cmc_device as d on d.device_id = bd.device_id
17 27
     </sql>
18 28
 
19 29
     <select id="selectCmcBudgetDeviceList" parameterType="CmcBudgetDevice" resultMap="CmcBudgetDeviceResult">
20 30
         <include refid="selectCmcBudgetDeviceVo"/>
21 31
         <where>  
22
-            <if test="budgetId != null  and budgetId != ''"> and budget_id = #{budgetId}</if>
23
-            <if test="deviceId != null "> and device_id = #{deviceId}</if>
24
-            <if test="days != null "> and days = #{days}</if>
25
-            <if test="depreciation != null "> and depreciation = #{depreciation}</if>
32
+            <if test="budgetId != null  and budgetId != ''"> and bd.budget_id = #{budgetId}</if>
33
+            <if test="deviceId != null "> and bd.device_id = #{deviceId}</if>
34
+            <if test="days != null "> and bd.days = #{days}</if>
35
+            <if test="depreciation != null "> and bd.depreciation = #{depreciation}</if>
26 36
         </where>
27 37
     </select>
28 38
     
29
-    <select id="selectCmcBudgetDeviceByBudgetDeviceId" parameterType="String" resultMap="CmcBudgetDeviceResult">
39
+    <select id="selectCmcBudgetDeviceByBudgetId" parameterType="String" resultMap="CmcBudgetDeviceResult">
30 40
         <include refid="selectCmcBudgetDeviceVo"/>
31
-        where budget_device_id = #{budgetDeviceId}
41
+        where bd.budget_id = #{budgetId}
32 42
     </select>
33 43
         
34 44
     <insert id="insertCmcBudgetDevice" parameterType="CmcBudgetDevice">

+ 19
- 8
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetSettleMapper.xml Zobrazit soubor

@@ -11,26 +11,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
11 11
         <result property="workload"    column="workload"    />
12 12
         <result property="coefficient"    column="coefficient"    />
13 13
         <result property="settle"    column="settle"    />
14
+        <association property="price"    javaType="CmcPrice"         resultMap="CmcPriceResult" />
15
+    </resultMap>
16
+
17
+    <resultMap type="CmcPrice" id="CmcPriceResult">
18
+        <result property="id"    column="id"    />
19
+        <result property="workType"    column="work_type"    />
20
+        <result property="workItem"    column="work_item"    />
21
+        <result property="subItem"    column="sub_item"    />
22
+        <result property="scaleGrade"    column="scale_grade"    />
23
+        <result property="unit"    column="unit"    />
14 24
     </resultMap>
15 25
 
16 26
     <sql id="selectCmcBudgetSettleVo">
17
-        select budget_settle_id, budget_id, price_id, workload, coefficient, settle from cmc_budget_settle
27
+        select bs.budget_settle_id, bs.budget_id, bs.price_id, p.work_type, p.work_item, p.sub_item, p.scale_grade, p.unit, bs.workload, bs.coefficient, bs.settle from cmc_budget_settle as bs
28
+        left join cmc_price as p on p.id = bs.price_id
18 29
     </sql>
19 30
 
20 31
     <select id="selectCmcBudgetSettleList" parameterType="CmcBudgetSettle" resultMap="CmcBudgetSettleResult">
21 32
         <include refid="selectCmcBudgetSettleVo"/>
22 33
         <where>  
23
-            <if test="budgetId != null  and budgetId != ''"> and budget_id = #{budgetId}</if>
24
-            <if test="priceId != null "> and price_id = #{priceId}</if>
25
-            <if test="workload != null "> and workload = #{workload}</if>
26
-            <if test="coefficient != null "> and coefficient = #{coefficient}</if>
27
-            <if test="settle != null "> and settle = #{settle}</if>
34
+            <if test="budgetId != null  and budgetId != ''"> and bs.budget_id = #{budgetId}</if>
35
+            <if test="priceId != null "> and bs.price_id = #{priceId}</if>
36
+            <if test="workload != null "> and bs.workload = #{workload}</if>
37
+            <if test="coefficient != null "> and bs.coefficient = #{coefficient}</if>
38
+            <if test="settle != null "> and bs.settle = #{settle}</if>
28 39
         </where>
29 40
     </select>
30 41
     
31
-    <select id="selectCmcBudgetSettleByBudgetSettleId" parameterType="String" resultMap="CmcBudgetSettleResult">
42
+    <select id="selectCmcBudgetSettleByBudgetId" parameterType="String" resultMap="CmcBudgetSettleResult">
32 43
         <include refid="selectCmcBudgetSettleVo"/>
33
-        where budget_settle_id = #{budgetSettleId}
44
+        where bs.budget_id = #{budgetId}
34 45
     </select>
35 46
         
36 47
     <insert id="insertCmcBudgetSettle" parameterType="CmcBudgetSettle">

+ 16
- 9
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetStaffMapper.xml Zobrazit soubor

@@ -12,27 +12,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
12 12
         <result property="staffCost"    column="staff_cost"    />
13 13
         <result property="inOutPrice"    column="in_out_price"    />
14 14
         <result property="inOutExpense"    column="in_out_expense"    />
15
+        <association property="user"    javaType="SysUser"         resultMap="SysUserResult" />
16
+    </resultMap>
17
+
18
+    <resultMap type="SysUser" id="SysUserResult">
19
+        <result property="userId"    column="user_id"    />
20
+        <result property="nickName"    column="nick_name"    />
15 21
     </resultMap>
16 22
 
17 23
     <sql id="selectCmcBudgetStaffVo">
18
-        select budget_staff_id, budget_id, user_id, days, staff_cost, in_out_price, in_out_expense from cmc_budget_staff
24
+        select bs.budget_staff_id, bs.budget_id, bs.user_id, u.nick_name, bs.days, bs.staff_cost, bs.in_out_price, bs.in_out_expense from cmc_budget_staff as bs
25
+        left join sys_user as u on u.user_id = bs.user_id
19 26
     </sql>
20 27
 
21 28
     <select id="selectCmcBudgetStaffList" parameterType="CmcBudgetStaff" resultMap="CmcBudgetStaffResult">
22 29
         <include refid="selectCmcBudgetStaffVo"/>
23 30
         <where>  
24
-            <if test="budgetId != null  and budgetId != ''"> and budget_id = #{budgetId}</if>
25
-            <if test="userId != null "> and user_id = #{userId}</if>
26
-            <if test="days != null "> and days = #{days}</if>
27
-            <if test="staffCost != null "> and staff_cost = #{staffCost}</if>
28
-            <if test="inOutPrice != null "> and in_out_price = #{inOutPrice}</if>
29
-            <if test="inOutExpense != null "> and in_out_expense = #{inOutExpense}</if>
31
+            <if test="budgetId != null  and budgetId != ''"> and bs.budget_id = #{budgetId}</if>
32
+            <if test="userId != null "> and bs.user_id = #{userId}</if>
33
+            <if test="days != null "> and bs.days = #{days}</if>
34
+            <if test="staffCost != null "> and bs.staff_cost = #{staffCost}</if>
35
+            <if test="inOutPrice != null "> and bs.in_out_price = #{inOutPrice}</if>
36
+            <if test="inOutExpense != null "> and bs.in_out_expense = #{inOutExpense}</if>
30 37
         </where>
31 38
     </select>
32 39
     
33
-    <select id="selectCmcBudgetStaffByBudgetStaffId" parameterType="String" resultMap="CmcBudgetStaffResult">
40
+    <select id="selectCmcBudgetStaffByBudgetId" parameterType="String" resultMap="CmcBudgetStaffResult">
34 41
         <include refid="selectCmcBudgetStaffVo"/>
35
-        where budget_staff_id = #{budgetStaffId}
42
+        where bs.budget_id = #{budgetId}
36 43
     </select>
37 44
         
38 45
     <insert id="insertCmcBudgetStaff" parameterType="CmcBudgetStaff">

+ 13
- 4
oa-ui/src/views/flowable/form/budget/budgetInfo.vue Zobrazit soubor

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-03 16:28:09
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-04-08 17:15:44
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-04-08 18:07:49
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -165,12 +165,21 @@ export default {
165 165
       listBudget({ pageNum: 1, pageSize: 20, projectId: this.taskForm.formId }).then(res => {
166 166
         console.log(res);
167 167
         this.budgetForm = res.rows[0];
168
-        listBudgetDevice({ pageNum: 1, pageSize: 20, budgetId: this.budgetForm.budgetId }).then(res => {
168
+        getBudgetDevice(this.budgetForm.budgetId).then(res => {
169 169
           console.log(res);
170 170
           this.chooseDevice = res.rows;
171 171
         })
172
-        listBudgetStaff({ pageNum: 1, pageSize: 20, budgetId: this.budgetForm.budgetId }).then(result => {
172
+        getBudgetStaff(this.budgetForm.budgetId).then(result => {
173 173
           console.log(result);
174
+          this.chooseUser = res.rows;
175
+        })
176
+        getBudgetCar(this.budgetForm.budgetId).then(result => {
177
+          console.log(result);
178
+          this.chooseCar = res.rows;
179
+        })
180
+        getBudgetSettle(this.budgetForm.budgetId).then(result => {
181
+          console.log(result);
182
+          this.workList = res.rows;
174 183
         })
175 184
       });
176 185
     },

Loading…
Zrušit
Uložit