bug
This commit is contained in:
parent
98d824a312
commit
66cc5b5645
@ -13,34 +13,42 @@ import com.amarsoft.context.ASUser;
|
||||
|
||||
public class DocLibraryStateUpdate {
|
||||
|
||||
public static void update(String libraryId, String type, ASUser CurUser, String CurTime, JBOTransaction tx)
|
||||
throws JBOException {
|
||||
public static void update(String libraryId, String type, ASUser CurUser,
|
||||
String CurTime, JBOTransaction tx) throws JBOException {
|
||||
try {
|
||||
BizObjectManager bom = JBOFactory
|
||||
.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME);
|
||||
BizObject bo = bom.createQuery("ID=:ID").setParameter("ID", libraryId)
|
||||
.getSingleResult(true);
|
||||
BizObject bo = bom.createQuery("ID=:ID")
|
||||
.setParameter("ID", libraryId).getSingleResult(true);
|
||||
|
||||
if (null == bo)
|
||||
return;
|
||||
tx.join(bom);
|
||||
BizObjectManager attM = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME);
|
||||
BizObject att = attM.createQuery("LIBRARY_ID=:LIBRARY_ID").setParameter("LIBRARY_ID", libraryId).getSingleResult(false);
|
||||
tx.join(bom);
|
||||
BizObjectManager attM = JBOFactory
|
||||
.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME);
|
||||
BizObject att = attM
|
||||
.createQuery("LIBRARY_ID=:LIBRARY_ID AND DELETEED IS NULL")
|
||||
.setParameter("LIBRARY_ID", libraryId)
|
||||
.getSingleResult(false);
|
||||
switch (type) {
|
||||
case "1":
|
||||
if (null == att) return; // 没有找到附件 不做已提交修改
|
||||
bo.setAttributeValue("BUSINESS_CHECK", "DocCheck_0"); // DocCheck_0 已提交
|
||||
if (null == att)
|
||||
return; // 没有找到附件 不做已提交修改
|
||||
bo.setAttributeValue("BUSINESS_CHECK", "DocCheck_0"); // DocCheck_0
|
||||
// 已提交
|
||||
break;
|
||||
case "-1":
|
||||
if (null != att) return; // 附件未清空 不做未提交修改
|
||||
bo.setAttributeValue("BUSINESS_CHECK", "DocCheck_2"); // DocCheck_2 未提交
|
||||
if (null != att)
|
||||
return; // 附件未清空 不做未提交修改
|
||||
bo.setAttributeValue("BUSINESS_CHECK", "DocCheck_2"); // DocCheck_2
|
||||
// 未提交
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
bo.setAttributeValue("UPDATEUSERID",CurUser.getUserID());
|
||||
bo.setAttributeValue("UPDATEORGID", CurUser.getOrgID());
|
||||
bo.setAttributeValue("UPDATETIME", CurTime);
|
||||
bo.setAttributeValue("UPDATEUSERID", CurUser.getUserID());
|
||||
bo.setAttributeValue("UPDATEORGID", CurUser.getOrgID());
|
||||
bo.setAttributeValue("UPDATETIME", CurTime);
|
||||
bom.saveObject(bo);
|
||||
tx.commit();
|
||||
} catch (Exception e) {
|
||||
|
||||
@ -347,7 +347,7 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService {
|
||||
BizObjectManager attManage = JBOFactory
|
||||
.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME);
|
||||
List<BizObject> atts = attManage
|
||||
.createQuery("LIBRARY_ID=:LIBRARY_ID")
|
||||
.createQuery("LIBRARY_ID=:LIBRARY_ID AND DELETEED IS NULL")
|
||||
.setParameter("LIBRARY_ID", libraryId).getResultList(false);
|
||||
List<Map<String, Object>> attList = new ArrayList<Map<String, Object>>();
|
||||
for (BizObject att : atts) {
|
||||
|
||||
@ -40,7 +40,7 @@ public class LBDocAttributeServiceImpl implements LBDocAttributeService {
|
||||
|
||||
BizObjectManager bom = JBOFactory
|
||||
.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME);
|
||||
List<BizObject> bos = bom.createQuery("LIBRARY_ID=:LIBRARY_ID")
|
||||
List<BizObject> bos = bom.createQuery("LIBRARY_ID=:LIBRARY_ID AND DELETEED IS NULL")
|
||||
.setParameter("LIBRARY_ID", libraryId).getResultList(false);
|
||||
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
|
||||
for (BizObject bo : bos) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user