Commit 3c903107 by 仲光辉

feat: add sql.

parent fad4ef3c
# # 2022.05.25
# # 2022.05.25
......@@ -5620,6 +5620,38 @@ alter table opportunity
alter table opportunity
add current_opportunity_uuid bigint(19) not null comment '当前最新的记录uuid {@code {@link #isDelete} == 0}';
alter table opportunity
add project_name varchar(64) null comment '项目名称';
alter table opportunity_report_message
add budget_requirements varchar(15) null comment '预算需求';
alter table opportunity_report_message
add company_name varchar(64) null comment '公司名称';
alter table opportunity_report_message
add business_license_img varchar(100) null comment '营业执照 图片 选填 可以上传一张图片';
alter table opportunity_report_message
add agency_uuid bigint(19) null comment '中介机构uuid 选填';
alter table opportunity_report_message
add agency_name varchar(64) null comment '中介机构名称 选填';
alter table opportunity_report_message
add agent_uuid bigint(19) null comment '经纪人 uuid';
alter table opportunity_report_message
add agent_name varchar(20) null comment '经纪人姓名 选填';
alter table opportunity_report_message
add agent_mobile varchar(30) null comment '纪人联系方式 选填';
alter table opportunity_report_message
modify budget_requirements varchar(30) null comment '预算需求';
......
### 查询 缴费通知单/催款涵 历史记录
### 查询 缴费通知单/催款涵 历史记录
SELECT bcnh.uuid AS `发送记录ID`,
bcnh.email_status AS `邮件发送状态: 0:失败 1:成功`,
bcnh.bill_uuid AS `账单ID`,
b.bill_code AS `账单编号`,
bcnh.contract_uuid AS `合同ID`,
c.contract_code AS `合同编号`,
bcnh.build_name AS `创建人`,
bcnh.create_time AS `创建时间`
FROM bill_charge_notice_history AS bcnh
INNER JOIN contract AS c ON c.uuid = bcnh.contract_uuid AND c.is_delete = 0 AND c.is_draft = 0
INNER JOIN bill AS b ON b.uuid = bcnh.bill_uuid AND b.is_delete = 0
WHERE bcnh.build_name = '戴云飞'
AND bcnh.create_time BETWEEN '2022-12-01 00:00:00' AND '2023-02-01 00:00:00'
AND bcnh.type = 1
ORDER BY bcnh.email_status DESC, bcnh.create_time DESC;
\ No newline at end of file
UPDATE project_floor_sub_item
UPDATE project_floor_sub_item
SET delete_time=NOW(),
note='同一单元号存在多条不同类型的数据'
WHERE obj_no IN (SELECT DISTINCT obj_no
FROM contract_unit
WHERE contract_code IN (
'HT-XAS-ZAGJFZ-伍07-202211-1090',
'HT-XAS-ZAGJFZ-伍08-202211-1125',
'HT-XAS-ZAGJFZ-伍09-202211-1133',
'HT-XAS-ZAGJFZ-伍10-202211-1138',
'HT-XAS-ZAGJFZ-叁01-202211-1148',
'HT-XAS-ZAGJFZ-壹01-202211-1159',
'HT-XAS-ZAGJFZ-叁07-202211-1160',
'HT-XAS-ZAGJFZ-叁08-202211-1176',
'HT-XAS-ZAGJFZ-壹02-202211-1187',
'HT-XAS-ZAGJFZ-壹03-202211-1194',
'HT-XAS-ZAGJFZ-叁10-202211-1198',
'HT-XAS-ZAGJFZ-贰01-202211-1203',
'HT-XAS-ZAGJFZ-贰02-202211-1214',
'HT-XAS-ZAGJFZ-贰06-202211-1218',
'HT-XAS-ZAGJFZ-壹11-202211-1236',
'HT-XAS-ZAGJFZ-伍11-202212-1861'
))
AND uuid NOT IN (SELECT DISTINCT sub_item_uuid
FROM contract_unit
WHERE contract_code IN (
'HT-XAS-ZAGJFZ-伍07-202211-1090',
'HT-XAS-ZAGJFZ-伍08-202211-1125',
'HT-XAS-ZAGJFZ-伍09-202211-1133',
'HT-XAS-ZAGJFZ-伍10-202211-1138',
'HT-XAS-ZAGJFZ-叁01-202211-1148',
'HT-XAS-ZAGJFZ-壹01-202211-1159',
'HT-XAS-ZAGJFZ-叁07-202211-1160',
'HT-XAS-ZAGJFZ-叁08-202211-1176',
'HT-XAS-ZAGJFZ-壹02-202211-1187',
'HT-XAS-ZAGJFZ-壹03-202211-1194',
'HT-XAS-ZAGJFZ-叁10-202211-1198',
'HT-XAS-ZAGJFZ-贰01-202211-1203',
'HT-XAS-ZAGJFZ-贰02-202211-1214',
'HT-XAS-ZAGJFZ-贰06-202211-1218',
'HT-XAS-ZAGJFZ-壹11-202211-1236',
'HT-XAS-ZAGJFZ-伍11-202212-1861'
))
LIMIT 16;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment