修改app端发邮寄发起空合同报错提示问题
This commit is contained in:
parent
35ad3f5717
commit
4db1f914e0
@ -27,6 +27,7 @@ import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.context.ASUser;
|
||||
import com.base.constant.RestfullConstant;
|
||||
import com.base.util.DateUtil;
|
||||
import com.base.util.MultipartDataUtil;
|
||||
@ -289,24 +290,31 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
|
||||
System.out.println("=======================================");
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
||||
MailArchiveBO bo = new MailArchiveBO(fieldMap,curUser, tx);
|
||||
bo.businessAppStart(tx);
|
||||
tx.commit();
|
||||
String sReturnInfo = bo.getMsg();
|
||||
if (sReturnInfo.startsWith("success")) {
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
body.put("flowUnid", bo.getObjectNo());
|
||||
body.put("objectNo", bo.getObjectNo());
|
||||
body.put("taskNo", bo.getSerialNo());
|
||||
body.put("serialNo", bo.getSerialNo());
|
||||
ReturnMapUtil.setReturnMap(body,
|
||||
RestfullConstant.baseProperty.get("success").toString(),
|
||||
"·¢Æð³É¹¦");
|
||||
String userid = fieldMap.get("userid".toLowerCase()) == null ? "": fieldMap.get("userid".toLowerCase()).toString(); // 用户id
|
||||
ASUser asUser = new ASUser(userid);
|
||||
String sql = "select case when count(1)>0 then 'true' else 'false' end res from lb_contract_info lci left join lb_file_mailarchiving_info lfmi on lfmi.CONTRACT_ID = lci.ID where (lfmi.ALLHANDOVERSTATUS is null or lfmi.ALLHANDOVERSTATUS = 'part' or lfmi.ALLHANDOVERSTATUS = 'none') and not exists (select 1 from LB_FILE_MAILARCHIVING_INFO_TEMP lfmit where lfmit.contract_id = lci.id and lfmit.is_flowing = '0') AND EXISTS (SELECT 1 FROM FLOW_OBJECT fo,FLOW_BUSSINESS_OBJECT fbo WHERE fo.objectno=fbo.flow_unid AND fo.phaseno='1000' AND fo.flowno='MortgageFileFlow' AND fbo.contract_id=lci.id) and lci.PROJECT_DEPT = '"+asUser.getOrgID()+"'";
|
||||
String res = sqlca.getString(sql);
|
||||
if("false".equals(res)){
|
||||
ReturnMapUtil.setReturnMap(null,RestfullConstant.baseProperty.get("fail").toString(),"没有需要邮寄的合同!!!");
|
||||
}else{
|
||||
ReturnMapUtil.setReturnMap(null,
|
||||
RestfullConstant.baseProperty.get("fail").toString(),
|
||||
sReturnInfo);
|
||||
bo.businessAppStart(tx);
|
||||
tx.commit();
|
||||
String sReturnInfo = bo.getMsg();
|
||||
if (sReturnInfo.startsWith("success")) {
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
body.put("flowUnid", bo.getObjectNo());
|
||||
body.put("objectNo", bo.getObjectNo());
|
||||
body.put("taskNo", bo.getSerialNo());
|
||||
body.put("serialNo", bo.getSerialNo());
|
||||
ReturnMapUtil.setReturnMap(body,
|
||||
RestfullConstant.baseProperty.get("success").toString(),
|
||||
"发起成功");
|
||||
}else{
|
||||
ReturnMapUtil.setReturnMap(null,
|
||||
RestfullConstant.baseProperty.get("fail").toString(),
|
||||
sReturnInfo);
|
||||
}
|
||||
}
|
||||
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user