1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
| <?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.changhong.epc.form.mapper.tenant.QueryParamMapper">
| <select id="selectAccruedsPage" resultType="com.changhong.epc.bean.form.Accrued" parameterType="com.changhong.epc.bean.form.QueryParam">
| SELECT
| id,
| assetsCode,
| useDepartment,
| depreciationRate,
| currentDepreciation,
| cumulativeDepreciation,
| netMoney,
| accruedTime,
| alreadyTime,
| surplusTime,
| assetsName,
| specifications,
| capitalizationData,
| estimateTime,
| originalMoney,
| depreciationMethod,
| useDepartmentName,
| calculationPeriod
| FROM
| epc_fixed_asset_{rule}
| WHERE
| data_start = '0'
| AND depreciationRate != 0
| <if test="date != null and date != ''">
| AND
| calculationPeriod = #{date}
| </if>
| <if test="allUseDep != null and allUseDep !=''">
| AND
| SUBSTRING( useDepartment, 1, 14 ) = #{allUseDep}
| </if>
| <if test="assetName != null and assetName != ''">
| AND
| assetsName LIKE CONCAT('%',#{assetName},'%')
| </if>
| <if test="assetCode != null and assetCode != ''">
| AND
| assetsCode = #{assetCode}
| </if>
| </select>
|
|
|
| <select id="selectAssetPage" resultType="com.changhong.epc.bean.form.Accrued" parameterType="com.changhong.epc.bean.form.QueryParam">
| SELECT
| assetsCode,
| assetsName,
| t.name useDepartment,
| capitalizationData,
| Specifications,
| estimateTime,
| alreadyTime,
| originalMoney,
| cumulativeDepreciation,
| netMoney,
| depreciationMethod
| FROM
| <!-- formdata_13_baa0a8f0fc614f4766f9425f2ae3 -->
| formdata_{tenantId}_${formId} f
| left join epc_tenant_org_{rule} t on f.useDepartment = t.code
| WHERE
| DELETEFLG = '0'
| AND
| depreciation = #{depreciation}
| <if test="allUseDep != null and allUseDep != ''">
| AND
| SUBSTRING( useDepartment, 1, 14 ) = #{allUseDep}
| </if>
| <if test="assetCode != null and assetCode != ''">
| AND
| assetsCode = #{assetCode}
| </if>
| <if test="assetName != null and assetName != ''">
| AND
| assetsName LIKE CONCAT('%',#{assetName}, '%')
| </if>
| <if test="date != null and date != ''">
| AND
| capitalizationData < #{date}
| </if>
| AND
| surplusTime != '0'
| </select>
|
| </mapper>
|
|