ソースを参照

收付款合计查询

lamphua 1週間前
コミット
3f6d366023

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcContractController.java ファイルの表示

@@ -53,7 +53,7 @@ public class CmcContractController extends BaseController
53 53
     public TableDataInfo list(CmcContract cmcContract)
54 54
     {
55 55
         startPage();
56
-        List<CmcContract> list = cmcContractService.selectCmcContractList(cmcContract);
56
+        List<CmcContract> list = cmcContractService.selectCmcContractListP(cmcContract);
57 57
         return getDataTable(list);
58 58
     }
59 59
 

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcSubContractController.java ファイルの表示

@@ -52,7 +52,7 @@ public class CmcSubContractController extends BaseController
52 52
     public TableDataInfo list(CmcSubContract cmcSubContract)
53 53
     {
54 54
         startPage();
55
-        List<CmcSubContract> list = cmcSubContractService.selectCmcSubContractList(cmcSubContract);
55
+        List<CmcSubContract> list = cmcSubContractService.selectCmcSubContractListP(cmcSubContract);
56 56
         return getDataTable(list);
57 57
     }
58 58
 

+ 40
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcTitleEval.java ファイルの表示

@@ -2,6 +2,7 @@ package com.ruoyi.oa.domain;
2 2
 
3 3
 import java.util.Date;
4 4
 import com.fasterxml.jackson.annotation.JsonFormat;
5
+import com.ruoyi.common.core.domain.entity.SysUser;
5 6
 import org.apache.commons.lang3.builder.ToStringBuilder;
6 7
 import org.apache.commons.lang3.builder.ToStringStyle;
7 8
 import com.ruoyi.common.annotation.Excel;
@@ -21,8 +22,10 @@ public class CmcTitleEval extends BaseEntity
21 22
     private String titleEvalId;
22 23
 
23 24
     /** 申请人 */
24
-    @Excel(name = "申请人")
25 25
     private Long userId;
26
+    @Excel(name = "申请人")
27
+    private String applyUserName;
28
+    private SysUser applyUser;
26 29
 
27 30
     /** 评审年度 */
28 31
     @Excel(name = "评审年度")
@@ -79,8 +82,10 @@ public class CmcTitleEval extends BaseEntity
79 82
     private Date applyTime;
80 83
 
81 84
     /** 职称管理员 */
82
-    @Excel(name = "职称管理员")
83 85
     private Long titleUserId;
86
+    @Excel(name = "职称管理员")
87
+    private String  titleUserName;
88
+    private SysUser titleUser;
84 89
 
85 90
     /** 职称管理员审核时间 */
86 91
     @JsonFormat(pattern = "yyyy-MM-dd")
@@ -97,8 +102,10 @@ public class CmcTitleEval extends BaseEntity
97 102
     private Date materialUploadTime;
98 103
 
99 104
     /** 确认人 */
100
-    @Excel(name = "确认人")
101 105
     private Long confirmer;
106
+    @Excel(name = "确认人")
107
+    private String  confirmUserName;
108
+    private SysUser confirmUser;
102 109
 
103 110
     /** 确认时间 */
104 111
     @JsonFormat(pattern = "yyyy-MM-dd")
@@ -307,6 +314,36 @@ public class CmcTitleEval extends BaseEntity
307 314
     {
308 315
         return confirmStatus;
309 316
     }
317
+    public void setApplyUser(SysUser applyUser)
318
+    {
319
+        this.applyUser = applyUser;
320
+        this.applyUserName = applyUser == null ? "" : applyUser.getNickName();
321
+    }
322
+
323
+    public SysUser getApplyUser()
324
+    {
325
+        return applyUser;
326
+    }
327
+    public void setTitleUser(SysUser titleUser)
328
+    {
329
+        this.titleUser = titleUser;
330
+        this.titleUserName = titleUser == null ? "" : titleUser.getNickName();
331
+    }
332
+
333
+    public SysUser getTitleUser()
334
+    {
335
+        return titleUser;
336
+    }
337
+    public void setConfirmUser(SysUser confirmUser)
338
+    {
339
+        this.confirmUser = confirmUser;
340
+        this.confirmUserName = confirmUser == null ? "" : confirmUser.getNickName();
341
+    }
342
+
343
+    public SysUser getConfirmUser()
344
+    {
345
+        return confirmUser;
346
+    }
310 347
 
