APP邮寄归档数据获取接口&归档发起流程接口

This commit is contained in:
zhangjun 2020-06-19 22:46:25 +08:00
parent 52c3d468bf
commit 176499463b
7 changed files with 124 additions and 12 deletions

View File

@ -53,6 +53,7 @@ public class ChangeBusinessBO implements Serializable {
private String operationType;
private Map<String, String> params;
public void setParam(Map<String, Object> fieldMap, String param, Object obj) {
obj = fieldMap.get(param.toLowerCase()) == null ? null : fieldMap.get(
param.toLowerCase()).toString();
@ -60,7 +61,7 @@ public class ChangeBusinessBO implements Serializable {
public boolean checkKeyField() {
if (StringX.isSpace(applyType)) {
msg = "申请编号不能为空!";
msg = "流程实例号不能为空!";
return false;
}
if (StringX.isSpace(carAttributes)) {
@ -128,6 +129,7 @@ public class ChangeBusinessBO implements Serializable {
this.businessType = RestfullConstant.baseProperty.get("BUSINESS_TYPE") == null ? ""
: RestfullConstant.baseProperty.get("BUSINESS_TYPE").toString(); // 业务类型
this.ProjectName = FlowKey+"-"+CUSTOMERNAME;
//更具产品id获取对应的主体信息
@ -247,7 +249,6 @@ public class ChangeBusinessBO implements Serializable {
+ LB_DOCATTRIBUTE.CLASS_NAME + " A) "
+ "AND R.ObjectType='BusinessApplyFlow' and R.proj_id=:projid " + "AND o.DOC_NATURE='01' "
+ "ORDER BY SERIAL_NUM";
// R.ObjectType='BusinessApplyFlow' and R.proj_id=:projid
BizObjectManager libraryManage = JBOFactory
.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME);
BizObjectQuery query = libraryManage.createQuery(sql).setParameter(
@ -442,4 +443,8 @@ public class ChangeBusinessBO implements Serializable {
haveCommission = haveCommission;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
}

View File

@ -52,7 +52,7 @@ public class BusinessApplyStartController {
return ReturnMapUtil.rollback(e);
}
}
//业务变更和撤销发起
@Path("/changeApply/start")
@POST
public Map<String, Object> changeApplyStart(@Context HttpServletRequest request,

View File

@ -34,6 +34,7 @@ public class MailArchiveBO implements Serializable{
private String ProjectName;
private String ContractNumber;
private String ContractId;
private String FlowKey;
private String customertype;
private String msg;
@ -41,7 +42,6 @@ public class MailArchiveBO implements Serializable{
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();
@ -61,6 +61,10 @@ public class MailArchiveBO implements Serializable{
return false;
}
if (StringX.isSpace(ContractNumber)) {
msg = "合同id不能为空";
return false;
}
if (StringX.isSpace(FlowKey)) {
msg = "互斥id不能为空";
return false;
}
@ -71,14 +75,16 @@ public class MailArchiveBO implements Serializable{
public MailArchiveBO(Map<String, Object> fieldMap, JBOTransaction tx) throws Exception {
this.ApplyType = fieldMap.get("ApplyType".toLowerCase()) == null ? ""
: fieldMap.get("ApplyType".toLowerCase()).toString(); // 流程实例号
this.ProjectName = fieldMap.get("projectName".toLowerCase()) == null ? ""
: fieldMap.get("projectName".toLowerCase()).toString(); // 项目名称
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.CurUserID = fieldMap.get("userid".toLowerCase()) == null ? ""
: fieldMap.get("userid".toLowerCase()).toString(); // 客户id
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 ? ""
: fieldMap.get("serialNumber".toLowerCase()).toString(); // 邮寄号
}
@ -98,6 +104,8 @@ public class MailArchiveBO implements Serializable{
action.setCustomertype(customertype);
map.put("CurUserID", CurUserID);
action.setCurUserID(CurUserID);
map.put("FlowKey", FlowKey);
action.setFlowKey(FlowKey);
JSONObject jsonObject = JSONObject.fromObject(map);
this.fixedFlowParam = jsonObject.toString();
@ -185,7 +193,6 @@ public class MailArchiveBO implements Serializable{
if (msg.equals("")) {
return true;
}
// msg += "业务申请 提交风险预警报告";
return false;
}
@ -323,7 +330,22 @@ public class MailArchiveBO implements Serializable{
public void setContractId(String contractId) {
ContractId = contractId;
}
public String getContractNumber() {
return ContractNumber;
}
public void setContractNumber(String contractNumber) {
ContractNumber = contractNumber;
}
public String getFlowKey() {
return FlowKey;
}
public void setFlowKey(String flowKey) {
FlowKey = flowKey;
}
}

View File

@ -295,7 +295,6 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
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,

View File

@ -0,0 +1,18 @@
package apx.com.amarsoft.als.user.change.center.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 ApplyArchiveService {
Map<String, Object> applyArchive(@Context HttpServletRequest request,
@Context HttpServletResponse response, @Context JBOTransaction tx,
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil)
throws Exception;
}

View File

@ -0,0 +1,46 @@
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.ApplyArchiveService;
//APP»ñÈ¡ÓʼĹ鵵
public class ApplyArchiveServiceImpl implements ApplyArchiveService{
private Map<String, Object> fieldMap;
@SuppressWarnings("unchecked")
@Override
public Map<String, Object> applyArchive(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();
ASUser asUser = new ASUser(userId);
String orgID = asUser.getOrgID();
String sql = "";
sql = "select lci.distributor_id,lci.id,lci.contract_no,lci.contract_number,lci.contract_status,lci.product_name,lci.product_id,lci.project_id,lci.project_date,lci.project_name,lci.rent_method,lci.leas_form,lci.project_dept,lci.project_manage,lci.end_date,lci.flowunid,lci.is_print,lci.CONTRACT_INVOICE_STATUS,lci.businesstype,lci.car_type,lci.lending_type,lci.inputname,lci.inputtel,lci.havecommission,lci.is_netcar,lci.is_operation,lci.is_affiliated,lci.is_operation_qualification,lci.transportcertid,lci.affiliatedname,lci.netcertname,lci.legalpersonname,lci.affiliateddate,lci.affiliatedenddate,lci.registeredmoney,lci.affiliatedactualaddress,lci.affiliatedaddress,lci.transportdate,lci.netcertid,lci.legalpersonid,lci.has_gps,lci.subjectid,lci.subjectname,lfmi.archiving_person,lfmi.archiving_time,lfmi.allstatus,lfmi.expcompany,lfmi.expnumber,lfmi.allhandoverstatus from lb_contract_info lci left join lb_file_mailarchiving_info lfmi on lfmi.CONTRACT_ID = lci.ID where (lfmi.ALLHANDOVERSTATUS is null or lfmi.ALLHANDOVERSTATUS = 'part') and not exists (select 1 from LB_FILE_MAILARCHIVING_INFO_TEMP lfmit where lfmit.contract_id = lci.id and lfmit.is_flowing = '0') and lci.PROJECT_DEPT = '"+orgID+"' ";
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();
}
}

View File

@ -13,10 +13,12 @@ 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.ApplyArchiveService;
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.ApplyArchiveServiceImpl;
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;
@ -35,7 +37,7 @@ import apx.com.amarsoft.als.user.change.mail.service.ApplyMailService;
import apx.com.amarsoft.als.user.change.mail.service.impl.ApplyMailServiceImpl;
@Path("/change")
public class ApplyChangeController {
//业务变更发起
//获取业务变更数据
@Path("/business/change")
@POST
public Map<String, Object> applyChange(@Context HttpServletRequest request,
@ -358,6 +360,26 @@ public class ApplyChangeController {
} catch (Exception e) {
return ReturnMapUtil.rollback(e);
}
}
}
//获取邮寄归档数据信息
@Path("/business/Archive")
@POST
public Map<String, Object> applyArchive(@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/Archive" + " run .................");
ApplyArchiveService service = new ApplyArchiveServiceImpl();
try {
return service.applyArchive(request, response, tx, sqlca, ReturnMapUtil);
} catch (Exception e) {
return ReturnMapUtil.rollback(e);
}
}
}