feat(oa): 添加项目客户关联字段并优化数据库配置
- 修改开发环境数据库端口从3306到13306 - 更新开发环境数据库密码为Root@12345 - 修改生产环境主从库地址统一指向新服务器- 更新生产环境数据库密码为Root@12345- 在SysOaProject实体类中添加customerId字段 - 在SysOaProjectBo业务对象中添加customerId和customerName字段 - 在SysOaProjectMapper.xml中关联查询客户信息- 优化项目查询SQL语句,明确指定表别名 - 在项目详情查询中添加客户信息关联查询 - 在SysOaProjectVo视图对象中添加客户相关字段
This commit is contained in:
@@ -49,9 +49,9 @@ spring:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||
url: jdbc:mysql://49.232.154.205:3306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||
url: jdbc:mysql://49.232.154.205:13306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: WANGyu11!
|
||||
password: Root@12345
|
||||
# 从库数据源
|
||||
slave:
|
||||
lazy: true
|
||||
|
||||
@@ -50,17 +50,17 @@ spring:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||
url: jdbc:mysql://110.41.139.73:3306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||
url: jdbc:mysql://49.232.154.205:13306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: WANGyu11!
|
||||
password: Root@12345
|
||||
# 从库数据源
|
||||
slave:
|
||||
lazy: true
|
||||
type: ${spring.datasource.type}
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://110.41.139.73:3306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||
url: jdbc:mysql://49.232.154.205:13306/fad_oa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: 123456
|
||||
password: Root@12345
|
||||
# oracle:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: oracle.jdbc.OracleDriver
|
||||
|
||||
@@ -160,4 +160,8 @@ public class SysOaProject extends BaseEntity {
|
||||
private Date originalFinishTime;
|
||||
//延期次数
|
||||
private Integer postponeCount;
|
||||
|
||||
//客户id
|
||||
private Long customerId;
|
||||
|
||||
}
|
||||
|
||||
@@ -196,5 +196,10 @@ public class SysOaProjectBo extends BaseEntity {
|
||||
private Date originalFinishTime;
|
||||
//延期次数
|
||||
private Integer postponeCount;
|
||||
|
||||
//客户id
|
||||
private Long customerId;
|
||||
//客户名称
|
||||
private String customerName;
|
||||
}
|
||||
|
||||
|
||||
@@ -262,4 +262,9 @@ public class SysOaProjectVo {
|
||||
private Date originalFinishTime;
|
||||
//延期次数
|
||||
private Integer postponeCount;
|
||||
|
||||
//客户id
|
||||
private Long customerId;
|
||||
//客户名称
|
||||
private String customerName;
|
||||
}
|
||||
|
||||
@@ -306,9 +306,11 @@
|
||||
p.signing_company,
|
||||
p.postpone_count,
|
||||
p.original_finish_time,
|
||||
TIMESTAMPDIFF(DAY, NOW(), p.postpone_time) AS remainTime
|
||||
TIMESTAMPDIFF(DAY, NOW(), p.postpone_time) AS remainTime,
|
||||
p.customer_id AS customerId,
|
||||
c.name AS customerName
|
||||
FROM sys_oa_project p
|
||||
|
||||
LEFT JOIN oa_customer c ON p.customer_id = c.customer_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
@@ -557,28 +559,28 @@
|
||||
</select>
|
||||
<select id="selectVoByIdPlus" resultMap="SysOaProjectVoResult">
|
||||
select sop.project_id,
|
||||
project_name,
|
||||
project_num,
|
||||
project_type,
|
||||
address,
|
||||
funds,
|
||||
functionary,
|
||||
begin_time,
|
||||
finish_time,
|
||||
delivery,
|
||||
guarantee,
|
||||
introduction,
|
||||
project_grade,
|
||||
project_status,
|
||||
contract_id,
|
||||
invoice_name,
|
||||
invoice_number,
|
||||
invoice_address,
|
||||
invoice_bank,
|
||||
bail,
|
||||
closure_files,
|
||||
remark,
|
||||
accessory,
|
||||
sop.project_name,
|
||||
sop.project_num,
|
||||
sop.project_type,
|
||||
sop.address,
|
||||
sop.funds,
|
||||
sop.functionary,
|
||||
sop.begin_time,
|
||||
sop.finish_time,
|
||||
sop.delivery,
|
||||
sop.guarantee,
|
||||
sop.introduction,
|
||||
sop.project_grade,
|
||||
sop.project_status,
|
||||
sop.contract_id,
|
||||
sop.invoice_name,
|
||||
sop.invoice_number,
|
||||
sop.invoice_address,
|
||||
sop.invoice_bank,
|
||||
sop.bail,
|
||||
sop.closure_files,
|
||||
sop.remark,
|
||||
sop.accessory,
|
||||
sop.create_by,
|
||||
sop.create_time,
|
||||
sop.update_by,
|
||||
@@ -587,14 +589,17 @@
|
||||
sop.signing_company,
|
||||
sop.original_finish_time,
|
||||
sop.postpone_count,
|
||||
is_postpone,
|
||||
postpone_reason,
|
||||
postpone_time,
|
||||
color,
|
||||
trade_type,
|
||||
pre_pay,
|
||||
sop.is_postpone,
|
||||
sop.postpone_reason,
|
||||
sop.postpone_time,
|
||||
sop.color,
|
||||
sop.trade_type,
|
||||
sop.pre_pay,
|
||||
sop.customer_id AS customerId,
|
||||
c.name AS customerName,
|
||||
TIMESTAMPDIFF(DAY, NOW(), sop.postpone_time) AS remainTime
|
||||
from sys_oa_project sop
|
||||
left join oa_customer c on c.customer_id = sop.customer_id
|
||||
where sop.project_id = #{projectId}
|
||||
</select>
|
||||
<!-- 本月合同总额 -->
|
||||
|
||||
Reference in New Issue
Block a user