Commit 14247df4 authored by congzhao's avatar congzhao

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into 建机电子合同开发

parents 55047458 ed545c7d
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());
}
}
...@@ -127,4 +127,8 @@ leaf.logDebuggerModel=true ...@@ -127,4 +127,8 @@ leaf.logDebuggerModel=true
session.filter.excludePattern= session.filter.excludePattern=
#layout config #layout config
layout.gridButtonIgnoreReadModel=false layout.gridButtonIgnoreReadModel=false
\ No newline at end of file #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 @@ ...@@ -86,7 +86,9 @@
t1.lease_channel, t1.lease_channel,
t2.cf_direction, t2.cf_direction,
t2.billing_status, 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 from acr_invoice_contract_v t1, ACR_INVOICE_CONTRACT_CF_V t2
where where
t1.contract_id=t2.contract_id t1.contract_id=t2.contract_id
...@@ -94,9 +96,9 @@ ...@@ -94,9 +96,9 @@
'250', '250',
t1.inv_object_taxpayer_type, t1.inv_object_taxpayer_type,
t1.object_taxpayer_type) = 'SMALL_SCALE_TAXPAYER' and 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 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 t2.cashflow_id not in (20265,34267,24445)
and nvl(t2.billing_status,'NOT') != 'FULL' and nvl(t2.billing_status,'NOT') != 'FULL'
--and t2.cf_direction='INFLOW' --and t2.cf_direction='INFLOW'
...@@ -192,7 +194,9 @@ ...@@ -192,7 +194,9 @@
t1.lease_channel, t1.lease_channel,
NULL cf_direction, NULL cf_direction,
NULL billing_status, 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 from acr_invoice_contract_v t1, acr_invoice_penalty_v t2
where where
t2.contract_id=t1.contract_id t2.contract_id=t1.contract_id
...@@ -283,6 +287,8 @@ ...@@ -283,6 +287,8 @@
<bm:field name="bp_id_agent_level1_n"/> <bm:field name="bp_id_agent_level1_n"/>
<bm:field name="termination_date"/> <bm:field name="termination_date"/>
<bm:field name="lease_channel"/> <bm:field name="lease_channel"/>
<bm:field name="business_type_desc"/>
<bm:field name="business_type"/>
</bm:fields> </bm:fields>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="billing_object_name" queryExpression="vv.billing_object_name = ${@billing_object_name}"/> <bm:query-field name="billing_object_name" queryExpression="vv.billing_object_name = ${@billing_object_name}"/>
...@@ -314,6 +320,7 @@ ...@@ -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="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="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="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="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" 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;"/> <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;"/>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
t.cf_billing_amount, t.cf_billing_amount,
t.received_amount, t.received_amount,
t.contract_id, t.contract_id,
cf.principal, decode(t.cf_item, 101, 0, cf.principal) principal,
cf.interest, cf.interest,
con.contract_number, con.contract_number,
con.contract_name, con.contract_name,
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 下午06:07:55
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_change(p_invoice_hd=> ${@invoice_hd_ids},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_reject(p_invoice_hd_id=> ${@invoice_hd_id},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 上午09:06:33
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT t1.invoice_hd_id,
t1.document_number,
TO_CHAR(t1.invoice_date, 'yyyy-mm-dd') AS invoice_date,
t1.document_category,
t1.contract_id,
t1.contract_number,
nvl(t1.contract_name,(select contract_name from con_contract
where contract_id =(select cf.contract_id
from con_contract_Cashflow cf,acr_invoice_ln ln
where ln.invoice_hd_id=t1.invoice_hd_id
and cf.cashflow_id=ln.cashflow_id
and rownum=1)
))contract_name, --modify by wuts 2019-1-22
--decode(t1.lease_channel,'01',t1.project_name,'') contract_name2,
t1.project_id,
t1.project_number,
t1.project_name,
t1.invoice_bp_id,
t1.invoice_bp_code,
t1.invoice_bp_name,
t1.invoice_title,
t1.invoice_number,
t1.invoice_status,
t1.invoice_status_desc,
t1.currency,
t1.business_type,
t1.business_type_desc,
t1.invoice_kind,
t1.invoice_kind_desc,
t1.document_type,
t1.created_by_name,
t1.created_by,
TO_CHAR(t1.accounting_date, 'yyyy-mm-dd') AS accounting_date,
t1.total_amount,
t1.tax_amount,
t1.billing_method,
t1.lease_organization,
t1.lease_channel,
t1.division,
t1.company_id,
t1.spv_company_id
FROM acr_invoice_hd_v t1
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
]]></bm:query-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.delete_invoice(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
UPDATE
acr_invoice_hd a
SET
a.merge_flag = ${@merge_flag}
WHERE
a.invoice_hd_id = ${@invoice_hd_id};
acr_invoice_pkg.invoice_row_merge(p_invoice_hd_id => ${@invoice_hd_id}, p_user_id => ${/session/@user_id}, p_merge_flag =>${@merge_flag});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
<bm:query-field name="document_number_t" queryExpression="t1.document_number &lt;= ${@document_number_t}"/>
<bm:query-field name="invoice_number_f" queryExpression="t1.invoice_number &gt;= ${@invoice_number_f}"/>
<bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/>
<bm:query-field name="contract_number_f" queryExpression="t1.contract_number &lt;= ${@contract_number_f}"/>
<bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_bp_name" queryExpression="t1.invoice_bp_name like ${@invoice_bp_name}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status like ${@invoice_status}"/>
<bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_f" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@accounting_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_t" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/>
<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>
<bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="business_type" queryExpression="t1.business_type = ${@business_type}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="created_by" queryExpression="t1.created_by = ${@created_by}"/>
<!--
<bm:query-field name="contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
-->
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;CONFIRMING&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 上午09:06:33
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT t1.invoice_hd_id,
t1.document_number,
TO_CHAR(t1.invoice_date, 'yyyy-mm-dd') AS invoice_date,
t1.document_category,
t1.contract_id,
t1.contract_number,
nvl(t1.contract_name,(select contract_name from con_contract
where contract_id =(select cf.contract_id
from con_contract_Cashflow cf,acr_invoice_ln ln
where ln.invoice_hd_id=t1.invoice_hd_id
and cf.cashflow_id=ln.cashflow_id
and rownum=1)
))contract_name, --modify by wuts 2019-1-22
--decode(t1.lease_channel,'01',t1.project_name,'') contract_name2,
t1.project_id,
t1.project_number,
t1.project_name,
t1.invoice_bp_id,
t1.invoice_bp_code,
t1.invoice_bp_name,
t1.invoice_title,
t1.invoice_number,
t1.invoice_status,
t1.invoice_status_desc,
t1.currency,
t1.business_type,
t1.business_type_desc,
t1.invoice_kind,
t1.invoice_kind_desc,
t1.document_type,
t1.created_by_name,
t1.created_by,
TO_CHAR(t1.accounting_date, 'yyyy-mm-dd') AS accounting_date,
t1.total_amount,
t1.tax_amount,
t1.billing_method,
t1.lease_organization,
t1.lease_channel,
t1.division,
t1.company_id,
t1.spv_company_id
FROM acr_invoice_hd_v t1
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
]]></bm:query-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.delete_invoice(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
UPDATE
acr_invoice_hd a
SET
a.merge_flag = ${@merge_flag}
WHERE
a.invoice_hd_id = ${@invoice_hd_id};
acr_invoice_pkg.invoice_row_merge(p_invoice_hd_id => ${@invoice_hd_id}, p_user_id => ${/session/@user_id}, p_merge_flag =>${@merge_flag});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
<bm:query-field name="document_number_t" queryExpression="t1.document_number &lt;= ${@document_number_t}"/>
<bm:query-field name="invoice_number_f" queryExpression="t1.invoice_number &gt;= ${@invoice_number_f}"/>
<bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/>
<bm:query-field name="contract_number_f" queryExpression="t1.contract_number &lt;= ${@contract_number_f}"/>
<bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_bp_name" queryExpression="t1.invoice_bp_name like ${@invoice_bp_name}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status like ${@invoice_status}"/>
<bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_f" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@accounting_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_t" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/>
<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>
<bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="business_type" queryExpression="t1.business_type = ${@business_type}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="created_by" queryExpression="t1.created_by = ${@created_by}"/>
<!--
<bm:query-field name="contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
-->
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;CONFIRMING&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
</bm:data-filters>
</bm:model>
...@@ -67,6 +67,8 @@ ...@@ -67,6 +67,8 @@
<bm:field name="vender_id_n" expression="(decode(vender_id,-100,'买断机',(select scv.bp_name from hls_bp_master scv where scv.enabled_flag=&apos;Y&apos; and scv.bp_id = t1.vender_id)))" forInsert="false" forUpdate="false"/> <bm:field name="vender_id_n" expression="(decode(vender_id,-100,'买断机',(select scv.bp_name from hls_bp_master scv where scv.enabled_flag=&apos;Y&apos; and scv.bp_id = t1.vender_id)))" forInsert="false" forUpdate="false"/>
<bm:field name="finance_type_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;FINANCE_TYPE&apos; and scv.code_value = t1.finance_type)" forInsert="false" forUpdate="false"/> <bm:field name="finance_type_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;FINANCE_TYPE&apos; and scv.code_value = t1.finance_type)" forInsert="false" forUpdate="false"/>
<bm:field name="pay_method"/>
<bm:field name="pay_method_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = &apos;PAY_METHODS&apos; and v.code_value=t1.pay_method)" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<o:sequence-pk sequenceName="con_contract_tmpt_clause_s"/> <o:sequence-pk sequenceName="con_contract_tmpt_clause_s"/>
......
...@@ -318,7 +318,10 @@ ...@@ -318,7 +318,10 @@
AND ccc.cf_status = 'RELEASE' AND ccc.cf_status = 'RELEASE'
AND to_char(ccc.due_date, 'yyyymm') > AND to_char(ccc.due_date, 'yyyymm') >
to_char(to_date(${@base_date}, 'yyyy-mm-dd'), 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 FROM con_contract t
WHERE t.data_class = 'NORMAL' WHERE t.data_class = 'NORMAL'
...@@ -327,6 +330,9 @@ ...@@ -327,6 +330,9 @@
trunc(to_date(${@due_date_from}, 'yyyy-mm-dd')) trunc(to_date(${@due_date_from}, 'yyyy-mm-dd'))
AND trunc(t.lease_start_date) <= AND trunc(t.lease_start_date) <=
trunc(to_date(${@due_date_to}, 'yyyy-mm-dd')) 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 ) v
......
...@@ -29,5 +29,6 @@ ...@@ -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_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="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="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:query-fields>
</bm:model> </bm:model>
...@@ -23,7 +23,11 @@ ...@@ -23,7 +23,11 @@
AND cwo.cf_item IN (1, 200, 250) AND cwo.cf_item IN (1, 200, 250)
AND nvl(cwo.reversed_flag, 'N') = 'N' AND nvl(cwo.reversed_flag, 'N') = 'N'
AND trunc(ct.transaction_date) <= AND trunc(ct.transaction_date) <=
trunc(to_date(${@last_month_date}, 'yyyy-mm-dd'))), trunc(to_date(${@last_month_date}, 'yyyy-mm-dd'))
and exists(select 1
from con_contract_cashflow cc
where cc.CASHFLOW_ID = cwo.CASHFLOW_ID
and cc.CF_STATUS = 'RELEASE')),
0) 0)
ELSE ELSE
0 0
...@@ -219,7 +223,12 @@ ...@@ -219,7 +223,12 @@
AND cwo.csh_transaction_id = ct.transaction_id AND cwo.csh_transaction_id = ct.transaction_id
AND nvl(cwo.reversed_flag, 'N') = 'N' AND nvl(cwo.reversed_flag, 'N') = 'N'
AND trunc(ct.transaction_date) <= AND trunc(ct.transaction_date) <=
TRUNC(last_day(to_date(${@start_calc_date}, 'yyyy-mm-dd')))), TRUNC(last_day(to_date(${@start_calc_date}, 'yyyy-mm-dd')))
and exists(select 1
from con_contract_cashflow cc
where cc.CASHFLOW_ID = cwo.CASHFLOW_ID
and cc.CF_STATUS = 'RELEASE')
),
0) rest_unpayment_amount, 0) rest_unpayment_amount,
--保证金后 --保证金后
contract_item_query_pkg.calc_rest_rent_by_dudt(p_contract_id => t.contract_id, contract_item_query_pkg.calc_rest_rent_by_dudt(p_contract_id => t.contract_id,
...@@ -369,16 +378,23 @@ ...@@ -369,16 +378,23 @@
where v.CODE = 'CON500_CONTRACT_STATUS' where v.CODE = 'CON500_CONTRACT_STATUS'
and v.CODE_VALUE = t.CONTRACT_STATUS and v.CODE_VALUE = t.CONTRACT_STATUS
and v.CODE_ENABLED_FLAG = 'Y' and v.CODE_ENABLED_FLAG = 'Y'
and v.CODE_VALUE_ENABLED_FLAG = 'Y') contract_status_n and v.CODE_VALUE_ENABLED_FLAG = 'Y') contract_status_n,
t.is_buyout,
(Select v1.code_value_name
From sys_code_values_v v1
Where v1.code = 'YES_OR_NO'
And v1.code_enabled_flag = 'Y'
And v1.code_value_enabled_flag = 'Y'
and v1.CODE_VALUE = t.is_buyout) is_buyout_n
FROM con_contract t, hls_bp_master h FROM con_contract t, hls_bp_master h
WHERE t.data_class = 'NORMAL' WHERE t.data_class = 'NORMAL'
AND t.bp_id_agent_level1 = h.bp_id AND t.bp_id_agent_level1 = h.bp_id
AND (t.contract_status IN ('INCEPT', AND (t.contract_status IN ('INCEPT',
'TERMINATING', 'TERMINATING',
'ETING', 'ETING',
'REPURING', 'REPURING') or
'ET') or (to_char(t.et_date, 'yyyy-mm') >= ${@period_name} and t.contract_status in ('TERMINATE',
(to_char(t.et_date, 'yyyy-mm') >= ${@period_name} and t.contract_status = 'TERMINATE')) 'ET')))
and trunc(t.lease_start_date) <= trunc(last_day(to_date(${@start_calc_date}, 'yyyy-mm-dd'))) and trunc(t.lease_start_date) <= trunc(last_day(to_date(${@start_calc_date}, 'yyyy-mm-dd')))
]]> ]]>
</bm:query-sql> </bm:query-sql>
......
...@@ -3,106 +3,115 @@ ...@@ -3,106 +3,115 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT t.contract_id, SELECT
t.contract_number, t.contract_id,
(SELECT h.extra_nam t.contract_number,
FROM hls_bp_master h (SELECT h.extra_nam
WHERE h.bp_id=t.bp_id_agent_level1) extra_nam, FROM hls_bp_master h
(SELECT h.bp_name WHERE h.bp_id = t.bp_id_agent_level1) extra_nam,
FROM hls_bp_master h (SELECT h.bp_name
WHERE h.bp_id=t.bp_id_tenant) tenant_name, FROM hls_bp_master h
--租赁开始日 WHERE h.bp_id = t.bp_id_tenant) tenant_name,
t.lease_start_date, --租赁开始日
--机型 t.lease_start_date,
ccli.modelcd, --机型
--机号 ccli.modelcd,
ccli.machine_number, --机号
--回数 ccli.machine_number,
decode(ccc.cf_item,8,'留购价格',ccc.times) times, --回数
--支付预定日 decode(ccc.cf_item, 8, '留购价格', ccc.times) times,
ccc.due_date, --支付预定日
--应收款金额 ccc.due_date,
(ccc.due_amount - --应收款金额
nvl((SELECT SUM(cwo.write_off_due_amount) (ccc.due_amount -
FROM csh_transaction t, csh_write_off cwo nvl((SELECT SUM(cwo.write_off_due_amount)
WHERE cwo.cashflow_id = ccc.cashflow_id FROM csh_transaction t, csh_write_off cwo
AND t.transaction_id = cwo.csh_transaction_id WHERE cwo.cashflow_id = ccc.cashflow_id
AND nvl(cwo.reversed_flag, 'N') = 'N' AND t.transaction_id = cwo.csh_transaction_id
AND trunc(t.transaction_date) < AND nvl(cwo.reversed_flag, 'N') = 'N'
trunc(to_date(${@start_calc_date}, 'yyyy-mm-dd'))), AND trunc(t.transaction_date) <
0)) net_amount, trunc(to_date(${@start_calc_date}, 'yyyy-mm-dd'))),
--当月已收款金额 0)) net_amount,
nvl((SELECT SUM(cwo.write_off_due_amount) --当月已收款金额
FROM csh_transaction t, csh_write_off cwo nvl((SELECT SUM(cwo.write_off_due_amount)
WHERE cwo.cashflow_id = ccc.cashflow_id FROM csh_transaction t, csh_write_off cwo
AND t.transaction_id = cwo.csh_transaction_id WHERE cwo.cashflow_id = ccc.cashflow_id
AND nvl(cwo.reversed_flag, 'N') = 'N' AND t.transaction_id = cwo.csh_transaction_id
AND to_char(t.transaction_date, 'yyyy-mm') = ${@period_name}), AND nvl(cwo.reversed_flag, 'N') = 'N'
0) write_off_amount, AND to_char(t.transaction_date, 'yyyy-mm') = ${@period_name}),
--剩余金额 0) write_off_amount,
(ccc.due_amount - --剩余金额
nvl((SELECT SUM(cwo.write_off_due_amount) (ccc.due_amount -
FROM csh_transaction t, csh_write_off cwo nvl((SELECT SUM(cwo.write_off_due_amount)
WHERE cwo.cashflow_id = ccc.cashflow_id FROM csh_transaction t, csh_write_off cwo
AND t.transaction_id = cwo.csh_transaction_id WHERE cwo.cashflow_id = ccc.cashflow_id
AND nvl(cwo.reversed_flag, 'N') = 'N' AND t.transaction_id = cwo.csh_transaction_id
AND trunc(t.transaction_date) <= AND nvl(cwo.reversed_flag, 'N') = 'N'
trunc(to_date(${@last_month_date}, 'yyyy-mm-dd'))), AND trunc(t.transaction_date) <=
0)) unrecived_amount, trunc(to_date(${@last_month_date}, 'yyyy-mm-dd'))),
--逾期天数 0)) unrecived_amount,
(CASE --逾期天数
WHEN (ccc.due_amount - (CASE
nvl((SELECT SUM(cwo.write_off_due_amount) WHEN (ccc.due_amount -
FROM csh_transaction t, csh_write_off cwo nvl((SELECT SUM(cwo.write_off_due_amount)
WHERE cwo.cashflow_id = ccc.cashflow_id FROM csh_transaction t, csh_write_off cwo
AND t.transaction_id = cwo.csh_transaction_id WHERE cwo.cashflow_id = ccc.cashflow_id
AND nvl(cwo.reversed_flag, 'N') = 'N' AND t.transaction_id = cwo.csh_transaction_id
AND trunc(t.transaction_date) <= AND nvl(cwo.reversed_flag, 'N') = 'N'
trunc(to_date(${@last_month_date}, 'yyyy-mm-dd'))), AND trunc(t.transaction_date) <=
0)) > 0 THEN trunc(to_date(${@last_month_date}, 'yyyy-mm-dd'))),
floor(to_date(${@last_month_date}, 'yyyy-mm-dd') - ccc.due_date) 0)) > 0
ELSE THEN
0 floor(to_date(${@last_month_date}, 'yyyy-mm-dd') - ccc.due_date)
END) overdue_days, ELSE
NVL((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) - 0
nvl(tt.returned_amount, 0))) END) overdue_days,
from csh_transaction tt NVL((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
where tt.transaction_type = 'DEPOSIT' nvl(tt.returned_amount, 0)))
AND tt.deposit_trans_type = 'rent_deposit' from csh_transaction tt
AND NVL(tt.reversed_flag,'N')='N' where tt.transaction_type = 'DEPOSIT'
and tt.ref_contract_id = T.contract_id),0) deposit_amount AND tt.deposit_trans_type = 'rent_deposit'
FROM con_contract_cashflow ccc, AND NVL(tt.reversed_flag, 'N') = 'N'
con_contract t, and tt.ref_contract_id = T.contract_id), 0) deposit_amount,
con_contract_lease_item ccli t.is_buyout,
WHERE ccc.contract_id = t.contract_id (Select v1.code_value_name
AND t.contract_id = ccli.contract_id From sys_code_values_v v1
AND ccc.cf_item IN (1, 8, 200, 250) Where v1.code = 'YES_OR_NO'
AND ccc.cf_status = 'RELEASE' And v1.code_enabled_flag = 'Y'
AND t.data_class = 'NORMAL' And v1.code_value_enabled_flag = 'Y'
AND trunc(ccc.due_date) <= and v1.CODE_VALUE = t.is_buyout) is_buyout_n
trunc(to_date(${@last_month_date}, 'yyyy-mm-dd')) FROM con_contract_cashflow ccc,
AND ((trunc(t.lease_start_date) <= con_contract t,
trunc(to_date(${@last_month_date}, 'yyyy-mm-dd')) AND con_contract_lease_item ccli
t.contract_status = 'INCEPT') OR WHERE ccc.contract_id = t.contract_id
(to_char(t.et_date, 'yyyy-mm') >= ${@period_name} AND AND t.contract_id = ccli.contract_id
t.contract_status = 'TERMINATE')) AND ccc.cf_item IN (1, 8, 200, 250)
AND ccc.due_amount > AND ccc.cf_status = 'RELEASE'
nvl((SELECT SUM(cwo.write_off_due_amount) AND t.data_class = 'NORMAL'
FROM csh_transaction t, csh_write_off cwo AND trunc(ccc.due_date) <=
WHERE cwo.cashflow_id = ccc.cashflow_id trunc(to_date(${@last_month_date}, 'yyyy-mm-dd'))
AND t.transaction_id = cwo.csh_transaction_id AND ((trunc(t.lease_start_date) <=
AND nvl(cwo.reversed_flag, 'N') = 'N' trunc(to_date(${@last_month_date}, 'yyyy-mm-dd')) AND
AND trunc(t.transaction_date) < t.contract_status = 'INCEPT') OR
trunc(to_date(${@start_calc_date}, 'yyyy-mm-dd'))), (to_char(t.et_date, 'yyyy-mm') >= ${@period_name} AND
0) t.contract_status = 'TERMINATE'))
AND ccc.due_amount >
nvl((SELECT SUM(cwo.write_off_due_amount)
FROM csh_transaction t, csh_write_off cwo
WHERE cwo.cashflow_id = ccc.cashflow_id
AND t.transaction_id = cwo.csh_transaction_id
AND nvl(cwo.reversed_flag, 'N') = 'N'
AND trunc(t.transaction_date) <
trunc(to_date(${@start_calc_date}, 'yyyy-mm-dd'))),
0)
]]> ]]>
</bm:query-sql> </bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:query-fields> <bm:query-fields>
<!-- <bm:query-field name="period_name" queryExpression="t1.period_day=${@period_name}"/>--> <!-- <bm:query-field name="period_name" queryExpression="t1.period_day=${@period_name}"/>-->
<!-- <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="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="bp_id_agent_level1" queryExpression="t.bp_id_agent_level1=${@bp_id_agent_level1}"/>-->
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/> <bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/> <bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_total" expression="(select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=1)" forInsert="false" forUpdate="false"/> <bm:field name="amount_total" expression="(select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_principal" expression="(select sum(nvl(ccc.principal,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)" forInsert="false" forUpdate="false"/> <bm:field name="amount_principal" expression="(select sum(nvl(ccc.principal,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_interest" expression="(select sum(nvl(ccc.interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/> <bm:field name="amount_interest" expression="(select sum(nvl(ccc.interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/>
...@@ -70,8 +70,9 @@ ...@@ -70,8 +70,9 @@
<bm:pk-field name="contract_id"/> <bm:pk-field name="contract_id"/>
</bm:primary-key> </bm:primary-key>
<bm:query-fields> <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="owner_user_id" queryOperator="="/>
<bm:query-field field="contract_number" queryOperator="="/>
<bm:query-field field="bp_id_tenant" queryOperator="="/> <bm:query-field field="bp_id_tenant" queryOperator="="/>
<!-- <bm:query-field field="lease_organization" queryOperator="="/>--> <!-- <bm:query-field field="lease_organization" queryOperator="="/>-->
<bm:query-field field="contract_status" queryOperator="="/> <bm:query-field field="contract_status" queryOperator="="/>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/> <bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/> <bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_agent_desc"/> <bm:field name="bp_id_agent_desc"/>
<bm:field name="business_type_n"/> <bm:field name="business_type_n"/>
<bm:field name="division_n"/> <bm:field name="division_n"/>
......
...@@ -51,7 +51,10 @@ ...@@ -51,7 +51,10 @@
Where tn.cashflow_id = cwo.cashflow_id Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <= cwo.creation_date), And tn.creation_date <= cwo.creation_date),
0)) As unreceived_amount, 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, From con_contract_cashflow ccc,
con_contract c, con_contract c,
hls_bp_master h, hls_bp_master h,
......
...@@ -78,6 +78,10 @@ ...@@ -78,6 +78,10 @@
(select contract_number (select contract_number
from con_contract from con_contract
where contract_id = t.contract_id) contract_number, 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, t.account_code account_id_n,
(select description_text (select description_text
from fnd_descriptions from fnd_descriptions
...@@ -164,6 +168,10 @@ ...@@ -164,6 +168,10 @@
(select contract_number (select contract_number
from con_contract from con_contract
where contract_id = tt.contract_id) contract_number, 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, '小计:' account_id_n,
null account_name, null account_name,
tt.contract_id, tt.contract_id,
...@@ -259,6 +267,7 @@ ...@@ -259,6 +267,7 @@
p_due_date =>to_date(${@due_date},'yyyy-mm-dd'), p_due_date =>to_date(${@due_date},'yyyy-mm-dd'),
p_user_id =>${/session/@user_id}, p_user_id =>${/session/@user_id},
p_bp_id =>${@bp_id}, p_bp_id =>${@bp_id},
p_business_type =>${@business_type},
p_overday1 =>${@overday1}, p_overday1 =>${@overday1},
p_overday2 =>${@overday2}, p_overday2 =>${@overday2},
p_overday3 =>${@overday3}, p_overday3 =>${@overday3},
...@@ -274,6 +283,7 @@ ...@@ -274,6 +283,7 @@
</bm:operations> </bm:operations>
<bm:fields> <bm:fields>
<bm:field name="division_n"/> <bm:field name="division_n"/>
<bm:field name="business_type_n"/>
<bm:field name="contract_id"/> <bm:field name="contract_id"/>
<bm:field name="bp_code"/> <bm:field name="bp_code"/>
<bm:field name="contract_number"/> <bm:field name="contract_number"/>
......
...@@ -79,6 +79,9 @@ ...@@ -79,6 +79,9 @@
<bm:field name="paid_byother_flag"/> <bm:field name="paid_byother_flag"/>
<bm:field name="receipt_type_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;RECEIPT_TYPE&apos; and v.code_value=t1.receipt_type)"/> <bm:field name="receipt_type_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;RECEIPT_TYPE&apos; and v.code_value=t1.receipt_type)"/>
<bm:field name="ref_n01"/> <bm:field name="ref_n01"/>
<bm:field name="approval_status" expression="decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'))"/>
<bm:field name="approval_status_desc" expression="(Select v.code_value_name From sys_code_values_v v Where v.code = &apos;WFL_STATUS&apos; And v.code_value = decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')))"/>
<bm:field name="transaction_wfl_id"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
...@@ -89,6 +92,7 @@ ...@@ -89,6 +92,7 @@
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/> <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<!-- <bm:data-filter name="query" expression="(t1.posted_flag=&apos;Y&apos;)"/>--> <!-- <bm:data-filter name="query" expression="(t1.posted_flag=&apos;Y&apos;)"/>-->
<bm:data-filter name="approval_status" enforceOperations="query" expression="('APPROVED' != decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')))"/>
</bm:data-filters> </bm:data-filters>
<bm:query-fields> <bm:query-fields>
<bm:query-field field="receipt_type" queryOperator="="/> <bm:query-field field="receipt_type" queryOperator="="/>
...@@ -142,5 +146,6 @@ and cwo.reversed_flag = 'N' ...@@ -142,5 +146,6 @@ and cwo.reversed_flag = 'N'
and cc.data_class = 'NORMAL' and cc.data_class = 'NORMAL'
and cwo.csh_transaction_id = t1.transaction_id and cwo.csh_transaction_id = t1.transaction_id
and hbm.bp_name like ${@bp_name_r})"/> and hbm.bp_name like ${@bp_name_r})"/>
<bm:query-field name="approval_status" queryExpression="decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')) = ${@approval_status}"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
Select
t.transaction_wfl_id,
t.transaction_id,
t.transaction_num,
to_char(t.transaction_date, 'yyyy-mm-dd') transaction_date,
to_char(t.reversed_date, 'yyyy-mm-dd') reversed_date,
t.reversed_period_name,
t.description,
t.note,
t.creation_date,
t.created_by,
t.last_update_date,
t.last_updated_by,
t.ref_v01,
t.ref_v02,
t.ref_v03,
t.ref_v04,
t.ref_v05,
t.ref_n01,
t.ref_n02,
t.ref_n03,
t.ref_n04,
t.ref_n05,
t.ref_d01,
t.ref_d02,
t.ref_d03,
t.ref_d04,
t.ref_d05,
t.wfl_instance_id,
t.approval_status
From csh_transaction_wfl t #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="transaction_wfl_id" queryExpression="t.transaction_wfl_id = ${@transaction_wfl_id}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-6-3 下午12:38:12
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CSH_WRITE_OFF_WFL" defaultOrderBy="t1.write_off_id" needAccessControl="false">
<bm:fields>
<bm:field name="write_off_wfl_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WRITE_OFF_WFL_ID" prompt="CSH_WRITE_OFF.WRITE_OFF_WFL_ID"/>
<bm:field name="write_off_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WRITE_OFF_ID" prompt="CSH_WRITE_OFF.WRITE_OFF_ID"/>
<bm:field name="write_off_type" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="CSH513_WRITE_OFF_TYPE" lookupField="write_off_type_name" physicalName="WRITE_OFF_TYPE" prompt="CSH_WRITE_OFF.WRITE_OFF_TYPE"/>
<bm:field name="write_off_date" databaseType="DATE" datatype="java.util.Date" physicalName="WRITE_OFF_DATE" prompt="HLS.WRITE_OFF_DATE"/>
<bm:field name="journal_date" databaseType="DATE" datatype="java.util.Date" physicalName="JOURNAL_DATE" prompt="CSH_WRITE_OFF.JOURNAL_DATE"/>
<bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM" prompt="CSH_WRITE_OFF.INTERNAL_PERIOD_NUM"/>
<bm:field name="period_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_NAME" prompt="CSH_WRITE_OFF.PERIOD_NAME"/>
<bm:field name="csh_transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CSH_TRANSACTION_ID" prompt="CSH_WRITE_OFF.CSH_TRANSACTION_ID"/>
<bm:field name="csh_write_off_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CSH_WRITE_OFF_AMOUNT" prompt="HLS.CSH_WRITE_OFF_AMOUNT"/>
<bm:field name="subsequent_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SUBSEQUENT_CSH_TRX_ID" prompt="CSH_WRITE_OFF.SUBSEQUENT_CSH_TRX_ID"/>
<bm:field name="subseq_csh_write_off_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="SUBSEQ_CSH_WRITE_OFF_AMOUNT" prompt="CSH_WRITE_OFF.SUBSEQ_CSH_WRITE_OFF_AMOUNT"/>
<bm:field name="reversed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REVERSED_FLAG" prompt="CSH_WRITE_OFF.REVERSED_FLAG"/>
<bm:field name="reversed_write_off_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REVERSED_WRITE_OFF_ID" prompt="CSH_WRITE_OFF.REVERSED_WRITE_OFF_ID"/>
<bm:field name="reversed_date" databaseType="DATE" datatype="java.util.Date" physicalName="REVERSED_DATE" prompt="CSH_WRITE_OFF.REVERSED_DATE"/>
<bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CASHFLOW_ID" prompt="CSH_WRITE_OFF.CASHFLOW_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CSH_WRITE_OFF.CONTRACT_ID"/>
<bm:field name="times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TIMES" prompt="CSH_WRITE_OFF.TIMES"/>
<bm:field name="cf_item" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_ITEM" prompt="CSH_WRITE_OFF.CF_ITEM"/>
<bm:field name="cf_type" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_TYPE" prompt="CSH_WRITE_OFF.CF_TYPE"/>
<bm:field name="penalty_calc_date" databaseType="DATE" datatype="java.util.Date" physicalName="PENALTY_CALC_DATE" prompt="CSH_WRITE_OFF.PENALTY_CALC_DATE"/>
<bm:field name="write_off_due_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="WRITE_OFF_DUE_AMOUNT" prompt="HLS.WRITEOFF_DUE_AMOUNT"/>
<bm:field name="write_off_principal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="WRITE_OFF_PRINCIPAL" prompt="CSH513.WRITE_OFF_PRINCIPAL"/>
<bm:field name="write_off_interest" databaseType="NUMBER" datatype="java.lang.Double" physicalName="WRITE_OFF_INTEREST" prompt="CSH513.WRITE_OFF_INTEREST"/>
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="CSH_WRITE_OFF.DESCRIPTION"/>
<bm:field name="opposite_doc_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="OPPOSITE_DOC_CATEGORY" prompt="CSH_WRITE_OFF.OPPOSITE_DOC_CATEGORY"/>
<bm:field name="opposite_doc_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="OPPOSITE_DOC_TYPE" prompt="CSH_WRITE_OFF.OPPOSITE_DOC_TYPE"/>
<bm:field name="opposite_doc_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OPPOSITE_DOC_ID" prompt="CSH_WRITE_OFF.OPPOSITE_DOC_ID"/>
<bm:field name="opposite_doc_line_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OPPOSITE_DOC_LINE_ID" prompt="CSH_WRITE_OFF.OPPOSITE_DOC_LINE_ID"/>
<bm:field name="opposite_doc_detail_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OPPOSITE_DOC_DETAIL_ID" prompt="CSH_WRITE_OFF.OPPOSITE_DOC_DETAIL_ID"/>
<bm:field name="opposite_write_off_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OPPOSITE_WRITE_OFF_AMOUNT" prompt="CSH_WRITE_OFF.OPPOSITE_WRITE_OFF_AMOUNT"/>
<bm:field name="create_je_mothed" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_MOTHED" prompt="CSH_WRITE_OFF.CREATE_JE_MOTHED"/>
<bm:field name="create_je_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_FLAG" prompt="CSH_WRITE_OFF.CREATE_JE_FLAG"/>
<bm:field name="gld_interface_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLD_INTERFACE_FLAG" prompt="CSH_WRITE_OFF.GLD_INTERFACE_FLAG"/>
<bm:field name="write_off_type_name" forInsert="false" forUpdate="false" prompt="HLS.WRITE_OFF_TYPE"/>
<bm:field name="write_off_classification" lookupField="write_off_classification_desc" lookupCode="DS_CSH_WRITE_OFF_CLASSIFICATION" databaseType="VARCHAR2" datatype="java.lang.String" />
<bm:field name="write_off_classification_desc" forInsert="false" forUpdate="false"/>
<bm:field name="journal_num" expression="(SELECT h.journal_num FROM hls_journal_header h, hls_journal_detail d WHERE d.source_table = 'CSH_WRITE_OFF' AND d.source_id = t1.write_off_id AND h.journal_header_id = d.journal_header_id AND h.reversed_flag = 'N' AND rownum = 1)" forInsert="false" forUpdate="false"/>
<bm:field name="journal_user" expression="(SELECT u.description FROM hls_journal_detail d, sys_user u WHERE d.source_table = 'CSH_WRITE_OFF' AND d.source_id = t1.write_off_id AND d.created_by = u.user_id AND rownum = 1)" forInsert="false" forUpdate="false"/>
<bm:field name="history_flag" expression="(SELECT ct.history_flag FROM csh_transaction ct WHERE ct.transaction_id = t1.csh_transaction_id)" forInsert="false" forUpdate="false"/>
<bm:field name="ref_bp_name" expression="(select cc.bp_name from con_contract_v cc where cc.contract_id = nvl(t1.contract_id,t1.ASSIGNS_CONTRACT_ID))" forInsert="false" forUpdate="false"/>
<bm:field name="ref_contract_number" expression="(select cc.contract_number from con_contract cc where cc.contract_id = nvl(t1.contract_id,t1.ASSIGNS_CONTRACT_ID))" forInsert="false" forUpdate="false"/>
<bm:field name="gld_batch_id"/>
<bm:field name="transaction_wfl_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_WFL_ID" prompt="CSH_WRITE_OFF.TRANSACTION_WFL_ID"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="write_off_wfl_id"/>
</bm:primary-key>
<bm:relations>
<bm:relation name="con_cashflow" joinType="left outer" refAlias="t2" refModel="cont.CON500.con_contract_cashflow_v">
<bm:reference foreignField="cashflow_id" localField="cashflow_id"/>
</bm:relation>
<bm:relation name="hls_cf_type" joinType="left outer" refAlias="t3" refModel="hls.HLS005.hls_cashflow_type_v">
<bm:reference foreignField="cf_type" localField="cf_type"/>
</bm:relation>
<bm:relation name="hls_cf_item" joinType="left outer" refAlias="t4" refModel="hls.HLS005.hls_cashflow_item_v">
<bm:reference foreignField="cf_item" localField="cf_item"/>
</bm:relation>
</bm:relations>
<bm:ref-fields>
<bm:ref-field name="due_date" relationName="con_cashflow" sourceField="due_date"/>
<bm:ref-field name="contract_number" relationName="con_cashflow" sourceField="contract_number"/>
<bm:ref-field name="project_name" relationName="con_cashflow" sourceField="project_name"/>
<bm:ref-field name="bp_name" relationName="con_cashflow" sourceField="bp_name"/>
<bm:ref-field name="cf_type_name" relationName="hls_cf_type" sourceField="description"/>
<bm:ref-field name="cf_item_name" relationName="hls_cf_item" sourceField="cf_item_desc"/>
</bm:ref-fields>
<bm:query-fields>
<bm:query-field field="transaction_wfl_id" queryOperator="="/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-5-28 下午01:44:42
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
csh_transaction_wfl_pkg.csh_transaction_wfl_insert(
p_transaction_wfl_id => ${@transaction_wfl_id},
p_transaction_id => ${@transaction_id},
p_reversed_date => to_date(${@reversed_date}, 'yyyy-mm-dd'),
p_reversed_period_name => ${@reversed_period_name},
p_transaction_date => to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_description => ${@description},
p_note => ${@note},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="transaction_wfl_id" dataType="java.lang.Long" input="false" output="true" outputPath="/parameter/@transaction_wfl_id"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_wfl_pkg.csh_write_off_wfl_insert(
p_transaction_wfl_id => ${../../@transaction_wfl_id},
p_write_off_id => ${@write_off_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
csh_transaction_wfl_pkg.csh_reverse_wfl_start(
p_transaction_wfl_id => ${@transaction_wfl_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-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<=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 @@ ...@@ -50,7 +50,18 @@
p_role_flag => ${@role_flag}, p_role_flag => ${@role_flag},
p_csh_date => ${@csh_date}, p_csh_date => ${@csh_date},
p_ref_v04 => ${@ref_v04}, 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; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
......
...@@ -9,95 +9,118 @@ ...@@ -9,95 +9,118 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT v.*, SELECT
--未收金额 v.*,
(due_amount-received_amount) unreceived_amount --未收金额
FROM (SELECT (due_amount - received_amount) unreceived_amount
t.contract_number, FROM (SELECT
(SELECT bp_name FROM hls_bp_master h WHERE h.bp_id=t.bp_id_tenant) bp_tenant_name, t.contract_number,
(SELECT H.extra_nam FROM hls_bp_master h WHERE h.bp_id=t.bp_id_agent_level1) agent_extra_name, (SELECT bp_name
to_char(t.lease_start_date, 'yyyy-mm-dd') lease_start_date, FROM hls_bp_master h
ccli.machine_number, WHERE h.bp_id = t.bp_id_tenant) bp_tenant_name,
ccli.modelcd, (SELECT H.extra_nam
( ccc.times||(SELECT ci.description FROM hls_cashflow_item ci WHERE ci.cf_item=ccc.cf_item) ) times, FROM hls_bp_master h
WHERE h.bp_id =
t.bp_id_agent_level1) agent_extra_name,
to_char(t.lease_start_date,
'yyyy-mm-dd') lease_start_date,
ccli.machine_number,
ccli.modelcd,
ccc.times,
to_char(ccc.due_date, 'yyyy-mm-dd') due_date, to_char(ccc.due_date, 'yyyy-mm-dd') due_date,
(NVL(t.int_rate_display, 0) * 100 || '%') int_rate_display, --利率 (NVL(t.int_rate_display, 0) * 100 ||
--应收款金额 '%') int_rate_display,
(ccc.due_amount - NVL((SELECT SUM(cwo.write_off_due_amount) FROM csh_transaction t,csh_write_off cwo --利率
WHERE cwo.cashflow_id=ccc.cashflow_id --应收款金额
AND t.transaction_id=cwo.csh_transaction_id (ccc.due_amount - NVL((SELECT SUM(cwo.write_off_due_amount)
AND NVL(cwo.reversed_flag,'N')='N' FROM csh_transaction t, csh_write_off cwo
AND TRUNC(T.transaction_date) <=TRUNC(to_date(${@before_end},'yyyy-mm-dd'))),0))due_amount, WHERE cwo.cashflow_id = ccc.cashflow_id
--已收款金额 AND t.transaction_id = cwo.csh_transaction_id
NVL((SELECT SUM(cwo.write_off_due_amount) FROM csh_transaction t,csh_write_off cwo AND NVL(cwo.reversed_flag, 'N') = 'N'
WHERE cwo.cashflow_id=ccc.cashflow_id AND TRUNC(T.transaction_date) <=
AND t.transaction_id=cwo.csh_transaction_id TRUNC(to_date(${@before_end}, 'yyyy-mm-dd'))),
AND NVL(cwo.reversed_flag,'N')='N' 0)) due_amount,
AND TRUNC(T.transaction_date) >= TRUNC(to_date(${@cur_begin},'yyyy-mm-dd')) --已收款金额
AND TRUNC(T.transaction_date) <= TRUNC(to_date(${@cur_end},'yyyy-mm-dd')) NVL((SELECT SUM(cwo.write_off_due_amount)
),0) received_amount, FROM csh_transaction t, csh_write_off cwo
--相减 WHERE cwo.cashflow_id = ccc.cashflow_id
--逾期日 AND t.transaction_id = cwo.csh_transaction_id
( AND NVL(cwo.reversed_flag, 'N') = 'N'
CASE AND TRUNC(T.transaction_date) >= TRUNC(to_date(${@cur_begin}, 'yyyy-mm-dd'))
WHEN (ccc.due_amount- NVL((SELECT SUM(cwo.write_off_due_amount) FROM csh_transaction t,csh_write_off cwo AND TRUNC(T.transaction_date) <= TRUNC(to_date(${@cur_end}, 'yyyy-mm-dd'))
WHERE cwo.cashflow_id=ccc.cashflow_id ),
AND t.transaction_id=cwo.csh_transaction_id 0) received_amount,
AND NVL(cwo.reversed_flag,'N')='N' --相减
AND TRUNC(T.transaction_date) <= TRUNC(to_date(${@cur_end},'yyyy-mm-dd')) --逾期日
),0)) >0 THEN (
FLOOR(TO_date(${@cur_end},'yyyy-mm-dd')-ccc.due_date) CASE
ELSE WHEN (ccc.due_amount - NVL((SELECT SUM(cwo.write_off_due_amount)
0 FROM csh_transaction t, csh_write_off cwo
END WHERE cwo.cashflow_id = ccc.cashflow_id
) overdue_days, AND t.transaction_id = cwo.csh_transaction_id
--保证金 AND NVL(cwo.reversed_flag, 'N') = 'N'
NVL((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) - AND TRUNC(T.transaction_date) <=
nvl(tt.returned_amount, 0))) TRUNC(to_date(${@cur_end}, 'yyyy-mm-dd'))
from csh_transaction tt ), 0)) > 0
where tt.transaction_type = 'DEPOSIT' THEN
AND tt.deposit_trans_type = 'rent_deposit' FLOOR(TO_date(${@cur_end}, 'yyyy-mm-dd') - ccc.due_date)
AND NVL(tt.reversed_flag,'N')='N' ELSE
and tt.ref_contract_id = T.contract_id),0) deposit_amount 0
END
) overdue_days,
--保证金
NVL((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
AND NVL(tt.reversed_flag, 'N') = 'N'
and tt.ref_contract_id = T.contract_id), 0) deposit_amount,
t.is_buyout,
(Select v1.code_value_name
From sys_code_values_v v1
Where v1.code = 'YES_OR_NO'
And v1.code_enabled_flag = 'Y'
And v1.code_value_enabled_flag = 'Y'
and v1.CODE_VALUE = t.is_buyout) is_buyout_n
from con_contract_cashflow ccc,con_contract t,con_contract_lease_item ccli from con_contract_cashflow ccc, con_contract t, con_contract_lease_item ccli
WHERE ccc.contract_id=t.contract_id WHERE ccc.contract_id = t.contract_id
AND ccli.contract_id(+)=t.contract_id AND ccli.contract_id (+) = t.contract_id
AND ccc.cf_item IN (1, 8, 200, 250) AND ccc.cf_item IN (1, 8, 200, 250)
AND ccc.cf_status = 'RELEASE' AND ccc.cf_status = 'RELEASE'
AND t.data_class = 'NORMAL' AND t.data_class = 'NORMAL'
AND trunc(ccc.due_date) <= AND trunc(ccc.due_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd')) trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))
AND ((trunc(t.lease_start_date) <= AND ((trunc(t.lease_start_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd')) AND trunc(to_date(${@cur_end}, 'yyyy-mm-dd')) AND
t.contract_status = 'INCEPT') OR t.contract_status = 'INCEPT') OR
( trunc(t.et_date) >= trunc(to_date(${@cur_begin}, 'yyyy-mm-dd')) AND (trunc(t.et_date) >= trunc(to_date(${@cur_begin}, 'yyyy-mm-dd')) AND
t.contract_status = 'TERMINATE')) t.contract_status = 'TERMINATE'))
AND ccc.due_amount > AND ccc.due_amount >
nvl((SELECT SUM(cwo.write_off_due_amount) nvl((SELECT SUM(cwo.write_off_due_amount)
FROM csh_transaction t, csh_write_off cwo FROM csh_transaction t, csh_write_off cwo
WHERE cwo.cashflow_id = ccc.cashflow_id WHERE cwo.cashflow_id = ccc.cashflow_id
AND t.transaction_id = cwo.csh_transaction_id AND t.transaction_id = cwo.csh_transaction_id
AND nvl(cwo.reversed_flag, 'N') = 'N' AND nvl(cwo.reversed_flag, 'N') = 'N'
AND trunc(t.transaction_date) < AND trunc(t.transaction_date) <
trunc(to_date(${@cur_begin}, 'yyyy-mm-dd'))), trunc(to_date(${@cur_begin}, 'yyyy-mm-dd'))),
0) 0)
order by t.contract_id order by t.contract_id
) v ) v
]]></bm:query-sql>
]]></bm:query-sql>
</bm:operation> </bm:operation>
<bm:operation name="update"> <bm:operation name="update">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
rpt5012_rental_balance_pkg.rental_balance_insert( rpt5012_rental_balance_pkg.rental_balance_insert(
p_month =>${@month}, p_month =>${@month},
p_user_id =>${/session/@user_id}, p_user_id =>${/session/@user_id},
p_batch_id =>${@batch_id} p_batch_id =>${@batch_id}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:fields> <bm:fields>
...@@ -115,11 +138,11 @@ AND ccc.cf_item IN (1, 8, 200, 250) ...@@ -115,11 +138,11 @@ AND ccc.cf_item IN (1, 8, 200, 250)
<bm:field name="unreceived_amount"/> <bm:field name="unreceived_amount"/>
<bm:field name="overdue_days"/> <bm:field name="overdue_days"/>
<bm:field name="deposit_amount"/> <bm:field name="deposit_amount"/>
<bm:field name="is_buyout_n"/>
</bm:fields> </bm:fields>
<!-- <bm:query-fields>--> <!-- <bm:query-fields>-->
<!-- <bm:query-field field="bp_id_tenant_n" queryExpression="t1.bp_id_tenant_n = ${@bp_id_tenant_n}"/>--> <!-- <bm:query-field field="bp_id_tenant_n" queryExpression="t1.bp_id_tenant_n = ${@bp_id_tenant_n}"/>-->
<!-- <bm:query-field field="account_name" queryExpression="t1.account_name = ${@account_name}"/>--> <!-- <bm:query-field field="account_name" queryExpression="t1.account_name = ${@account_name}"/>-->
<!-- <bm:query-field field="account_id_n" queryExpression="t1.account_id_n = ${@account_id_n}"/>--> <!-- <bm:query-field field="account_id_n" queryExpression="t1.account_id_n = ${@account_id_n}"/>-->
<!-- </bm:query-fields>--> <!-- </bm:query-fields>-->
</bm:model> </bm:model>
...@@ -9,165 +9,222 @@ ...@@ -9,165 +9,222 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select select
(SELECT m.extra_nam (SELECT m.extra_nam
FROM hls_bp_master m FROM hls_bp_master m
WHERE m.bp_id = ct.bp_id_agent_level1) agent_extra_name, --代理店简称 WHERE m.bp_id = ct.bp_id_agent_level1) agent_extra_name,
(SELECT m.bp_name FROM hls_bp_master m WHERE m.bp_id = ct.bp_id_tenant) AS bp_tenant_name, --承租人名称 --代理店简称
ct.contract_number, --合同编号 (SELECT m.bp_name
to_char(ct.lease_start_date, 'yyyy-mm-dd') lease_start_date, --租赁期开始日 FROM hls_bp_master m
(SELECT ccli.modelcd WHERE m.bp_id =
FROM con_contract_lease_item ccli ct.bp_id_tenant) AS bp_tenant_name,
WHERE ccli.contract_id = ct.contract_id) modelcd, --机型 --承租人名称
(SELECT i.machine_number ct.contract_number,
FROM con_contract_lease_item i --合同编号
WHERE i.contract_id = ct.contract_id to_char(ct.lease_start_date,
AND i.equipment_type = 'MAIN') machine_number, --机号 'yyyy-mm-dd') lease_start_date,
(NVL(ct.int_rate_display, 0) * 100 || '%') int_rate_display, --利率 --租赁期开始日
ct.lease_times, --租赁期间 (SELECT ccli.modelcd
(NVL(ct.down_payment_ratio, 0) * 100 || '%') down_payment_ratio, --首付比例 FROM con_contract_lease_item ccli
ct.lease_item_amount as lease_item_amount, --设备款 WHERE ccli.contract_id =
NVL(ct.residual_value, 0) residual_amount, --留购金 ct.contract_id) modelcd,
NVL(ct.total_rental, 0) + NVL(ct.down_payment, 0) + --机型
NVL(ct.residual_value, 0) contract_amount, --合同金额 (SELECT i.machine_number
NVL(ct.down_payment, 0) down_payment, --首付款 FROM con_contract_lease_item i
(case when ct.contract_status='TERMINATE' then WHERE i.contract_id = ct.contract_id
0 else AND i.equipment_type =
((select sum(ccw.due_amount) 'MAIN') machine_number,
from con_contract_cashflow ccw --机号
where ccw.contract_id = ct.contract_id (NVL(ct.int_rate_display, 0) * 100 ||
and ccw.cf_item in (1, 200)) - '%') int_rate_display,
nvl((select sum(nvl(cw.write_off_due_amount, 0)) --利率
from csh_transaction cn, csh_write_off cw ct.lease_times,
where cw.csh_transaction_id = cn.transaction_id --租赁期间
and cw.cf_item in (1, 200) (NVL(ct.down_payment_ratio, 0) * 100 ||
and cw.contract_id = ct.contract_id '%') down_payment_ratio,
and NVL(cw.reversed_flag,'N')='N' --首付比例
and trunc(cn.transaction_date) <= ct.lease_item_amount as lease_item_amount,
trunc(to_date(${@cur_end},'yyyy-mm-dd'))), --设备款
0)) NVL(ct.residual_value,
end )month_due_amount, --当月末应收款余额(合计) 0) residual_amount,
(case when ct.contract_status='TERMINATE' then --留购金
0 else NVL(ct.total_rental, 0) + NVL(ct.down_payment, 0) +
((select sum(ccw.principal) NVL(ct.residual_value,
from con_contract_cashflow ccw 0) contract_amount,
where ccw.contract_id = ct.contract_id --合同金额
and ccw.cf_item in (1, 200)) - NVL(ct.down_payment,
nvl((select sum(nvl(cw.write_off_principal, 0)) 0) down_payment,
from csh_transaction cn, csh_write_off cw --首付款
where cw.csh_transaction_id = cn.transaction_id (case when ct.contract_status = 'TERMINATE'
and cw.cf_item in (1, 200) then
and cw.contract_id = ct.contract_id 0
and NVL(cw.reversed_flag,'N')='N' else
and trunc(cn.transaction_date) <= ((select sum(ccw.due_amount)
trunc(to_date(${@cur_end},'yyyy-mm-dd'))), from con_contract_cashflow ccw
0)) where ccw.contract_id = ct.contract_id
end) month_due_principal, --当月末本金余额(合计) and ccw.cf_item in (1, 200)) -
(case when ct.contract_status='TERMINATE' then nvl((select sum(nvl(cw.write_off_due_amount, 0))
0 else from csh_transaction cn, csh_write_off cw
((select sum(ccw.interest) where cw.csh_transaction_id = cn.transaction_id
from con_contract_cashflow ccw and cw.cf_item in (1, 200)
where ccw.contract_id = ct.contract_id and cw.contract_id = ct.contract_id
and ccw.cf_item in (1, 200)) - and NVL(cw.reversed_flag, 'N') = 'N'
nvl((select sum(nvl(cw.write_off_interest, 0)) and trunc(cn.transaction_date) <=
from csh_transaction cn, csh_write_off cw trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
where cw.csh_transaction_id = cn.transaction_id 0))
and cw.cf_item in (1, 200) end) month_due_amount,
and cw.contract_id = ct.contract_id --当月末应收款余额(合计)
and NVL(cw.reversed_flag,'N')='N' (case when ct.contract_status = 'TERMINATE'
and trunc(cn.transaction_date) <= then
trunc(to_date(${@cur_end},'yyyy-mm-dd'))), 0
0)) end ) month_interest, --当月末利息余额(合计) else
(case when ct.contract_status='TERMINATE' then ((select sum(ccw.principal)
0 else from con_contract_cashflow ccw
((select sum(ccw.due_amount) where ccw.contract_id = ct.contract_id
from con_contract_cashflow ccw and ccw.cf_item in (1, 200)) -
where ccw.contract_id = ct.contract_id nvl((select sum(nvl(cw.write_off_principal, 0))
and ccw.cf_item in (8)) - from csh_transaction cn, csh_write_off cw
nvl((select sum(nvl(cw.write_off_due_amount, 0)) where cw.csh_transaction_id = cn.transaction_id
from csh_transaction cn, csh_write_off cw and cw.cf_item in (1, 200)
where cw.csh_transaction_id = cn.transaction_id and cw.contract_id = ct.contract_id
and cw.cf_item in (8) and NVL(cw.reversed_flag, 'N') = 'N'
and cw.contract_id = ct.contract_id and trunc(cn.transaction_date) <=
and NVL(cw.reversed_flag,'N')='N' trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
and trunc(cn.transaction_date) <= 0))
trunc(to_date(${@cur_end},'yyyy-mm-dd'))), end) month_due_principal,
0)) end ) month_residual, --当月末留购金余额 --当月末本金余额(合计)
(case when ct.contract_status='TERMINATE' then (case when ct.contract_status = 'TERMINATE'
0 else then
con_contract_pkg.get_business_times(p_contract_id => ct.contract_id, 0
p_calc_date => to_date(${@cur_end},'yyyy-mm-dd'), else
p_contract_inception_date => ct.contract_inception_date) end) business_due_times, --逾期期数 ((select sum(ccw.interest)
(case when ct.contract_status='TERMINATE' then from con_contract_cashflow ccw
0 else where ccw.contract_id = ct.contract_id
(nvl((select sum(ccw.due_amount)-sum(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0)) and ccw.cf_item in (1, 200)) -
FROM csh_write_off cwo, csh_transaction cn nvl((select sum(nvl(cw.write_off_interest, 0))
WHERE nvl(cwo.reversed_flag, 'N') = 'N' from csh_transaction cn, csh_write_off cw
AND cwo.contract_id = ccw.contract_id where cw.csh_transaction_id = cn.transaction_id
AND cwo.times = ccw.times and cw.cf_item in (1, 200)
and cwo.csh_transaction_id = cn.transaction_id and cw.contract_id = ct.contract_id
AND cwo.cf_item = ccw.cf_item and NVL(cw.reversed_flag, 'N') = 'N'
and trunc(cn.transaction_date) <= and trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))), trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0)) 0)) end) month_interest,
from con_contract_cashflow ccw --当月末利息余额(合计)
where ccw.contract_id =ct.contract_id (case when ct.contract_status = 'TERMINATE'
and ccw.cf_item in (1, 200, 8) then
and trunc(ccw.due_date) <= trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),0) 0
-nvl((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) - else
nvl(tt.returned_amount, 0))) ((select sum(ccw.due_amount)
from csh_transaction tt from con_contract_cashflow ccw
where tt.transaction_type = 'DEPOSIT' where ccw.contract_id = ct.contract_id
AND tt.deposit_trans_type = 'rent_deposit' and ccw.cf_item in (8)) -
and tt.ref_contract_id = ct.contract_id),0)) end ) business_due_amount, --当月末逾期金额(合计) nvl((select sum(nvl(cw.write_off_due_amount, 0))
from csh_transaction cn, csh_write_off cw
where cw.csh_transaction_id = cn.transaction_id
and cw.cf_item in (8)
and cw.contract_id = ct.contract_id
and NVL(cw.reversed_flag, 'N') = 'N'
and trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))),
0)) end) month_residual,
--当月末留购金余额
(case when ct.contract_status = 'TERMINATE'
then
0
else
con_contract_pkg.get_business_times(p_contract_id => ct.contract_id,
p_calc_date => to_date(${@cur_end}, 'yyyy-mm-dd'),
p_contract_inception_date => ct.contract_inception_date) end) business_due_times,
--逾期期数
(case when ct.contract_status = 'TERMINATE'
then
0
else
(nvl((select sum(ccw.due_amount) - sum(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
FROM csh_write_off cwo, csh_transaction cn
WHERE nvl(cwo.reversed_flag, 'N') = 'N'
AND cwo.contract_id = ccw.contract_id
AND cwo.times = ccw.times
and
cwo.csh_transaction_id = cn.transaction_id
AND cwo.cf_item = ccw.cf_item
and trunc(cn.transaction_date) <=
trunc(to_date(${@cur_end},
'yyyy-mm-dd'))),
0))
from con_contract_cashflow ccw
where ccw.contract_id = ct.contract_id
and ccw.cf_item in (1, 200, 8)
and trunc(ccw.due_date) <= trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))), 0)
- nvl((select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0)))
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit'
and tt.ref_contract_id = ct.contract_id),
0)) end) business_due_amount,
--当月末逾期金额(合计)
(select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) - (select sum((nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0))) nvl(tt.returned_amount, 0)))
from csh_transaction tt from csh_transaction tt
where tt.transaction_type = 'DEPOSIT' where tt.transaction_type = 'DEPOSIT'
AND tt.deposit_trans_type = 'rent_deposit' AND tt.deposit_trans_type = 'rent_deposit'
and tt.ref_contract_id = ct.contract_id) deposit_amount, --保证金金额 and tt.ref_contract_id =
(SELECT v.code_value_name ct.contract_id) deposit_amount,
FROM sys_code_values_v v --保证金金额
WHERE v.code = 'CON500_CONTRACT_STATUS' (SELECT v.code_value_name
AND v.code_value = ct.contract_status) AS contract_status_n, --合同金额 FROM sys_code_values_v v
(select to_char(due_date, 'yyyy-mm-dd') WHERE v.code = 'CON500_CONTRACT_STATUS'
from con_contract_cashflow AND v.code_value =
where contract_id = ct.contract_id ct.contract_status) AS contract_status_n,
and cf_item = 8) residual_date ,-- 合同终了 --合同金额
to_char(ct.et_date, 'yyyy-mm-dd') terminate_date (select to_char(due_date, 'yyyy-mm-dd')
from con_contract ct from con_contract_cashflow
where ct.contract_status not in ('CANCEL') where contract_id = ct.contract_id
and ct.data_class='NORMAL' and cf_item =
order by ct.bp_id_agent_level1 8) residual_date,
-- 合同终了
to_char(ct.et_date,
]]></bm:query-sql> 'yyyy-mm-dd') terminate_date,
ct.is_buyout,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'YES_OR_NO'
And v.code_enabled_flag = 'Y'
And v.code_value_enabled_flag = 'Y'
and v.CODE_VALUE = ct.is_buyout) is_buyout_n
from con_contract ct
where ct.contract_status not in ('CANCEL')
and ct.data_class = 'NORMAL'
order by ct.bp_id_agent_level1
]]></bm:query-sql>
</bm:operation> </bm:operation>
<bm:operation name="update"> <bm:operation name="update">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
rpt5012_rental_balance_pkg.rental_balance_insert( rpt5012_rental_balance_pkg.rental_balance_insert(
p_month =>${@month}, p_month =>${@month},
p_user_id =>${/session/@user_id}, p_user_id =>${/session/@user_id},
p_batch_id =>${@batch_id} p_batch_id =>${@batch_id}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="execute"> <bm:operation name="execute">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
rpt5012_rental_balance_pkg.get_month_date( rpt5012_rental_balance_pkg.get_month_date(
p_month =>${@month}, p_month =>${@month},
p_cur_begin =>${@cur_begin}, p_cur_begin =>${@cur_begin},
p_cur_end =>${@cur_end}, p_cur_end =>${@cur_end},
p_before_begin =>${@before_begin}, p_before_begin =>${@before_begin},
p_before_end =>${@before_end} p_before_end =>${@before_end}
); );
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
<bm:parameters> <bm:parameters>
<bm:parameter name="cur_begin" dataType="date" input="true" output="true" <bm:parameter name="cur_begin" dataType="date" input="true" output="true"
outputPath="/parameter/@cur_begin"/> outputPath="/parameter/@cur_begin"/>
...@@ -204,7 +261,7 @@ ...@@ -204,7 +261,7 @@
<bm:field name="contract_status_n"/> <bm:field name="contract_status_n"/>
<bm:field name="residual_date"/> <bm:field name="residual_date"/>
<bm:field name="terminate_date"/> <bm:field name="terminate_date"/>
<bm:field name="is_buyout_n"/>
</bm:fields> </bm:fields>
<!-- <bm:query-fields>--> <!-- <bm:query-fields>-->
......
...@@ -29,7 +29,7 @@ SELECT h.period_year, ...@@ -29,7 +29,7 @@ SELECT h.period_year,
AND (li.cashflow_id = l.cashflow_id OR AND (li.cashflow_id = l.cashflow_id OR
li.ref_n03 = l.journal_header_id) li.ref_n03 = l.journal_header_id)
AND ROWNUM = 1) invoice_date, 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, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', 'HL_CSH_CONSOLIDATION_DALAY',
'违约金', '违约金',
...@@ -48,69 +48,72 @@ SELECT h.period_year, ...@@ -48,69 +48,72 @@ SELECT h.period_year,
0, 0,
'设备款') '设备款')
FROM con_contract_cashflow 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, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', 'HL_CSH_CONSOLIDATION_DALAY',
h.journal_date, h.journal_date,
'HL_SALES_TAX_ACT_NEW', 'HL_SALES_TAX_ACT_NEW',
(SELECT due_date (SELECT due_date
FROM con_contract_cashflow 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, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', 'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)), decode(reference6, NULL, l.amount_dr, 0),
'HL_SALES_TAX_ACT_NEW', 'HL_SALES_TAX_ACT_NEW',
(SELECT due_amount (SELECT due_amount
FROM con_contract_cashflow 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 (SELECT principal
FROM con_contract_cashflow FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id) principal, WHERE cashflow_id = l.cashflow_id) principal,
DECODE(h.je_transaction_code, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', 'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)), decode(reference6, NULL, l.amount_dr, 0),
'HL_SALES_TAX_ACT_NEW', 'HL_SALES_TAX_ACT_NEW',
(SELECT decode(cf_item, 8, due_amount, interest) (SELECT decode(cf_item, 8, due_amount, interest)
FROM con_contract_cashflow 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, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', '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', 'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount (SELECT vat_due_amount
FROM con_contract_cashflow FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) vat_due_amount, WHERE cashflow_id = l.cashflow_id),
nvl(ROUND((DECODE(h.je_transaction_code, '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', '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', 'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount (SELECT vat_due_amount/(due_amount-vat_due_amount)
FROM con_contract_cashflow FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id))) / WHERE cashflow_id = l.cashflow_id),
(DECODE(h.je_transaction_code, l.amount_cr/(l.reference7-l.amount_cr),
'HL_CSH_CONSOLIDATION_DALAY', 'CON_REPURCHASE',
SUM(decode(reference6, NULL, l.amount_dr, 0)), l.amount_cr/(l.reference7-l.amount_cr))),2) * 100,0)|| '%' vat_rate,
'HL_SALES_TAX_ACT_NEW', h.je_transaction_code,
(SELECT due_amount l.cashflow_id
FROM con_contract_cashflow FROM hls_journal_header h, hls_journal_detail l,gld_accounts ga
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 WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null 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') ('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( (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 AND not EXISTS (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li FROM acr_invoice_hd hi, acr_invoice_ln li
...@@ -118,20 +121,29 @@ SELECT h.period_year, ...@@ -118,20 +121,29 @@ SELECT h.period_year,
AND hi.vat_interface_status = 'BACK' AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') <= ${@base_period} AND to_char(hi.invoice_date,'yyyymm') <= ${@base_period}
AND (li.cashflow_id = l.cashflow_id OR AND (li.cashflow_id = l.cashflow_id OR
li.ref_n04 = l.journal_line_id)) li.ref_n03 = l.journal_header_id))
GROUP BY l.reference1, UNION
reference3, select vl.*
reference4, from ET_VAT_JOURNAL_LV vl
h.sbo_num, where not EXISTS
l.cashflow_id, (SELECT 1
l.journal_header_id, FROM acr_invoice_hd hi, acr_invoice_ln li
h.je_transaction_code, WHERE hi.invoice_hd_id = li.invoice_hd_id
h.period_year, AND hi.vat_interface_status = 'BACK'
h.period_num, AND to_char(hi.invoice_date, 'yyyymm') <= ${@base_period}
h.internal_period_num, AND (li.cashflow_id = vl.cashflow_id))
h.journal_date 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, SELECT h.period_year,
h.period_num, h.period_num,
...@@ -153,7 +165,7 @@ SELECT h.period_year, ...@@ -153,7 +165,7 @@ SELECT h.period_year,
AND li.cf_item = 2 AND li.cf_item = 2
and hi.contract_id = l.source_doc_id and hi.contract_id = l.source_doc_id
AND ROWNUM = 1) invoice_date, AND ROWNUM = 1) invoice_date,
l.amount_dr amount_tax, round(l.amount_dr,2) amount_tax,
'首付款' times, '首付款' times,
(SELECT due_date (SELECT due_date
...@@ -186,26 +198,20 @@ SELECT h.period_year, ...@@ -186,26 +198,20 @@ SELECT h.period_year,
WHERE contract_id = l.source_doc_id WHERE contract_id = l.source_doc_id
AND cf_item = 2 AND cf_item = 2
AND ROWNUM = 1) vat_due_amount, AND ROWNUM = 1) vat_due_amount,
NVL(ROUND(( NVL(ROUND(
(SELECT vat_due_amount (SELECT vat_due_amount/net_due_amount
FROM con_contract_cashflow FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id WHERE contract_id = l.source_doc_id
AND cf_item = 2 AND cf_item = 2
AND ROWNUM = 1) 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, 2) * 100,
0) || '%' vat_rate, 0) || '%' vat_rate,
h.je_transaction_code h.je_transaction_code,
l.cashflow_id
FROM hls_journal_header h, hls_journal_detail l FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null and h.sbo_num is not null
and h.reversed_flag='N'
AND h.je_transaction_code = 'LEASE_INCEPT' AND h.je_transaction_code = 'LEASE_INCEPT'
AND l.je_template_ln_id = 8797 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( (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, ...@@ -223,6 +229,7 @@ SELECT h.period_year,
</bm:operations> </bm:operations>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="to_char(t1.journal_date,'yyyymm') = ${@base_period}"/> <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:data-filters>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/> <bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
......
...@@ -29,7 +29,7 @@ SELECT h.period_year, ...@@ -29,7 +29,7 @@ SELECT h.period_year,
AND (li.cashflow_id = l.cashflow_id OR AND (li.cashflow_id = l.cashflow_id OR
li.ref_n03 = l.journal_header_id) li.ref_n03 = l.journal_header_id)
AND ROWNUM = 1) invoice_date, 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, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', 'HL_CSH_CONSOLIDATION_DALAY',
'违约金', '违约金',
...@@ -48,88 +48,102 @@ SELECT h.period_year, ...@@ -48,88 +48,102 @@ SELECT h.period_year,
0, 0,
'设备款') '设备款')
FROM con_contract_cashflow 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, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', 'HL_CSH_CONSOLIDATION_DALAY',
h.journal_date, h.journal_date,
'HL_SALES_TAX_ACT_NEW', 'HL_SALES_TAX_ACT_NEW',
(SELECT due_date (SELECT due_date
FROM con_contract_cashflow 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, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', '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 (SELECT due_amount
FROM con_contract_cashflow 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 (SELECT principal
FROM con_contract_cashflow FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id) principal, WHERE cashflow_id = l.cashflow_id) principal,
DECODE(h.je_transaction_code, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', 'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)), decode(reference6, NULL, l.amount_dr, 0),
'HL_SALES_TAX_ACT_NEW', 'HL_SALES_TAX_ACT_NEW',
(SELECT decode(cf_item, 8, due_amount, interest) (SELECT decode(cf_item, 8, due_amount, interest)
FROM con_contract_cashflow 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, DECODE(h.je_transaction_code,
'HL_CSH_CONSOLIDATION_DALAY', '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', 'HL_SALES_TAX_ACT_NEW',
(SELECT vat_due_amount (SELECT vat_due_amount
FROM con_contract_cashflow FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id)) vat_due_amount, WHERE cashflow_id = l.cashflow_id),
nvl(ROUND((DECODE(h.je_transaction_code, 'CON_REPURCHASE',
'HL_CSH_CONSOLIDATION_DALAY', decode(reference6, NULL, 0, NVL(l.amount_cr,0))) vat_due_amount,
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))), nvl(ROUND((DECODE(h.je_transaction_code,
'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', 'HL_CSH_CONSOLIDATION_DALAY',
SUM(decode(reference6, NULL, l.amount_dr, 0)), l.amount_cr/(l.reference7-l.amount_cr),
'HL_SALES_TAX_ACT_NEW', 'HL_SALES_TAX_ACT_NEW',
(SELECT due_amount (SELECT vat_due_amount/(due_amount-vat_due_amount)
FROM con_contract_cashflow FROM con_contract_cashflow
WHERE cashflow_id = l.cashflow_id WHERE cashflow_id = l.cashflow_id),
AND due_amount > 0)) - l.amount_cr/(l.reference7-l.amount_cr),
DECODE(h.je_transaction_code, 'CON_REPURCHASE',
'HL_CSH_CONSOLIDATION_DALAY', l.amount_cr/(l.reference7-l.amount_cr))),2) * 100,0)|| '%' vat_rate,
SUM(decode(reference6, NULL, 0, NVL(l.amount_cr,0))), h.je_transaction_code,
'HL_SALES_TAX_ACT_NEW', l.cashflow_id
(SELECT vat_due_amount FROM hls_journal_header h, hls_journal_detail l,gld_accounts ga
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 WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null 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( (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 ga.account_code='2221001020'
AND not EXISTS (SELECT 1 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 FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK' AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') < ${@base_period} AND to_char(hi.invoice_date,'yyyymm') < ${@base_period}
AND (li.cashflow_id = l.cashflow_id OR AND (li.cashflow_id = l.cashflow_id OR
li.ref_n04 = l.journal_line_id)) li.ref_n03 = l.journal_header_id))
GROUP BY l.reference1, UNION
reference3, select vl.*
reference4, from ET_VAT_JOURNAL_LV vl
h.sbo_num, where not EXISTS
l.cashflow_id, (SELECT 1
l.journal_header_id, FROM acr_invoice_hd hi, acr_invoice_ln li
h.je_transaction_code, WHERE hi.invoice_hd_id = li.invoice_hd_id
h.period_year, AND hi.vat_interface_status = 'BACK'
h.period_num, AND to_char(hi.invoice_date, 'yyyymm') < ${@base_period}
h.internal_period_num, AND (li.cashflow_id = vl.cashflow_id))
h.journal_date 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, SELECT h.period_year,
h.period_num, h.period_num,
...@@ -151,7 +165,7 @@ SELECT h.period_year, ...@@ -151,7 +165,7 @@ SELECT h.period_year,
AND li.cf_item = 2 AND li.cf_item = 2
and hi.contract_id = l.source_doc_id and hi.contract_id = l.source_doc_id
AND ROWNUM = 1) invoice_date, AND ROWNUM = 1) invoice_date,
l.amount_dr amount_tax, round(l.amount_dr,2) amount_tax,
'首付款' times, '首付款' times,
(SELECT due_date (SELECT due_date
...@@ -184,26 +198,20 @@ SELECT h.period_year, ...@@ -184,26 +198,20 @@ SELECT h.period_year,
WHERE contract_id = l.source_doc_id WHERE contract_id = l.source_doc_id
AND cf_item = 2 AND cf_item = 2
AND ROWNUM = 1) vat_due_amount, AND ROWNUM = 1) vat_due_amount,
NVL(ROUND(( NVL(ROUND(
(SELECT vat_due_amount (SELECT vat_due_amount/net_due_amount
FROM con_contract_cashflow FROM con_contract_cashflow
WHERE contract_id = l.source_doc_id WHERE contract_id = l.source_doc_id
AND cf_item = 2 AND cf_item = 2
AND ROWNUM = 1) 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, 2) * 100,
0) || '%' vat_rate, 0) || '%' vat_rate,
h.je_transaction_code h.je_transaction_code,
l.cashflow_id
FROM hls_journal_header h, hls_journal_detail l FROM hls_journal_header h, hls_journal_detail l
WHERE h.journal_header_id = l.journal_header_id WHERE h.journal_header_id = l.journal_header_id
and h.sbo_num is not null and h.sbo_num is not null
and h.reversed_flag='N'
AND h.je_transaction_code = 'LEASE_INCEPT' AND h.je_transaction_code = 'LEASE_INCEPT'
AND l.je_template_ln_id = 8797 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( (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'))))
...@@ -212,78 +220,22 @@ SELECT h.period_year, ...@@ -212,78 +220,22 @@ SELECT h.period_year,
FROM acr_invoice_hd hi, acr_invoice_ln li FROM acr_invoice_hd hi, acr_invoice_ln li
WHERE hi.invoice_hd_id = li.invoice_hd_id WHERE hi.invoice_hd_id = li.invoice_hd_id
AND hi.vat_interface_status = 'BACK' AND hi.vat_interface_status = 'BACK'
AND to_char(hi.invoice_date,'yyyymm') <= ${@base_period} AND to_char(hi.invoice_date,'yyyymm') < ${@base_period}
AND ((hi.contract_id = l.source_doc_id AND li.cf_item IN (2)))) AND ((hi.contract_id = l.source_doc_id AND li.cf_item IN (2))))
) t1
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# #WHERE_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:data-filters> <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.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:data-filters>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/> <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="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="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-field name="invoice_date" queryExpression="to_char(t1.invoice_date,'yyyy-mm-dd') = ${@invoice_date}"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </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 @@ ...@@ -44,7 +44,7 @@
WHERE t.session_id=${/session/@session_id} WHERE t.session_id=${/session/@session_id}
) t1 ) t1
#WHERE_CLAUSE# #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:query-sql>
</bm:operation> </bm:operation>
<bm:operation name="update"> <bm:operation name="update">
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure> <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="t1.document_category=&apos;CONTRACT&apos;" fetchAll="true"
<a:model-query defaultWhereClause="document_category=&apos;CONTRACT&apos;" fetchAll="true" model="basic.hls_document_type_v_lov" rootPath="contract_type_list"/> model="basic.hls_document_type_for_lov" rootPath="con501_document_type_path"/>
<a:model-query defaultWhereClause="t1.enabled_flag = &apos;Y&apos;" model="prj.PRJ505.con_billing_method" rootPath="billing_method_list"/> <a:model-query defaultWhereClause="document_category=&apos;CONTRACT&apos;" fetchAll="true"
<a:model-query fetchAll="true" model="basic.hls_lease_channel_for_lov" rootPath="acr510_lease_list"/> 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"
<a:model-query fetchAll="true" model="acr.ACR510.acr_bp_agent_ds" rootPath="bp_id_agent_ds"/> rootPath="billing_method_list"/>
--> <a:model-query fetchAll="true" model="basic.hls_lease_channel_for_lov" rootPath="acr510_lease_list"/>
</a:init-procedure> </a:init-procedure>
<a:view> <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"
<a:link id="pageLink_conditionScreen_welcome" url="${/request/@context_path}/welcome.screen"/> url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_select_cashflow.lview"/>
<a:link id="pageLink_invoice_create" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_create_invoice.lview"/> <a:link id="pageLink_conditionScreen_welcome" url="${/request/@context_path}/welcome.screen"/>
<a:link id="pageLink_penalty_create" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_penalty_invoice.lview"/> <a:link id="pageLink_invoice_create"
<a:link id="svcLink_save_selected" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_save_selected.lsc"/> url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_create_invoice.lview"/>
<a:link id="svcLink_save_penalty_selected" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_save_penalty_selected.lsc"/> <a:link id="pageLink_penalty_create"
<!-- url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_penalty_invoice.lview"/>
<a:screen-include screen="modules/hls/hls_common_javascript.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[ <script><![CDATA[
//校验函数,开票头信息不能为空。 //校验函数,开票头信息不能为空。
function validate_contractDs(record, name, value) { function validate_contractDs(record, name, value) {
if (name == 'object_tax_registry_num' || name == 'invoice_bp_address_phone_num' || name == 'invoice_bp_bank_account') { if (name == 'object_tax_registry_num' || name == 'invoice_bp_address_phone_num' || name == 'invoice_bp_bank_account') {
if (Ext.isEmpty(value)) { 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' || 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; return true;
} else if (record.get('bill_object_bp_class') == 'ORG') { } else if (record.get('bill_object_bp_class') == 'ORG') {
return '必输字段不能为空!'; return '必输字段不能为空!';
} }
} }
...@@ -35,16 +40,16 @@ ...@@ -35,16 +40,16 @@
} }
return true; return true;
} }
function render_contractDs_grid(value,record,name){
if(name=='billing_object_name') function render_contractDs_grid(value, record, name) {
{ if (name == 'billing_object_name') {
record.getField('billing_object_name').setLovPara('contract_id',record.get('contract_id')); record.getField('billing_object_name').setLovPara('contract_id', record.get('contract_id'));
} }
return value; return value;
} }
function contractDs_grid_query()
{ function contractDs_grid_query() {
// $('condition_queryForm').close(); // $('condition_queryForm').close();
$('ar510n_cashflow_ds').query(); $('ar510n_cashflow_ds').query();
} }
...@@ -68,84 +73,95 @@ ...@@ -68,84 +73,95 @@
$('cashflowDs_grid').clear(); $('cashflowDs_grid').clear();
} }
function winOpen_invoice_create() function winOpen_invoice_create() {
{
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag'); var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
var group_billing_method; var group_billing_method;
if (final_bill_flag == 'Y'){ if (final_bill_flag == 'Y') {
group_billing_method = 'GROUP_BY_CONTRACT'; group_billing_method = 'GROUP_BY_CONTRACT';
}else{ } else {
group_billing_method = 'GROUP_BY_TIMES'; group_billing_method = 'GROUP_BY_TIMES';
} }
var win = new Leaf.Window({ var win = new Leaf.Window({
id: 'acr_invoice_create_invoice', id: 'acr_invoice_create_invoice',
url: $('pageLink_invoice_create').getUrl(), url: $('pageLink_invoice_create').getUrl(),
params:{ params: {
company_id:'${/session/@company_id}', company_id: '${/session/@company_id}',
group_billing_method:group_billing_method group_billing_method: group_billing_method
}, },
title: '${l:ACR510.WIN_TITLE.CREATE}', title: '${l:ACR510.WIN_TITLE.CREATE}',
fullScreen:true fullScreen: true
}); });
win.on('close',function(){ win.on('close', function () {
contractDs_grid_query(); contractDs_grid_query();
}); });
} }
function winOpen_penalty_create()
{ function winOpen_penalty_create() {
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag'); 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({ var win = new Leaf.Window({
id: 'acr_invoice_penalty_invoice', id: 'acr_invoice_penalty_invoice',
url: $('pageLink_penalty_create').getUrl(), url: $('pageLink_penalty_create').getUrl(),
params:{ params: {
company_id:'${/session/@company_id}', company_id: '${/session/@company_id}',
group_billing_method:group_billing_method group_billing_method: group_billing_method
}, },
title: '${l:ACR510.WIN_TITLE.CREATE}', title: '${l:ACR510.WIN_TITLE.CREATE}',
fullScreen:true fullScreen: true
}); });
win.on('close',function(){ win.on('close', function () {
contractDs_grid_query(); contractDs_grid_query();
}); });
} }
function invoiceHd_confirm() function invoiceHd_confirm() {
{
Leaf.Masker.mask(Ext.getBody()); Leaf.Masker.mask(Ext.getBody());
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag'); var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
var cat_ini_flag = $('allConditionDs').getAt(0).get('cat_ini_flag'); var cat_ini_flag = $('allConditionDs').getAt(0).get('cat_ini_flag');
var ds=$('ar510n_cashflow_ds'); var ds = $('ar510n_cashflow_ds');
if(!ds.validate(true)) if (!ds.validate(true)) {
{ Leaf.Masker.unmask(Ext.getBody());
Leaf.Masker.unmask(Ext.getBody());;
return; return;
} }
if(ds.getSelected().length==0) if (ds.getSelected().length == 0) {
{
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
return; return;
} }
var datas = ds.getJsonData(true); 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) { if (first_cf_item == 9) {
var invoice_flag1=true; var invoice_flag1 = true;
for (var i = 0; i < datas.length; i++) { for (var i = 0; i < datas.length; i++) {
if(datas[i].cf_item!=9){ if (datas[i].cf_item != 9) {
invoice_flag1=false; invoice_flag1 = false;
$L.showErrorMessage('提示','罚息不能和其他类型的现金流同时开票!'); $L.showErrorMessage('提示', '罚息不能和其他类型的现金流同时开票!');
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
return; return;
} }
} }
//跳转到新的页面 //跳转到新的页面
if(invoice_flag1){ if (invoice_flag1) {
for (var i = 0; i < datas.length; i++) { for (var i = 0; i < datas.length; i++) {
datas[i].final_bill_flag = final_bill_flag; datas[i].final_bill_flag = final_bill_flag;
...@@ -169,7 +185,7 @@ ...@@ -169,7 +185,7 @@
scope: this scope: this
}); });
} }
}else { } else {
var invoice_flag2 = true; var invoice_flag2 = true;
for (var i = 0; i < datas.length; i++) { for (var i = 0; i < datas.length; i++) {
if (datas[i].cf_item == 9) { if (datas[i].cf_item == 9) {
...@@ -206,6 +222,7 @@ ...@@ -206,6 +222,7 @@
} }
} }
function queryUpdateFunction(ds, record, name, value, oldvalue) { function queryUpdateFunction(ds, record, name, value, oldvalue) {
if (name == 'lease_channel') { if (name == 'lease_channel') {
...@@ -219,16 +236,18 @@ ...@@ -219,16 +236,18 @@
} }
} }
} }
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="acr510_bp_class" lookupCode="HLS211_BP_CLASS"/> <a:dataSet id="acr510_bp_class" lookupCode="HLS211_BP_CLASS"/>
<a:dataSet id="taxpayer_type_ds" lookupCode="HLS211_TAXPAYER_TYPE"/> <a:dataSet id="taxpayer_type_ds" lookupCode="HLS211_TAXPAYER_TYPE"/>
<a:dataSet id="acr510_invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/> <a:dataSet id="acr510_invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>
<a:dataSet id="acr510_status_name_ds" lookupCode="CON500_CONTRACT_STATUS"/> <a:dataSet id="acr510_status_name_ds" lookupCode="CON500_CONTRACT_STATUS"/>
<a:dataSet id="overdue_status_ds" lookupCode="YES_NO"/> <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="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:dataSet id="acr510_document_type_name_ds">
<a:datas dataSource="/model/con501_document_type_path"/> <a:datas dataSource="/model/con501_document_type_path"/>
...@@ -239,26 +258,42 @@ ...@@ -239,26 +258,42 @@
<a:dataSet id="billingMethodDs"> <a:dataSet id="billingMethodDs">
<a:datas dataSource="/model/billing_method_list"/> <a:datas dataSource="/model/billing_method_list"/>
</a:dataSet> </a:dataSet>
<!-- <a:dataSet id="bp_agent_ds"> <a:dataSet id="business_type_desc_ds">
<a:datas dataSource="/model/bp_id_agent_ds"/> <a:datas>
</a:dataSet>--> <a:record code_value="LEASE" code_value_name="直租"/>
<a:dataSet id="allConditionDs" autoCreate="true"> <a:record code_value="LEASEBACK" code_value_name="售后回租"/>
</a:datas>
</a:dataSet>
<a:dataSet id="allConditionDs" autoCreate="true">
<a:fields> <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="business_type"/>
<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="business_type_desc" displayField="code_value_name" options="business_type_desc_ds"
<a:field name="invoice_type_desc" displayField="code_value_name" options="acr510_invoiceKindDs" returnField="invoice_type" valueField="code_value"/> returnField="business_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="object_taxpayer_type_desc" displayField="code_value_name" options="taxpayer_type_ds"
<a:field name="contract_status_desc" displayField="code_value_name" options="contract_status_ds" returnField="contract_status" valueField="code_value"/> returnField="object_taxpayer_type" valueField="code_value"/>
<a:field name="contract_status" /> <a:field name="bill_object_bp_class_desc" displayField="code_value_name" options="acr510_bp_class"
<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"> 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:mapping>
<a:map from="project_number" to="project_number_from"/> <a:map from="project_number" to="project_number_from"/>
<a:map from="project_name" to="project_name_from"/> <a:map from="project_name" to="project_name_from"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="lease_channel"/> <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="lease_channel_desc" displayField="description" options="hls_lease_channel_ds"
<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"> 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:mapping>
<a:map from="project_number" to="project_number_to"/> <a:map from="project_number" to="project_number_to"/>
<a:map from="project_name" to="project_name_to"/> <a:map from="project_name" to="project_name_to"/>
...@@ -267,20 +302,25 @@ ...@@ -267,20 +302,25 @@
<a:field name="project_name_from" readOnly="true"/> <a:field name="project_name_from" readOnly="true"/>
<a:field name="project_name_to" readOnly="true"/> <a:field name="project_name_to" readOnly="true"/>
<a:field name="contract_number"/> <a:field name="contract_number"/>
<!-- <a:field name="invoice_title"/>--> <!-- <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:mapping>
<a:map from="bp_code" to="billing_object_name"/> <a:map from="bp_code" to="billing_object_name"/>
<a:map from="bp_name" to="billing_object_name"/> <a:map from="bp_name" to="billing_object_name"/>
</a:mapping> </a:mapping>
</a:field> </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:mapping>
<a:map from="bp_code" to="bp_code_tenant_from"/> <a:map from="bp_code" to="bp_code_tenant_from"/>
<a:map from="bp_name" to="bp_name_tenant_from"/> <a:map from="bp_name" to="bp_name_tenant_from"/>
</a:mapping> </a:mapping>
</a:field> </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:mapping>
<a:map from="bp_code" to="bp_code_tenant_to"/> <a:map from="bp_code" to="bp_code_tenant_to"/>
<a:map from="bp_name" to="bp_name_tenant_to"/> <a:map from="bp_name" to="bp_name_tenant_to"/>
...@@ -293,21 +333,24 @@ ...@@ -293,21 +333,24 @@
<a:field name="last_received_date_from"/> <a:field name="last_received_date_from"/>
<a:field name="last_received_date_to"/> <a:field name="last_received_date_to"/>
<a:field name="document_type"/> <a:field name="document_type"/>
<a:field name="document_type_desc" displayField="document_type_desc" options="contractTypeDs"> <a:field name="document_type_desc" displayField="document_type_desc" options="contractTypeDs">
<a:mapping> <a:mapping>
<a:map from="document_type" to="document_type"/> <a:map from="document_type" to="document_type"/>
<a:map from="document_type_desc" to="document_type_desc"/> <a:map from="document_type_desc" to="document_type_desc"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="cf_item"/> <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:mapping>
<a:map from="cf_item" to="cf_item"/> <a:map from="cf_item" to="cf_item"/>
<a:map from="cf_item_desc" to="cf_item_desc"/> <a:map from="cf_item_desc" to="cf_item_desc"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="billing_method"/> <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="document_type_desc"/>
<a:field name="lease_start_date_from"/> <a:field name="lease_start_date_from"/>
<a:field name="lease_start_date_to"/> <a:field name="lease_start_date_to"/>
...@@ -320,17 +363,19 @@ ...@@ -320,17 +363,19 @@
<a:field name="con_search_term_1"/> <a:field name="con_search_term_1"/>
<a:field name="prj_search_term_2"/> <a:field name="prj_search_term_2"/>
<a:field name="con_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" 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:field name="bp_id_agent_level1" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="acr.ACR510.acr_bp_agent_ds" lovWidth="600" title="代理店">
<a:map from="bp_code" to="bp_id_agent_level1"/> <a:mapping>
<a:map from="bp_name" to="bp_id_agent_level1"/> <a:map from="bp_code" to="bp_id_agent_level1"/>
</a:mapping> <a:map from="bp_name" to="bp_id_agent_level1"/>
</a:field>--> </a:mapping>
<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>-->
<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:mapping>
<a:map from="value_code" to="bp_id_agent_level1"/> <a:map from="value_code" to="bp_id_agent_level1"/>
<a:map from="value_name" to="bp_id_agent_level1_n"/> <a:map from="value_name" to="bp_id_agent_level1_n"/>
...@@ -343,13 +388,16 @@ ...@@ -343,13 +388,16 @@
<a:event name="update" handler="queryUpdateFunction"/> <a:event name="update" handler="queryUpdateFunction"/>
</a:events> </a:events>
</a:dataSet> </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:fields>
<a:field name="invoice_title" required="true"/> <a:field name="invoice_title" required="true"/>
<a:field name="object_tax_registry_num" validator="validate_contractDs" prompt="纳税人识别号"/> <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_address_phone_num" validator="validate_contractDs" prompt="开票地址电话"/>
<a:field name="invoice_bp_bank_account" 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:mapping>
<a:map from="bp_class" to="bill_object_bp_class"/> <a:map from="bp_class" to="bill_object_bp_class"/>
<a:map from="bp_id" to="billing_object_id"/> <a:map from="bp_id" to="billing_object_id"/>
...@@ -363,12 +411,12 @@ ...@@ -363,12 +411,12 @@
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="bp_id_agent_level1"/> <a:field name="bp_id_agent_level1"/>
<a:field name="termination_date"/> <a:field name="termination_date"/>
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
<a:screenTitle/> <a:screenTitle/>
<a:gridButton click="contractDs_grid_query" text="HLS.QUERY"/> <a:gridButton click="contractDs_grid_query" text="HLS.QUERY"/>
<a:gridButton click="allConditionDs_reset" text="重置条件"/> <a:gridButton click="allConditionDs_reset" text="重置条件"/>
...@@ -376,102 +424,116 @@ ...@@ -376,102 +424,116 @@
<a:gridButton click="invoiceHd_confirm" text="ACR510.BUTTON.COMFIRM"/> <a:gridButton click="invoiceHd_confirm" text="ACR510.BUTTON.COMFIRM"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form id="condition_queryForm" width="1300"> <a:form id="condition_queryForm" width="1300">
<a:hBox> <a:hBox>
<a:lov name="billing_object_name" bindTarget="allConditionDs" prompt="开票对象"/> <a:lov name="billing_object_name" bindTarget="allConditionDs" prompt="开票对象"/>
<!-- <!--
<a:comboBox name="bill_object_bp_class_desc" bindTarget="allConditionDs" prompt="客户类型"/> <a:comboBox name="bill_object_bp_class_desc" bindTarget="allConditionDs" prompt="客户类型"/>
--> -->
<a:textField name="contract_number" bindTarget="allConditionDs" prompt="合同号"/> <a:textField name="contract_number" bindTarget="allConditionDs" prompt="合同号"/>
<!-- <!--
<a:comboBox name="invoice_type_desc" 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_from" bindTarget="allConditionDs" prompt="应收日从"/>
<a:datePicker name="due_date_to" 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:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/>
</a:hBox> <a:comboBox name="business_type_desc" bindTarget="allConditionDs" prompt="业务类型"/>
<a:hBox> </a:hBox>
<a:hBox>
<a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态"/> <a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态"/>
<a:comboBox name="object_taxpayer_type_desc" bindTarget="allConditionDs" prompt="纳税人类型"/> <a:comboBox name="object_taxpayer_type_desc" bindTarget="allConditionDs" prompt="纳税人类型"/>
<a:datePicker name="last_received_date_from" bindTarget="allConditionDs" prompt="收款日期从"/> <a:datePicker name="last_received_date_from" bindTarget="allConditionDs" prompt="收款日期从"/>
<a:datePicker name="last_received_date_to" bindTarget="allConditionDs" prompt="收款日期到"/> <a:datePicker name="last_received_date_to" 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:hBox> </a:hBox>
<!-- <a:formBody column="4" labelWidth="400"> <!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/> <a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
<a:lov name="contract_number_to" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_TO_LANG"/> <a:lov name="contract_number_to" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_TO_LANG"/>
<a:textField name="contract_name" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NAME"/> <a:textField name="contract_name" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NAME"/>
<a:comboBox name="lease_channel_desc" bindTarget="allConditionDs" prompt="商业模式"/> <a:comboBox name="lease_channel_desc" bindTarget="allConditionDs" prompt="商业模式"/>
<a:lov name="bp_code_tenant_from" bindTarget="allConditionDs" prompt="HLS.TENANT_NUMBER_FROM"/> <a:lov name="bp_code_tenant_from" bindTarget="allConditionDs" prompt="HLS.TENANT_NUMBER_FROM"/>
<a:lov name="bp_code_tenant_to" bindTarget="allConditionDs" prompt="HLS.TENANT_NUMBER_TO"/> <a:lov name="bp_code_tenant_to" bindTarget="allConditionDs" prompt="HLS.TENANT_NUMBER_TO"/>
<a:textField name="bp_name" bindTarget="allConditionDs" prompt="HLS.TENANT_NAME"/> <a:textField name="bp_name" bindTarget="allConditionDs" prompt="HLS.TENANT_NAME"/>
<a:textField name="con_search_term_1" bindTarget="allConditionDs" prompt="合同号"/> <a:textField name="con_search_term_1" bindTarget="allConditionDs" prompt="合同号"/>
<a:textField name="project_number" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER"/> <a:textField name="project_number" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER"/>
&lt;!&ndash; <a:lov name="project_number_from" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_FROM"/> &lt;!&ndash; <a:lov name="project_number_from" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_FROM"/>
<a:lov name="project_number_to" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_TO_LANG"/> &ndash;&gt; <a:lov name="project_number_to" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_TO_LANG"/> &ndash;&gt;
<a:comboBox name="billing_method_desc" bindTarget="allConditionDs" prompt="HLS.BILLING_RULE"/> <a:comboBox name="billing_method_desc" bindTarget="allConditionDs" prompt="HLS.BILLING_RULE"/>
<a:textField name="con_search_term_2" bindTarget="allConditionDs" prompt="ACR.CONTRACT_NUM_CHECK_CODE"/> <a:textField name="con_search_term_2" bindTarget="allConditionDs" prompt="ACR.CONTRACT_NUM_CHECK_CODE"/>
<a:comboBox name="document_type_desc" bindTarget="allConditionDs" prompt="HLS.CONTRACT_TYPE"/> <a:comboBox name="document_type_desc" bindTarget="allConditionDs" prompt="HLS.CONTRACT_TYPE"/>
<a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/> <a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/>
<a:datePicker name="lease_start_date_from" bindTarget="allConditionDs" prompt="HLS.LEASE_START_DATE_FROM"/> <a:datePicker name="lease_start_date_from" bindTarget="allConditionDs" prompt="HLS.LEASE_START_DATE_FROM"/>
<a:datePicker name="lease_start_date_to" bindTarget="allConditionDs" prompt="HLS.LEASE_START_DATE_TO"/> <a:datePicker name="lease_start_date_to" bindTarget="allConditionDs" prompt="HLS.LEASE_START_DATE_TO"/>
<a:comboBox name="division_n" bindTarget="allConditionDs" prompt="产品线"/> <a:comboBox name="division_n" bindTarget="allConditionDs" prompt="产品线"/>
<a:textField name="invoice_title" bindTarget="allConditionDs" prompt="承租人"/> <a:textField name="invoice_title" bindTarget="allConditionDs" prompt="承租人"/>
&lt;!&ndash; <a:datePicker name="termination_date_from" bindTarget="allConditionDs" prompt="结清日期从"/> &lt;!&ndash; <a:datePicker name="termination_date_from" bindTarget="allConditionDs" prompt="结清日期从"/>
<a:datePicker name="termination_date_to" bindTarget="allConditionDs" prompt="结清日期到"/>&ndash;&gt; <a:datePicker name="termination_date_to" bindTarget="allConditionDs" prompt="结清日期到"/>&ndash;&gt;
</a:formBody>--> </a:formBody>-->
</a:form> </a:form>
<a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="50"> <a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="50">
<a:tabs> <a:tabs>
<a:tab prompt="开票信息" width="150"> <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:columns>
<!--<a:column name="invoice_type_desc" prompt="发票类型"/>--> <!--<a:column name="invoice_type_desc" prompt="发票类型"/>-->
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>--> <!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" lock="true" prompt="合同编号" width="150"/> <a:column name="contract_number" lock="true" prompt="合同编号" width="150"/>
<a:column name="billing_object_name" prompt="发票抬头"/> <a:column name="billing_object_name" prompt="发票抬头"/>
<a:column name="bp_id_agent_level1_n" 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="times" align="right" lock="true" prompt="期数" width="40"/>
<a:column name="cf_item_desc" lock="true" prompt="应收项目"/> <a:column name="cf_item_desc" lock="true" prompt="应收项目"/>
<a:column name="due_date" prompt="应收日" renderer="Leaf.formatDate"/> <a:column name="due_date" prompt="应收日" renderer="Leaf.formatDate"/>
<a:column name="due_amount" align="right" prompt="应收金额" renderer="Leaf.formatMoney"/> <a:column name="due_amount" align="right" prompt="应收金额" renderer="Leaf.formatMoney"/>
<a:column name="principal" align="right" prompt="本金" renderer="Leaf.formatMoney"/> <a:column name="principal" align="right" prompt="本金" renderer="Leaf.formatMoney"/>
<a:column name="interest" 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="account_name" prompt="收款户名"/>
<a:column name="received_amount" align="right" prompt="已收金额" renderer="Leaf.formatMoney"/> <a:column name="received_amount" align="right" prompt="已收金额"
<a:column name="received_principal" align="right" prompt="已收本金" renderer="Leaf.formatMoney"/> renderer="Leaf.formatMoney"/>
<a:column name="received_interest" 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_status" align="center" prompt="是否逾期"/>
<a:column name="overdue_max_days" align="right" 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="已开票金额"
<!-- <a:column name="billing_principal" align="right" prompt="已开票本金" renderer="Leaf.formatMoney"/> renderer="Leaf.formatMoney"/>
<a:column name="billing_interest" 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="last_received_date" prompt="最后收款日" renderer="Leaf.formatDate"/>
<!-- <!--
<a:column name="termination_date" prompt="正常结清日" renderer="Leaf.formatDate"/> <a:column name="termination_date" prompt="正常结清日" renderer="Leaf.formatDate"/>
--> -->
<!-- <a:column name="currency_desc" width="60"/> <!-- <a:column name="currency_desc" width="60"/>
<a:column name="exchange_rate" align="right" width="80"/> <a:column name="exchange_rate" align="right" width="80"/>
<a:column name="exchange_rate_type_desc" width="100"/> --> <a:column name="exchange_rate_type_desc" width="100"/> -->
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:tab> </a:tab>
<a:tab prompt="抬头信息" width="150"> <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:columns>
<!--<a:column name="invoice_type_desc" prompt="发票类型"/>--> <!--<a:column name="invoice_type_desc" prompt="发票类型"/>-->
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>--> <!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" prompt="合同编号" width="150"/> <a:column name="contract_number" prompt="合同编号" width="150"/>
<a:column name="contract_status_desc" prompt="合同状态" width="80"/> <a:column name="contract_status_desc" prompt="合同状态" width="80"/>
<a:column name="billing_method_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="billing_object_name" autoAdjust="false"
<a:column name="invoice_title" autoAdjust="false" prompt="发票抬头" showTitle="true" width="200"/> 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_tax_registry_num" prompt="纳税人识别号" width="150"/>
<a:column name="object_taxpayer_type_desc" 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_address_phone_num" autoAdjust="false" prompt="开票地址电话"
<a:column name="invoice_bp_bank_account" autoAdjust="false" prompt="开户行及账号" showTitle="true" width="150"/> showTitle="true" width="200"/>
<a:column name="description" 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:columns>
<a:editors> <a:editors>
<a:lov id="contractDs_grid_editor_lov"/> <a:lov id="contractDs_grid_editor_lov"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-insert model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
<batch-apply sourcePath="/parameter/details">
<a:model-update model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
</batch-apply>
<a:model-execute model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-15 下午04:39:15
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="acr512_currency_list"/>
<a:model-query fetchAll="true" model="acr.ACR512.acr_invoice_business_type_list"
rootPath="acr512_business_type_list"/>
</a:init-procedure>
<a:view>
<a:link id="acr512_invoice_status_change" model="acr.ACR512.alter_acr_invoice_status" modelaction="execute"/>
<a:link id="acr513_invoice_readonly_page"
url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="acr512_invoice_update_page"
url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_detail.lview"/>
<!--<a:link id="acr512_invoice_update_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.screen"/>-->
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="acr512_submit_id" model="acr.ACR512.acr_invoice_hd_batch" modelaction="update"/>
<a:link id="get_document_number_link" model="acr.ACR512.get_document_number" modelaction="query"/>
<a:link id="acr512_update_for_submit_id" url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_for_submit.lsc"/>
<script><![CDATA[
//提交复核
function acr512_invoice_submit_selected() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length == 0) {
$L.showInfoMessage('提示', '请至少选择一条数据!');
} else {
var invoice_hd_ids = '';
//判断单据的状态
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
$L.showErrorMessage("提示", '发票状态有误!');
return;
}
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
}
var detail_mask = Ext.getBody();
Leaf.showConfirm('提示', "确认执行该操作?", function () {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('acr512_invoice_status_change').getUrl(),
para: {
invoice_hd_ids: invoice_hd_ids,
want_status: 'CONFIRMING'
},
success: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$('acr512_invoice_result_ds').query();
},
error: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
},
scope: this
});
}, function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
})
}
}
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
function acr512_invoice_query() {
$('acr512_invoice_result_ds').query();
var records = $('acr512_invoice_result_ds').getAll();
for (var i = 0; i < records.length; i++) {
var record = record[i];
var invoice_hd_id = record.get('invoice_hd_id');
Leaf.request({
url: $('get_document_number_link').getUrl(),
para: {
invoice_hd_id: invoice_hd_id
},
success: function (res) {
var document_number = record[i].get('document_number');
if (res.result.record['isreturn'] > 0) {
return '<font color="red">' + document_number + '</font> ';
} else {
return value;
}
}
});
}
$('acr512_invoice_result_ds').query();
}
function acr512_invoice_reset() {
$('acr512_invoice_query_ds').reset();
}
function acr512_grid_update(reocrd_id, invoice_hd_id, status) {
var maintain_type = 'UPDATE';
var currency_reocrd = $('acr512_invoice_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['function_code'] = 'ACR512';
param['winid'] = 'confirm_invoice_win';
param['document_id'] = invoice_hd_id;
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
if (param['invoice_status'] == 'CONFIRMING') {
param['function_code'] = 'ACR512R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
} else {
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
}
}
function acr512_document_number_render(value, record, name) {
if (name == 'document_number') {
if (record.get('compare_date_flag') == 'Y') {
return '<a style="color:red" href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
} else {
return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
}
// return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
function acr512_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
}
function acr512_invoice_query_Onupdate(ds, record, name, value, oldVlaue) {
if (name == 'document_number_f') {
if (Leaf.isEmpty(record.get('document_number_t'))) {
record.set('document_number_t', value);
}
} else if (name == 'project_number_f') {
if (Leaf.isEmpty(record.get('project_number_t'))) {
record.set('project_number_t', value);
}
} else if (name == 'invoice_number_f') {
if (Leaf.isEmpty(record.get('invoice_number_t'))) {
record.set('invoice_number_t', value);
}
} else if (name == 'contract_number_f') {
if (Leaf.isEmpty(record.get('contract_number_t'))) {
record.set('contract_number_t', value);
}
} else if (name == 'invoice_bp_code_f') {
if (Leaf.isEmpty(record.get('invoice_bp_code_t'))) {
record.set('invoice_bp_code_t', value);
}
} else if (name == 'total_amount_f') {
if (Leaf.isEmpty(record.get('total_amount_t'))) {
record.set('total_amount_t', value);
}
}
if (Ext.isEmpty(record.get('project_number_f')) && Ext.isEmpty(record.get('project_number_t'))) {
record.set('query_project_number', '');
} else {
record.set('query_project_number', 'Y');
}
if (Ext.isEmpty(record.get('contract_number_f')) && Ext.isEmpty(record.get('contract_number_t'))) {
record.set('query_contract_number', '');
} else {
record.set('query_contract_number', 'Y');
}
}
function acr512_invoice_delete() {
$('acr512_invoice_update_grid_ds').remove();
}
//发票提交
function acr512_invoice_submit() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
if (records[i].get('status') == 'APPROVED' || records[i].get('statsu') == 'APPROVING') {
Leaf.showMessage('${l:HLS.PROMPT}', '该发票正在审批中或已审批通过,不可重复提交');
return;
}
if (i == 0) { //modify by wuts for hl 2018-12-23
var invoice_hd_ids = records[0].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
}
Leaf.showConfirm('提示', '您确认提交吗', function () {
lock_current_window();
Leaf.request({
url: $('acr512_submit_id').getUrl(),
para: {
invoice_hd_ids: invoice_hd_ids
},
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_window();
$('acr512_invoice_result_ds').query();
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
function acr512_invoice_insert() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = {};
var saveData = [];
var invoice_hd_ids = '';
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
$L.showErrorMessage("提示", '发票状态有误!');
return;
}
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
datas['invoice_hd_ids'] = invoice_hd_ids;
datas['details'] = saveData;
Leaf.showConfirm('提示', '您确认新建申请吗', function () {
lock_current_window();
Leaf.request({
url: $('acr512_update_for_submit_id').getUrl(),
para: datas,
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_window();
$('acr512_invoice_result_ds').query();
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="acr512_currency_ds">
<a:datas dataSource="/model/acr512_currency_list"/>
</a:dataSet>
<a:dataSet id="acr512_business_type_ds">
<a:datas dataSource="/model/acr512_business_type_list"/>
</a:dataSet>
<a:dataSet id="acr512_invoice_kind_ds" lookupCode="ACR510_INVOICE_KIND"/>
<a:dataSet id="acr512_invoice_status_ds" lookupCode="ACR510_AR_INVOICE_STATUS"/>
<a:dataSet id="hls_lease_channel_ds" loadData="true" model="basic.hls_lease_channel_for_lov"/>
<a:dataSet id="acr512_invoice_query_ds">
<a:fields>
<a:field name="currency_name" displayField="currency_name" options="acr512_currency_ds"
returnField="currency" valueField="currency_code"/>
<a:field name="invoice_status_n" displayField="code_value_name" options="acr512_invoice_status_ds"
returnField="invoice_status" valueField="code_value"/>
<a:field name="invoice_kind"/>
<a:field name="contract_name"/>
<a:field name="invoice_bp_name"/>
<a:field name="invoice_kind_desc" displayField="code_value_name" options="acr512_invoice_kind_ds"
returnField="invoice_kind" valueField="code_value"/>
<a:field name="business_type_desc" displayField="business_type_desc"
options="acr512_business_type_ds" returnField="business_type" valueField="business_type"/>
<a:field name="created_by_name" lovGridHeight="320" lovHeight="500"
lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500" title="开票人选择">
<a:mapping>
<a:map from="user_id" to="created_by"/>
<a:map from="description" to="created_by_name"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_f"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_t"/>
</a:mapping>
</a:field>
<a:field name="project_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
<a:mapping>
<a:map from="project_number" to="project_number_f"/>
</a:mapping>
</a:field>
<a:field name="project_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
<a:mapping>
<a:map from="project_number" to="project_number_t"/>
</a:mapping>
</a:field>
<a:field name="contract_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500" title="合同选择">
<a:mapping>
<a:map from="contract_number" to="contract_number_f"/>
</a:mapping>
</a:field>
<a:field name="contract_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500" title="合同选择">
<a:mapping>
<a:map from="contract_number" to="contract_number_t"/>
</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:fields>
<a:events>
<a:event name="update" handler="acr512_invoice_query_Onupdate"/>
</a:events>
</a:dataSet>
<a:dataSet id="acr512_invoice_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR512.acr_invoice_update_query" queryDataSet="acr512_invoice_query_ds"
selectable="true"/>
<!-- <a:fields>-->
<!-- <a:field name="compare_date_flag"/>-->
<!-- </a:fields>-->
<!-- <a:events>-->
<!-- <a:event name="load" handler="load_do_info"/>-->
<!-- </a:events>-->
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="acr512_invoice_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr512_invoice_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr512_invoice_delete" text="HLS.REMOVE"/>
<!--<a:toolbarButton click="acr512_invoice_submit_selected" text="提交复核"/>-->
<a:toolbarButton click="acr512_invoice_insert" text="新建申请"/>
<!--
<a:toolbarButton click="acr512_invoice_submit" text="HLS.SUBMIT"/>
-->
</a:screenTopToolbar>
<a:form marginWidth="200" padding="0" title="应收发票维护">
<a:hBox labelSeparator=" ">
<a:textField name="document_number_f" bindTarget="acr512_invoice_query_ds"
prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/>
<!--
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
-->
<a:textField name="document_number_t" bindTarget="acr512_invoice_query_ds" prompt="单据编号到"
width="135"/>
<a:textField name="contract_name" bindTarget="acr512_invoice_query_ds" prompt="合同名称" width="353"/>
<!-- <a:lov name="contract_number_f" bindTarget="acr512_invoice_query_ds" prompt="合同编号从" width="135"/>-->
<!--
<div><![CDATA[${l:HLS.CONTRACT_NUMBER_TO}]]></div>
-->
<!-- <a:lov name="contract_number_t" bindTarget="acr512_invoice_query_ds" prompt="合同编号到" width="135"/>-->
<!-- <a:lov name="project_number_f" bindTarget="acr512_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
<a:lov name="project_number_t" bindTarget="acr512_invoice_query_ds" prompt="" width="135"/>-->
<!--
<a:comboBox name="business_type_desc" bindTarget="acr512_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>
-->
<!--
<a:comboBox name="lease_channel_desc" bindTarget="acr512_invoice_query_ds" prompt="商业模式" width="135"/>
-->
<!-- <a:comboBox name="currency_name" bindTarget="acr512_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/> -->
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="accounting_date_f" bindTarget="acr512_invoice_query_ds" prompt="记账日期从"
width="135"/>
<!--
<div><![CDATA[${l:HLS.ACCOUNT_DATE_TO}]]></div>
-->
<a:datePicker name="accounting_date_t" bindTarget="acr512_invoice_query_ds" prompt="记账日期到"
width="135"/>
<a:lov name="created_by_name" bindTarget="acr512_invoice_query_ds" prompt="创建人" width="135"/>
<a:textField name="invoice_title" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_TITLE"
width="135"/>
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="invoice_date_f" bindTarget="acr512_invoice_query_ds" prompt="发票日期从"
width="135"/>
<!--
<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>
-->
<a:datePicker name="invoice_date_t" bindTarget="acr512_invoice_query_ds" prompt="发票日期到"
width="135"/>
<!-- <a:lov name="invoice_bp_code_f" bindTarget="acr512_invoice_query_ds" prompt="客户编号从" width="135"/>-->
<!--
<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>
-->
<!-- <a:lov name="invoice_bp_code_t" bindTarget="acr512_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:textField name="invoice_bp_name" bindTarget="acr512_invoice_query_ds" prompt="客户名称" width="135"/>
<a:comboBox name="invoice_kind_desc" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_KIND"
width="135"/>
<a:comboBox name="invoice_status_n" bindTarget="acr512_invoice_query_ds" prompt="发票状态" width="135"/>
</a:hBox>
</a:form>
<a:grid id="acr512_invoice_update_grid_ds" bindTarget="acr512_invoice_result_ds" marginHeight="250"
marginWidth="30" navBar="true">
<a:columns>
<a:column name="document_number" lock="true" prompt="HLS.DOCUMENT_NUMBER"
renderer="acr512_document_number_render" width="120"/>
<a:column name="invoice_bp_name" autoAdjust="false" prompt="HLS.CUSTOMER_NAME" showTitle="true"
width="100"/>
<a:column name="contract_name" autoAdjust="false" prompt="HLS.CONTRACT_NAME" showTitle="true"
width="150"/>
<!--
<a:column name="business_type_desc" prompt="HLS.BUSINESS_TYPE_DESC" width="80"/>
-->
<a:column name="invoice_kind_desc" prompt="ACR.INVOICE_KIND" width="100"/>
<!-- <a:column name="invoice_number" prompt="ACR.INVOICE_NUMBER" width="120"/> -->
<a:column name="invoice_date" prompt="ACR.INVOICE_DATE" width="100"/>
<!-- <a:column name="project_name" autoAdjust="false" prompt="HLS.PROJECT_NAME" showTitle="true" width="150"/> -->
<!-- <a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="120"/> -->
<!-- <a:column name="bp_code" prompt="HLS.CUSTOMER_NUMBER" width="100"/> -->
<a:column name="invoice_title" autoAdjust="false" prompt="ACR.INVOICE_TITLE" showTitle="true"
width="150"/>
<!-- <a:column name="total_amount" align="right" prompt="ACR.TOTAL_AMOUNT" renderer="Aurora.formatMoney" width="100"/> -->
<!-- <a:column name="currency" prompt="HLS.CURRENCY" width="80"/> -->
<a:column name="created_by_name" autoAdjust="false" prompt="创建人" showTitle="true" width="150"/>
<a:column name="invoice_status_desc" prompt="ACR.INVOICE_STATUS" width="100"/>
<a:column name="accounting_date" prompt="HLS.ACCOUNT_DATE" width="100"/>
<!-- <a:column name="compare_date_flag" prompt="比较日期" width="100"/> -->
<!-- <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/> -->
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-15 下午04:39:15
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="acr610_invoice_detail_link" url="${/request/@context_path}/modules/acr/acr610/acr_invoice_detail_update_detail.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="acr610_detail_submit_link" model="acr.acr610.acr_invoice_apply_detail" modelaction="update"/>
<a:link id="attachment_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="attachment_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script><![CDATA[
function lock_current_detail_window() {
Leaf.Masker.mask($('${/parameter/@win_id}').wrap, '${l:HLS.EXECUTING}');
}
function unlock_current_detail_window() {
Leaf.Masker.unmask($('${/parameter/@win_id}').wrap);
}
function acr610_invoice_detail_exit() {
$('${/parameter/@win_id}').close();
}
function acr610_invoice_detail_query() {
$('acr610_invoice_detail_result_ds').query();
}
function acr610_invoice_detail_reset() {
$('acr610_invoice_detail_query_ds').reset();
}
function acr610_invoice_detail_submit() {
Leaf.showConfirm('提示', '您确认提交吗', function () {
lock_current_detail_window();
Leaf.request({
url: $('acr610_detail_submit_link').getUrl(),
para: {
invoice_apply_id: '${/parameter/@invoice_apply_id}'
},
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_detail_window();
acr610_invoice_detail_exit();
},
failure: function () {
unlock_current_detail_window();
},
error: function () {
unlock_current_detail_window();
},
scope: this
});
});
}
function acr610_detail_grid_readonly(reocrd_id, invoice_hd_wfl_id) {
var currency_reocrd = $('acr610_invoice_detail_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['winid'] = 'confirm_invoice_detail_win';
param['document_id'] = invoice_hd_wfl_id;
param['url_title'] = '${l:ACR.INVOICE_DETAIL_DETAIL}';
param['function_code'] = 'ACR610R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr610_invoice_detail_link');
}
function acr610_detail_upload_window(write_off_id) {
if(write_off_id){
var url = $('attachment_uploadFile_id').getUrl() + '?table_name=ACR_INVOICE_APPLY&header_id=' + record.get('write_off_id');
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'acr_apply_cdd_attachtment_upload_id',
width: 850,
height: 400
});
}else {
Leaf.showMessage('${l:HLS.PROMPT}', '无法上传,请联系管理员!');
}
}
function acr610_detail_renderer(value, record, name) {
if (name == 'document_number') {
return '<a href="javascript:acr610_detail_grid_readonly(' + record.id + ',' + record.get('invoice_hd_wfl_id') + '\');">' + value + '</a>';
}
if(name == 'attachment'){
if(record.get('paid_byother_flag') == 'T'){
return '<a href="javascript:acr610_detail_upload_window(\'' + record.get('write_off_id') + '\')">附件</a>';
}
}
}
function acr610_detail_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<!--<a:dataSet id="acr610_invoice_apply_query_ds">
<a:fields>
<a:field name="invoice_apply_num"/>
<a:field name="invoice_apply_user_n"/>
<a:field name="invoice_apply_date"/>
</a:fields>
</a:dataSet>-->
<a:dataSet id="acr610_ipaid_byother_flag_ds" lookupCode="PAID_BYOTHER_FLAG"/>
<a:dataSet id="acr610_invoice_detail_query_ds">
<a:fields>
<a:field name="contract_number"/>
<a:field name="bp_code"/>
<a:field name="journal_month"/>
<a:field name="paid_byother_flag_n" displayField="code_value_name" options="acr610_ipaid_byother_flag_ds"
returnField="paid_byother_flag" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="acr610_invoice_detail_result_ds" autoPageSize="true" autoQuery="true" fetchAll="true"
model="acr.acr610.acr_invoice_apply_detail" queryUrl="${/request/@context_path}/autocrud/acr.acr610.acr_invoice_apply_detail/query?invoice_apply_id=${/parameter/@invoice_apply_id}" queryDataSet="acr610_invoice_detail_query_ds"
selectable="false"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="acr610_invoice_detail_exit" text="HLS.EXIT"/>
<a:toolbarButton click="acr610_invoice_detail_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr610_invoice_detail_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr610_invoice_detail_submit" text="HLS.SUBMIT"/>
</a:screenTopToolbar>
<a:form marginWidth="200" padding="0" title="查询条件">
<a:hBox labelSeparator=" ">
<a:textField name="contract_number" bindTarget="acr610_invoice_detail_query_ds" prompt="合同编号" width="135"/>
<a:textField name="bp_code" bindTarget="acr610_invoice_detail_query_ds" prompt="客户编号" width="135"/>
<a:datePicker name="journal_month" bindTarget="acr610_invoice_detail_query_ds" prompt="税款所属期" width="135"/>
<a:comboBox name="paid_byother_flag_n" bindTarget="acr610_invoice_detail_query_ds" prompt="担保支付" width="135"/>
</a:hBox>
</a:form>
<a:form marginWidth="200" padding="0" title="基本信息">
<a:hBox labelSeparator=" ">
<a:textField name="invoice_apply_num" bindTarget="acr610_invoice_result_ds" prompt="申请编号" width="135" readOnly="true"/>
<a:textField name="invoice_apply_user_n" bindTarget="acr610_invoice_result_ds" prompt="申请人" width="135" readOnly="true"/>
<a:textField name="invoice_apply_date" bindTarget="acr610_invoice_result_ds" prompt="申请时间" width="135" readOnly="true"/>
</a:hBox>
</a:form>
<a:grid id="acr610_invoice_detail_grid_ds" bindTarget="acr610_invoice_detail_result_ds" marginHeight="250"
marginWidth="30" navBar="true">
<a:columns>
<a:column name="document_number" lock="true" prompt="单据编号" renderer="acr610_detail_renderer" width="120"/>
<a:column name="contract_number" prompt="合同编号" width="100"/>
<a:column name="bp_code" prompt="客户编号" width="150"/>
<a:column name="bp_name" prompt="客户名称" width="100"/>
<a:column name="times" prompt="租期" width="100"/>
<a:column name="journal_month" prompt="税款所属期" width="150"/>
<a:column name="tax_type_rate" prompt="税率" width="150"/>
<a:column name="total_amount" prompt="开票金额" renderer="acr610_detail_formatMoney" width="150"/>
<a:column name="net_amount" prompt="不含税金额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="tax_amount" prompt="税额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="paid_byother_flag_n" prompt="担保支付" width="100"/>
<a:column name="bp_bank_account_name" prompt="付款人" width="100"/>
<a:column name="transaction_amount" prompt="付款金额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="write_off_due_amount" prompt="核销金额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="transaction_num" prompt="收款业务编号" width="100"/>
<a:column name="journal_num" prompt="增值税凭证号" width="100"/>
<a:column name="attachment" prompt="担保代付协议" width="100" renderer="acr610_detail_renderer"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-15 下午04:39:15
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="acr512_currency_list"/>
<a:model-query fetchAll="true" model="acr.ACR512.acr_invoice_business_type_list"
rootPath="acr512_business_type_list"/>
</a:init-procedure>
<a:view>
<a:link id="acr512_invoice_status_change" model="acr.ACR512.alter_acr_invoice_status" modelaction="execute"/>
<a:link id="acr513_invoice_readonly_page"
url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="acr512_invoice_update_page"
url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_detail.lview"/>
<!--<a:link id="acr512_invoice_update_page" url="${/request/@context_path}/modules/cont/CON500/con_contract_update.screen"/>-->
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="acr512_submit_id" model="acr.ACR512.acr_invoice_hd_batch" modelaction="update"/>
<a:link id="get_document_number_link" model="acr.ACR512.get_document_number" modelaction="query"/>
<a:link id="acr512_update_for_submit_id" url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_for_submit.lsc"/>
<script><![CDATA[
//提交复核
function acr512_invoice_submit_selected() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length == 0) {
$L.showInfoMessage('提示', '请至少选择一条数据!');
} else {
var invoice_hd_ids = '';
//判断单据的状态
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
$L.showErrorMessage("提示", '发票状态有误!');
return;
}
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
}
var detail_mask = Ext.getBody();
Leaf.showConfirm('提示', "确认执行该操作?", function () {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('acr512_invoice_status_change').getUrl(),
para: {
invoice_hd_ids: invoice_hd_ids,
want_status: 'CONFIRMING'
},
success: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
$('acr512_invoice_result_ds').query();
},
error: function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
},
scope: this
});
}, function () {
Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
})
}
}
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
function acr512_invoice_query() {
$('acr512_invoice_result_ds').query();
var records = $('acr512_invoice_result_ds').getAll();
for (var i = 0; i < records.length; i++) {
var record = record[i];
var invoice_hd_id = record.get('invoice_hd_id');
Leaf.request({
url: $('get_document_number_link').getUrl(),
para: {
invoice_hd_id: invoice_hd_id
},
success: function (res) {
var document_number = record[i].get('document_number');
if (res.result.record['isreturn'] > 0) {
return '<font color="red">' + document_number + '</font> ';
} else {
return value;
}
}
});
}
$('acr512_invoice_result_ds').query();
}
function acr512_invoice_reset() {
$('acr512_invoice_query_ds').reset();
}
function acr512_grid_update(reocrd_id, invoice_hd_id, status) {
var maintain_type = 'UPDATE';
var currency_reocrd = $('acr512_invoice_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['function_code'] = 'ACR512';
param['winid'] = 'confirm_invoice_win';
param['document_id'] = invoice_hd_id;
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
if (param['invoice_status'] == 'CONFIRMING') {
param['function_code'] = 'ACR512R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
} else {
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr512_invoice_update_page', 'acr512_invoice_result_ds');
}
}
function acr512_document_number_render(value, record, name) {
if (name == 'document_number') {
if (record.get('compare_date_flag') == 'Y') {
return '<a style="color:red" href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
} else {
return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
}
// return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
function acr512_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
}
function acr512_invoice_query_Onupdate(ds, record, name, value, oldVlaue) {
if (name == 'document_number_f') {
if (Leaf.isEmpty(record.get('document_number_t'))) {
record.set('document_number_t', value);
}
} else if (name == 'project_number_f') {
if (Leaf.isEmpty(record.get('project_number_t'))) {
record.set('project_number_t', value);
}
} else if (name == 'invoice_number_f') {
if (Leaf.isEmpty(record.get('invoice_number_t'))) {
record.set('invoice_number_t', value);
}
} else if (name == 'contract_number_f') {
if (Leaf.isEmpty(record.get('contract_number_t'))) {
record.set('contract_number_t', value);
}
} else if (name == 'invoice_bp_code_f') {
if (Leaf.isEmpty(record.get('invoice_bp_code_t'))) {
record.set('invoice_bp_code_t', value);
}
} else if (name == 'total_amount_f') {
if (Leaf.isEmpty(record.get('total_amount_t'))) {
record.set('total_amount_t', value);
}
}
if (Ext.isEmpty(record.get('project_number_f')) && Ext.isEmpty(record.get('project_number_t'))) {
record.set('query_project_number', '');
} else {
record.set('query_project_number', 'Y');
}
if (Ext.isEmpty(record.get('contract_number_f')) && Ext.isEmpty(record.get('contract_number_t'))) {
record.set('query_contract_number', '');
} else {
record.set('query_contract_number', 'Y');
}
}
function acr512_invoice_delete() {
$('acr512_invoice_update_grid_ds').remove();
}
//发票提交
function acr512_invoice_submit() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = [];
for (var i = 0; i < records.length; i++) {
if (records[i].get('status') == 'APPROVED' || records[i].get('statsu') == 'APPROVING') {
Leaf.showMessage('${l:HLS.PROMPT}', '该发票正在审批中或已审批通过,不可重复提交');
return;
}
if (i == 0) { //modify by wuts for hl 2018-12-23
var invoice_hd_ids = records[0].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
}
Leaf.showConfirm('提示', '您确认提交吗', function () {
lock_current_window();
Leaf.request({
url: $('acr512_submit_id').getUrl(),
para: {
invoice_hd_ids: invoice_hd_ids
},
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_window();
$('acr512_invoice_result_ds').query();
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
function acr512_invoice_insert() {
var records = $('acr512_invoice_result_ds').getSelected();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择需要审批的发票!');
return;
}
var datas = {};
var saveData = [];
var invoice_hd_ids = '';
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
$L.showErrorMessage("提示", '发票状态有误!');
return;
}
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
invoice_hd_ids = invoice_hd_ids + ',' + records[i].get('invoice_hd_id');
}
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
datas['invoice_hd_ids'] = invoice_hd_ids;
datas['details'] = saveData;
Leaf.showConfirm('提示', '您确认新建申请吗', function () {
lock_current_window();
Leaf.request({
url: $('acr512_update_for_submit_id').getUrl(),
para: datas,
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_window();
$('acr512_invoice_result_ds').query();
},
failure: function () {
unlock_current_window();
},
error: function () {
unlock_current_window();
},
scope: this
});
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="acr512_currency_ds">
<a:datas dataSource="/model/acr512_currency_list"/>
</a:dataSet>
<a:dataSet id="acr512_business_type_ds">
<a:datas dataSource="/model/acr512_business_type_list"/>
</a:dataSet>
<a:dataSet id="acr512_invoice_kind_ds" lookupCode="ACR510_INVOICE_KIND"/>
<a:dataSet id="acr512_invoice_status_ds" lookupCode="ACR510_AR_INVOICE_STATUS"/>
<a:dataSet id="hls_lease_channel_ds" loadData="true" model="basic.hls_lease_channel_for_lov"/>
<a:dataSet id="acr512_invoice_query_ds">
<a:fields>
<a:field name="currency_name" displayField="currency_name" options="acr512_currency_ds"
returnField="currency" valueField="currency_code"/>
<a:field name="invoice_status_n" displayField="code_value_name" options="acr512_invoice_status_ds"
returnField="invoice_status" valueField="code_value"/>
<a:field name="invoice_kind"/>
<a:field name="contract_name"/>
<a:field name="invoice_bp_name"/>
<a:field name="invoice_kind_desc" displayField="code_value_name" options="acr512_invoice_kind_ds"
returnField="invoice_kind" valueField="code_value"/>
<a:field name="business_type_desc" displayField="business_type_desc"
options="acr512_business_type_ds" returnField="business_type" valueField="business_type"/>
<a:field name="created_by_name" lovGridHeight="320" lovHeight="500"
lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500" title="开票人选择">
<a:mapping>
<a:map from="user_id" to="created_by"/>
<a:map from="description" to="created_by_name"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_f"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_t"/>
</a:mapping>
</a:field>
<a:field name="project_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
<a:mapping>
<a:map from="project_number" to="project_number_f"/>
</a:mapping>
</a:field>
<a:field name="project_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
<a:mapping>
<a:map from="project_number" to="project_number_t"/>
</a:mapping>
</a:field>
<a:field name="contract_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500" title="合同选择">
<a:mapping>
<a:map from="contract_number" to="contract_number_f"/>
</a:mapping>
</a:field>
<a:field name="contract_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500" title="合同选择">
<a:mapping>
<a:map from="contract_number" to="contract_number_t"/>
</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:fields>
<a:events>
<a:event name="update" handler="acr512_invoice_query_Onupdate"/>
</a:events>
</a:dataSet>
<a:dataSet id="acr512_invoice_result_ds" autoPageSize="true" autoQuery="true"
model="acr.ACR512.acr_invoice_update_query" queryDataSet="acr512_invoice_query_ds"
selectable="true"/>
<!-- <a:fields>-->
<!-- <a:field name="compare_date_flag"/>-->
<!-- </a:fields>-->
<!-- <a:events>-->
<!-- <a:event name="load" handler="load_do_info"/>-->
<!-- </a:events>-->
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="acr512_invoice_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr512_invoice_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr512_invoice_delete" text="HLS.REMOVE"/>
<!--<a:toolbarButton click="acr512_invoice_submit_selected" text="提交复核"/>-->
<a:toolbarButton click="acr512_invoice_insert" text="新建申请"/>
<!--
<a:toolbarButton click="acr512_invoice_submit" text="HLS.SUBMIT"/>
-->
</a:screenTopToolbar>
<a:form marginWidth="200" padding="0" title="应收发票维护">
<a:hBox labelSeparator=" ">
<a:textField name="document_number_f" bindTarget="acr512_invoice_query_ds"
prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/>
<!--
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
-->
<a:textField name="document_number_t" bindTarget="acr512_invoice_query_ds" prompt="单据编号到"
width="135"/>
<a:textField name="contract_name" bindTarget="acr512_invoice_query_ds" prompt="合同名称" width="353"/>
<!-- <a:lov name="contract_number_f" bindTarget="acr512_invoice_query_ds" prompt="合同编号从" width="135"/>-->
<!--
<div><![CDATA[${l:HLS.CONTRACT_NUMBER_TO}]]></div>
-->
<!-- <a:lov name="contract_number_t" bindTarget="acr512_invoice_query_ds" prompt="合同编号到" width="135"/>-->
<!-- <a:lov name="project_number_f" bindTarget="acr512_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
<a:lov name="project_number_t" bindTarget="acr512_invoice_query_ds" prompt="" width="135"/>-->
<!--
<a:comboBox name="business_type_desc" bindTarget="acr512_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>
-->
<!--
<a:comboBox name="lease_channel_desc" bindTarget="acr512_invoice_query_ds" prompt="商业模式" width="135"/>
-->
<!-- <a:comboBox name="currency_name" bindTarget="acr512_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/> -->
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="accounting_date_f" bindTarget="acr512_invoice_query_ds" prompt="记账日期从"
width="135"/>
<!--
<div><![CDATA[${l:HLS.ACCOUNT_DATE_TO}]]></div>
-->
<a:datePicker name="accounting_date_t" bindTarget="acr512_invoice_query_ds" prompt="记账日期到"
width="135"/>
<a:lov name="created_by_name" bindTarget="acr512_invoice_query_ds" prompt="创建人" width="135"/>
<a:textField name="invoice_title" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_TITLE"
width="135"/>
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="invoice_date_f" bindTarget="acr512_invoice_query_ds" prompt="发票日期从"
width="135"/>
<!--
<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>
-->
<a:datePicker name="invoice_date_t" bindTarget="acr512_invoice_query_ds" prompt="发票日期到"
width="135"/>
<!-- <a:lov name="invoice_bp_code_f" bindTarget="acr512_invoice_query_ds" prompt="客户编号从" width="135"/>-->
<!--
<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>
-->
<!-- <a:lov name="invoice_bp_code_t" bindTarget="acr512_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:textField name="invoice_bp_name" bindTarget="acr512_invoice_query_ds" prompt="客户名称" width="135"/>
<a:comboBox name="invoice_kind_desc" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_KIND"
width="135"/>
<a:comboBox name="invoice_status_n" bindTarget="acr512_invoice_query_ds" prompt="发票状态" width="135"/>
</a:hBox>
</a:form>
<a:grid id="acr512_invoice_update_grid_ds" bindTarget="acr512_invoice_result_ds" marginHeight="250"
marginWidth="30" navBar="true">
<a:columns>
<a:column name="document_number" lock="true" prompt="HLS.DOCUMENT_NUMBER"
renderer="acr512_document_number_render" width="120"/>
<a:column name="invoice_bp_name" autoAdjust="false" prompt="HLS.CUSTOMER_NAME" showTitle="true"
width="100"/>
<a:column name="contract_name" autoAdjust="false" prompt="HLS.CONTRACT_NAME" showTitle="true"
width="150"/>
<!--
<a:column name="business_type_desc" prompt="HLS.BUSINESS_TYPE_DESC" width="80"/>
-->
<a:column name="invoice_kind_desc" prompt="ACR.INVOICE_KIND" width="100"/>
<!-- <a:column name="invoice_number" prompt="ACR.INVOICE_NUMBER" width="120"/> -->
<a:column name="invoice_date" prompt="ACR.INVOICE_DATE" width="100"/>
<!-- <a:column name="project_name" autoAdjust="false" prompt="HLS.PROJECT_NAME" showTitle="true" width="150"/> -->
<!-- <a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="120"/> -->
<!-- <a:column name="bp_code" prompt="HLS.CUSTOMER_NUMBER" width="100"/> -->
<a:column name="invoice_title" autoAdjust="false" prompt="ACR.INVOICE_TITLE" showTitle="true"
width="150"/>
<!-- <a:column name="total_amount" align="right" prompt="ACR.TOTAL_AMOUNT" renderer="Aurora.formatMoney" width="100"/> -->
<!-- <a:column name="currency" prompt="HLS.CURRENCY" width="80"/> -->
<a:column name="created_by_name" autoAdjust="false" prompt="创建人" showTitle="true" width="150"/>
<a:column name="invoice_status_desc" prompt="ACR.INVOICE_STATUS" width="100"/>
<a:column name="accounting_date" prompt="HLS.ACCOUNT_DATE" width="100"/>
<!-- <a:column name="compare_date_flag" prompt="比较日期" width="100"/> -->
<!-- <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/> -->
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:view>
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.screen"/>
<a:link id="acr512_invoice_ln_update_1_link" model="acr.ACR512.acr_invoice_update_query" modelaction="update"/>
<!-- <a:link id="acr512_invoice_status_change" model="acr.ACR512.alter_acr_invoice_status" modelaction="update"/>-->
<script><![CDATA[
// var dynamic_document_id = '$c{/parameter/@document_id}';
// if ('$c{/parameter/@document_id}') {
// var detail_mask;
// if ('${/parameter/@winid}') {
// if (parent.$A.CmpManager.get('${/parameter/@winid}')) {
// detail_mask = parent.$('${/parameter/@winid}').wrap;
// parent.Aurora.Masker.mask(detail_mask, '${l:HLS.LOADING}');
// } else {
// detail_mask = $('${/parameter/@winid}').wrap;
// Aurora.Masker.mask(detail_mask, '${l:HLS.LOADING}');
// }
// } else {
// detail_mask = Ext.getBody();
// Aurora.Masker.mask(detail_mask, '${l:HLS.LOADING}');
// }
// }
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) {
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) {
link_function = '${/parameter/@layout_code}_open_bp_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'car_detail' && record.get('contract_lease_item_id')) {
link_function = '${/parameter/@layout_code}_open_lease_item_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'contract_number' && record.get('contract_id')) {
link_function = '${/parameter/@layout_code}_open_contract_detail_window';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + value + '</a>';
}
};
//发票确认
// window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
// var detail_mask = Ext.getBody();
//
// var record_hd="${/parameter/@invoice_hd_id}";
// //确认发票状态
// var invoice_status='${/parameter/@invoice_status}';
// if(invoice_status!='NEW' &&invoice_status!='REJECT'){
// $L.showErrorMessage("提示",'发票状态有误!');
// return;
// }
// Leaf.showConfirm('提示', "确认执行该操作?", function() {
// Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
// Leaf.request({
// url: $('acr512_invoice_status_change').getUrl(),
// para: {
// invoice_hd_id: record_hd,
// want_status: 'CONFIRMING'
// },
// success: function () {
//
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
//
// Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
// $('${/parameter/@winid}').close();
//
// //$('${/parameter/@winid}').close();
// },
// error: function () {
// Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
// },
// scope: this
// });
// },function(){
// Leaf.Masker.unmask(detail_mask, '${l:HLS.EXECUTING}');
//
// })
//
//
//
// }
window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
var contract_lease_item_id = record.get('contract_lease_item_id');
new Leaf.Window({
id: 'contract_lease_item_maintain_window',
url: $('contract_lease_item_maintain_link').getUrl(),
params: {
contract_lease_item_id: contract_lease_item_id,
winid: 'contract_lease_item_maintain_window'
},
draggable: true,
fullScreen: true
});
};
window['${/parameter/@layout_code}_open_contract_detail_window'] = function(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
param['function_code'] = 'ACR_CON301'; /* param['function_usage'] = 'QUERY'; */
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', record.ds.id, '${/parameter/@layout_code}');
};
//加载事件
window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var acr_invoice_hd_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_hd');
var ds_batch_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_batch_ln');
if(!$(acr_invoice_hd_ds_id).getAt(0).get('merge_flag')){
var acr_invoice_rec = $(acr_invoice_hd_ds_id).getAt(0);
var invoice_hd_id = $(acr_invoice_hd_ds_id).getCurrentRecord().get('invoice_hd_id');
$(acr_invoice_hd_ds_id).getAt(0).set('merge_flag', 'N');
$(acr_invoice_hd_ds_id).getAt(0).set('merge_flag_n', '不合并');
// if (acr_invoice_rec.get('merge_flag') == 'Y') {
Leaf.request({
url: $('acr512_invoice_ln_update_1_link').getUrl(),
para: {
invoice_hd_id: invoice_hd_id,
merge_flag: $(acr_invoice_hd_ds_id).getCurrentRecord().get('merge_flag')
},
success: function() {
$(ds_batch_id).query();
//$('${/parameter/@winid}').close();
},
scope: this
});
}
};
window['${/parameter/@layout_code}_open_bp_detail_window'] = function(id, name) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = record.data;
param['function_code'] = 'CON501H';
param['function_usage'] = 'MODIFY';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con713_hls_bp_master_modify_link', record.ds.id, '${/parameter/@layout_code}');
};
function con500_contract_save(nextStep) {
var root_ds = $('${/model/base_table_path/record/@tab_code}_${/model/base_table_path/record/@base_table}_ds');
if (root_ds.validate()) {
var winid = '${/parameter/@winid}';
if (winid) {
Leaf.Masker.mask($(winid).wrap, '${l:HLS.EXECUTING}');
} else {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
lock_current_window();
var root_record = root_ds.getAt(0);
root_ds.setSubmitParameter('layout_code', '${/parameter/@layout_code}');
on_con_save_dynamic(root_ds, root_record, nextStep, winid);
}
con500_contract_merge();
}
function con500_contract_submit() {
Leaf.SideBar.enable = false;
con500_contract_save(con500_contract_submit_final);
}
function con500_contract_exit() {
if ('${/parameter/@winid}') {
$('${/parameter/@winid}').close();
} else {
window.location.go(-1);
}
}
function con500_contract_save_exit() {
con500_contract_save(con500_contract_exit);
}
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_hd');
var ds_batch_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acr_invoice_batch_ln');
var invoice_hd_id = $(ds_id).getCurrentRecord().get('invoice_hd_id');
var message = '您确认吗';
// if ($(ds_id).getCurrentRecord().get('merge_flag') == 'Y') {
// message = '您确认行合并吗';
// } else {
// message = '您确认行不合并吗';
// }
// Leaf.showConfirm('提示', message, function() {
Leaf.request({
url: $('acr512_invoice_ln_update_1_link').getUrl(),
para: {
invoice_hd_id: invoice_hd_id,
merge_flag: $(ds_id).getCurrentRecord().get('merge_flag')
},
success: function() {
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
$(ds_batch_id).query();
// $('${/parameter/@winid}').close();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
/* new Aurora.Window({
id: 'contract_invoice_merge_window',
url: $('contract_invoice_merge_link').getUrl(),
params: {
invoice_hd_id: invoice_hd_id,
winid: 'contract_invoice_merge_window'
},
// draggable: true,
fullScreen: true
}); */
},
scope: this
});
// },function(){
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
//
// });
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
...@@ -78,10 +78,13 @@ ...@@ -78,10 +78,13 @@
if (record.get('secondary_lease') == 'YES') { if (record.get('secondary_lease') == 'YES') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID_prompt').style.display = 'block'; document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID').style.display = 'block'; document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID').style.display = 'block';
} else if (record.get('secondary_lease') == 'NO') { } else /*if (record.get('secondary_lease') == 'NO') */{
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_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_REPUR_CONTRACT_ID').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 @@ ...@@ -38,6 +38,7 @@
$(ds).setQueryParameter('due_date_from',record.get('due_date_from')); $(ds).setQueryParameter('due_date_from',record.get('due_date_from'));
$(ds).setQueryParameter('due_date_to',record.get('due_date_to')); $(ds).setQueryParameter('due_date_to',record.get('due_date_to'));
$(ds).setQueryParameter('base_date',record.get('base_date')); $(ds).setQueryParameter('base_date',record.get('base_date'));
$(ds).setQueryParameter('business_type',record.get('business_type'));
$(ds).query(); $(ds).query();
}else{ }else{
$L.showInfoMessage("提示",'请输入字段:租赁开始日从、租赁开始日到、基准日!'); $L.showInfoMessage("提示",'请输入字段:租赁开始日从、租赁开始日到、基准日!');
......
...@@ -153,6 +153,13 @@ ...@@ -153,6 +153,13 @@
} }
} }
} }
function change_background_color(record) {
if (record.get('trans_pently_flag') == 'Y') {
return 'background-color:#00ff00';
}
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="con_rent_trans_penalty_hd_ds" autoPageSize="true" autoQuery="true" <a:dataSet id="con_rent_trans_penalty_hd_ds" autoPageSize="true" autoQuery="true"
...@@ -164,7 +171,7 @@ ...@@ -164,7 +171,7 @@
</a:dataSet> </a:dataSet>
<a:dataSet id="con7000_csh_write_off_ds" fetchAll="true" autoQuery="true" <a:dataSet id="con7000_csh_write_off_ds" fetchAll="true" autoQuery="true"
model="cont.CON7001.con_rent_trans_penalty_csh_write_off" 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"> selectable="true">
<a:events> <a:events>
<a:event name="load" handler="con7000_csh_write_off_ds_load"/> <a:event name="load" handler="con7000_csh_write_off_ds_load"/>
...@@ -209,7 +216,7 @@ ...@@ -209,7 +216,7 @@
<a:tabs> <a:tabs>
<a:tab prompt="营业违约金核销明细" width="150"> <a:tab prompt="营业违约金核销明细" width="150">
<a:grid id="con7000_csh_write_off_grid" bindTarget="con7000_csh_write_off_ds" marginHeight="130" <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:columns>
<a:column name="times" prompt="回数" width="70" align="center"/> <a:column name="times" prompt="回数" width="70" align="center"/>
<a:column name="due_date" prompt="预定支付日" width="120" align="center" <a:column name="due_date" prompt="预定支付日" width="120" align="center"
......
...@@ -47,6 +47,13 @@ ...@@ -47,6 +47,13 @@
function con7000_csh_write_off_ds_unselect(ds, record) { function con7000_csh_write_off_ds_unselect(ds, record) {
return false; return false;
} }
function change_background_color(record) {
if (record.get('trans_pently_flag') == 'Y') {
return 'background-color:#00ff00';
}
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="con_rent_trans_penalty_hd_ds" autoPageSize="true" autoQuery="true" <a:dataSet id="con_rent_trans_penalty_hd_ds" autoPageSize="true" autoQuery="true"
...@@ -55,7 +62,7 @@ ...@@ -55,7 +62,7 @@
</a:dataSet> </a:dataSet>
<a:dataSet id="con7000_csh_write_off_ds" autoPageSize="true" autoQuery="true" <a:dataSet id="con7000_csh_write_off_ds" autoPageSize="true" autoQuery="true"
model="cont.CON7001.con_rent_trans_penalty_csh_write_off" 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"> selectable="true" showCheckAll="false">
<a:events> <a:events>
<a:event name="load" handler="con7000_csh_write_off_ds_load"/> <a:event name="load" handler="con7000_csh_write_off_ds_load"/>
...@@ -98,7 +105,7 @@ ...@@ -98,7 +105,7 @@
<a:tabs> <a:tabs>
<a:tab prompt="营业违约金核销明细" width="150"> <a:tab prompt="营业违约金核销明细" width="150">
<a:grid id="con7000_csh_write_off_grid" bindTarget="con7000_csh_write_off_ds" marginHeight="130" <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:columns>
<a:column name="times" prompt="回数" width="70" align="center"/> <a:column name="times" prompt="回数" width="70" align="center"/>
<a:column name="due_date" prompt="预定支付日" width="120" align="center" <a:column name="due_date" prompt="预定支付日" width="120" align="center"
......
...@@ -5,10 +5,11 @@ ...@@ -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"> customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure> <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:init-procedure>
<a:view> <a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
...@@ -25,30 +26,29 @@ ...@@ -25,30 +26,29 @@
//合同变更创建:营业内勤只能选到回款账户变更, //合同变更创建:营业内勤只能选到回款账户变更,
// 债权担当只能选到承租人变更, // 债权担当只能选到承租人变更,
// 代理店下级只能选到租金计划变更; // 代理店下级只能选到租金计划变更;
Leaf.onReady(function(){ Leaf.onReady(function () {
var role_code='${/model/role_code/record/@role_code}'; 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 = 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 ds_id_n = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var head_record = $(ds_id).getAt(0); var head_record = $(ds_id).getAt(0);
if(head_record){ if (head_record) {
if(role_code=='0007'){ if (role_code == '0007') {
head_record.set('ccr_document_type','ACC_CHAG'); head_record.set('ccr_document_type', 'ACC_CHAG');
head_record.set('ccr_document_type_n','回款账户变更'); head_record.set('ccr_document_type_n', '回款账户变更');
head_record.getField('ccr_document_type').setReadOnly(true); head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true); head_record.getField('ccr_document_type_n').setReadOnly(true);
/*$(ds_id_n).setQueryParameter('contract_status', ''); /*$(ds_id_n).setQueryParameter('contract_status', '');
$(ds_id_n).query();*/ $(ds_id_n).query();*/
}else if(role_code=='0019'){ } else if (role_code == '0019') {
head_record.set('ccr_document_type','LEASE_CHAG'); head_record.set('ccr_document_type', 'LEASE_CHAG');
head_record.set('ccr_document_type_n','承租人变更'); head_record.set('ccr_document_type_n', '承租人变更');
head_record.getField('ccr_document_type').setReadOnly(true); head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true); head_record.getField('ccr_document_type_n').setReadOnly(true);
/*$(ds_id_n).setQueryParameter('contract_status', 'INCEPT'); /*$(ds_id_n).setQueryParameter('contract_status', 'INCEPT');
$(ds_id_n).query();*/ $(ds_id_n).query();*/
} } else if (role_code == '0008') {
else if(role_code=='0008'){ head_record.set('ccr_document_type', 'CUT_CHAG');
head_record.set('ccr_document_type','CUT_CHAG'); head_record.set('ccr_document_type_n', '租金计划变更');
head_record.set('ccr_document_type_n','租金计划变更');
head_record.getField('ccr_document_type').setReadOnly(true); head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true); head_record.getField('ccr_document_type_n').setReadOnly(true);
/*$(ds_id_n).setQueryParameter('contract_status', 'INCEPT'); /*$(ds_id_n).setQueryParameter('contract_status', 'INCEPT');
...@@ -57,19 +57,20 @@ ...@@ -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'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if(name == 'ccr_document_type' && value){ if (name == 'ccr_document_type' && value) {
if(value != 'ACC_CHAG'){ if (value != 'ACC_CHAG') {
$(ds_id).setQueryParameter('contract_status', 'INCEPT'); $(ds_id).setQueryParameter('contract_status', 'INCEPT');
$(ds_id).query(); $(ds_id).query();
} }
if(value == 'ACC_CHAG'){ if (value == 'ACC_CHAG') {
$(ds_id).setQueryParameter('contract_status', ''); $(ds_id).setQueryParameter('contract_status', '');
$(ds_id).query(); $(ds_id).query();
} }
} }
}; };
function open_contract_win(ds_id, record_id) { function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id); var record = $(ds_id).findById(record_id);
var param = record.data; var param = record.data;
...@@ -80,6 +81,7 @@ ...@@ -80,6 +81,7 @@
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}'; 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); 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) { window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
if (name == 'contract_number' && value) { if (name == 'contract_number' && value) {
return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>'; return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
...@@ -87,7 +89,7 @@ ...@@ -87,7 +89,7 @@
return value; return value;
}; };
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
// $('${/parameter/@layout_code}_user_button1').disable(); //按钮不可用 // $('${/parameter/@layout_code}_user_button1').disable(); //按钮不可用
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var prj_project_result_ds = $(ds_id); var prj_project_result_ds = $(ds_id);
var records = prj_project_result_ds.getSelected(); var records = prj_project_result_ds.getSelected();
...@@ -95,18 +97,23 @@ ...@@ -95,18 +97,23 @@
Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}'); Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
return; return;
} }
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在变更期间无法进行后续操作,请谨慎操作!!!如果需要取消变更,请一定点击取消变更按钮!!!</span>', function () { var head_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
var record = records[0]; 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 head_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
var head_record = $(head_ds_id).getAt(0);
if ($(head_ds_id).validate($('${/parameter/@layout_code}_user_button1').enable())) {
var contract = record.get('contract_id'); 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 req_date = head_record.get('req_date');
var description = head_record.get('description'); var description = head_record.get('description');
var ref_v01 = head_record.get('ref_v01'); var ref_v01 = head_record.get('ref_v01');
Leaf.Masker.mask(Ext.getBody()); Leaf.Masker.mask(Ext.getBody(),'正在创建变更。。。');
Leaf.request({ Leaf.request({
url: $('con733_create_change_link').getUrl(), url: $('con733_create_change_link').getUrl(),
para: { para: {
...@@ -126,15 +133,15 @@ ...@@ -126,15 +133,15 @@
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE'; param['maintain_type'] = 'UPDATE';
param['document_type'] = ccr_document_type; param['document_type'] = ccr_document_type;
if(ccr_document_type == 'CUT_CHAG'){//租金計劃變更 if (ccr_document_type == 'CUT_CHAG') {//租金計劃變更
param['function_code'] = 'CON733CF'; param['function_code'] = 'CON733CF';
param['url_title'] = '变更申请-合同租金计划变更'; param['url_title'] = '变更申请-合同租金计划变更';
param['winid'] = 'con733_cf_change_detail_winid'; 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['function_code'] = 'CON733BPT';
param['url_title'] = '变更申请-合同承租人变更'; param['url_title'] = '变更申请-合同承租人变更';
param['winid'] = 'con733_bpt_change_detail_winid'; 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['function_code'] = 'CON733BPB';
param['url_title'] = '变更申请-合同回款账户变更'; param['url_title'] = '变更申请-合同回款账户变更';
param['winid'] = 'con733_bpb_change_detail_winid'; param['winid'] = 'con733_bpb_change_detail_winid';
...@@ -142,17 +149,17 @@ ...@@ -142,17 +149,17 @@
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_change_link', ds_id); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_change_link', ds_id);
}, },
failure: function () { failure: function () {
// $('${/parameter/@layout_code}_user_button1').enable(); //按钮启用 // $('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
error: function () { error: function () {
// $('${/parameter/@layout_code}_user_button1').enable(); //按钮启用 // $('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this
}); });
} }, null, 300, 150);
}, null, 300, 150); }
}; };
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) { 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'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
para: { para: {
due_date : record.get('due_date'), due_date : record.get('due_date'),
bp_id : record.get('bp_id_agent_level1'), bp_id : record.get('bp_id_agent_level1'),
business_type : record.get('business_type'),
overday1:record.get('overdue_day1'), overday1:record.get('overdue_day1'),
overday2:record.get('overdue_day2'), overday2:record.get('overdue_day2'),
overday3:record.get('overdue_day3'), overday3:record.get('overdue_day3'),
...@@ -53,9 +54,18 @@ ...@@ -53,9 +54,18 @@
} }
]]></script> ]]></script>
<a:dataSets> <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="gld_accounts_ds" loadData="true" model="cont.CON930.gld_accounts_ds"/>
<a:dataSet id="con_contract_cashflow_monthly_query_ds" autoCreate="true"> <a:dataSet id="con_contract_cashflow_monthly_query_ds" autoCreate="true">
<a:fields> <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="due_date" required="true" prompt="基准日期"/>
<a:field name="bp_id_agent_level1" /> <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"/> <a:field name="account_name" displayField="account_name" options="gld_accounts_ds" returnField="account_id" valueField="account_id"/>
...@@ -87,6 +97,7 @@ ...@@ -87,6 +97,7 @@
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form bindTarget="con_contract_cashflow_balance_query_ds" column="4" title="收付款预定查询" marginWidth="40"> <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: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: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_day1" bindTarget="con_contract_cashflow_monthly_query_ds" allowDecimals="false"/>-->
<!-- <a:numberField name="overdue_day2" 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 @@ ...@@ -111,6 +122,7 @@
<a:column name="division_n" align="center" prompt="租赁物" width="220"/> <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="bp_id_agent_level1_n" align="center" prompt="代理店" width="200"/>
<a:column name="contract_number" align="center" prompt="合同号" width="120"/> <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="bp_code" align="center" prompt="业务伙伴号" width="100"/>
<a:column name="account_id_n" align="center" prompt="科目代码" width="120"/> <a:column name="account_id_n" align="center" prompt="科目代码" width="120"/>
<a:column name="account_name" align="center" prompt="科目名称" width="180"/> <a:column name="account_name" align="center" prompt="科目名称" width="180"/>
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/> <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<a:link id="csh_write_off_reverse_detail_link" <a:link id="csh_write_off_reverse_detail_link" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_detail.lview"/>
url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_detail.lview"/> <a:link id="csh_write_off_reverse_wfl_link" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_wfl.lview"/>
<a:link id="create_je_link_id" model="csh.CSH514.csh_transaction_write_off_reverse" modelaction="execute"/> <a:link id="create_je_link_id" model="csh.CSH514.csh_transaction_write_off_reverse" modelaction="execute"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
function dateValidator(record, name, value) { //日期校验方法 function dateValidator(record, name, value) { //日期校验方法
...@@ -75,6 +75,9 @@ ...@@ -75,6 +75,9 @@
function seedetail_tractnum(value, record, name) { function seedetail_tractnum(value, record, name) {
if (record.get('transaction_id')) { if (record.get('transaction_id')) {
url = $('csh_write_off_reverse_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type') + '&ref_n01=' + record.get('ref_n01') + '&receipt_type=' + record.get('receipt_type') + '&bp_category=' + record.get('bp_category') + '&paid_byother_flag=' + record.get('paid_byother_flag'); url = $('csh_write_off_reverse_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type') + '&ref_n01=' + record.get('ref_n01') + '&receipt_type=' + record.get('receipt_type') + '&bp_category=' + record.get('bp_category') + '&paid_byother_flag=' + record.get('paid_byother_flag');
if(record.get('approval_status') == 'APPROVING' || record.get('approval_status') == 'APPROVED'){
url = $('csh_write_off_reverse_wfl_link').getUrl() + '?transaction_wfl_id=' + record.get('transaction_wfl_id')+ '&button_flag=YES';
}
return '<a href="javascript:openReverseDetailWin(\'' + url + '\');">' + value + '</a>'; return '<a href="javascript:openReverseDetailWin(\'' + url + '\');">' + value + '</a>';
} }
} }
...@@ -147,6 +150,7 @@ ...@@ -147,6 +150,7 @@
<a:dataSet id="currency_ds"> <a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/> <a:datas dataSource="/model/currency"/>
</a:dataSet> </a:dataSet>
<a:dataSet id="approval_status_ds" lookupCode="WFL_STATUS"/>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_query_ds" autoCreate="true"> <a:dataSet id="csh_transaction_receipt_write_off_reverse_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="bp_type" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_type_v_for_lov" <a:field name="bp_type" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_type_v_for_lov"
...@@ -236,6 +240,7 @@ ...@@ -236,6 +240,7 @@
<a:map from="bp_code" to="bp_code_to"/> <a:map from="bp_code" to="bp_code_to"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="approval_status_desc" displayField="code_value_name" options="approval_status_ds" returnField="approval_status" valueField="code_value"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="csh514_reversed_update"/> <a:event name="update" handler="csh514_reversed_update"/>
...@@ -298,9 +303,8 @@ ...@@ -298,9 +303,8 @@
prompt="对方账户名称"/> prompt="对方账户名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="对方账号"/> prompt="对方账号"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:textField name="bp_name_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="我方账户名称"/> prompt="客户名称"/>
<!-- <a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="我方账号" readOnly="true"/>--> <!-- <a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="我方账号" readOnly="true"/>-->
<a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="现金事务编号"/> prompt="现金事务编号"/>
...@@ -311,8 +315,8 @@ ...@@ -311,8 +315,8 @@
prompt="HLS.ADVANCE_RECEIPT"/> prompt="HLS.ADVANCE_RECEIPT"/>
<a:textField name="contract_number_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:textField name="contract_number_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="合同编号"/> prompt="合同编号"/>
<a:textField name="bp_name_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:comboBox name="approval_status_desc" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="客户名称"/> prompt="审批状态"/>
</a:form> </a:form>
<a:grid id="csh_transaction_receipt_write_off_grid_ds" <a:grid id="csh_transaction_receipt_write_off_grid_ds"
bindTarget="csh_transaction_receipt_write_off_reverse_result_ds" marginHeight="260" marginWidth="35" bindTarget="csh_transaction_receipt_write_off_reverse_result_ds" marginHeight="260" marginWidth="35"
...@@ -346,6 +350,7 @@ ...@@ -346,6 +350,7 @@
<a:column name="bank_account_name" width="120"/> <a:column name="bank_account_name" width="120"/>
<a:column name="transaction_type_desc" align="center" prompt="事务类型" width="120"/> <a:column name="transaction_type_desc" align="center" prompt="事务类型" width="120"/>
<a:column name="receipt_type_des" align="center" prompt="收款类型" width="120"/> <a:column name="receipt_type_des" align="center" prompt="收款类型" width="120"/>
<a:column name="approval_status_desc" align="center" prompt="审批状态" width="120"/>
</a:columns> </a:columns>
<a:editors> <a:editors>
<a:checkBox id="receipt_write_off_checkbox_id"/> <a:checkBox id="receipt_write_off_checkbox_id"/>
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<a:view> <a:view>
<a:link id="csh_transaction_write_off_reverse_link_id" <a:link id="csh_transaction_write_off_reverse_link_id"
url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_write_off_reverse_new.lsc"/> url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_write_off_reverse_new.lsc"/>
<a:link id="csh514_write_off_reverse_link_id" model="csh.CSH514.csh_transaction_write_off_reverse" <!--<a:link id="csh514_write_off_reverse_link_id" model="csh.CSH514.csh_transaction_write_off_reverse" modelaction="batch_update"/>-->
modelaction="batch_update"/> <a:link id="csh514_write_off_reverse_link_id" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_write_off_reverse.lsc"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/> <a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
Leaf.showMessage('${l:PROMPT}', '${l:CSH514.SELECT_REVERSE_RECORD}'); Leaf.showMessage('${l:PROMPT}', '${l:CSH514.SELECT_REVERSE_RECORD}');
return; return;
} }
var param = head_record.data;
param['transaction_id'] = '${/parameter/@transaction_id}';
if (records[0].get('history_flag') === 'Y') { if (records[0].get('history_flag') === 'Y') {
Leaf.showConfirm('${l:PROMPT}', '该事务是历史事务,请检查是否进行了补生成凭证', function () { Leaf.showConfirm('${l:PROMPT}', '该事务是历史事务,请检查是否进行了补生成凭证', function () {
var saveData = []; var saveData = [];
...@@ -40,7 +42,7 @@ ...@@ -40,7 +42,7 @@
records[i].set('_status', 'update'); records[i].set('_status', 'update');
saveData.push(records[i].data); saveData.push(records[i].data);
} }
param['details'] = saveData;
//区别批量核销和单笔核销 //区别批量核销和单笔核销
var url; var url;
// if ('${/parameter/@ref_n01}' && '${/parameter/@ref_n01}' != 'undefined') { // if ('${/parameter/@ref_n01}' && '${/parameter/@ref_n01}' != 'undefined') {
...@@ -53,7 +55,7 @@ ...@@ -53,7 +55,7 @@
Leaf.Masker.mask(win_body, '${l:HLS.REVERSE_ING}'); Leaf.Masker.mask(win_body, '${l:HLS.REVERSE_ING}');
Leaf.request({ Leaf.request({
url: url, url: url,
para: saveData, para: param,
success: function () { success: function () {
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}', msg: '${l:HLS.SUBMIT_SUCCESS}',
...@@ -135,6 +137,7 @@ ...@@ -135,6 +137,7 @@
saveData.sort(function (a, b) { saveData.sort(function (a, b) {
return b.write_off_id - a.write_off_id; return b.write_off_id - a.write_off_id;
}); });
param['details'] = saveData;
//区别批量核销和单笔核销 //区别批量核销和单笔核销
var url; var url;
...@@ -148,7 +151,7 @@ ...@@ -148,7 +151,7 @@
Leaf.Masker.mask(win_body, '${l:HLS.REVERSE_ING}'); Leaf.Masker.mask(win_body, '${l:HLS.REVERSE_ING}');
Leaf.request({ Leaf.request({
url: url, url: url,
para: saveData, para: param,
success: function () { success: function () {
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}', msg: '${l:HLS.SUBMIT_SUCCESS}',
...@@ -237,6 +240,7 @@ ...@@ -237,6 +240,7 @@
<a:field name="transaction_date" defaultValue="${/model/csh_value/record/@transaction_date}" <a:field name="transaction_date" defaultValue="${/model/csh_value/record/@transaction_date}"
readOnly="true"/> readOnly="true"/>
<a:field name="description" defaultValue="${l:HLS.REVERSE}"/> <a:field name="description" defaultValue="${l:HLS.REVERSE}"/>
<a:field name="note" required="true"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="on_write_off_reverse_detail_update"/> <a:event name="update" handler="on_write_off_reverse_detail_update"/>
...@@ -257,16 +261,22 @@ ...@@ -257,16 +261,22 @@
<a:gridButton click="csh514_write_off_reverse_return" text="HLS.RETURN"/> <a:gridButton click="csh514_write_off_reverse_return" text="HLS.RETURN"/>
<a:gridButton click="csh514_write_off_reverse" text="HLS.REVERSE"/> <a:gridButton click="csh514_write_off_reverse" text="HLS.REVERSE"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="4" title="CSH514.CSH_WRITE_OFF_DETAIL"> <a:form title="CSH514.CSH_WRITE_OFF_DETAIL">
<a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" <a:hBox>
prompt="HLS.REVERSE_DATE"/> <a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
<a:textField name="reversed_period_name" prompt="HLS.REVERSE_DATE"/>
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" <a:textField name="reversed_period_name"
prompt="HLS.REVERSE_PERIOD"/> bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
<a:datePicker name="transaction_date" prompt="HLS.REVERSE_PERIOD"/>
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="收款日期"/> <a:datePicker name="transaction_date"
<a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="收款日期"/>
prompt="HLS.NOTE" width="300"/> <a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.NOTE" width="300"/>
</a:hBox>
<a:hBox>
<a:textArea name="note" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="备注" width="600"/>
</a:hBox>
</a:form> </a:form>
<a:grid id="csh_transaction_receipt_write_off_reverse_detail_grid_ds" <a:grid id="csh_transaction_receipt_write_off_reverse_detail_grid_ds"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_result_ds" marginHeight="170" bindTarget="csh_transaction_receipt_write_off_reverse_detail_result_ds" marginHeight="170"
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-6-3 上午10:39:00
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:view>
<a:link id="csh_transaction_write_off_reverse_link_id" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_write_off_reverse_new.lsc"/>
<!--<a:link id="csh514_write_off_reverse_link_id" model="csh.CSH514.csh_transaction_write_off_reverse" modelaction="batch_update"/>-->
<a:link id="csh514_write_off_reverse_link_id" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_write_off_reverse.lsc"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<script type="text/javascript"><![CDATA[
function csh514_write_off_reverse_return() {
$('${/parameter/@winId}').close();
}
]]></script>
<a:dataSets>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_detail_head_ds" model="csh.CSH510.csh_transaction_wfl_query" autoQuery="true"
queryUrl="${/request/@context_path}/autocrud/csh.CSH510.csh_transaction_wfl_query/query?transaction_wfl_id=${/parameter/@transaction_wfl_id}">
<a:fields>
<a:field name="reversed_date" readOnly="true"/>
<a:field name="reversed_period_name" readOnly="true"/>
<a:field name="transaction_date" readOnly="true"/>
<a:field name="description" readOnly="true"/>
<a:field name="note" readOnly="true"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_detail_result_ds" autoQuery="true" fetchAll="true"
model="csh.CSH510.csh_write_off_wfl_query" pageSize="15"
queryUrl="${/request/@context_path}/autocrud/csh.CSH510.csh_write_off_wfl_query/query?transaction_wfl_id=${/parameter/@transaction_wfl_id}"
selectable="true">
<a:fields>
<a:field name="due_date" datatype="java.util.Date"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:switch test="/parameter/@button_flag">
<a:case value="YES">
<a:screenTopToolbar>
<a:gridButton click="csh514_write_off_reverse_return" text="HLS.RETURN"/>
</a:screenTopToolbar>
</a:case>
</a:switch>
<!--<a:screenTopToolbar>
<a:gridButton click="csh514_write_off_reverse_return" text="HLS.RETURN"/>
</a:screenTopToolbar>-->
<a:form title="CSH514.CSH_WRITE_OFF_DETAIL">
<a:hBox>
<a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" renderer="Leaf.formatDate"
prompt="HLS.REVERSE_DATE"/>
<a:textField name="reversed_period_name"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.REVERSE_PERIOD"/>
<a:datePicker name="transaction_date"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" renderer="Leaf.formatDate" prompt="收款日期"/>
<a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.NOTE" width="300"/>
</a:hBox>
<a:hBox>
<a:textArea name="note" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="备注" width="600"/>
</a:hBox>
</a:form>
<a:grid id="csh_transaction_receipt_write_off_reverse_detail_grid_ds"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_result_ds" marginHeight="170"
marginWidth="50" navBar="true">
<a:columns>
<a:column name="write_off_type_name"/>
<a:column name="write_off_date" renderer="Leaf.formatDate"/>
<a:column name="csh_write_off_amount" renderer="Leaf.formatMoney"/>
<a:column name="cf_item_name" prompt="CSH513.CF_TYPE"/>
<a:column name="times" prompt="期数"/>
<a:column name="write_off_due_amount" renderer="Leaf.formatMoney"/>
<a:column name="write_off_principal" renderer="Leaf.formatMoney"/>
<a:column name="write_off_interest" renderer="Leaf.formatMoney"/>
<a:column name="due_date" align="center" prompt="CSH513.DUE_DATE" renderer="Leaf.formatDate"/>
<a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="150"/>
<a:column name="bp_name" prompt="CSH513.BP_TENANT"/>
<a:column name="gld_batch_id" prompt="核销批次号"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-insert model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
<batch-apply sourcePath="/parameter/details">
<a:model-update model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
</batch-apply>
<a:model-execute model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<a:link id="csh531n_submit_link_id" model="csh.CSH531N.csh_data_confirm" modelaction="execute"/> <a:link id="csh531n_submit_link_id" model="csh.CSH531N.csh_data_confirm" modelaction="execute"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="transaction_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="transaction_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="csh531n_submit_interface_link_id" model="csh.CSH531N.csh_write_off_interface" modelaction="batch_update"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
...@@ -527,9 +528,36 @@ ...@@ -527,9 +528,36 @@
function csh511_save_all() { function csh511_save_all() {
if (checkAmount()) { if (checkAmount()) {
$('csh_transaction_deposit_ds').submit(); var datas = [];
$('csh_transaction_advanced_ds').submit(); var para = {};
$('csh_write_off_interface_ds').submit(); var records = $('csh_write_off_interface_ds').getAll();
for (var i = 0;i < records.length;i++) {
para = records[i].data;
para['_status'] = 'update';
datas.push(para);
}
Leaf.request({
url: $('csh531n_submit_interface_link_id').getUrl(),
para: datas,
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
$('csh_transaction_deposit_ds').submit();
$('csh_transaction_advanced_ds').submit();
csh531_submitsuccess();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
csh531_submitfailed();
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
csh531_submitfailed();
},
scope: this
});
// $('csh_transaction_deposit_ds').submit();
// $('csh_transaction_advanced_ds').submit();
// $('csh_write_off_interface_ds').submit();
} }
} }
...@@ -662,7 +690,7 @@ ...@@ -662,7 +690,7 @@
return; return;
} }
Leaf.showConfirm('提示', '确认提交复核吗', function () { var createConfirm = Leaf.showConfirm('提示', '确认提交复核吗', function () {
$('csh531n_write_off_submit_btn_id').disable(); $('csh531n_write_off_submit_btn_id').disable();
csh511_save_all(); csh511_save_all();
}); });
...@@ -804,8 +832,8 @@ ...@@ -804,8 +832,8 @@
<a:event name="update" handler="csh531_update_fun"/> <a:event name="update" handler="csh531_update_fun"/>
<!-- <a:event name="beforesubmit" handler="csh531_beforesubmit_fun"/>--> <!-- <a:event name="beforesubmit" handler="csh531_beforesubmit_fun"/>-->
<a:event name="load" handler="csh531_load_fun"/> <a:event name="load" handler="csh531_load_fun"/>
<a:event name="submitsuccess" handler="csh531_submitsuccess"/> <!--<a:event name="submitsuccess" handler="csh531_submitsuccess"/>
<a:event name="submitfailed" handler="csh531_submitfailed"/> <a:event name="submitfailed" handler="csh531_submitfailed"/>-->
<a:event name="add" handler="csh531_add_fun"/> <a:event name="add" handler="csh531_add_fun"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
function cshdeposit102_transfer_submit() { function cshdeposit102_transfer_submit() {
if ($('deposit_transfer_detail_result_ds').validate()) { 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 deposit_records = $('deposit_transfer_detail_result_ds').getAll();
var param = {}; var param = {};
var saveData = []; var saveData = [];
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
function on_csh_trx_deposit_write_off_update(ds, record, name, value, oldvalue) { function on_csh_trx_deposit_write_off_update(ds, record, name, value, oldvalue) {
debugger; 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")); var unwrite_off_amount = get_current_amount(head_record.get("unwrite_off_amount"));
if (name == 'deposit_amount') { if (name == 'deposit_amount') {
if ((!Ext.isEmpty(value) || !Ext.isEmpty(oldvalue)) && value != oldvalue) { if ((!Ext.isEmpty(value) || !Ext.isEmpty(oldvalue)) && value != oldvalue) {
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
debugger; debugger;
var selected = [].concat(ds.getSelected()); 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')), var change_value = get_current_amount(record.get('deposit_amount')),
current_apply_amount = get_current_amount(head_record.get('current_apply_amount')); current_apply_amount = get_current_amount(head_record.get('current_apply_amount'));
// setTimeout(function () { // 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 @@ ...@@ -35,6 +35,19 @@
<a:link id="main_link" url="${/request/@context_path}/welcome.lview"/> <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="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_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[ <script><![CDATA[
//HLS801.NEXT_STEP //HLS801.NEXT_STEP
var step = 0; var step = 0;
...@@ -43,13 +56,14 @@ ...@@ -43,13 +56,14 @@
//alert('${/model/sys_role_path/record/@role_code}'); //alert('${/model/sys_role_path/record/@role_code}');
$L.onReady(function () { $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}', '您暂无权限查看!'); var win = $L.showInfoMessage('${l:PROMPT}', '您暂无权限查看!');
win.on('close', function() { win.on('close', function () {
history.back(); history.back();
}); });
} }
}); });
function nextStep() { function nextStep() {
var stepTabPanel = $('step'); var stepTabPanel = $('step');
step = step + 1; step = step + 1;
...@@ -440,10 +454,10 @@ ...@@ -440,10 +454,10 @@
$L.request({ $L.request({
url: $('csh_current_period_link').getUrl(), url: $('csh_current_period_link').getUrl(),
para: { para: {
csh_date : record.get('period_name'), csh_date: record.get('period_name'),
role_flag : role_flag role_flag: role_flag
}, },
success: function(args) { success: function (args) {
/*$L.SideBar.show({ /*$L.SideBar.show({
msg: '操作成功', msg: '操作成功',
duration: 2000 duration: 2000
...@@ -479,10 +493,10 @@ ...@@ -479,10 +493,10 @@
scope: this scope: this
}); });
}, },
failure: function() { failure: function () {
$L.Masker.unmask(Ext.getBody()); $L.Masker.unmask(Ext.getBody());
}, },
error: function() { error: function () {
$L.Masker.unmask(Ext.getBody()); $L.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this
...@@ -538,10 +552,10 @@ ...@@ -538,10 +552,10 @@
} }
function csh_onload(ds) { 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(); var records = $(ds.id).getAll();
records.forEach(function (v, i) { 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); v.getField('ref_v04').setReadOnly(true);
} }
}); });
...@@ -549,34 +563,42 @@ ...@@ -549,34 +563,42 @@
} }
function csh_transaction_confirm() { function csh_transaction_confirm() {
debugger;
var role_flag = '${/model/sys_role_path/record/@role_code}'; var role_flag = '${/model/sys_role_path/record/@role_code}';
var record = $('csh_transaction_confirm_ds').getSelected()[0]; var record = $('csh_transaction_confirm_ds').getSelected()[0];
if(role_flag == 'NO'){ if (role_flag == 'NO') {
if(record.get('csh_confirm_flag') == 'Y'){ if (record.get('csh_confirm_flag') == 'Y') {
$L.showMessage('提示','该月收款已确认,无需再次确认'); $L.showMessage('提示', '该月收款已确认,无需再次确认');
return; return;
} }
$L.showConfirm('提示', '是否进行月结确认?', function() { $L.showConfirm('提示', '是否进行月结确认?', function () {
$L.Masker.mask(Ext.getBody(), '正在确认......'); $L.Masker.mask(Ext.getBody(), '正在确认......');
$L.request({ $L.request({
url: $('csh_current_period_link').getUrl(), url: $('csh_current_period_link').getUrl(),
para: { para: {
ref_v04 : record.get('ref_v04'), ref_v04: record.get('ref_v04'),
csh_date : record.get('csh_date'), csh_date: record.get('csh_date'),
role_flag : role_flag role_flag: role_flag
}, },
success: function(args) { success: function (args) {
$L.SideBar.show({ debugger;
msg: '已确认',
duration: 2000
});
$('csh_transaction_confirm_ds').query();
$L.Masker.unmask(Ext.getBody()); $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();
}
}, },
failure: function() { failure: function () {
$L.Masker.unmask(Ext.getBody()); $L.Masker.unmask(Ext.getBody());
}, },
error: function() { error: function () {
$L.Masker.unmask(Ext.getBody()); $L.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this
...@@ -584,12 +606,34 @@ ...@@ -584,12 +606,34 @@
}); });
} }
if(role_flag == 'YES'){ if (role_flag == 'YES') {
if(record.get('csh_confirm_flag') == 'N'){ if (record.get('csh_confirm_flag') == 'N') {
$L.showMessage('提示','请先进行营业确认'); $L.showMessage('提示', '请先进行营业确认');
return; return;
} }
set_value_for_next_step(record.get('csh_date')); $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.showConfirm('提示', '是否确认下一步?', function() {
$L.Masker.mask(Ext.getBody(), '正在执行......'); $L.Masker.mask(Ext.getBody(), '正在执行......');
$L.request({ $L.request({
...@@ -627,10 +671,12 @@ ...@@ -627,10 +671,12 @@
record.set('period_name', value); record.set('period_name', value);
nextStep(); nextStep();
} }
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/> <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"> queryUrl="${/request/@context_path}/autocrud/hls.HLS801.csh_current_period_query/query">
<a:fields> <a:fields>
<a:field name="csh_date" readOnly="true"/> <a:field name="csh_date" readOnly="true"/>
...@@ -736,7 +782,8 @@ ...@@ -736,7 +782,8 @@
<a:hBox> <a:hBox>
<a:tabPanel id="step" marginHeight="80" marginWidth="50"> <a:tabPanel id="step" marginHeight="80" marginWidth="50">
<a:tabs> <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:hBox height="50">
<!--<a:button click="upStep" text="HLS801.LAST_STEP"/>--> <!--<a:button click="upStep" text="HLS801.LAST_STEP"/>-->
<!--<a:label width="5"/> <!--<a:label width="5"/>
...@@ -753,7 +800,8 @@ ...@@ -753,7 +800,8 @@
<!--<a:button click="unearned_finance_income_query" <!--<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 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"/> type="excel"/>
</a:toolBar> </a:toolBar>
<a:columns> <a:columns>
...@@ -762,7 +810,8 @@ ...@@ -762,7 +810,8 @@
<a:column name="csh_not" prompt="未核销收款数" width="120" align="center"/> <a:column name="csh_not" prompt="未核销收款数" width="120" align="center"/>
<a:column name="csh_partial" 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="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:columns>
<a:editors> <a:editors>
<a:textArea id="csh_area_id"/> <a:textArea id="csh_area_id"/>
...@@ -778,7 +827,8 @@ ...@@ -778,7 +827,8 @@
<a:hBox> <a:hBox>
<a:tabPanel id="step" marginHeight="80" marginWidth="50"> <a:tabPanel id="step" marginHeight="80" marginWidth="50">
<a:tabs> <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:hBox height="50">
<a:button disabled="true" click="upStep" text="HLS801.LAST_STEP"/> <a:button disabled="true" click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/> <a:label width="5"/>
...@@ -791,7 +841,8 @@ ...@@ -791,7 +841,8 @@
<!--<a:button click="unearned_finance_income_query" <!--<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 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"/> type="excel"/>
</a:toolBar> </a:toolBar>
<a:columns> <a:columns>
...@@ -800,11 +851,12 @@ ...@@ -800,11 +851,12 @@
<a:column name="csh_not" prompt="未核销收款数" width="120" align="center"/> <a:column name="csh_not" prompt="未核销收款数" width="120" align="center"/>
<a:column name="csh_partial" 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="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:columns>
<a:editors> <a:editors>
<a:textArea id="csh_area_id" readOnly="true"/> <a:textArea id="csh_area_id" readOnly="true"/>
<a:checkBox id="csh_check_id" /> <a:checkBox id="csh_check_id"/>
</a:editors> </a:editors>
</a:grid> </a:grid>
</a:tab> </a:tab>
...@@ -820,12 +872,14 @@ ...@@ -820,12 +872,14 @@
<a:fieldSet height="250" title="GLD_PERIODS.PERIOD_NAME" width="300"> <a:fieldSet height="250" title="GLD_PERIODS.PERIOD_NAME" width="300">
<a:lov name="period_name" bindTarget="hls_monthly_statement_ds" <a:lov name="period_name" bindTarget="hls_monthly_statement_ds"
prompt="GLD_PERIODS.PERIOD_NAME" width="200"/> 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"/> width="200"/>
</a:fieldSet> </a:fieldSet>
</a:hBox> </a:hBox>
</a:tab> </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"> width="100">
<a:hBox height="50"> <a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/> <a:button click="upStep" text="HLS801.LAST_STEP"/>
...@@ -848,7 +902,8 @@ ...@@ -848,7 +902,8 @@
<!-- <a:textField name="day" bindTarget="unearned_finance_income_query_ds" prompt="日" readOnly="true"/> --> <!-- <a:textField name="day" bindTarget="unearned_finance_income_query_ds" prompt="日" readOnly="true"/> -->
<a:lov name="company_code" bindTarget="unearned_finance_income_query_ds" <a:lov name="company_code" bindTarget="unearned_finance_income_query_ds"
prompt="HLS.COMPANY_CODE"/> 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"/> prompt="HLS.COMPANY_NAME" readOnly="true"/>
<a:comboBox name="finance_income_recognized" <a:comboBox name="finance_income_recognized"
bindTarget="unearned_finance_income_query_ds" prompt="是否确认"/> bindTarget="unearned_finance_income_query_ds" prompt="是否确认"/>
...@@ -859,9 +914,11 @@ ...@@ -859,9 +914,11 @@
marginHeight="300" marginWidth="80" navBar="true" style="margin-left:3px"> marginHeight="300" marginWidth="80" navBar="true" style="margin-left:3px">
<a:toolBar> <a:toolBar>
<a:button click="unearned_finance_income_query" <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 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"/> type="excel"/>
</a:toolBar> </a:toolBar>
<a:columns> <a:columns>
...@@ -879,9 +936,11 @@ ...@@ -879,9 +936,11 @@
<a:column name="int_rate_implicit" align="right" prompt="HLS801.INT_RATE" <a:column name="int_rate_implicit" align="right" prompt="HLS801.INT_RATE"
renderer="ratePercentRender" width="70"/> renderer="ratePercentRender" width="70"/>
<a:column name="calc_period" prompt="HLS801.CALC_PERIOD" width="150"/> <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" <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"/> width="110"/>
<a:column name="adjustvat" align="right" <a:column name="adjustvat" align="right"
prompt="税改16%调整额" renderer="Leaf.formatMoney" prompt="税改16%调整额" renderer="Leaf.formatMoney"
...@@ -891,15 +950,18 @@ ...@@ -891,15 +950,18 @@
width="110"/> width="110"/>
<a:column name="unearned_finance_income" align="right" <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"/> 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"/> width="80"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:tab> </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:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/> <a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/> <a:label width="5"/>
...@@ -916,28 +978,35 @@ ...@@ -916,28 +978,35 @@
</a:box> </a:box>
</a:form> </a:form>
</a:tab> </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:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/> <a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/> <a:label width="5"/>
<a:button disabled="true" text="HLS801.NEXT_STEP"/> <a:button disabled="true" text="HLS801.NEXT_STEP"/>
<a:label width="50"/> <a:label width="50"/>
</a:hBox> </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:columns>
<a:column name="period_year" align="center" prompt="GLD_PERIODS.PERIOD_YEAR" <a:column name="period_year" align="center" prompt="GLD_PERIODS.PERIOD_YEAR"
sortable="true" width="100"/> sortable="true" width="100"/>
<a:column name="period_num" align="center" <a:column name="period_num" align="center"
prompt="FND_DIMENSIONS.DIMENSION_SEQUENCE" sortable="true" width="80"/> prompt="FND_DIMENSIONS.DIMENSION_SEQUENCE" sortable="true"
<a:column name="start_date_c" align="center" prompt="GLD_EXCHANGE_RATE.START_DATE" width="80"/>
<a:column name="start_date_c" align="center"
prompt="GLD_EXCHANGE_RATE.START_DATE"
sortable="true" width="150"/> 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"/> 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"/> sortable="true" width="80"/>
<a:column name="period_name" align="center" prompt="GLD_PERIODS.PERIOD_NAME" <a:column name="period_name" align="center" prompt="GLD_PERIODS.PERIOD_NAME"
sortable="true" width="120"/> 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"/> width="100"/>
<a:column name="period_status_code" align="center" <a:column name="period_status_code" align="center"
prompt="GLD_PERIOD_STATUS.PERIOD_STATUS" renderer="statusRenderer" prompt="GLD_PERIOD_STATUS.PERIOD_STATUS" renderer="statusRenderer"
......
...@@ -1022,7 +1022,8 @@ ...@@ -1022,7 +1022,8 @@
if (bp_tenant_detail_r) { if (bp_tenant_detail_r) {
for (var key in bp_tenant_detail_r.data) { 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 (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("提示", "承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!"); Leaf.showInfoMessage("提示", "承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!");
return; return;
} }
...@@ -1144,7 +1145,8 @@ ...@@ -1144,7 +1145,8 @@
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) { if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) { 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 (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("提示", "承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!"); Leaf.showInfoMessage("提示", "承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!");
bp_rate_flag = false; bp_rate_flag = false;
break; break;
......
...@@ -305,7 +305,8 @@ ...@@ -305,7 +305,8 @@
if (bp_tenant_detail_r && ds.id == prj_project_ds_id) { if (bp_tenant_detail_r && ds.id == prj_project_ds_id) {
for (var key in bp_tenant_detail_r.data) { 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 (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("提示","承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!"); Leaf.showInfoMessage("提示","承租人评分信息区域的所有字段,除\"第三方信用度\"外,其他都为必输字段,请填写!");
bp_rate_flag = false; bp_rate_flag = false;
break; break;
......
<?xml version="1.0" encoding="UTF-8"?> <?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:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure> <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"/> <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:excel-report enableTask="false" filename="${/parameter/@file_name}">
<dr:styles> <dr:styles>
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
</dr:cell-style> </dr:cell-style>
</dr:styles> </dr:styles>
<dr:sheets> <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: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="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="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
...@@ -108,7 +109,187 @@ ...@@ -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="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="CH" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_28}"/>
</dr:static-content> </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:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/> <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="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
......
<?xml version="1.0" encoding="UTF-8"?> <?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:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure> <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"/> <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:excel-report enableTask="false" filename="${/parameter/@file_name}">
<dr:styles> <dr:styles>
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
</dr:cell-style> </dr:cell-style>
</dr:styles> </dr:styles>
<dr:sheets> <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: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="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="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
...@@ -111,7 +112,193 @@ ...@@ -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="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="CK" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_29}"/>
</dr:static-content> </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:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/> <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="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
......
<?xml version="1.0" encoding="UTF-8"?> <?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:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure> <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"/> <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:excel-report enableTask="false" filename="${/parameter/@file_name}">
<dr:styles> <dr:styles>
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
</dr:cell-style> </dr:cell-style>
</dr:styles> </dr:styles>
<dr:sheets> <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: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="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="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
...@@ -114,7 +115,199 @@ ...@@ -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="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="CN" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_30}"/>
</dr:static-content> </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:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/> <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="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
......
<?xml version="1.0" encoding="UTF-8"?> <?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:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure> <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"/> <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:excel-report enableTask="false" filename="${/parameter/@file_name}">
<dr:styles> <dr:styles>
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
</dr:cell-style> </dr:cell-style>
</dr:styles> </dr:styles>
<dr:sheets> <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: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="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="B" offset="false" row="1" styleName="cell3" type="content" value="合同编号"/>
...@@ -117,7 +118,205 @@ ...@@ -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="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:cell-data cell="CQ" offset="false" row="1" styleName="cell3" type="content" value="${/model/day/record/@day_31}"/>
</dr:static-content> </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:columns>
<dr:table-column cellStyle="cell1" field="tenant_name" title="" titlestyle="header" type="content"/> <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="cell1" field="contract_number" title="" titlestyle="header" type="content"/>
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/> <a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
<a:column name="contract_number" align="center" prompt="合同编号" width="100"/> <a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
<a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/> <a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
<a:column name="is_buyout_n" align="center" prompt="是否买断机" width="100"/>
<a:column name="modelcd" align="center" prompt=" 机型" width="180"/> <a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="80"/> <a:column name="machine_number" align="center" prompt="机器号码" width="80"/>
<a:column name="int_rate_display" align="center" prompt="利率" width="80"/> <a:column name="int_rate_display" align="center" prompt="利率" width="80"/>
...@@ -59,6 +60,7 @@ ...@@ -59,6 +60,7 @@
<a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/> <a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
<a:column name="contract_number" align="center" prompt="合同编号" width="100"/> <a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
<a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/> <a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
<a:column name="is_buyout_n" align="center" prompt="是否买断机" width="100"/>
<a:column name="modelcd" align="center" prompt=" 机型" width="180"/> <a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="80"/> <a:column name="machine_number" align="center" prompt="机器号码" width="80"/>
<a:column name="int_rate_display" align="center" prompt="利率" width="80"/> <a:column name="int_rate_display" align="center" prompt="利率" width="80"/>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<a:model-query fetchAll="true" model="sys.SYS999.fnd_transfer_table" rootPath="gerneral_cols"/> <a:model-query fetchAll="true" model="sys.SYS999.fnd_transfer_table" rootPath="gerneral_cols"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<script type="text/javascript"><![CDATA[ <script><![CDATA[
/* window['${/parameter/@sheet_name}_indexchange_fun'] = function(ds,record){ /* window['${/parameter/@sheet_name}_indexchange_fun'] = function(ds,record){
var line_id = record.get('line_id'); var line_id = record.get('line_id');
$('general_error_mes_ds').setQueryParameter('line_id',line_id); $('general_error_mes_ds').setQueryParameter('line_id',line_id);
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="import_detail_link" url="${/request/@context_path}/modules/sys/SYS999/general_import_detail.lview"/> <a:link id="import_detail_link" url="${/request/@context_path}/modules/sys/SYS999/general_import_detail.lview"/>
<script type="text/javascript"><![CDATA[ <script><![CDATA[
Leaf.post($('import_detail_link').getUrl()+'?header_id=${/parameter/@header_id}'); Leaf.post($('import_detail_link').getUrl()+'?header_id=${/parameter/@header_id}&_csrf=${/session/@_csrf.token}');
]]></script> ]]></script>
</a:view> </a:view>
</a:screen> </a:screen>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<a:view> <a:view>
<a:link id="general_confirm" model="sys.SYS999.main" modelaction="execute"/> <a:link id="general_confirm" model="sys.SYS999.main" modelaction="execute"/>
<a:link id="general_import_upload_link" url="${/request/@context_path}/modules/sys/SYS999/general_upload.lview"/> <a:link id="general_import_upload_link" url="${/request/@context_path}/modules/sys/SYS999/general_upload.lview"/>
<script type="text/javascript"><![CDATA[ <script><![CDATA[
var general_ds_list = []; //用于存放所有被加载的ds_id var general_ds_list = []; //用于存放所有被加载的ds_id
function load_all_ds_list() {//加载所有的已打开的tab_ds function load_all_ds_list() {//加载所有的已打开的tab_ds
...@@ -81,8 +81,25 @@ ...@@ -81,8 +81,25 @@
$(ds_id).submit(); $(ds_id).submit();
} }
} }
function display_query(){
var err_flag= $('sy999_query_ds').getAt(0).get('err_flag');
for (var i = 0;i < general_ds_list.length;i++) {
var ds_id = general_ds_list[i].ds_id;
if (err_flag =='Y'){
$(ds_id).setQueryParameter('err_flag',err_flag);
}else{
$(ds_id).setQueryParameter('err_flag',null);
}
$(ds_id).query();
}
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="sy999_query_ds" autoCreate="true">
<a:fields>
<a:field name="err_flag" checkedValue="Y" uncheckedValue="N"/>
</a:fields>
</a:dataSet>
<a:dataSet id="general_error_mes_ds" model="sys.SYS999.fnd_interface_log"/> <a:dataSet id="general_error_mes_ds" model="sys.SYS999.fnd_interface_log"/>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
...@@ -92,6 +109,13 @@ ...@@ -92,6 +109,13 @@
<a:gridButton click="general_save" text="保存"/> <a:gridButton click="general_save" text="保存"/>
<a:gridButton click="general_execute" text="确认数据"/> <a:gridButton click="general_execute" text="确认数据"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:hBox>
<a:checkBox name="err_flag" bindTarget="sy999_query_ds" prompt="只显示错误">
<a:events>
<a:event name="change" handler="display_query"/>
</a:events>
</a:checkBox>
</a:hBox>
<a:tabPanel id="general_detail_tabpanel_id" marginHeight="300" marginWidth="50"> <a:tabPanel id="general_detail_tabpanel_id" marginHeight="300" marginWidth="50">
<a:tabs> <a:tabs>
<a:placeHolder id="dynamic_tab"/> <a:placeHolder id="dynamic_tab"/>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<a:init-procedure/> <a:init-procedure/>
<a:view> <a:view>
<a:link id="general_upload_excel_control_link" url="${/request/@context_path}/modules/sys/SYS999/general_excel_execute.lview"/> <a:link id="general_upload_excel_control_link" url="${/request/@context_path}/modules/sys/SYS999/general_excel_execute.lview"/>
<script type="text/javascript"><![CDATA[ <script><![CDATA[
function saveClick() { function saveClick() {
if (document.getElementById('general_importFile').value) { if (document.getElementById('general_importFile').value) {
var fileName = document.getElementById('general_importFile').value; var fileName = document.getElementById('general_importFile').value;
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
if (fileType != '.xls' && fileType != '.xlsx') { if (fileType != '.xls' && fileType != '.xlsx') {
alert('请选择正确的导入文件!'); alert('请选择正确的导入文件!');
} else { } else {
var detail_mask = $('upload_window').wrap;
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
document.getElementById('general_importForm').submit(); document.getElementById('general_importForm').submit();
} }
} }
...@@ -34,7 +36,7 @@ ...@@ -34,7 +36,7 @@
<a:label name="label6" bindTarget="csh713_label_ds" style="margin-left:10px;" width="380"/> <a:label name="label6" bindTarget="csh713_label_ds" style="margin-left:10px;" width="380"/>
</a:fieldSet> </a:fieldSet>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400"> <a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400">
<form name="upload" id="general_importForm" action="general_excel_execute.lview" enctype="multipart/form-data" method="post"> <form name="upload" id="general_importForm" action="general_excel_execute.lview?_csrf=${/session/@_csrf.token}" enctype="multipart/form-data" method="post">
<input name="CONTENT" id="general_importFile" style="margin-bottom:4px;width:250px;height:22px;" type="file"/> <input name="CONTENT" id="general_importFile" style="margin-bottom:4px;width:250px;height:22px;" type="file"/>
<input onclick="saveClick()" style="margin-left:10px;margin-top:10px;width:60px;" type="button" value="导入"/> <input onclick="saveClick()" style="margin-left:10px;margin-top:10px;width:60px;" type="button" value="导入"/>
</form> </form>
......
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