Commit 2d5d4935 authored by stone's avatar stone

【fix,feat】租金催收功能修改,邮件接口修改,商业伙伴信息更改

parent 701e80e1
......@@ -4,10 +4,13 @@ import net.sf.json.JSONObject;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sun.applet.Main;
import javax.mail.*;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import java.util.Properties;
public class MailSend {
......@@ -19,7 +22,7 @@ public class MailSend {
return !isEmpty(str);
}
public String sendMain(String jsonData) {
public String sendMain(String jsonData) {
JSONObject jsonObject = JSONObject.fromObject(jsonData);
JSONObject js=new JSONObject();
// 发件人电子邮箱
......@@ -47,7 +50,17 @@ public class MailSend {
MimeMessage message = new MimeMessage(session);
message.addHeader("X-Mailer", "Microsoft Outlook Express 6.00.2900.2869");
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(jsonObject.optString("toAddress")));
//如果含有分号则去掉
//收件人可能有多个
String[] toParams = jsonObject.optString("toAddress").split(";");
if (toParams.length > 0) {
InternetAddress[] sendTo = new InternetAddress[toParams.length];
for (int i = 0; i < toParams.length; i++) {
sendTo[i] = new InternetAddress(toParams[i]);
}
message.addRecipients(Message.RecipientType.TO, sendTo);
}
if (isNotEmpty(jsonObject.optString("toCcAddress"))){
String[] params = jsonObject.optString("toCcAddress").split(";");
if (params.length > 0) {
......@@ -58,7 +71,20 @@ public class MailSend {
message.addRecipients(MimeMessage.RecipientType.CC, sendCc);
}}
message.setSubject(jsonObject.optString("toSubject"));
message.setText(jsonObject.optString("toBody"));
//判断是html格式还是文本格式
if(jsonObject.optString("content_type").equals("text/html")){
BodyPart html = new MimeBodyPart();
Multipart mainPart = new MimeMultipart();
// 设置HTML内容
html.setContent(jsonObject.optString("toBody"), "text/html; charset=utf-8");
mainPart.addBodyPart(html);
// 将MiniMultipart对象设置为邮件内容
message.setContent(mainPart);
}else {
message.setText(jsonObject.optString("toBody"));
}
Transport.send(message);
logger.info("send Success!");
js.put("status",'S');
......@@ -71,11 +97,24 @@ return js.toString();
}
// 做测试用
/**
* 测试邮件是否能正常发送
*/
@Test
public void test() {
MailSend mailSend=new MailSend();
//MailSend.sendMain("790553035@qq.com");
JSONObject jb=new JSONObject();
jb.put("serverHost","smtp.partner.outlook.cn");
jb.put("serverPort","587");
jb.put("serverName","kenki_system@hongling.sh.cn");
jb.put("serverPassWord","KenkiSYS2019");
jb.put("serverAddress","kenki_system@hongling.sh.cn");
jb.put("toAddress","1174795617@qq.com");
jb.put("toCcAddress","");
jb.put("toSubject","123");
jb.put("toBody","<span style=\"white-space:nowrap;\">复制测试最后一百年</span>");
jb.put("content_type","text/html");
mailSend.sendMain(jb.toString());
}
}
......@@ -237,7 +237,9 @@ SELECT h.extra_nam,
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item IN (1, 200, 250)
AND trunc(ccc.due_date) <=
TRUNC(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')))
trunc(comparedate(p_date1 => last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
p_date2 =>sysdate ,
p_type =>'SMALL'))
AND ccc.cf_status = 'RELEASE'),
0) -
nvl((SELECT SUM(cwo.write_off_due_amount)
......@@ -247,14 +249,18 @@ SELECT h.extra_nam,
AND cwo.csh_transaction_id = ct.transaction_id
AND nvl(cwo.reversed_flag, 'N') = 'N'
AND trunc(ct.transaction_date) <=
TRUNC(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')))),
trunc(comparedate(p_date1 => last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
p_date2 =>sysdate ,
p_type =>'SMALL'))),
0)) > 0 THEN
(nvl((SELECT SUM(nvl(ccc.due_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item IN (1, 200, 250)
AND trunc(ccc.due_date) <=
TRUNC(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')))
trunc(comparedate(p_date1 => last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
p_date2 =>sysdate ,
p_type =>'SMALL'))
AND ccc.cf_status = 'RELEASE'),
0) - nvl((SELECT SUM(cwo.write_off_due_amount)
FROM csh_write_off cwo, csh_transaction ct
......@@ -263,13 +269,17 @@ SELECT h.extra_nam,
AND cwo.csh_transaction_id = ct.transaction_id
AND nvl(cwo.reversed_flag, 'N') = 'N'
AND trunc(ct.transaction_date) <=
TRUNC(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')))),
trunc(comparedate(p_date1 => last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
p_date2 =>sysdate ,
p_type =>'SMALL'))),
0))
ELSE
0
END) rest_overdue_amount,
contract_item_query_pkg.calc_overdue_amount_by_dudt(p_contract_id => t.contract_id,
p_calc_date => last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
p_calc_date =>comparedate(p_date1 => last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
p_date2 =>sysdate ,
p_type =>'SMALL'),
p_user_id => -1) rest_overdue_amount_af,
--逾期违约金
(contract_item_query_pkg.calc_penalty_by_contract(p_contract_id => t.contract_id,
......@@ -303,46 +313,16 @@ SELECT h.extra_nam,
AND NVL(tt.reversed_flag,'N')='N'
and tt.ref_contract_id = T.contract_id),0) deposit_amount,
--逾期期数
nvl2((SELECT MIN(ccc.due_date)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item IN (1, 200, 250)
AND ccc.cf_status = 'RELEASE'
AND trunc(ccc.due_date) <=
TRUNC(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')))
AND ccc.due_amount >
nvl((SELECT SUM(cwo.write_off_due_amount)
FROM csh_write_off cwo, csh_transaction ct
WHERE cwo.cashflow_id = ccc.cashflow_id
AND nvl(cwo.reversed_flag, 'N') = 'N'
AND cwo.csh_transaction_id = ct.transaction_id
AND trunc(ct.transaction_date) <=
TRUNC(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')))),
0)),
ceil(months_between(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
(SELECT MIN(ccc.due_date)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item IN (1, 200, 250)
AND ccc.cf_status = 'RELEASE'
AND trunc(ccc.due_date) <=
TRUNC(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')))
AND ccc.due_amount >
nvl((SELECT SUM(cwo.write_off_due_amount)
FROM csh_write_off cwo,
csh_transaction ct
WHERE cwo.cashflow_id =
ccc.cashflow_id
AND nvl(cwo.reversed_flag, 'N') = 'N'
AND cwo.csh_transaction_id =
ct.transaction_id
AND trunc(ct.transaction_date) <=
TRUNC(last_day(to_date(${@start_calc_date},'yyyy-mm-dd')))),
0)))),
0) overdue_times_be,
contract_item_query_pkg.calc_business_overdue_times(p_contract_id =>t.contract_id ,
p_calc_date => comparedate(p_date1 => last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
p_date2 =>sysdate ,
p_type =>'SMALL'),
p_user_id => -1)overdue_times_be,
--保证金后逾期期数
contract_item_query_pkg.calc_overdue_times_by_dudt(p_contract_id =>t.contract_id ,
p_calc_date =>last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
contract_item_query_pkg.calc_overdue_times_by_dudt(p_contract_id =>t.contract_id ,
p_calc_date =>comparedate(p_date1 => last_day(to_date(${@start_calc_date},'yyyy-mm-dd')),
p_date2 =>sysdate ,
p_type =>'SMALL'),
p_user_id => -1)overdue_times_af
FROM con_contract t, hls_bp_master h
WHERE t.data_class = 'NORMAL'
......
......@@ -63,7 +63,14 @@
floor(to_date(${@last_month_date}, 'yyyy-mm-dd') - ccc.due_date)
ELSE
0
END) overdue_days
END) overdue_days,
NVL((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND NVL(tt.reversed_flag,'N')='N'
and tt.ref_contract_id = T.contract_id),0) deposit_amount
FROM con_contract_cashflow ccc,
con_contract t,
con_contract_lease_item ccli
......@@ -77,7 +84,7 @@
AND ((trunc(t.lease_start_date) <=
trunc(to_date(${@last_month_date}, 'yyyy-mm-dd')) AND
t.contract_status = 'INCEPT') OR
(to_char(t.et_date, 'yyyy-mm') = ${@period_name} AND
(to_char(t.et_date, 'yyyy-mm') >= ${@period_name} AND
t.contract_status = 'TERMINATE'))
AND ccc.due_amount >
nvl((SELECT SUM(cwo.write_off_due_amount)
......
......@@ -11,7 +11,7 @@
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT cc.contract_id,
cc.contract_name,
--cc.contract_name,
(SELECT pp.project_number
FROM prj_project pp
WHERE pp.project_id = cc.project_id) project_number,
......@@ -84,7 +84,7 @@
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = cc.contract_id
AND ccc.overdue_status = 'Y'
AND ccc.cf_item IN (1, 8)
AND ccc.cf_item IN (1, 8,250)
AND ccc.write_off_flag <> 'FULL') business_due_amount, --营业逾期总金额
(SELECT SUM(ccc.due_amount - nvl(ccc.received_amount, 0))
......@@ -110,7 +110,7 @@
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = cc.contract_id
AND ccc.cf_item IN (1, 8, 250)
AND trunc(ccc.due_date) <= trunc(SYSDATE)) business_unreceived_amount,
) business_unreceived_amount,
--会计已收租金
nvl((SELECT SUM(nvl(gwo.write_off_amount, 0))
FROM gld_write_off gwo
......@@ -124,7 +124,7 @@
WHERE ccc.contract_id = cc.contract_id
AND ccc.cf_status = 'RELEASE'
AND ccc.cf_item IN (1, 8, 250)
AND trunc(ccc.due_date) <= trunc(SYSDATE)) -
) -
nvl((SELECT SUM(nvl(gwo.write_off_amount, 0))
FROM gld_write_off gwo
WHERE gwo.reversed_flag = 'N'
......@@ -147,7 +147,7 @@
WHERE ccc.contract_id = cc.contract_id
AND ccc.cf_status = 'RELEASE'
AND ccc.cf_item IN (1, 8, 250)
AND trunc(ccc.due_date) <= trunc(SYSDATE)) total_due_amount,
) total_due_amount,
cc.contract_status
FROM con_contract cc
......@@ -171,7 +171,6 @@
nvl(a2.end_date, trunc(SYSDATE))))) t1
#WHERE_CLAUSE#
]]>
......@@ -182,7 +181,7 @@
<bm:query-field name="contract_number"
queryExpression="contract_number like ${@contract_number}"/>
<bm:query-field name="bp_id_tenant" queryExpression="t1.bp_id_tenant = ${@bp_id_tenant}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name} "/>
<!-- <bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name} "/>-->
<bm:query-field name="project_number" queryExpression="t1.project_number like ${@project_number}"/>
<!--<bm:query-field name="bp_id_tenant_desc" queryExpression="t1.bp_id_tenant_desc like ${@bp_id_tenant_desc}"/>-->
<bm:query-field name="bp_id_agent_desc" queryExpression="t1.bp_id_agent_desc like ${@bp_id_agent_desc}"/>
......
......@@ -22,8 +22,9 @@
url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_special.lview"/>
<a:link id="car_modify_mananger_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_manager.lview"/>
<a:link id="car_modify_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>
<!-- <a:link id="car_modify_link"-->
<!-- url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>-->
<a:link id="car_modify_link_readonly" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="car_modify_special_link"
url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create.lview"/>
<a:link id="${/parameter/@layout_code}_contract_print_link_id"
......@@ -72,7 +73,7 @@
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_link', ds_id);
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'car_modify_link_readonly', ds_id);
}
......
......@@ -259,56 +259,60 @@
<a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/>
<a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/>
<a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/>
<a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数从" allowDecimals="false"/>
<a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数到" allowDecimals="false"/>
<a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数从" allowDecimals="false"/>
<a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数到" allowDecimals="false"/>
<a:numberField name="business_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额从"/>
<a:numberField name="business_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额到"/>
<a:numberField id="account_due_times_from_id" name="account_due_times_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数从" allowDecimals="false"/>
<a:numberField id="account_due_times_to_id" name="account_due_times_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数到" allowDecimals="false"/>
<a:numberField id="account_due_days_from_id" name="account_due_days_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数从" allowDecimals="false"/>
<a:numberField id="account_due_days_to_id" name="account_due_days_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数到" allowDecimals="false"/>
<a:numberField id="account_due_amount_from_id" name="account_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额从"/>
<a:numberField id="account_due_amount_to_id" name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额到"/>
<a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds" prompt="逾期期数(营业)从" allowDecimals="false"/>
<a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds" prompt="逾期期数(营业)到" allowDecimals="false"/>
<a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds" prompt="逾期天数(营业)从" allowDecimals="false"/>
<a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds" prompt="逾期天数(营业)到" allowDecimals="false"/>
<a:numberField name="business_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="逾期金额(营业)从"/>
<a:numberField name="business_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="逾期金额(营业)到"/>
<a:numberField id="account_due_times_from_id" name="account_due_times_from" bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)从" allowDecimals="false"/>
<a:numberField id="account_due_times_to_id" name="account_due_times_to" bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)到" allowDecimals="false"/>
<a:numberField id="account_due_days_from_id" name="account_due_days_from" bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)从" allowDecimals="false"/>
<a:numberField id="account_due_days_to_id" name="account_due_days_to" bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)到" allowDecimals="false"/>
<a:numberField id="account_due_amount_from_id" name="account_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)从"/>
<a:numberField id="account_due_amount_to_id" name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)到"/>
</a:form>
<a:grid id="CON601_con_contract_grid_ds" bindTarget="CON620_contract_result_ds" marginHeight="100"
marginWidth="30" navBar="true" height="1000">
<a:columns>
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" lock="true" width="100"/>
<a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER"
renderer="CON620_render_contract_dun_grid" width="100"/>
<a:column name="contract_name" align="center"
prompt="合同名称" width="120"/><!--<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" renderer="CON620_render_contract_dun_grid" showTitle="true" width="210"/>-->
<!-- <a:column name="contract_name" align="center"-->
<!-- prompt="合同名称" width="120"/>-->
<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" showTitle="true" width="100"
align="center"/>
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" width="100"/>
<a:column name="min_overdue_date" align="center" prompt="预定支付日" width="100" renderer="Leaf.formatDate"/>
<a:column name="business_due_times" align="center" prompt="逾期期数(营业)"
<a:column prompt="营业">
<a:column name="business_due_times" align="center" prompt="逾期期数"
width="100"/>
<a:column name="business_due_days" align="center" prompt="逾期天数(营业)"
<a:column name="business_due_days" align="center" prompt="逾期天数"
width="100"/>
<a:column name="business_due_amount" align="right" prompt="逾期金额(营业)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
<a:column name="business_due_amount" align="right" prompt="逾期金额" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="over_due_amount" align="right" prompt="违约金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_received_amount" align="right" prompt="已收租金(营业)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
<a:column name="business_received_amount" align="right" prompt="已收租金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_unreceived_amount" align="right" prompt="未收租金(营业)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
<a:column name="business_unreceived_amount" align="right" prompt="未收租金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="account_due_times" align="center" prompt="逾期期数(会计)"
</a:column>
<a:column prompt="会计">
<a:column name="account_due_times" align="center" prompt="逾期期数"
width="100"/>
<a:column name="account_due_days" align="center" prompt="逾期天数(会计)"
<a:column name="account_due_days" align="center" prompt="逾期天数"
width="100"/>
<a:column name="account_due_amount" align="right" prompt="逾期金额(会计)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
<a:column name="account_due_amount" align="right" prompt="逾期金额" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="ac_received_amount" align="right" prompt="已收租金(会计)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
<a:column name="ac_received_amount" align="right" prompt="已收租金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="ac_unreceived_amount" align="right" prompt="未收租金(会计)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
<a:column name="ac_unreceived_amount" align="right" prompt="未收租金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
</a:column>
<a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60" footerRenderer="summaryRenderer"/>
<a:column name="modelcd" align="center" prompt="机型" width="100"/>
......
......@@ -515,18 +515,24 @@
// record.set('resident_addres_sp', get_native_place(value))
// }
// }
if (name == 'marital_status') {
if (value == '30') {
record.getField('bp_name_sp').setRequired(true);
record.getField('card_type_sp_n').setRequired(true);
record.getField('id_no_sp').setRequired(true);
// var bp_spouse_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE', 'hls_bp_master');
// if(ds.id==bp_spouse_ds&&bp_spouse_ds){
// if (name == 'marital_status') {
// console.log(value);
// debugger
// if (value == '30') {
// record.getField('bp_name_sp').setRequired(true);
// record.getField('card_type_sp_n').setRequired(true);
// record.getField('id_no_sp').setRequired(true);
//
// } else {
// record.getField('bp_name_sp').setRequired(false);
// record.getField('card_type_sp_n').setRequired(false);
// record.getField('id_no_sp').setRequired(false);
// }
// }
// }
} else {
record.getField('bp_name_sp').setRequired(false);
record.getField('card_type_sp_n').setRequired(false);
record.getField('id_no_sp').setRequired(false);
}
}
};
......
......@@ -35,7 +35,8 @@
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id"
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/>
<a:link id="${/parameter/@layout_code}contract_number_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
......@@ -231,6 +232,17 @@
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
function prj501n_contract_number_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
param['contract_id'] = record.get('contract_id');
param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}contract_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
function prj501n_bp_code_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
......@@ -282,6 +294,9 @@
link_function = 'prj501n_bp_code_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
}else if (name == 'contract_number') {
link_function = 'prj501n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}
};
......
......@@ -14,7 +14,8 @@
<a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="prj_project_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_create_tree_n.lview"/>
<a:link id="prj_project_bp_parameter_link" url="${/request/@context_path}/modules/prj/PRJ501/prj_project_bp_parameter.lview"/>
<a:link id="car_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>
<!-- <a:link id="car_modify_link_readonly" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>-->
<a:link id="car_modify_link_readonly" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="car_modify_mananger_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_manager.lview"/>
<a:link id="prj_project_close_link_id" model="prj.PRJ501.prj_project_close" modelaction="update"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_special.lview"/>
......@@ -35,7 +36,7 @@
param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id);
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link_readonly', ds_id);
}
......
......@@ -5,43 +5,44 @@
xmlns:mail="leaf.plugin.mail" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<s:server-script><![CDATA[
importPackage(java.io);
importPackage(Packages.com.hand.hls.hlcm.util);
importPackage(java.io);
importPackage(Packages.com.hand.hls.hlcm.util);
try {
try {
var mail_server_bm = $bm('sys.SYS405.sys_get_mail_server');
var mail_server_result = mail_server_bm.queryAsMap().getChildren();
var mail_list_bm = $bm('sys.SYS405.zj_sys_mailing_list');
var mail_list_result = mail_list_bm.queryAsMap().getChildren();
for (var i = 0; i < mail_list_result.length; i++) {
var jsonString ={
serverHost:mail_server_result[0].mail_smtp_host, // 设置SMTP主机(163),若用126,则设为:smtp.126.com
serverPort:mail_server_result[0].mail_port_number, //设置端口号
serverName:mail_server_result[0].mail_username, // 设置发件人邮箱的用户名
serverPassWord:mail_server_result[0].mail_password,// 设置发件人邮箱的密码
serverAddress:mail_server_result[0].mail_address,// 设置发件人的邮箱
toAddress:mail_list_result[i].mail_to,// 设置收件人的邮箱
toCcAddress:mail_list_result[i].mail_cc,//设置抄送人的邮箱
toSubject:mail_list_result[i].subject,// 设置邮件的主题
toBody:mail_list_result[i].body // 设置邮件的正文
};
var sm = new MailSend();
var stringResult = sm.sendMain(JSON.stringify(jsonString));//调用接口
var ob = JSON.parse(stringResult);//将接口返回的string字符串解析成对象
if (ob.status=='S') {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
serverHost:mail_server_result[0].mail_smtp_host, // 设置SMTP主机(163),若用126,则设为:smtp.126.com
serverPort:mail_server_result[0].mail_port_number, //设置端口号
serverName:mail_server_result[0].mail_username, // 设置发件人邮箱的用户名
serverPassWord:mail_server_result[0].mail_password,// 设置发件人邮箱的密码
serverAddress:mail_server_result[0].mail_address,// 设置发件人的邮箱
toAddress:mail_list_result[i].mail_to,// 设置收件人的邮箱
toCcAddress:mail_list_result[i].mail_cc,//设置抄送人的邮箱
toSubject:mail_list_result[i].subject,// 设置邮件的主题
toBody:mail_list_result[i].body, // 设置邮件的正文
content_type:mail_list_result[i].content_type
};
var sm = new MailSend();
var stringResult = sm.sendMain(JSON.stringify(jsonString));//调用接口
var ob = JSON.parse(stringResult);//将接口返回的string字符串解析成对象
if (ob.status=='S') {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
} catch (e) {
}
} catch (e) {
raise_app_error(e);
}
]]></s:server-script>
}
]]></s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
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