Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
lxx_pms
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
游宗学
lxx_pms
Commits
86243c95
提交
86243c95
authored
5月 27, 2020
作者:
游宗学
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
李想乡法大大修改!
上级
09914a6b
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
147 行增加
和
1 行删除
+147
-1
subleaseTemplate.html
...kingWap/View/default/CustomTemplate/subleaseTemplate.html
+0
-0
FddDataLogic.class.php
PHP/Application/Common/Logic/Fdd/FddDataLogic.class.php
+0
-0
SceneServiceModel.class.php
...ion/Common/Model/FinanceScene/SceneServiceModel.class.php
+3
-0
ApiController.class.php
PHP/Application/Fdd/Controller/ApiController.class.php
+14
-0
TemplateController.class.php
PHP/Application/Fdd/Controller/TemplateController.class.php
+130
-1
subleaseTemplate.html
PHP/Htdoc/Upload/ContractHtmlTmplate/subleaseTemplate.html
+0
-0
没有找到文件。
PHP/Application/BookingWap/View/default/CustomTemplate/subleaseTemplate.html
0 → 100644
浏览文件 @
86243c95
差异被折叠。
点击展开。
PHP/Application/Common/Logic/Fdd/FddDataLogic.class.php
浏览文件 @
86243c95
差异被折叠。
点击展开。
PHP/Application/Common/Model/FinanceScene/SceneServiceModel.class.php
浏览文件 @
86243c95
...
...
@@ -27,8 +27,10 @@ class SceneServiceModel extends BaseModel
const
CANCELED
=
'canceling'
;
const
TENANT_AUTH
=
'tenant_auth'
;
const
AHA_STYLE
=
'aha_style'
;
const
SUBLEASE
=
'sublease'
;
// 业务代码名称
public
static
$serviceCodeName
=
[
self
::
SUBLEASE
=>
'转租'
,
self
::
PREORDAIN
=>
'预定'
,
self
::
CONTRACT_FINANCE
=>
'合同账单'
,
self
::
IOUS_FINANCE
=>
'分期账单'
,
...
...
@@ -49,6 +51,7 @@ class SceneServiceModel extends BaseModel
self
::
AHA_STYLE
=>
'阿哈生活'
,
];
public
static
$serviceCodeEnName
=
[
self
::
SUBLEASE
,
self
::
PREORDAIN
,
self
::
CONTRACT_FINANCE
,
self
::
IOUS_FINANCE
,
...
...
PHP/Application/Fdd/Controller/ApiController.class.php
浏览文件 @
86243c95
...
...
@@ -90,6 +90,20 @@ class ApiController extends \Common\Controller\BaseFddController{
// $contract_begin_time,$contract_end_time,$rental,$old_contract_id);
// return $this->ajaxReturn($ret);
}
/**
* @name 签约转租协议
* @version 2020-05-27
* @author yzx
*/
public
function
subleaseData
(){
$post_data
[
'tenant_id'
]
=
I
(
'tenant_id'
,
0
,
'intval'
);
$post_data
[
'room_id'
]
=
I
(
'room_id'
,
0
,
'intval'
);
$post_data
[
'contract_id'
]
=
I
(
'contract_id'
,
0
,
'intval'
);
$post_data
[
'service_code'
]
=
'sublease'
;
$result
=
$this
->
postData
(
$post_data
);
echo
$result
;
}
/**
* @name 发送数据
* @version 2017年12月18日 下午6:42:29
...
...
PHP/Application/Fdd/Controller/TemplateController.class.php
浏览文件 @
86243c95
...
...
@@ -64,6 +64,9 @@ class TemplateController extends BaseFddController
case
'preordain'
:
$template
=
"preordainTemplate"
;
break
;
case
'sublease'
:
$template
=
"subleaseTemplate"
;
break
;
}
$apartment_info
=
$this
->
helper
(
'Contract'
)
->
getApartmentByContract
(
$query_data
[
'contract_id'
],
'apartment_id, company_id'
)[
'data'
];
// 根据场景获取门店模板, 不要上面的模板
...
...
@@ -201,6 +204,9 @@ class TemplateController extends BaseFddController
case
'preordain'
:
$result
=
$this
->
extsignPreordain
(
$query_data_tmp
[
'tenant_id'
],
$query_data_tmp
[
'preordain_id'
],
$query_data_tmp
[
'room_id'
],
$tmp_id
);
break
;
case
'sublease'
:
$result
=
$this
->
extsignSublease
(
$query_data_tmp
[
'tenant_id'
],
$query_data_tmp
[
'contract_id'
],
$tmp_id
);
break
;
}
WL
(
$result
,
'test-sign'
,
1
);
}
...
...
@@ -257,6 +263,13 @@ class TemplateController extends BaseFddController
$jf_data
=
$this
->
logic
(
'Fdd\FddData'
)
->
jfData
(
$apartment_id
,
'preordain'
)[
'data'
];
$preordain_data
=
$this
->
logic
(
'Fdd\FddData'
)
->
preordainData
(
$tenant_id
,
$room_id
,
$preordain_id
)[
'data'
];
$result
=
array_merge
(
$jf_data
,
$preordain_data
);
WL
(
$result
,
"fdd_get_data_res"
,
1
);
break
;
case
'sublease'
:
$jf_data
=
$this
->
logic
(
'Fdd\FddData'
)
->
jfData
(
$apartment_id
,
'sublease'
)[
'data'
];
$sublease_data
=
$this
->
logic
(
'Fdd\FddData'
)
->
subleaseData
(
$contract_id
)[
'data'
];
$result
=
array_merge
(
$jf_data
,
$sublease_data
);
WL
(
$result
,
"fdd_get_data_res"
,
1
);
break
;
}
...
...
@@ -302,7 +315,6 @@ class TemplateController extends BaseFddController
return
RD
(
'[CTL903]获取合同版本错误'
);
}
return
[
'status'
=>
1
,
'message'
=>
'成功'
,
'data'
=>
[
'version_id'
=>
$template_version
[
'data'
][
'version_id'
],
'template_type_name'
=>
$template_type
[
'data'
][
'template_type_name'
],
'other'
=>
$signature_company_info
[
'data'
]]];
return
RD
(
'成功'
,
[
'version_id'
=>
$template_version
[
'data'
][
'version_id'
],
'template_type_name'
=>
$template_type
[
'data'
][
'template_type_name'
],
'other'
=>
$signature_company_info
[
'data'
]],
1
);
}
/**
...
...
@@ -594,4 +606,121 @@ class TemplateController extends BaseFddController
WL
(
'fdd_update_sing'
,
$result
,
1
);
return
RD
(
'签署成功'
,[],
1
);
}
/**
*
* @name 转租签章
* @version 2017年12月15日 下午2:04:40
* @author youzongxue
* @param array $tenant_info
* 租客信息
* @param array $contract_info
* 合同信息
* @param string $tmp_id
* 模板id
* @param array $scene_data
* 公司签章信息
* @return void
*/
public
function
extsignSublease
(
$tenant_id
,
$contract_id
,
$tmp_id
)
{
$contract_where
[
'contract_id'
]
=
[
'eq'
,
$contract_id
];
// 获取合同信息
$contract_info
=
D
(
'Contract'
)
->
where
(
$contract_where
)
->
clearCompanyIdWhere
()
->
find
([],
false
,
false
);
// 获取租客数据
$tenant_info
=
$this
->
helper
(
'Tenant'
)
->
getDateInfoById
(
$tenant_id
);
$third_sign
=
trim
(
$tenant_info
[
'name'
]);
$idcard
=
trim
(
$tenant_info
[
'idcard'
]);
$phone
=
trim
(
$tenant_info
[
'phone'
]);
$ident_type
=
trim
(
$tenant_info
[
'idcard_type'
]);
// 证件类型 0-身份证;1-护照;B-港澳通行证;C-入台证
$scene_where
[
'room_id'
]
=
$contract_info
[
'room_id'
];
$scene_where
[
'version_code'
]
=
'rent'
;
$scene_data
=
$this
->
helper
(
'Fdd\Create'
)
->
getSceneById
(
$scene_where
);
$tenant_id
=
$tenant_info
[
'tenant_id'
];
$result
=
$this
->
helper
(
'Fdd\Contract'
)
->
person
(
$tenant_info
[
'tenant_id'
],
$third_sign
,
$phone
,
$idcard
,
$ident_type
);
if
(
!
$result
)
{
return
RD
(
'person'
);
}
// 生成合同id 用于fadada 不能重复
$contract_number_id
=
strval
(
date
(
'YmdHis'
)
.
str_pad
(
rand
(
10
,
99999
),
5
,
'0'
));
$tenant_info
=
$this
->
helper
(
'Tenant'
)
->
getTenantInfo
(
$tenant_id
);
$third_sign
=
$tenant_info
[
'name'
]
?
$tenant_info
[
'name'
]
:
$tenant_info
[
'phone'
];
$data
[
'template_id'
]
=
$tmp_id
;
$data
[
'contract_id'
]
=
$contract_number_id
;
// 法大大合同id
$data
[
'c_id'
]
=
$contract_info
[
'contract_id'
];
// Lisa合同ID
$data
[
'doc_title'
]
=
'房间合同('
.
$tenant_info
[
'name'
]
.
')'
;
// 合同文档名称
$result
=
$this
->
helper
(
'Fdd\Contract'
)
->
generate
(
$tenant_id
,
$data
,
$contract_number_id
,
2
);
if
(
!
$result
)
{
return
RD
(
'generate'
);
}
// 丙方签名
$transaction_id
=
date
(
'YmdHis'
)
.
str_pad
(
rand
(
0
,
399
),
3
,
'0'
);
$customer_id
=
$this
->
helper
(
'Fdd\UserInfo'
)
->
getUserCaId
(
$tenant_id
);
$result
=
$this
->
helper
(
'Fdd\Contract'
)
->
extsign
(
$contract_number_id
,
$transaction_id
,
$customer_id
,
$third_sign
,
''
,
1
,
3
,
'入住'
);
if
(
!
$result
)
{
return
RD
(
'exsign_first'
);
}
// 甲方签名
if
(
empty
(
$scene_data
[
'data'
]))
{
$first_sign
=
C
(
'ious_second_sign'
);
$customer_id
=
C
(
'ious_second_customer_id'
);
}
else
{
$first_sign
=
$scene_data
[
'data'
][
'company_name'
];
// 甲方客户编号
$customer_id
=
$scene_data
[
'data'
][
'customer_id'
];
}
// ft 调试时, 使用 2018年05月23日18:00:55
if
(
stripos
(
SITE_DOMAIN
,
'eleven'
)
!==
false
)
{
$customer_id
=
C
(
'ious_second_customer_id'
);
}
// 如果没有查到ca证书就不签章
if
(
!
empty
(
$scene_data
[
'data'
]))
{
$transaction_id
=
date
(
'YmdHis'
)
.
str_pad
(
rand
(
399
,
699
),
3
,
'0'
);
$result
=
$this
->
helper
(
'Fdd\Contract'
)
->
extsign
(
$contract_number_id
,
$transaction_id
,
$customer_id
,
$first_sign
,
''
,
1
,
3
,
'入住'
);
WL
(
$result
,
'test-sign'
,
1
);
if
(
!
$result
)
{
return
RD
(
'exsign_second'
);
}
}
// 签名完成归档
$result
=
$this
->
helper
(
'Fdd\Contract'
)
->
filing
(
$contract_number_id
);
if
(
!
$result
)
{
return
RD
(
'exsign_filing'
);
}
$where
[
'contract_id'
]
=
[
'eq'
,
$contract_info
[
'contract_id'
]
];
$where
[
'company_id'
]
=
[
'exp'
,
'!= 0'
];
$save_data
[
'fdd_id'
]
=
$contract_number_id
;
$save_data
[
'is_sign'
]
=
1
;
$save_data
[
'company_id'
]
=
$contract_info
[
'company_id'
];
$_result
=
D
(
'Contract'
)
->
where
(
$where
)
->
data
(
$save_data
)
->
save
();
// 发送短信
$room_info
=
$this
->
helper
(
'Room'
)
->
getDataById
(
$contract_info
[
'room_id'
]);
$phone
=
$tenant_info
[
'phone'
];
$message
=
'乐友,您已签约入住乐乎,登陆APP即可查看电子合同,下载APP:http://dwz.cn/6q6ptA'
;
// 兼容有朋签约
$signature
=
'【乐乎】'
;
$organization_id
=
$this
->
helper
(
'Company'
)
->
getOne
([
'company_id'
=>
$contract_info
[
'company_id'
],
'organization_id'
=>
[
'exp'
,
'!= 0'
]],
'organization_id'
)[
'data'
];
$organization
=
$this
->
helper
(
'Organization'
)
->
getOne
([
'organization_id'
=>
$organization_id
[
'organization_id'
]],
'organization_id, name'
)[
'data'
];
if
(
$organization
[
'organization_id'
]
!=
1
)
{
$message
=
'尊敬的客户,恭喜您已成功办理入住签约!'
;
$signature
=
'【'
.
$organization
[
'name'
]
.
'】'
;
}
$res
=
$this
->
helper
(
'SmsCaptcha'
)
->
sendMessage
(
$phone
,
$message
,
$signature
,
false
,
$room_info
[
'apartment_id'
]
?:
0
);
return
RD
(
'签署成功'
,
$contract_number_id
,
1
);
}
}
PHP/Htdoc/Upload/ContractHtmlTmplate/subleaseTemplate.html
0 → 100644
浏览文件 @
86243c95
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论