Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
34ed876f
Commit
34ed876f
authored
Feb 23, 2022
by
xsh241908
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[宏菱建机]发送催收短信
parent
93dc6f80
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
396 additions
and
0 deletions
+396
-0
reminder_repayment_t5_sms_list.lwm
...INF/classes/sys/SYS403/reminder_repayment_t5_sms_list.lwm
+266
-0
reminder_repayment_t5_sms_loop.lwm
...INF/classes/sys/SYS403/reminder_repayment_t5_sms_loop.lwm
+39
-0
reminder_repayment_t5_sms_list.lsc
...app/modules/sys/SYS403/reminder_repayment_t5_sms_list.lsc
+48
-0
sms_batch_send.lsc
src/main/webapp/modules/sys/SYS403/sms_batch_send.lsc
+43
-0
No files found.
src/main/webapp/WEB-INF/classes/sys/SYS403/reminder_repayment_t5_sms_list.lwm
0 → 100644
View file @
34ed876f
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/classes/sys/SYS403/reminder_repayment_t5_sms_loop.lwm
0 → 100644
View file @
34ed876f
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
xmlns:f=
"leaf.database.features"
alias=
"t1"
baseTable=
"SYS_SMS_LIST"
>
<bm:fields>
<bm:field
name=
"sms_id"
databaseType=
"NUMBER"
datatype=
"java.lang.Long"
physicalName=
"SMS_ID"
prompt=
"SYS_SMS_LIST.SMS_ID"
/>
<bm:field
name=
"sms_date"
databaseType=
"DATE"
datatype=
"java.util.Date"
physicalName=
"SMS_DATE"
prompt=
"SYS_SMS_LIST.SMS_DATE"
/>
<bm:field
name=
"priority"
databaseType=
"NUMBER"
datatype=
"java.lang.Long"
physicalName=
"PRIORITY"
prompt=
"SYS_SMS_LIST.PRIORITY"
/>
<bm:field
name=
"phone_number"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"PHONE_NUMBER"
prompt=
"SYS_SMS_LIST.PHONE_NUMBER"
/>
<bm:field
name=
"text"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"TEXT"
prompt=
"SYS_SMS_LIST.TEXT"
/>
<bm:field
name=
"error_status"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"ERROR_STATUS"
prompt=
"SYS_SMS_LIST.ERROR_STATUS"
/>
<bm:field
name=
"error_msg"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"ERROR_MSG"
prompt=
"SYS_SMS_LIST.ERROR_MSG"
/>
<bm:field
name=
"status"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"STATUS"
prompt=
"SYS_SMS_LIST.STATUS"
/>
<bm:field
name=
"project_id"
databaseType=
"NUMBER"
datatype=
"java.lang.Long"
physicalName=
"PROJECT_ID"
prompt=
"SYS_SMS_LIST.PROJECT_ID"
/>
<bm:field
name=
"contract_number"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"CONTRACT_NUMBER"
prompt=
"SYS_SMS_LIST.CONTRACT_NUMBER"
/>
<bm:field
name=
"bp_name"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"BP_NAME"
prompt=
"SYS_SMS_LIST.BP_NAME"
/>
<bm:field
name=
"sms_type"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"SMS_TYPE"
prompt=
"SYS_SMS_LIST.SMS_TYPE"
/>
<bm:field
name=
"contract_id"
databaseType=
"NUMBER"
datatype=
"java.lang.Long"
physicalName=
"CONTRACT_ID"
prompt=
"SYS_SMS_LIST.CONTRACT_ID"
/>
<bm:field
name=
"batch_id"
databaseType=
"NUMBER"
datatype=
"java.lang.Long"
physicalName=
"BATCH_ID"
prompt=
"SYS_SMS_LIST.BATCH_ID"
/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field
name=
"sms_id"
/>
</bm:primary-key>
<bm:operations>
<bm:operation
name=
"update"
>
<bm:update-sql>
<![CDATA[
begin
hls_payment_msm_send_pkg.after_sys_sms_send_loop(p_sms_id =>
${@sms_id},
p_send_result =>${@result},
p_user_id =>${/session/@user_id});
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter
name=
"query"
enforceOperations=
"query"
expression=
"t1.status = 'NEW' and t1.batch_id=${@batch_id}"
/>
</bm:data-filters>
</bm:model>
src/main/webapp/modules/sys/SYS403/reminder_repayment_t5_sms_list.lsc
0 → 100644
View file @
34ed876f
<?xml version="1.0" encoding="UTF-8"?>
<a:service
xmlns:p=
"uncertain.proc"
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:s=
"leaf.plugin.script"
trace=
"true"
>
<a:init-procedure>
<s:server-script>
<![CDATA[
importPackage(Packages.java.util)
importPackage(Packages.com.hand.hls.hlcm.emay);
importPackage(Packages.com.hand.hap.system.dto)
//step2 发送短信
function sendsms() {
// 查询待发送短信表
var contract_collection = $bm('sys.SYS403.reminder_repayment_t5_sms_list');
contract_collection.update();
var sms_list_bm = $bm('sys.SYS403.reminder_repayment_t5_sms_loop');
var sms_result = sms_list_bm.queryAsMap({
batch_id: $ctx.parameter.batch_id
});
var sms_list_records = sms_result.getChildren();
for (var i = 0; i < sms_list_records.length; i++) {
var Phones = sms_list_records[i].phone_number;
var content = sms_list_records[i].text;
var sms_id = sms_list_records[i].sms_id;
try {
var example = new Example();
var result = example.setSingleSms(content, Phones);
var req_response = result.toString();
} catch (e) {
println("抛出异常:" + e);
}
//发送后请求更新
$bm('sys.SYS403.reminder_repayment_t5_sms_loop').update({
sms_id: sms_id,
result: req_response
});
}
}
sendsms();
]]>
</s:server-script>
</a:init-procedure>
<a:service-output
output=
"/parameter"
/>
</a:service>
\ No newline at end of file
src/main/webapp/modules/sys/SYS403/sms_batch_send.lsc
0 → 100644
View file @
34ed876f
<?xml version="1.0" encoding="UTF-8"?>
<a:service
xmlns:p=
"uncertain.proc"
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:s=
"leaf.plugin.script"
trace=
"true"
>
<a:init-procedure>
<s:server-script>
<![CDATA[
importPackage(Packages.java.util);
importPackage(Packages.com.hand.hls.hlcm.emay);
importPackage(Packages.com.hand.hap.system.dto);
//step2 发送短信
function sendsms() {
// 查询待发送短信表
var sms_list_bm = $bm('sys.SYS403.reminder_repayment_t5_sms_loop');
var sms_list_result = sms_list_bm.queryAsMap({
"batch_id": $ctx.parameter.batch_id
});
var sms_list_records = sms_list_result.getChildren();
for (var i = 0; i < sms_list_records.length; i++) {
var Phones = sms_list_records[i].phone_number;
var content = sms_list_records[i].text;
var sms_id = sms_list_records[i].sms_id;
try {
var example = new Example();
var result = example.setSingleSms(content, Phones);
var req_response = result.toString();
} catch (e) {
println("抛出异常:" + e);
}
//发送后请求更新
$bm('sys.SYS403.reminder_repayment_t5_sms_loop').update({
sms_id: sms_id,
result: req_response
});
}
}
sendsms();
]]>
</s:server-script>
</a:init-procedure>
<a:service-output
output=
"/parameter"
/>
</a:service>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment