瀏覽代碼

品牌项目、分包合同数据更新

lamphua 11 月之前
父節點
當前提交
83f76b7033

+ 3
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBrandProjectController.java 查看文件

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.web.controller.oa;
2 2
 
3
+import java.util.Date;
3 4
 import java.util.List;
4 5
 import javax.servlet.http.HttpServletResponse;
5 6
 
@@ -95,6 +96,8 @@ public class CmcBrandProjectController extends BaseController
95 96
     @PutMapping
96 97
     public AjaxResult edit(@RequestBody CmcBrandProject cmcBrandProject)
97 98
     {
99
+        cmcBrandProject.setProjectRegistrant(getLoginUser().getUserId());
100
+        cmcBrandProject.setRegisterTime(new Date());
98 101
         return toAjax(cmcBrandProjectService.updateCmcBrandProject(cmcBrandProject));
99 102
     }
100 103
 

+ 3
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcPartyAController.java 查看文件

@@ -2,6 +2,8 @@ package com.ruoyi.web.controller.oa;
2 2
 
3 3
 import java.util.List;
4 4
 import javax.servlet.http.HttpServletResponse;
5
+
6
+import com.ruoyi.oa.domain.CmcPartner;
5 7
 import org.springframework.beans.factory.annotation.Autowired;
6 8
 import org.springframework.web.bind.annotation.GetMapping;
7 9
 import org.springframework.web.bind.annotation.PostMapping;
@@ -72,6 +74,7 @@ public class CmcPartyAController extends BaseController
72 74
     @PostMapping
73 75
     public AjaxResult add(@RequestBody CmcPartyA cmcPartyA)
74 76
     {
77
+        cmcPartyA.setPartyAId(String.valueOf(cmcPartyAService.selectCmcPartyAList(new CmcPartyA()).size() + 1));
75 78
         return toAjax(cmcPartyAService.insertCmcPartyA(cmcPartyA));
76 79
     }
77 80
 

+ 30
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBrandProject.java 查看文件

@@ -1,6 +1,9 @@
1 1
 package com.ruoyi.oa.domain;
2 2
 
3 3
 import java.math.BigDecimal;
4
+import java.util.Date;
5
+
6
+import com.fasterxml.jackson.annotation.JsonFormat;
4 7
 import org.apache.commons.lang3.builder.ToStringBuilder;
5 8
 import org.apache.commons.lang3.builder.ToStringStyle;
6 9
 import com.ruoyi.common.annotation.Excel;
@@ -67,6 +70,15 @@ public class CmcBrandProject extends BaseEntity
67 70
     @Excel(name = "项目概况")
68 71
     private String content;
69 72
 
73
+    /** 项目登记人 */
74
+    @Excel(name = "项目登记人")
75
+    private Long projectRegistrant;
76
+
77
+    /** 项目登记日期 */
78
+    @JsonFormat(pattern = "yyyy-MM-dd")
79
+    @Excel(name = "项目登记日期", width = 30, dateFormat = "yyyy-MM-dd")
80
+    private Date registerTime;
81
+
70 82
     public void setProjectId(String projectId) 
71 83
     {
72 84
         this.projectId = projectId;
@@ -193,6 +205,24 @@ public class CmcBrandProject extends BaseEntity
193 205
     {
194 206
         return content;
195 207
     }
208
+    public void setProjectRegistrant(Long projectRegistrant)
209
+    {
210
+        this.projectRegistrant = projectRegistrant;
211
+    }
212
+
213
+    public Long getProjectRegistrant()
214
+    {
215
+        return projectRegistrant;
216
+    }
217
+    public void setRegisterTime(Date registerTime)
218
+    {
219
+        this.registerTime = registerTime;
220
+    }
221
+
222
+    public Date getRegisterTime()
223
+    {
224
+        return registerTime;
225
+    }
196 226
 
197 227
     @Override
198 228
     public String toString() {

+ 11
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBrandProjectMapper.xml 查看文件

@@ -18,6 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
18 18
         <result property="amount"    column="amount"    />
19 19
         <result property="content"    column="content"    />
20 20
         <result property="remark"    column="remark"    />
21
+        <result property="projectRegistrant"    column="project_registrant"    />
22
+        <result property="registerTime"    column="register_time"    />
21 23
         <association property="partner"    javaType="CmcPartner"         resultMap="CmcPartnerResult" />
22 24
         <association property="partyA"    javaType="CmcPartyA"         resultMap="CmcPartyAResult" />
23 25
     </resultMap>
@@ -33,7 +35,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
33 35
     </resultMap>
34 36
 
35 37
     <sql id="selectCmcBrandProjectVo">
36
-        select bp.project_id, bp.project_number, bp.project_name, bp.party_a_id, pa.party_a_name, bp.a_person, bp.a_phone, bp.partner_id, p.partner_name, bp.contact_person, bp.telephone, bp.duration, bp.amount, bp.content, bp.remark from cmc_brand_project as bp
38
+        select bp.project_id, bp.project_number, bp.project_name, bp.party_a_id, pa.party_a_name, bp.a_person, bp.a_phone, bp.partner_id, p.partner_name, bp.contact_person, bp.telephone,
39
+               bp.duration, bp.amount, bp.content, bp.remark, bp.register_time, bp.project_registrant from cmc_brand_project as bp
37 40
         left join cmc_partner as p on p.partner_id = bp.partner_id
38 41
         left join cmc_party_a as pa on pa.party_a_id = bp.party_a_id
39 42
     </sql>
@@ -52,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
52 55
             <if test="duration != null  and duration != ''"> and bp.duration = #{duration}</if>
53 56
             <if test="amount != null "> and bp.amount = #{amount}</if>
54 57
         </where>
58
+        order by project_number desc
55 59
     </select>
56 60
     
57 61
     <select id="selectCmcBrandProjectByProjectId" parameterType="String" resultMap="CmcBrandProjectResult">
@@ -75,6 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
75 79
             <if test="amount != null">amount,</if>
76 80
             <if test="content != null">content,</if>
77 81
             <if test="remark != null">remark,</if>
82
+            <if test="projectRegistrant != null">project_registrant,</if>
83
+            <if test="registerTime != null">register_time,</if>
78 84
          </trim>
79 85
         <trim prefix="values (" suffix=")" suffixOverrides=",">
80 86
             <if test="projectId != null">#{projectId},</if>
@@ -90,6 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
90 96
             <if test="amount != null">#{amount},</if>
91 97
             <if test="content != null">#{content},</if>
92 98
             <if test="remark != null">#{remark},</if>
99
+            <if test="projectRegistrant != null">#{projectRegistrant},</if>
100
+            <if test="registerTime != null">#{registerTime},</if>
93 101
          </trim>
94 102
     </insert>
95 103
 
@@ -108,6 +116,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
108 116
             <if test="amount != null">amount = #{amount},</if>
109 117
             <if test="content != null">content = #{content},</if>
110 118
             <if test="remark != null">remark = #{remark},</if>
119
+            <if test="projectRegistrant != null">project_registrant = #{projectRegistrant},</if>
120
+            <if test="registerTime != null">register_time = #{registerTime},</if>
111 121
         </trim>
112 122
         where project_id = #{projectId}
113 123
     </update>

+ 1212
- 652
oa-back/sql/sql.sql
文件差異過大導致無法顯示
查看文件


Loading…
取消
儲存