diff --git a/src_core/com/tenwa/doc/action/DocListAction.java b/src_core/com/tenwa/doc/action/DocListAction.java index 952039899..fc7ec4106 100644 --- a/src_core/com/tenwa/doc/action/DocListAction.java +++ b/src_core/com/tenwa/doc/action/DocListAction.java @@ -5,12 +5,15 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; +import java.math.BigDecimal; import java.util.List; +import java.util.Map; import javax.imageio.ImageIO; import jbo.app.tenwa.doc.LB_DOCATTRIBUTE; import jbo.app.tenwa.doc.LB_DOCCONFIG; + import com.amarsoft.are.ARE; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; @@ -21,6 +24,7 @@ import com.amarsoft.are.util.json.JSONEncoder; import com.amarsoft.are.util.json.JSONObject; import com.amarsoft.awe.util.ASResultSet; import com.amarsoft.awe.util.Transaction; +import com.tenwa.reckon.util.Conn; public class DocListAction { @@ -58,10 +62,19 @@ public class DocListAction { //bm.createQuery("delete from O where id=:id").setParameter("id", attId).executeUpdate(); bm.createQuery("update O set DELETEED='Y' where id=:id").setParameter("id", attId).executeUpdate(); BizObjectManager bm1=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME); - bm1.createQuery("update O set BUSINESS_CHECK=:BussinessCheck where id=:id").setParameter("BussinessCheck", this.BussinessCheck).setParameter("id", library_id).executeUpdate(); + // 略该 错了可删 已下 + BizObjectManager bm2=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCATTRIBUTE.CLASS_NAME); + List objs=bm2.createQuery("select * from O where library_id=:library_id and (DELETEED<>'Y' OR DELETEED IS NULL)").setParameter("library_id",library_id).getResultList(true); + if (objs.size()>1) { + bm1.createQuery("update O set BUSINESS_CHECK=:BussinessCheck where id=:id").setParameter("BussinessCheck", "DocCheck_0").setParameter("id", library_id).executeUpdate(); + }else{ + bm1.createQuery("update O set BUSINESS_CHECK=:BussinessCheck where id=:id").setParameter("BussinessCheck", this.BussinessCheck).setParameter("id", library_id).executeUpdate(); + } + // 到此处 以上 bm1.createQuery("update O set BUSINESS_CHECK=:BussinessCheck where id=:id").setParameter("BussinessCheck", this.BussinessCheck).setParameter("id", library_id).executeUpdate(); tx.commit(); return ""; } + public String deleteMoreAttr(JBOTransaction tx) throws Exception{ String [] DocAttIdArr=this.attId.split("@"); for(String DocAttId:DocAttIdArr){