Browse Source

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

lamphua 11 months ago
parent
commit
83f76b7033

+ 3
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBrandProjectController.java View File

1
 package com.ruoyi.web.controller.oa;
1
 package com.ruoyi.web.controller.oa;
2
 
2
 
3
+import java.util.Date;
3
 import java.util.List;
4
 import java.util.List;
4
 import javax.servlet.http.HttpServletResponse;
5
 import javax.servlet.http.HttpServletResponse;
5
 
6
 
95
     @PutMapping
96
     @PutMapping
96
     public AjaxResult edit(@RequestBody CmcBrandProject cmcBrandProject)
97
     public AjaxResult edit(@RequestBody CmcBrandProject cmcBrandProject)
97
     {
98
     {
99
+        cmcBrandProject.setProjectRegistrant(getLoginUser().getUserId());
100
+        cmcBrandProject.setRegisterTime(new Date());
98
         return toAjax(cmcBrandProjectService.updateCmcBrandProject(cmcBrandProject));
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 View File

2
 
2
 
3
 import java.util.List;
3
 import java.util.List;
4
 import javax.servlet.http.HttpServletResponse;
4
 import javax.servlet.http.HttpServletResponse;
5
+
6
+import com.ruoyi.oa.domain.CmcPartner;
5
 import org.springframework.beans.factory.annotation.Autowired;
7
 import org.springframework.beans.factory.annotation.Autowired;
6
 import org.springframework.web.bind.annotation.GetMapping;
8
 import org.springframework.web.bind.annotation.GetMapping;
7
 import org.springframework.web.bind.annotation.PostMapping;
9
 import org.springframework.web.bind.annotation.PostMapping;
72
     @PostMapping
74
     @PostMapping
73
     public AjaxResult add(@RequestBody CmcPartyA cmcPartyA)
75
     public AjaxResult add(@RequestBody CmcPartyA cmcPartyA)
74
     {
76
     {
77
+        cmcPartyA.setPartyAId(String.valueOf(cmcPartyAService.selectCmcPartyAList(new CmcPartyA()).size() + 1));
75
         return toAjax(cmcPartyAService.insertCmcPartyA(cmcPartyA));
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 View File

1
 package com.ruoyi.oa.domain;
1
 package com.ruoyi.oa.domain;
2
 
2
 
3
 import java.math.BigDecimal;
3
 import java.math.BigDecimal;
4
+import java.util.Date;
5
+
6
+import com.fasterxml.jackson.annotation.JsonFormat;
4
 import org.apache.commons.lang3.builder.ToStringBuilder;
7
 import org.apache.commons.lang3.builder.ToStringBuilder;
5
 import org.apache.commons.lang3.builder.ToStringStyle;
8
 import org.apache.commons.lang3.builder.ToStringStyle;
6
 import com.ruoyi.common.annotation.Excel;
9
 import com.ruoyi.common.annotation.Excel;
67
     @Excel(name = "项目概况")
70
     @Excel(name = "项目概况")
68
     private String content;
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
     public void setProjectId(String projectId) 
82
     public void setProjectId(String projectId) 
71
     {
83
     {
72
         this.projectId = projectId;
84
         this.projectId = projectId;
193
     {
205
     {
194
         return content;
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
     @Override
227
     @Override
198
     public String toString() {
228
     public String toString() {

+ 11
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBrandProjectMapper.xml View File

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

+ 1212
- 652
oa-back/sql/sql.sql
File diff suppressed because it is too large
View File


Loading…
Cancel
Save