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