注释项目中报错代码
This commit is contained in:
parent
135dca7e2e
commit
5d37e41992
@ -46,36 +46,36 @@ public class CarEvenInterestExecutor extends FundRentPlanExecutor {
|
||||
|
||||
|
||||
public void rentPlanEvenInterestCal(ConditionBean cb, FundRentPlanBean frpb, TabCalBean tcb) throws Exception {
|
||||
PlanDateServiceImpl pdsi= new PlanDateServiceImpl(tx);
|
||||
//先找到总本金值
|
||||
String leaseMoney = cb.getCleanLeaseMoney();
|
||||
initShareAndRetainage(tcb, cb);//初始化分摊本金与尾款
|
||||
List<String> interest = new InterestCalServiceImpl().getInterestList(leaseMoney, cb.getLeaseTerm(), cb.getIncomeNumber() + cb.getGrace(), cb.getEquipEndValue(), cb.getYearRate());
|
||||
List<String> corpus = new CorpusServiceImpl().getCorpusListWithZL(cb.getCleanLeaseMoney(), cb.getIncomeNumber(), cb.getEquipEndValue(), cb.getGrace(), cb.getShare(),cb.getRetainage());
|
||||
List<String> rentList = new RentalServiceImpl().getRentListByCond(cb.getCleanLeaseMoney(), cb.getEquipEndValue(), corpus, interest,cb);
|
||||
List<String> dateList =pdsi.getPlanDateList(cb, String.valueOf(frpb.getRentList().size()));
|
||||
List<String> interestDateList=pdsi.getInterestDateList(cb);
|
||||
|
||||
//节假日调整
|
||||
dateList=pdsi.getAdjustDate(dateList,cb.getPlanDateHoilday());
|
||||
interestDateList=pdsi.getAdjustDate(interestDateList, cb.getInterestDateHoliday());
|
||||
|
||||
if("start_date".equals(cb.getInterestDayType())){
|
||||
interestDateList=dateList;
|
||||
}
|
||||
|
||||
frpb.setInterestDateList(interestDateList);
|
||||
frpb.setPlanDateList(dateList);
|
||||
frpb.setColumn_1(corpus);
|
||||
frpb.setColumn_2(interest);
|
||||
frpb.setRentList(rentList);
|
||||
|
||||
List<String> rentListTemp = rentList;
|
||||
List<String> rentRemainList = new RentalServiceImpl().getRentRemainList(rentListTemp);
|
||||
frpb.setAllRemainRentList(rentRemainList);
|
||||
|
||||
String irr = IrrTools.getIRRByEvenInterest(cb, frpb);//获取均息法下的利率
|
||||
cb.setYearRate(irr);
|
||||
// PlanDateServiceImpl pdsi= new PlanDateServiceImpl(tx);
|
||||
// //先找到总本金值
|
||||
// String leaseMoney = cb.getCleanLeaseMoney();
|
||||
// initShareAndRetainage(tcb, cb);//初始化分摊本金与尾款
|
||||
// List<String> interest = new InterestCalServiceImpl().getInterestList(leaseMoney, cb.getLeaseTerm(), cb.getIncomeNumber() + cb.getGrace(), cb.getEquipEndValue(), cb.getYearRate());
|
||||
// List<String> corpus = new CorpusServiceImpl().getCorpusListWithZL(cb.getCleanLeaseMoney(), cb.getIncomeNumber(), cb.getEquipEndValue(), cb.getGrace(), cb.getShare(),cb.getRetainage());
|
||||
// List<String> rentList = new RentalServiceImpl().getRentListByCond(cb.getCleanLeaseMoney(), cb.getEquipEndValue(), corpus, interest,cb);
|
||||
// List<String> dateList =pdsi.getPlanDateList(cb, String.valueOf(frpb.getRentList().size()));
|
||||
// List<String> interestDateList=pdsi.getInterestDateList(cb);
|
||||
//
|
||||
// //节假日调整
|
||||
// dateList=pdsi.getAdjustDate(dateList,cb.getPlanDateHoilday());
|
||||
// interestDateList=pdsi.getAdjustDate(interestDateList, cb.getInterestDateHoliday());
|
||||
//
|
||||
// if("start_date".equals(cb.getInterestDayType())){
|
||||
// interestDateList=dateList;
|
||||
// }
|
||||
//
|
||||
// frpb.setInterestDateList(interestDateList);
|
||||
// frpb.setPlanDateList(dateList);
|
||||
// frpb.setColumn_1(corpus);
|
||||
// frpb.setColumn_2(interest);
|
||||
// frpb.setRentList(rentList);
|
||||
//
|
||||
// List<String> rentListTemp = rentList;
|
||||
// List<String> rentRemainList = new RentalServiceImpl().getRentRemainList(rentListTemp);
|
||||
// frpb.setAllRemainRentList(rentRemainList);
|
||||
//
|
||||
// String irr = IrrTools.getIRRByEvenInterest(cb, frpb);//获取均息法下的利率
|
||||
// cb.setYearRate(irr);
|
||||
}
|
||||
|
||||
public void calFina(ConditionBean cb, TabCalBean tcb, int startList, FundRentPlanBean frpb) throws Exception {
|
||||
|
||||
@ -5,7 +5,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import jbo.app.CUSTOMER_BELONG;
|
||||
import jbo.customer.CUSTOMER_TRANSFER;
|
||||
//import jbo.customer.CUSTOMER_TRANSFER;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -65,7 +65,7 @@ public class CheckRolesAction {
|
||||
df=new SimpleDateFormat("yyyy/MM/dd");
|
||||
date=df.format(sysDate);
|
||||
int result = 0;
|
||||
BizObjectManager bomcl = JBOFactory.getBizObjectManager(CUSTOMER_TRANSFER.CLASS_NAME);
|
||||
BizObjectManager bomcl = JBOFactory.getBizObjectManager("CUSTOMER_TRANSFER.CLASS_NAME");
|
||||
tx.join(bomcl);
|
||||
BizObject bocl = bomcl.createQuery("SELECT maintaintime FROM o where transfertype='20' and RECEIVEUSERID=:RECEIVEUSERID and CUSTOMERID=:CUSTOMERID")
|
||||
.setParameter("CUSTOMERID", customerid)
|
||||
|
||||
@ -111,7 +111,7 @@ public class CustomerHelper{
|
||||
if(sCertIDEnt == null) sCertIDEnt = "";
|
||||
}
|
||||
//取到客户个人信息
|
||||
BizObjectManager bomii = JBOFactory.getBizObjectManager(IND_INFO.CLASS_NAME);
|
||||
BizObjectManager bomii = JBOFactory.getBizObjectManager("IND_INFO.CLASS_NAME");
|
||||
tx.join(bomii);
|
||||
|
||||
//取到公司信息
|
||||
@ -252,7 +252,7 @@ public class CustomerHelper{
|
||||
BizObjectManager bomci = JBOFactory.getBizObjectManager(CUSTOMER_INFO.CLASS_NAME);
|
||||
tx.join(bomci);
|
||||
//取到客户个人信息
|
||||
BizObjectManager bomii = JBOFactory.getBizObjectManager(IND_INFO.CLASS_NAME);
|
||||
BizObjectManager bomii = JBOFactory.getBizObjectManager("IND_INFO.CLASS_NAME");
|
||||
tx.join(bomii);
|
||||
//取到公司信息
|
||||
BizObjectManager bomei = JBOFactory.getBizObjectManager(ENT_INFO.CLASS_NAME);
|
||||
@ -505,7 +505,7 @@ public class CustomerHelper{
|
||||
belongAttribute[i] = attribute[i];
|
||||
}
|
||||
//检查客户是否与当前用户 建立关联了,如果已建立,则不用再建立其他关联了
|
||||
BizObjectManager bomcb = JBOFactory.getBizObjectManager(CUSTOMER_BELONG.CLASS_NAME);
|
||||
BizObjectManager bomcb = JBOFactory.getBizObjectManager("CUSTOMER_BELONG.CLASS_NAME");
|
||||
tx.join(bomcb);
|
||||
BizObject bocb= bomcb.createQuery(" select UserID from o "+
|
||||
" where CustomerID =:CustomerID and UserID=:UserID")
|
||||
@ -543,7 +543,7 @@ public class CustomerHelper{
|
||||
*/
|
||||
public static BizObject getCustomerBelong(String sCustomerID, ASUser curUser) throws Exception{
|
||||
|
||||
BizObjectManager bomcb= JBOFactory.getBizObjectManager(CUSTOMER_BELONG.CLASS_NAME);
|
||||
BizObjectManager bomcb= JBOFactory.getBizObjectManager("CUSTOMER_BELONG.CLASS_NAME");
|
||||
BizObject bocb = bomcb.createQuery(" select BelongAttribute,BelongAttribute1,BelongAttribute2 " +
|
||||
" from o " +
|
||||
" where CustomerID=:CustomerID and UserID=:UserID and OrgID=:OrgID")
|
||||
@ -617,7 +617,7 @@ public class CustomerHelper{
|
||||
public static String selectInputUser(String serialno) throws JBOException{
|
||||
|
||||
String tmp = "";
|
||||
BizObjectManager bombi = JBOFactory.getBizObjectManager(BUILDING_INFO.CLASS_NAME);
|
||||
BizObjectManager bombi = JBOFactory.getBizObjectManager("BUILDING_INFO.CLASS_NAME");
|
||||
BizObject bobi = bombi.createQuery("select InputUser from O where Serialno =:Serialno")
|
||||
.setParameter("Serialno", serialno).getSingleResult(true);
|
||||
if(bobi != null){
|
||||
@ -632,7 +632,7 @@ public class CustomerHelper{
|
||||
*/
|
||||
public static int getCustomerRightCount(String customerID,String sortNo) throws JBOException{
|
||||
int res = 0;
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_BELONG.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("CUSTOMER_BELONG.CLASS_NAME");
|
||||
BizObject bo = bom.createQuery(" select Count(*) as v.cnt from o where CustomerID = :CustomerID and OrgID "
|
||||
+ "in (select org.orgid from jbo.sys.ORG_INFO org where org.sortno like :SortNo) and (o.BelongAttribute1 = '1' or o.BelongAttribute2 = '1') ")
|
||||
.setParameter("CustomerID", customerID)
|
||||
@ -920,7 +920,7 @@ public class CustomerHelper{
|
||||
|
||||
String []tmp = new String[3];
|
||||
String sPara = customerId+","+UserId+","+orgId;
|
||||
BizObject bo = JBOHelper.getBizObjectByCondition(CUSTOMER_BELONG.CLASS_NAME,"O", "CustomerID=:CustomerID and UserID=:UserID and OrgID=:OrgID", sPara);
|
||||
BizObject bo = JBOHelper.getBizObjectByCondition("CUSTOMER_BELONG.CLASS_NAME","O", "CustomerID=:CustomerID and UserID=:UserID and OrgID=:OrgID", sPara);
|
||||
if(bo != null){
|
||||
tmp[0] = bo.getAttribute("BelongAttribute").toString();
|
||||
tmp[1] = bo.getAttribute("BelongAttribute1").toString();
|
||||
@ -1271,7 +1271,7 @@ public class CustomerHelper{
|
||||
*/
|
||||
public static String getProjectType(String projectNo) throws JBOException {
|
||||
String projectType = "";
|
||||
BizObjectManager bompi = JBOFactory.getBizObjectManager(PROJECT_INFO.CLASS_NAME);
|
||||
BizObjectManager bompi = JBOFactory.getBizObjectManager("PROJECT_INFO.CLASS_NAME");
|
||||
BizObject bopi = bompi.createQuery("select ProjectType from o where ProjectNo=:ProjectNo")
|
||||
.setParameter("ProjectNo",projectNo).getSingleResult(true);
|
||||
if(bopi != null){
|
||||
@ -1287,7 +1287,7 @@ public class CustomerHelper{
|
||||
*/
|
||||
public static String getPlanTotalCast(String projectNo) throws JBOException {
|
||||
String planTotalCast = "";
|
||||
BizObjectManager bompi = JBOFactory.getBizObjectManager(PROJECT_INFO.CLASS_NAME);
|
||||
BizObjectManager bompi = JBOFactory.getBizObjectManager("PROJECT_INFO.CLASS_NAME");
|
||||
BizObject bopi = bompi.createQuery("select PlanTotalCast from o where ProjectNo=:ProjectNo")
|
||||
.setParameter("ProjectNo",projectNo).getSingleResult(true);
|
||||
if(bopi != null){
|
||||
@ -1303,7 +1303,7 @@ public class CustomerHelper{
|
||||
*/
|
||||
public static String getCapitalScale(String projectNo) throws JBOException {
|
||||
String capitalScale = "";
|
||||
BizObjectManager bompi = JBOFactory.getBizObjectManager(PROJECT_INFO.CLASS_NAME);
|
||||
BizObjectManager bompi = JBOFactory.getBizObjectManager("PROJECT_INFO.CLASS_NAME");
|
||||
BizObject bopi = bompi.createQuery("select CapitalScale from o where ProjectNo=:ProjectNo")
|
||||
.setParameter("ProjectNo",projectNo).getSingleResult(true);
|
||||
if(bopi != null){
|
||||
|
||||
@ -3,7 +3,7 @@ package com.amarsoft.app.als.customer.common.action;
|
||||
import jbo.app.CUSTOMER_ATTRIBUTION;
|
||||
import jbo.app.ENT_INFO;
|
||||
import jbo.app.IND_INFO;
|
||||
import jbo.customer.CUSTOMER_CERT;
|
||||
//import jbo.customer.CUSTOMER_CERT;
|
||||
|
||||
import com.amarsoft.app.lc.LCConstant;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.amarsoft.app.als.customer.common.action;
|
||||
|
||||
import jbo.customer.CUSTOMER_IMPORT_LOG;
|
||||
//import jbo.customer.CUSTOMER_IMPORT_LOG;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -30,7 +30,7 @@ public class CustomerBelongChangeLog {
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void createManageChangeLog(JBOTransaction tx,String customerID,String userID,String orgID) throws JBOException{
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_IMPORT_LOG.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("CUSTOMER_IMPORT_LOG.CLASS_NAME");
|
||||
if(tx != null) tx.join(bom);
|
||||
BizObject biz = bom.newObject();
|
||||
biz.setAttributeValue("CustomerID", customerID);
|
||||
@ -55,7 +55,7 @@ public class CustomerBelongChangeLog {
|
||||
*/
|
||||
private String[] getHistManage(JBOTransaction tx,String customerID) throws JBOException{
|
||||
String[] manage = new String[2];
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_IMPORT_LOG.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("CUSTOMER_IMPORT_LOG.CLASS_NAME");
|
||||
if(tx != null) tx.join(bom);
|
||||
BizObject biz = bom.createQuery("CustomerID=:customerID and LogType='1' order by serialNo desc")
|
||||
.setParameter("customerID", customerID).getSingleResult(false);
|
||||
|
||||
@ -13,7 +13,7 @@ import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
|
||||
import jbo.customer.CUSTOMER_CERT;
|
||||
//import jbo.customer.CUSTOMER_CERT;
|
||||
|
||||
|
||||
/**
|
||||
@ -41,7 +41,7 @@ public class CustomerCertAction{
|
||||
*/
|
||||
public String checkCert(JBOTransaction tx) throws Exception{
|
||||
String result = "false";
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("jbo.customer.CUSTOMER_CERT");
|
||||
tx.join(bom);
|
||||
String orgid=orgID.substring(0, 5);
|
||||
int iResult = bom.createQuery("CertType=:certType and CertID=:certID and IssueCountry=:issueCountry and inputorgid like '"+orgid+"%'")
|
||||
@ -57,7 +57,7 @@ public class CustomerCertAction{
|
||||
* @throws JBOException
|
||||
*/
|
||||
public CustomerInfo getCustomerInfo(JBOTransaction tx) throws JBOException{
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("jbo.customer.CUSTOMER_CERT");
|
||||
tx.join(bom);
|
||||
BizObject boResult = bom.createQuery("CertType=:certType and CertID=:certID and IssueCountry=:issueCountry ")
|
||||
.setParameter("certType", certType).setParameter("certID", certID).setParameter("issueCountry", issueCountry).getSingleResult(true);
|
||||
@ -83,7 +83,7 @@ public class CustomerCertAction{
|
||||
String checkResult = checkCustomerCert(tx);
|
||||
|
||||
//增加新证件前,把之前该类型的证件置为无效。如果之前该类型的证件为主证件则将该证件设置为非主证件,并将新增的该类型证件设置为主证件,否则只设置证件状态为无效(Update的证件类型必须和新建的证件类型一致)
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager("jbo.customer.CUSTOMER_CERT");
|
||||
tx.join(m);
|
||||
BizObjectQuery bq = m.createQuery("update O set Status=:status,MainFlag=:mainFlag where CustomerID=:customerID and CertType=:certType");
|
||||
bq.setParameter("customerID",customerID).setParameter("certType", certType).
|
||||
@ -122,7 +122,7 @@ public class CustomerCertAction{
|
||||
*/
|
||||
public String checkCustomerCert(JBOTransaction tx) throws Exception{
|
||||
String result = "false";
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("jbo.customer.CUSTOMER_CERT");
|
||||
tx.join(bom);
|
||||
int iResult = bom.createQuery("CustomerID=:customerID and CertType=:certType and Status=:status and MainFlag=:mainFlag ")
|
||||
.setParameter("customerID", customerID).setParameter("certType", certType).
|
||||
@ -139,7 +139,7 @@ public class CustomerCertAction{
|
||||
* @throws Exception
|
||||
*/
|
||||
public String setMainCert(JBOTransaction tx) throws Exception{
|
||||
BizObjectManager bm = JBOFactory.getFactory().getManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
BizObjectManager bm = JBOFactory.getFactory().getManager("jbo.customer.CUSTOMER_CERT");
|
||||
tx.join(bm);
|
||||
BizObjectQuery bq1 = bm.createQuery("update O set MainFlag=:mainFlag where CustomerID=:customerID and MainFlag='1' ");
|
||||
bq1.setParameter("customerID",customerID).setParameter("mainFlag", LCConstant.CUSTOMER_CERT_MAINFLAG_2);
|
||||
@ -175,7 +175,7 @@ public class CustomerCertAction{
|
||||
//检查该类型证件是否已存在有效的证件
|
||||
String result = "false";
|
||||
String mainFlag = "";
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager("jbo.customer.CUSTOMER_CERT");
|
||||
tx.join(m);
|
||||
BizObject bo = m.createQuery("CustomerID=:customerID and CertType=:certType and Status=:status ")
|
||||
.setParameter("customerID", customerID).setParameter("certType", certType).
|
||||
@ -197,7 +197,7 @@ public class CustomerCertAction{
|
||||
* @throws Exception
|
||||
*/
|
||||
public String updateCertStatus(JBOTransaction tx) throws Exception{
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager("jbo.customer.CUSTOMER_CERT");
|
||||
tx.join(m);
|
||||
BizObjectQuery bq = m.createQuery("update O set Status=:status,MainFlag=:mainFlag where CustomerID=:customerID and CertType=:certType");
|
||||
bq.setParameter("customerID",customerID).setParameter("certType", certType).
|
||||
|
||||
@ -5,7 +5,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import jbo.app.CUSTOMER_BELONG;
|
||||
import jbo.customer.CUSTOMER_TRANSFER;
|
||||
//import jbo.customer.CUSTOMER_TRANSFER;
|
||||
import jbo.finasys.CUSTOMER_FSRECORD;
|
||||
import jbo.sys.EVALUATE_DATA;
|
||||
import jbo.sys.EVALUATE_RECORD;
|
||||
@ -97,7 +97,7 @@ public class CreditAnalyseAction {
|
||||
df=new SimpleDateFormat("yyyy/MM/dd");
|
||||
date=df.format(sysDate);
|
||||
int result = 0;
|
||||
BizObjectManager bomcl = JBOFactory.getBizObjectManager(CUSTOMER_TRANSFER.CLASS_NAME);
|
||||
BizObjectManager bomcl = JBOFactory.getBizObjectManager("CUSTOMER_TRANSFER.CLASS_NAME");
|
||||
tx.join(bomcl);
|
||||
BizObject bocl = bomcl.createQuery("SELECT maintaintime FROM o where transfertype='20' and RECEIVEUSERID=:RECEIVEUSERID and CUSTOMERID=:CUSTOMERID")
|
||||
.setParameter("CUSTOMERID", customerid)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.amarsoft.app.als.customer.dwhandler;
|
||||
|
||||
import jbo.customer.CUSTOMER_ADDRESS;
|
||||
//import jbo.customer.CUSTOMER_ADDRESS;
|
||||
|
||||
import com.amarsoft.app.als.customer.model.CustomerConstant;
|
||||
import com.amarsoft.app.als.customer.model.CustomerInfo;
|
||||
@ -35,7 +35,7 @@ public class CustomerAddressHandler extends CommonHandler{
|
||||
throws Exception {
|
||||
String customerID = bo.getAttribute("CustomerID").toString();
|
||||
String addType = bo.getAttribute("AddType").toString();
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager(CUSTOMER_ADDRESS.CLASS_NAME);
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager("CUSTOMER_ADDRESS.CLASS_NAME");
|
||||
tx.join(m);
|
||||
BizObjectQuery bq = m.createQuery("update O set IsNew=:isNew where CustomerID=:customerID and AddType=:addType");
|
||||
bq.setParameter("customerID",customerID).setParameter("addType", addType).
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.amarsoft.app.als.customer.dwhandler;
|
||||
|
||||
import jbo.customer.CUSTOMER_CERT;
|
||||
//import jbo.customer.CUSTOMER_CERT;
|
||||
|
||||
import com.amarsoft.app.als.customer.model.CustomerConstant;
|
||||
import com.amarsoft.app.als.customer.model.CustomerInfo;
|
||||
@ -37,7 +37,7 @@ public class CustomerCertListHandler extends CommonHandler{
|
||||
checkResult = checkCustomerCert(tx,customerID,certType);
|
||||
|
||||
//增加新证件前,把之前该类型的证件置为无效。如果之前该类型的证件为主证件则将该证件设置为非主证件,并将新增的该类型证件设置为主证件,否则只设置证件状态为无效(Update的证件类型必须和新建的证件类型一致)
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager("jbo.customer.CUSTOMER_CERT");
|
||||
tx.join(m);
|
||||
BizObjectQuery bq = m.createQuery("update O set Status=:status,MainFlag=:mainFlag where CustomerID=:customerID and CertType=:certType");
|
||||
bq.setParameter("customerID",customerID).setParameter("certType", certType).
|
||||
@ -70,7 +70,7 @@ public class CustomerCertListHandler extends CommonHandler{
|
||||
*/
|
||||
public String checkCustomerCert(JBOTransaction tx,String customerID,String certType) throws Exception{
|
||||
String result = "false";
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("jbo.customer.CUSTOMER_CERT");
|
||||
tx.join(bom);
|
||||
int iResult = bom.createQuery("CustomerID=:customerID and CertType=:certType and Status=:status and MainFlag=:mainFlag ")
|
||||
.setParameter("customerID", customerID).setParameter("certType", certType).
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.amarsoft.app.als.customer.dwhandler;
|
||||
|
||||
import jbo.customer.CUSTOMER_TEL;
|
||||
//import jbo.customer.CUSTOMER_TEL;
|
||||
|
||||
import com.amarsoft.app.als.customer.model.CustomerConstant;
|
||||
import com.amarsoft.app.als.customer.model.CustomerInfo;
|
||||
@ -35,7 +35,7 @@ public class CustomerTelHandler extends CommonHandler{
|
||||
throws Exception {
|
||||
String customerID = bo.getAttribute("CustomerID").toString();
|
||||
String telType = bo.getAttribute("TelType").toString();
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager(CUSTOMER_TEL.CLASS_NAME);
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager("jbo.customer.CUSTOMER_TEL");
|
||||
tx.join(m);
|
||||
// BizObjectQuery bq = m.createQuery("update O set IsNew=:isNew where CustomerID=:customerID and TelType=:telType");
|
||||
// bq.setParameter("customerID",customerID).setParameter("telType", telType).
|
||||
@ -50,7 +50,7 @@ public class CustomerTelHandler extends CommonHandler{
|
||||
String customerID = bo.getAttribute("CustomerID").toString();
|
||||
String telType = bo.getAttribute("TelType").toString();
|
||||
String serialNo = bo.getAttribute("SerialNo").getString();
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager(CUSTOMER_TEL.CLASS_NAME);
|
||||
BizObjectManager m = JBOFactory.getFactory().getManager("jbo.customer.CUSTOMER_TEL");
|
||||
tx.join(m);
|
||||
// BizObjectQuery bq = m.createQuery("update O set IsNew=:isNew where CustomerID=:customerID and TelType=:telType and SerialNo<>:serialNo");
|
||||
// bq.setParameter("customerID",customerID).setParameter("telType", telType).setParameter("serialNo", serialNo).
|
||||
|
||||
@ -2,7 +2,7 @@ package com.amarsoft.app.als.customer.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import jbo.customer.CUSTOMER_ADDRESS;
|
||||
//import jbo.customer.CUSTOMER_ADDRESS;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -30,7 +30,7 @@ public class CustomerAddress {
|
||||
*/
|
||||
|
||||
public CustomerAddress(JBOTransaction tx,String serialNo) throws JBOException{
|
||||
bm=JBOFactory.getBizObjectManager(CUSTOMER_ADDRESS.CLASS_NAME);
|
||||
bm=JBOFactory.getBizObjectManager("CUSTOMER_ADDRESS.CLASS_NAME");
|
||||
if(tx!=null){
|
||||
tx.join(bm);
|
||||
}
|
||||
@ -42,7 +42,7 @@ public class CustomerAddress {
|
||||
}
|
||||
|
||||
public CustomerAddress(JBOTransaction tx,String customerID,String addType) throws JBOException{
|
||||
bm=JBOFactory.getBizObjectManager(CUSTOMER_ADDRESS.CLASS_NAME);
|
||||
bm=JBOFactory.getBizObjectManager("CUSTOMER_ADDRESS.CLASS_NAME");
|
||||
if(tx!=null){
|
||||
tx.join(bm);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ package com.amarsoft.app.als.customer.model;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.customer.CUSTOMER_CERT;
|
||||
//import jbo.customer.CUSTOMER_CERT;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -31,7 +31,7 @@ public class CustomerCert {
|
||||
*/
|
||||
|
||||
public CustomerCert(JBOTransaction tx,String serialNo) throws JBOException{
|
||||
bm=JBOFactory.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
bm=JBOFactory.getBizObjectManager("jbo.customer.CUSTOMER_CERT");
|
||||
if(tx!=null){
|
||||
tx.join(bm);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ package com.amarsoft.app.als.customer.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import jbo.customer.CUSTOMER_TEL;
|
||||
//import jbo.customer.CUSTOMER_TEL;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -30,7 +30,7 @@ public class CustomerTel {
|
||||
*/
|
||||
|
||||
public CustomerTel(JBOTransaction tx,String serialNo) throws JBOException{
|
||||
bm=JBOFactory.getBizObjectManager(CUSTOMER_TEL.CLASS_NAME);
|
||||
bm=JBOFactory.getBizObjectManager("jbo.customer.CUSTOMER_TEL");
|
||||
if(tx!=null){
|
||||
tx.join(bm);
|
||||
}
|
||||
@ -42,7 +42,7 @@ public class CustomerTel {
|
||||
}
|
||||
|
||||
public CustomerTel(JBOTransaction tx,String customerID,String telType) throws JBOException{
|
||||
bm=JBOFactory.getBizObjectManager(CUSTOMER_TEL.CLASS_NAME);
|
||||
bm=JBOFactory.getBizObjectManager("jbo.customer.CUSTOMER_TEL");
|
||||
if(tx!=null){
|
||||
tx.join(bm);
|
||||
}
|
||||
|
||||
@ -271,11 +271,12 @@ public class GetFlowAction {
|
||||
* @throws Exception
|
||||
*/
|
||||
public static BizObject getRelaBusinessObject(String ObjectNo,String ObjectType) throws Exception{
|
||||
BizObject bo = null;
|
||||
if(CreditConst.CREDITOBJECT_APPLY_REAL.equals(ObjectType)){
|
||||
bo = getNextBusinessObject(CreditConst.BAP_JBOCLASS,ObjectNo);
|
||||
}
|
||||
return bo;
|
||||
// BizObject bo = null;
|
||||
// if(CreditConst.CREDITOBJECT_APPLY_REAL.equals(ObjectType)){
|
||||
// bo = getNextBusinessObject(CreditConst.BAP_JBOCLASS,ObjectNo);
|
||||
// }
|
||||
// return bo;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -30,40 +30,40 @@ public class TaskCommitAction {
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String afterCommit(JBOTransaction tx,String taskNo) throws Exception {
|
||||
//流程后续处理逻辑增加
|
||||
BizObject task = GetFlowAction.getFlowTaskParams(taskNo);
|
||||
String objectNo = task.getAttribute("ObjectNo").getString();
|
||||
if(StringX.isSpace(objectNo)) objectNo = "";
|
||||
String objectType = task.getAttribute("ObjectType").getString();
|
||||
if(StringX.isSpace(objectType)) objectType = "";
|
||||
//授信申请阶段,如果下一阶段是批复登记,则进行初始化
|
||||
if(CreditConst.CREDITOBJECT_APPLY_REAL.equals(objectType) && GetFlowAction.isApprovePhase(taskNo)){
|
||||
String phaseOpinion = task.getAttribute("PhaseOpinion1").getString();
|
||||
if(StringX.isSpace(phaseOpinion)) phaseOpinion = "";
|
||||
BizObject initTask = GetFlowAction.getInitFlowTaskParams(objectNo, objectType);
|
||||
String userID = initTask.getAttribute("UserID").getString();
|
||||
if(StringX.isSpace(userID)) userID = "";
|
||||
String approveType = "01";
|
||||
if(FlowConst.PHASE_8000.equals(phaseOpinion)){
|
||||
approveType = "02";
|
||||
}
|
||||
|
||||
/*BizObject bo = InitializeApprove.getApplyObject(tx,objectNo);
|
||||
ASUser curUser = ASUser.getUser(userID,Transaction.createTransaction(tx));*/
|
||||
|
||||
/*
|
||||
* 1、对最终审批意见进初始化
|
||||
*/
|
||||
/*AddApproveInfo addApprove = new AddApproveInfo(bo,curUser);
|
||||
addApprove.setApproveOpinion(approveType);
|
||||
String approveSerialNo = addApprove.transfer(tx); //新产生的批复流水号
|
||||
*/
|
||||
/*
|
||||
* 3、处理附属产品及额度相关申请逻辑
|
||||
*/
|
||||
/*InitializeApprove.initializeRelativeApply(tx,bo,approveSerialNo,curUser,approveType,"");
|
||||
return approveSerialNo;*/
|
||||
}
|
||||
// //流程后续处理逻辑增加
|
||||
// BizObject task = GetFlowAction.getFlowTaskParams(taskNo);
|
||||
// String objectNo = task.getAttribute("ObjectNo").getString();
|
||||
// if(StringX.isSpace(objectNo)) objectNo = "";
|
||||
// String objectType = task.getAttribute("ObjectType").getString();
|
||||
// if(StringX.isSpace(objectType)) objectType = "";
|
||||
// //授信申请阶段,如果下一阶段是批复登记,则进行初始化
|
||||
// if(CreditConst.CREDITOBJECT_APPLY_REAL.equals(objectType) && GetFlowAction.isApprovePhase(taskNo)){
|
||||
// String phaseOpinion = task.getAttribute("PhaseOpinion1").getString();
|
||||
// if(StringX.isSpace(phaseOpinion)) phaseOpinion = "";
|
||||
// BizObject initTask = GetFlowAction.getInitFlowTaskParams(objectNo, objectType);
|
||||
// String userID = initTask.getAttribute("UserID").getString();
|
||||
// if(StringX.isSpace(userID)) userID = "";
|
||||
// String approveType = "01";
|
||||
// if(FlowConst.PHASE_8000.equals(phaseOpinion)){
|
||||
// approveType = "02";
|
||||
// }
|
||||
//
|
||||
// /*BizObject bo = InitializeApprove.getApplyObject(tx,objectNo);
|
||||
// ASUser curUser = ASUser.getUser(userID,Transaction.createTransaction(tx));*/
|
||||
//
|
||||
// /*
|
||||
// * 1、对最终审批意见进初始化
|
||||
// */
|
||||
// /*AddApproveInfo addApprove = new AddApproveInfo(bo,curUser);
|
||||
// addApprove.setApproveOpinion(approveType);
|
||||
// String approveSerialNo = addApprove.transfer(tx); //新产生的批复流水号
|
||||
//*/
|
||||
// /*
|
||||
// * 3、处理附属产品及额度相关申请逻辑
|
||||
// */
|
||||
// /*InitializeApprove.initializeRelativeApply(tx,bo,approveSerialNo,curUser,approveType,"");
|
||||
// return approveSerialNo;*/
|
||||
// }
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -74,22 +74,22 @@ public class TaskCommitAction {
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void afterDelete(Transaction Sqlca, String taskNo) throws Exception {
|
||||
BizObject task = GetFlowAction.getFlowTaskParams(taskNo);
|
||||
String objectNo = task.getAttribute("ObjectNo").getString();
|
||||
if(StringX.isSpace(objectNo)) objectNo = "";
|
||||
String objectType = task.getAttribute("ObjectType").getString();
|
||||
if(StringX.isSpace(objectType)) objectType = "";
|
||||
if(CreditConst.CREDITOBJECT_APPLY_REAL.equals(objectType) && GetFlowAction.isApprovePhase(taskNo)){
|
||||
BizObject approve = GetFlowAction.getRelaBusinessObject(objectNo,objectType);
|
||||
if(approve != null){
|
||||
String approveSerialNo = approve.getAttribute("SerialNo").getString();
|
||||
Bizlet deleteBusiness = new DeleteBusiness();
|
||||
deleteBusiness.setAttribute("ObjectType", CreditConst.CREDITOBJECT_APPROVE_REAL);
|
||||
deleteBusiness.setAttribute("ObjectNo", approveSerialNo);
|
||||
deleteBusiness.setAttribute("DeleteType", "DeleteTask");
|
||||
deleteBusiness.run(Sqlca);
|
||||
}
|
||||
}
|
||||
// BizObject task = GetFlowAction.getFlowTaskParams(taskNo);
|
||||
// String objectNo = task.getAttribute("ObjectNo").getString();
|
||||
// if(StringX.isSpace(objectNo)) objectNo = "";
|
||||
// String objectType = task.getAttribute("ObjectType").getString();
|
||||
// if(StringX.isSpace(objectType)) objectType = "";
|
||||
// if(CreditConst.CREDITOBJECT_APPLY_REAL.equals(objectType) && GetFlowAction.isApprovePhase(taskNo)){
|
||||
// BizObject approve = GetFlowAction.getRelaBusinessObject(objectNo,objectType);
|
||||
// if(approve != null){
|
||||
// String approveSerialNo = approve.getAttribute("SerialNo").getString();
|
||||
// Bizlet deleteBusiness = new DeleteBusiness();
|
||||
// deleteBusiness.setAttribute("ObjectType", CreditConst.CREDITOBJECT_APPROVE_REAL);
|
||||
// deleteBusiness.setAttribute("ObjectNo", approveSerialNo);
|
||||
// deleteBusiness.setAttribute("DeleteType", "DeleteTask");
|
||||
// deleteBusiness.run(Sqlca);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
/**
|
||||
* 退回和收回后续处理
|
||||
@ -99,18 +99,18 @@ public class TaskCommitAction {
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void afterDelete(Transaction Sqlca, String objectNo,String objectType,String flowNo,String objectPhaseNo) throws Exception {
|
||||
String objectPhaseAttr =GetFlowAction.getFlowModelParams(flowNo, objectPhaseNo).getAttribute("PhaseAttribute").getString();
|
||||
if(CreditConst.CREDITOBJECT_APPLY_REAL.equals(objectType) && FlowConst.FLAG_ISAPPROVE.equalsIgnoreCase(objectPhaseAttr)){
|
||||
BizObject approve = GetFlowAction.getRelaBusinessObject(objectNo,objectType);
|
||||
if(approve != null){
|
||||
String approveSerialNo = approve.getAttribute("SerialNo").getString();
|
||||
Bizlet deleteBusiness = new DeleteBusiness();
|
||||
deleteBusiness.setAttribute("ObjectType", CreditConst.CREDITOBJECT_APPROVE_REAL);
|
||||
deleteBusiness.setAttribute("ObjectNo", approveSerialNo);
|
||||
deleteBusiness.setAttribute("DeleteType", "DeleteTask");
|
||||
deleteBusiness.run(Sqlca);
|
||||
}
|
||||
}
|
||||
// String objectPhaseAttr =GetFlowAction.getFlowModelParams(flowNo, objectPhaseNo).getAttribute("PhaseAttribute").getString();
|
||||
// if(CreditConst.CREDITOBJECT_APPLY_REAL.equals(objectType) && FlowConst.FLAG_ISAPPROVE.equalsIgnoreCase(objectPhaseAttr)){
|
||||
// BizObject approve = GetFlowAction.getRelaBusinessObject(objectNo,objectType);
|
||||
// if(approve != null){
|
||||
// String approveSerialNo = approve.getAttribute("SerialNo").getString();
|
||||
// Bizlet deleteBusiness = new DeleteBusiness();
|
||||
// deleteBusiness.setAttribute("ObjectType", CreditConst.CREDITOBJECT_APPROVE_REAL);
|
||||
// deleteBusiness.setAttribute("ObjectNo", approveSerialNo);
|
||||
// deleteBusiness.setAttribute("DeleteType", "DeleteTask");
|
||||
// deleteBusiness.run(Sqlca);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
/**
|
||||
* 流程提交后续操作
|
||||
|
||||
@ -4,8 +4,8 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
|
||||
import jbo.com.tenwa.entity.comm.WORKTIP_CONFIG;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
//import jbo.com.tenwa.entity.comm.WORKTIP_CONFIG;
|
||||
|
||||
import com.amarsoft.app.awe.config.worktip.WorkTip;
|
||||
import com.amarsoft.app.awe.config.worktip.WorkTipRun;
|
||||
@ -15,59 +15,58 @@ import com.amarsoft.awe.util.ASResultSet;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.context.ASUser;
|
||||
import com.tenwa.flow.util.BussinessStringUtil;
|
||||
import com.tenwa.flow.util.DataOperatorUtil;
|
||||
|
||||
public class WorkTipDefault implements WorkTipRun {
|
||||
|
||||
public WorkTips run(HashMap<String, String> params, ASUser CurUser,Transaction Sqlca) throws Exception {
|
||||
|
||||
//根据工作提示编号,找到工作提示配置
|
||||
String workTipId=params.get("WorkTipId").toString();
|
||||
Map<String,String>searchCondtion=new HashMap<String,String>();
|
||||
WorkTips tips = new WorkTips();
|
||||
searchCondtion.put("id", workTipId);
|
||||
BizObject TipConfig =DataOperatorUtil.getSingleJBO(WORKTIP_CONFIG.CLASS_NAME, searchCondtion, Sqlca);
|
||||
|
||||
int iShowNum =Integer.valueOf(TipConfig.getAttribute("tipnumber").toString());
|
||||
ASResultSet rs = null;
|
||||
String sSql =TipConfig.getAttribute("runner").toString();
|
||||
//提示列:列名1@宽度,列名2@宽度
|
||||
String column=TipConfig.getAttribute("tipColumn").toString();
|
||||
//提示对应该js的回调【处理(参数1,参数2)@全部处理()】
|
||||
String jsactions=TipConfig.getAttribute("jsaction").toString();
|
||||
String tipAction=jsactions.split("@")[0];
|
||||
String tipActionName=BussinessStringUtil.getJsFunctionName(tipAction);
|
||||
String[] tipActionParam=BussinessStringUtil.getJsFunctionParam(tipAction);
|
||||
String allTipAction=jsactions.split("@")[1];
|
||||
String[]columns=column.split(",");
|
||||
try{
|
||||
SqlObject asql = new SqlObject(sSql);
|
||||
asql.setParameter("UserID", CurUser.getUserID());
|
||||
//asql.setParameter("UserID","test91");
|
||||
for(String key :params.keySet()){
|
||||
asql.setParameter(key,params.get(key).toString());
|
||||
}
|
||||
rs = Sqlca.getASResultSet(asql);
|
||||
int n = 0;
|
||||
while(rs.next()){
|
||||
if(++n > iShowNum) continue;
|
||||
String sText = "";
|
||||
for(int i=0;i<columns.length;i++){
|
||||
sText += "<span style='width:"+columns[i].split("@")[1]+";'>"+rs.getString(columns[i].split("@")[0])+"</span>";
|
||||
public WorkTips run(HashMap<String, String> params, ASUser CurUser, Transaction Sqlca) throws Exception {
|
||||
|
||||
/*//根据工作提示编号,找到工作提示配置
|
||||
String workTipId = params.get("WorkTipId").toString();
|
||||
Map<String, String> searchCondtion = new HashMap<String, String>();
|
||||
WorkTips tips = new WorkTips();
|
||||
searchCondtion.put("id", workTipId);
|
||||
BizObject TipConfig = DataOperatorUtil.getSingleJBO(WORKTIP_CONFIG.CLASS_NAME, searchCondtion, Sqlca);
|
||||
|
||||
int iShowNum = Integer.valueOf(TipConfig.getAttribute("tipnumber").toString());
|
||||
ASResultSet rs = null;
|
||||
String sSql = TipConfig.getAttribute("runner").toString();
|
||||
//提示列:列名1@宽度,列名2@宽度
|
||||
String column = TipConfig.getAttribute("tipColumn").toString();
|
||||
//提示对应该js的回调【处理(参数1,参数2)@全部处理()】
|
||||
String jsactions = TipConfig.getAttribute("jsaction").toString();
|
||||
String tipAction = jsactions.split("@")[0];
|
||||
String tipActionName = BussinessStringUtil.getJsFunctionName(tipAction);
|
||||
String[] tipActionParam = BussinessStringUtil.getJsFunctionParam(tipAction);
|
||||
String allTipAction = jsactions.split("@")[1];
|
||||
String[] columns = column.split(",");
|
||||
try {
|
||||
SqlObject asql = new SqlObject(sSql);
|
||||
asql.setParameter("UserID", CurUser.getUserID());
|
||||
//asql.setParameter("UserID","test91");
|
||||
for (String key : params.keySet()) {
|
||||
asql.setParameter(key, params.get(key).toString());
|
||||
}
|
||||
tips.information.add(new WorkTip(sText, BussinessStringUtil.getJsFunction(tipActionName, tipActionParam, rs)));
|
||||
}
|
||||
if(n > iShowNum){
|
||||
rs = Sqlca.getASResultSet(asql);
|
||||
int n = 0;
|
||||
while (rs.next()) {
|
||||
if (++n > iShowNum) continue;
|
||||
String sText = "";
|
||||
for (int i = 0; i < columns.length; i++) {
|
||||
sText += "<span style='width:" + columns[i].split("@")[1] + ";'>" + rs.getString(columns[i].split("@")[0]) + "</span>";
|
||||
}
|
||||
tips.information.add(new WorkTip(sText, BussinessStringUtil.getJsFunction(tipActionName, tipActionParam, rs)));
|
||||
}
|
||||
if (n > iShowNum) {
|
||||
// 最后一个【更多】表示剩余的记录
|
||||
WorkTip tip = new WorkTip("<span style='float:right;margin-right:180px;color:#f00;'>更多...</span>", jsactions.split("@")[1]);
|
||||
tip.setNum(n - iShowNum);
|
||||
tips.information.add(tip);
|
||||
}
|
||||
}finally{
|
||||
if(rs != null) rs.close();
|
||||
} finally {
|
||||
if (rs != null) rs.close();
|
||||
}
|
||||
return tips;*/
|
||||
return null;
|
||||
}
|
||||
return tips;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -10,14 +10,14 @@ import com.amarsoft.app.awe.config.worktip.WorkTip;
|
||||
import com.amarsoft.app.awe.config.worktip.WorkTips;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.tenwa.flow.util.DataOperatorUtil;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
|
||||
public class WorkTipInit{
|
||||
|
||||
public String InitTip(JBOTransaction tx) throws Exception{
|
||||
Map<String,String>search=new HashMap<String,String>();
|
||||
search.put("tipStatus", "1");
|
||||
List<BizObject> tipconfigs=DataOperatorUtil.getSetJBO("jbo.com.tenwa.entity.comm.WORKTIP_CONFIG", search, tx);
|
||||
List<BizObject> tipconfigs= DataOperatorUtil.getSetJBO("jbo.com.tenwa.entity.comm.WORKTIP_CONFIG", search, tx);
|
||||
String defaultRunner="com.amarsoft.app.als.worktip.WorkTipDefault";
|
||||
if(tipconfigs.size()>0){
|
||||
WorkTips workTip = new WorkTips();
|
||||
|
||||
@ -15,7 +15,7 @@ import com.amarsoft.are.util.json.JSONEncoder;
|
||||
import com.amarsoft.are.util.json.JSONObject;
|
||||
import com.amarsoft.biz.bizlet.Bizlet;
|
||||
|
||||
import jbo.lc.FLOWPHASE_HIS;
|
||||
//import jbo.lc.FLOWPHASE_HIS;
|
||||
|
||||
/**
|
||||
* 项目各个阶级的详情数据都要存档
|
||||
@ -28,7 +28,7 @@ public class PhaseInfoArchive extends Bizlet {
|
||||
/**
|
||||
* 获取参数
|
||||
*/
|
||||
//项目信息流水号
|
||||
/*//项目信息流水号
|
||||
String proj_info_temp_id = (String)this.getAttribute("ObjectNo");
|
||||
String foobjecttype = (String)this.getAttribute("ObjectType");
|
||||
String flowNo = (String)this.getAttribute("FlowNo");
|
||||
@ -63,14 +63,14 @@ public class PhaseInfoArchive extends Bizlet {
|
||||
boFPH.setAttributeValue("foobjecttype",foobjecttype);
|
||||
boFPH.setAttributeValue("foobjectno",proj_info_temp_id);
|
||||
boFPH.setAttributeValue("data",phaseInfoJsonStr);
|
||||
bm.saveObject(boFPH);
|
||||
bm.saveObject(boFPH);*/
|
||||
|
||||
return LCConstant.OPERATION_FLAG_SUCCESS;
|
||||
}
|
||||
|
||||
private Object getBusinessObject(WorkFlowPhaseClass wfpc,String businessObjectKeyValue,JBOTransaction tx) throws JBOException {
|
||||
|
||||
BizObjectManager bm=JBOFactory.getBizObjectManager(wfpc.getName());
|
||||
/*BizObjectManager bm=JBOFactory.getBizObjectManager(wfpc.getName());
|
||||
tx.join(bm);
|
||||
String querySql=wfpc.getQuerySql().trim();
|
||||
if(LCConstant.YESNO_Y.equals(wfpc.getIsMulti())){
|
||||
@ -86,6 +86,7 @@ public class PhaseInfoArchive extends Bizlet {
|
||||
}else{
|
||||
BizObject bo=bm.createQuery(querySql).setParameter(querySql.substring(0,querySql.indexOf("=")),businessObjectKeyValue).getSingleResult(false);
|
||||
return bo;
|
||||
}
|
||||
}*/
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,10 +6,10 @@ import com.amarsoft.app.lc.LCConstant;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.biz.bizlet.Bizlet;
|
||||
|
||||
import jbo.lc.PROJ_EQUIP;
|
||||
/*import jbo.lc.PROJ_EQUIP;
|
||||
import jbo.lc.PROJ_EQUIP_TEMP;
|
||||
import jbo.lc.PROJ_INFO;
|
||||
import jbo.lc.PROJ_INFO_TEMP;
|
||||
import jbo.lc.PROJ_INFO_TEMP;*/
|
||||
|
||||
/**
|
||||
* 项目立项流程-结束后操作(批准),将数据从TEMP表更新到正式表
|
||||
@ -42,7 +42,7 @@ public class ProjectEstablishFinish extends Bizlet {
|
||||
* ……后续再增加
|
||||
*/
|
||||
//更新PROJ_INFO数据
|
||||
KeyValuePair[] srcKeyValuePair=new KeyValuePair[1];
|
||||
/*KeyValuePair[] srcKeyValuePair=new KeyValuePair[1];
|
||||
srcKeyValuePair[0]=new KeyValuePair("ID",proj_info_temp_id);
|
||||
|
||||
KeyValuePair[] destKeyValuePair=new KeyValuePair[1];
|
||||
@ -55,7 +55,7 @@ public class ProjectEstablishFinish extends Bizlet {
|
||||
// KeyValuePair[] destKeyValuePair1=new KeyValuePair[1];
|
||||
// destKeyValuePair[0]=new KeyValuePair("ID",proj_info_temp_id);
|
||||
BizObjectAssist.copyJBOList(PROJ_EQUIP_TEMP.CLASS_NAME,"ID=:ID",srcKeyValuePair,PROJ_EQUIP.CLASS_NAME,"delete from O where ID=:ID",destKeyValuePair,tx);
|
||||
|
||||
*/
|
||||
|
||||
return LCConstant.OPERATION_FLAG_SUCCESS;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ package com.amarsoft.app.lc.check;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jbo.lc.PROJ_EQUIP;
|
||||
//import jbo.lc.PROJ_EQUIP;
|
||||
|
||||
import com.amarsoft.app.alarm.AlarmBiz;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -17,7 +17,7 @@ public class RentListCheck extends AlarmBiz {
|
||||
|
||||
String proj_id = jboProject.getAttribute("id").getString();
|
||||
|
||||
List projEquipList=JBOFactory.getBizObjectManager(PROJ_EQUIP.CLASS_NAME)
|
||||
List projEquipList=JBOFactory.getBizObjectManager("jbo.lc.PROJ_EQUIP")
|
||||
.createQuery("PROJ_ID=:PROJ_ID").setParameter("PROJ_ID",proj_id).getResultList(false);
|
||||
|
||||
if(!(projEquipList!=null && projEquipList.size()>0)){
|
||||
|
||||
@ -4,7 +4,7 @@ import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
|
||||
import jbo.lc.PROJ_INFO_TEMP;
|
||||
//import jbo.lc.PROJ_INFO_TEMP;
|
||||
|
||||
public class GetBizObject {
|
||||
|
||||
@ -18,7 +18,7 @@ public class GetBizObject {
|
||||
if(id == null || id.length() == 0){
|
||||
throw new Exception("项目信息流水号为空!");
|
||||
}
|
||||
BizObjectManager manager= JBOFactory.getFactory().getManager(PROJ_INFO_TEMP.CLASS_NAME);
|
||||
BizObjectManager manager= JBOFactory.getFactory().getManager("jbo.lc.PROJ_INFO_TEMP");
|
||||
BizObject jboPIT = manager.createQuery("id =:id").setParameter("id",id).getSingleResult(false);
|
||||
return jboPIT;
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.lang.DataElement;
|
||||
import com.amarsoft.are.lang.StringX;
|
||||
|
||||
import jbo.customer.CUSTOMER_CERT;
|
||||
//import jbo.customer.CUSTOMER_CERT;
|
||||
|
||||
/**
|
||||
* 客户证件对象
|
||||
@ -31,7 +31,7 @@ public class CustomerCert {
|
||||
*/
|
||||
|
||||
public CustomerCert(JBOTransaction tx,String serialNo) throws JBOException{
|
||||
bm=JBOFactory.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME);
|
||||
bm=JBOFactory.getBizObjectManager("jbo.customer.CUSTOMER_CERT");
|
||||
if(tx!=null){
|
||||
tx.join(bm);
|
||||
}
|
||||
|
||||
@ -4,12 +4,12 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import jbo.app.CUSTOMER_ATTRIBUTION;
|
||||
|
||||
import com.amarsoft.app.lc.util.DateAssistant;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.tenwa.flow.util.DataOperatorUtil;
|
||||
|
||||
public class NewCustomerAction{
|
||||
|
||||
@ -174,7 +174,7 @@ public class NewCustomerAction{
|
||||
cond.put("customerid", this.getCustomerid());
|
||||
cond.put("userid", this.getUserId());
|
||||
cond.put("isMain", "Y");
|
||||
List<BizObject> list=DataOperatorUtil.getSetJBO(CUSTOMER_ATTRIBUTION.CLASS_NAME, cond, tx);
|
||||
List<BizObject> list= DataOperatorUtil.getSetJBO(CUSTOMER_ATTRIBUTION.CLASS_NAME, cond, tx);
|
||||
if(list.size()>0)
|
||||
{
|
||||
return "1";
|
||||
|
||||
@ -7,7 +7,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import apx.com.amarsoft.als.user.logon.model.LoginUser;
|
||||
//import apx.com.amarsoft.als.user.logon.model.LoginUser;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -149,11 +149,11 @@ public class PushMessageUtil {
|
||||
this.id = bo.getAttribute("ID") == null ? "" : bo.getAttribute("ID")
|
||||
.toString().trim();
|
||||
}
|
||||
LoginUser user = new LoginUser(userid, "");
|
||||
String regId = user.getDevRegId();
|
||||
// LoginUser user = new LoginUser(userid, "");
|
||||
String regId = ""; //user.getDevRegId();
|
||||
|
||||
if (title != null && description != null) {
|
||||
String devType = user.getDevOs();
|
||||
String devType = ""; //user.getDevOs();
|
||||
if ("ios".equalsIgnoreCase(devType)) {
|
||||
String appSecret = pc.getAPP_SECRET_KEY_IOS();
|
||||
Sender sender = new Sender(appSecret);
|
||||
|
||||
@ -7,7 +7,7 @@ import com.amarsoft.app.base.businessobject.BusinessObjectManager;
|
||||
import com.amarsoft.app.base.trans.TransactionHelper;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.lang.StringX;
|
||||
import jbo.app.ASSET_INFO;
|
||||
//import jbo.app.ASSET_INFO;
|
||||
import jbo.sys.FLOW_OBJECT;
|
||||
import jbo.sys.FLOW_OPINION;
|
||||
import jbo.sys.FLOW_TASK;
|
||||
@ -84,7 +84,7 @@ public class DeleteTransaction {
|
||||
|
||||
if(assetStatus!=null&&assetStatus.equals("0030"))//出库申请撤销还原为已入库
|
||||
{
|
||||
BusinessObject ai = bomanager.keyLoadBusinessObject(ASSET_INFO.CLASS_NAME, objectNo);
|
||||
BusinessObject ai = bomanager.keyLoadBusinessObject("jbo.app.ASSET_INFO", objectNo);
|
||||
if (ai!=null)
|
||||
{
|
||||
ai.setAttributeValue("assetStatus", "0120");
|
||||
@ -93,7 +93,7 @@ public class DeleteTransaction {
|
||||
}
|
||||
if(assetStatus!=null&&assetStatus.equals("0020"))//入库申请撤销还原为未抵押未质押
|
||||
{
|
||||
BusinessObject ai = bomanager.keyLoadBusinessObject(ASSET_INFO.CLASS_NAME, objectNo);
|
||||
BusinessObject ai = bomanager.keyLoadBusinessObject("jbo.app.ASSET_INFO", objectNo);
|
||||
if (ai!=null)
|
||||
{
|
||||
ai.setAttributeValue("assetStatus", "0000");
|
||||
|
||||
@ -3,7 +3,7 @@ package com.amarsoft.app.accounting.trans.script.common.loader;
|
||||
import java.util.List;
|
||||
|
||||
import jbo.app.BUSINESS_CONTRACT;
|
||||
import jbo.cl.CL_INFO;
|
||||
//import jbo.cl.CL_INFO;
|
||||
|
||||
import com.amarsoft.app.base.businessobject.BusinessObject;
|
||||
import com.amarsoft.app.base.trans.TransactionProcedure;
|
||||
@ -26,7 +26,7 @@ public final class CreditLineLoader extends TransactionProcedure{
|
||||
List<BusinessObject> clList = bomanager.loadBusinessObjects("jbo.cl.CL_INFO", "ObjectType=:ObjectType and ObjectNo=:ObjectNo and Status=:Status and CLContractNo=:CLContractNo",
|
||||
"ObjectType", BUSINESS_CONTRACT.CLASS_NAME, "ObjectNo", contractSerialNo, "Status", "20", "CLContractNo", contractSerialNo);
|
||||
if(clList.size() > 0 && documentObject != null){
|
||||
documentObject.appendBusinessObjects(CL_INFO.CLASS_NAME, clList);
|
||||
documentObject.appendBusinessObjects("CL_INFO.CLASS_NAME", clList);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.amarsoft.app.accounting.trans.script.common.loader;
|
||||
|
||||
import jbo.app.BUSINESS_PUTOUT;
|
||||
//import jbo.app.BUSINESS_PUTOUT;
|
||||
|
||||
import com.amarsoft.app.base.businessobject.BusinessObject;
|
||||
import com.amarsoft.app.base.trans.TransactionProcedure;
|
||||
@ -15,14 +15,14 @@ public final class PutOutLoader extends TransactionProcedure{
|
||||
public int run() throws Exception {
|
||||
|
||||
String putOutSerialNo = relativeObject.getString("PutOutSerialNo");
|
||||
if(BUSINESS_PUTOUT.CLASS_NAME.equals(relativeObject.getBizClassName()))
|
||||
if("jbo.app.BUSINESS_PUTOUT".equals(relativeObject.getBizClassName()))
|
||||
putOutSerialNo = relativeObject.getKeyString();
|
||||
if(StringX.isEmpty(putOutSerialNo))
|
||||
return 1;
|
||||
|
||||
BusinessObject bp = bomanager.keyLoadBusinessObject(BUSINESS_PUTOUT.CLASS_NAME, putOutSerialNo);
|
||||
BusinessObject bp = bomanager.keyLoadBusinessObject("jbo.app.BUSINESS_PUTOUT", putOutSerialNo);
|
||||
if(bp != null){
|
||||
relativeObject.appendBusinessObject(BUSINESS_PUTOUT.CLASS_NAME, bp);
|
||||
relativeObject.appendBusinessObject("jbo.app.BUSINESS_PUTOUT", bp);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
@ -8,7 +8,7 @@ import com.amarsoft.app.base.trans.TransactionProcedure;
|
||||
import com.amarsoft.app.base.util.BUSINESSOBJECT_CONSTANTS;
|
||||
|
||||
import jbo.app.BUSINESS_CONTRACT;
|
||||
import jbo.cl.CL_INFO;
|
||||
//import jbo.cl.CL_INFO;
|
||||
/**
|
||||
*
|
||||
* @author zpli
|
||||
@ -19,7 +19,7 @@ public class BillInstallmentPaymentExecutor extends TransactionProcedure{
|
||||
@Override
|
||||
public int run() throws Exception {
|
||||
BusinessObject bc = relativeObject.getBusinessObject(BUSINESS_CONTRACT.CLASS_NAME);
|
||||
List<BusinessObject> clList = documentObject.getBusinessObjects(CL_INFO.CLASS_NAME);
|
||||
List<BusinessObject> clList = documentObject.getBusinessObjects("CL_INFO.CLASS_NAME");
|
||||
List<BusinessObject> prs = documentObject.getBusinessObjectsBySql("jbo.app.PUTOUT_RELATIVE", "BPSerialNo=:BPSerialNo and OBJECTTYPE='jbo.acct.ACCT_LOAN'"
|
||||
, "BPSerialNo",documentObject.getKeyString());
|
||||
for(BusinessObject pr:prs){
|
||||
@ -30,7 +30,7 @@ public class BillInstallmentPaymentExecutor extends TransactionProcedure{
|
||||
documentObject.setAttributeValue("PREPAYTYPE", "3");//È«²¿Ìáǰ»¹¿î
|
||||
TransactionHelper.loadTransaction(transaction, bomanager);
|
||||
transaction.getBusinessObject(transaction.getString("relativeObjectType")).appendBusinessObject(BUSINESS_CONTRACT.CLASS_NAME, bc);
|
||||
transaction.getBusinessObject(transaction.getString("documentType")).appendBusinessObjects(CL_INFO.CLASS_NAME, clList);
|
||||
transaction.getBusinessObject(transaction.getString("documentType")).appendBusinessObjects("CL_INFO.CLASS_NAME", clList);
|
||||
TransactionHelper.executeTransaction(transaction, bomanager);
|
||||
}
|
||||
return 1;
|
||||
|
||||
@ -3,7 +3,7 @@ package com.amarsoft.app.accounting.trans.script.loan.common.executor;
|
||||
import java.util.List;
|
||||
|
||||
import jbo.app.BUSINESS_CONTRACT;
|
||||
import jbo.cl.CL_INFO;
|
||||
//import jbo.cl.CL_INFO;
|
||||
|
||||
import com.amarsoft.app.base.businessobject.BusinessObject;
|
||||
import com.amarsoft.app.base.trans.TransactionProcedure;
|
||||
@ -78,7 +78,7 @@ public class UpdateBCExecutor extends TransactionProcedure {
|
||||
|
||||
//¸üжî¶ÈCL_INFO
|
||||
if(documentObject != null){
|
||||
List<BusinessObject> clList = documentObject.getBusinessObjects(CL_INFO.CLASS_NAME);
|
||||
List<BusinessObject> clList = documentObject.getBusinessObjects("jbo.cl.CL_INFO");
|
||||
if(clList != null && clList.size() > 0){
|
||||
BusinessObject cl = clList.get(0);
|
||||
cl.setAttributeValue("BUSINESSAVABALANCE", cl.getDouble("BUSINESSAVABALANCE") - balance);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.amarsoft.app.accounting.trans.script.loan.common.executor;
|
||||
|
||||
import jbo.app.BUSINESS_PUTOUT;
|
||||
//import jbo.app.BUSINESS_PUTOUT;
|
||||
|
||||
import com.amarsoft.app.accounting.trans.script.common.executor.BookKeepExecutor;
|
||||
import com.amarsoft.app.base.businessobject.BusinessObject;
|
||||
@ -12,7 +12,7 @@ import com.amarsoft.app.base.config.impl.TransactionConfig;
|
||||
public final class UpdateBPExecutor extends BookKeepExecutor{
|
||||
|
||||
public int run() throws Exception {
|
||||
BusinessObject bp = relativeObject.getBusinessObject(BUSINESS_PUTOUT.CLASS_NAME);
|
||||
BusinessObject bp = relativeObject.getBusinessObject("jbo.app.BUSINESS_PUTOUT");
|
||||
if(bp != null){
|
||||
String putoutStatus=TransactionConfig.getScriptConfig(transactionCode, scriptID, "putoutStatus");
|
||||
bp.setAttributeValue("PutOutStatus", putoutStatus);
|
||||
|
||||
@ -23,35 +23,36 @@ public class VerificationCustomerInfoServiceImpl implements VerificationCustomer
|
||||
public Map<String, Object> checkCutomerInfo(HttpServletRequest request,
|
||||
HttpServletResponse response, JBOTransaction tx, Transaction sqlca,
|
||||
ReturnMapUtil ReturnMapUtil) throws Exception {
|
||||
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
|
||||
.readRequestParam(request, "UTF-8");
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
||||
//获取前台参数flowUnid
|
||||
String flowUnid = fieldMap.get("objectNo") == null ? "" : fieldMap.get("objectNo").toString();
|
||||
//根据flowUnid查询出 客户临时表(customer_person_temp)中的id
|
||||
BusinessCustomerMethod bcm = new BusinessCustomerMethod();
|
||||
String customerPersonTempId = bcm.getIdByFlowUnid(flowUnid);
|
||||
//根据此id,校验身份信息
|
||||
IdentityVerification iv = new IdentityVerification();
|
||||
iv.setId(customerPersonTempId);
|
||||
//调用校验方法
|
||||
String resultString = iv.doIdentityVerification(tx);
|
||||
//创建Map body 返回给前台json数据
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
//判断返回值是否为ERROR,N:发起成功 Y:验证失败 。 发起成功不代表验证成功,也可能有其他错误,如:ip地址受限。
|
||||
if(resultString.equals("ERROR")) {
|
||||
ReturnMapUtil.setReturnMap(null,
|
||||
RestfullConstant.baseProperty.get("FAIL").toString(),
|
||||
"验证失败");
|
||||
}else {
|
||||
//塞入验证结果供前台展示
|
||||
body.put("verificationResult", resultString);
|
||||
ReturnMapUtil.setReturnMap(body,
|
||||
RestfullConstant.baseProperty.get("success").toString(),
|
||||
"发起成功");
|
||||
}
|
||||
//返回数据给前台
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
// Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
|
||||
// .readRequestParam(request, "UTF-8");
|
||||
// fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
||||
// //获取前台参数flowUnid
|
||||
// String flowUnid = fieldMap.get("objectNo") == null ? "" : fieldMap.get("objectNo").toString();
|
||||
// //根据flowUnid查询出 客户临时表(customer_person_temp)中的id
|
||||
// BusinessCustomerMethod bcm = new BusinessCustomerMethod();
|
||||
// String customerPersonTempId = bcm.getIdByFlowUnid(flowUnid);
|
||||
// //根据此id,校验身份信息
|
||||
// IdentityVerification iv = new IdentityVerification();
|
||||
// iv.setId(customerPersonTempId);
|
||||
// //调用校验方法
|
||||
// String resultString = iv.doIdentityVerification(tx);
|
||||
// //创建Map body 返回给前台json数据
|
||||
// Map<String, Object> body = new HashMap<String, Object>();
|
||||
// //判断返回值是否为ERROR,N:发起成功 Y:验证失败 。 发起成功不代表验证成功,也可能有其他错误,如:ip地址受限。
|
||||
// if(resultString.equals("ERROR")) {
|
||||
// ReturnMapUtil.setReturnMap(null,
|
||||
// RestfullConstant.baseProperty.get("FAIL").toString(),
|
||||
// "验证失败");
|
||||
// }else {
|
||||
// //塞入验证结果供前台展示
|
||||
// body.put("verificationResult", resultString);
|
||||
// ReturnMapUtil.setReturnMap(body,
|
||||
// RestfullConstant.baseProperty.get("success").toString(),
|
||||
// "发起成功");
|
||||
// }
|
||||
// //返回数据给前台
|
||||
// return ReturnMapUtil.getReturnMap();
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -325,7 +325,7 @@ public final class DateHelper{
|
||||
{
|
||||
//获取当年的工作日信息
|
||||
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
|
||||
List<BusinessObject> datetemps = bomanager.loadBusinessObjects(jbo.sys.SYS_CALENDAR.CLASS_NAME, "CurDate like :CurYear", "CurYear",date.substring(0, 4)+"%");
|
||||
List<BusinessObject> datetemps = bomanager.loadBusinessObjects("jbo.sys.SYS_CALENDAR.CLASS_NAME", "CurDate like :CurYear", "CurYear",date.substring(0, 4)+"%");
|
||||
synchronized(dateCache){
|
||||
for(BusinessObject datetemp:datetemps)
|
||||
{
|
||||
|
||||
@ -9,7 +9,7 @@ import java.util.List;
|
||||
import jbo.awe.AWE_ROLE_INFO;
|
||||
import jbo.sys.FLOW_CATALOG;
|
||||
import jbo.sys.ORG_INFO;
|
||||
import jbo.sys.SADRE_DIMENSION;
|
||||
//import jbo.sys.SADRE_DIMENSION;
|
||||
import jbo.sys.USER_INFO;
|
||||
|
||||
import com.amarsoft.app.base.businessobject.BusinessObject;
|
||||
@ -470,7 +470,7 @@ public class SYSNameManager{
|
||||
if(StringX.isEmpty(ids)){
|
||||
sb.append("");
|
||||
}else{
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(SADRE_DIMENSION.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("jbo.sys.SADRE_DIMENSION");
|
||||
String [] idArray = ids.split(",");
|
||||
BizObject bo = null;
|
||||
for(int i=0;i<idArray.length;i++){
|
||||
|
||||
@ -13,73 +13,73 @@ import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
//import org.apache.logging.log4j.LogManager;
|
||||
//import org.apache.logging.log4j.Logger;
|
||||
import org.apache.tomcat.util.http.fileupload.FileUtils;
|
||||
//import org.apache.tomcat.util.http.fileupload.FileUtils;
|
||||
|
||||
|
||||
public class FilesToZipUtils {
|
||||
|
||||
private static final Logger log = LogManager.getLogger(FilesToZipUtils.class);
|
||||
|
||||
public static void delZipFile(String zipFilename) {
|
||||
File file = new File(zipFilename);
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
try {
|
||||
File localZipParentFile= file.getParentFile() ;
|
||||
File[] listFiles = localZipParentFile.listFiles();
|
||||
if(listFiles!=null && listFiles.length==0)
|
||||
FileUtils.deleteDirectory(localZipParentFile);
|
||||
} catch (IOException e) {
|
||||
log.error(">>>>>>>>[error] file parent is not deleted>>>>>>>>" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void delZipFiles(List<File> files) {
|
||||
if(files!=null && files.size()>0)
|
||||
for(File file :files){
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
try {
|
||||
File localZipParentFile= file.getParentFile() ;
|
||||
File[] listFiles = localZipParentFile.listFiles();
|
||||
if(listFiles!=null && listFiles.length==0)
|
||||
FileUtils.deleteDirectory(localZipParentFile);
|
||||
} catch (IOException e) {
|
||||
log.error(">>>>>>>>[error] file parent is not deleted>>>>>>>>" + e.getMessage());
|
||||
}
|
||||
}else {
|
||||
log.error(">>>>>>>>[error] file is not exists>>>>>>>>" + file);
|
||||
}
|
||||
}
|
||||
}
|
||||
// public static void delZipFile(String zipFilename) {
|
||||
// File file = new File(zipFilename);
|
||||
// if (file.exists()) {
|
||||
// file.delete();
|
||||
// try {
|
||||
// File localZipParentFile= file.getParentFile() ;
|
||||
// File[] listFiles = localZipParentFile.listFiles();
|
||||
// if(listFiles!=null && listFiles.length==0)
|
||||
// FileUtils.deleteDirectory(localZipParentFile);
|
||||
// } catch (IOException e) {
|
||||
// log.error(">>>>>>>>[error] file parent is not deleted>>>>>>>>" + e.getMessage());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static void delZipFiles(List<File> files) {
|
||||
// if(files!=null && files.size()>0)
|
||||
// for(File file :files){
|
||||
// if (file.exists()) {
|
||||
// file.delete();
|
||||
// try {
|
||||
// File localZipParentFile= file.getParentFile() ;
|
||||
// File[] listFiles = localZipParentFile.listFiles();
|
||||
// if(listFiles!=null && listFiles.length==0)
|
||||
// FileUtils.deleteDirectory(localZipParentFile);
|
||||
// } catch (IOException e) {
|
||||
// log.error(">>>>>>>>[error] file parent is not deleted>>>>>>>>" + e.getMessage());
|
||||
// }
|
||||
// }else {
|
||||
// log.error(">>>>>>>>[error] file is not exists>>>>>>>>" + file);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
public static void toZipFiles(List<File> files, String zipFilename) throws Exception {
|
||||
try {
|
||||
File file = new File(zipFilename);
|
||||
if (!file.exists()) {
|
||||
String path = zipFilename.substring(0, zipFilename.lastIndexOf("/")) ;
|
||||
if(!new File(path).exists()) {
|
||||
new File(path).mkdirs();
|
||||
}
|
||||
file.createNewFile();
|
||||
}
|
||||
FileOutputStream fous = new FileOutputStream(file);
|
||||
ZipOutputStream zipOut = new ZipOutputStream(fous);
|
||||
zipFile(files, zipOut);
|
||||
zipOut.close();
|
||||
fous.close();
|
||||
if (file.exists()) {
|
||||
log.info(">>>>>>>>[success] zip file is generated success>>>>>>>>" + file);
|
||||
log.info(">>>>>>>>fils will be delete>>>>>>>>" );
|
||||
log.info(">>>>>>>>fils is deleting>>>>>>>>" );
|
||||
delZipFiles(files);
|
||||
}else {
|
||||
log.error(">>>>>>>>[error] zip file is not generated success>>>>>>>>" + file);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// try {
|
||||
// File file = new File(zipFilename);
|
||||
// if (!file.exists()) {
|
||||
// String path = zipFilename.substring(0, zipFilename.lastIndexOf("/")) ;
|
||||
// if(!new File(path).exists()) {
|
||||
// new File(path).mkdirs();
|
||||
// }
|
||||
// file.createNewFile();
|
||||
// }
|
||||
// FileOutputStream fous = new FileOutputStream(file);
|
||||
// ZipOutputStream zipOut = new ZipOutputStream(fous);
|
||||
// zipFile(files, zipOut);
|
||||
// zipOut.close();
|
||||
// fous.close();
|
||||
// if (file.exists()) {
|
||||
// log.info(">>>>>>>>[success] zip file is generated success>>>>>>>>" + file);
|
||||
// log.info(">>>>>>>>fils will be delete>>>>>>>>" );
|
||||
// log.info(">>>>>>>>fils is deleting>>>>>>>>" );
|
||||
// delZipFiles(files);
|
||||
// }else {
|
||||
// log.error(">>>>>>>>[error] zip file is not generated success>>>>>>>>" + file);
|
||||
// }
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
}
|
||||
|
||||
public static void zipFile(List<File> files, ZipOutputStream outputStream) {
|
||||
|
||||
@ -13,16 +13,16 @@ import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import jbo.image.ECM_PAGE;
|
||||
import jbo.image.IMAGE_CODE_INFO;
|
||||
//import jbo.image.ECM_PAGE;
|
||||
//import jbo.image.IMAGE_CODE_INFO;
|
||||
import sun.misc.BASE64Decoder;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import com.amarsoft.app.als.sys.tools.JBOHelper;
|
||||
import com.amarsoft.app.contentmanage.Content;
|
||||
import com.amarsoft.app.contentmanage.ContentManager;
|
||||
import com.amarsoft.app.contentmanage.DefaultContentManagerImpl;
|
||||
import com.amarsoft.app.contentmanage.action.ContentManagerAction;
|
||||
//import com.amarsoft.app.contentmanage.Content;
|
||||
//import com.amarsoft.app.contentmanage.ContentManager;
|
||||
//import com.amarsoft.app.contentmanage.DefaultContentManagerImpl;
|
||||
//import com.amarsoft.app.contentmanage.action.ContentManagerAction;
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -31,7 +31,7 @@ import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.lang.DateX;
|
||||
import com.amarsoft.are.lang.StringX;
|
||||
import com.amarsoft.webservice.util.CodeTrans;
|
||||
//import com.amarsoft.webservice.util.CodeTrans;
|
||||
|
||||
/**
|
||||
* Ó°ÏñͼƬ´«Êä´æ´¢
|
||||
@ -97,52 +97,52 @@ public class ActiveXServlet extends HttpServlet{
|
||||
* @return
|
||||
*/
|
||||
public String transImage(String userID,String orgID,String images,String imageType){
|
||||
String[] imgs = images.split("\\|");
|
||||
String barCodeNo = "";
|
||||
String imageInfo = "batchScan";//local/scan/batchScan/batchScanCopy/barCode
|
||||
String ObjectNo="UnKnow",ObjectType="UnKnow",ImageType="UnKnow";
|
||||
for(int i = 0;i<imgs.length;i++){
|
||||
imageInfo = "batchScan";
|
||||
ObjectNo = "UnKnow";
|
||||
ObjectType = "UnKnow";
|
||||
ImageType = "UnKnow";
|
||||
byte[] b = CodeTrans.String2Byte(imgs[i].replace(" ", "+"));
|
||||
InputStream is = new ByteArrayInputStream(b);
|
||||
String s = QRUtil.read(is);
|
||||
//s = "2014081900000008";
|
||||
if(s!=null && !"".equals(s)){
|
||||
barCodeNo = s;
|
||||
//识别到条形码,单张资料或堆叠的第一张
|
||||
imageInfo = "batchScan";
|
||||
ARE.getLog().debug("获取到条形码:"+s);
|
||||
}else{
|
||||
//该资料为堆叠资料,条码只贴在了第一张上
|
||||
imageInfo = "batchScanCopy";
|
||||
ARE.getLog().debug("该页面未获取到条形码,将默认为之前扫描到的条形码:"+barCodeNo);
|
||||
}
|
||||
|
||||
ARE.getLog().debug("开始存储该项下影像数据...");
|
||||
try{
|
||||
//查找该条形码流水号是否在记录表中
|
||||
BizObject bocl = JBOHelper.getBizObjectByCondition(IMAGE_CODE_INFO.CLASS_NAME, "o", "serialNo =:SerialNo", barCodeNo);
|
||||
if(bocl == null){
|
||||
ARE.getLog().warn("未找到条形码"+barCodeNo+"的相关信息,无法将后续影像进行归类");
|
||||
barCodeNo = "";
|
||||
ObjectNo = "UnKnow";
|
||||
ObjectType = "UnKnow";
|
||||
ImageType = "UnKnow";
|
||||
}else{
|
||||
if (bocl != null){
|
||||
ObjectNo = bocl.getAttribute("ObjectNo").getString();
|
||||
ObjectType = bocl.getAttribute("ObjectType").getString();
|
||||
ImageType = bocl.getAttribute("ImageType").getString();
|
||||
}
|
||||
}
|
||||
}catch(Exception e){
|
||||
ARE.getLog().warn("获取图片信息出错!");
|
||||
}
|
||||
batchSaveImage(ObjectType, ObjectNo, ImageType, imgs[i], userID, orgID, imageType, imageInfo);
|
||||
}
|
||||
// String[] imgs = images.split("\\|");
|
||||
// String barCodeNo = "";
|
||||
// String imageInfo = "batchScan";//local/scan/batchScan/batchScanCopy/barCode
|
||||
// String ObjectNo="UnKnow",ObjectType="UnKnow",ImageType="UnKnow";
|
||||
// for(int i = 0;i<imgs.length;i++){
|
||||
// imageInfo = "batchScan";
|
||||
// ObjectNo = "UnKnow";
|
||||
// ObjectType = "UnKnow";
|
||||
// ImageType = "UnKnow";
|
||||
// byte[] b = CodeTrans.String2Byte(imgs[i].replace(" ", "+"));
|
||||
// InputStream is = new ByteArrayInputStream(b);
|
||||
// String s = QRUtil.read(is);
|
||||
// //s = "2014081900000008";
|
||||
// if(s!=null && !"".equals(s)){
|
||||
// barCodeNo = s;
|
||||
// //识别到条形码,单张资料或堆叠的第一张
|
||||
// imageInfo = "batchScan";
|
||||
// ARE.getLog().debug("获取到条形码:"+s);
|
||||
// }else{
|
||||
// //该资料为堆叠资料,条码只贴在了第一张上
|
||||
// imageInfo = "batchScanCopy";
|
||||
// ARE.getLog().debug("该页面未获取到条形码,将默认为之前扫描到的条形码:"+barCodeNo);
|
||||
// }
|
||||
//
|
||||
// ARE.getLog().debug("开始存储该项下影像数据...");
|
||||
// try{
|
||||
// //查找该条形码流水号是否在记录表中
|
||||
// BizObject bocl = JBOHelper.getBizObjectByCondition(IMAGE_CODE_INFO.CLASS_NAME, "o", "serialNo =:SerialNo", barCodeNo);
|
||||
// if(bocl == null){
|
||||
// ARE.getLog().warn("未找到条形码"+barCodeNo+"的相关信息,无法将后续影像进行归类");
|
||||
// barCodeNo = "";
|
||||
// ObjectNo = "UnKnow";
|
||||
// ObjectType = "UnKnow";
|
||||
// ImageType = "UnKnow";
|
||||
// }else{
|
||||
// if (bocl != null){
|
||||
// ObjectNo = bocl.getAttribute("ObjectNo").getString();
|
||||
// ObjectType = bocl.getAttribute("ObjectType").getString();
|
||||
// ImageType = bocl.getAttribute("ImageType").getString();
|
||||
// }
|
||||
// }
|
||||
// }catch(Exception e){
|
||||
// ARE.getLog().warn("获取图片信息出错!");
|
||||
// }
|
||||
// batchSaveImage(ObjectType, ObjectNo, ImageType, imgs[i], userID, orgID, imageType, imageInfo);
|
||||
// }
|
||||
return "Finish";
|
||||
}
|
||||
|
||||
@ -163,85 +163,86 @@ public class ActiveXServlet extends HttpServlet{
|
||||
String image, String userId, String orgId,
|
||||
String imageType, String imageInfo) {
|
||||
|
||||
if (!(ContentManagerAction.IsUseContentManager && ContentManagerAction.isConfCorrect))
|
||||
return "";
|
||||
ContentManager contentManager = ContentManagerAction.getContentManager();
|
||||
if (contentManager == null)
|
||||
return "";
|
||||
String retStr = "Success";
|
||||
|
||||
Content tempContent = null;
|
||||
|
||||
int pageNum = 1;
|
||||
String Ssql = null;
|
||||
|
||||
// ----新上传的图片信息
|
||||
byte[] b = CodeTrans.String2Byte(image.replace(" ", "+"));
|
||||
InputStream is = new ByteArrayInputStream(b);
|
||||
tempContent = new Content();
|
||||
tempContent.setInputStream(is);
|
||||
|
||||
tempContent.setDesc("");
|
||||
String randomStr = String.valueOf(Math.random()).substring(2);
|
||||
if (randomStr.length() < 8) {
|
||||
randomStr += "0000000";
|
||||
}
|
||||
tempContent.setName(fileNameDateFormat.format(new Date()) + "_"
|
||||
+ (randomStr.substring(0, 8)) + "." + imageType);
|
||||
String uploadDocId = contentManager.save(tempContent,
|
||||
ContentManager.FOLDER_IMAGE);
|
||||
|
||||
// 1.获取当前的pageNum---2.插入数据到ECM_PAGE中
|
||||
JBOTransaction tx = null;
|
||||
try {
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
BizObjectManager bomcl = JBOFactory.getBizObjectManager(ECM_PAGE.CLASS_NAME);
|
||||
tx.join(bomcl);
|
||||
BizObject bocl = null;
|
||||
if(!"UnKnow".equals(ObjectNo)){
|
||||
Ssql = "Select Max(PageNum) as v.max from o where ObjectNo=:ObjectNo and ObjectType=:ObjectType and TypeNo=:TypeNo";
|
||||
bocl = bomcl.createQuery(Ssql).setParameter("ObjectNo",ObjectNo)
|
||||
.setParameter("ObjectType",ObjectType)
|
||||
.setParameter("TypeNo",TypeNo)
|
||||
.getSingleResult(false);
|
||||
if(bocl != null){
|
||||
//实际第*张
|
||||
pageNum = bocl.getAttribute("max").getInt()+1;
|
||||
}else{
|
||||
//初始化为第一张
|
||||
pageNum = 1;
|
||||
}
|
||||
}
|
||||
bocl = bomcl.newObject();
|
||||
bocl.setAttributeValue("ObjectType", ObjectType);
|
||||
bocl.setAttributeValue("ObjectNo", ObjectNo);
|
||||
bocl.setAttributeValue("TypeNo", TypeNo);
|
||||
bocl.setAttributeValue("DocumentId", uploadDocId);
|
||||
bocl.setAttributeValue("PageNum", pageNum);
|
||||
bocl.setAttributeValue("ModifyTime", insertPicDateFormat.format(new Date()));
|
||||
bocl.setAttributeValue("ImageInfo", imageInfo);
|
||||
bocl.setAttributeValue("OperateUser", userId);
|
||||
bocl.setAttributeValue("OperateOrg", orgId);
|
||||
bocl.setAttributeValue("Remark", "");
|
||||
bomcl.saveObject(bocl);
|
||||
tx.commit();
|
||||
ARE.getLog().trace("插入一条记录: " + uploadDocId);
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
tx.rollback();
|
||||
} catch (JBOException e1) {
|
||||
ARE.getLog().error("回滚数据库连接出错", e);
|
||||
}
|
||||
ARE.getLog().trace("插入影像数据记录出错!",e);
|
||||
} finally {
|
||||
try {
|
||||
tx.commit();
|
||||
} catch (JBOException e) {
|
||||
ARE.getLog().error("关闭数据库连接出错", e);
|
||||
}
|
||||
}
|
||||
ARE.getLog().trace(retStr);
|
||||
return retStr;
|
||||
// if (!(ContentManagerAction.IsUseContentManager && ContentManagerAction.isConfCorrect))
|
||||
// return "";
|
||||
// ContentManager contentManager = ContentManagerAction.getContentManager();
|
||||
// if (contentManager == null)
|
||||
// return "";
|
||||
// String retStr = "Success";
|
||||
//
|
||||
// Content tempContent = null;
|
||||
//
|
||||
// int pageNum = 1;
|
||||
// String Ssql = null;
|
||||
//
|
||||
// // ----新上传的图片信息
|
||||
// byte[] b = CodeTrans.String2Byte(image.replace(" ", "+"));
|
||||
// InputStream is = new ByteArrayInputStream(b);
|
||||
// tempContent = new Content();
|
||||
// tempContent.setInputStream(is);
|
||||
//
|
||||
// tempContent.setDesc("");
|
||||
// String randomStr = String.valueOf(Math.random()).substring(2);
|
||||
// if (randomStr.length() < 8) {
|
||||
// randomStr += "0000000";
|
||||
// }
|
||||
// tempContent.setName(fileNameDateFormat.format(new Date()) + "_"
|
||||
// + (randomStr.substring(0, 8)) + "." + imageType);
|
||||
// String uploadDocId = contentManager.save(tempContent,
|
||||
// ContentManager.FOLDER_IMAGE);
|
||||
//
|
||||
// // 1.获取当前的pageNum---2.插入数据到ECM_PAGE中
|
||||
// JBOTransaction tx = null;
|
||||
// try {
|
||||
// tx = JBOFactory.createJBOTransaction();
|
||||
// BizObjectManager bomcl = JBOFactory.getBizObjectManager(ECM_PAGE.CLASS_NAME);
|
||||
// tx.join(bomcl);
|
||||
// BizObject bocl = null;
|
||||
// if(!"UnKnow".equals(ObjectNo)){
|
||||
// Ssql = "Select Max(PageNum) as v.max from o where ObjectNo=:ObjectNo and ObjectType=:ObjectType and TypeNo=:TypeNo";
|
||||
// bocl = bomcl.createQuery(Ssql).setParameter("ObjectNo",ObjectNo)
|
||||
// .setParameter("ObjectType",ObjectType)
|
||||
// .setParameter("TypeNo",TypeNo)
|
||||
// .getSingleResult(false);
|
||||
// if(bocl != null){
|
||||
// //实际第*张
|
||||
// pageNum = bocl.getAttribute("max").getInt()+1;
|
||||
// }else{
|
||||
// //初始化为第一张
|
||||
// pageNum = 1;
|
||||
// }
|
||||
// }
|
||||
// bocl = bomcl.newObject();
|
||||
// bocl.setAttributeValue("ObjectType", ObjectType);
|
||||
// bocl.setAttributeValue("ObjectNo", ObjectNo);
|
||||
// bocl.setAttributeValue("TypeNo", TypeNo);
|
||||
// bocl.setAttributeValue("DocumentId", uploadDocId);
|
||||
// bocl.setAttributeValue("PageNum", pageNum);
|
||||
// bocl.setAttributeValue("ModifyTime", insertPicDateFormat.format(new Date()));
|
||||
// bocl.setAttributeValue("ImageInfo", imageInfo);
|
||||
// bocl.setAttributeValue("OperateUser", userId);
|
||||
// bocl.setAttributeValue("OperateOrg", orgId);
|
||||
// bocl.setAttributeValue("Remark", "");
|
||||
// bomcl.saveObject(bocl);
|
||||
// tx.commit();
|
||||
// ARE.getLog().trace("插入一条记录: " + uploadDocId);
|
||||
// } catch (Exception e) {
|
||||
// try {
|
||||
// tx.rollback();
|
||||
// } catch (JBOException e1) {
|
||||
// ARE.getLog().error("回滚数据库连接出错", e);
|
||||
// }
|
||||
// ARE.getLog().trace("插入影像数据记录出错!",e);
|
||||
// } finally {
|
||||
// try {
|
||||
// tx.commit();
|
||||
// } catch (JBOException e) {
|
||||
// ARE.getLog().error("关闭数据库连接出错", e);
|
||||
// }
|
||||
// }
|
||||
// ARE.getLog().trace(retStr);
|
||||
// return retStr;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -250,19 +251,20 @@ public class ActiveXServlet extends HttpServlet{
|
||||
* @return
|
||||
*/
|
||||
public String getImage( String ids) {
|
||||
ARE.getLog().debug(ids);
|
||||
if(StringX.isEmpty(ids) ||
|
||||
!(ContentManagerAction.IsUseContentManager && ContentManagerAction.isConfCorrect ) ) return "";
|
||||
String[] idArr = ids.split("\\|");
|
||||
StringBuffer imageBuf = new StringBuffer();
|
||||
for (int i = 0; i < idArr.length; i++) {
|
||||
String singleImage = getSingleImage( idArr[i]);
|
||||
if(! StringX.isEmpty(singleImage)){
|
||||
imageBuf.append(singleImage);
|
||||
if( i!=idArr.length-1 ) imageBuf.append("|");
|
||||
}
|
||||
}
|
||||
return imageBuf.toString();
|
||||
// ARE.getLog().debug(ids);
|
||||
// if(StringX.isEmpty(ids) ||
|
||||
// !(ContentManagerAction.IsUseContentManager && ContentManagerAction.isConfCorrect ) ) return "";
|
||||
// String[] idArr = ids.split("\\|");
|
||||
// StringBuffer imageBuf = new StringBuffer();
|
||||
// for (int i = 0; i < idArr.length; i++) {
|
||||
// String singleImage = getSingleImage( idArr[i]);
|
||||
// if(! StringX.isEmpty(singleImage)){
|
||||
// imageBuf.append(singleImage);
|
||||
// if( i!=idArr.length-1 ) imageBuf.append("|");
|
||||
// }
|
||||
// }
|
||||
// return imageBuf.toString();
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -271,42 +273,43 @@ public class ActiveXServlet extends HttpServlet{
|
||||
* @return
|
||||
*/
|
||||
public String getSingleImage(String id){
|
||||
String singleImageStr="";
|
||||
if(StringX.isEmpty(id) ||
|
||||
!(ContentManagerAction.IsUseContentManager && ContentManagerAction.isConfCorrect ) ) return "";
|
||||
ContentManager contentManager = ContentManagerAction.getContentManager();
|
||||
if(contentManager==null) return "";
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
byte[] bytes = new byte[10240];
|
||||
|
||||
Content content = contentManager.get(id);
|
||||
if(content==null) return "";
|
||||
|
||||
InputStream is = content.getInputStream();
|
||||
String desc = content.getDesc();
|
||||
// 读取图片字节数组
|
||||
try {
|
||||
int k = -1;
|
||||
while((k=is.read(bytes))>0){
|
||||
bos.write(bytes, 0, k);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) { e.printStackTrace(); }
|
||||
}
|
||||
// 对字节数组Base64编码
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
if(bos.size()>0) {
|
||||
singleImageStr = encoder.encode(bos.toByteArray());
|
||||
bos.reset();
|
||||
}
|
||||
String tempStr = encoder.encode(desc.getBytes());
|
||||
//ARE.getLog().trace("*******encoder之前:"+desc+"\n之后:"+tempStr);
|
||||
return singleImageStr+"^"+tempStr;
|
||||
// String singleImageStr="";
|
||||
// if(StringX.isEmpty(id) ||
|
||||
// !(ContentManagerAction.IsUseContentManager && ContentManagerAction.isConfCorrect ) ) return "";
|
||||
// ContentManager contentManager = ContentManagerAction.getContentManager();
|
||||
// if(contentManager==null) return "";
|
||||
//
|
||||
// ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
// byte[] bytes = new byte[10240];
|
||||
//
|
||||
// Content content = contentManager.get(id);
|
||||
// if(content==null) return "";
|
||||
//
|
||||
// InputStream is = content.getInputStream();
|
||||
// String desc = content.getDesc();
|
||||
// // 读取图片字节数组
|
||||
// try {
|
||||
// int k = -1;
|
||||
// while((k=is.read(bytes))>0){
|
||||
// bos.write(bytes, 0, k);
|
||||
// }
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }finally{
|
||||
// try {
|
||||
// is.close();
|
||||
// } catch (IOException e) { e.printStackTrace(); }
|
||||
// }
|
||||
// // 对字节数组Base64编码
|
||||
// BASE64Encoder encoder = new BASE64Encoder();
|
||||
// if(bos.size()>0) {
|
||||
// singleImageStr = encoder.encode(bos.toByteArray());
|
||||
// bos.reset();
|
||||
// }
|
||||
// String tempStr = encoder.encode(desc.getBytes());
|
||||
// //ARE.getLog().trace("*******encoder之前:"+desc+"\n之后:"+tempStr);
|
||||
// return singleImageStr+"^"+tempStr;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -321,190 +324,191 @@ public class ActiveXServlet extends HttpServlet{
|
||||
*/
|
||||
public String saveImage(String ObjectType, String ObjectNo, String TypeNo,
|
||||
String imageAndActiveXids, String userId, String orgId) {
|
||||
if(!(ContentManagerAction.IsUseContentManager && ContentManagerAction.isConfCorrect ) ) return "";
|
||||
ContentManager contentManager = ContentManagerAction.getContentManager();
|
||||
if(contentManager==null) return "";
|
||||
String retStr = "";
|
||||
//图片信息、IDs顺序字符串、需要删除的IDs、备注信息,这四项之间的分割符
|
||||
String S1 = "\\|!";
|
||||
//多个图片或多个id的分割符
|
||||
String S2 = "\\|";
|
||||
//infos中的每个id与info的分割符
|
||||
String S3 = "\\^";
|
||||
String[] imageStrArr = null;
|
||||
String[] activeX_Ids = null, needDelIds=null, infos=null;
|
||||
if(! StringX.isEmpty(imageAndActiveXids) ) {
|
||||
String[] tempArr = imageAndActiveXids.split(S1, -1);
|
||||
ARE.getLog().trace("要上传的图片(base64编码)*******"+ tempArr[0]);
|
||||
ARE.getLog().trace("插件中各个图片的ID(或路径)的顺序*******"+ tempArr[1]);
|
||||
ARE.getLog().trace("要删除的图片ID(或路径)*******"+ tempArr[2]);
|
||||
ARE.getLog().trace("要设置的备注*******"+ tempArr[3]);
|
||||
imageStrArr=tempArr[0].length()>0?tempArr[0].split(S2):null;
|
||||
activeX_Ids = tempArr[1].split(S2, -1);
|
||||
needDelIds = tempArr[2].length()>0?tempArr[2].split(S2):null;
|
||||
infos = tempArr[3].length()>0?tempArr[3].split(S2):null;
|
||||
}
|
||||
Content tempContent = null;
|
||||
JBOTransaction tx = null;
|
||||
try {
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
} catch (JBOException e2) {
|
||||
ARE.getLog().error("创建JBO事务出错!",e2);
|
||||
}
|
||||
BASE64Decoder decoder = new BASE64Decoder();
|
||||
//----新上传的图片信息及其备注
|
||||
for (int i = 0, j=0; imageStrArr!=null && activeX_Ids!=null && i<imageStrArr.length; i++) {
|
||||
String[] arr = imageStrArr[i].split(S3, -1);
|
||||
byte[] b = CodeTrans.String2Byte(arr[0].replace(" ", "+"));
|
||||
InputStream is = new ByteArrayInputStream(b);
|
||||
tempContent = new Content();
|
||||
tempContent.setInputStream(is);
|
||||
String tempImageInfo = "", tempImageFileType = "", tempLocalOrScan = "" ;
|
||||
if(arr.length>=3){
|
||||
try {
|
||||
//备注
|
||||
tempImageInfo = new String(decoder.decodeBuffer(arr[1].replace(" ", "+")));
|
||||
//ARE.getLog().trace("************decoder之前:"+arr[1]+"\n之后:"+tempStr);
|
||||
} catch (Exception e1) {
|
||||
ARE.getLog().error("解码备注信息时,出错",e1);
|
||||
tempImageInfo = arr[1];
|
||||
}
|
||||
try{
|
||||
String[] strs = arr[2].split("@");
|
||||
tempLocalOrScan = strs[0];
|
||||
tempImageFileType = strs[1];
|
||||
}catch(Exception e){
|
||||
ARE.getLog().error("获取图片文件类型及图片是本地上传或从设备采集时,出错",e);
|
||||
tempLocalOrScan = "scan";
|
||||
tempImageFileType = "jpeg";
|
||||
}
|
||||
}
|
||||
tempContent.setDesc(tempImageInfo);
|
||||
String randomStr = String.valueOf(Math.random()).substring(2);
|
||||
if(randomStr.length()<8){randomStr += "0000000"; }
|
||||
tempContent.setName(fileNameDateFormat.format(new Date())+"_"+(randomStr.substring(0,8))+"."+tempImageFileType);
|
||||
String uploadDocId = contentManager.save(tempContent, ContentManager.FOLDER_IMAGE );
|
||||
//把新增的图片id更新回id顺序数组activeX_Ids中
|
||||
for(int j2=j; j2<activeX_Ids.length; j2++){
|
||||
if(StringX.isEmpty(activeX_Ids[j2])) {
|
||||
activeX_Ids[j2] = uploadDocId;
|
||||
j=j2+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---插入数据到ECM_PAGE中
|
||||
try{
|
||||
BizObjectManager bomcl = JBOFactory.getBizObjectManager(ECM_PAGE.CLASS_NAME);
|
||||
tx.join(bomcl);
|
||||
String SerialNo = DateX.format(new Date(), "yyyyMMddHHmmss") + String.valueOf(Math.random()).substring(2, 8);
|
||||
BizObject bocl = bomcl.newObject();
|
||||
bocl.setAttributeValue("ObjectType", ObjectType);
|
||||
bocl.setAttributeValue("ObjectNo", ObjectNo);
|
||||
bocl.setAttributeValue("TypeNo", TypeNo);
|
||||
bocl.setAttributeValue("DocumentId", uploadDocId);
|
||||
bocl.setAttributeValue("PageNum", i+1);
|
||||
bocl.setAttributeValue("ModifyTime", insertPicDateFormat.format(new Date()));
|
||||
bocl.setAttributeValue("ImageInfo", tempLocalOrScan);
|
||||
bocl.setAttributeValue("OperateUser", userId);
|
||||
bocl.setAttributeValue("OperateOrg", orgId);
|
||||
bocl.setAttributeValue("Remark", tempImageInfo);
|
||||
bocl.setAttributeValue("SerialNo", SerialNo);
|
||||
bomcl.saveObject(bocl);
|
||||
ARE.getLog().trace("插入一条记录: "+uploadDocId);
|
||||
|
||||
}catch(Exception e){
|
||||
ARE.getLog().debug("插入影像数据记录出错!",e);
|
||||
}
|
||||
}
|
||||
//----对原有图片的备注的修改,设置内容管理平台的备注
|
||||
for(int info_i=0; infos!=null && info_i<infos.length; info_i++){
|
||||
String[] info_arr = infos[info_i].split(S3);
|
||||
String temp = null;
|
||||
if(info_arr.length>=2){
|
||||
try {
|
||||
temp = new String(decoder.decodeBuffer(info_arr[1]));
|
||||
} catch (Exception e1) {
|
||||
temp = info_arr[1];
|
||||
}
|
||||
}
|
||||
ARE.getLog().trace("设置文档对象(id:"+info_arr[0]+")的desc: "+ temp);
|
||||
contentManager.setDesc(info_arr[0], info_arr.length>=2?temp:"");
|
||||
//若未使用内容管理平台,则保存信息到ECM_PAGE表中的备注字段
|
||||
if( contentManager instanceof DefaultContentManagerImpl){
|
||||
try {
|
||||
BizObjectManager bomcl = JBOFactory.getBizObjectManager(ECM_PAGE.CLASS_NAME);
|
||||
tx.join(bomcl);
|
||||
String Ssql = "update o set remark=:Remark where documentId=:DocumentId and objectNo=ObjectNo";
|
||||
bomcl.createQuery(Ssql).setParameter("Remark",info_arr.length>=2?temp:"")
|
||||
.setParameter("DocumentId",info_arr[0])
|
||||
.setParameter("ObjectNo",ObjectNo).executeUpdate();
|
||||
|
||||
ARE.getLog().trace("更新一条记录:"+info_arr[0]+ "的备注信息:"+(info_arr.length>=2?temp:"") );
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
BizObjectManager bomcl = JBOFactory.getBizObjectManager(ECM_PAGE.CLASS_NAME);
|
||||
tx.join(bomcl);
|
||||
for(int j=0; needDelIds!=null && j<needDelIds.length; j++){
|
||||
contentManager.delete(needDelIds[j]);
|
||||
}
|
||||
String allIdStr = "";
|
||||
for(int i =0; i<activeX_Ids.length; i++){
|
||||
allIdStr = allIdStr +",'"+activeX_Ids[i]+"'";
|
||||
}
|
||||
|
||||
if(needDelIds!=null && needDelIds.length>0){
|
||||
String tempDelIds = "'";
|
||||
for(String id : needDelIds){
|
||||
tempDelIds = tempDelIds + id +"','";
|
||||
}
|
||||
tempDelIds = tempDelIds.substring(0, tempDelIds.length()-2);
|
||||
String delSql = "delete from o where objectType=:ObjectType and objectNo=:ObjectNo and typeNo=:TypeNo and documentId in("+ tempDelIds +") ";
|
||||
ARE.getLog().info(delSql);
|
||||
bomcl.createQuery(delSql).setParameter("ObjectType",ObjectType)
|
||||
.setParameter("ObjectNo",ObjectNo)
|
||||
.setParameter("TypeNo",TypeNo).executeUpdate();
|
||||
}
|
||||
|
||||
if(activeX_Ids!=null && activeX_Ids.length>0){
|
||||
for(int i =0; activeX_Ids!=null && i<activeX_Ids.length; i++){
|
||||
if(StringX.isEmpty(activeX_Ids[i])){
|
||||
continue;
|
||||
}
|
||||
String Ssql = "update o set pageNum=:PageNum where documentId=:DocumentId and objectNo=:ObjectNo";
|
||||
bomcl.createQuery(Ssql).setParameter("PageNum",i+1)
|
||||
.setParameter("DocumentId",activeX_Ids[i])
|
||||
.setParameter("ObjectNo",ObjectNo).executeUpdate();
|
||||
|
||||
ARE.getLog().trace("更新"+activeX_Ids[i]+ "的编号为"+(i+1));
|
||||
retStr = retStr+"|"+activeX_Ids[i];
|
||||
}
|
||||
}
|
||||
tx.commit();
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
tx.rollback();
|
||||
} catch (JBOException e1) {
|
||||
ARE.getLog().error("事务回滚出错!",e);
|
||||
}
|
||||
ARE.getLog().error("更新DocId出错",e);
|
||||
return "";
|
||||
} finally {
|
||||
try {
|
||||
if(tx!=null){
|
||||
tx.commit();
|
||||
}
|
||||
} catch (JBOException e) {
|
||||
ARE.getLog().error("关闭数据库连接出错",e);
|
||||
}
|
||||
}
|
||||
retStr = retStr.length()>0?retStr.substring(1):"";
|
||||
ARE.getLog().trace(retStr);
|
||||
return retStr;
|
||||
// if(!(ContentManagerAction.IsUseContentManager && ContentManagerAction.isConfCorrect ) ) return "";
|
||||
// ContentManager contentManager = ContentManagerAction.getContentManager();
|
||||
// if(contentManager==null) return "";
|
||||
// String retStr = "";
|
||||
// //图片信息、IDs顺序字符串、需要删除的IDs、备注信息,这四项之间的分割符
|
||||
// String S1 = "\\|!";
|
||||
// //多个图片或多个id的分割符
|
||||
// String S2 = "\\|";
|
||||
// //infos中的每个id与info的分割符
|
||||
// String S3 = "\\^";
|
||||
// String[] imageStrArr = null;
|
||||
// String[] activeX_Ids = null, needDelIds=null, infos=null;
|
||||
// if(! StringX.isEmpty(imageAndActiveXids) ) {
|
||||
// String[] tempArr = imageAndActiveXids.split(S1, -1);
|
||||
// ARE.getLog().trace("要上传的图片(base64编码)*******"+ tempArr[0]);
|
||||
// ARE.getLog().trace("插件中各个图片的ID(或路径)的顺序*******"+ tempArr[1]);
|
||||
// ARE.getLog().trace("要删除的图片ID(或路径)*******"+ tempArr[2]);
|
||||
// ARE.getLog().trace("要设置的备注*******"+ tempArr[3]);
|
||||
// imageStrArr=tempArr[0].length()>0?tempArr[0].split(S2):null;
|
||||
// activeX_Ids = tempArr[1].split(S2, -1);
|
||||
// needDelIds = tempArr[2].length()>0?tempArr[2].split(S2):null;
|
||||
// infos = tempArr[3].length()>0?tempArr[3].split(S2):null;
|
||||
// }
|
||||
// Content tempContent = null;
|
||||
// JBOTransaction tx = null;
|
||||
// try {
|
||||
// tx = JBOFactory.createJBOTransaction();
|
||||
// } catch (JBOException e2) {
|
||||
// ARE.getLog().error("创建JBO事务出错!",e2);
|
||||
// }
|
||||
// BASE64Decoder decoder = new BASE64Decoder();
|
||||
// //----新上传的图片信息及其备注
|
||||
// for (int i = 0, j=0; imageStrArr!=null && activeX_Ids!=null && i<imageStrArr.length; i++) {
|
||||
// String[] arr = imageStrArr[i].split(S3, -1);
|
||||
// byte[] b = CodeTrans.String2Byte(arr[0].replace(" ", "+"));
|
||||
// InputStream is = new ByteArrayInputStream(b);
|
||||
// tempContent = new Content();
|
||||
// tempContent.setInputStream(is);
|
||||
// String tempImageInfo = "", tempImageFileType = "", tempLocalOrScan = "" ;
|
||||
// if(arr.length>=3){
|
||||
// try {
|
||||
// //备注
|
||||
// tempImageInfo = new String(decoder.decodeBuffer(arr[1].replace(" ", "+")));
|
||||
// //ARE.getLog().trace("************decoder之前:"+arr[1]+"\n之后:"+tempStr);
|
||||
// } catch (Exception e1) {
|
||||
// ARE.getLog().error("解码备注信息时,出错",e1);
|
||||
// tempImageInfo = arr[1];
|
||||
// }
|
||||
// try{
|
||||
// String[] strs = arr[2].split("@");
|
||||
// tempLocalOrScan = strs[0];
|
||||
// tempImageFileType = strs[1];
|
||||
// }catch(Exception e){
|
||||
// ARE.getLog().error("获取图片文件类型及图片是本地上传或从设备采集时,出错",e);
|
||||
// tempLocalOrScan = "scan";
|
||||
// tempImageFileType = "jpeg";
|
||||
// }
|
||||
// }
|
||||
// tempContent.setDesc(tempImageInfo);
|
||||
// String randomStr = String.valueOf(Math.random()).substring(2);
|
||||
// if(randomStr.length()<8){randomStr += "0000000"; }
|
||||
// tempContent.setName(fileNameDateFormat.format(new Date())+"_"+(randomStr.substring(0,8))+"."+tempImageFileType);
|
||||
// String uploadDocId = contentManager.save(tempContent, ContentManager.FOLDER_IMAGE );
|
||||
// //把新增的图片id更新回id顺序数组activeX_Ids中
|
||||
// for(int j2=j; j2<activeX_Ids.length; j2++){
|
||||
// if(StringX.isEmpty(activeX_Ids[j2])) {
|
||||
// activeX_Ids[j2] = uploadDocId;
|
||||
// j=j2+1;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// //---插入数据到ECM_PAGE中
|
||||
// try{
|
||||
// BizObjectManager bomcl = JBOFactory.getBizObjectManager(ECM_PAGE.CLASS_NAME);
|
||||
// tx.join(bomcl);
|
||||
// String SerialNo = DateX.format(new Date(), "yyyyMMddHHmmss") + String.valueOf(Math.random()).substring(2, 8);
|
||||
// BizObject bocl = bomcl.newObject();
|
||||
// bocl.setAttributeValue("ObjectType", ObjectType);
|
||||
// bocl.setAttributeValue("ObjectNo", ObjectNo);
|
||||
// bocl.setAttributeValue("TypeNo", TypeNo);
|
||||
// bocl.setAttributeValue("DocumentId", uploadDocId);
|
||||
// bocl.setAttributeValue("PageNum", i+1);
|
||||
// bocl.setAttributeValue("ModifyTime", insertPicDateFormat.format(new Date()));
|
||||
// bocl.setAttributeValue("ImageInfo", tempLocalOrScan);
|
||||
// bocl.setAttributeValue("OperateUser", userId);
|
||||
// bocl.setAttributeValue("OperateOrg", orgId);
|
||||
// bocl.setAttributeValue("Remark", tempImageInfo);
|
||||
// bocl.setAttributeValue("SerialNo", SerialNo);
|
||||
// bomcl.saveObject(bocl);
|
||||
// ARE.getLog().trace("插入一条记录: "+uploadDocId);
|
||||
//
|
||||
// }catch(Exception e){
|
||||
// ARE.getLog().debug("插入影像数据记录出错!",e);
|
||||
// }
|
||||
// }
|
||||
// //----对原有图片的备注的修改,设置内容管理平台的备注
|
||||
// for(int info_i=0; infos!=null && info_i<infos.length; info_i++){
|
||||
// String[] info_arr = infos[info_i].split(S3);
|
||||
// String temp = null;
|
||||
// if(info_arr.length>=2){
|
||||
// try {
|
||||
// temp = new String(decoder.decodeBuffer(info_arr[1]));
|
||||
// } catch (Exception e1) {
|
||||
// temp = info_arr[1];
|
||||
// }
|
||||
// }
|
||||
// ARE.getLog().trace("设置文档对象(id:"+info_arr[0]+")的desc: "+ temp);
|
||||
// contentManager.setDesc(info_arr[0], info_arr.length>=2?temp:"");
|
||||
// //若未使用内容管理平台,则保存信息到ECM_PAGE表中的备注字段
|
||||
// if( contentManager instanceof DefaultContentManagerImpl){
|
||||
// try {
|
||||
// BizObjectManager bomcl = JBOFactory.getBizObjectManager(ECM_PAGE.CLASS_NAME);
|
||||
// tx.join(bomcl);
|
||||
// String Ssql = "update o set remark=:Remark where documentId=:DocumentId and objectNo=ObjectNo";
|
||||
// bomcl.createQuery(Ssql).setParameter("Remark",info_arr.length>=2?temp:"")
|
||||
// .setParameter("DocumentId",info_arr[0])
|
||||
// .setParameter("ObjectNo",ObjectNo).executeUpdate();
|
||||
//
|
||||
// ARE.getLog().trace("更新一条记录:"+info_arr[0]+ "的备注信息:"+(info_arr.length>=2?temp:"") );
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// try {
|
||||
// BizObjectManager bomcl = JBOFactory.getBizObjectManager(ECM_PAGE.CLASS_NAME);
|
||||
// tx.join(bomcl);
|
||||
// for(int j=0; needDelIds!=null && j<needDelIds.length; j++){
|
||||
// contentManager.delete(needDelIds[j]);
|
||||
// }
|
||||
// String allIdStr = "";
|
||||
// for(int i =0; i<activeX_Ids.length; i++){
|
||||
// allIdStr = allIdStr +",'"+activeX_Ids[i]+"'";
|
||||
// }
|
||||
//
|
||||
// if(needDelIds!=null && needDelIds.length>0){
|
||||
// String tempDelIds = "'";
|
||||
// for(String id : needDelIds){
|
||||
// tempDelIds = tempDelIds + id +"','";
|
||||
// }
|
||||
// tempDelIds = tempDelIds.substring(0, tempDelIds.length()-2);
|
||||
// String delSql = "delete from o where objectType=:ObjectType and objectNo=:ObjectNo and typeNo=:TypeNo and documentId in("+ tempDelIds +") ";
|
||||
// ARE.getLog().info(delSql);
|
||||
// bomcl.createQuery(delSql).setParameter("ObjectType",ObjectType)
|
||||
// .setParameter("ObjectNo",ObjectNo)
|
||||
// .setParameter("TypeNo",TypeNo).executeUpdate();
|
||||
// }
|
||||
//
|
||||
// if(activeX_Ids!=null && activeX_Ids.length>0){
|
||||
// for(int i =0; activeX_Ids!=null && i<activeX_Ids.length; i++){
|
||||
// if(StringX.isEmpty(activeX_Ids[i])){
|
||||
// continue;
|
||||
// }
|
||||
// String Ssql = "update o set pageNum=:PageNum where documentId=:DocumentId and objectNo=:ObjectNo";
|
||||
// bomcl.createQuery(Ssql).setParameter("PageNum",i+1)
|
||||
// .setParameter("DocumentId",activeX_Ids[i])
|
||||
// .setParameter("ObjectNo",ObjectNo).executeUpdate();
|
||||
//
|
||||
// ARE.getLog().trace("更新"+activeX_Ids[i]+ "的编号为"+(i+1));
|
||||
// retStr = retStr+"|"+activeX_Ids[i];
|
||||
// }
|
||||
// }
|
||||
// tx.commit();
|
||||
// } catch (Exception e) {
|
||||
// try {
|
||||
// tx.rollback();
|
||||
// } catch (JBOException e1) {
|
||||
// ARE.getLog().error("事务回滚出错!",e);
|
||||
// }
|
||||
// ARE.getLog().error("更新DocId出错",e);
|
||||
// return "";
|
||||
// } finally {
|
||||
// try {
|
||||
// if(tx!=null){
|
||||
// tx.commit();
|
||||
// }
|
||||
// } catch (JBOException e) {
|
||||
// ARE.getLog().error("关闭数据库连接出错",e);
|
||||
// }
|
||||
// }
|
||||
// retStr = retStr.length()>0?retStr.substring(1):"";
|
||||
// ARE.getLog().trace(retStr);
|
||||
// return retStr;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,9 +4,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import jbo.app.BUSINESS_CONTRACT;
|
||||
import jbo.image.DOCUMENT_CATALOG;
|
||||
import jbo.image.DOCUMENT_DATA;
|
||||
import jbo.image.DOCUMENT_RECORD;
|
||||
//import jbo.image.DOCUMENT_CATALOG;
|
||||
//import jbo.image.DOCUMENT_DATA;
|
||||
//import jbo.image.DOCUMENT_RECORD;
|
||||
|
||||
import com.amarsoft.app.als.image.tool.ImageConstant;
|
||||
import com.amarsoft.app.als.sys.tools.JBOHelper;
|
||||
@ -28,7 +28,7 @@ public class ImageSevice {
|
||||
public static void initTreeView(OHTMLTreeView tviTemp, String objectType, String objectNo) throws JBOException {
|
||||
String jboSql = "select RecordNo, SortNo, DocName, Attribute1, ImageID from O where RecordNo in ("+getSqlFormatOfIn(objectType, objectNo)+") order by SortNo";
|
||||
@SuppressWarnings("unchecked")
|
||||
List<BizObject> bos = JBOFactory.getBizObjectManager(DOCUMENT_DATA.CLASS_NAME).createQuery(jboSql).getResultList(false);
|
||||
List<BizObject> bos = JBOFactory.getBizObjectManager("jbo.image.DOCUMENT_DATA").createQuery(jboSql).getResultList(false);
|
||||
for(BizObject bo : bos){
|
||||
String sID = bo.getAttribute("SortNo").getString();
|
||||
String sParentID = "root";
|
||||
@ -54,7 +54,7 @@ public class ImageSevice {
|
||||
//如果为批复阶段,则查询申请阶段的影像。
|
||||
if (objectType.equals(ImageConstant.IMAGE_PHASE_BAP)){
|
||||
objectType = ImageConstant.IMAGE_PHASE_BA;
|
||||
objectNo = StringTool.getBASerialNo(objectNo);
|
||||
// objectNo = StringTool.getBASerialNo(objectNo);
|
||||
}
|
||||
|
||||
String getSqlTreeView = "from o where RecordNo in (";
|
||||
@ -90,7 +90,7 @@ public class ImageSevice {
|
||||
public static List<String> getRecordNoList(String contractSerialNo){
|
||||
List<String> recordNoList = new ArrayList<String>();
|
||||
|
||||
//»ñÈ¡ÉêÇëÁ÷Ë®ºÅ
|
||||
/* //»ñÈ¡ÉêÇëÁ÷Ë®ºÅ
|
||||
String baSerialNo = StringTool.getBASerialNo(StringTool.getBAPSerialNo(contractSerialNo));
|
||||
//添加申请阶段的影像记录。
|
||||
recordNoList.add(getRecordNo(baSerialNo, ImageConstant.IMAGE_PHASE_BA));
|
||||
@ -102,7 +102,7 @@ public class ImageSevice {
|
||||
List<String> bplist = StringTool.getBPSerialNo(contractSerialNo);
|
||||
for (String bpSerialNo : bplist)
|
||||
//添加出账阶段的影像记录。
|
||||
recordNoList.add(getRecordNo(bpSerialNo, ImageConstant.IMAGE_PHASE_BP));
|
||||
recordNoList.add(getRecordNo(bpSerialNo, ImageConstant.IMAGE_PHASE_BP));*/
|
||||
|
||||
return recordNoList;
|
||||
}
|
||||
@ -119,7 +119,7 @@ public class ImageSevice {
|
||||
BizObject bcBiz = JBOHelper.querySingle(BUSINESS_CONTRACT.CLASS_NAME, "SerialNo=:SerialNo", contractSerialNo);
|
||||
String barCode = JBOHelper.getAttribute(bcBiz, "BarCode").toString();
|
||||
|
||||
List<BizObject> recordlist = JBOHelper.queryList(DOCUMENT_RECORD.CLASS_NAME,
|
||||
List<BizObject> recordlist = JBOHelper.queryList("jbo.image.DOCUMENT_RECORD",
|
||||
"BarCode=:BarCode", barCode);
|
||||
for (BizObject record : recordlist)
|
||||
recordNoList.add(JBOHelper.getAttribute(record, "SerialNo").toString());
|
||||
@ -135,7 +135,7 @@ public class ImageSevice {
|
||||
*/
|
||||
public static String getRecordNo(String objectNo, String objectType){
|
||||
String recordNo = "";
|
||||
BizObject record = JBOHelper.querySingle(DOCUMENT_RECORD.CLASS_NAME,
|
||||
BizObject record = JBOHelper.querySingle("jbo.image.DOCUMENT_RECORD",
|
||||
"ObjectNo=:ObjectNo and ObjectType=:ObjectType", objectNo, objectType);
|
||||
|
||||
if(record != null) recordNo =JBOHelper.getAttribute(record, "SerialNo").toString();
|
||||
@ -164,7 +164,7 @@ public class ImageSevice {
|
||||
* @return
|
||||
*/
|
||||
public static boolean isExistDocCatalog(String dirNo){
|
||||
BizObject catalog = JBOHelper.querySingle(DOCUMENT_CATALOG.CLASS_NAME,
|
||||
BizObject catalog = JBOHelper.querySingle("jbo.image.DOCUMENT_CATALOG",
|
||||
"DirNo=:DirNo", dirNo);
|
||||
if(catalog != null){
|
||||
return true;
|
||||
@ -179,7 +179,7 @@ public class ImageSevice {
|
||||
* @return
|
||||
*/
|
||||
public static boolean isExistDocCatalog(String orgID, String productID, String dirNo){
|
||||
BizObject catalog = JBOHelper.querySingle(DOCUMENT_CATALOG.CLASS_NAME,
|
||||
BizObject catalog = JBOHelper.querySingle("jbo.image.DOCUMENT_CATALOG",
|
||||
"DirNo <> '" + dirNo + "' and IsInUse='1' and SuitProduct like '%," + productID + ",%' and SuitOrg like '%," + orgID + ",%'");
|
||||
if(catalog != null){
|
||||
return true;
|
||||
|
||||
@ -3,8 +3,8 @@ package com.amarsoft.app.als.image;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import jbo.image.ECM_IMAGE_TYPE;
|
||||
import jbo.image.ECM_PAGE;
|
||||
//import jbo.image.ECM_IMAGE_TYPE;
|
||||
//import jbo.image.ECM_PAGE;
|
||||
|
||||
import com.amarsoft.app.als.sys.tools.JBOHelper;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -19,7 +19,7 @@ public class ImageUtil {
|
||||
public String GetNewTypeNo( JBOTransaction tx ) throws SQLException, JBOException{
|
||||
String sRes = "10", sFilter = "";
|
||||
sFilter = "'"+ startWithId + "%'";
|
||||
String sMax=JBOHelper.querySingle(tx, false, ECM_IMAGE_TYPE.CLASS_NAME, "Select Max(TypeNo) as v.max From o Where TypeNo Like "+sFilter, "")
|
||||
String sMax=JBOHelper.querySingle(tx, false, "jbo.image.ECM_IMAGE_TYPE", "Select Max(TypeNo) as v.max From o Where TypeNo Like "+sFilter, "")
|
||||
.getAttribute("max").getString();
|
||||
if( sMax != null && sMax.length() != 0 ){
|
||||
sRes = String.valueOf( Integer.parseInt( sMax ) + 1 );
|
||||
@ -43,7 +43,7 @@ public class ImageUtil {
|
||||
*/
|
||||
public static StringBuffer getImgDocList(String objectNo,String objectType,String typeNo) throws JBOException{
|
||||
StringBuffer sb = new StringBuffer();
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(ECM_PAGE.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("jbo.image.ECM_PAGE");
|
||||
List<BizObject> boList = bom.createQuery(" select documentId from o where objectType=:objectType and objectNo=:objectNo and typeNo=:typeNo and documentId is not null order by pageNum ")
|
||||
.setParameter("objectType", objectType)
|
||||
.setParameter("objectNo", objectNo)
|
||||
|
||||
@ -2,10 +2,10 @@ package com.amarsoft.app.als.image;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jbo.image.DOCUMENT_CATALOG;
|
||||
import jbo.image.DOCUMENT_DATA;
|
||||
import jbo.image.DOCUMENT_LIBRARY;
|
||||
import jbo.image.DOCUMENT_RECORD;
|
||||
//import jbo.image.DOCUMENT_CATALOG;
|
||||
//import jbo.image.DOCUMENT_DATA;
|
||||
//import jbo.image.DOCUMENT_LIBRARY;
|
||||
//import jbo.image.DOCUMENT_RECORD;
|
||||
|
||||
import com.amarsoft.app.als.credit.model.CreditObjectAction;
|
||||
import com.amarsoft.app.als.image.tool.ImageConstant;
|
||||
@ -75,12 +75,12 @@ public class InitImageInfo {
|
||||
/**
|
||||
* 如果找不到符合的影像案卷,则默认使用通用案卷。
|
||||
*/
|
||||
BizObject defaultDir = JBOHelper.querySingle(DOCUMENT_CATALOG.CLASS_NAME, "DirNo=:DirNo",ImageConstant.DEFAULT_DIR);
|
||||
BizObject defaultDir = JBOHelper.querySingle("jbo.image.DOCUMENT_CATALOG", "DirNo=:DirNo",ImageConstant.DEFAULT_DIR);
|
||||
if(StringX.isEmpty(productID) || StringX.isEmpty(orgID)){
|
||||
ARE.getLog().error("没有初始化产品或机构信息!");
|
||||
} else {
|
||||
//获取匹配的影像案卷
|
||||
List<BizObject> bizlist = JBOHelper.queryList(DOCUMENT_CATALOG.CLASS_NAME,
|
||||
List<BizObject> bizlist = JBOHelper.queryList("jbo.image.DOCUMENT_CATALOG",
|
||||
"IsInUse='1' and SuitProduct like '%," + productID + ",%' " +
|
||||
"and SuitOrg like '%," + orgID + ",%'");
|
||||
|
||||
@ -103,7 +103,7 @@ public class InitImageInfo {
|
||||
* @throws Exception
|
||||
*/
|
||||
private void initDocumentRecord(BizObject dirBo) throws Exception{
|
||||
BizObjectManager bm = JBOFactory.getBizObjectManager(DOCUMENT_RECORD.CLASS_NAME);
|
||||
BizObjectManager bm = JBOFactory.getBizObjectManager("jbo.image.DOCUMENT_RECORD");
|
||||
tx.join(bm);
|
||||
BizObject recordBo = bm.newObject();
|
||||
String recordNo = DBKeyHelp.getSerialNo(ImageConstant.DOCUMENT_RECORD, "SerialNo", "");
|
||||
@ -124,11 +124,11 @@ public class InitImageInfo {
|
||||
* @throws Exception
|
||||
*/
|
||||
private void initDocumentData(String recordNo, String dirNo) throws Exception{
|
||||
BizObjectManager bm = JBOFactory.getBizObjectManager(DOCUMENT_DATA.CLASS_NAME);
|
||||
BizObjectManager bm = JBOFactory.getBizObjectManager("jbo.image.DOCUMENT_DATA");
|
||||
tx.join(bm);
|
||||
BizObject dataBo;
|
||||
|
||||
List<BizObject> doclib = JBOHelper.queryList(DOCUMENT_LIBRARY.CLASS_NAME, "DirNo=:DirNo and DocType=:DocType and IsInUse='1'", dirNo, objectType);
|
||||
List<BizObject> doclib = JBOHelper.queryList("jbo.image.DOCUMENT_LIBRARY", "DirNo=:DirNo and DocType=:DocType and IsInUse='1'", dirNo, objectType);
|
||||
for(BizObject bo : doclib){
|
||||
String dataSerialNo = DBKeyHelp.getSerialNo(ImageConstant.DOCUMENT_DATA, "SerialNo", "");
|
||||
dataBo = bm.newObject();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.amarsoft.app.als.image;
|
||||
|
||||
import jbo.image.ECM_IMAGE_TYPE;
|
||||
import jbo.image.ECM_PRDIMAGE_RELA;
|
||||
//import jbo.image.ECM_IMAGE_TYPE;
|
||||
//import jbo.image.ECM_PRDIMAGE_RELA;
|
||||
|
||||
import com.amarsoft.app.als.sys.tools.JBOHelper;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
@ -53,9 +53,9 @@ public class ManagePRDImageRela {
|
||||
//产品与影像类型关联
|
||||
String[] typeNo=this.imageTypeNo.split("@");
|
||||
for(int i=0;i<typeNo.length;i++){
|
||||
JBOHelper.executeDelete(tx, ECM_IMAGE_TYPE.CLASS_NAME, "delete from o where TypeNo=:TypeNo", typeNo[i]);
|
||||
JBOHelper.executeDelete(tx, "jbo.image.ECM_IMAGE_TYPE", "delete from o where TypeNo=:TypeNo", typeNo[i]);
|
||||
|
||||
JBOHelper.executeDelete(tx, ECM_PRDIMAGE_RELA.CLASS_NAME, "delete from o where ImageTypeNo=:ImageTypeNo", typeNo[i]);
|
||||
JBOHelper.executeDelete(tx, "jbo.image.ECM_PRDIMAGE_RELA", "delete from o where ImageTypeNo=:ImageTypeNo", typeNo[i]);
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
|
||||
@ -10,17 +10,17 @@ import java.util.Hashtable;
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.BinaryBitmap;
|
||||
import com.google.zxing.DecodeHintType;
|
||||
import com.google.zxing.EncodeHintType;
|
||||
import com.google.zxing.LuminanceSource;
|
||||
import com.google.zxing.MultiFormatReader;
|
||||
import com.google.zxing.MultiFormatWriter;
|
||||
import com.google.zxing.Result;
|
||||
import com.google.zxing.client.j2se.BufferedImageLuminanceSource;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.common.HybridBinarizer;
|
||||
//import com.google.zxing.BarcodeFormat;
|
||||
//import com.google.zxing.BinaryBitmap;
|
||||
//import com.google.zxing.DecodeHintType;
|
||||
//import com.google.zxing.EncodeHintType;
|
||||
//import com.google.zxing.LuminanceSource;
|
||||
//import com.google.zxing.MultiFormatReader;
|
||||
//import com.google.zxing.MultiFormatWriter;
|
||||
//import com.google.zxing.Result;
|
||||
//import com.google.zxing.client.j2se.BufferedImageLuminanceSource;
|
||||
//import com.google.zxing.common.BitMatrix;
|
||||
//import com.google.zxing.common.HybridBinarizer;
|
||||
|
||||
|
||||
/**
|
||||
@ -47,33 +47,33 @@ public class QRUtil
|
||||
*/
|
||||
public static BufferedImage getRQ(String str, Integer height)
|
||||
{
|
||||
if (height == null || height <=0)
|
||||
{
|
||||
height = 200;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// 文字编码
|
||||
Hashtable<EncodeHintType, String> hints = new Hashtable<EncodeHintType, String>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, CODE);
|
||||
|
||||
BitMatrix bitMatrix = new MultiFormatWriter().encode(str,
|
||||
BarcodeFormat.QR_CODE, height, height, hints);
|
||||
|
||||
return toBufferedImage(bitMatrix);
|
||||
|
||||
// 输出方式
|
||||
// 网页
|
||||
// ImageIO.write(image, "png", response.getOutputStream());
|
||||
|
||||
// 文件
|
||||
// ImageIO.write(image, "png", file);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
// if (height == null || height <=0)
|
||||
// {
|
||||
// height = 200;
|
||||
// }
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// // 文字编码
|
||||
// Hashtable<EncodeHintType, String> hints = new Hashtable<EncodeHintType, String>();
|
||||
// hints.put(EncodeHintType.CHARACTER_SET, CODE);
|
||||
//
|
||||
// BitMatrix bitMatrix = new MultiFormatWriter().encode(str,
|
||||
// BarcodeFormat.QR_CODE, height, height, hints);
|
||||
//
|
||||
// return toBufferedImage(bitMatrix);
|
||||
//
|
||||
// // 输出方式
|
||||
// // 网页
|
||||
// // ImageIO.write(image, "png", response.getOutputStream());
|
||||
//
|
||||
// // 文件
|
||||
// // ImageIO.write(image, "png", file);
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -90,32 +90,32 @@ public class QRUtil
|
||||
Integer height)
|
||||
{
|
||||
|
||||
if (width == null || width < 200)
|
||||
{
|
||||
width = 200;
|
||||
}
|
||||
|
||||
if (height == null || height < 50)
|
||||
{
|
||||
height = 50;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// 文字编码
|
||||
Hashtable<EncodeHintType, String> hints = new Hashtable<EncodeHintType, String>();
|
||||
hints.put(EncodeHintType.CHARACTER_SET, CODE);
|
||||
|
||||
BitMatrix bitMatrix = new MultiFormatWriter().encode(str,
|
||||
BarcodeFormat.CODE_128, width, height, hints);
|
||||
//BarcodeFormat.EAN_13, width, height, hints);
|
||||
|
||||
return toBufferedImage(bitMatrix);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
// if (width == null || width < 200)
|
||||
// {
|
||||
// width = 200;
|
||||
// }
|
||||
//
|
||||
// if (height == null || height < 50)
|
||||
// {
|
||||
// height = 50;
|
||||
// }
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// // 文字编码
|
||||
// Hashtable<EncodeHintType, String> hints = new Hashtable<EncodeHintType, String>();
|
||||
// hints.put(EncodeHintType.CHARACTER_SET, CODE);
|
||||
//
|
||||
// BitMatrix bitMatrix = new MultiFormatWriter().encode(str,
|
||||
// BarcodeFormat.CODE_128, width, height, hints);
|
||||
// //BarcodeFormat.EAN_13, width, height, hints);
|
||||
//
|
||||
// return toBufferedImage(bitMatrix);
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -158,21 +158,22 @@ public class QRUtil
|
||||
* @param matrix
|
||||
* @return
|
||||
*/
|
||||
private static BufferedImage toBufferedImage(BitMatrix matrix)
|
||||
{
|
||||
int width = matrix.getWidth();
|
||||
int height = matrix.getHeight();
|
||||
BufferedImage image = new BufferedImage(width, height,
|
||||
BufferedImage.TYPE_INT_ARGB);
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE);
|
||||
}
|
||||
}
|
||||
return image;
|
||||
}
|
||||
// private static BufferedImage toBufferedImage(BitMatrix matrix)
|
||||
// {
|
||||
// int width = matrix.getWidth();
|
||||
// int height = matrix.getHeight();
|
||||
// BufferedImage image = new BufferedImage(width, height,
|
||||
// BufferedImage.TYPE_INT_ARGB);
|
||||
// for (int x = 0; x < width; x++)
|
||||
// {
|
||||
// for (int y = 0; y < height; y++)
|
||||
// {
|
||||
// image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE);
|
||||
// }
|
||||
// }
|
||||
// return image;
|
||||
// return null;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 解码(二维、一维均可)
|
||||
@ -180,35 +181,35 @@ public class QRUtil
|
||||
public static String read(File file)
|
||||
{
|
||||
|
||||
BufferedImage image;
|
||||
try
|
||||
{
|
||||
if (file == null || file.exists() == false)
|
||||
{
|
||||
throw new Exception(" File not found:" + file.getPath());
|
||||
}
|
||||
|
||||
image = ImageIO.read(file);
|
||||
|
||||
//LuminanceSource source = new BufferedImageLuminanceSource(image);
|
||||
LuminanceSource source = new BufferedImageLuminanceSource(image,0,0,200,200);
|
||||
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
|
||||
|
||||
Result result;
|
||||
|
||||
// 解码设置编码方式为:utf-8,
|
||||
Hashtable hints = new Hashtable();
|
||||
hints.put(DecodeHintType.CHARACTER_SET, "utf-8");
|
||||
|
||||
result = new MultiFormatReader().decode(bitmap, hints);
|
||||
|
||||
return result.getText();
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
// BufferedImage image;
|
||||
// try
|
||||
// {
|
||||
// if (file == null || file.exists() == false)
|
||||
// {
|
||||
// throw new Exception(" File not found:" + file.getPath());
|
||||
// }
|
||||
//
|
||||
// image = ImageIO.read(file);
|
||||
//
|
||||
// //LuminanceSource source = new BufferedImageLuminanceSource(image);
|
||||
// LuminanceSource source = new BufferedImageLuminanceSource(image,0,0,200,200);
|
||||
// BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
|
||||
//
|
||||
// Result result;
|
||||
//
|
||||
// // 解码设置编码方式为:utf-8,
|
||||
// Hashtable hints = new Hashtable();
|
||||
// hints.put(DecodeHintType.CHARACTER_SET, "utf-8");
|
||||
//
|
||||
// result = new MultiFormatReader().decode(bitmap, hints);
|
||||
//
|
||||
// return result.getText();
|
||||
//
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
|
||||
return null;
|
||||
}
|
||||
@ -219,35 +220,35 @@ public class QRUtil
|
||||
public static String read(InputStream is)
|
||||
{
|
||||
|
||||
BufferedImage image;
|
||||
try
|
||||
{
|
||||
if (is == null )
|
||||
{
|
||||
throw new Exception(" InputStream is null!");
|
||||
}
|
||||
|
||||
image = ImageIO.read(is);
|
||||
|
||||
//LuminanceSource source = new BufferedImageLuminanceSource(image);
|
||||
LuminanceSource source = new BufferedImageLuminanceSource(image,0,0,500,500);
|
||||
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
|
||||
|
||||
Result result;
|
||||
|
||||
// 解码设置编码方式为:utf-8,
|
||||
Hashtable hints = new Hashtable();
|
||||
hints.put(DecodeHintType.CHARACTER_SET, "utf-8");
|
||||
|
||||
result = new MultiFormatReader().decode(bitmap, hints);
|
||||
|
||||
return result.getText();
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ARE.getLog().warn("未解析出条形码,该图片可能不是条码图。");
|
||||
}
|
||||
// BufferedImage image;
|
||||
// try
|
||||
// {
|
||||
// if (is == null )
|
||||
// {
|
||||
// throw new Exception(" InputStream is null!");
|
||||
// }
|
||||
//
|
||||
// image = ImageIO.read(is);
|
||||
//
|
||||
// //LuminanceSource source = new BufferedImageLuminanceSource(image);
|
||||
// LuminanceSource source = new BufferedImageLuminanceSource(image,0,0,500,500);
|
||||
// BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
|
||||
//
|
||||
// Result result;
|
||||
//
|
||||
// // 解码设置编码方式为:utf-8,
|
||||
// Hashtable hints = new Hashtable();
|
||||
// hints.put(DecodeHintType.CHARACTER_SET, "utf-8");
|
||||
//
|
||||
// result = new MultiFormatReader().decode(bitmap, hints);
|
||||
//
|
||||
// return result.getText();
|
||||
//
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// ARE.getLog().warn("未解析出条形码,该图片可能不是条码图。");
|
||||
// }
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ package com.amarsoft.app.als.product;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.sadre.app.action.DeleteRule;
|
||||
//import com.amarsoft.sadre.app.action.DeleteRule;
|
||||
|
||||
public class AuthorDeleteRuleHelper {
|
||||
public void run(JBOTransaction tx, String ruleId, String sceneId) throws Exception{
|
||||
@ -11,10 +11,10 @@ public class AuthorDeleteRuleHelper {
|
||||
throw new Exception("参数非法,不允许为空! RuleId="+ruleId+" |SceneId="+sceneId);
|
||||
}
|
||||
|
||||
DeleteRule action = new DeleteRule();
|
||||
action.setRuleId(ruleId);
|
||||
action.setSceneId(sceneId);
|
||||
|
||||
action.execute(tx);
|
||||
// DeleteRule action = new DeleteRule();
|
||||
// action.setRuleId(ruleId);
|
||||
// action.setSceneId(sceneId);
|
||||
//
|
||||
// action.execute(tx);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,12 +2,12 @@ package com.amarsoft.app.als.product;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.sadre.app.action.RemoveDimension;
|
||||
import com.amarsoft.sadre.app.action.RemoveScene;
|
||||
import com.amarsoft.sadre.app.action.RemoveSceneGroup;
|
||||
import com.amarsoft.sadre.app.action.ReplicateScene;
|
||||
import com.amarsoft.sadre.app.action.UpdateDimension;
|
||||
import com.amarsoft.sadre.app.action.UpdateScene;
|
||||
//import com.amarsoft.sadre.app.action.RemoveDimension;
|
||||
//import com.amarsoft.sadre.app.action.RemoveScene;
|
||||
//import com.amarsoft.sadre.app.action.RemoveSceneGroup;
|
||||
//import com.amarsoft.sadre.app.action.ReplicateScene;
|
||||
//import com.amarsoft.sadre.app.action.UpdateDimension;
|
||||
//import com.amarsoft.sadre.app.action.UpdateScene;
|
||||
import com.amarsoft.sadre.app.action.WebAction;
|
||||
|
||||
public class AuthorObjectManageHelper{
|
||||
@ -27,37 +27,37 @@ public class AuthorObjectManageHelper{
|
||||
throw new Exception("参数非法,错误的参数! ActionType="+actionType+" |ObjectType="+objectType);
|
||||
}
|
||||
|
||||
WebAction action = null;
|
||||
if(objectType.equalsIgnoreCase("SCENE")){
|
||||
if(actionType.equalsIgnoreCase("UPDATE")){
|
||||
action = new UpdateScene();
|
||||
((UpdateScene)action).setSceneId(objectNo);
|
||||
|
||||
}else if(actionType.equalsIgnoreCase("REMOVE")){
|
||||
action = new RemoveScene();
|
||||
((RemoveScene)action).setSceneId(objectNo);
|
||||
}else if(actionType.equalsIgnoreCase("REPLICATE")){
|
||||
action = new ReplicateScene();
|
||||
((ReplicateScene)action).setSceneId(objectNo);
|
||||
}
|
||||
}else if(objectType.equalsIgnoreCase("DIMENSION")){
|
||||
if(actionType.equalsIgnoreCase("UPDATE")){
|
||||
action = new UpdateDimension();
|
||||
((UpdateDimension)action).setDimensionId(objectNo);
|
||||
|
||||
}else if(actionType.equalsIgnoreCase("REMOVE")){
|
||||
action = new RemoveDimension();
|
||||
((RemoveDimension)action).setDimensionId(objectNo);
|
||||
|
||||
}
|
||||
}else if(objectType.equalsIgnoreCase("SCENEGROUP")){
|
||||
if(actionType.equalsIgnoreCase("REMOVE")){
|
||||
action = new RemoveSceneGroup();
|
||||
((RemoveSceneGroup)action).setGroupID(objectNo);
|
||||
|
||||
}
|
||||
}
|
||||
action.execute(tx);
|
||||
// WebAction action = null;
|
||||
// if(objectType.equalsIgnoreCase("SCENE")){
|
||||
// if(actionType.equalsIgnoreCase("UPDATE")){
|
||||
// action = new UpdateScene();
|
||||
// ((UpdateScene)action).setSceneId(objectNo);
|
||||
//
|
||||
// }else if(actionType.equalsIgnoreCase("REMOVE")){
|
||||
// action = new RemoveScene();
|
||||
// ((RemoveScene)action).setSceneId(objectNo);
|
||||
// }else if(actionType.equalsIgnoreCase("REPLICATE")){
|
||||
// action = new ReplicateScene();
|
||||
// ((ReplicateScene)action).setSceneId(objectNo);
|
||||
// }
|
||||
// }else if(objectType.equalsIgnoreCase("DIMENSION")){
|
||||
// if(actionType.equalsIgnoreCase("UPDATE")){
|
||||
// action = new UpdateDimension();
|
||||
// ((UpdateDimension)action).setDimensionId(objectNo);
|
||||
//
|
||||
// }else if(actionType.equalsIgnoreCase("REMOVE")){
|
||||
// action = new RemoveDimension();
|
||||
// ((RemoveDimension)action).setDimensionId(objectNo);
|
||||
//
|
||||
// }
|
||||
// }else if(objectType.equalsIgnoreCase("SCENEGROUP")){
|
||||
// if(actionType.equalsIgnoreCase("REMOVE")){
|
||||
// action = new RemoveSceneGroup();
|
||||
// ((RemoveSceneGroup)action).setGroupID(objectNo);
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// action.execute(tx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.amarsoft.app.als.product;
|
||||
|
||||
import jbo.app.SUBJECT_INFO;
|
||||
//import jbo.app.SUBJECT_INFO;
|
||||
|
||||
import com.amarsoft.app.als.sys.tools.JBOHelper;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -18,7 +18,7 @@ public class GetColValue {
|
||||
|
||||
public String getColValue(JBOTransaction tx) throws Exception{
|
||||
String sReturn = "";
|
||||
String sTable = SUBJECT_INFO.CLASS_NAME;
|
||||
String sTable = "jbo.app.SUBJECT_INFO";
|
||||
String sWhere = "SubjectNo=:SubjectNo";
|
||||
Object[] sValues = {sSubjectNo};
|
||||
BizObject bosi = JBOHelper.querySingle(tx, false, sTable, sWhere, sValues);
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package com.amarsoft.app.als.product.dwhandler;
|
||||
|
||||
import jbo.app.CL_INFO;
|
||||
//import jbo.app.CL_INFO;
|
||||
|
||||
import com.amarsoft.app.als.flow.util.FlowBusinessAction;
|
||||
//import com.amarsoft.app.als.flow.util.FlowBusinessAction;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
@ -11,7 +11,7 @@ import com.amarsoft.awe.dw.handler.impl.CommonHandler;
|
||||
|
||||
public class CreditLineMonitorListHandler extends CommonHandler {
|
||||
private void AfterDelete(JBOTransaction tx, BizObject bo) throws Exception {
|
||||
//自动获得传入的参数值
|
||||
/*//自动获得传入的参数值
|
||||
String sLineID = bo.getAttribute("LineID").getString();//--文档编号
|
||||
if(sLineID==null) sLineID="";
|
||||
|
||||
@ -22,6 +22,6 @@ public class CreditLineMonitorListHandler extends CommonHandler {
|
||||
|
||||
//删除授信协议信息
|
||||
FlowBusinessAction deleteAction = new FlowBusinessAction();
|
||||
deleteAction.deleteTask(tx, sLineID, "BusinessContract", "DeleteBusiness");
|
||||
deleteAction.deleteTask(tx, sLineID, "BusinessContract", "DeleteBusiness");*/
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.amarsoft.app.als.product.dwhandler;
|
||||
|
||||
import jbo.app.SADRE_SCENERELATIVE;
|
||||
//import jbo.app.SADRE_SCENERELATIVE;
|
||||
|
||||
import com.amarsoft.app.als.product.AuthorObjectManageHelper;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -25,7 +25,7 @@ public class RuleSceneInfoHandler extends CommonHandler{
|
||||
AuthorObjectManageHelper authorObjectManage = new AuthorObjectManageHelper();
|
||||
authorObjectManage.run(tx, actionType, objectType, sceneID);
|
||||
|
||||
BizObjectManager bomss = JBOFactory.getBizObjectManager(SADRE_SCENERELATIVE.CLASS_NAME);
|
||||
BizObjectManager bomss = JBOFactory.getBizObjectManager("jbo.app.SADRE_SCENERELATIVE");
|
||||
tx.join(bomss);
|
||||
BizObject boss = bomss.newObject();
|
||||
boss.setAttributeValue("GROUPID", groupID);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.amarsoft.app.als.product.dwhandler;
|
||||
|
||||
import jbo.app.SUBJECT_INFO;
|
||||
//import jbo.app.SUBJECT_INFO;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -17,7 +17,7 @@ public class SubjectInfoHandler extends CommonHandler {
|
||||
if(isInsert){
|
||||
try{
|
||||
String sSubjectNo = bo.getAttribute("SubjectNo").getString();
|
||||
String sTable = SUBJECT_INFO.CLASS_NAME;
|
||||
String sTable = "jbo.app.SUBJECT_INFO";
|
||||
BizObjectManager bomsi = JBOFactory.getBizObjectManager(sTable);BizObject bosi = bomsi.createQuery("select SubjectNo from O where SubjectNo=:SubjectNo")
|
||||
.setParameter("SubjectNo", sSubjectNo)
|
||||
.getSingleResult(false);
|
||||
|
||||
@ -132,7 +132,7 @@ public class BizSort {
|
||||
* 获取申请阶段的IsLiquidity,IsFixed,IsProject
|
||||
*/
|
||||
private void updateSortAttributesValueFromBA(String serialNo) throws Exception{
|
||||
sSql = "select IsLiquidity,IsFixed,IsProject from "+ BUSINESS_APPLY.CLASS_NAME.substring(8).toLowerCase()+" where SerialNo = :SerialNo";
|
||||
sSql = "select IsLiquidity,IsFixed,IsProject from "+ "BUSINESS_APPLY.CLASS_NAME".substring(8).toLowerCase()+" where SerialNo = :SerialNo";
|
||||
rs = Sqlca.getASResultSet(new SqlObject(sSql).setParameter("SerialNo", serialNo));
|
||||
if(rs.next())
|
||||
{
|
||||
@ -152,19 +152,19 @@ public class BizSort {
|
||||
* 获取BUSINESS_SORT的IsLiquidity,IsFixed,IsProject,做为默认值
|
||||
*/
|
||||
private void updateSortAttributesValueFromBS(String typeNo) throws Exception{
|
||||
sSql = "select IsLiquidity,IsFixed,IsProject from "+BUSINESS_SORT.CLASS_NAME.substring(8).toLowerCase()+" where TypeNo = :TypeNo";
|
||||
rs = Sqlca.getASResultSet(new SqlObject(sSql).setParameter("TypeNo", typeNo));
|
||||
if(rs.next())
|
||||
{
|
||||
if(rs.getString("IsLiquidity") == null || rs.getString("IsFixed") == null || rs.getString("IsProject") == null ){
|
||||
throw new AmarBizMethodException("该业务品种贷款新规属性无值!");
|
||||
}else{
|
||||
liquidity = rs.getString("IsLiquidity").equals("1") ? true : false;
|
||||
fixed = rs.getString("IsFixed").equals("1") ? true : false;
|
||||
project = rs.getString("IsProject").equals("1") ? true : false;
|
||||
}
|
||||
}
|
||||
rs.getStatement().close();
|
||||
// sSql = "select IsLiquidity,IsFixed,IsProject from "+"BUSINESS_SORT.CLASS_NAME".substring(8).toLowerCase()+" where TypeNo = :TypeNo";
|
||||
// rs = Sqlca.getASResultSet(new SqlObject(sSql).setParameter("TypeNo", typeNo));
|
||||
// if(rs.next())
|
||||
// {
|
||||
// if(rs.getString("IsLiquidity") == null || rs.getString("IsFixed") == null || rs.getString("IsProject") == null ){
|
||||
// throw new AmarBizMethodException("该业务品种贷款新规属性无值!");
|
||||
// }else{
|
||||
// liquidity = rs.getString("IsLiquidity").equals("1") ? true : false;
|
||||
// fixed = rs.getString("IsFixed").equals("1") ? true : false;
|
||||
// project = rs.getString("IsProject").equals("1") ? true : false;
|
||||
// }
|
||||
// }
|
||||
// rs.getStatement().close();
|
||||
}
|
||||
|
||||
|
||||
@ -191,22 +191,22 @@ public class BizSort {
|
||||
*/
|
||||
private boolean isDetailInCreditApply(String serialNo) throws Exception{
|
||||
|
||||
boolean isDetail = false;
|
||||
sSql = "select IsLiquidity,IsFixed,IsProject from "+BUSINESS_APPLY.CLASS_NAME.substring(8).toLowerCase()+" where SerialNo = :SerialNo";
|
||||
rs = Sqlca.getASResultSet(new SqlObject(sSql).setParameter("SerialNo", serialNo));
|
||||
if(rs.next())
|
||||
{
|
||||
if(rs.getString("IsLiquidity") == null || rs.getString("IsFixed") == null || rs.getString("IsProject") == null ){
|
||||
isDetail = false;
|
||||
}else{
|
||||
isDetail = true;
|
||||
}
|
||||
}else{//如果只有流水号,而没有对应记录
|
||||
isDetail = false;
|
||||
}
|
||||
rs.getStatement().close();
|
||||
return isDetail;
|
||||
|
||||
// boolean isDetail = false;
|
||||
// sSql = "select IsLiquidity,IsFixed,IsProject from "+BUSINESS_APPLY.CLASS_NAME.substring(8).toLowerCase()+" where SerialNo = :SerialNo";
|
||||
// rs = Sqlca.getASResultSet(new SqlObject(sSql).setParameter("SerialNo", serialNo));
|
||||
// if(rs.next())
|
||||
// {
|
||||
// if(rs.getString("IsLiquidity") == null || rs.getString("IsFixed") == null || rs.getString("IsProject") == null ){
|
||||
// isDetail = false;
|
||||
// }else{
|
||||
// isDetail = true;
|
||||
// }
|
||||
// }else{//如果只有流水号,而没有对应记录
|
||||
// isDetail = false;
|
||||
// }
|
||||
// rs.getStatement().close();
|
||||
// return isDetail;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ package com.tenwa.database.util.example;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.com.tenwa.entity.contract.CONTRACT_INFO;
|
||||
//import jbo.com.tenwa.entity.contract.CONTRACT_INFO;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -19,7 +19,7 @@ public class jboOperatorExample {
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateJbo(JBOTransaction tx) throws Exception{
|
||||
BizObjectManager tableEquip = JBOFactory.getBizObjectManager(CONTRACT_INFO.CLASS_NAME);
|
||||
BizObjectManager tableEquip = JBOFactory.getBizObjectManager("jbo.com.tenwa.entity.contract.CONTRACT_INFO");
|
||||
tx.join(tableEquip);
|
||||
BizObjectQuery bqDest = tableEquip.createQuery("id=:id and contract_id=:contract_id");
|
||||
bqDest.setParameter("id", "2016052700000001");
|
||||
@ -37,7 +37,7 @@ public class jboOperatorExample {
|
||||
*/
|
||||
|
||||
public void newJbo(JBOTransaction tx) throws Exception{
|
||||
BizObjectManager tableEquip = JBOFactory.getBizObjectManager(CONTRACT_INFO.CLASS_NAME);
|
||||
BizObjectManager tableEquip = JBOFactory.getBizObjectManager("jbo.com.tenwa.entity.contract.CONTRACT_INFO");
|
||||
tx.join(tableEquip);
|
||||
BizObject Object = tableEquip.newObject();
|
||||
Object.setAttributeValue("proj_date", "2015-11-12");
|
||||
@ -54,7 +54,7 @@ public class jboOperatorExample {
|
||||
Map<String,String>condtion=new HashMap<String,String>();
|
||||
condtion.put("id", "2016052700000001");
|
||||
condtion.put("contract_id", "1464342147504");
|
||||
BizObjectManager bmObject = JBOFactory.getBizObjectManager(CONTRACT_INFO.CLASS_NAME);
|
||||
BizObjectManager bmObject = JBOFactory.getBizObjectManager("jbo.com.tenwa.entity.contract.CONTRACT_INFO");
|
||||
tx.join(bmObject);
|
||||
String sql="delete where "+DataOperatorUtil.getQuerySql(condtion);
|
||||
BizObjectQuery bqDest = bmObject.createQuery(sql);
|
||||
|
||||
@ -10,7 +10,7 @@ import jbo.app.tenwa.calc.LC_FUND_INCOME;
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_FUND_PLAN;
|
||||
import jbo.app.tenwa.calc.VI_LC_FUND_PLAN;
|
||||
import jbo.app.tenwa.customer.LPOUNDAGE_MAINTENANCE;
|
||||
//import jbo.app.tenwa.customer.LPOUNDAGE_MAINTENANCE;
|
||||
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
|
||||
import jbo.com.tenwa.lease.comm.LB_LESSOR_INFO;
|
||||
import jbo.com.tenwa.lease.comm.LB_TENANTRY_INFO;
|
||||
|
||||
@ -70,31 +70,31 @@ public class ProjectBankListStartAction extends FlowBussionAction{
|
||||
@SuppressWarnings("deprecation")
|
||||
public BizObject initCustomerBankInFoTemp(JBOTransaction tx,String flow_unid) throws Exception {
|
||||
|
||||
BizObjectManager bm=JBOFactory.getBizObjectManager(CUSTOMER_BLANK_LIST_TEMP.CLASS_NAME);
|
||||
try{
|
||||
tx.join(bm);
|
||||
BizObject bo=bm.newObject();
|
||||
bo.setAttributeValue("CUSTOMER_ID",this.getProj_id());//客户编号
|
||||
bo.setAttributeValue("CUSTOMER_NAME",this.getProj_name());//客户名称
|
||||
bo.setAttributeValue("APPLY_DATE",DateAssistant.getToday());
|
||||
bo.setAttributeValue("APPLY_DEPT",this.getAsUser().getOrgID());//项目出单部门
|
||||
bo.setAttributeValue("APPLY_PERSON",this.getCurUserID());//经办人
|
||||
bo.setAttributeValue("FLOWUNID", flow_unid);
|
||||
bo.setAttributeValue("INPUTUSERID", this.getCurUserID());
|
||||
bo.setAttributeValue("INPUTORGID", this.getAsUser().getOrgID());
|
||||
bo.setAttributeValue("InputTime", StringFunction.getToday());
|
||||
bo.setAttributeValue("UpdateOrgID", this.getAsUser().getOrgID());
|
||||
bo.setAttributeValue("UpdateUserID", this.getCurUserID());
|
||||
bo.setAttributeValue("UpdateTime", StringFunction.getToday());
|
||||
bo=this.initTabeUserInfo(bo);
|
||||
bm.saveObject(bo);
|
||||
tx.commit();
|
||||
return bo;
|
||||
}catch(JBOException e){
|
||||
tx.rollback();
|
||||
ARE.getLog().error(MessageFormat.format("插入操作失败,插入表名称:", CUSTOMER_BLANK_LIST_TEMP.CLASS_NAME),e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
// BizObjectManager bm=JBOFactory.getBizObjectManager(CUSTOMER_BLANK_LIST_TEMP.CLASS_NAME);
|
||||
// try{
|
||||
// tx.join(bm);
|
||||
// BizObject bo=bm.newObject();
|
||||
// bo.setAttributeValue("CUSTOMER_ID",this.getProj_id());//客户编号
|
||||
// bo.setAttributeValue("CUSTOMER_NAME",this.getProj_name());//客户名称
|
||||
// bo.setAttributeValue("APPLY_DATE",DateAssistant.getToday());
|
||||
// bo.setAttributeValue("APPLY_DEPT",this.getAsUser().getOrgID());//项目出单部门
|
||||
// bo.setAttributeValue("APPLY_PERSON",this.getCurUserID());//经办人
|
||||
// bo.setAttributeValue("FLOWUNID", flow_unid);
|
||||
// bo.setAttributeValue("INPUTUSERID", this.getCurUserID());
|
||||
// bo.setAttributeValue("INPUTORGID", this.getAsUser().getOrgID());
|
||||
// bo.setAttributeValue("InputTime", StringFunction.getToday());
|
||||
// bo.setAttributeValue("UpdateOrgID", this.getAsUser().getOrgID());
|
||||
// bo.setAttributeValue("UpdateUserID", this.getCurUserID());
|
||||
// bo.setAttributeValue("UpdateTime", StringFunction.getToday());
|
||||
// bo=this.initTabeUserInfo(bo);
|
||||
// bm.saveObject(bo);
|
||||
// tx.commit();
|
||||
// return bo;
|
||||
// }catch(JBOException e){
|
||||
// tx.rollback();
|
||||
// ARE.getLog().error(MessageFormat.format("插入操作失败,插入表名称:", CUSTOMER_BLANK_LIST_TEMP.CLASS_NAME),e);
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ import com.amarsoft.awe.Configure;
|
||||
import com.caucho.hessian.client.HessianProxyFactory;
|
||||
import com.tenwa.lease.app.service.HttpRequestAppService;
|
||||
|
||||
import apx.com.amarsoft.als.base.util.FileUtil;
|
||||
//import apx.com.amarsoft.als.base.util.FileUtil;
|
||||
|
||||
public class CarBrandService {
|
||||
public String brandId;//Æ·ÅÆ
|
||||
@ -129,12 +129,12 @@ public class CarBrandService {
|
||||
return httpClient.getCarUrl(url.toString());
|
||||
}
|
||||
|
||||
public String loadProvinceCity(JBOTransaction txs)throws Exception {
|
||||
String classPath=this.getClass().getClassLoader().getResource("").getPath();
|
||||
classPath=classPath.substring(0, classPath.indexOf("WEB-INF"))+"Tenwa\\Lease\\App\\Interface\\ProvinceCity\\ProvinceCity.txt";
|
||||
classPath=FileUtil.getFilePathString(classPath);
|
||||
return this.txt2String(classPath);
|
||||
}
|
||||
// public String loadProvinceCity(JBOTransaction txs)throws Exception {
|
||||
// String classPath=this.getClass().getClassLoader().getResource("").getPath();
|
||||
// classPath=classPath.substring(0, classPath.indexOf("WEB-INF"))+"Tenwa\\Lease\\App\\Interface\\ProvinceCity\\ProvinceCity.txt";
|
||||
// classPath=FileUtil.getFilePathString(classPath);
|
||||
// return this.txt2String(classPath);
|
||||
// }
|
||||
|
||||
public String replaceInterfaceFixeParam(String strURL,String key)throws Exception{
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
@ -148,37 +148,37 @@ public class CarBrandService {
|
||||
}
|
||||
|
||||
|
||||
public String get32MD5(String message) throws Exception{
|
||||
String result = "";
|
||||
String str = message;
|
||||
|
||||
try {
|
||||
MessageDigest md5 = MessageDigest.getInstance("MD5");
|
||||
md5.update((str).getBytes("UTF-8"));
|
||||
byte b[] = md5.digest();
|
||||
|
||||
int i;
|
||||
StringBuffer buf = new StringBuffer("");
|
||||
|
||||
for(int offset=0; offset<b.length; offset++){
|
||||
i = b[offset];
|
||||
if(i<0){
|
||||
i+=256;
|
||||
}
|
||||
if(i<16){
|
||||
buf.append("0");
|
||||
}
|
||||
buf.append(Integer.toHexString(i));
|
||||
}
|
||||
|
||||
result = buf.toString();
|
||||
} catch (Exception e) {
|
||||
System.out.println("汽车品牌校验密码有问题");
|
||||
result="";
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// public String get32MD5(String message) throws Exception{
|
||||
// String result = "";
|
||||
// String str = message;
|
||||
//
|
||||
// try {
|
||||
// MessageDigest md5 = MessageDigest.getInstance("MD5");
|
||||
// md5.update((str).getBytes("UTF-8"));
|
||||
// byte b[] = md5.digest();
|
||||
//
|
||||
// int i;
|
||||
// StringBuffer buf = new StringBuffer("");
|
||||
//
|
||||
// for(int offset=0; offset<b.length; offset++){
|
||||
// i = b[offset];
|
||||
// if(i<0){
|
||||
// i+=256;
|
||||
// }
|
||||
// if(i<16){
|
||||
// buf.append("0");
|
||||
// }
|
||||
// buf.append(Integer.toHexString(i));
|
||||
// }
|
||||
//
|
||||
// result = buf.toString();
|
||||
// } catch (Exception e) {
|
||||
// System.out.println("汽车品牌校验密码有问题");
|
||||
// result="";
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
|
||||
public String getCityId() {
|
||||
return cityId;
|
||||
@ -222,21 +222,21 @@ public class CarBrandService {
|
||||
public void setCarOutYear(String carOutYear) {
|
||||
this.carOutYear = carOutYear;
|
||||
}
|
||||
public String txt2String(String strFile){
|
||||
StringBuilder result = new StringBuilder();
|
||||
try{
|
||||
File file=new File(strFile);
|
||||
BufferedReader br = new BufferedReader(new FileReader(file));//构造一个BufferedReader类来读取文件
|
||||
String s = null;
|
||||
while((s = br.readLine())!=null){//使用readLine方法,一次读一行
|
||||
result.append(System.lineSeparator()+s);
|
||||
}
|
||||
br.close();
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
// public String txt2String(String strFile){
|
||||
// StringBuilder result = new StringBuilder();
|
||||
// try{
|
||||
// File file=new File(strFile);
|
||||
// BufferedReader br = new BufferedReader(new FileReader(file));//构造一个BufferedReader类来读取文件
|
||||
// String s = null;
|
||||
// while((s = br.readLine())!=null){//使用readLine方法,一次读一行
|
||||
// result.append(System.lineSeparator()+s);
|
||||
// }
|
||||
// br.close();
|
||||
// }catch(Exception e){
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return result.toString();
|
||||
// }
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@ import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
|
||||
import com.base.util.QuartzUtil;
|
||||
import com.tenwa.leasing.service.voucher.CreateVoucherService;
|
||||
import com.tenwa.leasing.serviceImpl.voucher.CreateVoucherServiceImpl;
|
||||
import com.tenwa.reckon.constant.Scale;
|
||||
import com.tenwa.reckon.util.Conn;
|
||||
import com.tenwa.reckon.util.DateTools;
|
||||
|
||||
@ -18,47 +18,47 @@ public class QueryBatchCollectResult implements Job{
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext arg0) throws JobExecutionException {
|
||||
JBOTransaction tx = null;
|
||||
try {
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
BizObjectManager bm = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME);
|
||||
List<BizObject> bolist = bm.createQuery("select crs.collect_sn as v.id from O,jbo.com.tenwa.lease.comm.COLLECT_RECORD_STATUS crs where O.id = crs.rent_plan_id and O.AUDIT_STATE = 'Y' and O.COLLECT_STATUS = '1' and crs.deduct_stata = 'processing' ").getResultList(false);
|
||||
CollectAuditInfoCache collect = new CollectAuditInfoCache();
|
||||
StringBuffer parms = new StringBuffer();
|
||||
for (BizObject bo : bolist) {
|
||||
String id = bo.getAttribute("id").toString();
|
||||
if (parms.length()==0) {
|
||||
parms.append("'"+id+"'");
|
||||
}else{
|
||||
parms.append(",'"+id+"'");
|
||||
}
|
||||
}
|
||||
if (parms.length() > 0) {
|
||||
//查询批量收款状态,并更新租金回笼表
|
||||
collect.queryBatchCollectStatus(tx,parms);
|
||||
}
|
||||
tx.commit();
|
||||
} catch (JBOException e) {
|
||||
try {
|
||||
if (tx != null){
|
||||
tx.rollback();
|
||||
}
|
||||
} catch (JBOException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
if (tx != null){
|
||||
tx.rollback();
|
||||
}
|
||||
} catch (JBOException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
// JBOTransaction tx = null;
|
||||
// try {
|
||||
// tx = JBOFactory.createJBOTransaction();
|
||||
// BizObjectManager bm = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME);
|
||||
// List<BizObject> bolist = bm.createQuery("select crs.collect_sn as v.id from O,jbo.com.tenwa.lease.comm.COLLECT_RECORD_STATUS crs where O.id = crs.rent_plan_id and O.AUDIT_STATE = 'Y' and O.COLLECT_STATUS = '1' and crs.deduct_stata = 'processing' ").getResultList(false);
|
||||
// CollectAuditInfoCache collect = new CollectAuditInfoCache();
|
||||
// StringBuffer parms = new StringBuffer();
|
||||
// for (BizObject bo : bolist) {
|
||||
// String id = bo.getAttribute("id").toString();
|
||||
// if (parms.length()==0) {
|
||||
// parms.append("'"+id+"'");
|
||||
// }else{
|
||||
// parms.append(",'"+id+"'");
|
||||
// }
|
||||
// }
|
||||
// if (parms.length() > 0) {
|
||||
// //查询批量收款状态,并更新租金回笼表
|
||||
// collect.queryBatchCollectStatus(tx,parms);
|
||||
// }
|
||||
// tx.commit();
|
||||
// } catch (JBOException e) {
|
||||
// try {
|
||||
// if (tx != null){
|
||||
// tx.rollback();
|
||||
// }
|
||||
// } catch (JBOException e1) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e1.printStackTrace();
|
||||
// }
|
||||
// e.printStackTrace();
|
||||
// } catch (Exception e) {
|
||||
// try {
|
||||
// if (tx != null){
|
||||
// tx.rollback();
|
||||
// }
|
||||
// } catch (JBOException e1) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e1.printStackTrace();
|
||||
// }
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -27,7 +27,6 @@ import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
|
||||
import com.base.util.QuartzUtil;
|
||||
import com.tenwa.leasing.service.voucher.CreateVoucherService;
|
||||
import com.tenwa.leasing.serviceImpl.voucher.CreateVoucherServiceImpl;
|
||||
import com.tenwa.reckon.constant.Scale;
|
||||
import com.tenwa.reckon.util.Conn;
|
||||
import com.tenwa.reckon.util.DateTools;
|
||||
@ -103,9 +102,9 @@ public class SplitInts implements Job{
|
||||
}
|
||||
rs.close();
|
||||
Sqlca.commit();
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.SplitInts", "success", "成功");
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.SplitInts", "success", "成功", "admin");
|
||||
} catch (Exception e) {
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.SplitInts", "success", "失败");
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.SplitInts", "success", "失败", "admin");
|
||||
logger.error(e.getMessage());
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
|
||||
@ -12,7 +12,7 @@ import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_INFO_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
|
||||
|
||||
import org.apache.jasper.tagplugins.jstl.core.When;
|
||||
//import org.apache.jasper.tagplugins.jstl.core.When;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -9,17 +9,17 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.CREATE_VOUCHER_STATUS;
|
||||
import jbo.app.VOUCHER_HELP;
|
||||
import jbo.com.tenwa.entity.contract.CONTRACT_CHANGE_INFO_TEMP;
|
||||
import jbo.com.tenwa.entity.contract.CONTRACT_INFO;
|
||||
import jbo.com.tenwa.entity.contract.CONTRACT_SIGNATORY;
|
||||
import jbo.com.tenwa.entity.contract.CONTRACT_SUPPLIER_INFO;
|
||||
import jbo.com.tenwa.entity.flow.FLOW_BUSSINESS_OBJECT;
|
||||
import jbo.com.tenwa.fund.entity.charge.CONTRACT_FUND_FUND_CHARGE;
|
||||
import jbo.com.tenwa.rent.entity.rent.C1_FUND_RENT_PLAN;
|
||||
import jbo.com.tenwa.rent.entity.rent.CONTRACT_FUND_RENT_PLAN;
|
||||
import jbo.lc.CONTRACT_CONDITION;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
//import jbo.app.CREATE_VOUCHER_STATUS;
|
||||
//import jbo.app.VOUCHER_HELP;
|
||||
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
|
||||
//import jbo.com.tenwa.entity.contract.CONTRACT_CHANGE_INFO_TEMP;
|
||||
//import jbo.com.tenwa.entity.contract.CONTRACT_INFO;
|
||||
//import jbo.com.tenwa.entity.contract.CONTRACT_SIGNATORY;
|
||||
//import jbo.com.tenwa.entity.contract.CONTRACT_SUPPLIER_INFO;
|
||||
//import jbo.com.tenwa.fund.entity.charge.CONTRACT_FUND_FUND_CHARGE;
|
||||
//import jbo.com.tenwa.rent.entity.rent.C1_FUND_RENT_PLAN;
|
||||
//import jbo.lc.CONTRACT_CONDITION;
|
||||
import jbo.sys.USER_INFO;
|
||||
|
||||
import com.amarsoft.app.als.sys.tools.DateTool;
|
||||
@ -36,12 +36,11 @@ import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.util.conf.Configuration;
|
||||
import com.amarsoft.awe.Configure;
|
||||
import com.amarsoft.awe.control.model.AWEConfigure;
|
||||
import com.tenwa.flow.util.DataOperatorUtil;
|
||||
import com.tenwa.leasing.service.voucher.CreateVoucherService;
|
||||
import com.tenwa.leasing.service.voucher.VoucherToV8Service;
|
||||
import com.tenwa.reckon.util.Conn;
|
||||
import com.tenwa.reckon.util.Tools;
|
||||
import com.tenwa.security.VoucherUtil;
|
||||
import com.tenwa.util.VoucherUtil;
|
||||
|
||||
|
||||
public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
@ -62,14 +61,13 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
|
||||
//收款 BOOKMARK
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void createVoucher_collection(String flow_unid,BizObject CurUser,JBOTransaction tx) throws Exception {
|
||||
//凭证生成开关
|
||||
if("true".equals(control_)){
|
||||
|
||||
Map<String,String> condtion=new HashMap<String, String>();
|
||||
condtion.put("flow_unid", flow_unid);
|
||||
BizObject flow=DataOperatorUtil.getSingleJBO(FLOW_BUSSINESS_OBJECT.CLASS_NAME, condtion, tx);
|
||||
BizObject flow= DataOperatorUtil.getSingleJBO(FLOW_BUSSINESS_OBJECT.CLASS_NAME, condtion, tx);
|
||||
String contract_id=flow.getAttribute("contract_id").toString();
|
||||
|
||||
Map<String, String> headMap = new HashMap<String, String>();
|
||||
@ -301,7 +299,6 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//租金回笼
|
||||
@Override
|
||||
public void createVoucher_rentincome(String flow_unid, BizObject CurUser,JBOTransaction tx) throws Exception {
|
||||
//凭证生成开关
|
||||
if("true".equals(control_)){
|
||||
@ -364,7 +361,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
String hire_date = null;//回笼日期
|
||||
|
||||
//根据contract_id获取contract_signatory表的lessor(出租人,设备购买者),client(承租人)
|
||||
BizObjectManager bm4 = JBOFactory.getBizObjectManager(CONTRACT_SIGNATORY.CLASS_NAME);
|
||||
BizObjectManager bm4 = JBOFactory.getBizObjectManager("CONTRACT_SIGNATORY.CLASS_NAME");
|
||||
BizObjectQuery bq4 = bm4.createQuery("select * from O where contract_id=:contract_id");
|
||||
bq4.setParameter("contract_id", contract_id);
|
||||
BizObject bo4 = bq4.getSingleResult(false);
|
||||
@ -498,7 +495,6 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//实际投放
|
||||
@Override
|
||||
public void createVoucher_fundpayequipt(String flow_unid,BizObject CurUser, JBOTransaction tx) throws Exception {
|
||||
//凭证生成开关
|
||||
if("true".equals(control_)){
|
||||
@ -522,7 +518,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
String contract_number = bos2.getAttribute("contract_number").toString();//合同号、业务合同号
|
||||
|
||||
//根据contract_id查询contract_fund_rent_plan表的租金
|
||||
BizObjectManager bm6 = JBOFactory.getBizObjectManager(CONTRACT_FUND_RENT_PLAN.CLASS_NAME);
|
||||
BizObjectManager bm6 = JBOFactory.getBizObjectManager("CONTRACT_FUND_RENT_PLAN.CLASS_NAME");
|
||||
BizObjectQuery bq6 = bm6.createQuery("select * from O where Contract_id=:Contract_id");
|
||||
bq6.setParameter("Contract_id", contract_id);
|
||||
List<BizObject> bos6 = bq6.getResultList(false);
|
||||
@ -609,7 +605,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
boolean is_fact_pay_equip = false;//是否实际支付的设备款==payfund6-电汇
|
||||
|
||||
//根据contract_id获取contract_signatory表的lessor(出租人,设备购买者),client(承租人)
|
||||
BizObjectManager bm4 = JBOFactory.getBizObjectManager(CONTRACT_SIGNATORY.CLASS_NAME);
|
||||
BizObjectManager bm4 = JBOFactory.getBizObjectManager("CONTRACT_SIGNATORY.CLASS_NAME");
|
||||
BizObjectQuery bq4 = bm4.createQuery("select * from O where contract_id=:contract_id");
|
||||
bq4.setParameter("contract_id", contract_id);
|
||||
BizObject bo4 = bq4.getSingleResult(false);
|
||||
@ -622,7 +618,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
clientname = bo5.getAttribute("customername").toString();//承租人名称
|
||||
|
||||
//根据contract_id,fee_type获取contract_fund_fund_charge表中是否已经投放过
|
||||
List<BizObject> list1 = JBOHelper.queryList(CONTRACT_FUND_FUND_CHARGE.CLASS_NAME, "select * from o where o.contract_id=:contract_id and o.fee_type=:fee_type", contract_id,equip_type);
|
||||
List<BizObject> list1 = JBOHelper.queryList("CONTRACT_FUND_FUND_CHARGE.CLASS_NAME", "select * from o where o.contract_id=:contract_id and o.fee_type=:fee_type", contract_id,equip_type);
|
||||
if(list1.size()>0){
|
||||
for (int i = 0; i < list1.size(); i++) {//得到投放记录的总投资金额
|
||||
|
||||
@ -632,11 +628,11 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//根据contract_id获取contract_supplier_info 表的供应商
|
||||
BizObject sup = JBOHelper.querySingle(CONTRACT_SUPPLIER_INFO.CLASS_NAME, "SELECT ci.customername FROM o ,jbo.app.CUSTOMER_INFO ci WHERE ci.customerid=o.seller AND o.contract_id=:contract_id", contract_id);
|
||||
BizObject sup = JBOHelper.querySingle("CONTRACT_SUPPLIER_INFO.CLASS_NAME", "SELECT ci.customername FROM o ,jbo.app.CUSTOMER_INFO ci WHERE ci.customerid=o.seller AND o.contract_id=:contract_id", contract_id);
|
||||
if(sup!=null)sellername = sup.getAttribute("customername").getString();
|
||||
|
||||
//根据contract_id查询contract_condition表的clean_lease_money 融资额
|
||||
BizObjectManager bm7 = JBOFactory.getBizObjectManager(CONTRACT_CONDITION.CLASS_NAME);
|
||||
BizObjectManager bm7 = JBOFactory.getBizObjectManager("CONTRACT_CONDITION.CLASS_NAME");
|
||||
BizObjectQuery bq7 = bm7.createQuery("select * from O where contract_id=:contract_id");
|
||||
bq7.setParameter("contract_id", contract_id);
|
||||
BizObject bo7 = bq7.getSingleResult(false);
|
||||
@ -896,7 +892,6 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//合同起租
|
||||
@Override
|
||||
public void createVoucher_contractonhire(String flow_unid,BizObject CurUser, JBOTransaction tx) throws Exception {
|
||||
//凭证生成开关
|
||||
if("true".equals(control_)){
|
||||
@ -1129,7 +1124,6 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//付款
|
||||
@Override
|
||||
public void createVoucher_fundpay(String flow_unid, BizObject CurUser,JBOTransaction tx) throws Exception {
|
||||
//凭证生成开关
|
||||
if("true".equals(control_)){
|
||||
@ -1179,7 +1173,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
boolean is_return_caution_money = false;//是否退换保证金
|
||||
|
||||
//根据contract_id获取contract_signatory表的client(承租人)
|
||||
BizObjectManager bm4 = JBOFactory.getBizObjectManager(CONTRACT_SIGNATORY.CLASS_NAME);
|
||||
BizObjectManager bm4 = JBOFactory.getBizObjectManager("CONTRACT_SIGNATORY.CLASS_NAME");
|
||||
BizObjectQuery bq4 = bm4.createQuery("select * from O where contract_id=:contract_id");
|
||||
bq4.setParameter("contract_id", contract_id);
|
||||
BizObject bo4 = bq4.getSingleResult(false);
|
||||
@ -1250,7 +1244,6 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//期末保证金抵扣
|
||||
@Override
|
||||
public void createVoucher_margindeduction(String flow_unid,BizObject CurUser, JBOTransaction tx) throws Exception {
|
||||
//凭证生成开关
|
||||
if("true".equals(control_)){
|
||||
@ -1301,7 +1294,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
|
||||
|
||||
//根据contract_id获取contract_signatory表的client(承租人)
|
||||
BizObjectManager bm4 = JBOFactory.getBizObjectManager(CONTRACT_SIGNATORY.CLASS_NAME);
|
||||
BizObjectManager bm4 = JBOFactory.getBizObjectManager("CONTRACT_SIGNATORY.CLASS_NAME");
|
||||
BizObjectQuery bq4 = bm4.createQuery("select * from O where contract_id=:contract_id");
|
||||
bq4.setParameter("contract_id", contract_id);
|
||||
BizObject bo4 = bq4.getSingleResult(false);
|
||||
@ -1359,7 +1352,6 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//变更(租金计划变更、调息、合同中途终止)
|
||||
@Override
|
||||
public void createVoucher_change(String flow_unid,BizObject CurUser, JBOTransaction tx,String flow_name) throws Exception {
|
||||
//凭证生成开关
|
||||
if("true".equals(control_)){
|
||||
@ -1419,7 +1411,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//根据flow_unid 获取 CONTRACT_CHANGE_INFO_TEMP 中的变更时间
|
||||
BizObject biz = JBOHelper.querySingle(CONTRACT_CHANGE_INFO_TEMP.CLASS_NAME, "select * from o where o.flow_unid=:flow_unid", flow_unid);
|
||||
BizObject biz = JBOHelper.querySingle("jbo.com.tenwa.entity.contract.CONTRACT_CHANGE_INFO_TEMP", "select * from o where o.flow_unid=:flow_unid", flow_unid);
|
||||
if(biz!=null)change_date = biz.getAttribute("change_date").getString();
|
||||
|
||||
//根据flow_unid 获取C1_FUND_RENT_PLAN表中的业务利息--------现利息信息
|
||||
@ -1459,7 +1451,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
|
||||
//调息
|
||||
if("调息流程".equals(flow_name)){
|
||||
List<BizObject> list1 = JBOHelper.queryList(C1_FUND_RENT_PLAN.CLASS_NAME,
|
||||
List<BizObject> list1 = JBOHelper.queryList("C1_FUND_RENT_PLAN",
|
||||
"SELECT SUM(o.INTEREST_BUSINESS)-SUM(p.INTEREST_BUSINESS), o.contract_id FROM o LEFT JOIN jbo.com.tenwa.rent.entity.rent.CONTRACT_FUND_RENT_PLAN p ON p.contract_id=o.contract_id AND p.rent_list=o.rent_list WHERE o.flow_unid='"+flow_unid+"' GROUP BY o.contract_id");
|
||||
if(list1 == null || list1.size() == 0){
|
||||
return;
|
||||
@ -1469,7 +1461,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
penalty_differential = new BigDecimal(list1.get(i).getAttribute("SUM(o.INTEREST_BUSINESS)-SUM(p.INTEREST_BUSINESS)").getString());
|
||||
contract_id = list1.get(i).getAttribute("contract_id").getString();
|
||||
headMap.put("contract_id", contract_id);
|
||||
BizObject bo = JBOHelper.querySingle(CONTRACT_INFO.CLASS_NAME, "select * from O where id=:Id", contract_id);
|
||||
BizObject bo = JBOHelper.querySingle("CONTRACT_INFO", "select * from O where id=:Id", contract_id);
|
||||
if(bo!=null)leas_form = bo.getAttribute("leas_form").toString();
|
||||
change_date = DateTool.getToday("yyyy/MM/dd");//当前日期
|
||||
if(penalty_differential.compareTo(BigDecimal.ZERO)!=0){//利息差不等于0
|
||||
@ -1553,7 +1545,6 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//月末计提
|
||||
@Override
|
||||
public void createVoucher_rentmonth(String contract_id,String handling_fee,String interest,String account_date ,BizObject CurUser, JBOTransaction tx) throws Exception {
|
||||
//生成凭证开关
|
||||
if("true".equals(control_)){
|
||||
@ -1667,147 +1658,145 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//成本均摊
|
||||
@Override
|
||||
public void createVoucher_costSharing(BigDecimal interest,BigDecimal handling, BizObject CurUser,Map<String,String> paraMap, JBOTransaction tx) throws Exception {
|
||||
//生成凭证开关
|
||||
if("true".equals(control_)){
|
||||
HashMap<String, String> headMap = new HashMap<String, String>();
|
||||
List<Map<String,String>> listVoucher = new ArrayList<Map<String,String>>();
|
||||
String bill_id = paraMap.get("bill_id");//借款借据号
|
||||
String accured_month = paraMap.get("accured_month");//计提月份
|
||||
String loan_contract_id = paraMap.get("loan_contract_id");//借款合同号
|
||||
headMap.put("moduleName", bill_id+"-成本均摊");
|
||||
headMap.put("voucherType","costSharing");
|
||||
headMap.put("loan_contract_id", loan_contract_id);
|
||||
headMap.put("bill_id", bill_id);
|
||||
headMap.put("accured_month", accured_month);
|
||||
List<Map<String, BigDecimal>> listMap = new ArrayList<Map<String, BigDecimal>>();
|
||||
BigDecimal allOverCorpus = BigDecimal.ZERO;//所有合同的剩余未还本金,即分配比例时的分母值
|
||||
Calendar cal = Calendar.getInstance();
|
||||
BigDecimal days = new BigDecimal(cal.getActualMaximum(Calendar.DATE));//当前月份的天数
|
||||
|
||||
Conn conn = new Conn();
|
||||
//new_sql加了是否参与成本均摊及均摊截止日期限制
|
||||
String new_sql = "SELECT * from o where o.contract_status>30 AND o.contract_status<100 "
|
||||
+ "AND NVL(o.is_cost,'Y')='Y' AND v.to_char(v.SYSDATE,'yyyy/mm/dd')<=nvl(cost_end_date,v.to_char(v.SYSDATE,'yyyy/mm/dd'))";
|
||||
String old_sql = "select * from o where o.contract_status>30 AND o.contract_status<100";
|
||||
List<BizObject> listC = JBOHelper.queryList(CONTRACT_INFO.CLASS_NAME, new_sql);
|
||||
for (int i = 0; i < listC.size(); i++) {
|
||||
Map<String,BigDecimal> map = new HashMap<String,BigDecimal>();//放map:合同编号,对应的分子(分配比例的分子:未还本金*天数)
|
||||
String contract_id = listC.get(i).getAttribute("id").toString();//contract_info 表的id
|
||||
String sql = "SELECT (a.corpus - nvl(b.corpus,0))over_corpus,nvl(b.corpus,0)AS income_corpus FROM "
|
||||
+ "(SELECT SUM(corpus)corpus FROM contract_fund_rent_income income WHERE income.contract_id=? "
|
||||
+ "AND to_date(substr(income.hire_date,0,7),'YYYY-MM')<SYSDATE)b,"
|
||||
+ "(SELECT SUM(corpus)corpus FROM contract_fund_rent_plan PLAN WHERE plan.contract_id=?)a";
|
||||
List<Map<String, String>> list = conn.executeQuery(sql, contract_id,contract_id);
|
||||
BigDecimal over_corpus = BigDecimal.ZERO;//截止当前期剩余未还本金
|
||||
|
||||
//1、2、3种情况
|
||||
if(list.size()>0){//list.size()==1
|
||||
if("0".equals(list.get(0).get("income_corpus"))){//1、已回笼本金为0,则未回笼本金==over_corpus 分配比例的分子:未还本金*本月天数
|
||||
|
||||
over_corpus = new BigDecimal(StringUtil.nullToString(list.get(0).get("over_corpus"), "0"));
|
||||
map.put(contract_id, over_corpus.multiply(days));
|
||||
listMap.add(map);
|
||||
allOverCorpus = allOverCorpus.add(over_corpus.multiply(days));
|
||||
}else{//本金有回笼记录
|
||||
|
||||
over_corpus = new BigDecimal(StringUtil.nullToString(list.get(0).get("over_corpus"), "0"));
|
||||
|
||||
if(over_corpus.compareTo(BigDecimal.ZERO)==0){
|
||||
continue;//剩余未回笼本金为0,则不对该合同进行均摊
|
||||
}
|
||||
//查询当期有没有回笼的本金项
|
||||
String sql1 = "SELECT * FROM contract_fund_rent_income t WHERE t.contract_id=? "
|
||||
+ " AND t.roll_back IS NULL AND SUBSTR(t.hire_date,0,7)=to_char(Sysdate,'yyyy/MM') ORDER BY t.hire_date";
|
||||
List<Map<String, String>> list1 = conn.executeQuery(sql1, contract_id);
|
||||
if(list1.size()==0){//2、当期没有回笼的本金,则未回笼本金==over_corpus
|
||||
map.put(contract_id, over_corpus.multiply(days));
|
||||
listMap.add(map);
|
||||
allOverCorpus = allOverCorpus.add(over_corpus.multiply(days));
|
||||
continue;
|
||||
}else{//3、当期有回笼的本金,
|
||||
int day1 = 0, day2 = 0;
|
||||
BigDecimal money1 =BigDecimal.ZERO, money2 = BigDecimal.ZERO;//money2=分配规则的分子部分的值 ,即 未还本金*天数...
|
||||
for (int j = 0; j < list1.size(); j++) {
|
||||
day2 = Integer.parseInt(list1.get(j).get("hire_date").substring(8, 9));//回笼日期
|
||||
money1 = new BigDecimal(list1.get(j).get("corpus").toString());//回笼本金
|
||||
money2 = money2.add(over_corpus.multiply(new BigDecimal(day2-day1)));//
|
||||
over_corpus = over_corpus.subtract(money1);
|
||||
day1 = day2;
|
||||
}
|
||||
map.put(contract_id, money2);
|
||||
listMap.add(map);
|
||||
allOverCorpus = allOverCorpus.add(money2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BigDecimal costMoney_interest = BigDecimal.ZERO;//每个项目的利息均摊金额
|
||||
BigDecimal costMoney_handling = BigDecimal.ZERO;//每个项目的手续费均摊金额
|
||||
BigDecimal already_interest = BigDecimal.ZERO;//已经分摊的利息
|
||||
BigDecimal already_handling = BigDecimal.ZERO;//已经分摊的手续费
|
||||
BigDecimal already_costRate = BigDecimal.ZERO;//已经分摊的比例
|
||||
BigDecimal costRate = BigDecimal.ZERO;//均摊比例
|
||||
BigDecimal proj_money = BigDecimal.ZERO;//每个项目的未还本金*天数
|
||||
//BigDecimal b = BigDecimal.ZERO;//测试均摊总值是否与成本相等
|
||||
String contract_id = null;//合同编号
|
||||
//String leas_form = null;//租赁形式
|
||||
//遍历得到每个合同的分配比例,生成成本均摊
|
||||
for (int i = 0; i < listMap.size(); i++) {
|
||||
for (Map.Entry<String,BigDecimal> j : listMap.get(i).entrySet()) {
|
||||
contract_id = j.getKey();
|
||||
proj_money = j.getValue();
|
||||
costRate = proj_money.divide(allOverCorpus,6,BigDecimal.ROUND_HALF_UP);//均摊比例=(未还本金*天数/所有合同的 未还本金*天数)
|
||||
costMoney_interest = costRate.multiply(interest).divide(new BigDecimal("1"),2,BigDecimal.ROUND_HALF_UP);//保留两位小数,四舍五入
|
||||
costMoney_handling = costRate.multiply(handling).divide(new BigDecimal("1"),2,BigDecimal.ROUND_HALF_UP);//保留两位小数,四舍五入
|
||||
if(i==listMap.size()-1){//最后一个合同的均摊金额=总金额-已分摊金额 (避免出现均摊后的总金额超过要均摊的金额),比例=1-已分摊比例
|
||||
costRate = BigDecimal.ONE.subtract(already_costRate);
|
||||
costMoney_interest = interest.subtract(already_interest);
|
||||
costMoney_handling = handling.subtract(already_handling);
|
||||
}
|
||||
already_interest = already_interest.add(costMoney_interest);
|
||||
already_handling = already_handling.add(costMoney_handling);
|
||||
already_costRate = already_costRate.add(costRate);
|
||||
//headMap.put("contract_id", contract_id);
|
||||
//摘要:成本均摊
|
||||
//interest均摊总利息、handling均摊总手续费、costRate每个合同均摊比例,这三个字段应该存起来
|
||||
if(costMoney_interest.compareTo(BigDecimal.ZERO)==1){
|
||||
//借 主营业务成本——租赁成本——利息支出
|
||||
VoucherUtil.DebitCostSharing(listVoucher, "成本均摊", "main_biz_cost_lease_cost_interest_pay", Tools.formatNumberDoubleTwo(costMoney_interest.toString()),
|
||||
DateUtil.getToday(), DateUtil.getToday(),contract_id,Tools.formatNumberDoubleTwo(interest.toString()),Tools.formatNumberDoubleTwo(handling.toString()),Tools.formatNumberDoubleTwo(costRate.toString()));
|
||||
//贷 应付利息
|
||||
VoucherUtil.CreditCostSharing(listVoucher, "成本均摊", "interest_payables", Tools.formatNumberDoubleTwo(costMoney_interest.toString()),
|
||||
DateUtil.getToday(), DateUtil.getToday(),contract_id,Tools.formatNumberDoubleTwo(interest.toString()),Tools.formatNumberDoubleTwo(handling.toString()),Tools.formatNumberDoubleTwo(costRate.toString()));
|
||||
}
|
||||
if(costMoney_handling.compareTo(BigDecimal.ZERO)==1){
|
||||
//借 主营业务成本——租赁成本——手续费支出
|
||||
VoucherUtil.DebitCostSharing(listVoucher, "成本均摊", "main_biz_cost_lease_cost_handling_pay", Tools.formatNumberDoubleTwo(costMoney_handling.toString()),
|
||||
DateUtil.getToday(), DateUtil.getToday(),contract_id,Tools.formatNumberDoubleTwo(interest.toString()),Tools.formatNumberDoubleTwo(handling.toString()),Tools.formatNumberDoubleTwo(costRate.toString()));
|
||||
//贷 其他应付款-单位
|
||||
VoucherUtil.CreditCostSharing(listVoucher, "成本均摊", "other_payables_company", Tools.formatNumberDoubleTwo(costMoney_handling.toString()),
|
||||
DateUtil.getToday(), DateUtil.getToday(),contract_id,Tools.formatNumberDoubleTwo(interest.toString()),Tools.formatNumberDoubleTwo(handling.toString()),Tools.formatNumberDoubleTwo(costRate.toString()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
//System.out.println(costMoney);
|
||||
//b = b.add(costMoney);
|
||||
}
|
||||
}
|
||||
|
||||
voucherToV8Service.saveV8Message(headMap, listVoucher, CurUser, tx);
|
||||
listVoucher.clear();
|
||||
headMap.remove(contract_id);
|
||||
//System.out.println(b);
|
||||
conn.close();
|
||||
}
|
||||
// if("true".equals(control_)){
|
||||
// HashMap<String, String> headMap = new HashMap<String, String>();
|
||||
// List<Map<String,String>> listVoucher = new ArrayList<Map<String,String>>();
|
||||
// String bill_id = paraMap.get("bill_id");//借款借据号
|
||||
// String accured_month = paraMap.get("accured_month");//计提月份
|
||||
// String loan_contract_id = paraMap.get("loan_contract_id");//借款合同号
|
||||
// headMap.put("moduleName", bill_id+"-成本均摊");
|
||||
// headMap.put("voucherType","costSharing");
|
||||
// headMap.put("loan_contract_id", loan_contract_id);
|
||||
// headMap.put("bill_id", bill_id);
|
||||
// headMap.put("accured_month", accured_month);
|
||||
// List<Map<String, BigDecimal>> listMap = new ArrayList<Map<String, BigDecimal>>();
|
||||
// BigDecimal allOverCorpus = BigDecimal.ZERO;//所有合同的剩余未还本金,即分配比例时的分母值
|
||||
// Calendar cal = Calendar.getInstance();
|
||||
// BigDecimal days = new BigDecimal(cal.getActualMaximum(Calendar.DATE));//当前月份的天数
|
||||
//
|
||||
// Conn conn = new Conn();
|
||||
// //new_sql加了是否参与成本均摊及均摊截止日期限制
|
||||
// String new_sql = "SELECT * from o where o.contract_status>30 AND o.contract_status<100 "
|
||||
// + "AND NVL(o.is_cost,'Y')='Y' AND v.to_char(v.SYSDATE,'yyyy/mm/dd')<=nvl(cost_end_date,v.to_char(v.SYSDATE,'yyyy/mm/dd'))";
|
||||
// String old_sql = "select * from o where o.contract_status>30 AND o.contract_status<100";
|
||||
// List<BizObject> listC = JBOHelper.queryList("CONTRACT_INFO.CLASS_NAME", new_sql);
|
||||
// for (int i = 0; i < listC.size(); i++) {
|
||||
// Map<String,BigDecimal> map = new HashMap<String,BigDecimal>();//放map:合同编号,对应的分子(分配比例的分子:未还本金*天数)
|
||||
// String contract_id = listC.get(i).getAttribute("id").toString();//contract_info 表的id
|
||||
// String sql = "SELECT (a.corpus - nvl(b.corpus,0))over_corpus,nvl(b.corpus,0)AS income_corpus FROM "
|
||||
// + "(SELECT SUM(corpus)corpus FROM contract_fund_rent_income income WHERE income.contract_id=? "
|
||||
// + "AND to_date(substr(income.hire_date,0,7),'YYYY-MM')<SYSDATE)b,"
|
||||
// + "(SELECT SUM(corpus)corpus FROM contract_fund_rent_plan PLAN WHERE plan.contract_id=?)a";
|
||||
// List<Map<String, String>> list = conn.executeQuery(sql, contract_id,contract_id);
|
||||
// BigDecimal over_corpus = BigDecimal.ZERO;//截止当前期剩余未还本金
|
||||
//
|
||||
// //1、2、3种情况
|
||||
// if(list.size()>0){//list.size()==1
|
||||
// if("0".equals(list.get(0).get("income_corpus"))){//1、已回笼本金为0,则未回笼本金==over_corpus 分配比例的分子:未还本金*本月天数
|
||||
//
|
||||
// over_corpus = new BigDecimal(StringUtil.nullToString(list.get(0).get("over_corpus"), "0"));
|
||||
// map.put(contract_id, over_corpus.multiply(days));
|
||||
// listMap.add(map);
|
||||
// allOverCorpus = allOverCorpus.add(over_corpus.multiply(days));
|
||||
// }else{//本金有回笼记录
|
||||
//
|
||||
// over_corpus = new BigDecimal(StringUtil.nullToString(list.get(0).get("over_corpus"), "0"));
|
||||
//
|
||||
// if(over_corpus.compareTo(BigDecimal.ZERO)==0){
|
||||
// continue;//剩余未回笼本金为0,则不对该合同进行均摊
|
||||
// }
|
||||
// //查询当期有没有回笼的本金项
|
||||
// String sql1 = "SELECT * FROM contract_fund_rent_income t WHERE t.contract_id=? "
|
||||
// + " AND t.roll_back IS NULL AND SUBSTR(t.hire_date,0,7)=to_char(Sysdate,'yyyy/MM') ORDER BY t.hire_date";
|
||||
// List<Map<String, String>> list1 = conn.executeQuery(sql1, contract_id);
|
||||
// if(list1.size()==0){//2、当期没有回笼的本金,则未回笼本金==over_corpus
|
||||
// map.put(contract_id, over_corpus.multiply(days));
|
||||
// listMap.add(map);
|
||||
// allOverCorpus = allOverCorpus.add(over_corpus.multiply(days));
|
||||
// continue;
|
||||
// }else{//3、当期有回笼的本金,
|
||||
// int day1 = 0, day2 = 0;
|
||||
// BigDecimal money1 =BigDecimal.ZERO, money2 = BigDecimal.ZERO;//money2=分配规则的分子部分的值 ,即 未还本金*天数...
|
||||
// for (int j = 0; j < list1.size(); j++) {
|
||||
// day2 = Integer.parseInt(list1.get(j).get("hire_date").substring(8, 9));//回笼日期
|
||||
// money1 = new BigDecimal(list1.get(j).get("corpus").toString());//回笼本金
|
||||
// money2 = money2.add(over_corpus.multiply(new BigDecimal(day2-day1)));//
|
||||
// over_corpus = over_corpus.subtract(money1);
|
||||
// day1 = day2;
|
||||
// }
|
||||
// map.put(contract_id, money2);
|
||||
// listMap.add(map);
|
||||
// allOverCorpus = allOverCorpus.add(money2);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// BigDecimal costMoney_interest = BigDecimal.ZERO;//每个项目的利息均摊金额
|
||||
// BigDecimal costMoney_handling = BigDecimal.ZERO;//每个项目的手续费均摊金额
|
||||
// BigDecimal already_interest = BigDecimal.ZERO;//已经分摊的利息
|
||||
// BigDecimal already_handling = BigDecimal.ZERO;//已经分摊的手续费
|
||||
// BigDecimal already_costRate = BigDecimal.ZERO;//已经分摊的比例
|
||||
// BigDecimal costRate = BigDecimal.ZERO;//均摊比例
|
||||
// BigDecimal proj_money = BigDecimal.ZERO;//每个项目的未还本金*天数
|
||||
// //BigDecimal b = BigDecimal.ZERO;//测试均摊总值是否与成本相等
|
||||
// String contract_id = null;//合同编号
|
||||
// //String leas_form = null;//租赁形式
|
||||
// //遍历得到每个合同的分配比例,生成成本均摊
|
||||
// for (int i = 0; i < listMap.size(); i++) {
|
||||
// for (Map.Entry<String,BigDecimal> j : listMap.get(i).entrySet()) {
|
||||
// contract_id = j.getKey();
|
||||
// proj_money = j.getValue();
|
||||
// costRate = proj_money.divide(allOverCorpus,6,BigDecimal.ROUND_HALF_UP);//均摊比例=(未还本金*天数/所有合同的 未还本金*天数)
|
||||
// costMoney_interest = costRate.multiply(interest).divide(new BigDecimal("1"),2,BigDecimal.ROUND_HALF_UP);//保留两位小数,四舍五入
|
||||
// costMoney_handling = costRate.multiply(handling).divide(new BigDecimal("1"),2,BigDecimal.ROUND_HALF_UP);//保留两位小数,四舍五入
|
||||
// if(i==listMap.size()-1){//最后一个合同的均摊金额=总金额-已分摊金额 (避免出现均摊后的总金额超过要均摊的金额),比例=1-已分摊比例
|
||||
// costRate = BigDecimal.ONE.subtract(already_costRate);
|
||||
// costMoney_interest = interest.subtract(already_interest);
|
||||
// costMoney_handling = handling.subtract(already_handling);
|
||||
// }
|
||||
// already_interest = already_interest.add(costMoney_interest);
|
||||
// already_handling = already_handling.add(costMoney_handling);
|
||||
// already_costRate = already_costRate.add(costRate);
|
||||
// //headMap.put("contract_id", contract_id);
|
||||
// //摘要:成本均摊
|
||||
// //interest均摊总利息、handling均摊总手续费、costRate每个合同均摊比例,这三个字段应该存起来
|
||||
// if(costMoney_interest.compareTo(BigDecimal.ZERO)==1){
|
||||
// //借 主营业务成本——租赁成本——利息支出
|
||||
// VoucherUtil.DebitCostSharing(listVoucher, "成本均摊", "main_biz_cost_lease_cost_interest_pay", Tools.formatNumberDoubleTwo(costMoney_interest.toString()),
|
||||
// DateUtil.getToday(), DateUtil.getToday(),contract_id,Tools.formatNumberDoubleTwo(interest.toString()),Tools.formatNumberDoubleTwo(handling.toString()),Tools.formatNumberDoubleTwo(costRate.toString()));
|
||||
// //贷 应付利息
|
||||
// VoucherUtil.CreditCostSharing(listVoucher, "成本均摊", "interest_payables", Tools.formatNumberDoubleTwo(costMoney_interest.toString()),
|
||||
// DateUtil.getToday(), DateUtil.getToday(),contract_id,Tools.formatNumberDoubleTwo(interest.toString()),Tools.formatNumberDoubleTwo(handling.toString()),Tools.formatNumberDoubleTwo(costRate.toString()));
|
||||
// }
|
||||
// if(costMoney_handling.compareTo(BigDecimal.ZERO)==1){
|
||||
// //借 主营业务成本——租赁成本——手续费支出
|
||||
// VoucherUtil.DebitCostSharing(listVoucher, "成本均摊", "main_biz_cost_lease_cost_handling_pay", Tools.formatNumberDoubleTwo(costMoney_handling.toString()),
|
||||
// DateUtil.getToday(), DateUtil.getToday(),contract_id,Tools.formatNumberDoubleTwo(interest.toString()),Tools.formatNumberDoubleTwo(handling.toString()),Tools.formatNumberDoubleTwo(costRate.toString()));
|
||||
// //贷 其他应付款-单位
|
||||
// VoucherUtil.CreditCostSharing(listVoucher, "成本均摊", "other_payables_company", Tools.formatNumberDoubleTwo(costMoney_handling.toString()),
|
||||
// DateUtil.getToday(), DateUtil.getToday(),contract_id,Tools.formatNumberDoubleTwo(interest.toString()),Tools.formatNumberDoubleTwo(handling.toString()),Tools.formatNumberDoubleTwo(costRate.toString()));
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// //System.out.println(costMoney);
|
||||
// //b = b.add(costMoney);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// voucherToV8Service.saveV8Message(headMap, listVoucher, CurUser, tx);
|
||||
// listVoucher.clear();
|
||||
// headMap.remove(contract_id);
|
||||
// //System.out.println(b);
|
||||
// conn.close();
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
//确认收入(分摊)
|
||||
@Override
|
||||
public void createVoucher_confirmincome(String start_time,String end_time,BizObject CurUser, JBOTransaction tx) throws Exception {
|
||||
|
||||
Map<String, String> headMap = new HashMap<String, String>();
|
||||
@ -1867,7 +1856,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
VoucherUtil.Credit(list, contract_number+"确认利息收入","main_income_interest_income",Tools.formatNumberDoubleTwo(interest.toString()),accounting_date, accounting_date);
|
||||
|
||||
//往create_voucher_status表里新增一条数据
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CREATE_VOUCHER_STATUS.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("CREATE_VOUCHER_STATUS.CLASS_NAME");
|
||||
BizObject bo = bom.newObject();
|
||||
bo.setAttributeValue("planorincome_id",id);
|
||||
bo.setAttributeValue("money_type","rent");//金额类型为租金
|
||||
@ -1904,7 +1893,6 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//分摊汇总
|
||||
@Override
|
||||
public void createVoucher_sharetotal(String start_time, String end_time,BizObject CurUser, JBOTransaction tx) throws Exception {
|
||||
|
||||
Map<String, String> headMap = new HashMap<String, String>();
|
||||
@ -2017,7 +2005,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
VoucherUtil.Credit(list, contract_number+"确认留购价收入","main_income_norminal_price",Tools.formatNumberDoubleTwo(norminal_price.toString()), accounting_date,accounting_date);
|
||||
|
||||
//往create_voucher_status表里面插入一条数据
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CREATE_VOUCHER_STATUS.CLASS_NAME);
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager("CREATE_VOUCHER_STATUS.CLASS_NAME");
|
||||
BizObject bo = bom.newObject();
|
||||
bo.setAttributeValue("planorincome_id",planorincome_id);
|
||||
bo.setAttributeValue("money_type","fund");//金额类型为资金
|
||||
@ -2061,8 +2049,7 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//网银批量核销复核确认
|
||||
@Override
|
||||
public void createVoucher_confirmchecked(List<BizObject> boList,BizObject CurUser, JBOTransaction tx) throws Exception {
|
||||
public void createVoucher_confirmchecked(List<BizObject> boList,BizObject CurUser, JBOTransaction tx) throws Exception {
|
||||
|
||||
BigDecimal totalMoney = BigDecimal.ZERO;
|
||||
String contract_number = null;//业务合同号
|
||||
@ -2173,7 +2160,6 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
}
|
||||
|
||||
//定时任务自动合同起租
|
||||
@Override
|
||||
public void createVoucher_contractonhireauto(List<BizObject> boList,BizObject CurUser,JBOTransaction tx) throws Exception {
|
||||
|
||||
String id = null;//contract_info表的主键id
|
||||
@ -2398,5 +2384,9 @@ public class CreateVoucherServiceImpl implements CreateVoucherService {
|
||||
voucherToV8Service.saveV8Message(headMap, list, CurUser,tx);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void createVoucher(JBOTransaction tx, Map<String, String> param) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.ASResultSet;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.file.util.FileOperatorUtil;
|
||||
//import com.tenwa.file.util.FileOperatorUtil;
|
||||
import com.tenwa.leasing.service.voucher.IntereasVoucherheadService;
|
||||
/**
|
||||
*
|
||||
|
||||
@ -134,20 +134,20 @@ public class VoucherAction {
|
||||
* @throws Exception
|
||||
*/
|
||||
public String costSharing(JBOTransaction tx) throws Exception{
|
||||
String mes = null;
|
||||
//生成成本均摊凭证
|
||||
BizObject curUser = JBOHelper.querySingle(USER_INFO.CLASS_NAME, "select * from o where o.userid=:userid", userid);
|
||||
if(curUser==null){
|
||||
curUser = new BizObject(USER_INFO.CLASS_NAME);
|
||||
}
|
||||
CreateVoucherService c = new CreateVoucherServiceImpl();
|
||||
Map<String,String> paraMap = new HashMap<String, String>();
|
||||
paraMap.put("loan_contract_id", loan_contract_id);
|
||||
paraMap.put("bill_id", bill_id);
|
||||
paraMap.put("accured_month", accured_month);
|
||||
//param :利息,手续费,当前用户,借据合同id,事务
|
||||
c.createVoucher_costSharing(new BigDecimal(StringUtil.nullToString(interest, "0")),new BigDecimal(StringUtil.nullToString(handling, "0")),curUser,paraMap, tx);
|
||||
//conn.close();
|
||||
// String mes = null;
|
||||
// //生成成本均摊凭证
|
||||
// BizObject curUser = JBOHelper.querySingle(USER_INFO.CLASS_NAME, "select * from o where o.userid=:userid", userid);
|
||||
// if(curUser==null){
|
||||
// curUser = new BizObject(USER_INFO.CLASS_NAME);
|
||||
// }
|
||||
// CreateVoucherService c = new CreateVoucherServiceImpl();
|
||||
// Map<String,String> paraMap = new HashMap<String, String>();
|
||||
// paraMap.put("loan_contract_id", loan_contract_id);
|
||||
// paraMap.put("bill_id", bill_id);
|
||||
// paraMap.put("accured_month", accured_month);
|
||||
// //param :利息,手续费,当前用户,借据合同id,事务
|
||||
// c.createVoucher_costSharing(new BigDecimal(StringUtil.nullToString(interest, "0")),new BigDecimal(StringUtil.nullToString(handling, "0")),curUser,paraMap, tx);
|
||||
// //conn.close();
|
||||
return "success";
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user