parent
5f3357bd01
commit
d4dc545d95
@ -0,0 +1,111 @@ |
|||||||
|
package com.sinosoft.lis.controller.g_app; |
||||||
|
|
||||||
|
import com.sinosoft.lis.i18n.I18nMessage; |
||||||
|
import com.sinosoft.lis.pubfun.MMap; |
||||||
|
import com.sinosoft.lis.pubfun.PubSubmit; |
||||||
|
import com.sinosoft.service.BusinessService; |
||||||
|
import com.sinosoft.utility.CError; |
||||||
|
import com.sinosoft.utility.CErrors; |
||||||
|
import com.sinosoft.utility.VData; |
||||||
|
|
||||||
|
public class LCPropPrintBL implements BusinessService { |
||||||
|
/** |
||||||
|
* 错误处理类,每个需要错误处理的类中都放置该类 |
||||||
|
*/ |
||||||
|
public CErrors mErrors = new CErrors(); |
||||||
|
/** |
||||||
|
* 提交数据的容器 |
||||||
|
*/ |
||||||
|
private MMap mMMap = new MMap(); |
||||||
|
|
||||||
|
/** |
||||||
|
* 传入数据的容器 |
||||||
|
*/ |
||||||
|
private VData mInputData = new VData(); |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean submitData(VData vData, String Operater) { |
||||||
|
|
||||||
|
if (!checkData()) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
if (!dealData()) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
if (!saveData()) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public VData getResult() { |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public CErrors getErrors() { |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
private boolean checkData() { |
||||||
|
|
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 业务处理 |
||||||
|
* |
||||||
|
* @return 如果处理失败,则返回false,否则返回true |
||||||
|
*/ |
||||||
|
private boolean dealData() { |
||||||
|
|
||||||
|
// if (mOperate.equals("INSERT")) {
|
||||||
|
|
||||||
|
|
||||||
|
// mMMap.put(tLDAntiMoneyLauICustInfoSchema, MMap.Action.DELETE_INSERT);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// 落表数据
|
||||||
|
|
||||||
|
return true; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 数据提交 |
||||||
|
* 输出:如果提交失败,则返回false,否则返回true |
||||||
|
* |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
private boolean saveData() { |
||||||
|
|
||||||
|
mInputData.clear(); |
||||||
|
mInputData.add(mMMap); |
||||||
|
|
||||||
|
PubSubmit tPubSubmit = new PubSubmit(); |
||||||
|
if (!tPubSubmit.submitData(mInputData, null)) { |
||||||
|
buildError("saveData", new I18nMessage("提交数据失败!", "LIS-08006")); |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 错误构造方法 |
||||||
|
* |
||||||
|
* @param tFunctionName |
||||||
|
* @param tErrorMessage |
||||||
|
*/ |
||||||
|
private void buildError(String tFunctionName, I18nMessage tErrorMessage) { |
||||||
|
|
||||||
|
CError tCError = new CError(); |
||||||
|
tCError.moduleName = this.getClass().getSimpleName(); |
||||||
|
tCError.functionName = tFunctionName; |
||||||
|
tCError.errorMessage(tErrorMessage); |
||||||
|
mErrors.addOneError(tCError); |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue