Commit e0292fd7 authored by niminmin's avatar niminmin

[feat]短信接口开发,售后回租报表修改

parent 3f2098df
package com.hand.hls.hlcm.emay;
import com.hand.hls.hlcm.emay.eucp.inter.framework.dto.CustomSmsIdAndMobile;
import com.hand.hls.hlcm.emay.eucp.inter.framework.dto.CustomSmsIdAndMobileAndContent;
import com.hand.hls.hlcm.emay.eucp.inter.framework.dto.PersonalityParams;
import com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request.*;
import com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response.BalanceResponse;
import com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response.MoResponse;
import com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response.ReportResponse;
import com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response.SmsResponse;
import com.hand.hls.hlcm.emay.util.AES;
import com.hand.hls.hlcm.emay.util.GZIPUtils;
import com.hand.hls.hlcm.emay.util.JsonHelper;
import com.hand.hls.hlcm.emay.util.http.*;
import jodd.util.PropertiesUtil;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
public class Example {
private static Logger logger = LoggerFactory.getLogger(Example.class);
// @Value("${emay.appId:EUCP-EMY-SMS0-JBZOQ}")
private String appId;
// @Value("${emay.secretKey:3E6BA3366DCF8959}")
private String secretKey;
// @Value("${emay.host}")
private String host;
public static void main(String[] args) {
// appId
// String appId = "EUCP-EMY-SMS0-JBQNM";// 请联系销售,或者在页面中 获取
// // 密钥
// Stri ng secretKey = "9ACAFA95F9AE2DEE";// 请联系销售,或者在页面中 获取
// // 接口地址
// String host = "bjmtn.b2m.cn:80";// 请联系销售获取
// // 加密算法
// String algorithm = "AES/ECB/PKCS5Padding";
// // 编码
// String encode = "UTF-8";
// 是否压缩
boolean isGizp = false;
// appId
String appId = "EUCP-EMY-SMS0-JBZOQ";// 请联系销售,或者在页面中 获取
// 密钥
String secretKey = "3E6BA3366DCF8959";// 请联系销售,或者在页面中 获取
// 接口地址
String host = "bjmtn.b2m.cn:80";// 请联系销售获取
// 加密算法
String algorithm = "AES/ECB/PKCS5Padding";
// 编码
String encode = "UTF-8";
// 获取余额
// getBalance(appId, secretKey, host, algorithm, isGizp, encode);
// // 获取状态报告
// getReport(appId, secretKey, host, algorithm, isGizp, encode);
// // 获取上行
// getMo(appId, secretKey, host, algorithm, isGizp, encode);
// // 发送单条短信
// setSingleSms(appId, secretKey, host, algorithm, "【某某公司】您的验证码是123",
// null, null, "12100000000", isGizp,
// encode);//短信内容请以商务约定的为准,如果已经在通道端绑定了签名,则无需在这里添加签名
// // // 发送批次短信[有自定义SMSID]
// setBatchSms(appId, secretKey, host, algorithm, "【某某公司】您的验证码是123",
// null,
// new CustomSmsIdAndMobile[] { new CustomSmsIdAndMobile("1",
// "12100000000"), new CustomSmsIdAndMobile("2", "12100000000") },
// isGizp, encode);
// // // 发送批次短信[无自定义SMSID]
// setBatchOnlySms(appId, secretKey, host, algorithm, "【某某公司】您的验证码是123",
// null, new String[] { "12100000000", "12100000001" }, isGizp, encode);
// // // 发送个性短信
// setPersonalitySms(appId, secretKey, host, algorithm, null, new
// CustomSmsIdAndMobileAndContent[] { new
// CustomSmsIdAndMobileAndContent("1", "12100000000",
// "【某某公司】您的验证码是123"),
// new CustomSmsIdAndMobileAndContent("2", "12100000001",
// "【某某公司】您的验证码是123") }, isGizp, encode);
// // // 发送全个性短信
// setPersonalityAllSms(appId, secretKey, host, algorithm, new
// PersonalityParams[] { new PersonalityParams("101", "12100000000",
// "【天气不错0", "01", null),
// new PersonalityParams("102", "12100000001", "天气不错1", "02", null) },
// isGizp, encode);
Example example = new Example();
String a = example.setSingleSms("Testsms", "18225695917");//18225695917
}
/**
* 获取余额
*
* @param isGzip 是否压缩
*/
private static void getBalance(String appId, String secretKey, String host, String algorithm, boolean isGzip,
String encode) {
System.out.println("=============begin getBalance==================");
BalanceRequest pamars = new BalanceRequest();
ResultModel result = request(appId, secretKey, algorithm, pamars, host + "/inter/getBalance", isGzip, encode);
System.out.println("result code :" + result.getCode());
if ("SUCCESS".equals(result.getCode())) {
BalanceResponse response = JsonHelper.fromJson(BalanceResponse.class, result.getResult());
if (response != null) {
System.out.println("result data : " + response.getBalance());
}
}
System.out.println("=============end getBalance==================");
}
/**
* 获取状态报告
*
* @param isGzip 是否压缩
*/
private static void getReport(String appId, String secretKey, String host, String algorithm, boolean isGzip,
String encode) {
System.out.println("=============begin getReport==================");
ReportRequest pamars = new ReportRequest();
ResultModel result = request(appId, secretKey, algorithm, pamars, host + "/inter/getReport", isGzip, encode);
System.out.println("result code :" + result.getCode());
if ("SUCCESS".equals(result.getCode())) {
ReportResponse[] response = JsonHelper.fromJson(ReportResponse[].class, result.getResult());
if (response != null) {
for (ReportResponse d : response) {
System.out.println("result data : " + d.getExtendedCode() + "," + d.getMobile() + ","
+ d.getCustomSmsId() + "," + d.getSmsId() + "," + d.getState() + "," + d.getDesc() + ","
+ d.getSubmitTime() + "," + d.getReceiveTime());
}
}
}
System.out.println("=============end getReport==================");
}
/**
* 获取上行
*
* @param isGzip 是否压缩
*/
private static void getMo(String appId, String secretKey, String host, String algorithm, boolean isGzip,
String encode) {
System.out.println("=============begin getMo==================");
MoRequest pamars = new MoRequest();
ResultModel result = request(appId, secretKey, algorithm, pamars, host + "/inter/getMo", isGzip, encode);
System.out.println("result code :" + result.getCode());
if ("SUCCESS".equals(result.getCode())) {
MoResponse[] response = JsonHelper.fromJson(MoResponse[].class, result.getResult());
if (response != null) {
for (MoResponse d : response) {
System.out.println("result data:" + d.getContent() + "," + d.getExtendedCode() + "," + d.getMobile()
+ "," + d.getMoTime());
}
}
}
System.out.println("=============end getMo==================");
}
/**
* 发送批次短信
*
* @param isGzip 是否压缩
*/
private static void setBatchOnlySms(String appId, String secretKey, String host, String algorithm, String content,
String extendCode, String[] mobiles, boolean isGzip, String encode) {
System.out.println("=============begin setBatchOnlySms==================");
SmsBatchOnlyRequest pamars = new SmsBatchOnlyRequest();
pamars.setMobiles(mobiles);
pamars.setExtendedCode(extendCode);
pamars.setContent(content);
ResultModel result = request(appId, secretKey, algorithm, pamars, host + "/inter/sendBatchOnlySMS", isGzip,
encode);
System.out.println("result code :" + result.getCode());
if ("SUCCESS".equals(result.getCode())) {
SmsResponse[] response = JsonHelper.fromJson(SmsResponse[].class, result.getResult());
if (response != null) {
for (SmsResponse d : response) {
System.out.println("data:" + d.getMobile() + "," + d.getSmsId() + "," + d.getCustomSmsId());
}
}
}
System.out.println("=============end setBatchOnlySms==================");
}
/**
* 发送批次短信
*
* @param isGzip 是否压缩
*/
private static void setBatchSms(String appId, String secretKey, String host, String algorithm, String content,
String extendCode, CustomSmsIdAndMobile[] customSmsIdAndMobiles, boolean isGzip, String encode) {
System.out.println("=============begin setBatchSms==================");
SmsBatchRequest pamars = new SmsBatchRequest();
pamars.setSmses(customSmsIdAndMobiles);
pamars.setExtendedCode(extendCode);
pamars.setContent(content);
ResultModel result = request(appId, secretKey, algorithm, pamars, host + "/inter/sendBatchSMS", isGzip, encode);
System.out.println("result code :" + result.getCode());
if ("SUCCESS".equals(result.getCode())) {
SmsResponse[] response = JsonHelper.fromJson(SmsResponse[].class, result.getResult());
if (response != null) {
for (SmsResponse d : response) {
System.out.println("data:" + d.getMobile() + "," + d.getSmsId() + "," + d.getCustomSmsId());
}
}
}
System.out.println("=============end setBatchSms==================");
}
/**
* 发送个性短信
*
* @param isGzip 是否压缩
*/
private static void setPersonalitySms(String appId, String secretKey, String host, String algorithm,
String extendCode, CustomSmsIdAndMobileAndContent[] customSmsIdAndMobileAndContents, boolean isGzip,
String encode) {
System.out.println("=============begin setPersonalitySms==================");
SmsPersonalityRequest pamars = new SmsPersonalityRequest();
pamars.setSmses(customSmsIdAndMobileAndContents);
pamars.setExtendedCode(extendCode);
ResultModel result = request(appId, secretKey, algorithm, pamars, host + "/inter/sendPersonalitySMS", isGzip,
encode);
System.out.println("result code :" + result.getCode());
if ("SUCCESS".equals(result.getCode())) {
SmsResponse[] response = JsonHelper.fromJson(SmsResponse[].class, result.getResult());
if (response != null) {
for (SmsResponse d : response) {
System.out.println("data:" + d.getMobile() + "," + d.getSmsId() + "," + d.getCustomSmsId());
}
}
}
System.out.println("=============end setPersonalitySms==================");
}
/**
* 发送个性短信
*
* @param isGzip 是否压缩
*/
private static void setPersonalityAllSms(String appId, String secretKey, String host, String algorithm,
PersonalityParams[] customSmsIdAndMobileAndContents, boolean isGzip, String encode) {
System.out.println("=============begin setPersonalityAllSms==================");
SmsPersonalityAllRequest pamars = new SmsPersonalityAllRequest();
pamars.setSmses(customSmsIdAndMobileAndContents);
ResultModel result = request(appId, secretKey, algorithm, pamars, host + "/inter/sendPersonalityAllSMS", isGzip,
encode);
System.out.println("result code :" + result.getCode());
if ("SUCCESS".equals(result.getCode())) {
SmsResponse[] response = JsonHelper.fromJson(SmsResponse[].class, result.getResult());
if (response != null) {
for (SmsResponse d : response) {
System.out.println("data:" + d.getMobile() + "," + d.getSmsId() + "," + d.getCustomSmsId());
}
}
}
System.out.println("=============end setPersonalityAllSms==================");
}
/**
* 公共请求方法
*/
public static ResultModel request(String appId, String secretKey, String algorithm, Object content, String url,
final boolean isGzip, String encode) {
Map<String, String> headers = new HashMap<String, String>();
HttpRequest<byte[]> request = null;
try {
headers.put("appId", appId);
headers.put("encode", encode);
String requestJson = JsonHelper.toJsonString(content);
byte[] bytes = requestJson.getBytes(encode);
if (isGzip) {
headers.put("gzip", "on");
bytes = GZIPUtils.compress(bytes);
}
byte[] parambytes = AES.encrypt(bytes, secretKey.getBytes(), algorithm);
HttpRequestParams<byte[]> params = new HttpRequestParams<byte[]>();
params.setCharSet("UTF-8");
params.setMethod("POST");
params.setHeaders(headers);
params.setParams(parambytes);
params.setUrl(url);
if (url.startsWith("https://")) {
request = new HttpsRequestBytes(params, null);
} else {
request = new HttpRequestBytes(params);
}
} catch (Exception e) {
logger.error("加密异常", e);
}
HttpClient client = new HttpClient();
String code = null;
String result = null;
try {
HttpResponseBytes res = client.service(request, new HttpResponseBytesPraser());
if (res == null) {
logger.info("请求接口异常");
code = "FAIL";
result = "请求接口异常";
return new ResultModel(code, result);
}
if (res.getResultCode().equals(HttpResultCode.SUCCESS)) {
if (res.getHttpCode() == 200) {
code = res.getHeaders().get("result");
if (code.equals("SUCCESS")) {
byte[] data = res.getResult();
data = AES.decrypt(data, secretKey.getBytes(), algorithm);
if (isGzip) {
data = GZIPUtils.decompress(data);
}
result = new String(data, encode);
logger.info("response json: " + result);
} else {
code = "FAIL";
result = res.getHeaders().get("result");
}
} else {
logger.error("请求接口异常,请求码:" + res.getHttpCode());
code = "FAIL";
result = "请求接口异常";
}
} else {
logger.error("请求接口网络异常:" + res.getResultCode().getCode());
code = "FAIL";
result = "请求接口异常";
}
} catch (Exception e) {
logger.error("解析失败", e);
code = "FAIL";
result = e.getMessage();
}
ResultModel re = new ResultModel(code, result);
return re;
}
public String setSingleSms(String content, String mobile) {
JSONObject jsonObject = new JSONObject();
try {
Properties properties = new Properties();
InputStream is = PropertiesUtil.class.getClassLoader()
.getResourceAsStream("config.properties");
properties.load(is);
appId = properties.getProperty("emay.appId");
secretKey = properties.getProperty("emay.secretKey");
host = properties.getProperty("emay.host");
} catch (Exception e) {
logger.error("读取配置文件失败", e);
jsonObject.put("code","FALSE");
jsonObject.put("result", "get config error");
}
logger.info("=============begin setSingleSms==================");
logger.info("=============appid==================" + appId);
SmsSingleRequest pamars = new SmsSingleRequest();
pamars.setContent(content);
// pamars.setCustomSmsId("1");
// pamars.setExtendedCode(extendCode);
pamars.setMobile(mobile);
ResultModel result = request(appId, secretKey, "AES/ECB/PKCS5Padding", pamars,
"http://" + host + "/inter/sendSingleSMS", false, "UTF-8");
// if ("SUCCESS".equals(result.getCode())) {
// SmsResponse response = JsonHelper.fromJson(SmsResponse.class, result.getResult());
// if (response != null) {
// logger.info("data : " + result.getCode() + "," + response.getMobile() + "," + response.getSmsId()
// + "," + response.getCustomSmsId());
// }
// }
jsonObject.put("code", result.getCode());
jsonObject.put("result", result.getResult());
logger.info(jsonObject.toString());
return jsonObject.toString();
// if ("SUCCESS".equals(result.getCode())) {
// return "SUCCESS";
// } else {
// return "FAIL";
// }
}
}
package com.hand.hls.hlcm.emay;
public class ResultModel {
private String code;
private String result;
public ResultModel(String code, String result) {
this.code = code;
this.result = result;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
}
package com.hand.hls.hlcm.emay;
import com.hand.hls.hlcm.emay.util.DateUtil;
import com.hand.hls.hlcm.emay.util.Md5;
import com.hand.hls.hlcm.emay.util.http.*;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class RetrieveReportExample {
public static void main(String[] args) {
// appId
String appId = "EUCe-EMt-SMS9-XXXXX";// 请联系销售,或者在页面中 获取
// 密钥
String secretKey = "1234567893214567";// 请联系销售,或者在页面中 获取
// 接口地址
String host = "127.0.0.1:8999";// 请联系销售获取
// 编码
String encode = "UTF-8";
// 时间戳
String timestamp = DateUtil.toString(new Date(), "yyyyMMddHHmmss");
// 签名
String sign = Md5.md5((appId + secretKey + timestamp).getBytes());
String startTime = "20170101120000";
String endTime = "20170101120000";
String smsId = "123123123,321321321";
getReport(appId, host, encode, timestamp, sign, startTime, endTime, smsId);
}
/**
* 获取状态报告
*/
private static void getReport(String appId, String host, String encode,// 时间戳
String timestamp, String sign, String startTime, String endTime, String smsId) {
System.out.println("=============begin getReport==================");
Map<String, String> params = new HashMap<String, String>();
params.put("appId", appId);
params.put("timestamp", timestamp);
params.put("sign", sign);
params.put("startTime", startTime);
params.put("endTime", endTime);
if (null != smsId && !"".equals(smsId)) {
params.put("smsId", smsId);
}
String url = "http://" + host + "/report/retrieveReport";
String result = request(params, url);
System.out.println(result);
System.out.println("=============end getReport==================");
}
/**
* 公共请求方法
*/
public static String request(Map<String, String> params, String url) {
HttpRequestParams<Map<String, String>> requestparams = new HttpRequestParams<Map<String, String>>();
requestparams.setCharSet("UTF-8");
requestparams.setMethod("POST");
requestparams.setParams(params);
requestparams.setUrl(url);
HttpRequest<Map<String, String>> request;
if(url.startsWith("https://")) {
request = new HttpsRequestKV(requestparams,null);
}else {
request = new HttpRequestKV(requestparams);
}
HttpClient client = new HttpClient();
String json = null;
try {
String mapst = "";
for (String key : params.keySet()) {
String value = params.get(key);
mapst += key + "=" + value + "&";
}
mapst = mapst.substring(0, mapst.length() - 1);
System.out.println("request params: " + mapst);
HttpResponseString res = client.service(request, new HttpResponseStringPraser());
if (res == null) {
System.err.println("请求接口异常");
return null;
}
if (res.getResultCode().equals(HttpResultCode.SUCCESS)) {
if (res.getHttpCode() == 200) {
json = res.getResult();
System.out.println("response json: " + json);
} else {
System.out.println("请求接口异常,请求码:" + res.getHttpCode());
}
} else {
System.out.println("请求接口网络异常:" + res.getResultCode().getCode());
}
} catch (Exception e) {
System.err.println("解析失败");
e.printStackTrace();
}
return json;
}
}
package com.hand.hls.hlcm.emay;
import com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response.*;
import com.hand.hls.hlcm.emay.util.DateUtil;
import com.hand.hls.hlcm.emay.util.JsonHelper;
import com.hand.hls.hlcm.emay.util.Md5;
import com.hand.hls.hlcm.emay.util.http.*;
import com.google.gson.reflect.TypeToken;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class SimpleExample {
public static void main(String[] args) {
// appId
String appId = "EUCP-EMY-SMS0-11111";// 请联系销售,或者在页面中 获取
// 密钥
String secretKey = "1231231231";// 请联系销售,或者在页面中 获取
// 接口地址
String host = "http://emay.com";// 请联系销售获取
// 时间戳
String timestamp = DateUtil.toString(new Date(), "yyyyMMddHHmmss");
// 签名
String sign = Md5.md5((appId + secretKey + timestamp).getBytes());
// 获取余额
getBalance(appId, sign, timestamp, host);
// 获取状态报告
getReport(appId, sign, timestamp, host);
// 获取上行
getMo(appId, sign, timestamp, host);
// 发送批次短信,定时时间格式yyyyMMddHHmmss
setSms(appId, sign, timestamp, host, "【某某公司】您的验证码是123&1=D$", "12100000000", "839273940", null, "20170506120000");//短信内容请以商务约定的为准,如果已经在通道端绑定了签名,则无需在这里添加签名
// 发送个性短信
Map<String, String> mobileAndContents = new HashMap<String, String>();
mobileAndContents.put("12100000000", "【某某公司】您的验证码是1231&32");
mobileAndContents.put("12100000001", "【某某公司】您的验证码是1231&31");
mobileAndContents.put("12100000002", "【某某公司】您的验证码是1231&30");
setPersonalitySms(appId, sign, timestamp, host, mobileAndContents, "83927391", "012", null);
// 发送语音短信
setVoiceSms(appId, sign, timestamp, host, "1234", "12100000000", "839273940", null);
// 获取语音状态报告
getVoiceReport(appId, sign, timestamp, host);
// 获取语音余额
getVoiceBalance(appId, sign, timestamp, host);
}
/**
* 获取余额
*/
private static void getBalance(String appId, String sign, String timestamp, String host) {
System.out.println("=============begin getBalance==================");
Map<String, String> params = new HashMap<String, String>();
params.put("appId", appId);
params.put("sign", sign);
params.put("timestamp", timestamp);
String json = request(params, host + "/simpleinter/getBalance");
if (json != null) {
ResponseData<BalanceResponse> data = JsonHelper.fromJson(new TypeToken<ResponseData<BalanceResponse>>() {
}, json);
String code = data.getCode();
if ("SUCCESS".equals(code)) {
System.out.println("result data : " + data.getData().getBalance());
}
}
System.out.println("=============end getBalance==================");
}
/**
* 获取语音余额
*/
private static void getVoiceBalance(String appId, String sign, String timestamp, String host) {
System.out.println("=============begin getBalance==================");
Map<String, String> params = new HashMap<String, String>();
params.put("appId", appId);
params.put("sign", sign);
params.put("timestamp", timestamp);
String json = request(params, host + "/voice/getBalance");
if (json != null) {
ResponseData<BalanceResponse> data = JsonHelper.fromJson(new TypeToken<ResponseData<BalanceResponse>>() {
}, json);
String code = data.getCode();
if ("SUCCESS".equals(code)) {
System.out.println("result data : " + data.getData().getBalance());
}
}
System.out.println("=============end getBalance==================");
}
/**
* 获取状态报告
*/
private static void getReport(String appId, String sign, String timestamp, String host) {
System.out.println("=============begin getReport==================");
Map<String, String> params = new HashMap<String, String>();
params.put("appId", appId);
params.put("sign", sign);
params.put("timestamp", timestamp);
params.put("number", "500");
String json = request(params, host + "/simpleinter/getReport");
if (json != null) {
ResponseData<ReportResponse[]> data = JsonHelper.fromJson(new TypeToken<ResponseData<ReportResponse[]>>() {
}, json);
String code = data.getCode();
if ("SUCCESS".equals(code)) {
for (ReportResponse d : data.getData()) {
System.out.println("result data : " + d.getMobile() + "," + d.getExtendedCode() + "," + d.getMobile() + "," + d.getCustomSmsId() + "," + d.getSmsId() + "," + d.getState() + ","
+ d.getDesc() + "," + d.getSubmitTime() + "," + d.getReceiveTime());
}
}
}
System.out.println("=============end getReport==================");
}
/**
* 获取语音状态报告
*/
private static void getVoiceReport(String appId, String sign, String timestamp, String host) {
System.out.println("=============begin getReport==================");
Map<String, String> params = new HashMap<String, String>();
params.put("appId", appId);
params.put("sign", sign);
params.put("timestamp", timestamp);
params.put("number", "500");
String json = request(params, host + "/voice/getReport");
if (json != null) {
ResponseData<ReportResponse[]> data = JsonHelper.fromJson(new TypeToken<ResponseData<ReportResponse[]>>() {
}, json);
String code = data.getCode();
if ("SUCCESS".equals(code)) {
for (ReportResponse d : data.getData()) {
System.out.println("result data : " + d.getMobile() + "," + d.getExtendedCode() + "," + d.getMobile() + "," + d.getCustomSmsId() + "," + d.getSmsId() + "," + d.getState() + ","
+ d.getDesc() + "," + d.getSubmitTime() + "," + d.getReceiveTime());
}
}
}
System.out.println("=============end getReport==================");
}
/**
* 获取上行
*/
private static void getMo(String appId, String sign, String timestamp, String host) {
System.out.println("=============begin getMo==================");
Map<String, String> params = new HashMap<String, String>();
params.put("appId", appId);
params.put("sign", sign);
params.put("timestamp", timestamp);
params.put("number", "500");
String json = request(params, host + "/simpleinter/getMo");
if (json != null) {
ResponseData<MoResponse[]> data = JsonHelper.fromJson(new TypeToken<ResponseData<MoResponse[]>>() {
}, json);
String code = data.getCode();
if ("SUCCESS".equals(code)) {
for (MoResponse d : data.getData()) {
System.out.println("result data:" + d.getMobile() + "," + d.getExtendedCode() + "," + d.getMobile() + "," + d.getMoTime());
}
}
}
System.out.println("=============end getMo==================");
}
/**
* 发送批次短信
*/
private static void setSms(String appId, String sign, String timestamp, String host, String content, String mobiles, String customSmsId, String extendedCode, String timerTime) {
System.out.println("============= setSms==================");
Map<String, String> params = new HashMap<String, String>();
try {
params.put("appId", appId);
params.put("sign", sign);
params.put("timestamp", timestamp);
params.put("mobiles", mobiles);
params.put("content", URLEncoder.encode(content, "utf-8"));
if (customSmsId != null) {
params.put("customSmsId", customSmsId);
}
if (timerTime != null) {
params.put("timerTime", timerTime);
}
if (extendedCode != null) {
params.put("extendedCode", extendedCode);
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String json = request(params, host + "/simpleinter/sendSMS");
if (json != null) {
ResponseData<SmsResponse[]> data = JsonHelper.fromJson(new TypeToken<ResponseData<SmsResponse[]>>() {
}, json);
String code = data.getCode();
if ("SUCCESS".equals(code)) {
for (SmsResponse d : data.getData()) {
System.out.println("data:" + d.getMobile() + "," + d.getSmsId() + "," + d.getCustomSmsId());
}
}
}
System.out.println("=============end setSms==================");
}
// 发送语音短信
private static void setVoiceSms(String appId, String sign, String timestamp, String host, String content, String mobile, String customSmsId, String extendedCode) {
System.out.println("============= setSms==================");
Map<String, String> params = new HashMap<String, String>();
try {
params.put("appId", appId);
params.put("sign", sign);
params.put("timestamp", timestamp);
params.put("mobile", mobile);
params.put("content", URLEncoder.encode(content, "utf-8"));
if (customSmsId != null) {
params.put("customSmsId", customSmsId);
}
if (extendedCode != null) {
params.put("extendedCode", extendedCode);
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String json = request(params, host + "/voice/sendSMS");
if (json != null) {
ResponseData<SmsResponse> data = JsonHelper.fromJson(new TypeToken<ResponseData<SmsResponse>>() {
}, json);
String code = data.getCode();
if ("SUCCESS".equals(code)) {
System.out.println("data:" + data.getData().getMobile() + "," + data.getData().getSmsId() + "," + data.getData().getCustomSmsId());
}
}
System.out.println("=============end setSms==================");
}
/**
* 发送个性短信
*/
private static void setPersonalitySms(String appId, String sign, String timestamp, String host, Map<String, String> mobileAndContents, String customSmsId, String extendedCode, String timerTime) {
System.out.println("=============setPersonalitySms ==================");
Map<String, String> params = new HashMap<String, String>();
try {
params.put("appId", appId);
params.put("sign", sign);
params.put("timestamp", timestamp);
for (String mobile : mobileAndContents.keySet()) {
params.put(mobile, URLEncoder.encode(mobileAndContents.get(mobile), "utf-8"));
}
if (customSmsId != null) {
params.put("customSmsId", customSmsId);
}
if (timerTime != null) {
params.put("timerTime", timerTime);
}
if (extendedCode != null) {
params.put("extendedCode", extendedCode);
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String json = request(params, host + "/simpleinter/sendPersonalitySMS");
if (json != null) {
ResponseData<SmsResponse[]> data = JsonHelper.fromJson(new TypeToken<ResponseData<SmsResponse[]>>() {
}, json);
String code = data.getCode();
if ("SUCCESS".equals(code)) {
for (SmsResponse d : data.getData()) {
System.out.println("data:" + d.getMobile() + "," + d.getSmsId() + "," + d.getCustomSmsId());
}
}
}
System.out.println("=============end setPersonalitySms==================");
}
/**
* 公共请求方法
*/
public static String request(Map<String, String> params, String url) {
HttpRequestParams<Map<String, String>> requestparams = new HttpRequestParams<Map<String, String>>();
requestparams.setCharSet("UTF-8");
requestparams.setMethod("POST");
requestparams.setParams(params);
requestparams.setUrl(url);
HttpRequest<Map<String, String>> request;
if (url.startsWith("https://")) {
request = new HttpsRequestKV(requestparams, null);
} else {
request = new HttpRequestKV(requestparams);
}
HttpClient client = new HttpClient();
String json = null;
try {
String mapst = "";
for (String key : params.keySet()) {
String value = params.get(key);
mapst += key + "=" + value + "&";
}
mapst = mapst.substring(0, mapst.length() - 1);
System.out.println("request params: " + mapst);
HttpResponseString res = client.service(request, new HttpResponseStringPraser());
if (res == null) {
System.err.println("请求接口异常");
return null;
}
if (res.getResultCode().equals(HttpResultCode.SUCCESS)) {
if (res.getHttpCode() == 200) {
json = res.getResult();
System.out.println("response json: " + json);
} else {
System.out.println("请求接口异常,请求码:" + res.getHttpCode());
}
} else {
System.out.println("请求接口网络异常:" + res.getResultCode().getCode());
}
} catch (Exception e) {
System.err.println("解析失败");
e.printStackTrace();
}
return json;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.framework.dto;
import java.io.Serializable;
/**
* 自定义SMSID 手机号
* @author Frank
*
*/
public class CustomSmsIdAndMobile implements Serializable {
private static final long serialVersionUID = 1L;
private String customSmsId;
private String mobile;
public CustomSmsIdAndMobile(){
}
public CustomSmsIdAndMobile(String customSmsId,String mobile){
this.customSmsId = customSmsId;
this.mobile = mobile;
}
public String getCustomSmsId() {
return customSmsId;
}
public void setCustomSmsId(String customSmsId) {
this.customSmsId = customSmsId;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.framework.dto;
import java.io.Serializable;
/**
* 自定义SMSID 手机号 内容
* @author Frank
*
*/
public class CustomSmsIdAndMobileAndContent implements Serializable {
private static final long serialVersionUID = 1L;
private String customSmsId;
private String mobile;
private String content;
public CustomSmsIdAndMobileAndContent(){
}
public CustomSmsIdAndMobileAndContent(String customSmsId,String mobile,String content){
this.customSmsId = customSmsId;
this.mobile = mobile;
this.content = content;
}
public String getCustomSmsId() {
return customSmsId;
}
public void setCustomSmsId(String customSmsId) {
this.customSmsId = customSmsId;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.framework.dto;
import java.io.Serializable;
/**
* 自定义SMSID 手机号 内容
* @author Frank
*
*/
public class PersonalityParams implements Serializable {
private static final long serialVersionUID = 1L;
private String customSmsId;
private String mobile;
private String content;
private String extendedCode;
private String timerTime;
public PersonalityParams(){
}
public PersonalityParams(String customSmsId,String mobile,String content,String extendedCode,String timerTime){
this.customSmsId = customSmsId;
this.mobile = mobile;
this.content = content;
this.timerTime = timerTime;
this.extendedCode = extendedCode;
}
public String getCustomSmsId() {
return customSmsId;
}
public void setCustomSmsId(String customSmsId) {
this.customSmsId = customSmsId;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getExtendedCode() {
return extendedCode;
}
public void setExtendedCode(String extendedCode) {
this.extendedCode = extendedCode;
}
public String getTimerTime() {
return timerTime;
}
public void setTimerTime(String timerTime) {
this.timerTime = timerTime;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
/**
* 请求Balance参数
* @author Frank
*
*/
public class BalanceRequest extends BaseRequest {
private static final long serialVersionUID = 1L;
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
import java.io.Serializable;
public class BaseRequest implements Serializable{
private static final long serialVersionUID = 1L;
/**
* 请求时间
*/
private long requestTime = System.currentTimeMillis();
/**
* 请求有效时间(秒)<br/>
* 服务器接受时间与请求时间对比,如果超过有效时间,拒绝此次请求<br/>
* 防止被网络抓包不断发送同一条请求<br/>
* 默认1分钟有效期
*/
private int requestValidPeriod = 60;
public long getRequestTime() {
return requestTime;
}
public void setRequestTime(long requestTime) {
this.requestTime = requestTime;
};
public int getRequestValidPeriod() {
return requestValidPeriod;
}
public void setRequestValidPeriod(int requestValidPeriod) {
this.requestValidPeriod = requestValidPeriod;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
/**
* 请求Balance参数
* @author Frank
*
*/
public class MoRequest extends BaseRequest {
private static final long serialVersionUID = 1L;
/**
* 请求数量<br/>
* 最大500
*/
private int number = 500;
public int getNumber() {
if(number <= 0 || number > 500){
number = 500;
}
return number;
}
public void setNumber(int number) {
if(number > 500){
number = 500;
}
this.number = number;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
/**
* 请求Balance参数
* @author Frank
*
*/
public class ReportRequest extends BaseRequest {
private static final long serialVersionUID = 1L;
/**
* 请求数量<br/>
* 最大500
*/
private int number = 500;
public int getNumber() {
if(number <= 0 || number > 500){
number = 500;
}
return number;
}
public void setNumber(int number) {
if(number > 500){
number = 500;
}
this.number = number;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
public class SmsBaseRequest extends BaseRequest {
private static final long serialVersionUID = 1L;
/**
* 定时时间
* yyyy-MM-dd HH:mm:ss
*/
private String timerTime;
/**
* 扩展码
*/
private String extendedCode;
public String getTimerTime() {
return timerTime;
}
public void setTimerTime(String timerTime) {
this.timerTime = timerTime;
}
public String getExtendedCode() {
return extendedCode;
}
public void setExtendedCode(String extendedCode) {
this.extendedCode = extendedCode;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
/**
* 批量短信发送参数
* @author Frank
*
*/
public class SmsBatchOnlyRequest extends SmsBaseRequest {
private static final long serialVersionUID = 1L;
/**
* 手机号与自定义SmsId
*/
private String[] mobiles;
/**
* 短信内容
*/
private String content;
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String[] getMobiles() {
return mobiles;
}
public void setMobiles(String[] mobiles) {
this.mobiles = mobiles;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
import com.hand.hls.hlcm.emay.eucp.inter.framework.dto.CustomSmsIdAndMobile;
/**
* 批量短信发送参数
* @author Frank
*
*/
public class SmsBatchRequest extends SmsBaseRequest {
private static final long serialVersionUID = 1L;
/**
* 手机号与自定义SmsId
*/
private CustomSmsIdAndMobile[] smses;
/**
* 短信内容
*/
private String content;
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public CustomSmsIdAndMobile[] getSmses() {
return smses;
}
public void setSmses(CustomSmsIdAndMobile[] smses) {
this.smses = smses;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
import com.hand.hls.hlcm.emay.eucp.inter.framework.dto.PersonalityParams;
/**
* 批量短信发送参数
* @author Frank
*
*/
public class SmsPersonalityAllRequest extends BaseRequest {
private static final long serialVersionUID = 1L;
private PersonalityParams[] smses;
public PersonalityParams[] getSmses() {
return smses;
}
public void setSmses(PersonalityParams[] smses) {
this.smses = smses;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
import com.hand.hls.hlcm.emay.eucp.inter.framework.dto.CustomSmsIdAndMobileAndContent;
/**
* 批量短信发送参数
* @author Frank
*
*/
public class SmsPersonalityRequest extends SmsBaseRequest {
private static final long serialVersionUID = 1L;
private CustomSmsIdAndMobileAndContent[] smses;
public CustomSmsIdAndMobileAndContent[] getSmses() {
return smses;
}
public void setSmses(CustomSmsIdAndMobileAndContent[] smses) {
this.smses = smses;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.request;
/**
* 单条短信发送参数
* @author Frank
*
*/
public class SmsSingleRequest extends SmsBaseRequest {
private static final long serialVersionUID = 1L;
/**
* 电话号码
*/
private String mobile;
/**
* 短信内容
*/
private String content;
/**
* 自定义smsid
*/
private String customSmsId;
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getCustomSmsId() {
return customSmsId;
}
public void setCustomSmsId(String customSmsId) {
this.customSmsId = customSmsId;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response;
import java.io.Serializable;
/**
* 余额数据
* @author Frank
*
*/
public class BalanceResponse implements Serializable{
private static final long serialVersionUID = 1L;
private long balance;// 余额
public BalanceResponse() {
}
public BalanceResponse(long balance) {
this.balance = balance;
}
public long getBalance() {
return balance;
}
public void setBalance(long balance) {
this.balance = balance;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response;
import java.io.Serializable;
/**
* 上行数据
* @author Frank
*
*/
public class MoResponse implements Serializable {
private static final long serialVersionUID = 1L;
private String mobile;// 手机号
private String extendedCode; // 扩展码
private String content;// 内容
private String moTime;// 手机上行时间
public MoResponse(){
}
public MoResponse(String mobile,String extendedCode,String content,String moTime){
this.mobile = mobile;
this.extendedCode = extendedCode;
this.content = content;
this.moTime = moTime;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getExtendedCode() {
return extendedCode;
}
public void setExtendedCode(String extendedCode) {
this.extendedCode = extendedCode;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getMoTime() {
return moTime;
}
public void setMoTime(String moTime) {
this.moTime = moTime;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response;
import java.io.Serializable;
/**
* 状态报告数据
* @author Frank
*
*/
public class ReportResponse implements Serializable {
private static final long serialVersionUID = 1L;
private String smsId;// 短信唯一标识
private String customSmsId;// 客户自定义SmsId
private String state;// 成功失败标识
private String desc;// 状态报告描述
private String mobile;// 手机号
private String receiveTime;// 状态报告返回时间
private String submitTime;// 信息提交时间
private String extendedCode;// 扩展码
public String getCustomSmsId() {
return customSmsId;
}
public void setCustomSmsId(String customSmsId) {
this.customSmsId = customSmsId;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getReceiveTime() {
return receiveTime;
}
public void setReceiveTime(String receiveTime) {
this.receiveTime = receiveTime;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getSmsId() {
return smsId;
}
public void setSmsId(String smsId) {
this.smsId = smsId;
}
public String getSubmitTime() {
return submitTime;
}
public void setSubmitTime(String submitTime) {
this.submitTime = submitTime;
}
public String getExtendedCode() {
return extendedCode;
}
public void setExtendedCode(String extendedCode) {
this.extendedCode = extendedCode;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response;
import java.io.Serializable;
public class ResponseData<T> implements Serializable {
private static final long serialVersionUID = 1L;
private String code;
private T data;
public ResponseData(String code,T data){
this.code = code;
this.data = data;
}
public ResponseData(){
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
}
package com.hand.hls.hlcm.emay.eucp.inter.http.v1.dto.response;
import java.io.Serializable;
/**
* 单条短信发送响应
* @author Frank
*
*/
public class SmsResponse implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 系统唯一smsId
*/
private String smsId;
private String mobile;
private String customSmsId;
public SmsResponse(){
}
public SmsResponse(String smsId,String mobile,String customSmsId){
this.smsId = smsId;
this.mobile = mobile;
this.customSmsId = customSmsId;
}
public String getSmsId() {
return smsId;
}
public void setSmsId(String smsId) {
this.smsId = smsId;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getCustomSmsId() {
return customSmsId;
}
public void setCustomSmsId(String customSmsId) {
this.customSmsId = customSmsId;
}
}
package com.hand.hls.hlcm.emay.util;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/**
* AES加解密工具
*
* @author Frank
*
*/
public class AES {
public final static String ALGORITHM_AEPP = "AES/ECB/PKCS5Padding";
/**
* AES加密
*
* @param content
* 内容
* @param password
* 密钥
* @param algorithm
* 算法
* @return 加密后数据
*/
public static byte[] encrypt(byte[] content, byte[] password, String algorithm) {
if (content == null || password == null)
return null;
try {
Cipher cipher = null;
if (algorithm.endsWith("PKCS7Padding")) {
cipher = Cipher.getInstance(algorithm, "BC");
} else {
cipher = Cipher.getInstance(algorithm);
}
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(password, "AES"));
return cipher.doFinal(content);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* AES解密
*
* @param content
* 加密内容
* @param password
* 密钥
* @param algorithm
* 算法
* @return 解密后数据
*/
public static byte[] decrypt(byte[] content, byte[] password, String algorithm) {
if (content == null || password == null)
return null;
try {
Cipher cipher = null;
if (algorithm.endsWith("PKCS7Padding")) {
cipher = Cipher.getInstance(algorithm, "BC");
} else {
cipher = Cipher.getInstance(algorithm);
}
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(password, "AES"));
byte[] bytes = cipher.doFinal(content);
return bytes;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* AES加密
*
* @param content
* 内容
* @param password
* 密钥
* @param algorithm
* 算法
* @param ivStr
* 向量
* @return 加密后数据
*/
public static byte[] encrypt(byte[] content, byte[] password, byte[] ivStr, String algorithm) {
if (content == null || password == null)
return null;
try {
Cipher cipher = null;
if (algorithm.endsWith("PKCS7Padding")) {
cipher = Cipher.getInstance(algorithm, "BC");
} else {
cipher = Cipher.getInstance(algorithm);
}
IvParameterSpec iv = new IvParameterSpec(ivStr);
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(password, "AES"), iv);
return cipher.doFinal(content);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* AES解密
*
* @param content
* 加密内容
* @param password
* 密钥
* @param algorithm
* 算法
* @param ivStr
* 向量
* @return 解密后数据
*/
public static byte[] decrypt(byte[] content, byte[] password, byte[] ivStr, String algorithm) {
if (content == null || password == null)
return null;
try {
Cipher cipher = null;
if (algorithm.endsWith("PKCS7Padding")) {
cipher = Cipher.getInstance(algorithm, "BC");
} else {
cipher = Cipher.getInstance(algorithm);
}
IvParameterSpec iv = new IvParameterSpec(ivStr);
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(password, "AES"), iv);
byte[] bytes = cipher.doFinal(content);
return bytes;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}
package com.hand.hls.hlcm.emay.util;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class DateUtil {
public static final long ONE_HOUR_TIME_LONG = 3600000;
public static String toString(Date date, String format) {
String dateStr = null;
try {
SimpleDateFormat sdf = new SimpleDateFormat(format);
dateStr = sdf.format(date);
} catch (Exception e) {
}
return dateStr;
}
public static Date parseDate(String dateStr, String format) {
Date date = null;
try {
SimpleDateFormat sdf = new SimpleDateFormat(format);
date = sdf.parse(dateStr);
} catch (Exception e) {
}
return date;
}
/**
* 获取日期当天的最小时间日期,0点
*/
public static Date getMinTimeDateByDate(Date date) {
if (date == null)
return null;
String datestr = toString(date, "yyyyMMdd");
return parseDate(datestr, "yyyyMMdd");
}
/**
* 获取日期当天的最大时间日期,12点整
*/
public static Date getMaxTimeDateByDate(Date date) {
if (date == null)
return null;
String datestr = toString(date, "yyyyMMdd");
Date d = parseDate(datestr, "yyyyMMdd");
return new Date(d.getTime() + 24l * 60l * 60l * 1000l - 1l);
}
public static long subTime(Date startDate, Date endDate) {
return endDate.getTime() - startDate.getTime();
}
/**
* 获取上月第一天最早时间
* @return Date
*/
public static Date getLastMonthFirstDay() {
Calendar cal_1 = Calendar.getInstance();// 获取当前日期
cal_1.setTime(getMinTimeDateByDate(new Date()));
cal_1.add(Calendar.MONTH, -1);
cal_1.set(Calendar.DAY_OF_MONTH, 1);
return cal_1.getTime();
}
/**
* 获取上月最后一天最晚时间
* @return Date
*/
public static Date getLastMonthLastDay() {
Calendar cale = Calendar.getInstance();
cale.setTime(getMinTimeDateByDate(new Date()));
cale.add(Calendar.MONTH, -1);
cale.set(Calendar.DAY_OF_MONTH, cale.getActualMaximum(Calendar.DAY_OF_MONTH));
return new Date(cale.getTime().getTime() + 1000l * 60l * 60l * 24l - 1l);
}
/**
* 获取本月第一天最早时间
* @return Date
*/
public static Date getNowMonthFirstDay() {
Calendar cal_1 = Calendar.getInstance();// 获取当前日期
cal_1.setTime(getMinTimeDateByDate(new Date()));
cal_1.add(Calendar.MONTH, 0);
cal_1.set(Calendar.DAY_OF_MONTH, 1);
return cal_1.getTime();
}
/**
* 获取本月最后一天最晚时间
* @return Date
*/
public static Date getNowMonthLastDay() {
Calendar cale = Calendar.getInstance();
cale.setTime(getMinTimeDateByDate(new Date()));
cale.set(Calendar.DAY_OF_MONTH, cale.getActualMaximum(Calendar.DAY_OF_MONTH));
return new Date(cale.getTime().getTime() + 1000l * 60l * 60l * 24l - 1l);
}
/**
* 获取本月最后一天
* @return Date
*/
public static Date getTheMonthLastDay(Date date) {
if(date == null){
return null;
}
Calendar cale = Calendar.getInstance();
cale.setTime(date);
cale.set(Calendar.DAY_OF_MONTH, cale.getActualMaximum(Calendar.DAY_OF_MONTH));
cale.set(Calendar.HOUR, 0);
cale.set(Calendar.HOUR_OF_DAY, 0);
cale.set(Calendar.MINUTE, 0);
cale.set(Calendar.SECOND, 0);
cale.set(Calendar.MILLISECOND, 0);
return cale.getTime();
}
public static void main(String[] args) {
// System.out.println(toString(getTheMonthLastDay(new Date()), "yyyy-MM-dd HH:mm:ss"));
// System.out.println(toString(getLastMonthLastDay(), "yyyy-MM-dd HH:mm:ss"));
// System.out.println(toString(getNowMonthFirstDay(), "yyyy-MM-dd HH:mm:ss"));
// System.out.println(toString(getNowMonthLastDay(), "yyyy-MM-dd HH:mm:ss"));
}
}
package com.hand.hls.hlcm.emay.util;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
/**
* GZIP 压缩工具
* @author Frank
*
*/
public class GZIPUtils {
public static void main(String[] args) throws IOException {
String sst = "hahahah";
System.out.println(sst);
System.out.println(System.currentTimeMillis());
System.out.println("size:" + sst.length());
byte[] bytes = sst.getBytes();
System.out.println("length:" + bytes.length);
System.out.println(System.currentTimeMillis());
byte[] end = compress(bytes);
System.out.println(System.currentTimeMillis());
System.out.println("length:" + end.length);
System.out.println(System.currentTimeMillis());
byte[] start = decompress(end);
System.out.println(System.currentTimeMillis());
System.out.println("length:" + start.length);
System.out.println(new String(start));
}
/**
* 数据压缩传输
*
* @param is
* @param os
* @throws Exception
*/
public static void compressTransfe(byte[] bytes, OutputStream out) throws IOException {
GZIPOutputStream gos = null;
try {
gos = new GZIPOutputStream(out);
gos.write(bytes);
gos.finish();
gos.flush();
} finally{
if(gos != null){
gos.close();
}
}
}
/**
* 数据压缩
*
* @param is
* @param os
* @throws Exception
*/
public static byte[] compress(byte[] bytes) throws IOException {
ByteArrayOutputStream out = null;
GZIPOutputStream gos = null;
try {
out = new ByteArrayOutputStream();
gos = new GZIPOutputStream(out);
gos.write(bytes);
gos.finish();
gos.flush();
} finally{
if(gos != null){
gos.close();
}
if(out != null){
out.close();
}
}
return out.toByteArray();
}
/**
* 数据解压
*
* @param in
* @return
* @throws IOException
*/
public static byte[] decompress(byte[] bytes) throws IOException {
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
GZIPInputStream gin = new GZIPInputStream(in);
ByteArrayOutputStream out = new ByteArrayOutputStream();
int count;
byte data[] = new byte[1024];
while ((count = gin.read(data, 0, 1024)) != -1) {
out.write(data, 0, count);
}
out.flush();
out.close();
gin.close();
return out.toByteArray();
}
}
package com.hand.hls.hlcm.emay.util;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import java.util.HashMap;
import java.util.Map;
/**
* json util
*
* @author 东旭
*
*/
public class JsonHelper {
private static Map<String,Gson> gsons = new HashMap<String, Gson>();
private static String DEFAULT_DATE_PATTERN = "yyyy-MM-dd HH:mm:ss";
static {
gsons.put(DEFAULT_DATE_PATTERN, createGson(DEFAULT_DATE_PATTERN));
}
private static Gson createGson(String datePattern){
return new GsonBuilder().setDateFormat(datePattern).disableHtmlEscaping().serializeNulls().create();
}
public static Gson getGson() {
return gsons.get(DEFAULT_DATE_PATTERN);
}
public static Gson getGson(String datePattern) {
Gson gson = gsons.get(datePattern);
if(gson == null){
gson = createGson(datePattern);
gsons.put(datePattern, gson);
}
return gson;
}
public static GsonBuilder newGsonBuilder() {
return new GsonBuilder();
}
/**
* 将对象转换为json串
*
* @param obj
* @return
*/
public static String toJsonString(Object obj) {
if (obj == null) {
return null;
}
return getGson().toJson(obj);
}
/**
* 将对象转换为json串,自定义日期转换规则
*
* @param obj
* @param datePattern
* @return
*/
public static String toJsonString(Object obj, String datePattern) {
if (obj == null) {
return null;
}
return getGson(datePattern).toJson(obj);
}
/**
* 将json串转换为对象
*
* @param clazz
* @param jsonString
* @return
*/
public static <T> T fromJson(Class<T> clazz, String jsonString) {
if (jsonString == null) {
return null;
}
return getGson().fromJson(jsonString, clazz);
}
/**
* 将json串转换为对象
*
* @Type type
* @param jsonString
* @return
*/
public static <T> T fromJson(TypeToken<T> token, String jsonString) {
if (jsonString == null) {
return null;
}
return getGson().fromJson(jsonString, token.getType());
}
/**
* 将json串转换为对象
*
* @Type type
* @param jsonString
* @return
*/
public static <T> T fromJson(TypeToken<T> token, String jsonString, String datePattern) {
if (jsonString == null) {
return null;
}
return getGson(datePattern).fromJson(jsonString, token.getType());
}
/**
* 将json串转换为对象
*
* @param clazz
* @param jsonString
* @return
*/
public static <T> T fromJson(Class<T> clazz, String jsonString, String datePattern) {
if (jsonString == null) {
return null;
}
return getGson(datePattern).fromJson(jsonString, clazz);
}
}
package com.hand.hls.hlcm.emay.util;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* md5特征码工具
*
* @author Frank
*
*/
public class Md5 {
/**
* MD5
* @param bytes
* @return
*/
public static String md5(byte[] bytes) {
if (bytes == null || bytes.length == 0)
return null;
String s = null;
char hexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(bytes);
byte tmp[] = md.digest();
char str[] = new char[16 * 2];
int k = 0;
for (int i = 0; i < 16; i++) {
byte byte0 = tmp[i];
str[k++] = hexDigits[byte0 >>> 4 & 0xf];
str[k++] = hexDigits[byte0 & 0xf];
}
s = new String(str);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return s;
}
/**
* MD5[16位]
*
* @param bytes
* @return
*/
public static String md5For16(byte[] bytes) {
return md5(bytes).substring(8,24);
}
}
package com.hand.hls.hlcm.emay.util.http;
import javax.net.ssl.*;
import java.io.*;
import java.net.*;
import java.security.*;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
/**
* EMAY http客户端
*
* @author Frank
*
*/
public class HttpClient {
/**
* 链接超时时间(s)
*/
private int httpConnectionTimeOut = 30;
/**
* 数据传输超时时间(s)
*/
private int httpReadTimeOut = 30;
public HttpClient() {
}
/**
*
* @param httpConnectionTimeOut
* 链接超时时间(s)
* @param httpReadTimeOut
* 数据传输超时时间(s)
*/
public HttpClient(int httpConnectionTimeOut, int httpReadTimeOut) {
this.httpConnectionTimeOut = httpConnectionTimeOut;
this.httpReadTimeOut = httpReadTimeOut;
}
/**
* 发送HTTP请求
*
* @param request
* 请求
* @param praser
* 响应解析器
* @return T 响应
*/
public <T> T service(HttpRequest<?> request, HttpResponsePraser<T> praser) {
HttpResultCode code = HttpResultCode.SUCCESS;
if (request.getHttpParams().getUrl() == null || request.getHttpParams().getUrl().length() == 0) {
code = HttpResultCode.ERROR_URL_NULL;
return praser.prase(code, 0, null, null, request.getHttpParams().getCharSet(), null);
}
HttpURLConnection conn = null;
int httpCode = 0;
Map<String, String> headers = null;
List<String> cookies = null;
ByteArrayOutputStream outputStream = null;
try {
String realUrl = this.genUrl(request);
conn = this.createConnection(request, realUrl);
this.fillConnection(conn, request);
this.request(conn, request);
httpCode = conn.getResponseCode();
headers = this.getHeaders(conn, request.getHttpParams().getCharSet());
cookies = this.getCookies(conn, request.getHttpParams().getCharSet());
outputStream = this.getResultOutputStream(conn);
} catch (SocketTimeoutException e) {
code = HttpResultCode.ERROR_TIMEOUT;
e.printStackTrace();
} catch (KeyManagementException e) {
code = HttpResultCode.ERROR_HTTPS_SSL;
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
code = HttpResultCode.ERROR_HTTPS_SSL;
e.printStackTrace();
} catch (ProtocolException e) {
code = HttpResultCode.ERROR_METHOD;
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
code = HttpResultCode.ERROR_CHARSET;
e.printStackTrace();
} catch (MalformedURLException e) {
code = HttpResultCode.ERROR_URL;
httpCode = 500;
e.printStackTrace();
} catch (IOException e) {
code = HttpResultCode.ERROR_CONNECT;
e.printStackTrace();
} catch (UnrecoverableKeyException e) {
code = HttpResultCode.ERROR_HTTPS_SSL;
e.printStackTrace();
} catch (KeyStoreException e) {
code = HttpResultCode.ERROR_HTTPS_SSL;
e.printStackTrace();
} catch (CertificateException e) {
code = HttpResultCode.ERROR_HTTPS_SSL;
e.printStackTrace();
} finally {
if (conn != null) {
conn.disconnect();
}
}
T t = null;
try {
t = praser.prase(code, httpCode, headers, cookies, request.getHttpParams().getCharSet(), outputStream);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (outputStream != null) {
try {
outputStream.flush();
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return t;
}
private <T> String genUrl(HttpRequest<T> request) {
if (request.getHttpParams().getMethod().equalsIgnoreCase("GET")) {
String getprams = request.getContentPraser().praseRqeuestContentToString(request.getHttpParams());
if (getprams != null) {
String url = null;
if (request.getHttpParams().getUrl().indexOf("?") > 0) {
url = request.getHttpParams().getUrl() + "&" + getprams;
} else {
url = request.getHttpParams().getUrl() + "?" + getprams;
}
return url;
} else {
return request.getHttpParams().getUrl();
}
} else {
return request.getHttpParams().getUrl();
}
}
/**
* 获取HTTP响应头
*
* @param conn
* @param charSet
* @return
* @throws UnsupportedEncodingException
*/
private Map<String, String> getHeaders(HttpURLConnection conn, String charSet) throws UnsupportedEncodingException {
Map<String, String> resultHeaders = new HashMap<String, String>();
Map<String, List<String>> header = conn.getHeaderFields();
if (header != null && header.size() > 0) {
for (Entry<String, List<String>> entry : header.entrySet()) {
if (!"Set-Cookie".equalsIgnoreCase(entry.getKey())) {
String valuer = "";
if (entry.getValue() != null && entry.getValue().size() > 0) {
for (String value : entry.getValue()) {
valuer += new String(value.getBytes("ISO-8859-1"), charSet) + ",";
}
valuer = valuer.substring(0, valuer.length() - 1);
}
resultHeaders.put(entry.getKey(), valuer);
}
}
}
return resultHeaders;
}
/**
* 获取HTTP响应Cookies
*
* @param conn
* @param charSet
* @return
* @throws UnsupportedEncodingException
*/
private List<String> getCookies(HttpURLConnection conn, String charSet) throws UnsupportedEncodingException {
List<String> resultC = new ArrayList<String>();
List<String> cookies = null;
Map<String, List<String>> header = conn.getHeaderFields();
if (header != null && header.size() > 0) {
cookies = header.get("Set-Cookie");
}
if (cookies != null) {
for (String cookie : cookies) {
resultC.add(new String(cookie.getBytes("ISO-8859-1"), charSet));
}
}
return cookies;
}
/**
* 获取HTTP响应数据流
*
* @param conn
* @return
* @throws IOException
*/
private ByteArrayOutputStream getResultOutputStream(HttpURLConnection conn) throws IOException {
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
InputStream is = conn.getInputStream();
try {
if (is != null) {
byte[] buffer = new byte[1024];
int len = 0;
while ((len = is.read(buffer)) != -1) {
outStream.write(buffer, 0, len);
}
}
} catch (IOException e) {
throw e;
} finally {
if (is != null) {
is.close();
}
}
return outStream;
}
/**
* 发送Http请求
*
* @param conn
* @param request
* @throws IOException
*/
private <T> void request(HttpURLConnection conn, HttpRequest<T> request) throws IOException {
if (request.getHttpParams().getMethod().equalsIgnoreCase("POST")) {
conn.setDoOutput(true);
// conn.connect();
if (request.getHttpParams().getParams() != null) {
byte[] content = request.getContentPraser().praseRqeuestContentToBytes(request.getHttpParams());
fillHeader(conn, "Content-Length", String.valueOf(request.getContentPraser().praseRqeuestContentLength(request.getHttpParams())));
DataOutputStream out = new DataOutputStream(conn.getOutputStream());
out.write(content);
out.flush();
out.close();
}
} else {
conn.connect();
}
}
/**
* 添加请求信息
*
* @param conn
* @param request
* @throws ProtocolException
*/
private void fillConnection(HttpURLConnection conn, HttpRequest<?> request) throws ProtocolException {
this.fillTimeout(conn);
this.filleMethod(conn, request);
this.fillHeaders(conn, request);
this.fillCookies(conn, request);
}
/**
* 添加超时时间
*
* @param conn
*/
private void fillTimeout(HttpURLConnection conn) {
if (httpConnectionTimeOut != 0) {
conn.setConnectTimeout(httpConnectionTimeOut * 1000);
}
if (httpReadTimeOut != 0) {
conn.setReadTimeout(httpReadTimeOut * 1000);
}
}
/**
* 指定HTTP方法
*
* @param conn
* @param request
* @throws ProtocolException
*/
private void filleMethod(HttpURLConnection conn, HttpRequest<?> request) throws ProtocolException {
conn.setRequestMethod(request.getHttpParams().getMethod().toUpperCase());
}
/**
* 添加头信息
*
* @param conn
* @param request
*/
private void fillHeaders(HttpURLConnection conn, HttpRequest<?> request) {
if (request.getHttpParams().getHeaders() != null) {
for (Entry<String, String> entry : request.getHttpParams().getHeaders().entrySet()) {
fillHeader(conn, entry.getKey(), entry.getValue());
}
}
}
/**
* 添加头信息
*
* @param conn
* @param request
*/
private void fillHeader(HttpURLConnection conn, String key, String value) {
conn.setRequestProperty(key, value);
}
/**
* 添加Cookies
*
* @param conn
* @param request
*/
private void fillCookies(HttpURLConnection conn, HttpRequest<?> request) {
if (request.getHttpParams().getCookies() != null) {
conn.setRequestProperty("Cookie", request.getHttpParams().getCookies());
}
}
/**
* 创建Http链接
*
* @param request
* @return
* @throws NoSuchAlgorithmException
* @throws KeyManagementException
* @throws MalformedURLException
* @throws IOException
* @throws CertificateException
* @throws KeyStoreException
* @throws UnrecoverableKeyException
*/
private HttpURLConnection createConnection(HttpRequest<?> request, String realUrl)
throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, IOException, UnrecoverableKeyException, KeyStoreException, CertificateException {
URL console = new URL(realUrl);
HttpURLConnection conn;
if (request.isHttps()) {
conn = genHttpsConn(console, request);
} else {
conn = (HttpURLConnection) console.openConnection();
}
return conn;
}
private HttpURLConnection genHttpsConn(URL console, HttpRequest<?> request)
throws UnrecoverableKeyException, KeyManagementException, NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException {
SSLContext ctx = getSSLContext(request.getHttpsParams());
HttpsURLConnection sconn = (HttpsURLConnection) console.openConnection();
sconn.setSSLSocketFactory(ctx.getSocketFactory());
sconn.setHostnameVerifier(new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) {
return true;
}
});
return sconn;
}
/**
* 获得KeyStore.
*
* @param keyStorePath
* 密钥库路径
* @param password
* 密码
* @return 密钥库
* @throws KeyStoreException
* @throws IOException
* @throws CertificateException
* @throws NoSuchAlgorithmException
* @throws Exception
*/
private KeyStore getKeyStore(HttpsParams params) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {
// 实例化密钥库 KeyStore用于存放证书,创建对象时 指定交换数字证书的加密标准
// 指定交换数字证书的加密标准
KeyStore ks = KeyStore.getInstance(params.getAlgorithm());
// 获得密钥库文件流
FileInputStream is = new FileInputStream(params.getKeyStorePath());
// 加载密钥库
ks.load(is, params.getPassword().toCharArray());
// 关闭密钥库文件流
is.close();
return ks;
}
/**
* 获得SSLSocketFactory.
*
* @param password
* 密码
* @param keyStorePath
* 密钥库路径
* @param trustStorePath
* 信任库路径
* @return SSLSocketFactory
* @throws NoSuchAlgorithmException
* @throws IOException
* @throws CertificateException
* @throws KeyStoreException
* @throws UnrecoverableKeyException
* @throws KeyManagementException
* @throws Exception
*/
private SSLContext getSSLContext(HttpsParams params) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException, UnrecoverableKeyException, KeyManagementException {
// 实例化SSL上下文
SSLContext ctx = SSLContext.getInstance("TLS");
if (params != null) {
// 实例化密钥库 KeyManager选择证书证明自己的身份
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
// 实例化信任库 TrustManager决定是否信任对方的证书
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
// 获得密钥库
KeyStore keyStore = getKeyStore(params);
// 初始化密钥工厂
keyManagerFactory.init(keyStore, params.getPassword().toCharArray());
// 获得信任库
KeyStore trustStore = getKeyStore(params);
// 初始化信任库
trustManagerFactory.init(trustStore);
// 初始化SSL上下文
ctx.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), new java.security.SecureRandom());
} else {
ctx.init(null, new TrustManager[] { myX509TrustManager }, new java.security.SecureRandom());
}
return ctx;
}
private TrustManager myX509TrustManager = new X509TrustManager() {
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
}
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
}
};
}
package com.hand.hls.hlcm.emay.util.http;
/**
* Http 请求实体<请求数据类型>
*
* @author Frank
*
* @param <T>
*/
public class HttpRequest<T> {
/**
* http参数
*/
private HttpRequestParams<T> httpParams;
/**
* https参数
*/
private HttpsParams httpsParams;
/**
* 内容解析器
*/
private HttpRequestPraser<T> contentPraser;
/**
* 是否https请求
*/
private boolean isHttps;
/**
*
*/
protected HttpRequest() {
}
/**
*
* @param httpParams
* http参数
* @param contentPraser
* 内容解析器
*/
protected HttpRequest(HttpRequestParams<T> httpParams, HttpRequestPraser<T> contentPraser) {
this.httpParams = httpParams;
this.contentPraser = contentPraser;
this.isHttps = false;
}
/**
*
* @param httpParams
* http参数
* @param httpsParams
* https参数
* @param contentPraser
* 内容解析器
*/
protected HttpRequest(HttpRequestParams<T> httpParams, HttpsParams httpsParams, HttpRequestPraser<T> contentPraser) {
this.httpParams = httpParams;
this.httpsParams = httpsParams;
this.contentPraser = contentPraser;
this.isHttps = true;
}
public boolean isHttps() {
return isHttps;
}
public HttpRequestParams<T> getHttpParams() {
return httpParams;
}
public void setHttpParams(HttpRequestParams<T> httpParams) {
this.httpParams = httpParams;
}
public HttpsParams getHttpsParams() {
return httpsParams;
}
public void setHttpsParams(HttpsParams httpsParams) {
this.httpsParams = httpsParams;
}
public HttpRequestPraser<T> getContentPraser() {
return contentPraser;
}
public void setContentPraser(HttpRequestPraser<T> contentPraser) {
this.contentPraser = contentPraser;
}
}
package com.hand.hls.hlcm.emay.util.http;
/**
* Http 请求实体<byte[]>
*
* @author Frank
*
*/
public class HttpRequestBytes extends HttpRequest<byte[]> {
/**
*
* @param httpParams
* 请求参数
*/
public HttpRequestBytes(HttpRequestParams<byte[]> httpParams) {
super(httpParams, new HttpRequestPraserBytes());
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.util.Map;
/**
* Http 请求实体<Map<String, String>>
*
* @author Frank
*
*/
public class HttpRequestKV extends HttpRequest<Map<String, String>> {
/**
*
* @param httpParams
* 请求参数
*/
public HttpRequestKV(HttpRequestParams<Map<String, String>> httpParams) {
super(httpParams, new HttpRequestPraserKV());
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.util.Map;
/**
* Http参数
*
* @author Frank
*
* @param <T>
* 传输数据类型
*/
public class HttpRequestParams<T> {
private String url;// URL
private String charSet = "UTF-8";// 编码
private String method = "GET";// Http方法
private Map<String, String> headers;// 头信息
private String cookies;// cookie信息
private T params;// 传输数据
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getCharSet() {
return charSet;
}
public void setCharSet(String charSet) {
this.charSet = charSet;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public Map<String, String> getHeaders() {
return headers;
}
public void setHeaders(Map<String, String> headers) {
this.headers = headers;
}
public String getCookies() {
return cookies;
}
public void setCookies(String cookies) {
this.cookies = cookies;
}
public T getParams() {
return params;
}
public void setParams(T params) {
this.params = params;
}
}
package com.hand.hls.hlcm.emay.util.http;
/**
* Http请求,参数解析器
*
* @author Frank
*
* @param <T>
*/
public interface HttpRequestPraser<T> {
/**
* 将请求参数转换为String<br/>
* 主要用于get方法传输
*
* @param httpParams
* 请求参数
* @return
*/
public String praseRqeuestContentToString(HttpRequestParams<T> httpParams);
/**
* 将请求参数转换为byte[]<br/>
* 主要用于post方法传输
*
* @param httpParams
* 请求参数
* @return
*/
public byte[] praseRqeuestContentToBytes(HttpRequestParams<T> httpParams);
/**
* 获取请求参数大小<br/>
* 主要用于post方法传输
*
* @param httpParams
* 请求参数
* @return
*/
public int praseRqeuestContentLength(HttpRequestParams<T> httpParams);
}
package com.hand.hls.hlcm.emay.util.http;
import java.io.UnsupportedEncodingException;
/**
* Http 请求解析器:byte[]
*
* @author Frank
*
*/
public class HttpRequestPraserBytes implements HttpRequestPraser<byte[]> {
/**
* 请求内容字符串
*/
private String contentString;
@Override
public String praseRqeuestContentToString(HttpRequestParams<byte[]> httpParams) {
if (contentString != null) {
return contentString;
}
try {
contentString = new String(httpParams.getParams(), httpParams.getCharSet());
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return contentString;
}
@Override
public byte[] praseRqeuestContentToBytes(HttpRequestParams<byte[]> httpParams) {
return httpParams.getParams();
}
@Override
public int praseRqeuestContentLength(HttpRequestParams<byte[]> httpParams) {
if (httpParams.getParams() != null) {
return httpParams.getParams().length;
} else {
return 0;
}
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.Map.Entry;
/**
* Http 请求解析器:Map<String, String>
*
* @author Frank
*
*/
public class HttpRequestPraserKV implements HttpRequestPraser<Map<String, String>> {
/**
* 请求内容byte数组
*/
private byte[] contentBytes;
/**
* 请求内容字符串
*/
private String contentString;
@Override
public String praseRqeuestContentToString(HttpRequestParams<Map<String, String>> httpParams) {
if (contentString != null) {
return contentString;
}
Map<String, String> params = httpParams.getParams();
if (params == null || params.size() == 0) {
return null;
}
StringBuffer buffer = new StringBuffer();
for (Entry<String, String> entry : params.entrySet()) {
if (entry.getValue() != null) {
buffer.append(entry.getKey()).append("=").append(entry.getValue()).append("&");
}
}
String param = buffer.toString();
contentString = param.substring(0, param.length() - 1);
return contentString;
}
@Override
public byte[] praseRqeuestContentToBytes(HttpRequestParams<Map<String, String>> httpParams) {
if (contentBytes != null) {
return contentBytes;
}
String paramStr = praseRqeuestContentToString(httpParams);
if (paramStr == null) {
return null;
}
try {
contentBytes = paramStr.getBytes(httpParams.getCharSet());
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return contentBytes;
}
@Override
public int praseRqeuestContentLength(HttpRequestParams<Map<String, String>> httpParams) {
praseRqeuestContentToBytes(httpParams);
if (contentBytes != null) {
return contentBytes.length;
} else {
return 0;
}
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.io.UnsupportedEncodingException;
/**
* Http 请求解析器:String
*
* @author Frank
*
*/
public class HttpRequestPraserString implements HttpRequestPraser<String> {
/**
* 请求内容byte数组
*/
private byte[] contentBytes;
@Override
public String praseRqeuestContentToString(HttpRequestParams<String> httpParams) {
return httpParams.getParams();
}
@Override
public byte[] praseRqeuestContentToBytes(HttpRequestParams<String> httpParams) {
if (contentBytes != null) {
return contentBytes;
}
try {
contentBytes = httpParams.getParams().getBytes(httpParams.getCharSet());
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
contentBytes = null;
}
return contentBytes;
}
@Override
public int praseRqeuestContentLength(HttpRequestParams<String> httpParams) {
praseRqeuestContentToBytes(httpParams);
if (contentBytes != null) {
return contentBytes.length;
} else {
return 0;
}
}
}
package com.hand.hls.hlcm.emay.util.http;
/**
* Http 请求实体<String>
*
* @author Frank
*
*/
public class HttpRequestString extends HttpRequest<String> {
/**
*
* @param httpParams
* 请求参数
*/
public HttpRequestString(HttpRequestParams<String> httpParams) {
super(httpParams, new HttpRequestPraserString());
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.util.List;
import java.util.Map;
/**
* Http响应
*
* @author Frank
*
*/
public class HttpResponse<T> {
/**
* Http 结果代码
*/
private HttpResultCode resultCode;
/**
* Http链接Code
*/
private int httpCode;
/**
* Http响应头
*/
private Map<String, String> headers;
/**
* http响应Cookies
*/
private List<String> cookies;
/**
* http字符集
*/
private String charSet;
/**
* http响应数据
*/
private T result;
/**
*
* @param resultCode
* Http 结果代码
* @param httpCode
* Http链接Code
* @param headers
* Http响应头
* @param cookies
* http响应Cookies
* @param charSet
* http字符集
* @param result
* http响应数据
*/
public HttpResponse(HttpResultCode resultCode, int httpCode, Map<String, String> headers, List<String> cookies, String charSet, T result) {
this.resultCode = resultCode;
this.httpCode = httpCode;
this.headers = headers;
this.cookies = cookies;
this.charSet = charSet;
this.result = result;
}
public HttpResultCode getResultCode() {
return resultCode;
}
public void setResultCode(HttpResultCode resultCode) {
this.resultCode = resultCode;
}
public int getHttpCode() {
return httpCode;
}
public void setHttpCode(int httpCode) {
this.httpCode = httpCode;
}
public Map<String, String> getHeaders() {
return headers;
}
public void setHeaders(Map<String, String> headers) {
this.headers = headers;
}
public List<String> getCookies() {
return cookies;
}
public void setCookies(List<String> cookies) {
this.cookies = cookies;
}
public String getCharSet() {
return charSet;
}
public void setCharSet(String charSet) {
this.charSet = charSet;
}
public T getResult() {
return result;
}
public void setResult(T result) {
this.result = result;
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.util.List;
import java.util.Map;
/**
* http 响应: byte[]
*
* @author Frank
*
*/
public class HttpResponseBytes extends HttpResponse<byte[]> {
/**
*
* @param resultCode
* Http 结果代码
* @param httpCode
* Http链接Code
* @param headers
* Http响应头
* @param cookies
* http响应Cookies
* @param charSet
* http字符集
* @param result
* http响应数据
*/
public HttpResponseBytes(HttpResultCode resultCode, int httpCode, Map<String, String> headers, List<String> cookies, String charSet, byte[] result) {
super(resultCode, httpCode, headers, cookies, charSet, result);
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.io.ByteArrayOutputStream;
import java.util.List;
import java.util.Map;
/**
* 解析Byte[]响应的解析器
*
* @author Frank
*
*/
public class HttpResponseBytesPraser implements HttpResponsePraser<HttpResponseBytes> {
@Override
public HttpResponseBytes prase(HttpResultCode resultCode, int httpCode, Map<String, String> headers, List<String> cookies, String charSet, ByteArrayOutputStream outputStream) {
return new HttpResponseBytes(resultCode, httpCode, headers, cookies, charSet, outputStream == null ? null : outputStream.toByteArray());
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.io.ByteArrayOutputStream;
import java.util.List;
import java.util.Map;
/**
*
* Http响应解析器
*
* @author Frank
*
* @param <T>
* http响应数据转换后实体
*/
public interface HttpResponsePraser<T> {
/**
* 解析
*
* @param resultCode
* Http 结果代码
* @param httpCode
* Http链接Code
* @param headers
* Http响应头
* @param cookies
* http响应Cookies
* @param charSet
* http字符集
* @param result
* http响应数据
*/
public T prase(HttpResultCode resultCode, int httpCode, Map<String, String> headers, List<String> cookies, String charSet, ByteArrayOutputStream outputStream);
}
package com.hand.hls.hlcm.emay.util.http;
import java.util.List;
import java.util.Map;
/**
* http 响应: String
*
* @author Frank
*
*/
public class HttpResponseString extends HttpResponse<String> {
/**
*
* @param resultCode
* Http 结果代码
* @param httpCode
* Http链接Code
* @param headers
* Http响应头
* @param cookies
* http响应Cookies
* @param charSet
* http字符集
* @param result
* http响应数据
*/
public HttpResponseString(HttpResultCode resultCode, int httpCode, Map<String, String> headers, List<String> cookies, String charSet, String result) {
super(resultCode, httpCode, headers, cookies, charSet, result);
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;
/**
* 解析String响应的解析器
*
* @author Frank
*
*/
public class HttpResponseStringPraser implements HttpResponsePraser<HttpResponseString>{
@Override
public HttpResponseString prase(HttpResultCode resultCode, int httpCode, Map<String, String> headers, List<String> cookies, String charSet, ByteArrayOutputStream outputStream) {
String st = null;
try {
if(outputStream != null){
byte[] resultBytes = outputStream.toByteArray();
st = new String(resultBytes, charSet);
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return new HttpResponseString(resultCode, httpCode, headers, cookies, charSet, st);
}
}
package com.hand.hls.hlcm.emay.util.http;
/**
* HTTP 访问结果编码
*
* @author Frank
*
*/
public enum HttpResultCode {
SUCCESS("成功", "SUCCESS"), //
ERROR_URL_NULL("URL为空", "ERROR-URL-NULL"), //
ERROR_URL("URL访问失败", "ERROR-URL"), //
ERROR_HTTPS_SSL("HTTPS异常", "ERROR-HTTPS-SSL"), //
ERROR_METHOD("HTTP方法无法识别", "ERROR-METHOD"), //
ERROR_CHARSET("编码错误", "ERROR-CHARSET"), //
ERROR_CONNECT("访问失败", "ERROR-CONNECT"), //
ERROR_TIMEOUT("访问超时", "ERROR-TIMEOUT"), //
;
/**
* 名称
*/
private String name;
/**
* 编码
*/
private String code;
private HttpResultCode(String name, String code) {
this.name = name;
this.code = code;
}
public static String findNameByCode(String code) {
for (HttpResultCode oc : HttpResultCode.values()) {
if (oc.getCode().equals(code)) {
return oc.getName();
}
}
return null;
}
public static String findCodeByName(String name) {
for (HttpResultCode oc : HttpResultCode.values()) {
if (oc.getName().equals(name)) {
return oc.getCode();
}
}
return null;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
package com.hand.hls.hlcm.emay.util.http;
/**
* https 参数
*
* @author Frank
*
*/
public class HttpsParams {
private String password;// 密钥库密钥
private String keyStorePath;// 密钥库文件地址
private String trustStorePath;// 信任库文件地址
private String algorithm;// 指定交换数字证书的加密标准:JKS
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getKeyStorePath() {
return keyStorePath;
}
public void setKeyStorePath(String keyStorePath) {
this.keyStorePath = keyStorePath;
}
public String getTrustStorePath() {
return trustStorePath;
}
public void setTrustStorePath(String trustStorePath) {
this.trustStorePath = trustStorePath;
}
public String getAlgorithm() {
return algorithm;
}
public void setAlgorithm(String algorithm) {
this.algorithm = algorithm;
}
}
package com.hand.hls.hlcm.emay.util.http;
/**
* Https 请求实体<byte[]>
*
* @author Frank
*
*/
public class HttpsRequestBytes extends HttpRequest<byte[]> {
/**
*
* @param httpParams
* http请求参数
* @param httpsParams
* https参数
*/
public HttpsRequestBytes(HttpRequestParams<byte[]> httpParams, HttpsParams httpsParams) {
super(httpParams, httpsParams, new HttpRequestPraserBytes());
}
}
package com.hand.hls.hlcm.emay.util.http;
import java.util.Map;
/**
* Https 请求实体<Map<String, String>>
*
* @author Frank
*
*/
public class HttpsRequestKV extends HttpRequest<Map<String, String>> {
/**
*
* @param httpParams
* http请求参数
* @param httpsParams
* https参数
*/
public HttpsRequestKV(HttpRequestParams<Map<String, String>> httpParams, HttpsParams httpsParams) {
super(httpParams, httpsParams, new HttpRequestPraserKV());
}
}
package com.hand.hls.hlcm.emay.util.http;
/**
* Https 请求实体<String>
*
* @author Frank
*
*/
public class HttpsRequestString extends HttpRequest<String> {
/**
*
* @param httpParams
* http请求参数
* @param httpsParams
* https参数
*/
public HttpsRequestString(HttpRequestParams<String> httpParams, HttpsParams httpsParams) {
super(httpParams, httpsParams, new HttpRequestPraserString());
}
}
......@@ -128,3 +128,7 @@ session.filter.excludePattern=
#layout config
layout.gridButtonIgnoreReadModel=false
#emay dev
emay.appId=EUCP-EMY-SMS0-JBZOQ
emay.secretKey=3E6BA3366DCF8959
emay.host=bjmtn.b2m.cn:80
\ No newline at end of file
......@@ -86,7 +86,9 @@
t1.lease_channel,
t2.cf_direction,
t2.billing_status,
t2.cf_status
t2.cf_status,
t1.business_type,
t1.business_type_desc
from acr_invoice_contract_v t1, ACR_INVOICE_CONTRACT_CF_V t2
where
t1.contract_id=t2.contract_id
......@@ -94,9 +96,9 @@
'250',
t1.inv_object_taxpayer_type,
t1.object_taxpayer_type) = 'SMALL_SCALE_TAXPAYER' and
to_char(t2.due_date,'yyyy-mm') <= to_char(SYSDATE,'yyyy-mm')) or (t2.write_off_flag = 'FULL' and t1.contract_status not in('REPURING','REPUR')) or(nvl(t2.write_off_flag,'NOT')='FULL' and t1.contract_status in('REPURING','REPUR') and t2.cf_item<>1) or (nvl(t2.write_off_flag,'NOT')='PARTIAL' and t1.contract_status in('REPURING','REPUR') and t2.cf_item=1 ) )
to_char(t2.due_date,'yyyy-mm') <= to_char(SYSDATE,'yyyy-mm')) or (t2.write_off_flag = 'FULL' and t1.contract_status not in('REPURING','REPUR')) or(nvl(t2.write_off_flag,'NOT')='FULL' and t1.contract_status in('REPURING','REPUR') and t2.cf_item<>1) or (nvl(t2.write_off_flag,'NOT') <> 'NOT' and t1.contract_status in('REPURING','REPUR') and t2.cf_item=1 ) )
AND cf_item<> 9
AND ((t2.cf_status='RELEASE' and t1.contract_status not in('REPURING','REPUR') and t2.cf_direction='INFLOW') or(t1.contract_status in ('REPURING','REPUR') and t2.cf_item=250 and t2.cf_status='RELEASE' )or ( t2.cf_status in('BLOCK') and nvl(t2.write_off_flag,'NOT')='PARTIAL' and nvl(t2.billing_status,'NOT') != 'FULL' and t1.contract_status in ('REPURING','REPUR') and t2.cf_item =1 and t2.cf_direction='NONCASH' and nvl(t2.billing_amount,0) <> t2.received_amount))
AND ((t2.cf_status='RELEASE' and t1.contract_status not in('REPURING','REPUR') and t2.cf_direction='INFLOW') or(t1.contract_status in ('REPURING','REPUR') and t2.cf_item in(1,250) and t2.cf_status='RELEASE' )or ( t2.cf_status in('BLOCK') and nvl(t2.write_off_flag,'NOT')='PARTIAL' and nvl(t2.billing_status,'NOT') != 'FULL' and t1.contract_status in ('REPURING','REPUR') and t2.cf_item =1 and t2.cf_direction='NONCASH' and nvl(t2.billing_amount,0) <> t2.received_amount))
and t2.cashflow_id not in (20265,34267,24445)
and nvl(t2.billing_status,'NOT') != 'FULL'
--and t2.cf_direction='INFLOW'
......@@ -192,7 +194,9 @@
t1.lease_channel,
NULL cf_direction,
NULL billing_status,
NULL cf_status
NULL cf_status,
t1.business_type,
t1.business_type_desc
from acr_invoice_contract_v t1, acr_invoice_penalty_v t2
where
t2.contract_id=t1.contract_id
......@@ -283,6 +287,8 @@
<bm:field name="bp_id_agent_level1_n"/>
<bm:field name="termination_date"/>
<bm:field name="lease_channel"/>
<bm:field name="business_type_desc"/>
<bm:field name="business_type"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="billing_object_name" queryExpression="vv.billing_object_name = ${@billing_object_name}"/>
......@@ -314,6 +320,7 @@
<bm:query-field name="project_name" queryExpression="vv.project_name like &apos;%&apos;||${@project_name}||&apos;%&apos; "/>
<bm:query-field name="contract_name" queryExpression="vv.contract_name like &apos;%&apos;||${@contract_name}||&apos;%&apos; "/>
<bm:query-field name="document_type" queryExpression="vv.document_type=${@document_type}"/>
<bm:query-field name="business_type" queryExpression="vv.business_type=${@business_type}"/>
<bm:query-field name="contract_status" queryExpression="vv.contract_status = ${@contract_status}"/>
<bm:query-field name="bp_id_agent_level1" queryExpression="vv.bp_id_agent_level1 = ${@bp_id_agent_level1}"/>
<bm:query-field name="bp_id_agent_level1_n" queryExpression="vv.bp_id_agent_level1_n like &apos;%&apos;||${@bp_id_agent_level1_n}||&apos;%&apos;"/>
......
......@@ -318,7 +318,10 @@
AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') >
to_char(to_date(${@base_date}, 'yyyy-mm-dd'),
'yyyymm')),0) net_future_interest
'yyyymm')),0) net_future_interest,
(Select bt.description
From hls_business_type bt
Where bt.business_type = t.business_type) business_type_n
FROM con_contract t
WHERE t.data_class = 'NORMAL'
......@@ -327,6 +330,9 @@
trunc(to_date(${@due_date_from}, 'yyyy-mm-dd'))
AND trunc(t.lease_start_date) <=
trunc(to_date(${@due_date_to}, 'yyyy-mm-dd'))
And ((${@business_type} is null) or
(${@business_type} is not null and
t.business_type = ${@business_type}))
) v
......
......@@ -29,5 +29,6 @@
<bm:query-field name="journal_date_from" queryExpression="to_char(t.journal_date,&apos;yyyy-mm-dd&apos;) &gt;= ${@journal_date_from}"/>
<bm:query-field name="journal_date_to" queryExpression="to_char(t.journal_date,&apos;yyyy-mm-dd&apos;) &lt;= ${@journal_date_to}"/>
<bm:query-field name="bp_id_agent_level1" queryExpression="t.bp_id_agent_level1=${@bp_id_agent_level1}"/>
<bm:query-field name="business_type" queryExpression="t.business_type=${@business_type}"/>
</bm:query-fields>
</bm:model>
......@@ -70,8 +70,9 @@
<bm:pk-field name="contract_id"/>
</bm:primary-key>
<bm:query-fields>
<bm:query-field field="contract_number" queryExpression="contract_number like upper(&apos;%&apos;||${@contract_number}||&apos;%&apos;)"/>
<!-- <bm:query-field field="contract_number" queryExpression="contract_number like upper(&apos;%&apos;||${@contract_number}||&apos;%&apos;)"/>-->
<bm:query-field field="owner_user_id" queryOperator="="/>
<bm:query-field field="contract_number" queryOperator="="/>
<bm:query-field field="bp_id_tenant" queryOperator="="/>
<!-- <bm:query-field field="lease_organization" queryOperator="="/>-->
<bm:query-field field="contract_status" queryOperator="="/>
......
......@@ -51,7 +51,10 @@
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <= cwo.creation_date),
0)) As unreceived_amount,
nvl(cwo.trans_pently_flag, 'N') trans_pently_flag
decode((Select count(1)
From penalty_trans_write_off t1
Where t1.csh_write_off_id = cwo.write_off_id
And t1.trans_pently_hd_id = ${@record_id}),0,'N','Y')trans_pently_flag
From con_contract_cashflow ccc,
con_contract c,
hls_bp_master h,
......
......@@ -78,6 +78,10 @@
(select contract_number
from con_contract
where contract_id = t.contract_id) contract_number,
(Select bt.description
From hls_business_type bt,con_contract ct
Where bt.business_type = ct.business_type
and ct.contract_id = t.contract_id) As business_type_n,
t.account_code account_id_n,
(select description_text
from fnd_descriptions
......@@ -164,6 +168,10 @@
(select contract_number
from con_contract
where contract_id = tt.contract_id) contract_number,
(Select bt.description
From hls_business_type bt,con_contract ct
Where bt.business_type = ct.business_type
and ct.contract_id = tt.contract_id) As business_type_n,
'小计:' account_id_n,
null account_name,
tt.contract_id,
......@@ -259,6 +267,7 @@
p_due_date =>to_date(${@due_date},'yyyy-mm-dd'),
p_user_id =>${/session/@user_id},
p_bp_id =>${@bp_id},
p_business_type =>${@business_type},
p_overday1 =>${@overday1},
p_overday2 =>${@overday2},
p_overday3 =>${@overday3},
......@@ -274,6 +283,7 @@
</bm:operations>
<bm:fields>
<bm:field name="division_n"/>
<bm:field name="business_type_n"/>
<bm:field name="contract_id"/>
<bm:field name="bp_code"/>
<bm:field name="contract_number"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select ccw.due_amount a,ccw.due_amount b from con_contract_cashflow ccw where rownum<=2
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select ccw.due_amount a,ccw.due_amount b from con_contract_cashflow ccw where rownum<=5
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -50,7 +50,18 @@
p_role_flag => ${@role_flag},
p_csh_date => ${@csh_date},
p_ref_v04 => ${@ref_v04},
p_user_id => ${/session/@user_id});
p_user_id => ${/session/@user_id},
p_err_msg=> ${@p_err_msg});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="p_err_msg" dataType="java.lang.String" input="false" output="true" outputPath="@p_err_msg"/>
</bm:parameters>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
hls_monthend_new_pkg.csh_check_acr(p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
......
......@@ -29,7 +29,7 @@ SELECT h.period_year,
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n03 = l.journal_header_id)
AND ROWNUM = 1) invoice_date,
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))) amount_tax,
decode(reference6, NULL, 0, NVL(round(l.amount_cr,2),0)) amount_tax,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
'违约金',
......@@ -48,69 +48,72 @@ SELECT h.period_year,
0,
'设备款')
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) times,
WHERE cashflow_id = l.cashflow_id),
'CON_REPURCHASE',
'违约金') times,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
h.journal_date,
'HL_SALES_TAX_ACT_NEW',
(SELECT due_date
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) due_date,
WHERE cashflow_id = l.cashflow_id),
'CON_REPURCHASE',
h.journal_date) due_date,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)),
decode(reference6, NULL, l.amount_dr, 0),
'HL_SALES_TAX_ACT_NEW',
(SELECT due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) due_amount,
WHERE cashflow_id = l.cashflow_id),
decode(reference6, NULL, l.amount_dr, 0),
'CON_REPURCHASE',
decode(reference6, NULL, l.amount_dr, 0)) due_amount,
(SELECT principal
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id) principal,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)),
decode(reference6, NULL, l.amount_dr, 0),
'HL_SALES_TAX_ACT_NEW',
(SELECT decode(cf_item, 8, due_amount, interest)
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) interest,
WHERE cashflow_id = l.cashflow_id),
'CON_REPURCHASE',
decode(reference6, NULL, l.amount_dr, 0)
) interest,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))),
decode(reference6, NULL, 0, NVL(l.amount_cr,0)),
'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) vat_due_amount,
WHERE cashflow_id = l.cashflow_id),
'CON_REPURCHASE',
decode(reference6, NULL, 0, NVL(l.amount_cr,0))) vat_due_amount,
nvl(ROUND((DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))),
l.amount_cr/(l.reference7-l.amount_cr),
'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id))) /
(DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)),
'HL_SALES_TAX_ACT_NEW',
(SELECT due_amount
(SELECT vat_due_amount/(due_amount-vat_due_amount)
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id
AND due_amount > 0)) -
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))),
'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id
AND vat_due_amount > 0))),
2) * 100,
0) || '%' vat_rate,
h.je_transaction_code
FROM hls_journal_header h, hls_journal_detail l
WHERE cashflow_id = l.cashflow_id),
l.amount_cr/(l.reference7-l.amount_cr),
'CON_REPURCHASE',
l.amount_cr/(l.reference7-l.amount_cr))),2) * 100,0)|| '%' vat_rate,
h.je_transaction_code,
l.cashflow_id
FROM hls_journal_header h, hls_journal_detail l,gld_accounts ga
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code IN
and ga.account_id=l.account_id
and ga.account_code='2221001020'
and h.reversed_flag='N'
AND ((h.je_transaction_code IN
('HL_SALES_TAX_ACT_NEW', 'HL_CSH_CONSOLIDATION_DALAY')
)or(h.je_transaction_code = 'CON_REPURCHASE' and
instr(h.description, '调平') > 0))
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
......@@ -118,20 +121,29 @@ SELECT h.period_year,
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') <= ${@base_period}
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n04 = l.journal_line_id))
GROUP BY l.reference1,
reference3,
reference4,
h.sbo_num,
l.cashflow_id,
l.journal_header_id,
h.je_transaction_code,
h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date
li.ref_n03 = l.journal_header_id))
UNION
select vl.*
from ET_VAT_JOURNAL_LV vl
where not EXISTS
(SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date, 'yyyymm') <= ${@base_period}
AND (li.cashflow_id = vl.cashflow_id))
UNION
select rl.*
from REPURSE_VAT_JOURNAL_LV rl
where not EXISTS
(SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date, 'yyyymm') <= ${@base_period}
AND (li.cashflow_id = rl.cashflow_id))
UNION
UNION
SELECT h.period_year,
h.period_num,
......@@ -153,7 +165,7 @@ SELECT h.period_year,
AND li.cf_item = 2
and hi.contract_id = l.source_doc_id
AND ROWNUM = 1) invoice_date,
l.amount_dr amount_tax,
round(l.amount_dr,2) amount_tax,
'首付款' times,
(SELECT due_date
......@@ -186,26 +198,20 @@ SELECT h.period_year,
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1) vat_due_amount,
NVL(ROUND((
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1)
/
(SELECT net_due_amount
NVL(ROUND(
(SELECT vat_due_amount/net_due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1)
),
AND ROWNUM = 1),
2) * 100,
0) || '%' vat_rate,
h.je_transaction_code
h.je_transaction_code,
l.cashflow_id
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
and h.reversed_flag='N'
AND h.je_transaction_code = 'LEASE_INCEPT'
AND l.je_template_ln_id = 8797
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
......@@ -223,6 +229,7 @@ SELECT h.period_year,
</bm:operations>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="to_char(t1.journal_date,'yyyymm') = ${@base_period}"/>
<bm:data-filter enforceOperations="query" expression="t1.amount_tax > 0"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
......
......@@ -29,7 +29,7 @@ SELECT h.period_year,
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n03 = l.journal_header_id)
AND ROWNUM = 1) invoice_date,
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))) amount_tax,
decode(reference6, NULL, 0, NVL(round(l.amount_cr,2),0)) amount_tax,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
'违约金',
......@@ -48,67 +48,72 @@ SELECT h.period_year,
0,
'设备款')
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) times,
WHERE cashflow_id = l.cashflow_id),
'CON_REPURCHASE',
'违约金') times,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
h.journal_date,
'HL_SALES_TAX_ACT_NEW',
(SELECT due_date
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) due_date,
WHERE cashflow_id = l.cashflow_id),
'CON_REPURCHASE',
h.journal_date) due_date,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, nvl(l.amount_dr,0), 0)),
decode(reference6, NULL, l.amount_dr, 0),
'HL_SALES_TAX_ACT_NEW',
(SELECT due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) due_amount,
WHERE cashflow_id = l.cashflow_id),
decode(reference6, NULL, l.amount_dr, 0),
'CON_REPURCHASE',
decode(reference6, NULL, l.amount_dr, 0)) due_amount,
(SELECT principal
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id) principal,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)),
decode(reference6, NULL, l.amount_dr, 0),
'HL_SALES_TAX_ACT_NEW',
(SELECT decode(cf_item, 8, due_amount, interest)
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) interest,
WHERE cashflow_id = l.cashflow_id),
'CON_REPURCHASE',
decode(reference6, NULL, l.amount_dr, 0)
) interest,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))),
decode(reference6, NULL, 0, NVL(l.amount_cr,0)),
'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) vat_due_amount,
WHERE cashflow_id = l.cashflow_id),
'CON_REPURCHASE',
decode(reference6, NULL, 0, NVL(l.amount_cr,0))) vat_due_amount,
nvl(ROUND((DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))),
'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id))) /
(DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)),
'HL_SALES_TAX_ACT_NEW',
(SELECT due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id
AND due_amount > 0)) -
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))),
l.amount_cr/(l.reference7-l.amount_cr),
'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount
(SELECT vat_due_amount/(due_amount-vat_due_amount)
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id
AND vat_due_amount > 0))),
2) * 100,
0) || '%' vat_rate,
h.je_transaction_code
FROM hls_journal_header h, hls_journal_detail l
WHERE cashflow_id = l.cashflow_id),
l.amount_cr/(l.reference7-l.amount_cr),
'CON_REPURCHASE',
l.amount_cr/(l.reference7-l.amount_cr))),2) * 100,0)|| '%' vat_rate,
h.je_transaction_code,
l.cashflow_id
FROM hls_journal_header h, hls_journal_detail l,gld_accounts ga
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code ='HL_SALES_TAX_ACT_NEW'
and ga.account_id=l.account_id
and ga.account_code='2221001020'
and h.reversed_flag='N'
AND ((h.je_transaction_code IN
('HL_SALES_TAX_ACT_NEW', 'HL_CSH_CONSOLIDATION_DALAY')
)or(h.je_transaction_code = 'CON_REPURCHASE' and
instr(h.description, '调平') > 0))
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
......@@ -116,20 +121,29 @@ SELECT h.period_year,
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') < ${@base_period}
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n04 = l.journal_line_id))
GROUP BY l.reference1,
reference3,
reference4,
h.sbo_num,
l.cashflow_id,
l.journal_header_id,
h.je_transaction_code,
h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date
li.ref_n03 = l.journal_header_id))
UNION
select vl.*
from ET_VAT_JOURNAL_LV vl
where not EXISTS
(SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date, 'yyyymm') < ${@base_period}
AND (li.cashflow_id = vl.cashflow_id))
UNION
select rl.*
from REPURSE_VAT_JOURNAL_LV rl
where not EXISTS
(SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date, 'yyyymm') < ${@base_period}
AND (li.cashflow_id = rl.cashflow_id))
UNION
UNION
SELECT h.period_year,
h.period_num,
......@@ -151,7 +165,7 @@ SELECT h.period_year,
AND li.cf_item = 2
and hi.contract_id = l.source_doc_id
AND ROWNUM = 1) invoice_date,
l.amount_dr amount_tax,
round(l.amount_dr,2) amount_tax,
'首付款' times,
(SELECT due_date
......@@ -184,106 +198,44 @@ SELECT h.period_year,
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1) vat_due_amount,
NVL(ROUND((
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1)
/
(SELECT net_due_amount
NVL(ROUND(
(SELECT vat_due_amount/net_due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1)
),
AND ROWNUM = 1),
2) * 100,
0) || '%' vat_rate,
h.je_transaction_code
h.je_transaction_code,
l.cashflow_id
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
and h.reversed_flag='N'
AND h.je_transaction_code = 'LEASE_INCEPT'
AND l.je_template_ln_id = 8797
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS
(SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') <= ${@base_period}
AND ((hi.contract_id = l.source_doc_id AND li.cf_item IN (2))))
union
SELECT h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date,
h.sbo_num journal_num,
reference3 contract_number,
reference1 bp_code,
(SELECT BP_NAME
FROM hls_bp_master
WHERE bp_code = reference1
AND ROWNUM = 1) bp_name,
l.journal_header_id,
(SELECT hi.invoice_date
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.reversed_flag = 'N'
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n03 = l.journal_header_id)
AND ROWNUM = 1) invoice_date,
SUM(calc_tax_amount(l.amount_dr)) amount_tax,
'违约金' times,
h.journal_date due_date,
SUM(l.amount_dr) due_amount,
NULL principal,
SUM(l.amount_dr) interest,
SUM(calc_tax_amount(l.amount_dr)) vat_due_amount,
nvl(ROUND( SUM(calc_tax_amount(l.amount_dr))/
(SUM(amount_dr) -SUM(calc_tax_amount(l.amount_dr))
),
2) * 100,
0) || '%' vat_rate,
h.je_transaction_code
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code ='HL_CSH_CONSOLIDATION_DALAY'
AND l.amount_dr IS NOT NULL
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') < ${@base_period}
AND li.ref_n04 = l.journal_line_id)
GROUP BY l.reference1,
reference3,
reference4,
h.sbo_num,
l.cashflow_id,
l.journal_header_id,
h.je_transaction_code,
h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date
) t1
AND ((hi.contract_id = l.source_doc_id AND li.cf_item IN (2))))
) t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.journal_date &lt;= add_months(last_day(to_date(${@base_period},'yyyymm')),-1)"/>
<bm:data-filter enforceOperations="query" expression="t1.amount_tax > 0"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
<bm:query-field name="bp_name" queryExpression="t1.bp_name = ${@bp_name}"/>
<bm:query-field name="journal_date" queryExpression="to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"/>
<bm:query-field name="base_period" queryExpression="to_char(t1.journal_date,'yyyymm') &lt; ${@base_period}"/>
<bm:query-field name="base_period" queryExpression="to_number(to_char(t1.journal_date,'yyyymm')) &lt; to_number(${@base_period})"/>
<bm:query-field name="invoice_date" queryExpression="to_char(t1.invoice_date,'yyyy-mm-dd') = ${@invoice_date}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: ZLF
$Date: 2015-1-21 下午3:09:38
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT * FROM (
SELECT h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date,
h.sbo_num journal_num,
reference3 contract_number,
reference1 bp_code,
(SELECT BP_NAME
FROM hls_bp_master
WHERE bp_code = reference1
AND ROWNUM = 1) bp_name,
l.journal_header_id,
(SELECT hi.invoice_date
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.reversed_flag = 'N'
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n03 = l.journal_header_id)
AND ROWNUM = 1) invoice_date,
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))) amount_tax,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
'违约金',
'HL_SALES_TAX_ACT_NEW',
(SELECT DECODE(cf_item,
2,
'首付款',
8,
'留购价',
1,
times,
200,
'提前结清款',
250,
'回购款',
0,
'设备款')
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) times,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
h.journal_date,
'HL_SALES_TAX_ACT_NEW',
(SELECT due_date
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) due_date,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, nvl(l.amount_dr,0), 0)),
(SELECT due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) due_amount,
(SELECT principal
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id) principal,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)),
'HL_SALES_TAX_ACT_NEW',
(SELECT decode(cf_item, 8, due_amount, interest)
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) interest,
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))),
'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) vat_due_amount,
nvl(ROUND((DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))),
'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id))) /
(DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)),
'HL_SALES_TAX_ACT_NEW',
(SELECT due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id
AND due_amount > 0)) -
DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))),
'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id
AND vat_due_amount > 0))),
2) * 100,
0) || '%' vat_rate,
h.je_transaction_code
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code ='HL_SALES_TAX_ACT_NEW'
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') < ${@base_period}
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n04 = l.journal_line_id))
GROUP BY l.reference1,
reference3,
reference4,
h.sbo_num,
l.cashflow_id,
l.journal_header_id,
h.je_transaction_code,
h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date
UNION
SELECT h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date,
h.sbo_num journal_num,
reference3 contract_number,
reference1 bp_code,
(SELECT BP_NAME
FROM hls_bp_master
WHERE bp_code = reference1
AND ROWNUM = 1) bp_name,
l.journal_header_id,
(SELECT hi.invoice_date
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.reversed_flag = 'N'
AND hi.vat_interface_status = 'BACK'
AND li.cf_item = 2
and hi.contract_id = l.source_doc_id
AND ROWNUM = 1) invoice_date,
l.amount_dr amount_tax,
'首付款' times,
(SELECT due_date
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1) due_date,
(SELECT due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1)
due_amount,
(SELECT due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1) principal,
(SELECT interest
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1) interest,
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1) vat_due_amount,
NVL(ROUND((
(SELECT vat_due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1)
/
(SELECT net_due_amount
FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id
AND cf_item = 2
AND ROWNUM = 1)
),
2) * 100,
0) || '%' vat_rate,
h.je_transaction_code
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code = 'LEASE_INCEPT'
AND l.je_template_ln_id = 8797
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS
(SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') <= ${@base_period}
AND ((hi.contract_id = l.source_doc_id AND li.cf_item IN (2))))
union
SELECT h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date,
h.sbo_num journal_num,
reference3 contract_number,
reference1 bp_code,
(SELECT BP_NAME
FROM hls_bp_master
WHERE bp_code = reference1
AND ROWNUM = 1) bp_name,
l.journal_header_id,
(SELECT hi.invoice_date
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.reversed_flag = 'N'
AND (li.cashflow_id = l.cashflow_id OR
li.ref_n03 = l.journal_header_id)
AND ROWNUM = 1) invoice_date,
SUM(calc_tax_amount(l.amount_dr)) amount_tax,
'违约金' times,
h.journal_date due_date,
SUM(l.amount_dr) due_amount,
NULL principal,
SUM(l.amount_dr) interest,
SUM(calc_tax_amount(l.amount_dr)) vat_due_amount,
nvl(ROUND( SUM(calc_tax_amount(l.amount_dr))/
(SUM(amount_dr) -SUM(calc_tax_amount(l.amount_dr))
),
2) * 100,
0) || '%' vat_rate,
h.je_transaction_code
FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null
AND h.je_transaction_code ='HL_CSH_CONSOLIDATION_DALAY'
AND l.amount_dr IS NOT NULL
and( (trunc(h.journal_date)<=trunc(to_date('2020-01-31','yyyy-mm-dd')) and h.description='MANUAL_IMPORT')or(trunc(h.journal_date)>trunc(to_date('2020-01-31','yyyy-mm-dd'))))
AND not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') < ${@base_period}
AND li.ref_n04 = l.journal_line_id)
GROUP BY l.reference1,
reference3,
reference4,
h.sbo_num,
l.cashflow_id,
l.journal_header_id,
h.je_transaction_code,
h.period_year,
h.period_num,
h.internal_period_num,
h.journal_date
) t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.journal_date &lt;= add_months(last_day(to_date(${@base_period},'yyyymm')),-1)"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
<bm:query-field name="bp_name" queryExpression="t1.bp_name = ${@bp_name}"/>
<bm:query-field name="journal_date" queryExpression="to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"/>
<bm:query-field name="base_period" queryExpression="to_char(t1.journal_date,'yyyymm') &lt; ${@base_period}"/>
<bm:query-field name="invoice_date" queryExpression="to_char(t1.invoice_date,'yyyy-mm-dd') = ${@invoice_date}"/>
</bm:query-fields>
</bm:model>
......@@ -44,7 +44,7 @@
WHERE t.session_id=${/session/@session_id}
) t1
#WHERE_CLAUSE#
order by invoice_hd_id,due_date ASC,invoice_line_id asc
order by invoice_hd_id,due_date ASC,invoice_number asc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.document_category=&apos;CONTRACT&apos;" fetchAll="true" model="basic.hls_document_type_for_lov" rootPath="con501_document_type_path"/>
<a:model-query defaultWhereClause="document_category=&apos;CONTRACT&apos;" fetchAll="true" model="basic.hls_document_type_v_lov" rootPath="contract_type_list"/>
<a:model-query defaultWhereClause="t1.enabled_flag = &apos;Y&apos;" model="prj.PRJ505.con_billing_method" rootPath="billing_method_list"/>
<a:model-query defaultWhereClause="t1.document_category=&apos;CONTRACT&apos;" fetchAll="true"
model="basic.hls_document_type_for_lov" rootPath="con501_document_type_path"/>
<a:model-query defaultWhereClause="document_category=&apos;CONTRACT&apos;" fetchAll="true"
model="basic.hls_document_type_v_lov" rootPath="contract_type_list"/>
<a:model-query defaultWhereClause="t1.enabled_flag = &apos;Y&apos;" model="prj.PRJ505.con_billing_method"
rootPath="billing_method_list"/>
<a:model-query fetchAll="true" model="basic.hls_lease_channel_for_lov" rootPath="acr510_lease_list"/>
<!--
<a:model-query fetchAll="true" model="acr.ACR510.acr_bp_agent_ds" rootPath="bp_id_agent_ds"/>
-->
</a:init-procedure>
<a:view>
<a:link id="pageLink_select_cashflow" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_select_cashflow.lview"/>
<a:link id="pageLink_select_cashflow"
url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_select_cashflow.lview"/>
<a:link id="pageLink_conditionScreen_welcome" url="${/request/@context_path}/welcome.screen"/>
<a:link id="pageLink_invoice_create" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_create_invoice.lview"/>
<a:link id="pageLink_penalty_create" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_penalty_invoice.lview"/>
<a:link id="svcLink_save_selected" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_save_selected.lsc"/>
<a:link id="svcLink_save_penalty_selected" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_save_penalty_selected.lsc"/>
<!--
<a:link id="pageLink_invoice_create"
url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_create_invoice.lview"/>
<a:link id="pageLink_penalty_create"
url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_penalty_invoice.lview"/>
<a:link id="svcLink_save_selected"
url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_save_selected.lsc"/>
<a:link id="svcLink_save_penalty_selected"
url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_save_penalty_selected.lsc"/>
<!--
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
-->
-->
<script><![CDATA[
//校验函数,开票头信息不能为空。
function validate_contractDs(record, name, value) {
if (name == 'object_tax_registry_num' || name == 'invoice_bp_address_phone_num' || name == 'invoice_bp_bank_account') {
if (Ext.isEmpty(value)) {
//if (record.get('bill_object_bp_class') == 'NP' || record.get('object_taxpayer_type') == 'SMALL_SCALE_TAXPAYER' || record.get('tax_type_vat') != 'Y') {
if (record.get('bill_object_bp_class') == 'NP'||record.get('object_taxpayer_type')=='SMALL_SCALE_TAXPAYER') {
if (record.get('bill_object_bp_class') == 'NP' || record.get('object_taxpayer_type') == 'SMALL_SCALE_TAXPAYER') {
return true;
} else if (record.get('bill_object_bp_class') == 'ORG') {
return '必输字段不能为空!';
......@@ -35,15 +40,15 @@
}
return true;
}
function render_contractDs_grid(value,record,name){
if(name=='billing_object_name')
{
record.getField('billing_object_name').setLovPara('contract_id',record.get('contract_id'));
function render_contractDs_grid(value, record, name) {
if (name == 'billing_object_name') {
record.getField('billing_object_name').setLovPara('contract_id', record.get('contract_id'));
}
return value;
}
function contractDs_grid_query()
{
function contractDs_grid_query() {
// $('condition_queryForm').close();
$('ar510n_cashflow_ds').query();
}
......@@ -68,84 +73,95 @@
$('cashflowDs_grid').clear();
}
function winOpen_invoice_create()
{
function winOpen_invoice_create() {
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
var group_billing_method;
if (final_bill_flag == 'Y'){
if (final_bill_flag == 'Y') {
group_billing_method = 'GROUP_BY_CONTRACT';
}else{
} else {
group_billing_method = 'GROUP_BY_TIMES';
}
var win = new Leaf.Window({
id: 'acr_invoice_create_invoice',
url: $('pageLink_invoice_create').getUrl(),
params:{
company_id:'${/session/@company_id}',
group_billing_method:group_billing_method
params: {
company_id: '${/session/@company_id}',
group_billing_method: group_billing_method
},
title: '${l:ACR510.WIN_TITLE.CREATE}',
fullScreen:true
fullScreen: true
});
win.on('close',function(){
win.on('close', function () {
contractDs_grid_query();
});
}
function winOpen_penalty_create()
{
function winOpen_penalty_create() {
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
var group_billing_method='NO_GROUP';
var group_billing_method = 'NO_GROUP';
var win = new Leaf.Window({
id: 'acr_invoice_penalty_invoice',
url: $('pageLink_penalty_create').getUrl(),
params:{
company_id:'${/session/@company_id}',
group_billing_method:group_billing_method
params: {
company_id: '${/session/@company_id}',
group_billing_method: group_billing_method
},
title: '${l:ACR510.WIN_TITLE.CREATE}',
fullScreen:true
fullScreen: true
});
win.on('close',function(){
win.on('close', function () {
contractDs_grid_query();
});
}
function invoiceHd_confirm()
{
function invoiceHd_confirm() {
Leaf.Masker.mask(Ext.getBody());
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
var cat_ini_flag = $('allConditionDs').getAt(0).get('cat_ini_flag');
var ds=$('ar510n_cashflow_ds');
if(!ds.validate(true))
{
Leaf.Masker.unmask(Ext.getBody());;
var ds = $('ar510n_cashflow_ds');
if (!ds.validate(true)) {
Leaf.Masker.unmask(Ext.getBody());
return;
}
if(ds.getSelected().length==0)
{
if (ds.getSelected().length == 0) {
Leaf.Masker.unmask(Ext.getBody());
return;
}
var datas = ds.getJsonData(true);
var lease_count=0, leaseback_count=0;
for (var i = 0; i < datas.length; i++) {
if (datas[i].business_type == 'LEASE') {
lease_count = lease_count + 1;
} else if (datas[i].business_type == 'LEASEBACK') {
leaseback_count = leaseback_count + 1;
}
}
//直回租分开开票
if (lease_count > 0 && leaseback_count > 0) {
$L.showErrorMessage('提示', '直租和回租合同需分开开票!');
Leaf.Masker.unmask(Ext.getBody());
return;
}
//判断是不是罚息
var first_cf_item=datas[0].cf_item;
var first_cf_item = datas[0].cf_item;
//全是罚息
if (first_cf_item==9) {
var invoice_flag1=true;
if (first_cf_item == 9) {
var invoice_flag1 = true;
for (var i = 0; i < datas.length; i++) {
if(datas[i].cf_item!=9){
invoice_flag1=false;
$L.showErrorMessage('提示','罚息不能和其他类型的现金流同时开票!');
if (datas[i].cf_item != 9) {
invoice_flag1 = false;
$L.showErrorMessage('提示', '罚息不能和其他类型的现金流同时开票!');
Leaf.Masker.unmask(Ext.getBody());
return;
}
}
//跳转到新的页面
if(invoice_flag1){
if (invoice_flag1) {
for (var i = 0; i < datas.length; i++) {
datas[i].final_bill_flag = final_bill_flag;
......@@ -169,7 +185,7 @@
scope: this
});
}
}else {
} else {
var invoice_flag2 = true;
for (var i = 0; i < datas.length; i++) {
if (datas[i].cf_item == 9) {
......@@ -206,6 +222,7 @@
}
}
function queryUpdateFunction(ds, record, name, value, oldvalue) {
if (name == 'lease_channel') {
......@@ -219,6 +236,7 @@
}
}
}
]]></script>
<a:dataSets>
<a:dataSet id="acr510_bp_class" lookupCode="HLS211_BP_CLASS"/>
......@@ -228,7 +246,8 @@
<a:dataSet id="overdue_status_ds" lookupCode="YES_NO"/>
<a:dataSet id="hls_lease_channel_ds" loadData="true" model="basic.hls_lease_channel_for_lov"/>
<a:dataSet id="contract_status_ds" autoQuery="true" fetchAll="true" queryUrl="${/request/@context_path}/autocrud/acr.ACR510.contract_status_lov/query?lease_channel=&apos;00&apos;"/>
<a:dataSet id="contract_status_ds" autoQuery="true" fetchAll="true"
queryUrl="${/request/@context_path}/autocrud/acr.ACR510.contract_status_lov/query?lease_channel=&apos;00&apos;"/>
<a:dataSet id="acr510_document_type_name_ds">
<a:datas dataSource="/model/con501_document_type_path"/>
......@@ -239,26 +258,42 @@
<a:dataSet id="billingMethodDs">
<a:datas dataSource="/model/billing_method_list"/>
</a:dataSet>
<!-- <a:dataSet id="bp_agent_ds">
<a:datas dataSource="/model/bp_id_agent_ds"/>
</a:dataSet>-->
<a:dataSet id="business_type_desc_ds">
<a:datas>
<a:record code_value="LEASE" code_value_name="直租"/>
<a:record code_value="LEASEBACK" code_value_name="售后回租"/>
</a:datas>
</a:dataSet>
<a:dataSet id="allConditionDs" autoCreate="true">
<a:fields>
<a:field name="object_taxpayer_type_desc" displayField="code_value_name" options="taxpayer_type_ds" returnField="object_taxpayer_type" valueField="code_value"/>
<a:field name="bill_object_bp_class_desc" displayField="code_value_name" options="acr510_bp_class" returnField="bill_object_bp_class" valueField="code_value"/>
<a:field name="invoice_type_desc" displayField="code_value_name" options="acr510_invoiceKindDs" returnField="invoice_type" valueField="code_value"/>
<a:field name="overdue_status_desc" displayField="code_value_name" options="overdue_status_ds" returnField="overdue_status" valueField="code_value"/>
<a:field name="contract_status_desc" displayField="code_value_name" options="contract_status_ds" returnField="contract_status" valueField="code_value"/>
<a:field name="contract_status" />
<a:field name="project_number_from" lovGridHeight="300" lovHeight="450" lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500" title="ACR510.FIELD.PROJECT_NUMBER_FROM">
<a:field name="business_type"/>
<a:field name="business_type_desc" displayField="code_value_name" options="business_type_desc_ds"
returnField="business_type" valueField="code_value"/>
<a:field name="object_taxpayer_type_desc" displayField="code_value_name" options="taxpayer_type_ds"
returnField="object_taxpayer_type" valueField="code_value"/>
<a:field name="bill_object_bp_class_desc" displayField="code_value_name" options="acr510_bp_class"
returnField="bill_object_bp_class" valueField="code_value"/>
<a:field name="invoice_type_desc" displayField="code_value_name" options="acr510_invoiceKindDs"
returnField="invoice_type" valueField="code_value"/>
<a:field name="overdue_status_desc" displayField="code_value_name" options="overdue_status_ds"
returnField="overdue_status" valueField="code_value"/>
<a:field name="contract_status_desc" displayField="code_value_name" options="contract_status_ds"
returnField="contract_status" valueField="code_value"/>
<a:field name="contract_status"/>
<a:field name="project_number_from" lovGridHeight="300" lovHeight="450"
lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500"
title="ACR510.FIELD.PROJECT_NUMBER_FROM">
<a:mapping>
<a:map from="project_number" to="project_number_from"/>
<a:map from="project_name" to="project_name_from"/>
</a:mapping>
</a:field>
<a:field name="lease_channel"/>
<a:field name="lease_channel_desc" displayField="description" options="hls_lease_channel_ds" returnField="lease_channel" valueField="lease_channel"/>
<a:field name="project_number_to" lovGridHeight="300" lovHeight="450" lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500" title="ACR510.FIELD.PROJECT_NUMBER_TO">
<a:field name="lease_channel_desc" displayField="description" options="hls_lease_channel_ds"
returnField="lease_channel" valueField="lease_channel"/>
<a:field name="project_number_to" lovGridHeight="300" lovHeight="450"
lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500"
title="ACR510.FIELD.PROJECT_NUMBER_TO">
<a:mapping>
<a:map from="project_number" to="project_number_to"/>
<a:map from="project_name" to="project_name_to"/>
......@@ -268,19 +303,24 @@
<a:field name="project_name_to" readOnly="true"/>
<a:field name="contract_number"/>
<!-- <a:field name="invoice_title"/>-->
<a:field name="billing_object_name" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="basic.hls_bp_master_v_for_lov" lovWidth="600" title="承租人">
<a:field name="billing_object_name" lovGridHeight="300" lovHeight="450" lovLabelWidth="100"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="600" title="承租人">
<a:mapping>
<a:map from="bp_code" to="billing_object_name"/>
<a:map from="bp_name" to="billing_object_name"/>
</a:mapping>
</a:field>
<a:field name="bp_code_tenant_from" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="basic.hls_bp_master_v_for_lov" lovWidth="600" title="ACR510.FIELD.BP_CODE_TENANT_FROM">
<a:field name="bp_code_tenant_from" lovGridHeight="300" lovHeight="450" lovLabelWidth="100"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="600"
title="ACR510.FIELD.BP_CODE_TENANT_FROM">
<a:mapping>
<a:map from="bp_code" to="bp_code_tenant_from"/>
<a:map from="bp_name" to="bp_name_tenant_from"/>
</a:mapping>
</a:field>
<a:field name="bp_code_tenant_to" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="basic.hls_bp_master_v_for_lov" lovWidth="600" title="ACR510.FIELD.BP_CODE_TENANT_TO">
<a:field name="bp_code_tenant_to" lovGridHeight="300" lovHeight="450" lovLabelWidth="100"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="600"
title="ACR510.FIELD.BP_CODE_TENANT_TO">
<a:mapping>
<a:map from="bp_code" to="bp_code_tenant_to"/>
<a:map from="bp_name" to="bp_name_tenant_to"/>
......@@ -300,14 +340,17 @@
</a:mapping>
</a:field>
<a:field name="cf_item"/>
<a:field name="cf_item_desc" lovGridHeight="300" lovHeight="500" lovService="acr.ACR510.hls_cashflow_item_v_lov" lovWidth="850" title="ACR510.ACR_INVOICE_CONTRACT_CF_V.CF_ITEM_DESC">
<a:field name="cf_item_desc" lovGridHeight="300" lovHeight="500"
lovService="acr.ACR510.hls_cashflow_item_v_lov" lovWidth="850"
title="ACR510.ACR_INVOICE_CONTRACT_CF_V.CF_ITEM_DESC">
<a:mapping>
<a:map from="cf_item" to="cf_item"/>
<a:map from="cf_item_desc" to="cf_item_desc"/>
</a:mapping>
</a:field>
<a:field name="billing_method"/>
<a:field name="billing_method_desc" displayField="description" options="billingMethodDs" returnField="billing_method" valueField="billing_method"/>
<a:field name="billing_method_desc" displayField="description" options="billingMethodDs"
returnField="billing_method" valueField="billing_method"/>
<a:field name="document_type_desc"/>
<a:field name="lease_start_date_from"/>
<a:field name="lease_start_date_to"/>
......@@ -320,17 +363,19 @@
<a:field name="con_search_term_1"/>
<a:field name="prj_search_term_2"/>
<a:field name="con_search_term_2"/>
<a:field name="document_type_desc" displayField="description" options="acr510_document_type_name_ds" returnField="document_type" valueField="document_type"/>
<!--
<a:field name="document_type_desc" displayField="description" options="acr510_document_type_name_ds"
returnField="document_type" valueField="document_type"/>
<!--
<a:field name="bp_id_agent_level1" displayField="value_name" options="bp_agent_ds" returnField="value_code" valueField="value_code"/>
-->
-->
<!-- <a:field name="bp_id_agent_level1" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="acr.ACR510.acr_bp_agent_ds" lovWidth="600" title="代理店">
<a:mapping>
<a:map from="bp_code" to="bp_id_agent_level1"/>
<a:map from="bp_name" to="bp_id_agent_level1"/>
</a:mapping>
</a:field>-->
<a:field name="bp_id_agent_level1_n" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="acr.ACR510.acr_bp_agent_ds" lovWidth="600" title="代理店">
<a:field name="bp_id_agent_level1_n" lovGridHeight="300" lovHeight="450" lovLabelWidth="100"
lovService="acr.ACR510.acr_bp_agent_ds" lovWidth="600" title="代理店">
<a:mapping>
<a:map from="value_code" to="bp_id_agent_level1"/>
<a:map from="value_name" to="bp_id_agent_level1_n"/>
......@@ -343,13 +388,16 @@
<a:event name="update" handler="queryUpdateFunction"/>
</a:events>
</a:dataSet>
<a:dataSet id="ar510n_cashflow_ds" autoPageSize="true" model="acr.ACR510.acr_invoice_cf_v_new" queryDataSet="allConditionDs" selectable="true">
<a:dataSet id="ar510n_cashflow_ds" autoPageSize="true" model="acr.ACR510.acr_invoice_cf_v_new"
queryDataSet="allConditionDs" selectable="true">
<a:fields>
<a:field name="invoice_title" required="true"/>
<a:field name="object_tax_registry_num" validator="validate_contractDs" prompt="纳税人识别号"/>
<a:field name="invoice_bp_address_phone_num" validator="validate_contractDs" prompt="开票地址电话"/>
<a:field name="invoice_bp_bank_account" validator="validate_contractDs" prompt="开户行及账号"/>
<a:field name="billing_object_name" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="acr.ACR510.acr_invoice_billing_object_lov" lovWidth="650" required="true" title="ACR510.ACR_INVOICE_CONTRACT_V.BILLING_OBJECT_NAME">
<a:field name="billing_object_name" lovGridHeight="300" lovHeight="450" lovLabelWidth="100"
lovService="acr.ACR510.acr_invoice_billing_object_lov" lovWidth="650" required="true"
title="ACR510.ACR_INVOICE_CONTRACT_V.BILLING_OBJECT_NAME">
<a:mapping>
<a:map from="bp_class" to="bill_object_bp_class"/>
<a:map from="bp_id" to="billing_object_id"/>
......@@ -379,17 +427,18 @@
<a:hBox>
<a:lov name="billing_object_name" bindTarget="allConditionDs" prompt="开票对象"/>
<!--
<!--
<a:comboBox name="bill_object_bp_class_desc" bindTarget="allConditionDs" prompt="客户类型"/>
-->
-->
<a:textField name="contract_number" bindTarget="allConditionDs" prompt="合同号"/>
<!--
<!--
<a:comboBox name="invoice_type_desc" bindTarget="allConditionDs" prompt="发票类型"/>
-->
<!-- <a:lov name="bp_id_agent_level1_n" bindTarget="allConditionDs" prompt="代理店"/>-->
-->
<!-- <a:lov name="bp_id_agent_level1_n" bindTarget="allConditionDs" prompt="代理店"/>-->
<a:datePicker name="due_date_from" bindTarget="allConditionDs" prompt="应收日从"/>
<a:datePicker name="due_date_to" bindTarget="allConditionDs" prompt="应收日到"/>
<a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/>
<a:comboBox name="business_type_desc" bindTarget="allConditionDs" prompt="业务类型"/>
</a:hBox>
<a:hBox>
<a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态"/>
......@@ -425,13 +474,15 @@
<a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="50">
<a:tabs>
<a:tab prompt="开票信息" width="150">
<a:grid id="cashflowDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="170" marginWidth="70" navBar="true">
<a:grid id="cashflowDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="170" marginWidth="70"
navBar="true">
<a:columns>
<!--<a:column name="invoice_type_desc" prompt="发票类型"/>-->
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" lock="true" prompt="合同编号" width="150"/>
<a:column name="billing_object_name" prompt="发票抬头"/>
<a:column name="bp_id_agent_level1_n" prompt="代理店"/>
<a:column name="business_type_desc" prompt="业务类型"/>
<a:column name="times" align="right" lock="true" prompt="期数" width="40"/>
<a:column name="cf_item_desc" lock="true" prompt="应收项目"/>
<a:column name="due_date" prompt="应收日" renderer="Leaf.formatDate"/>
......@@ -439,18 +490,22 @@
<a:column name="principal" align="right" prompt="本金" renderer="Leaf.formatMoney"/>
<a:column name="interest" align="right" prompt="利息" renderer="Leaf.formatMoney"/>
<a:column name="account_name" prompt="收款户名"/>
<a:column name="received_amount" align="right" prompt="已收金额" renderer="Leaf.formatMoney"/>
<a:column name="received_principal" align="right" prompt="已收本金" renderer="Leaf.formatMoney"/>
<a:column name="received_interest" align="right" prompt="已收利息" renderer="Leaf.formatMoney"/>
<a:column name="received_amount" align="right" prompt="已收金额"
renderer="Leaf.formatMoney"/>
<a:column name="received_principal" align="right" prompt="已收本金"
renderer="Leaf.formatMoney"/>
<a:column name="received_interest" align="right" prompt="已收利息"
renderer="Leaf.formatMoney"/>
<!-- <a:column name="overdue_status" align="center" prompt="是否逾期"/>
<a:column name="overdue_max_days" align="right" prompt="逾期天数"/> -->
<a:column name="billing_amount" align="right" prompt="已开票金额" renderer="Leaf.formatMoney"/>
<a:column name="billing_amount" align="right" prompt="已开票金额"
renderer="Leaf.formatMoney"/>
<!-- <a:column name="billing_principal" align="right" prompt="已开票本金" renderer="Leaf.formatMoney"/>
<a:column name="billing_interest" align="right" prompt="已开票利息" renderer="Leaf.formatMoney"/>-->
<a:column name="last_received_date" prompt="最后收款日" renderer="Leaf.formatDate"/>
<!--
<!--
<a:column name="termination_date" prompt="正常结清日" renderer="Leaf.formatDate"/>
-->
-->
<!-- <a:column name="currency_desc" width="60"/>
<a:column name="exchange_rate" align="right" width="80"/>
<a:column name="exchange_rate_type_desc" width="100"/> -->
......@@ -458,20 +513,27 @@
</a:grid>
</a:tab>
<a:tab prompt="抬头信息" width="150">
<a:grid id="contractDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="170" marginWidth="70" navBar="true">
<a:grid id="contractDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="170" marginWidth="70"
navBar="true">
<a:columns>
<!--<a:column name="invoice_type_desc" prompt="发票类型"/>-->
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" prompt="合同编号" width="150"/>
<a:column name="contract_status_desc" prompt="合同状态" width="80"/>
<a:column name="billing_method_desc" prompt="开票规则" width="80"/>
<a:column name="billing_object_name" autoAdjust="false" editor="contractDs_grid_editor_lov" prompt="开票对象名称" renderer="render_contractDs_grid" showTitle="true" width="200"/>
<a:column name="invoice_title" autoAdjust="false" prompt="发票抬头" showTitle="true" width="200"/>
<a:column name="billing_object_name" autoAdjust="false"
editor="contractDs_grid_editor_lov" prompt="开票对象名称"
renderer="render_contractDs_grid" showTitle="true" width="200"/>
<a:column name="invoice_title" autoAdjust="false" prompt="发票抬头" showTitle="true"
width="200"/>
<a:column name="object_tax_registry_num" prompt="纳税人识别号" width="150"/>
<a:column name="object_taxpayer_type_desc" prompt="纳税人类型" width="150"/>
<a:column name="invoice_bp_address_phone_num" autoAdjust="false" prompt="开票地址电话" showTitle="true" width="200"/>
<a:column name="invoice_bp_bank_account" autoAdjust="false" prompt="开户行及账号" showTitle="true" width="150"/>
<a:column name="description" autoAdjust="false" prompt="备注" showTitle="true" width="200"/>
<a:column name="invoice_bp_address_phone_num" autoAdjust="false" prompt="开票地址电话"
showTitle="true" width="200"/>
<a:column name="invoice_bp_bank_account" autoAdjust="false" prompt="开户行及账号"
showTitle="true" width="150"/>
<a:column name="description" autoAdjust="false" prompt="备注" showTitle="true"
width="200"/>
</a:columns>
<a:editors>
<a:lov id="contractDs_grid_editor_lov"/>
......
......@@ -82,6 +82,9 @@
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID').style.display = 'none';
}
if (record.get('contract_status') == 'REPUR'&&record.get('contract_status') == 'REPURING') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_BP_ID_TENANT_BF_REPUR_N').style.display = 'none';
}
}
};
......
......@@ -38,6 +38,7 @@
$(ds).setQueryParameter('due_date_from',record.get('due_date_from'));
$(ds).setQueryParameter('due_date_to',record.get('due_date_to'));
$(ds).setQueryParameter('base_date',record.get('base_date'));
$(ds).setQueryParameter('business_type',record.get('business_type'));
$(ds).query();
}else{
$L.showInfoMessage("提示",'请输入字段:租赁开始日从、租赁开始日到、基准日!');
......
......@@ -153,6 +153,13 @@
}
}
}
function change_background_color(record) {
if (record.get('trans_pently_flag') == 'Y') {
return 'background-color:#00ff00';
}
}
]]></script>
<a:dataSets>
<a:dataSet id="con_rent_trans_penalty_hd_ds" autoPageSize="true" autoQuery="true"
......@@ -164,7 +171,7 @@
</a:dataSet>
<a:dataSet id="con7000_csh_write_off_ds" fetchAll="true" autoQuery="true"
model="cont.CON7001.con_rent_trans_penalty_csh_write_off"
queryUrl="${/request/@context_path}/autocrud/cont.CON7001.con_rent_trans_penalty_csh_write_off/query?contract_id=${/parameter/@contract_id}"
queryUrl="${/request/@context_path}/autocrud/cont.CON7001.con_rent_trans_penalty_csh_write_off/query?contract_id=${/parameter/@contract_id}&amp;record_id=${/parameter/@record_id}"
selectable="true">
<a:events>
<a:event name="load" handler="con7000_csh_write_off_ds_load"/>
......@@ -209,7 +216,7 @@
<a:tabs>
<a:tab prompt="营业违约金核销明细" width="150">
<a:grid id="con7000_csh_write_off_grid" bindTarget="con7000_csh_write_off_ds" marginHeight="130"
marginWidth="200" navBar="true">
marginWidth="200" navBar="true" rowRenderer="change_background_color">
<a:columns>
<a:column name="times" prompt="回数" width="70" align="center"/>
<a:column name="due_date" prompt="预定支付日" width="120" align="center"
......
......@@ -47,6 +47,13 @@
function con7000_csh_write_off_ds_unselect(ds, record) {
return false;
}
function change_background_color(record) {
if (record.get('trans_pently_flag') == 'Y') {
return 'background-color:#00ff00';
}
}
]]></script>
<a:dataSets>
<a:dataSet id="con_rent_trans_penalty_hd_ds" autoPageSize="true" autoQuery="true"
......@@ -55,7 +62,7 @@
</a:dataSet>
<a:dataSet id="con7000_csh_write_off_ds" autoPageSize="true" autoQuery="true"
model="cont.CON7001.con_rent_trans_penalty_csh_write_off"
queryUrl="${/request/@context_path}/autocrud/cont.CON7001.con_rent_trans_penalty_csh_write_off/query?contract_id=${/parameter/@contract_id}"
queryUrl="${/request/@context_path}/autocrud/cont.CON7001.con_rent_trans_penalty_csh_write_off/query?contract_id=${/parameter/@contract_id}&amp;record_id=${/parameter/@record_id}"
selectable="true" showCheckAll="false">
<a:events>
<a:event name="load" handler="con7000_csh_write_off_ds_load"/>
......@@ -98,7 +105,7 @@
<a:tabs>
<a:tab prompt="营业违约金核销明细" width="150">
<a:grid id="con7000_csh_write_off_grid" bindTarget="con7000_csh_write_off_ds" marginHeight="130"
marginWidth="200" navBar="true">
marginWidth="200" navBar="true" rowRenderer="change_background_color">
<a:columns>
<a:column name="times" prompt="回数" width="70" align="center"/>
<a:column name="due_date" prompt="预定支付日" width="120" align="center"
......
......@@ -5,10 +5,11 @@
承租人變更
回款賬戶變更
-->
<a:screen xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application"
<a:screen xmlns:a="http://www.leaf-framework.org/application"
customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.role_id=${/session/@role_id}" fetchAll="true" model="cont.CON733.query_roles_info" rootPath="role_code"/>
<a:model-query defaultWhereClause="t1.role_id=${/session/@role_id}" fetchAll="true"
model="cont.CON733.query_roles_info" rootPath="role_code"/>
</a:init-procedure>
<a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
......@@ -25,30 +26,29 @@
//合同变更创建:营业内勤只能选到回款账户变更,
// 债权担当只能选到承租人变更,
// 代理店下级只能选到租金计划变更;
Leaf.onReady(function(){
var role_code='${/model/role_code/record/@role_code}';
Leaf.onReady(function () {
var role_code = '${/model/role_code/record/@role_code}';
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
var ds_id_n = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var head_record = $(ds_id).getAt(0);
if(head_record){
if(role_code=='0007'){
head_record.set('ccr_document_type','ACC_CHAG');
head_record.set('ccr_document_type_n','回款账户变更');
if (head_record) {
if (role_code == '0007') {
head_record.set('ccr_document_type', 'ACC_CHAG');
head_record.set('ccr_document_type_n', '回款账户变更');
head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true);
/*$(ds_id_n).setQueryParameter('contract_status', '');
$(ds_id_n).query();*/
}else if(role_code=='0019'){
head_record.set('ccr_document_type','LEASE_CHAG');
head_record.set('ccr_document_type_n','承租人变更');
} else if (role_code == '0019') {
head_record.set('ccr_document_type', 'LEASE_CHAG');
head_record.set('ccr_document_type_n', '承租人变更');
head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true);
/*$(ds_id_n).setQueryParameter('contract_status', 'INCEPT');
$(ds_id_n).query();*/
}
else if(role_code=='0008'){
head_record.set('ccr_document_type','CUT_CHAG');
head_record.set('ccr_document_type_n','租金计划变更');
} else if (role_code == '0008') {
head_record.set('ccr_document_type', 'CUT_CHAG');
head_record.set('ccr_document_type_n', '租金计划变更');
head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true);
/*$(ds_id_n).setQueryParameter('contract_status', 'INCEPT');
......@@ -57,19 +57,20 @@
}
});
// 更新事件
window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
window['${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if(name == 'ccr_document_type' && value){
if(value != 'ACC_CHAG'){
if (name == 'ccr_document_type' && value) {
if (value != 'ACC_CHAG') {
$(ds_id).setQueryParameter('contract_status', 'INCEPT');
$(ds_id).query();
}
if(value == 'ACC_CHAG'){
if (value == 'ACC_CHAG') {
$(ds_id).setQueryParameter('contract_status', '');
$(ds_id).query();
}
}
};
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
......@@ -80,6 +81,7 @@
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
if (name == 'contract_number' && value) {
return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
......@@ -95,18 +97,23 @@
Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
return;
}
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在变更期间无法进行后续操作,请谨慎操作!!!如果需要取消变更,请一定点击取消变更按钮!!!</span>', function () {
var record = records[0];
var head_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
var head_record = $(head_ds_id).getAt(0);
var record = records[0];
var ccr_document_type = head_record.get('ccr_document_type');
if ($(head_ds_id).validate($('${/parameter/@layout_code}_user_button1').enable())) {
//售后回租 无法进行承租人变更和回款账户变更
if (record.get('business_type') == 'LEASEBACK' && (ccr_document_type == 'LEASE_CHAG' || ccr_document_type == 'ACC_CHAG')) {
Leaf.showErrorMessage('${l:PROMPT}', '售后回租无法操作此项变更!');
return;
}
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在变更期间无法进行后续操作,请谨慎操作!!!如果需要取消变更,请一定点击取消变更按钮!!!</span>', function () {
var contract = record.get('contract_id');
var ccr_document_type = head_record.get('ccr_document_type');
var req_date = head_record.get('req_date');
var description = head_record.get('description');
var ref_v01 = head_record.get('ref_v01');
Leaf.Masker.mask(Ext.getBody());
Leaf.Masker.mask(Ext.getBody(),'正在创建变更。。。');
Leaf.request({
url: $('con733_create_change_link').getUrl(),
para: {
......@@ -126,15 +133,15 @@
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['document_type'] = ccr_document_type;
if(ccr_document_type == 'CUT_CHAG'){//租金計劃變更
if (ccr_document_type == 'CUT_CHAG') {//租金計劃變更
param['function_code'] = 'CON733CF';
param['url_title'] = '变更申请-合同租金计划变更';
param['winid'] = 'con733_cf_change_detail_winid';
}else if(ccr_document_type == 'LEASE_CHAG'){//承租人變更
} else if (ccr_document_type == 'LEASE_CHAG') {//承租人變更
param['function_code'] = 'CON733BPT';
param['url_title'] = '变更申请-合同承租人变更';
param['winid'] = 'con733_bpt_change_detail_winid';
}else if(ccr_document_type == 'ACC_CHAG'){//回款賬戶變更
} else if (ccr_document_type == 'ACC_CHAG') {//回款賬戶變更
param['function_code'] = 'CON733BPB';
param['url_title'] = '变更申请-合同回款账户变更';
param['winid'] = 'con733_bpb_change_detail_winid';
......@@ -151,8 +158,8 @@
},
scope: this
});
}
}, null, 300, 150);
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
......
......@@ -20,6 +20,7 @@
para: {
due_date : record.get('due_date'),
bp_id : record.get('bp_id_agent_level1'),
business_type : record.get('business_type'),
overday1:record.get('overdue_day1'),
overday2:record.get('overdue_day2'),
overday3:record.get('overdue_day3'),
......@@ -53,9 +54,18 @@
}
]]></script>
<a:dataSets>
<a:dataSet id="business_type_desc_ds">
<a:datas>
<a:record code_value="LEASE" code_value_name="直租"/>
<a:record code_value="LEASEBACK" code_value_name="售后回租"/>
</a:datas>
</a:dataSet>
<a:dataSet id="gld_accounts_ds" loadData="true" model="cont.CON930.gld_accounts_ds"/>
<a:dataSet id="con_contract_cashflow_monthly_query_ds" autoCreate="true">
<a:fields>
<a:field name="business_type"/>
<a:field name="business_type_desc" displayField="code_value_name" options="business_type_desc_ds"
returnField="business_type" valueField="code_value" prompt="业务类型"/>
<a:field name="due_date" required="true" prompt="基准日期"/>
<a:field name="bp_id_agent_level1" />
<a:field name="account_name" displayField="account_name" options="gld_accounts_ds" returnField="account_id" valueField="account_id"/>
......@@ -87,6 +97,7 @@
</a:screenTopToolbar>
<a:form bindTarget="con_contract_cashflow_balance_query_ds" column="4" title="收付款预定查询" marginWidth="40">
<a:datePicker name="due_date" bindTarget="con_contract_cashflow_monthly_query_ds"/>
<a:comboBox name="business_type_desc" bindTarget="con_contract_cashflow_monthly_query_ds"/>
<!-- <a:lov name="bp_id_agent_level1_n" bindTarget="con_contract_cashflow_monthly_query_ds"/>-->
<!-- <a:numberField name="overdue_day1" bindTarget="con_contract_cashflow_monthly_query_ds" allowDecimals="false"/>-->
<!-- <a:numberField name="overdue_day2" bindTarget="con_contract_cashflow_monthly_query_ds" allowDecimals="false"/>-->
......@@ -111,6 +122,7 @@
<a:column name="division_n" align="center" prompt="租赁物" width="220"/>
<a:column name="bp_id_agent_level1_n" align="center" prompt="代理店" width="200"/>
<a:column name="contract_number" align="center" prompt="合同号" width="120"/>
<a:column name="business_type_n" align="center" prompt="业务类型" width="80"/>
<a:column name="bp_code" align="center" prompt="业务伙伴号" width="100"/>
<a:column name="account_id_n" align="center" prompt="科目代码" width="120"/>
<a:column name="account_name" align="center" prompt="科目名称" width="180"/>
......
......@@ -19,7 +19,7 @@
function cshdeposit102_transfer_submit() {
if ($('deposit_transfer_detail_result_ds').validate()) {
var head_record = $('deposit_transfer_maintain_result_ds').getAt(0);
var head_record = $('deposit_transfer_maintain_result_ds').getSelected()[0];
var deposit_records = $('deposit_transfer_detail_result_ds').getAll();
var param = {};
var saveData = [];
......@@ -116,7 +116,7 @@
function on_csh_trx_deposit_write_off_update(ds, record, name, value, oldvalue) {
debugger;
var head_record = $('deposit_transfer_maintain_result_ds').getAt(0);
var head_record = $('deposit_transfer_maintain_result_ds').getSelected()[0];
var unwrite_off_amount = get_current_amount(head_record.get("unwrite_off_amount"));
if (name == 'deposit_amount') {
if ((!Ext.isEmpty(value) || !Ext.isEmpty(oldvalue)) && value != oldvalue) {
......@@ -149,7 +149,7 @@
debugger;
var selected = [].concat(ds.getSelected());
var head_record = $('deposit_transfer_maintain_result_ds').getAt(0);
var head_record = $('deposit_transfer_maintain_result_ds').getSelected()[0];
var change_value = get_current_amount(record.get('deposit_amount')),
current_apply_amount = get_current_amount(head_record.get('current_apply_amount'));
// setTimeout(function () {
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="excel_test" rootPath="/model/datasource"/>
<a:model-query fetchAll="true" model="excel_test1" rootPath="/model/datasource1"/>
<dr:excel-report enableTask="false" filename="exceltest.xlsm" template="D:\u01\hls_file\test111.xlsm">
<dr:styles>
<dr:cell-style name="cell1" align="ALIGN_LEFT" vertical="VERTICAL_CENTER">
<dr:font bold="false" fontName="宋体" height="9"/>
</dr:cell-style>
<dr:cell-style name="cell2" align="ALIGN_LEFT" vertical="VERTICAL_CENTER">
<dr:font bold="false" fontName="Arial" height="9"/>
</dr:cell-style>
<dr:cell-style name="cell3" align="ALIGN_CENTER" vertical="VERTICAL_CENTER">
<dr:font bold="false" fontName="Arial" fontcolor="RED" height="9"/>
</dr:cell-style>
<dr:cell-style name="header" cell_style_id="2" foregroundcolor="BLACK">
<dr:font cell_style_id="2" fontname="宋体" height="10"/>
</dr:cell-style>
<dr:cell-style name="header2" cell_style_id="2" foregroundcolor="RED">
<dr:font cell_style_id="2" fontcolor="RED" fontname="宋体" height="10"/>
</dr:cell-style>
</dr:styles>
<dr:sheets>
<dr:sheet name="A2-底层参数" autoSizeColumns="3" displayGridlines="true">
<!-- <dr:static-content>-->
<!-- <dr:cell-data cell="A" row="1" stylename="cell_center" type="content" value="100"/>-->
<!-- <dr:cell-data cell="B" row="1" type="content" value="200"/>-->
<!-- </dr:static-content>-->
<dr:dynamic-content cell="A" dataModel="/model/datasource">
<dr:columns>
<dr:table-column cellStyle="cell1" field="a" type="content"/>
<dr:table-column cellStyle="cell1" field="b" type="content"/>
</dr:columns>
</dr:dynamic-content>
<dr:dynamic-content cell="0" dataModel="/model/datasource1">
<dr:columns>
<dr:table-column cellStyle="cell1" field="a" type="content"/>
<dr:table-column cellStyle="cell1" field="b" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
<!-- <dr:sheet name="备注" autoSizeColumns="0,1,2,3" displayGridlines="true">
<dr:dynamic-content cell="C" dataModel="/model/datasource">
<dr:columns>
<dr:table-column cellStyle="cell1" title="电话催收:CALL电子邮件催收:EMAIL催款函催收:LETTER短信催收:MESSAGE上门拜访:VISIT" titlestyle="header2" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet> -->
</dr:sheets>
</dr:excel-report>
<s:server-script><![CDATA[
println(222222);
]]></s:server-script>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<!-- <a:model-query fetchAll="true" model="excel_test" rootPath="/model/datasource"/>-->
<s:server-script><![CDATA[
importPackage(Packages.com.hand.hls.hlcm.emay);
var example = new Example();
var result=example.setSingleSms('Testsms', '18225695917');
var aa=JSON.parse(result);
println(2222);
println(aa.code);
println(JSON.stringify(aa.result));
// println("result"+JSON.stringify(result));
]]></s:server-script>
<!-- <dr:excel-report enableTask="false" filename="exceltest.xlsx" template="D:\u01\hls_file\test.xlsx">-->
<!-- <dr:styles>-->
<!-- <dr:cell-style name="cell1" align="ALIGN_LEFT" vertical="VERTICAL_CENTER">-->
<!-- <dr:font bold="false" fontName="宋体" height="9"/>-->
<!-- </dr:cell-style>-->
<!-- <dr:cell-style name="cell2" align="ALIGN_LEFT" vertical="VERTICAL_CENTER">-->
<!-- <dr:font bold="false" fontName="Arial" height="9"/>-->
<!-- </dr:cell-style>-->
<!-- <dr:cell-style name="cell3" align="ALIGN_CENTER" vertical="VERTICAL_CENTER">-->
<!-- <dr:font bold="false" fontName="Arial" fontcolor="RED" height="9"/>-->
<!-- </dr:cell-style>-->
<!-- <dr:cell-style name="header" cell_style_id="2" foregroundcolor="BLACK">-->
<!-- <dr:font cell_style_id="2" fontname="宋体" height="10"/>-->
<!-- </dr:cell-style>-->
<!-- <dr:cell-style name="header2" cell_style_id="2" foregroundcolor="RED">-->
<!-- <dr:font cell_style_id="2" fontcolor="RED" fontname="宋体" height="10"/>-->
<!-- </dr:cell-style>-->
<!-- </dr:styles>-->
<!-- <dr:sheets>-->
<!-- <dr:sheet name="催收明细" autoSizeColumns="0,1" displayGridlines="true">-->
<!--&lt;!&ndash; <dr:static-content>&ndash;&gt;-->
<!--&lt;!&ndash; <dr:cell-data cell="A" row="1" stylename="cell_center" type="content" value="100"/>&ndash;&gt;-->
<!--&lt;!&ndash; <dr:cell-data cell="B" row="1" type="content" value="200"/>&ndash;&gt;-->
<!--&lt;!&ndash; </dr:static-content>&ndash;&gt;-->
<!-- <dr:dynamic-content cell="A" dataModel="/model/datasource">-->
<!-- <dr:columns>-->
<!-- <dr:table-column cellStyle="cell1" field="a" type="content"/>-->
<!-- <dr:table-column cellStyle="cell1" field="b" type="content"/>-->
<!-- </dr:columns>-->
<!-- </dr:dynamic-content>-->
<!-- </dr:sheet>-->
<!-- &lt;!&ndash; <dr:sheet name="备注" autoSizeColumns="0,1,2,3" displayGridlines="true">-->
<!-- <dr:dynamic-content cell="C" dataModel="/model/datasource">-->
<!-- <dr:columns>-->
<!-- <dr:table-column cellStyle="cell1" title="电话催收:CALL电子邮件催收:EMAIL催款函催收:LETTER短信催收:MESSAGE上门拜访:VISIT" titlestyle="header2" type="content"/>-->
<!-- </dr:columns>-->
<!-- </dr:dynamic-content>-->
<!-- </dr:sheet> &ndash;&gt;-->
<!-- </dr:sheets>-->
<!-- </dr:excel-report>-->
<!-- <s:server-script><![CDATA[-->
<!-- println(222222);-->
<!-- ]]></s:server-script>-->
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -35,6 +35,19 @@
<a:link id="main_link" url="${/request/@context_path}/welcome.lview"/>
<a:link id="user_main_link" url="${/request/@context_path}/user_role_home_page.lview"/>
<a:link id="csh_current_period_link" model="hls.HLS801.csh_current_period_query" modelaction="update"/>
<a:link id="csh_check_acr_link" model="hls.HLS801.csh_current_period_query" modelaction="execute"/>
<style><
!
[CDATA[
.win-dialog-content.win-type {
max-width: 700px;
max-height: 700px;
!important
}
]
]
></style>
<script><![CDATA[
//HLS801.NEXT_STEP
var step = 0;
......@@ -43,13 +56,14 @@
//alert('${/model/sys_role_path/record/@role_code}');
$L.onReady(function () {
if('${/model/sys_role_path/record/@role_code}' == 'N'){
if ('${/model/sys_role_path/record/@role_code}' == 'N') {
var win = $L.showInfoMessage('${l:PROMPT}', '您暂无权限查看!');
win.on('close', function() {
win.on('close', function () {
history.back();
});
}
});
function nextStep() {
var stepTabPanel = $('step');
step = step + 1;
......@@ -440,10 +454,10 @@
$L.request({
url: $('csh_current_period_link').getUrl(),
para: {
csh_date : record.get('period_name'),
role_flag : role_flag
csh_date: record.get('period_name'),
role_flag: role_flag
},
success: function(args) {
success: function (args) {
/*$L.SideBar.show({
msg: '操作成功',
duration: 2000
......@@ -479,10 +493,10 @@
scope: this
});
},
failure: function() {
failure: function () {
$L.Masker.unmask(Ext.getBody());
},
error: function() {
error: function () {
$L.Masker.unmask(Ext.getBody());
},
scope: this
......@@ -538,10 +552,10 @@
}
function csh_onload(ds) {
if('${/model/sys_role_path/record/@role_code}' == 'NO'){
if ('${/model/sys_role_path/record/@role_code}' == 'NO') {
var records = $(ds.id).getAll();
records.forEach(function (v, i) {
if(v.get('csh_confirm_flag') == 'Y'){
if (v.get('csh_confirm_flag') == 'Y') {
v.getField('ref_v04').setReadOnly(true);
}
});
......@@ -549,34 +563,42 @@
}
function csh_transaction_confirm() {
debugger;
var role_flag = '${/model/sys_role_path/record/@role_code}';
var record = $('csh_transaction_confirm_ds').getSelected()[0];
if(role_flag == 'NO'){
if(record.get('csh_confirm_flag') == 'Y'){
$L.showMessage('提示','该月收款已确认,无需再次确认');
if (role_flag == 'NO') {
if (record.get('csh_confirm_flag') == 'Y') {
$L.showMessage('提示', '该月收款已确认,无需再次确认');
return;
}
$L.showConfirm('提示', '是否进行月结确认?', function() {
$L.showConfirm('提示', '是否进行月结确认?', function () {
$L.Masker.mask(Ext.getBody(), '正在确认......');
$L.request({
url: $('csh_current_period_link').getUrl(),
para: {
ref_v04 : record.get('ref_v04'),
csh_date : record.get('csh_date'),
role_flag : role_flag
ref_v04: record.get('ref_v04'),
csh_date: record.get('csh_date'),
role_flag: role_flag
},
success: function(args) {
success: function (args) {
debugger;
$L.Masker.unmask(Ext.getBody());
if (args.result.p_err_msg) {
$L.showErrorMessage("提示", args.result.p_err_msg, null, 800, 400);
} else {
$L.SideBar.show({
msg: '已确认',
duration: 2000
});
$('csh_transaction_confirm_ds').query();
$L.Masker.unmask(Ext.getBody());
}
},
failure: function() {
failure: function () {
$L.Masker.unmask(Ext.getBody());
},
error: function() {
error: function () {
$L.Masker.unmask(Ext.getBody());
},
scope: this
......@@ -584,12 +606,34 @@
});
}
if(role_flag == 'YES'){
if(record.get('csh_confirm_flag') == 'N'){
$L.showMessage('提示','请先进行营业确认');
if (role_flag == 'YES') {
if (record.get('csh_confirm_flag') == 'N') {
$L.showMessage('提示', '请先进行营业确认');
return;
}
$L.Masker.mask(Ext.getBody(), '正在执行......');
$L.request({
url: $('csh_check_acr_link').getUrl(),
para: {},
success: function (args) {
$L.Masker.unmask(Ext.getBody());
if (args.result.p_err_msg) {
$L.Masker.unmask(Ext.getBody());
$L.showErrorMessage("提示", args.result.p_err_msg, null, 800, 400);
} else {
set_value_for_next_step(record.get('csh_date'));
}
},
failure: function () {
$L.Masker.unmask(Ext.getBody());
},
error: function () {
$L.Masker.unmask(Ext.getBody());
},
scope: this
});
/*$L.showConfirm('提示', '是否确认下一步?', function() {
$L.Masker.mask(Ext.getBody(), '正在执行......');
$L.request({
......@@ -627,10 +671,12 @@
record.set('period_name', value);
nextStep();
}
]]></script>
<a:dataSets>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="csh_transaction_confirm_ds" selectable="true" selectionModel="single" autoQuery="true" fetchAll="true" model="hls.HLS801.csh_current_period_query"
<a:dataSet id="csh_transaction_confirm_ds" selectable="true" selectionModel="single" autoQuery="true"
fetchAll="true" model="hls.HLS801.csh_current_period_query"
queryUrl="${/request/@context_path}/autocrud/hls.HLS801.csh_current_period_query/query">
<a:fields>
<a:field name="csh_date" readOnly="true"/>
......@@ -736,7 +782,8 @@
<a:hBox>
<a:tabPanel id="step" marginHeight="80" marginWidth="50">
<a:tabs>
<a:tab id="step_0" disabled="false" marginHeight="20" width="100" prompt="营业月结" selected="true">
<a:tab id="step_0" disabled="false" marginHeight="20" width="100" prompt="营业月结"
selected="true">
<a:hBox height="50">
<!--<a:button click="upStep" text="HLS801.LAST_STEP"/>-->
<!--<a:label width="5"/>
......@@ -753,7 +800,8 @@
<!--<a:button click="unearned_finance_income_query"
icon="${/request/@context_path}/images/search.png" text="HLS.QUERY"/>-->
<!-- <a:button type="clear"/>-->
<a:button icon="${/request/@context_path}/images/excel_16.png" text="HLS.EXPORT"
<a:button icon="${/request/@context_path}/images/excel_16.png"
text="HLS.EXPORT"
type="excel"/>
</a:toolBar>
<a:columns>
......@@ -762,7 +810,8 @@
<a:column name="csh_not" prompt="未核销收款数" width="120" align="center"/>
<a:column name="csh_partial" prompt="部分核销收款数" width="120" align="center"/>
<a:column name="ref_v04" prompt="备注" width="250" editor="csh_area_id"/>
<a:column name="csh_confirm_flag" prompt="营业月结确认" width="80" editor="csh_check_id"/>
<a:column name="csh_confirm_flag" prompt="营业月结确认" width="80"
editor="csh_check_id"/>
</a:columns>
<a:editors>
<a:textArea id="csh_area_id"/>
......@@ -778,7 +827,8 @@
<a:hBox>
<a:tabPanel id="step" marginHeight="80" marginWidth="50">
<a:tabs>
<a:tab id="step_0" disabled="false" marginHeight="20" width="100" prompt="营业月结" selected="true">
<a:tab id="step_0" disabled="false" marginHeight="20" width="100" prompt="营业月结"
selected="true">
<a:hBox height="50">
<a:button disabled="true" click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
......@@ -791,7 +841,8 @@
<!--<a:button click="unearned_finance_income_query"
icon="${/request/@context_path}/images/search.png" text="HLS.QUERY"/>-->
<!-- <a:button type="clear"/>-->
<a:button icon="${/request/@context_path}/images/excel_16.png" text="HLS.EXPORT"
<a:button icon="${/request/@context_path}/images/excel_16.png"
text="HLS.EXPORT"
type="excel"/>
</a:toolBar>
<a:columns>
......@@ -800,11 +851,12 @@
<a:column name="csh_not" prompt="未核销收款数" width="120" align="center"/>
<a:column name="csh_partial" prompt="部分核销收款数" width="120" align="center"/>
<a:column name="ref_v04" prompt="备注" width="250" editor="csh_area_id"/>
<a:column name="csh_confirm_flag" prompt="营业月结确认" width="80" editor="csh_check_id"/>
<a:column name="csh_confirm_flag" prompt="营业月结确认" width="80"
editor="csh_check_id"/>
</a:columns>
<a:editors>
<a:textArea id="csh_area_id" readOnly="true"/>
<a:checkBox id="csh_check_id" />
<a:checkBox id="csh_check_id"/>
</a:editors>
</a:grid>
</a:tab>
......@@ -820,12 +872,14 @@
<a:fieldSet height="250" title="GLD_PERIODS.PERIOD_NAME" width="300">
<a:lov name="period_name" bindTarget="hls_monthly_statement_ds"
prompt="GLD_PERIODS.PERIOD_NAME" width="200"/>
<a:lov name="calc_end_date" bindTarget="hls_monthly_statement_ds" prompt="截止日"
<a:lov name="calc_end_date" bindTarget="hls_monthly_statement_ds"
prompt="截止日"
width="200"/>
</a:fieldSet>
</a:hBox>
</a:tab>
<a:tab id="step_2" disabled="true" marginHeight="20" prompt="HLS801.INCOME" selected="false"
<a:tab id="step_2" disabled="true" marginHeight="20" prompt="HLS801.INCOME"
selected="false"
width="100">
<a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/>
......@@ -848,7 +902,8 @@
<!-- <a:textField name="day" bindTarget="unearned_finance_income_query_ds" prompt="日" readOnly="true"/> -->
<a:lov name="company_code" bindTarget="unearned_finance_income_query_ds"
prompt="HLS.COMPANY_CODE"/>
<a:textField name="company_short_name" bindTarget="unearned_finance_income_query_ds"
<a:textField name="company_short_name"
bindTarget="unearned_finance_income_query_ds"
prompt="HLS.COMPANY_NAME" readOnly="true"/>
<a:comboBox name="finance_income_recognized"
bindTarget="unearned_finance_income_query_ds" prompt="是否确认"/>
......@@ -859,9 +914,11 @@
marginHeight="300" marginWidth="80" navBar="true" style="margin-left:3px">
<a:toolBar>
<a:button click="unearned_finance_income_query"
icon="${/request/@context_path}/images/search.png" text="HLS.QUERY"/>
icon="${/request/@context_path}/images/search.png"
text="HLS.QUERY"/>
<!-- <a:button type="clear"/>-->
<a:button icon="${/request/@context_path}/images/excel_16.png" text="HLS.EXPORT"
<a:button icon="${/request/@context_path}/images/excel_16.png"
text="HLS.EXPORT"
type="excel"/>
</a:toolBar>
<a:columns>
......@@ -879,9 +936,11 @@
<a:column name="int_rate_implicit" align="right" prompt="HLS801.INT_RATE"
renderer="ratePercentRender" width="70"/>
<a:column name="calc_period" prompt="HLS801.CALC_PERIOD" width="150"/>
<a:column name="calc_date_count" prompt="HLS801.CALC_DATE_COUNT" width="100"/>
<a:column name="calc_date_count" prompt="HLS801.CALC_DATE_COUNT"
width="100"/>
<a:column name="vat_unearned_finance_income" align="right"
prompt="HLS801.VAT_UNEARNED_FINANCE_INCOME" renderer="Leaf.formatMoney"
prompt="HLS801.VAT_UNEARNED_FINANCE_INCOME"
renderer="Leaf.formatMoney"
width="110"/>
<a:column name="adjustvat" align="right"
prompt="税改16%调整额" renderer="Leaf.formatMoney"
......@@ -891,15 +950,18 @@
width="110"/>
<a:column name="unearned_finance_income" align="right"
prompt="HLS801.UNEARNED_FINANCE_INCOME" renderer="Leaf.formatMoney"
prompt="HLS801.UNEARNED_FINANCE_INCOME"
renderer="Leaf.formatMoney"
width="110"/>
<a:column name="finance_income_recognized" prompt="HLS801.FINANCE_INCOME_RECOGNIZED"
<a:column name="finance_income_recognized"
prompt="HLS801.FINANCE_INCOME_RECOGNIZED"
width="80"/>
</a:columns>
</a:grid>
</a:tab>
<a:tab id="step_3" disabled="true" prompt="HLS801.MONTH_END" selected="false" width="100">
<a:tab id="step_3" disabled="true" prompt="HLS801.MONTH_END" selected="false"
width="100">
<a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
......@@ -916,28 +978,35 @@
</a:box>
</a:form>
</a:tab>
<a:tab id="step_4" disabled="true" prompt="HLS801.PERIOD_CONTROL" selected="false" width="100">
<a:tab id="step_4" disabled="true" prompt="HLS801.PERIOD_CONTROL" selected="false"
width="100">
<a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
<a:button disabled="true" text="HLS801.NEXT_STEP"/>
<a:label width="50"/>
</a:hBox>
<a:grid id="close_open_grid" bindTarget="close_open_ds" marginHeight="300" marginWidth="80">
<a:grid id="close_open_grid" bindTarget="close_open_ds" marginHeight="300"
marginWidth="80">
<a:columns>
<a:column name="period_year" align="center" prompt="GLD_PERIODS.PERIOD_YEAR"
sortable="true" width="100"/>
<a:column name="period_num" align="center"
prompt="FND_DIMENSIONS.DIMENSION_SEQUENCE" sortable="true" width="80"/>
<a:column name="start_date_c" align="center" prompt="GLD_EXCHANGE_RATE.START_DATE"
prompt="FND_DIMENSIONS.DIMENSION_SEQUENCE" sortable="true"
width="80"/>
<a:column name="start_date_c" align="center"
prompt="GLD_EXCHANGE_RATE.START_DATE"
sortable="true" width="150"/>
<a:column name="end_date_c" align="center" prompt="GLD_EXCHANGE_RATE.END_DATE"
<a:column name="end_date_c" align="center"
prompt="GLD_EXCHANGE_RATE.END_DATE"
sortable="true" width="150"/>
<a:column name="quarter_num" align="center" prompt="GLD_PERIOD_STATUS.QUARTER"
<a:column name="quarter_num" align="center"
prompt="GLD_PERIOD_STATUS.QUARTER"
sortable="true" width="80"/>
<a:column name="period_name" align="center" prompt="GLD_PERIODS.PERIOD_NAME"
sortable="true" width="120"/>
<a:column name="adjustment_flag" align="center" prompt="GLD_PERIOD_STATUS.ADJUST"
<a:column name="adjustment_flag" align="center"
prompt="GLD_PERIOD_STATUS.ADJUST"
width="100"/>
<a:column name="period_status_code" align="center"
prompt="GLD_PERIOD_STATUS.PERIOD_STATUS" renderer="statusRenderer"
......
......@@ -1022,7 +1022,8 @@
if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n') {
if (!bp_tenant_detail_r.get(key)) {
//if (!bp_tenant_detail_r.get(key)) {
if (typeof bp_tenant_detail_r.get(key)== "null"||typeof bp_tenant_detail_r.get(key)== "undefined"|| bp_tenant_detail_r.get(key)=== "") {
Leaf.showInfoMessage("提示", "承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!");
return;
}
......@@ -1144,7 +1145,8 @@
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id' && key != 'third_party_credibility' && key != 'third_party_credibility_n') {
if (!bp_tenant_detail_r.get(key)) {
//if (!bp_tenant_detail_r.get(key)) {
if (typeof bp_tenant_detail_r.get(key)== "null"||typeof bp_tenant_detail_r.get(key)== "undefined"|| bp_tenant_detail_r.get(key)=== "") {
Leaf.showInfoMessage("提示", "承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
......
......@@ -305,7 +305,8 @@
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) {
if (key != 'bp_detail_id' && key != 'score_name' && key != 'bp_age' && key != 'project_id'&& key != 'third_party_credibility' && key != 'third_party_credibility_n') {
if(!bp_tenant_detail_r.get(key)){
//if(!bp_tenant_detail_r.get(key)){
if (typeof bp_tenant_detail_r.get(key)== "null"||typeof bp_tenant_detail_r.get(key)== "undefined"|| bp_tenant_detail_r.get(key)=== "") {
Leaf.showInfoMessage("提示","承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!");
bp_rate_flag = false;
break;
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} " fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} and exists (select 1 from con_contract ct where ct.business_type='LEASE'and ct.contract_id=t1.contract_id)" fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/lease_datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} and exists (select 1 from con_contract ct where ct.business_type='LEASEBACK'and ct.contract_id=t1.contract_id) " fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/leaseback_datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month}" fetchAll="true" model="rpt.RPT5010.rpt5010_date" rootPath="/model/day"/>
<dr:excel-report enableTask="false" filename="${/parameter/@file_name}">
<dr:styles>
......@@ -19,7 +20,7 @@
</dr:cell-style>
</dr:styles>
<dr:sheets>
<dr:sheet name="sheet1" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:sheet name="直租" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:static-content cell="A" dataModel="/model/day" row="1">
<dr:cell-data cell="A" offset="false" row="1" styleName="cell3" type="content" value="承租人名称"/>
<dr:cell-data cell="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
......@@ -108,7 +109,187 @@
<dr:cell-data cell="CG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
</dr:static-content>
<dr:dynamic-content cell="A" dataModel="/model/datasource" row="2">
<dr:dynamic-content cell="A" dataModel="/model/lease_datasource" row="2">
<dr:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_1" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_1" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_1" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_2" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_2" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_2" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_3" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_3" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_3" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_4" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_4" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_4" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_5" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_5" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_5" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_6" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_6" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_6" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_7" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_7" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_7" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_8" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_8" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_8" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_9" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_9" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_9" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_10" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_10" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_10" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_11" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_11" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_11" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_12" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_12" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_12" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_13" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_13" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_13" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_14" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_14" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_14" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_15" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_15" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_15" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_16" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_16" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_16" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_17" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_17" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_17" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_18" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_18" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_18" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_19" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_19" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_19" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_20" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_20" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_20" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_21" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_21" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_21" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_22" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_22" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_22" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_23" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_23" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_23" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_24" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_24" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_24" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_25" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_25" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_25" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_26" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_26" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_26" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_27" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_27" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_27" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_28" title="租金总额(未核销)" titlestyle="header" type="money"/>
<dr:table-column cellStyle="cell2" field="principal_28" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_28" title="利息总额(未核销)" titlestyle="header" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
<dr:sheet name="售后回租" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:static-content cell="A" dataModel="/model/day" row="1">
<dr:cell-data cell="A" offset="false" row="1" styleName="cell3" type="content" value="承租人名称"/>
<dr:cell-data cell="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
<dr:cell-data cell="C" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="D" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="E" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="F" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="G" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="H" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="I" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="J" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="K" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="L" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="M" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="N" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="O" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="P" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="Q" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="R" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="S" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="T" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="U" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="V" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="W" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="X" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="Y" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="Z" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="AA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AO" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AR" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AS" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AT" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AU" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AV" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AW" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AX" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AY" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="AZ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="BA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="BB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BO" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BR" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BS" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BT" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BU" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BV" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BW" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BX" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BY" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BZ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
</dr:static-content>
<dr:dynamic-content cell="A" dataModel="/model/leaseback_datasource" row="2">
<dr:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} " fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} and exists (select 1 from con_contract ct where ct.business_type='LEASE'and ct.contract_id=t1.contract_id)" fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/lease_datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} and exists (select 1 from con_contract ct where ct.business_type='LEASEBACK'and ct.contract_id=t1.contract_id) " fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/leaseback_datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month}" fetchAll="true" model="rpt.RPT5010.rpt5010_date" rootPath="/model/day"/>
<dr:excel-report enableTask="false" filename="${/parameter/@file_name}">
<dr:styles>
......@@ -19,7 +20,7 @@
</dr:cell-style>
</dr:styles>
<dr:sheets>
<dr:sheet name="sheet1" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:sheet name="直租" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:static-content cell="A" dataModel="/model/day" row="1">
<dr:cell-data cell="A" offset="false" row="1" styleName="cell3" type="content" value="承租人名称"/>
<dr:cell-data cell="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
......@@ -111,7 +112,193 @@
<dr:cell-data cell="CJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
<dr:cell-data cell="CK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
</dr:static-content>
<dr:dynamic-content cell="A" dataModel="/model/datasource" row="2">
<dr:dynamic-content cell="A" dataModel="/model/lease_datasource" row="2">
<dr:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_1" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_1" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_1" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_2" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_2" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_2" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_3" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_3" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_3" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_4" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_4" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_4" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_5" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_5" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_5" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_6" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_6" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_6" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_7" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_7" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_7" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_8" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_8" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_8" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_9" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_9" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_9" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_10" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_10" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_10" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_11" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_11" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_11" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_12" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_12" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_12" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_13" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_13" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_13" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_14" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_14" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_14" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_15" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_15" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_15" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_16" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_16" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_16" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_17" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_17" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_17" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_18" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_18" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_18" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_19" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_19" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_19" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_20" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_20" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_20" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_21" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_21" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_21" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_22" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_22" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_22" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_23" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_23" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_23" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_24" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_24" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_24" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_25" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_25" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_25" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_26" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_26" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_26" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_27" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_27" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_27" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_28" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_28" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_28" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_29" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_29" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_29" title="利息总额(未核销)" titlestyle="header" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
<dr:sheet name="售后回租" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:static-content cell="A" dataModel="/model/day" row="1">
<dr:cell-data cell="A" offset="false" row="1" styleName="cell3" type="content" value="承租人名称"/>
<dr:cell-data cell="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
<dr:cell-data cell="C" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="D" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="E" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="F" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="G" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="H" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="I" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="J" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="K" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="L" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="M" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="N" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="O" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="P" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="Q" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="R" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="S" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="T" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="U" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="V" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="W" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="X" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="Y" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="Z" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="AA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AO" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AR" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AS" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AT" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AU" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AV" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AW" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AX" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AY" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="AZ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="BA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="BB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BO" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BR" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BS" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BT" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BU" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BV" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BW" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BX" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BY" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BZ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
<dr:cell-data cell="CJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
<dr:cell-data cell="CK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
</dr:static-content>
<dr:dynamic-content cell="A" dataModel="/model/leaseback_datasource" row="2">
<dr:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} " fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} and exists (select 1 from con_contract ct where ct.business_type='LEASE'and ct.contract_id=t1.contract_id)" fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/lease_datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} and exists (select 1 from con_contract ct where ct.business_type='LEASEBACK'and ct.contract_id=t1.contract_id) " fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/leaseback_datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month}" fetchAll="true" model="rpt.RPT5010.rpt5010_date" rootPath="/model/day"/>
<dr:excel-report enableTask="false" filename="${/parameter/@file_name}">
<dr:styles>
......@@ -19,7 +20,7 @@
</dr:cell-style>
</dr:styles>
<dr:sheets>
<dr:sheet name="sheet1" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:sheet name="直租" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:static-content cell="A" dataModel="/model/day" row="1">
<dr:cell-data cell="A" offset="false" row="1" styleName="cell3" type="content" value="承租人名称"/>
<dr:cell-data cell="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
......@@ -114,7 +115,199 @@
<dr:cell-data cell="CM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_30}"/>
<dr:cell-data cell="CN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_30}"/>
</dr:static-content>
<dr:dynamic-content cell="A" dataModel="/model/datasource" row="2">
<dr:dynamic-content cell="A" dataModel="/model/lease_datasource" row="2">
<dr:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_1" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_1" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_1" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_2" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_2" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_2" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_3" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_3" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_3" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_4" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_4" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_4" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_5" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_5" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_5" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_6" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_6" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_6" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_7" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_7" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_7" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_8" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_8" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_8" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_9" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_9" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_9" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_10" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_10" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_10" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_11" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_11" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_11" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_12" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_12" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_12" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_13" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_13" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_13" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_14" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_14" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_14" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_15" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_15" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_15" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_16" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_16" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_16" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_17" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_17" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_17" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_18" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_18" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_18" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_19" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_19" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_19" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_20" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_20" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_20" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_21" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_21" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_21" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_22" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_22" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_22" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_23" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_23" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_23" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_24" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_24" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_24" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_25" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_25" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_25" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_26" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_26" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_26" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_27" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_27" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_27" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_28" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_28" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_28" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_29" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_29" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_29" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_30" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_30" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_30" title="利息总额(未核销)" titlestyle="header" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
<dr:sheet name="售后回租" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:static-content cell="A" dataModel="/model/day" row="1">
<dr:cell-data cell="A" offset="false" row="1" styleName="cell3" type="content" value="承租人名称"/>
<dr:cell-data cell="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
<dr:cell-data cell="C" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="D" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="E" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="F" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="G" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="H" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="I" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="J" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="K" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="L" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="M" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="N" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="O" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="P" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="Q" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="R" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="S" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="T" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="U" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="V" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="W" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="X" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="Y" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="Z" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="AA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AO" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AR" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AS" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AT" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AU" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AV" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AW" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AX" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AY" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="AZ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="BA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="BB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BO" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BR" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BS" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BT" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BU" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BV" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BW" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BX" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BY" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BZ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
<dr:cell-data cell="CJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
<dr:cell-data cell="CK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
<dr:cell-data cell="CL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_30}"/>
<dr:cell-data cell="CM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_30}"/>
<dr:cell-data cell="CN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_30}"/>
</dr:static-content>
<dr:dynamic-content cell="A" dataModel="/model/leaseback_datasource" row="2">
<dr:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month}" fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} and exists (select 1 from con_contract ct where ct.business_type='LEASE'and ct.contract_id=t1.contract_id)" fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/lease_datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month} and exists (select 1 from con_contract ct where ct.business_type='LEASEBACK'and ct.contract_id=t1.contract_id) " fetchAll="true" model="rpt.RPT5010.rpt5010_result_query" rootPath="/model/leaseback_datasource"/>
<a:model-query defaultWhereClause="t1.month =${/parameter/@month}" fetchAll="true" model="rpt.RPT5010.rpt5010_date" rootPath="/model/day"/>
<dr:excel-report enableTask="false" filename="${/parameter/@file_name}">
<dr:styles>
......@@ -19,7 +20,7 @@
</dr:cell-style>
</dr:styles>
<dr:sheets>
<dr:sheet name="sheet1" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:sheet name="直租" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:static-content cell="A" dataModel="/model/day" row="1">
<dr:cell-data cell="A" offset="false" row="1" styleName="cell3" type="content" value="承租人名称"/>
<dr:cell-data cell="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
......@@ -117,7 +118,205 @@
<dr:cell-data cell="CP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_31}"/>
<dr:cell-data cell="CQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_31}"/>
</dr:static-content>
<dr:dynamic-content cell="A" dataModel="/model/datasource" row="2">
<dr:dynamic-content cell="A" dataModel="/model/lease_datasource" row="2">
<dr:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_1" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_1" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_1" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_2" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_2" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_2" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_3" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_3" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_3" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_4" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_4" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_4" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_5" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_5" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_5" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_6" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_6" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_6" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_7" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_7" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_7" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_8" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_8" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_8" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_9" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_9" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_9" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_10" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_10" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_10" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_11" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_11" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_11" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_12" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_12" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_12" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_13" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_13" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_13" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_14" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_14" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_14" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_15" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_15" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_15" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_16" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_16" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_16" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_17" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_17" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_17" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_18" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_18" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_18" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_19" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_19" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_19" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_20" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_20" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_20" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_21" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_21" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_21" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_22" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_22" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_22" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_23" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_23" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_23" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_24" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_24" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_24" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_25" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_25" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_25" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_26" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_26" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_26" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_27" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_27" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_27" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_28" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_28" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_28" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_29" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_29" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_29" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_30" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_30" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_30" title="利息总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="amount_31" title="租金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="principal_31" title="本金总额(未核销)" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="interest_31" title="利息总额(未核销)" titlestyle="header" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
<dr:sheet name="售后回租" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:static-content cell="A" dataModel="/model/day" row="1">
<dr:cell-data cell="A" offset="false" row="1" styleName="cell3" type="content" value="承租人名称"/>
<dr:cell-data cell="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
<dr:cell-data cell="C" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="D" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="E" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_1}"/>
<dr:cell-data cell="F" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="G" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="H" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_2}"/>
<dr:cell-data cell="I" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="J" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="K" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_3}"/>
<dr:cell-data cell="L" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="M" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="N" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_4}"/>
<dr:cell-data cell="O" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="P" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="Q" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_5}"/>
<dr:cell-data cell="R" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="S" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="T" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_6}"/>
<dr:cell-data cell="U" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="V" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="W" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_7}"/>
<dr:cell-data cell="X" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="Y" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="Z" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_8}"/>
<dr:cell-data cell="AA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_9}"/>
<dr:cell-data cell="AD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_10}"/>
<dr:cell-data cell="AG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_11}"/>
<dr:cell-data cell="AJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_12}"/>
<dr:cell-data cell="AM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AO" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_13}"/>
<dr:cell-data cell="AP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AR" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_14}"/>
<dr:cell-data cell="AS" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AT" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AU" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_15}"/>
<dr:cell-data cell="AV" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AW" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AX" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_16}"/>
<dr:cell-data cell="AY" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="AZ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="BA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_17}"/>
<dr:cell-data cell="BB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_18}"/>
<dr:cell-data cell="BE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_19}"/>
<dr:cell-data cell="BH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_20}"/>
<dr:cell-data cell="BK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_21}"/>
<dr:cell-data cell="BN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BO" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_22}"/>
<dr:cell-data cell="BQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BR" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BS" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_23}"/>
<dr:cell-data cell="BT" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BU" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BV" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_24}"/>
<dr:cell-data cell="BW" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BX" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BY" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_25}"/>
<dr:cell-data cell="BZ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CA" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CB" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_26}"/>
<dr:cell-data cell="CC" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CD" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CE" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_27}"/>
<dr:cell-data cell="CF" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CG" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
<dr:cell-data cell="CI" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
<dr:cell-data cell="CJ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
<dr:cell-data cell="CK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
<dr:cell-data cell="CL" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_30}"/>
<dr:cell-data cell="CM" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_30}"/>
<dr:cell-data cell="CN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_30}"/>
<dr:cell-data cell="CO" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_31}"/>
<dr:cell-data cell="CP" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_31}"/>
<dr:cell-data cell="CQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_31}"/>
</dr:static-content>
<dr:dynamic-content cell="A" dataModel="/model/leaseback_datasource" row="2">
<dr:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
......
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