229 lines
8.0 KiB
Markdown
229 lines
8.0 KiB
Markdown
---
|
|
title: 本地开发
|
|
tags:
|
|
- develop
|
|
---
|
|
|
|
{/* truncate */}
|
|
|
|
|
|
|
|
## 查询数据sql
|
|
|
|
### 审批人
|
|
|
|
```sql
|
|
-- 新版
|
|
select userid from VIEW_APVL_USERROLEFLOW
|
|
where DATA_CODE='WTJY01286494'
|
|
order by FLOWID desc;
|
|
|
|
-- 旧版
|
|
select v.* FROM APPROVAL_TOAPPR_VIEW_NEW v
|
|
LEFT JOIN ACT_APPROVAL_INS_INFO info ON v.TARGETID = info.TARGETID
|
|
WHERE info.TARGETCODE = 'AFWT10154186ZY';
|
|
```
|
|
|
|
### 菜单权限
|
|
|
|
```sql
|
|
|
|
select distinct decode(sub.subrolename,null,ref.rolename,sub.subrolename) as ROLENAME,oper.* from taw_system_priv_operation oper
|
|
left join taw_system_priv_menuitem mi on mi.code = oper.code
|
|
left join taw_system_priv_assign assi on assi.privid=mi.menuid
|
|
left join taw_system_sub_role sub on sub.id =assi.objectid
|
|
left join taw_system_userrefrole ref on to_char(ref.roleid) = assi.objectid
|
|
where oper.url='confirm_let_fail';
|
|
|
|
-- 菜单名字
|
|
select * from taw_system_priv_operation where code = '36' ;
|
|
|
|
-- 角色名跟菜单名不对应时使用
|
|
-- 填入实际角色,查询配置菜单时的角色名
|
|
select rolepriv.name from taw_system_sub_role sub
|
|
left join taw_system_priv_assign assi on sub.id =assi.objectid
|
|
left join taw_system_priv_menu rolepriv on rolepriv.PRIVID = assi.PRIVID
|
|
where sub.SUBROLENAME = '管家';
|
|
|
|
-- 旧版
|
|
select sub.subrolename,oper.* from taw_system_priv_operation oper
|
|
left join taw_system_priv_menuitem mi on mi.code = oper.code
|
|
left join taw_system_priv_assign assi on assi.privid=mi.menuid
|
|
left join taw_system_sub_role sub on sub.id =assi.objectid
|
|
where oper.url='contract_sf_del';
|
|
```
|
|
|
|
###
|
|
|
|
## 修改数据sql
|
|
|
|
### 委托合同
|
|
|
|
```sql
|
|
-- 修改业主信息
|
|
select ownername,ownerphoneno,certificatestype,certificatescode from wk_sf_contract where contractcode = 'AFWT100024229ZY';
|
|
update wk_sf_contract set ownername = 'lhth',ownerphoneno = '18835995130',certificatestype = '1013302',certificatescode = '124124124' where contractcode = 'AFWT100024229ZY';
|
|
|
|
-- 修改付款方式月付/季付
|
|
select PAYMENTTYPE from wk_sf_contract where contractcode = 'AFWT100025143ZY';
|
|
update wk_sf_contract set PAYMENTTYPE = '10100070002' where contractcode = 'AFWT100025143ZY';
|
|
|
|
-- 生产修改财务审核状态为待审核
|
|
update wk_sf_contract set checkstate = '1011703' where contractcode = 'AFWT10168121ZY';
|
|
|
|
-- 生产清空非代理人签约时的 代理人信息
|
|
select AGENTPEOPLE, agentcertificatetype, AGENTCERTIFICATENO from wk_sf_contract where contractcode = 'XW10518115';
|
|
update wk_sf_contract set AGENTPEOPLE = null, agentcertificatetype = null, AGENTCERTIFICATENO = null where contractcode = 'XW10518115';
|
|
|
|
-- 修改打印版本
|
|
SELECT CONTRACTPRINTVERSION,PREFERRED_VERSION FROM wk_sf_contract WHERE contractcode = 'AFWT100025143ZY';
|
|
update wk_sf_contract set CONTRACTPRINTVERSION = 'yxV1.0',PREFERRED_VERSION='1' WHERE contractcode = 'AFWT100025143ZY';
|
|
|
|
-- 电子改纸质
|
|
-- 太原为1000100820001 纸质
|
|
select signing_route from wk_sf_contract where contractcode = 'YW10035806';
|
|
update wk_sf_contract set signing_route = '1000100790001' where contractcode = 'YW10035806';
|
|
|
|
-- 改成营业执照
|
|
update wk_sf_contract set certificatestype = '101330001' where contractcode = 'YW10035806';
|
|
```
|
|
|
|
### 添加app关联合同
|
|
|
|
```sql
|
|
-- 按手机号插入
|
|
INSERT INTO WIWJ_USER_REL_CONTRACT(ID, USERID, CONTRACTID, ISDEL,
|
|
CREATETIME, LASTMODIFIEDTIME, CONTRACTTYPE, CITY_CODE)
|
|
VALUES (USER_REL_CONTRACT_SEQ.NEXTVAL, (SELECT ID FROM CUSTOMER_USER WHERE
|
|
MOBILE = '18835995130'), '10146082', '1', sysdate, sysdate, 'SF', 'sh');
|
|
|
|
-- 按用户id插入 198的id是:23545
|
|
insert into WIWJ_USER_REL_CONTRACT
|
|
(ID,USERID,CONTRACTID,ISDEL,CREATETIME,LASTMODIFIEDTIME,CONTRACTTYPE,CITY_CODE)
|
|
values (USER_REL_CONTRACT_SEQ.nextval,1301,10140101,1,sysdate,sysdate,'SF','sh');
|
|
|
|
-- 查所有城市的字符
|
|
select CITY_CODE,count(0) from WIWJ_USER_REL_CONTRACT group by CITY_CODE order by count(0) desc;
|
|
-- 查绑定的合同
|
|
select * from WIWJ_USER_REL_CONTRACT where CITY_CODE = 'sh' and CONTRACTTYPE = 'SF' and userid = '1301' order by CREATETIME desc;
|
|
```
|
|
|
|
### 承租合同
|
|
|
|
```sql
|
|
-- 签约类型
|
|
update wk_cf_contract set SERVICETYPE = 1 -- 1佣金 2服务费
|
|
where LESSEECONTRACTCODE = '合同号' ;
|
|
|
|
-- 修改电话,证件号
|
|
select TENANTPHONE,tenantCredentialType,TENANTCREDENTAILNO,TENANTNAME from WK_CF_CONTRACT where lesseecontractcode = 'AFCZ111549960ZY';
|
|
|
|
update WK_CF_CONTRACT set TENANTPHONE = '15903239785',tenantCredentialType= '101330001', TENANTCREDENTAILNO = '33553',
|
|
TENANTNAME='牛牛牛' where lesseecontractcode = 'AFCZ111549960ZY';
|
|
|
|
-- 修改实际结束日
|
|
select * from wk_cf_contract where lesseecontractcode = 'AFCZ100040827ZY' ;
|
|
update wk_cf_contract set REAL_END_DATE = '2027-10-27' where lesseecontractcode = 'AFCZ100040827ZY' ;
|
|
```
|
|
|
|
### 附件
|
|
|
|
```sql
|
|
-- 查询附件版本的合同
|
|
select contractcode from wk_sf_contract where ATTACHMENT_VERSION = 'v2.0' and CHECKSTATE != '1011702' and isdel = 1 and rownum < 10;
|
|
|
|
-- 查询共有人的附件信息
|
|
select housepeoplegjid,contractcode,checkstate,signatory,sf.id from wk_sf_contract sf
|
|
left join WIWJ_APPENDIX_LACK_INFO LACK on sf.id = lack.contractid
|
|
where attachment_version='v3.0' and isprint='1' and contractstate <> '1000100070003' and checkstate='1011702' and signing_Route = '1000100790001' and CertificatesType ='1013301' and signatory = '1000300170010'
|
|
and lack.id is not null;
|
|
```
|
|
|
|
### 协议
|
|
|
|
```sql
|
|
-- 查询自动带出的协议合同
|
|
select c.* from wiwj_agreement_info a
|
|
left join wk_sf_contract c on a.CONTRACTSID = c.id
|
|
where a.XYFROMKEY = 0
|
|
and c.checkstate != '1011702' and c.CONTRACTSTATE not in ('1000100070003','1000100070006')
|
|
order by c.createtime desc;
|
|
|
|
select c.* from wiwj_agreement_info a
|
|
left join wk_Cf_contract c on a.CONTRACTSID = c.id
|
|
where a.XYFROMKEY = 0 and a.CONTRACTTYPE = 'CF'
|
|
and c.checkstate != '1000200090002' and c.CONTRACTSTATE not in ('1000200010003','1000200010009','1000200010004')
|
|
order by c.createtime desc;
|
|
|
|
-- 删除资产管理协议的其中一部分 , 所以要查在途的
|
|
select *
|
|
from wiwj_agreement_info agr
|
|
where exists(
|
|
select 1 from wiwj_agreement_detail_info detail
|
|
where detail.name = 'paymentTypeChange'
|
|
and detail.value = 'Y'
|
|
and agr.id = detail.CONFERID
|
|
)
|
|
and agr.CONTRACTTYPE = 'SF'
|
|
and agr.PRINTCHECKSTATUS in ('1000200660001','1000200660003','1000200660004')
|
|
;
|
|
```
|
|
|
|
### 付款计划
|
|
|
|
```sql
|
|
-- 修改付款计划为已完成(含优选)
|
|
select * from WK_PAYMENT_ORDER where contractid = '100025143' and CONTRACTTYPE = 'SF'
|
|
and CFCONTRACTIDOFSXZ = '100040825'
|
|
order by PAYMENTSOURCE,STARTDATE;
|
|
select * from WK_PAYMENT_DEDUCT_INFO where PAYMENT_ID = '126507283' ;
|
|
select * from WIWJ_DEDUCTION_ORDER where contract_id = '10696539' and CONTRACT_TYPE = 'SF';
|
|
|
|
|
|
update WK_PAYMENT_ORDER set PAYMENTSTATE = '1000100110006' where contractid = '100025143' and CONTRACTTYPE = 'SF' and CFCONTRACTIDOFSXZ = '100040828';
|
|
update WK_PAYMENT_ORDER set PAYMENTSTATE = '1000100110006' where ORDERCODE in(
|
|
'FK0100296377',
|
|
'FK0100296381',
|
|
'FK0100296382',
|
|
'FK0100296383',
|
|
'FK0100296374'
|
|
);
|
|
```
|
|
|
|
### 收款计划
|
|
|
|
```sql
|
|
-- 修改收款单已完成
|
|
select * from WIWJ_SK_PLAN where RELATION_ID = 11267751;
|
|
update WIWJ_SK_PLAN set status = '1000200430010' ,audit_status = '1000900090001' where RELATION_ID = 11267751;
|
|
```
|
|
|
|
## 其他
|
|
|
|
### --承租解约交割单起始数为空,加上数据
|
|
|
|
```sql
|
|
select * from WK_CF_JY_CLEANING_DETAIL where id = 37179868;
|
|
update WK_CF_JY_CLEANING_DETAIL set startnum= 1 where id = 37179868;
|
|
select * from WK_CF_JY_CLEANING_DETAIL jyd
|
|
left join WK_CF_JY_CLEANING_LIST jy on jy.id= jyd.CLEANINGLISTID
|
|
left join WK_CF_JY_TERMINATION jyxy on jyxy.id =jy.TERMINATIONID where jyxy.CONTRACTID=(select id from WK_CF_CONTRACT where LESSEECONTRACTCODE = 'AFCZ11262260ZY');
|
|
```
|
|
|
|
## 接口
|
|
|
|
```
|
|
app签字 V4AppSfContractAction.completeContractSignature
|
|
app附件上传 V4AppSfContractAction.commitAttachMentInfo
|
|
```
|
|
|
|
## 定时
|
|
|
|
指定执行地址 http://10.1.67.76:19999/
|
|
|
|
```
|
|
优选生成付款计划 CreateSfPaymentOrderSchedule.work doCreateSfPaymentOrderScheduleTask
|
|
优选生成招租保证金 CreateRentEarnestMoneySchedule.work doCreateRentEarnestMoneyScheduleTask
|
|
```
|
|
|