diff --git a/WebContent/WEB-INF/etc/jbo/jbo_app_fresh.xml b/WebContent/WEB-INF/etc/jbo/jbo_app_fresh.xml index f2f583365..7d4dafbaa 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_app_fresh.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_app_fresh.xml @@ -414,6 +414,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index b123a2ed0..f93ae00d2 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -494,6 +494,8 @@ apx.com.amarsoft.als.base.awe.controller, + + apx.com.amarsoft.als.business.change.controller, diff --git a/src_app_fresh/apx/com/amarsoft/als/business/change/controller/CashCardChangeController.java b/src_app_fresh/apx/com/amarsoft/als/business/change/controller/CashCardChangeController.java new file mode 100644 index 000000000..543e40098 --- /dev/null +++ b/src_app_fresh/apx/com/amarsoft/als/business/change/controller/CashCardChangeController.java @@ -0,0 +1,52 @@ +package apx.com.amarsoft.als.business.change.controller; + +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.core.Context; + +import apx.com.amarsoft.als.business.change.service.CashCardChangeService; +import apx.com.amarsoft.als.business.change.service.impl.CashCardChangeServiceImpl; + +import com.amarsoft.are.ARE; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.Transaction; +import com.base.util.ReturnMapUtil; + +/** + * Ϣ > ۿϢ + * + */ +@Path("/change/apply/controller") +public class CashCardChangeController { + + CashCardChangeService service = new CashCardChangeServiceImpl(); + /** + * ۿб + * + * @param requestd + * @param sqlca + * @param tx + * @return + * @throws Exception + */ + @Path("/account/list") + @POST + public Map queryCashCardChange( + @Context HttpServletRequest request, @Context Transaction sqlca, + @Context JBOTransaction tx) throws Exception { + ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca); + ARE.getLog().info( + "[CONTROLLER] CashCardChangeController run ................."); + ARE.getLog() + .info("[Path] /chansge/apply/controller/account/list" + " run ................."); + try { + return service + .queryCashCardChange(request, sqlca, tx, ReturnMapUtil); + } catch (Exception e) { + return ReturnMapUtil.rollback(e); + } + } +} diff --git a/src_app_fresh/apx/com/amarsoft/als/business/change/manage/CashCardChangeDoManage.java b/src_app_fresh/apx/com/amarsoft/als/business/change/manage/CashCardChangeDoManage.java new file mode 100644 index 000000000..ea5afba27 --- /dev/null +++ b/src_app_fresh/apx/com/amarsoft/als/business/change/manage/CashCardChangeDoManage.java @@ -0,0 +1,35 @@ +package apx.com.amarsoft.als.business.change.manage; + +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import apx.com.amarsoft.als.base.awe.AbstractAweDoQueryManage; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.lang.StringX; +import com.amarsoft.awe.util.Transaction; +import com.base.util.ReturnMapUtil; + +public class CashCardChangeDoManage extends AbstractAweDoQueryManage { + private String sAddWhere; + + public void getGroupId() { + sGroupId = "queryCashCardChange"; + } + + public void getOtherWhere() { + super.sOtherWhere = StringX.isSpace(sAddWhere) ? "" + : this.sAddWhere; + } + + public void setsAddWhere(String sAddWhere) { + this.sAddWhere = sAddWhere; + } + + public Map queryCashCardChange(HttpServletRequest request, + Transaction sqlca, JBOTransaction tx, ReturnMapUtil ReturnMapUtil) + throws Exception { + return getData(request, sqlca, tx, ReturnMapUtil); + } +} diff --git a/src_app_fresh/apx/com/amarsoft/als/business/change/service/CashCardChangeService.java b/src_app_fresh/apx/com/amarsoft/als/business/change/service/CashCardChangeService.java new file mode 100644 index 000000000..456b79383 --- /dev/null +++ b/src_app_fresh/apx/com/amarsoft/als/business/change/service/CashCardChangeService.java @@ -0,0 +1,16 @@ +package apx.com.amarsoft.als.business.change.service; + +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.core.Context; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.Transaction; +import com.base.util.ReturnMapUtil; + +public interface CashCardChangeService { + Map queryCashCardChange(@Context HttpServletRequest request, + @Context Transaction sqlca, @Context JBOTransaction tx, + ReturnMapUtil ReturnMapUtil) throws Exception; +} diff --git a/src_app_fresh/apx/com/amarsoft/als/business/change/service/impl/CashCardChangeServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/business/change/service/impl/CashCardChangeServiceImpl.java new file mode 100644 index 000000000..de7a36f3c --- /dev/null +++ b/src_app_fresh/apx/com/amarsoft/als/business/change/service/impl/CashCardChangeServiceImpl.java @@ -0,0 +1,38 @@ +package apx.com.amarsoft.als.business.change.service.impl; + +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.core.Context; + +import apx.com.amarsoft.als.business.change.manage.CashCardChangeDoManage; +import apx.com.amarsoft.als.business.change.service.CashCardChangeService; +//import apx.com.amarsoft.als.business.comm.WorkBusinessCondition; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.Transaction; +import com.base.util.MultipartDataUtil; +import com.base.util.ReturnMapUtil; + +public class CashCardChangeServiceImpl implements CashCardChangeService { + private Map fieldMap; + +// WorkBusinessCondition WorkBusinessCondition = new WorkBusinessCondition(); + + @SuppressWarnings("unchecked") + public Map queryCashCardChange(@Context HttpServletRequest request, + @Context Transaction sqlca, @Context JBOTransaction tx, + ReturnMapUtil ReturnMapUtil) + throws Exception { + Map testMap = (Map) MultipartDataUtil + .readRequestParam(request, "UTF-8"); + fieldMap = (Map) testMap.get("fieldMap"); + /*String sOtherWhere = WorkBusinessCondition.queryCondition(request, + sqlca, tx, "change");*/ + CashCardChangeDoManage manage = new CashCardChangeDoManage(); + // manage.setsAddWhere(sOtherWhere); + manage.setParamMap(fieldMap); + return manage.queryCashCardChange(request, sqlca, tx, ReturnMapUtil); + } + +}