311 348
     @Override
312 349
     public String toString() {

+ 19
- 15
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcContractMapper.xml ファイルの表示

@@ -116,25 +116,29 @@
116 116
     </select>
117 117
 
118 118
     <select id="selectCmcContractListP" parameterType="CmcContract" resultMap="CmcContractResult">
119
-        select distinct t1.contract_id, t1.contract_code, t1.contract_name, t1.contract_number, t1.tender_id, t1.t_project_name,t1.party_a_id, t1.party_a_name, t1.a_person,
120
-        t1.a_phone, t1.agent, t1.agent_person,t1.paid_amount, t1.paid_percentage, t1.invoice_amount, t1.invoice_percentage, p.project_number, p.project_name, p.project_source,
121
-        t1.agent_phone, t1.amount, t1.deposit, t1.contract_document, t1.drafter, t1.draft_nick_name, t1.draft_time, t1.remark, t1.sign_date, t1.sign_remark, t1.sign_scan,
122
-        t1.comment_type, t1.manager_comment, t1.manager_user_id, t1.manager_nick_name, t1.manager_time, t1.gm_user_id, t1.gm_nick_name, t1.gm_time, t1.gm_comment from
123
-        (select distinct c.contract_id, c.contract_code, c.contract_name, c.contract_number, c.tender_id, t.project_name as t_project_name,c.party_a_id, pa.party_a_name,
124
-        t.a_person as a_person, t.a_phone as a_phone, t.agent as agent, t.agent_person as agent_person, t.agent_phone as agent_phone,
119
+        select distinct t1.contract_id, t1.contract_code, t1.contract_name, t1.contract_number, t1.tender_id, t.project_name as t_project_name, t1.party_a_id, pa.party_a_name, t.a_person,
120
+        t.a_phone, t.agent, t.agent_person,t1.paid_amount, t1.paid_percentage, t2.invoice_amount, t2.invoice_percentage, p.project_number, p.project_name, p.project_source,
121
+        t.agent_phone, t1.amount, t1.deposit, t1.contract_document, t1.drafter, u.nick_name as draft_nick_name, t1.draft_time, t1.remark, t1.sign_date, t1.sign_remark, t1.sign_scan,
122
+        t1.comment_type, t1.manager_comment, t1.manager_user_id, u1.nick_name as manager_nick_name, t1.manager_time, t1.gm_user_id, u2.nick_name as gm_nick_name, t1.gm_time, t1.gm_comment from
123
+        (select distinct c.contract_id, c.contract_code, c.contract_name, c.contract_number, c.party_a_id, c.tender_id,
125 124
         sum(cp.paid_amount) as paid_amount, case c.amount when 0 then 0 else round(sum(cp.paid_amount) / c.amount * 100, 2) end as paid_percentage,
126
-        sum(ci.invoice_amount) as invoice_amount, case c.amount when 0 then 0 else round(sum(ci.invoice_amount) / c.amount * 100, 2) end as invoice_percentage,
127
-        c.amount, c.deposit, c.contract_document, c.drafter, u.nick_name as draft_nick_name, c.draft_time, c.remark, c.sign_date, c.sign_remark, c.sign_scan,
128
-        c.comment_type, c.manager_comment, c.manager_user_id, u1.nick_name as manager_nick_name, c.manager_time, c.gm_user_id, u2.nick_name as gm_nick_name, c.gm_time, c.gm_comment from cmc_contract as c
129
-        left join sys_user as u on u.user_id = c.drafter
130
-        left join sys_user as u1 on u1.user_id = c.manager_user_id
131
-        left join sys_user as u2 on u2.user_id = c.gm_user_id
132
-        left join cmc_tender as t on t.tender_id = c.tender_id
133
-        left join cmc_party_a as pa on pa.party_a_id = c.party_a_id
125
+        c.amount, c.deposit, c.contract_document, c.drafter, c.draft_time, c.remark, c.sign_date, c.sign_remark, c.sign_scan,
126
+        c.comment_type, c.manager_comment, c.manager_user_id, c.manager_time, c.gm_user_id, c.gm_time, c.gm_comment from cmc_contract as c
134 127
         left join cmc_contract_paid as cp on cp.contract_id = c.contract_id
135
-        left join cmc_contract_invoice as ci on ci.contract_id = c.contract_id
136 128
         group by c.contract_id)
137 129
         as t1
130
+        left join
131
+        (select distinct c.contract_id,
132
+        sum(ci.invoice_amount) as invoice_amount, case c.amount when 0 then 0 else round(sum(ci.invoice_amount) / c.amount * 100, 2) end as invoice_percentage
133
+        from cmc_contract as c
134
+        left join cmc_contract_invoice as ci on ci.contract_id = c.contract_id
135
+        group by c.contract_id)
136
+        as t2 on t2.contract_id = t1.contract_id
137
+        left join sys_user as u on u.user_id = t1.drafter
138
+        left join sys_user as u1 on u1.user_id = t1.manager_user_id
139
+        left join sys_user as u2 on u2.user_id = t1.gm_user_id
140
+        left join cmc_tender as t on t.tender_id = t1.tender_id
141
+        left join cmc_party_a as pa on pa.party_a_id = t1.party_a_id
138 142
         left join cmc_project_contract as pc on pc.contract_id = t1.contract_id
139 143
         left join cmc_project as p on pc.project_id = p.project_id
140 144
         <where>

+ 17
- 12
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSubContractMapper.xml ファイルの表示

@@ -98,22 +98,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
98 98
     </select>
99 99
 
100 100
     <select id="selectCmcSubContractListP" parameterType="CmcSubContract" resultMap="CmcSubContractResult">
101
-        select distinct t1.sub_contract_id, t1.sub_contract_name, t1.sub_amount, t1.partner_id, t1.partner_name, t1.contact_person, t1.telephone, t1.contract_document, t1.drafter,
102
-        t1.paid_amount, t1.paid_percentage, t1.invoice_amount, t1.invoice_percentage, t1.draft_nick_name, t1.draft_time, t1.remark, t1.sign_date, t1.sign_remark, t1.sign_scan,
103
-        t1.comment_type, t1.manager_comment, t1.manager_user_id, t1.manager_nick_name, t1.manager_time, t1.gm_user_id, t1.gm_nick_name, t1.gm_time, t1.gm_comment, p.project_number, p.project_name, p.project_source from
104
-        (select distinct sc.sub_contract_id, sc.sub_contract_name, sc.sub_amount, sc.partner_id, pa.partner_name, sc.contact_person, sc.telephone, sc.contract_document, sc.drafter,
101
+        select distinct t1.sub_contract_id, t1.sub_contract_name, t1.sub_amount, t1.partner_id, pa.partner_name, t1.contact_person, t1.telephone, t1.contract_document, t1.drafter,
102
+        t1.paid_amount, t1.paid_percentage, t2.invoice_amount, t2.invoice_percentage, u.nick_name as draft_nick_name,  t1.draft_time, t1.remark, t1.sign_date, t1.sign_remark, t1.sign_scan,
103
+        t1.comment_type, t1.manager_comment, t1.manager_user_id, u1.nick_name as manager_nick_name, t1.manager_time, t1.gm_user_id, u2.nick_name as gm_nick_name, t1.gm_time, t1.gm_comment, p.project_number, p.project_name, p.project_source from
104
+        (select distinct sc.sub_contract_id, sc.sub_contract_name, sc.sub_amount, sc.partner_id, sc.contact_person, sc.telephone, sc.contract_document, sc.drafter,
105 105
         sum(cp.paid_amount) as paid_amount, case sc.sub_amount when 0 then 0 else round(sum(cp.paid_amount) / sc.sub_amount * 100, 2) end as paid_percentage,
106
-        sum(ci.invoice_amount) as invoice_amount, case sc.sub_amount when 0 then 0 else round(sum(ci.invoice_amount) / sc.sub_amount * 100, 2) end as invoice_percentage,
107
-        u.nick_name as draft_nick_name, sc.draft_time, sc.remark, sc.sign_date, sc.sign_remark, sc.sign_scan, sc.comment_type, sc.manager_comment,
108
-        sc.manager_user_id, u1.nick_name as manager_nick_name, sc.manager_time, sc.gm_user_id, u2.nick_name as gm_nick_name, sc.gm_time, sc.gm_comment from cmc_sub_contract as sc
109
-        left join sys_user as u on u.user_id = sc.drafter
110
-        left join sys_user as u1 on u1.user_id = sc.manager_user_id
111
-        left join sys_user as u2 on u2.user_id = sc.gm_user_id
112
-        left join cmc_partner as pa on pa.partner_id = sc.partner_id
106
+        sc.draft_time, sc.remark, sc.sign_date, sc.sign_remark, sc.sign_scan, sc.comment_type, sc.manager_comment,
107
+        sc.manager_user_id, sc.manager_time, sc.gm_user_id, sc.gm_time, sc.gm_comment from cmc_sub_contract as sc
113 108
         left join cmc_contract_paid as cp on cp.contract_id = sc.sub_contract_id
114
-        left join cmc_contract_invoice as ci on ci.contract_id = sc.sub_contract_id
115 109
         group by sc.sub_contract_id)
116 110
         as t1
111
+        left join
112
+        (select distinct sc.sub_contract_id,
113
+        sum(ci.invoice_amount) as invoice_amount, case sc.sub_amount when 0 then 0 else round(sum(ci.invoice_amount) / sc.sub_amount * 100, 2) end as invoice_percentage
114
+        from cmc_sub_contract as sc
115
+        left join cmc_contract_invoice as ci on ci.contract_id = sc.sub_contract_id
116
+        group by sc.sub_contract_id)
117
+        as t2 on t2.sub_contract_id = t1.sub_contract_id
118
+        left join sys_user as u on u.user_id = t1.drafter
119
+        left join sys_user as u1 on u1.user_id = t1.manager_user_id
120
+        left join sys_user as u2 on u2.user_id = t1.gm_user_id
121
+        left join cmc_partner as pa on pa.partner_id = t1.partner_id
117 122
         left join cmc_project_sub_contract as psc on psc.sub_contract_id = t1.sub_contract_id
118 123
         left join cmc_project as p on psc.project_id = p.project_id
119 124
         <where>

+ 45
- 22
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcTitleEvalMapper.xml ファイルの表示

@@ -27,36 +27,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
27 27
         <result property="confirmer"    column="confirmer"    />
28 28
         <result property="confirmTime"    column="confirm_time"    />
29 29
         <result property="confirmStatus"    column="confirm_status"    />
30
+        <association property="applyUser"    javaType="SysUser"         resultMap="ApplyUserResult" />
31
+        <association property="titleUser"    javaType="SysUser"         resultMap="TitleUserResult" />
32
+        <association property="confirmUser"    javaType="SysUser"         resultMap="ConfirmUserResult" />
33
+    </resultMap>
34
+
35
+    <resultMap type="SysUser" id="ApplyUserResult">
36
+        <result property="userId"    column="user_id"    />
37
+        <result property="nickName"    column="apply_nick_name"    />
38
+    </resultMap>
39
+
40
+    <resultMap type="SysUser" id="TitleUserResult">
41
+        <result property="userId"    column="user_id"    />
42
+        <result property="nickName"    column="title_nick_name"    />
43
+    </resultMap>
44
+
45
+    <resultMap type="SysUser" id="ConfirmUserResult">
46
+        <result property="userId"    column="user_id"    />
47
+        <result property="nickName"    column="confirm_nick_name"    />
30 48
     </resultMap>
31 49
 
32 50
     <sql id="selectCmcTitleEvalVo">
33
-        select title_eval_id, user_id, annual, institude, type, level, title_profession, sheet, sheet_stamp, material, is_approved, publicity_file, scan_file, obtain_time, apply_time, title_user_id, title_time, title_comment, material_upload_time, confirmer, confirm_time, confirm_status from cmc_title_eval
51
+        select te.title_eval_id, te.user_id, u.nick_name as apply_nick_name, te.annual, te.institude, te.type, te.level, te.title_profession, te.sheet, te.sheet_stamp, te.material, te.is_approved, te.publicity_file, te.scan_file,
52
+               te.obtain_time, te.apply_time, te.title_user_id, u1.nick_name as title_nick_name, te.title_time, te.title_comment, te.material_upload_time, te.confirmer, u2.nick_name as confirm_nick_name, te.confirm_time,
53
+               te.confirm_status from cmc_title_eval as te
54
+        left join sys_user as u on u.user_id = te.user_id
55
+        left join sys_user as u1 on u1.user_id = te.title_user_id
56
+        left join sys_user as u2 on u2.user_id = te.confirmer
34 57
     </sql>
35 58
 
36 59
     <select id="selectCmcTitleEvalList" parameterType="CmcTitleEval" resultMap="CmcTitleEvalResult">
37 60
         <include refid="selectCmcTitleEvalVo"/>
38 61
         <where>  
39
-            <if test="userId != null "> and user_id = #{userId}</if>
40
-            <if test="annual != null  and annual != ''"> and annual = #{annual}</if>
41
-            <if test="institude != null  and institude != ''"> and institude = #{institude}</if>
42
-            <if test="type != null  and type != ''"> and type = #{type}</if>
43
-            <if test="level != null  and level != ''"> and level = #{level}</if>
44
-            <if test="titleProfession != null  and titleProfession != ''"> and title_profession = #{titleProfession}</if>
45
-            <if test="sheet != null  and sheet != ''"> and sheet = #{sheet}</if>
46
-            <if test="sheetStamp != null  and sheetStamp != ''"> and sheet_stamp = #{sheetStamp}</if>
47
-            <if test="material != null  and material != ''"> and material = #{material}</if>
48
-            <if test="isApproved != null  and isApproved != ''"> and is_approved = #{isApproved}</if>
49
-            <if test="publicityFile != null  and publicityFile != ''"> and publicity_file = #{publicityFile}</if>
50
-            <if test="scanFile != null  and scanFile != ''"> and scan_file = #{scanFile}</if>
51
-            <if test="obtainTime != null "> and obtain_time = #{obtainTime}</if>
52
-            <if test="applyTime != null "> and apply_time = #{applyTime}</if>
53
-            <if test="titleUserId != null "> and title_user_id = #{titleUserId}</if>
54
-            <if test="titleTime != null "> and title_time = #{titleTime}</if>
55
-            <if test="titleComment != null  and titleComment != ''"> and title_comment = #{titleComment}</if>
56
-            <if test="materialUploadTime != null "> and material_upload_time = #{materialUploadTime}</if>
57
-            <if test="confirmer != null "> and confirmer = #{confirmer}</if>
58
-            <if test="confirmTime != null "> and confirm_time = #{confirmTime}</if>
59
-            <if test="confirmStatus != null  and confirmStatus != ''"> and confirm_status = #{confirmStatus}</if>
62
+            <if test="userId != null "> and te.user_id = #{userId}</if>
63
+            <if test="annual != null  and annual != ''"> and te.annual = #{annual}</if>
64
+            <if test="institude != null  and institude != ''"> and te.institude = #{institude}</if>
65
+            <if test="type != null  and type != ''"> and te.type = #{type}</if>
66
+            <if test="level != null  and level != ''"> and te.level = #{level}</if>
67
+            <if test="titleProfession != null  and titleProfession != ''"> and te.title_profession = #{titleProfession}</if>
68
+            <if test="sheet != null  and sheet != ''"> and te.sheet = #{sheet}</if>
69
+            <if test="sheetStamp != null  and sheetStamp != ''"> and te.sheet_stamp = #{sheetStamp}</if>
70
+            <if test="material != null  and material != ''"> and te.material = #{material}</if>
71
+            <if test="isApproved != null  and isApproved != ''"> and te.is_approved = #{isApproved}</if>
72
+            <if test="publicityFile != null  and publicityFile != ''"> and te.publicity_file = #{publicityFile}</if>
73
+            <if test="scanFile != null  and scanFile != ''"> and te.scan_file = #{scanFile}</if>
74
+            <if test="obtainTime != null "> and te.obtain_time = #{obtainTime}</if>
75
+            <if test="applyTime != null "> and te.apply_time = #{applyTime}</if>
76
+            <if test="titleUserId != null "> and te.title_user_id = #{titleUserId}</if>
77
+            <if test="titleTime != null "> and te.title_time = #{titleTime}</if>
78
+            <if test="titleComment != null  and titleComment != ''"> and te.title_comment = #{titleComment}</if>
79
+            <if test="materialUploadTime != null "> and te.material_upload_time = #{materialUploadTime}</if>
80
+            <if test="confirmer != null "> and te.confirmer = #{confirmer}</if>
81
+            <if test="confirmTime != null "> and te.confirm_time = #{confirmTime}</if>
82
+            <if test="confirmStatus != null  and confirmStatus != ''"> and te.confirm_status = #{confirmStatus}</if>
60 83
         </where>
61 84
     </select>
62 85
     

読み込み中…
キャンセル
保存