app变更说明增加非空校验

This commit is contained in:
zhangjun 2020-07-11 11:33:28 +08:00
parent 1d5f9bf0ed
commit 7985fb3497

View File

@ -57,10 +57,16 @@ public class ApplyChangesServiceServiceImpl implements ApplyChangesService {
BizObjectManager catManage = JBOFactory.getBizObjectManager(LB_CHANGE_INFO_TEMP.CLASS_NAME,sqlca);
fieldMap = (Map<String, Object>) testMap.get("fieldMap"); // ²ÎÊý
String flowUnid = fieldMap.get("flowunid") == null ? "" : fieldMap.get(
"flowunid").toString();
String flowUnid = fieldMap.get("flowunid") == null ? "" : fieldMap.get("flowunid").toString();
String userid = fieldMap.get("userid") == null ? "" : fieldMap.get("userid").toString();
ASUser CurUser = new ASUser(userid, sqlca);
String CHANGE_MEMO = fieldMap.get("CHANGE_MEMO") == null ? "" : fieldMap.get("CHANGE_MEMO").toString();
Map<String, Object> bo = new HashMap<String, Object>();
if(CHANGE_MEMO == null || "".equals(CHANGE_MEMO) ){
ReturnMapUtil.setReturnMap(null,RestfullConstant.baseProperty.get("fail").toString(), "变更说明信息不能为空!!!");
return ReturnMapUtil.getReturnMap();
}else{
BizObject cat = catManage.createQuery(" flowunid =:flowunid").setParameter("flowunid", flowUnid).getSingleResult(true);
if(null == cat){
cat = catManage.newObject();
@ -75,7 +81,8 @@ public class ApplyChangesServiceServiceImpl implements ApplyChangesService {
cat.setAttributeValue("FLOWUNID", fieldMap.get("FLOWUNID") == null ? "" : fieldMap.get("FLOWUNID").toString());
catManage.saveObject(cat);
ReturnMapUtil.setReturnMap(null,
}
ReturnMapUtil.setReturnMap(bo,
RestfullConstant.baseProperty.get("success").toString(), "");
return ReturnMapUtil.getReturnMap();