邮寄归档发起接口用户名参数获取
This commit is contained in:
parent
3bc148ab51
commit
aad48419e3
@ -10,6 +10,7 @@ import javax.ws.rs.core.Context;
|
|||||||
|
|
||||||
import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService;
|
import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService;
|
||||||
import apx.com.amarsoft.als.apzl.apply.business.start.service.impl.BusinessApplyStartServiceImpl;
|
import apx.com.amarsoft.als.apzl.apply.business.start.service.impl.BusinessApplyStartServiceImpl;
|
||||||
|
import cn.bean.User;
|
||||||
|
|
||||||
import com.amarsoft.are.ARE;
|
import com.amarsoft.are.ARE;
|
||||||
import com.amarsoft.are.jbo.JBOTransaction;
|
import com.amarsoft.are.jbo.JBOTransaction;
|
||||||
@ -70,6 +71,7 @@ public class BusinessApplyStartController {
|
|||||||
return ReturnMapUtil.rollback(e);
|
return ReturnMapUtil.rollback(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//ºÏÍ¬ÖÆ×÷·¢ÆðÁ÷³Ì
|
//ºÏÍ¬ÖÆ×÷·¢ÆðÁ÷³Ì
|
||||||
@Path("/makeContract/start")
|
@Path("/makeContract/start")
|
||||||
@POST
|
@POST
|
||||||
@ -169,7 +171,7 @@ public class BusinessApplyStartController {
|
|||||||
@POST
|
@POST
|
||||||
public Map<String, Object> MailStart(@Context HttpServletRequest request,
|
public Map<String, Object> MailStart(@Context HttpServletRequest request,
|
||||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||||
@Context Transaction sqlca) throws Exception {
|
@Context Transaction sqlca,@Context User curUser) throws Exception {
|
||||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||||
ARE.getLog().info(
|
ARE.getLog().info(
|
||||||
"[CONTROLLER] BusinessApplyStartController run .................");
|
"[CONTROLLER] BusinessApplyStartController run .................");
|
||||||
@ -177,7 +179,7 @@ public class BusinessApplyStartController {
|
|||||||
|
|
||||||
BusinessApplyStartService service = new BusinessApplyStartServiceImpl();
|
BusinessApplyStartService service = new BusinessApplyStartServiceImpl();
|
||||||
try {
|
try {
|
||||||
return service.MailStart(request, response, tx, sqlca, ReturnMapUtil);
|
return service.MailStart(request, response, tx, sqlca,curUser, ReturnMapUtil);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return ReturnMapUtil.rollback(e);
|
return ReturnMapUtil.rollback(e);
|
||||||
}
|
}
|
||||||
@ -201,5 +203,4 @@ public class BusinessApplyStartController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package apx.com.amarsoft.als.apzl.apply.business.start.initiate;
|
package apx.com.amarsoft.als.apzl.apply.business.start.initiate;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -19,6 +20,7 @@ import com.base.util.StringUtil;
|
|||||||
import com.tenwa.flow.action.comm.BaseFlowStartAction;
|
import com.tenwa.flow.action.comm.BaseFlowStartAction;
|
||||||
import com.tenwa.util.SerialNumberUtil;
|
import com.tenwa.util.SerialNumberUtil;
|
||||||
|
|
||||||
|
import cn.bean.User;
|
||||||
import jbo.app.LB_DOCLIBRARY;
|
import jbo.app.LB_DOCLIBRARY;
|
||||||
import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP;
|
import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP;
|
||||||
import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP;
|
import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP;
|
||||||
@ -60,10 +62,6 @@ public class MailArchiveBO implements Serializable{
|
|||||||
msg = "用户id不能为空!";
|
msg = "用户id不能为空!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (StringX.isSpace(ContractNumber)) {
|
|
||||||
msg = "合同id不能为空!";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (StringX.isSpace(FlowKey)) {
|
if (StringX.isSpace(FlowKey)) {
|
||||||
msg = "互斥id不能为空!";
|
msg = "互斥id不能为空!";
|
||||||
return false;
|
return false;
|
||||||
@ -72,19 +70,17 @@ public class MailArchiveBO implements Serializable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public MailArchiveBO(Map<String, Object> fieldMap, JBOTransaction tx) throws Exception {
|
public MailArchiveBO(Map<String, Object> fieldMap,User curUser, JBOTransaction tx) throws Exception {
|
||||||
this.ApplyType = fieldMap.get("ApplyType".toLowerCase()) == null ? ""
|
this.ApplyType = fieldMap.get("ApplyType".toLowerCase()) == null ? ""
|
||||||
: fieldMap.get("ApplyType".toLowerCase()).toString(); // 流程实例号
|
: fieldMap.get("ApplyType".toLowerCase()).toString(); // 流程实例号
|
||||||
this.ProjectName = fieldMap.get("project_name".toLowerCase()) == null ? ""
|
this.ProjectName = curUser.getUserName()+"在"+new SimpleDateFormat("yyyy年MM月dd日").format(new java.util.Date())+"发起邮寄资料归档";// 项目名称
|
||||||
: fieldMap.get("project_name".toLowerCase()).toString(); // 项目名称
|
|
||||||
this.customertype = fieldMap.get("customertype".toLowerCase()) == null ? ""
|
this.customertype = fieldMap.get("customertype".toLowerCase()) == null ? ""
|
||||||
: fieldMap.get("customertype".toLowerCase()).toString(); // 租赁类型
|
: fieldMap.get("customertype".toLowerCase()).toString(); // 租赁类型
|
||||||
this.CurUserID = fieldMap.get("userid".toLowerCase()) == null ? ""
|
this.CurUserID = fieldMap.get("userid".toLowerCase()) == null ? ""
|
||||||
: fieldMap.get("userid".toLowerCase()).toString(); // 客户id
|
: fieldMap.get("userid".toLowerCase()).toString(); // 客户id
|
||||||
this.ContractNumber = fieldMap.get("CONTRACT_NUMBER".toLowerCase()) == null ? ""
|
this.ContractNumber = fieldMap.get("CONTRACT_NUMBER".toLowerCase()) == null ? ""
|
||||||
: fieldMap.get("CONTRACT_NUMBER".toLowerCase()).toString(); // 合同号
|
: fieldMap.get("CONTRACT_NUMBER".toLowerCase()).toString(); // 合同号
|
||||||
this.FlowKey = fieldMap.get("serialNumber".toLowerCase()) == null ? ""
|
this.FlowKey = SerialNumberUtil.getDocMailNumber(tx); // 邮寄号
|
||||||
: fieldMap.get("serialNumber".toLowerCase()).toString(); // 邮寄号
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,6 +103,9 @@ public class MailArchiveBO implements Serializable{
|
|||||||
map.put("FlowKey", FlowKey);
|
map.put("FlowKey", FlowKey);
|
||||||
action.setFlowKey(FlowKey);
|
action.setFlowKey(FlowKey);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JSONObject jsonObject = JSONObject.fromObject(map);
|
JSONObject jsonObject = JSONObject.fromObject(map);
|
||||||
this.fixedFlowParam = jsonObject.toString();
|
this.fixedFlowParam = jsonObject.toString();
|
||||||
action.setFixedFlowParam(fixedFlowParam);
|
action.setFixedFlowParam(fixedFlowParam);
|
||||||
@ -233,20 +232,6 @@ public class MailArchiveBO implements Serializable{
|
|||||||
ProjectName = projectName;
|
ProjectName = projectName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* public String getFlowKey() {
|
|
||||||
return FlowKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setFlowKey(String flowKey) {
|
|
||||||
FlowKey = flowKey;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getCustomertype() {
|
public String getCustomertype() {
|
||||||
return customertype;
|
return customertype;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import com.amarsoft.are.jbo.JBOTransaction;
|
|||||||
import com.amarsoft.awe.util.Transaction;
|
import com.amarsoft.awe.util.Transaction;
|
||||||
import com.base.util.ReturnMapUtil;
|
import com.base.util.ReturnMapUtil;
|
||||||
|
|
||||||
|
import cn.bean.User;
|
||||||
|
|
||||||
public interface BusinessApplyStartService {
|
public interface BusinessApplyStartService {
|
||||||
Map<String, Object> applyStart(@Context HttpServletRequest request,
|
Map<String, Object> applyStart(@Context HttpServletRequest request,
|
||||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||||
@ -41,7 +43,7 @@ public interface BusinessApplyStartService {
|
|||||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
||||||
Map<String, Object> MailStart(@Context HttpServletRequest request,
|
Map<String, Object> MailStart(@Context HttpServletRequest request,
|
||||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
@Context Transaction sqlca,@Context User curUser, ReturnMapUtil ReturnMapUtil) throws Exception;
|
||||||
Map<String, Object> UndoStart(@Context HttpServletRequest request,
|
Map<String, Object> UndoStart(@Context HttpServletRequest request,
|
||||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import apx.com.amarsoft.als.apzl.apply.business.start.initiate.OverseersBO;
|
|||||||
import apx.com.amarsoft.als.apzl.apply.business.start.initiate.PaymentRequestBO;
|
import apx.com.amarsoft.als.apzl.apply.business.start.initiate.PaymentRequestBO;
|
||||||
import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService;
|
import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService;
|
||||||
import apx.com.amarsoft.als.base.awe.execute.method.BusinessCustomerMethod;
|
import apx.com.amarsoft.als.base.awe.execute.method.BusinessCustomerMethod;
|
||||||
|
import cn.bean.User;
|
||||||
|
|
||||||
import com.amarsoft.are.jbo.BizObject;
|
import com.amarsoft.are.jbo.BizObject;
|
||||||
import com.amarsoft.are.jbo.BizObjectManager;
|
import com.amarsoft.are.jbo.BizObjectManager;
|
||||||
@ -280,14 +281,14 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> MailStart(HttpServletRequest request, HttpServletResponse response, JBOTransaction tx,
|
public Map<String, Object> MailStart(HttpServletRequest request, HttpServletResponse response, JBOTransaction tx,
|
||||||
Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception {
|
Transaction sqlca,User curUser, ReturnMapUtil ReturnMapUtil) throws Exception {
|
||||||
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
|
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
|
||||||
.readRequestParam(request, "UTF-8");
|
.readRequestParam(request, "UTF-8");
|
||||||
System.out.println("=============·¢ÆðÓʼĹ鵵ÉêÇë²ÎÊý================================");
|
System.out.println("=============·¢ÆðÓʼĹ鵵ÉêÇë²ÎÊý================================");
|
||||||
System.out.println(testMap.toString());
|
System.out.println(testMap.toString());
|
||||||
System.out.println("=======================================");
|
System.out.println("=======================================");
|
||||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
||||||
MailArchiveBO bo = new MailArchiveBO(fieldMap, tx);
|
MailArchiveBO bo = new MailArchiveBO(fieldMap,curUser, tx);
|
||||||
bo.businessAppStart(tx);
|
bo.businessAppStart(tx);
|
||||||
tx.commit();
|
tx.commit();
|
||||||
String sReturnInfo = bo.getMsg();
|
String sReturnInfo = bo.getMsg();
|
||||||
|
|||||||
@ -284,6 +284,8 @@ public class AnnotationRestfullDispatcherImpl implements RestfullDispatcher {
|
|||||||
return reqContext.rep;
|
return reqContext.rep;
|
||||||
} else if ("com.amarsoft.ams.base.User".equals(typeName)) { // 用户对象
|
} else if ("com.amarsoft.ams.base.User".equals(typeName)) { // 用户对象
|
||||||
return reqContext.curUser;
|
return reqContext.curUser;
|
||||||
|
} else if ("cn.bean.User".equals(typeName)) { // 用户对象
|
||||||
|
return reqContext.curUser;
|
||||||
}else if ("com.amarsoft.awe.util.Transaction".equals(typeName)) { // Sqlca对象
|
}else if ("com.amarsoft.awe.util.Transaction".equals(typeName)) { // Sqlca对象
|
||||||
return reqContext.sqlca;
|
return reqContext.sqlca;
|
||||||
} else if ("com.amarsoft.are.jbo.JBOTransaction".equals(typeName)) { // JBO事务
|
} else if ("com.amarsoft.are.jbo.JBOTransaction".equals(typeName)) { // JBO事务
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user