获取APP业务撤销信息接口&业务撤销发起接口
This commit is contained in:
parent
a29908715c
commit
fa6d68a718
@ -182,6 +182,24 @@ public class BusinessApplyStartController {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
//ÒµÎñ³·Ïú·¢Æð
|
||||
@Path("/undo/start")
|
||||
@POST
|
||||
public Map<String, Object> UndoStart(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog().info(
|
||||
"[CONTROLLER] BusinessApplyStartController run .................");
|
||||
ARE.getLog().info("[Path] /apply/undo/start" + " run .................");
|
||||
|
||||
BusinessApplyStartService service = new BusinessApplyStartServiceImpl();
|
||||
try {
|
||||
return service.UndoStart(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,419 @@
|
||||
package apx.com.amarsoft.als.apzl.apply.business.start.initiate;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.BizObjectQuery;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.lang.StringX;
|
||||
import com.base.constant.RestfullConstant;
|
||||
import com.base.util.JsonUtil;
|
||||
import com.base.util.StringUtil;
|
||||
import com.tenwa.flow.action.comm.BaseFlowStartAction;
|
||||
|
||||
import jbo.app.LB_DOCLIBRARY;
|
||||
import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP;
|
||||
import jbo.app.tenwa.doc.LB_DOCATTRIBUTE;
|
||||
import jbo.app.tenwa.doc.LB_DOCRELATIVE;
|
||||
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
public class BusinessUndoBO implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = -2491260210896213025L;
|
||||
private String ApplyType;
|
||||
private String CurUserID;
|
||||
private String customertype;
|
||||
private String carAttributes;
|
||||
private String leasform;
|
||||
private String ProjectId;
|
||||
private String ProductId;
|
||||
private String FlowKey;
|
||||
private String ProjectName;
|
||||
|
||||
private String ContractId;
|
||||
private String project_no;
|
||||
private String customerType; // 客户类别
|
||||
private String certid;
|
||||
private String custkind;
|
||||
private String project_manage_name;
|
||||
private String project_dept;
|
||||
private String status_nmae;
|
||||
private String operationType;
|
||||
private String SubjectId;
|
||||
|
||||
|
||||
private String msg;
|
||||
private Map<String, String> params;
|
||||
private String fixedFlowParam;
|
||||
private String objectNo;
|
||||
private String serialNo;
|
||||
|
||||
|
||||
public void setParam(Map<String, Object> fieldMap, String param, Object obj) {
|
||||
obj = fieldMap.get(param.toLowerCase()) == null ? null : fieldMap.get(
|
||||
param.toLowerCase()).toString();
|
||||
}
|
||||
|
||||
public boolean checkKeyField() {
|
||||
if (StringX.isSpace(ApplyType)) {
|
||||
msg = "申请编号不能为空!";
|
||||
return false;
|
||||
}
|
||||
if (StringX.isSpace(ProductId)) {
|
||||
msg = "产品id不能为空!";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public BusinessUndoBO(Map<String, Object> fieldMap, JBOTransaction tx) throws Exception {
|
||||
this.ApplyType = fieldMap.get("ApplyType".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("ApplyType".toLowerCase()).toString(); // 流程实例号
|
||||
this.ProductId = fieldMap.get("product_id".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("product_id".toLowerCase()).toString(); // 项目id
|
||||
this.ProjectId = fieldMap.get("id".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("id".toLowerCase()).toString(); // 产品id
|
||||
this.ProjectName = fieldMap.get("project_name".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("project_name".toLowerCase()).toString(); // 项目名称
|
||||
this.customertype = fieldMap.get("CustomerType".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("CustomerType".toLowerCase()).toString(); //
|
||||
this.leasform = fieldMap.get("leasehold".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("leasehold".toLowerCase()).toString(); //
|
||||
this.FlowKey = fieldMap.get("project_id".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("project_id".toLowerCase()).toString(); //
|
||||
this.project_no = fieldMap.get("project_no".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("project_no".toLowerCase()).toString(); //
|
||||
|
||||
this.certid = fieldMap.get("certid".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("certid".toLowerCase()).toString(); //
|
||||
this.custkind = fieldMap.get("custkind".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("custkind".toLowerCase()).toString(); //
|
||||
this.project_manage_name = fieldMap.get("project_manage_name".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("project_manage_name".toLowerCase()).toString(); //
|
||||
this.project_dept = fieldMap.get("project_dept".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("project_dept".toLowerCase()).toString(); //
|
||||
this.status_nmae = fieldMap.get("status_nmae".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("status_nmae".toLowerCase()).toString(); //
|
||||
this.carAttributes = fieldMap.get("CAR_TYPE".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("CAR_TYPE".toLowerCase()).toString(); // 车辆属性
|
||||
this.operationType = fieldMap.get("operationType".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("operationType".toLowerCase()).toString(); //
|
||||
this.SubjectId = fieldMap.get("subjectid".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("subjectid".toLowerCase()).toString(); //
|
||||
this.customerType = fieldMap.get("customer_Type".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("customer_Type".toLowerCase()).toString(); // 客户类型
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void businessAppStart(JBOTransaction tx) throws Exception {
|
||||
if (!checkKeyField()) // 校验非空字段
|
||||
return;
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
BaseFlowStartAction action = new BaseFlowStartAction();
|
||||
|
||||
map.put("ApplyType", ApplyType);
|
||||
action.setApplyType(ApplyType);
|
||||
map.put("ProductId", ProductId);
|
||||
action.setProductId(ProductId);
|
||||
map.put("ProjectName", ProjectName);
|
||||
action.setProjectName(ProjectName);
|
||||
map.put("ProjectId", ProjectId);
|
||||
action.setProjectId(ProjectId);
|
||||
map.put("FlowKey", FlowKey);
|
||||
action.setFlowKey(FlowKey);
|
||||
map.put("customertype", customertype);
|
||||
action.setCustomertype(customertype);
|
||||
map.put("CurUserID", CurUserID);
|
||||
action.setCurUserID(CurUserID);
|
||||
map.put("certid", certid);
|
||||
map.put("custkind", custkind);
|
||||
map.put("project_manage_name", project_manage_name);
|
||||
map.put("project_dept", project_dept);
|
||||
map.put("status_nmae", status_nmae);
|
||||
map.put("operationType", operationType);
|
||||
map.put("SubjectId", SubjectId);
|
||||
map.put("carAttributes", carAttributes);
|
||||
action.setCarAttributes(carAttributes);
|
||||
action.setCustomertype(customerType);
|
||||
map.put("customerType", customerType);
|
||||
|
||||
JSONObject jsonObject = JSONObject.fromObject(map);
|
||||
this.fixedFlowParam = jsonObject.toString();
|
||||
action.setFixedFlowParam(fixedFlowParam);
|
||||
msg = action.initFLow(tx); // 定义流程中需要的参数
|
||||
params = action.getFlowParam();
|
||||
|
||||
objectNo = params.get("FlowUnid");
|
||||
ContractId = params.get("ProjectId");
|
||||
if (msg.startsWith("success")) {
|
||||
serialNo = msg.split("@")[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean checkDoc() throws JBOException {
|
||||
BizObjectManager fboM = JBOFactory
|
||||
.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
|
||||
|
||||
BizObject fbo = fboM.createQuery("flow_unid=:flow_unid")
|
||||
.setParameter("flow_unid", objectNo).getSingleResult(false);
|
||||
if (null == fbo) {
|
||||
msg = "未找到流程实例!";
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
String flowPara = fbo.getAttribute("FixedFlowParam") == null ? ""
|
||||
: fbo.getAttribute("FixedFlowParam").toString();
|
||||
JSONObject jo = JsonUtil.str2JSONObject(flowPara.trim());
|
||||
customertype = jo.get("CustomerType") == null ? "" : jo
|
||||
.getString("CustomerType");
|
||||
} catch (Exception e) {
|
||||
ARE.getLog().error(e);
|
||||
msg = "获取客户信息失败!";
|
||||
return false;
|
||||
}
|
||||
String proj_id = fbo.getAttribute("proj_id").getString();
|
||||
String sql = "";
|
||||
sql = "SELECT DISTINCT O.ID, O.DOC_NAME,r.id " + "FROM O, "
|
||||
+ LB_DOCRELATIVE.CLASS_NAME + " R "
|
||||
+ "WHERE O.RELATIVE_ID = R.ID "
|
||||
+ "AND O.ID NOT IN (SELECT A.LIBRARY_ID FROM "
|
||||
+ LB_DOCATTRIBUTE.CLASS_NAME + " A) "
|
||||
+ "AND R.ObjectType='BusinessApplyFlow' and R.proj_id=:projid " + "AND o.DOC_NATURE='01' "
|
||||
+ "ORDER BY SERIAL_NUM";
|
||||
BizObjectManager libraryManage = JBOFactory
|
||||
.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME);
|
||||
BizObjectQuery query = libraryManage.createQuery(sql).setParameter(
|
||||
"projid", proj_id);
|
||||
List<BizObject> librarys = query.getResultList(false);
|
||||
|
||||
String docNameConfig = "01".equals(customertype) ? RestfullConstant.baseProperty
|
||||
.get("COMPANY_DOC_NAME").toString()
|
||||
: "03".equals(customertype) ? RestfullConstant.baseProperty
|
||||
.get("PERSON_DOC_NAME").toString() : "";
|
||||
String[] array = docNameConfig.trim().split(",");
|
||||
String docName = "";
|
||||
for (String str : array) {
|
||||
String[] array2 = str.trim().split("@");
|
||||
docName += array2[0].trim() + ",";
|
||||
}
|
||||
String[] docArr = docName.split(",");
|
||||
Object[] arr2 = StringUtil.removalDuplicate(docArr);
|
||||
msg = "";
|
||||
for (int i = 0; i < arr2.length; i++) {
|
||||
String doc = arr2[i].toString();
|
||||
for (BizObject library : librarys) {
|
||||
if (doc.trim().equals(
|
||||
library.getAttribute("DOC_NAME").toString().trim())) {
|
||||
msg += " [" + doc + "] 必备 未上传资料照片!\r\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BizObjectManager conditionM = JBOFactory.getBizObjectManager(LC_CALC_CONDITION_TEMP.CLASS_NAME);
|
||||
BizObjectManager rentM = JBOFactory.getBizObjectManager(LC_RENT_PLAN_TEMP.CLASS_NAME);
|
||||
BizObject condition = conditionM.createQuery("FLOWUNID=:FLOWUNID").setParameter("FLOWUNID", objectNo).getSingleResult(false);
|
||||
BizObject rent = rentM.createQuery("FLOWUNID=:FLOWUNID").setParameter("FLOWUNID", objectNo).getSingleResult(false);
|
||||
|
||||
if (null == condition || null == rent) {
|
||||
msg += " [商务条件] 没有找到业务测算信息!\r\n";
|
||||
}
|
||||
|
||||
|
||||
if (msg.equals("")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getApplyType() {
|
||||
return ApplyType;
|
||||
}
|
||||
public void setApplyType(String applyType) {
|
||||
ApplyType = applyType;
|
||||
}
|
||||
public String getCurUserID() {
|
||||
return CurUserID;
|
||||
}
|
||||
public void setCurUserID(String curUserID) {
|
||||
CurUserID = curUserID;
|
||||
}
|
||||
public String getCustomertype() {
|
||||
return customertype;
|
||||
}
|
||||
public void setCustomertype(String customertype) {
|
||||
this.customertype = customertype;
|
||||
}
|
||||
public String getCarAttributes() {
|
||||
return carAttributes;
|
||||
}
|
||||
public void setCarAttributes(String carAttributes) {
|
||||
this.carAttributes = carAttributes;
|
||||
}
|
||||
public String getLeasform() {
|
||||
return leasform;
|
||||
}
|
||||
public void setLeasform(String leasform) {
|
||||
this.leasform = leasform;
|
||||
}
|
||||
public String getProjectId() {
|
||||
return ProjectId;
|
||||
}
|
||||
public void setProjectId(String projectId) {
|
||||
ProjectId = projectId;
|
||||
}
|
||||
public String getProductId() {
|
||||
return ProductId;
|
||||
}
|
||||
public void setProductId(String productId) {
|
||||
ProductId = productId;
|
||||
}
|
||||
public String getFlowKey() {
|
||||
return FlowKey;
|
||||
}
|
||||
public void setFlowKey(String flowKey) {
|
||||
FlowKey = flowKey;
|
||||
}
|
||||
public String getProjectName() {
|
||||
return ProjectName;
|
||||
}
|
||||
public void setProjectName(String projectName) {
|
||||
ProjectName = projectName;
|
||||
}
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
public Map<String, String> getParams() {
|
||||
return params;
|
||||
}
|
||||
public void setParams(Map<String, String> params) {
|
||||
this.params = params;
|
||||
}
|
||||
public String getFixedFlowParam() {
|
||||
return fixedFlowParam;
|
||||
}
|
||||
public void setFixedFlowParam(String fixedFlowParam) {
|
||||
this.fixedFlowParam = fixedFlowParam;
|
||||
}
|
||||
public String getObjectNo() {
|
||||
return objectNo;
|
||||
}
|
||||
public void setObjectNo(String objectNo) {
|
||||
this.objectNo = objectNo;
|
||||
}
|
||||
public String getSerialNo() {
|
||||
return serialNo;
|
||||
}
|
||||
public void setSerialNo(String serialNo) {
|
||||
this.serialNo = serialNo;
|
||||
}
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public String getContractId() {
|
||||
return ContractId;
|
||||
}
|
||||
|
||||
public void setContractId(String contractId) {
|
||||
ContractId = contractId;
|
||||
}
|
||||
|
||||
public String getProject_no() {
|
||||
return project_no;
|
||||
}
|
||||
|
||||
public void setProject_no(String project_no) {
|
||||
this.project_no = project_no;
|
||||
}
|
||||
|
||||
public String getCustomerType() {
|
||||
return customerType;
|
||||
}
|
||||
|
||||
public void setCustomerType(String customerType) {
|
||||
this.customerType = customerType;
|
||||
}
|
||||
|
||||
public String getCertid() {
|
||||
return certid;
|
||||
}
|
||||
|
||||
public void setCertid(String certid) {
|
||||
this.certid = certid;
|
||||
}
|
||||
|
||||
public String getCustkind() {
|
||||
return custkind;
|
||||
}
|
||||
|
||||
public void setCustkind(String custkind) {
|
||||
this.custkind = custkind;
|
||||
}
|
||||
|
||||
public String getProject_manage_name() {
|
||||
return project_manage_name;
|
||||
}
|
||||
|
||||
public void setProject_manage_name(String project_manage_name) {
|
||||
this.project_manage_name = project_manage_name;
|
||||
}
|
||||
|
||||
public String getProject_dept() {
|
||||
return project_dept;
|
||||
}
|
||||
|
||||
public void setProject_dept(String project_dept) {
|
||||
this.project_dept = project_dept;
|
||||
}
|
||||
|
||||
public String getStatus_nmae() {
|
||||
return status_nmae;
|
||||
}
|
||||
|
||||
public void setStatus_nmae(String status_nmae) {
|
||||
this.status_nmae = status_nmae;
|
||||
}
|
||||
|
||||
public String getOperationType() {
|
||||
return operationType;
|
||||
}
|
||||
|
||||
public void setOperationType(String operationType) {
|
||||
this.operationType = operationType;
|
||||
}
|
||||
|
||||
public String getSubjectId() {
|
||||
return SubjectId;
|
||||
}
|
||||
|
||||
public void setSubjectId(String subjectId) {
|
||||
SubjectId = subjectId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -39,8 +39,10 @@ public interface BusinessApplyStartService {
|
||||
Map<String, Object> OverseersStart(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
||||
|
||||
Map<String, Object> MailStart(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
||||
Map<String, Object> UndoStart(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ import apx.com.amarsoft.als.apzl.apply.business.start.bo.BusinessBO;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.start.bo.ChangeBusinessBO;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.start.bo.MakeContractBusinessBO;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.start.init.InitDocListTools;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.start.initiate.BusinessUndoBO;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.start.initiate.MailArchiveBO;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.start.initiate.OverseersBO;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.start.initiate.PaymentRequestBO;
|
||||
@ -372,4 +373,36 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
|
||||
}
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> UndoStart(HttpServletRequest request, HttpServletResponse response, JBOTransaction tx,
|
||||
Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception {
|
||||
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
|
||||
.readRequestParam(request, "UTF-8");
|
||||
System.out.println("=============发起业务撤销申请参数================================");
|
||||
System.out.println(testMap.toString());
|
||||
System.out.println("=======================================");
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
||||
BusinessUndoBO bo = new BusinessUndoBO(fieldMap, 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("projectId", bo.getProjectId());
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
package apx.com.amarsoft.als.user.change.center.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.MultipartDataUtil;
|
||||
import com.base.util.ReturnMapUtil;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
|
||||
import apx.com.amarsoft.als.user.change.center.service.ApplyBusinessUndoService;
|
||||
|
||||
|
||||
|
||||
//ÒµÎñ³·Ïú
|
||||
public class ApplyBusinessUndoServiceImpl implements ApplyBusinessUndoService{
|
||||
private Map<String, Object> fieldMap;
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Map<String, Object> applyBusinessUndo(HttpServletRequest request, HttpServletResponse response, JBOTransaction tx,
|
||||
Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception {
|
||||
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
|
||||
.readRequestParam(request, "UTF-8");
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
||||
String flowunid = fieldMap.get("flowunid") == null ? "" : fieldMap.get("flowunid").toString();
|
||||
String userId = fieldMap.get("userid") == null ? "" : fieldMap.get("userid").toString();
|
||||
String sql = "SELECT lpi.id,lpi.product_id,lpi.project_no,lpi.project_name,ci.customername,getItemName('CertType',ci.certtype) certtype,ci.certid,getItemName('cust_kind',lpi.project_industry) as custkind,getUserName(project_manage) as project_manage_name,getOrgName(lpi.project_dept) project_dept,lcs.status_name,ci.customertype,lpi.car_type,lpi.leas_form,psl.operationType,ci.certtype,lpi.subjectid,lpi.subjectname FROM LB_PROJECT_INFO lpi left join lb_contract_status lcs on lpi.project_status=lcs.status_code LEFT JOIN LB_UNION_LESSEE lult on lpi.id=lult.project_id and lult.is_main='y' and( lult.contract_id is null or lult.contract_id='') LEFT JOIN CUSTOMER_INFO ci on lult.customer_id=ci.customerid left join PRD_SPECIFIC_LIBRARY psl on psl.productid=lpi.product_id where lpi.project_status='13' and (SELECT COUNT(id) FROM lb_contract_info_temp WHERE project_id=lpi.ID)=0 and lpi.businesstype='1' and lpi.project_manage='"+userId+"' order by lpi.project_no desc ";
|
||||
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql(sql);
|
||||
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
body.put("datas", dataList);
|
||||
ReturnMapUtil.setReturnMap(body,RestfullConstant.baseProperty.get("success").toString(), "");
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
}
|
||||
@ -13,9 +13,11 @@ import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.base.util.ReturnMapUtil;
|
||||
|
||||
import apx.com.amarsoft.als.user.change.center.service.ApplyBusinessUndoService;
|
||||
import apx.com.amarsoft.als.user.change.center.service.ApplyLicensePlateService;
|
||||
import apx.com.amarsoft.als.user.change.center.service.ApplyOverseeService;
|
||||
import apx.com.amarsoft.als.user.change.center.service.ApplyPaymentService;
|
||||
import apx.com.amarsoft.als.user.change.center.service.impl.ApplyBusinessUndoServiceImpl;
|
||||
import apx.com.amarsoft.als.user.change.center.service.impl.ApplyLicensePlateServiceImpl;
|
||||
import apx.com.amarsoft.als.user.change.center.service.impl.ApplyOverseeServiceImpl;
|
||||
import apx.com.amarsoft.als.user.change.center.service.impl.ApplyPaymentServiceImpl;
|
||||
@ -53,7 +55,6 @@ public class ApplyChangeController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//±ä¸ü˵Ã÷
|
||||
@Path("/business/changes")
|
||||
@POST
|
||||
@ -220,7 +221,7 @@ public class ApplyChangeController {
|
||||
|
||||
|
||||
|
||||
//付款申请发起信息
|
||||
//获取付款申请数据信息
|
||||
@Path("/business/Payment")
|
||||
@POST
|
||||
public Map<String, Object> applyPayment(@Context HttpServletRequest request,
|
||||
@ -239,34 +240,9 @@ public class ApplyChangeController {
|
||||
}
|
||||
}
|
||||
|
||||
//发票信息
|
||||
/* @Path("/business/invoice")
|
||||
@POST
|
||||
public Map<String, Object> applyInvoice(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog().info(
|
||||
"[CONTROLLER] ApplyChangeController run .................");
|
||||
ARE.getLog().info("[Path] /change/business/invoice" + " run .................");
|
||||
|
||||
ApplyInvoiceService service = new ApplyInvoiceServiceImpl();
|
||||
try {
|
||||
return service.applyInvoice(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//放款后督发起
|
||||
//获取放款后督数据信息
|
||||
@Path("/business/oversee")
|
||||
@POST
|
||||
public Map<String, Object> applyOversee(@Context HttpServletRequest request,
|
||||
@ -365,26 +341,23 @@ public class ApplyChangeController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//附件上传
|
||||
/* @Path("/business/applyAttachment")
|
||||
@POST
|
||||
public Map<String, Object> applyAttachment(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog().info(
|
||||
"[CONTROLLER] ApplyChangeController run .................");
|
||||
ARE.getLog().info("[Path] /change/business/applyAttachment" + " run .................");
|
||||
//获取业务撤销数据信息
|
||||
@Path("/business/to/undo")
|
||||
@POST
|
||||
public Map<String, Object> applyBusinessUndo(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog().info(
|
||||
"[CONTROLLER] ApplyChangeController run .................");
|
||||
ARE.getLog().info("[Path] /change/business/to/undo" + " run .................");
|
||||
|
||||
ApplyAttachmentService service = new ApplyAttachmentServiceImpl();
|
||||
try {
|
||||
return service.applyAttachment(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}*/
|
||||
|
||||
ApplyBusinessUndoService service = new ApplyBusinessUndoServiceImpl();
|
||||
try {
|
||||
return service.applyBusinessUndo(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package apx.com.amarsoft.als.user.change.initiate.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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 AppBusinessUndoService {
|
||||
Map<String, Object> applyBusinessUndo(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil)
|
||||
throws Exception;
|
||||
}
|
||||
@ -9,7 +9,7 @@ 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 AppUndoService {
|
||||
Map<String, Object> applyUndo(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
|
||||
@ -27,7 +27,7 @@ public class ApplyChangeServiceImpl implements ApplyChangeService{
|
||||
.readRequestParam(request, "UTF-8");
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap"); // ²ÎÊý
|
||||
String userId = fieldMap.get("userid") == null ? "" : fieldMap.get("userid").toString();
|
||||
String sql = "select t.product_id,t.project_no,t.project_name,t.customername,t.Identity,t.certid,t.custkind,t.project_manage_name,t.project_dept,t.status_name,t.customertype,t.car_type,t.leas_form,t.operationType,t.certtype,t.SubjectId,t.subjectname,t.project_manage from (SELECT lpi.product_id as product_id,lpi.project_no as project_no,lpi.project_name as project_name,ci.customername as customername,getItemName('CertType',ci.certtype) as Identity,ci.certid as certid,getItemName('cust_kind',lpi.project_industry) as custkind,getUserName(project_manage) as project_manage_name,getOrgName(lpi.project_dept) as project_dept,lcs.status_name as status_name,ci.customertype as customertype,lpi.car_type as car_type,lpi.leas_form as leas_form,psl.operationType as operationType,ci.certtype as certtype,lpi.subjectid as SubjectId,lpi.subjectname as subjectname,lpi.project_manage as project_manage FROM LB_PROJECT_INFO lpi left join lb_contract_status lcs on lpi.project_status=lcs.status_code LEFT JOIN LB_UNION_LESSEE lult on lpi.id=lult.project_id and lult.is_main='y' and( lult.contract_id is null or lult.contract_id='') LEFT JOIN CUSTOMER_INFO ci on lult.customer_id=ci.customerid left join PRD_SPECIFIC_LIBRARY psl on psl.productid=lpi.product_id where lpi.project_status='13' and (SELECT COUNT(id) FROM lb_contract_info_temp WHERE project_id=lpi.ID)=0 and lpi.businesstype='1' order by lpi.project_no desc) t where project_manage='"+userId+"' ";
|
||||
String sql = "select t.projectId,t.Product_Id,t.project_no,t.project_name,t.CUSTOMERNAME,t.Identity,t.certid,t.custkind,t.project_manage_name,t.project_dept,t.status_name,t.customer_Type,t.Car_type,t.leasform,t.operationType,t.certtype,t.SubjectId,t.subjectname,t.project_manage from (SELECT lpi.id as projectId,lpi.product_id as Product_Id,lpi.project_no as project_no,lpi.project_name as project_name,ci.customername as CUSTOMERNAME,getItemName('CertType',ci.certtype) as Identity,ci.certid as certid,getItemName('cust_kind',lpi.project_industry) as custkind,getUserName(project_manage) as project_manage_name,getOrgName(lpi.project_dept) as project_dept,lcs.status_name as status_name,ci.customertype as customer_Type,lpi.car_type as Car_type,lpi.leas_form as leasform,psl.operationType as operationType,ci.certtype as certtype,lpi.subjectid as SubjectId,lpi.subjectname as subjectname,lpi.project_manage as project_manage FROM LB_PROJECT_INFO lpi left join lb_contract_status lcs on lpi.project_status=lcs.status_code LEFT JOIN LB_UNION_LESSEE lult on lpi.id=lult.project_id and lult.is_main='y' and( lult.contract_id is null or lult.contract_id='') LEFT JOIN CUSTOMER_INFO ci on lult.customer_id=ci.customerid left join PRD_SPECIFIC_LIBRARY psl on psl.productid=lpi.product_id where lpi.project_status='13' and (SELECT COUNT(id) FROM lb_contract_info_temp WHERE project_id=lpi.ID)=0 and lpi.businesstype='1' order by lpi.project_no desc) t where project_manage='"+userId+"' ";
|
||||
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql(sql);
|
||||
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user