资料清单重复生成问题
This commit is contained in:
parent
fdfd409c97
commit
3d34f293a9
@ -1,6 +1,5 @@
|
||||
package com.tenwa.doc.action;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
@ -12,14 +11,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.amarsoft.awe.Configure;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
|
||||
import jbo.app.tenwa.customer.LB_CAR_CREDIT_PERSONAL_INFO;
|
||||
import jbo.app.tenwa.customer.LB_CAR_CREDIT_PERSONAL_INFO_TEMP;
|
||||
import jbo.app.tenwa.customer.LB_CAR_CREDIT_RISKITEM;
|
||||
import jbo.app.tenwa.customer.LB_CAR_CREDIT_RISKITEM_TEMP;
|
||||
import jbo.app.tenwa.doc.LB_DOCATTRIBUTE;
|
||||
import jbo.app.tenwa.doc.LB_DOCCONFIG;
|
||||
import jbo.app.tenwa.doc.LB_DOCLIBRARY;
|
||||
@ -27,7 +20,6 @@ import jbo.app.tenwa.doc.LB_DOCRELATIVE;
|
||||
import jbo.app.tenwa.doc.LM_MAILONLINE_DOC;
|
||||
import jbo.app.tenwa.doc.LM_MAILONLINE_DOC_TEMP;
|
||||
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -36,7 +28,6 @@ import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
|
||||
import com.base.util.StringUtil;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.officetempalte.util.FileOperatorUtil;
|
||||
|
||||
@ -51,7 +42,7 @@ public class DocListInitAction {
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static synchronized void initDocList(Map<String, String> param,Map<String, String> other, String docno, Configure curConfig)throws Exception {
|
||||
public static synchronized void initDocList(Map<String, String> param,Map<String, String> other, String docno, Configure curConfig,Transaction Sqlca)throws Exception {
|
||||
String CustomerType = other.get("CustomerType");
|
||||
String[] itemnos = docno.split(",");
|
||||
String s = "";
|
||||
@ -74,12 +65,9 @@ public class DocListInitAction {
|
||||
s = s.substring(0, s.length() - 1);
|
||||
}
|
||||
docno = s;
|
||||
BizObjectManager relaBm = JBOFactory
|
||||
.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME);
|
||||
BizObjectManager libBm = JBOFactory
|
||||
.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME);
|
||||
BizObjectManager configBm = JBOFactory
|
||||
.getBizObjectManager(LB_DOCCONFIG.CLASS_NAME);
|
||||
BizObjectManager relaBm = JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME,Sqlca);
|
||||
BizObjectManager libBm = JBOFactory.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME,Sqlca);
|
||||
BizObjectManager configBm = JBOFactory.getBizObjectManager(LB_DOCCONFIG.CLASS_NAME,Sqlca);
|
||||
if ("".equals(docno)) {
|
||||
return;
|
||||
}
|
||||
@ -96,30 +84,21 @@ public class DocListInitAction {
|
||||
for (int i = 0; i < 10; i++)
|
||||
ARE.getLog().info("relativeid:"+relativeid);
|
||||
|
||||
List<BizObject> configList = configBm.createQuery(
|
||||
"doc_Class_Itemno in (" + docno + ")").getResultList(false);
|
||||
List<BizObject> configList = configBm.createQuery("doc_Class_Itemno in (" + docno + ")").getResultList(false);
|
||||
ARE.getLog().info("size:"+configList.size());
|
||||
|
||||
|
||||
for (BizObject config : configList) {
|
||||
BizObject lib = libBm
|
||||
.createQuery("Relative_Id=:relaid and config_id=:configid")
|
||||
.setParameter("relaid", relativeid)
|
||||
.setParameter("configid",
|
||||
config.getAttribute("id").getString())
|
||||
.getSingleResult(true);
|
||||
BizObject lib = libBm.createQuery("Relative_Id=:relaid and config_id=:configid").setParameter("relaid", relativeid).setParameter("configid",config.getAttribute("id").getString()).getSingleResult(true);
|
||||
if (lib == null) {
|
||||
lib = libBm.newObject();
|
||||
DataOperatorUtil.coptyJBOPropertyNoKey(config, lib);
|
||||
lib.setAttributeValue("relative_id", relativeid);
|
||||
lib.setAttributeValue("BUSINESS_CHECK", "DocCheck_2");
|
||||
lib.setAttributeValue("REVIEW_CHECK", "DocCheck_2");
|
||||
lib.setAttributeValue("config_id", config.getAttribute("id")
|
||||
.getString());
|
||||
lib.setAttributeValue("config_id", config.getAttribute("id").getString());
|
||||
lib.setAttributeValue("IS_INIT", "1");
|
||||
if ("used_car".equals(other.get("carAttributes"))
|
||||
&& "³µÁ¾ÕÕÆ¬".equals(lib.getAttribute("DOC_NAME")
|
||||
.getString())) {
|
||||
if ("used_car".equals(other.get("carAttributes")) && "³µÁ¾ÕÕÆ¬".equals(lib.getAttribute("DOC_NAME").getString())) {
|
||||
lib.setAttributeValue("DOC_NATURE", "01");
|
||||
}
|
||||
libBm.saveObject(lib);
|
||||
@ -136,16 +115,12 @@ public class DocListInitAction {
|
||||
continue;
|
||||
} else {
|
||||
// ¹ØÁªÆäËüÎļþÇåµ¥
|
||||
String[] docRelas = config.getAttribute("DOC_RELATION_ID")
|
||||
.getString().split(",");
|
||||
String[] docRelas = config.getAttribute("DOC_RELATION_ID").getString().split(",");
|
||||
Boolean flag = false;
|
||||
for (int i = 0; i < docRelas.length; i++) {
|
||||
List<BizObject> libList = libBm.createQuery(sql)
|
||||
.setParameter("configid", docRelas[i])
|
||||
.getResultList(false);
|
||||
List<BizObject> libList = libBm.createQuery(sql).setParameter("configid", docRelas[i]).getResultList(false);
|
||||
for (BizObject li : libList) {
|
||||
Boolean flag2 = copyDocAttr(li, libid,
|
||||
curConfig.getConfigure("FileSaveMode"));
|
||||
Boolean flag2 = copyDocAttr(li, libid,curConfig.getConfigure("FileSaveMode"));
|
||||
if (flag2) {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user