app添加根据当前登录人id的经销类型,是否选择子经销商信息
This commit is contained in:
parent
550723703d
commit
5965511881
@ -70,7 +70,10 @@ public class BusinessBO implements Serializable {
|
||||
|
||||
private String msg;
|
||||
private Map<String, String> params;
|
||||
|
||||
private String distributor_name;
|
||||
private String distributor_no;
|
||||
private String distributorType;
|
||||
|
||||
public void setParam(Map<String, Object> fieldMap, String param, Object obj) {
|
||||
obj = fieldMap.get(param.toLowerCase()) == null ? null : fieldMap.get(
|
||||
param.toLowerCase()).toString();
|
||||
@ -184,6 +187,11 @@ public class BusinessBO implements Serializable {
|
||||
this.mobile = fieldMap.get("mobile".toLowerCase()) == null ? "": fieldMap.get("mobile".toLowerCase()).toString(); // 手机号
|
||||
this.newtype = fieldMap.get("newtype".toLowerCase()) == null ? "": fieldMap.get("newtype".toLowerCase()).toString(); // 申请类型
|
||||
|
||||
//根据类型设置对应子经销商信息
|
||||
this.distributorType = fieldMap.get("distributor_type".toLowerCase()) == null ? "": fieldMap.get("distributor_type".toLowerCase()).toString();
|
||||
this.distributor_name = fieldMap.get("distributor_name".toLowerCase()) == null ? "": fieldMap.get("distributor_name".toLowerCase()).toString();
|
||||
this.distributor_no = fieldMap.get("new_distributor_no".toLowerCase()) == null ? "": fieldMap.get("new_distributor_no".toLowerCase()).toString();
|
||||
|
||||
//更具产品id获取对应的主体信息
|
||||
List<Map<String, String>> sujectIdList = DataOperatorUtil.getDataBySql("SELECT manysubject FROM PRD_SPECIFIC_LIBRARY WHERE productid='"+this.productId+"'");
|
||||
if(sujectIdList.size()>0){
|
||||
@ -267,6 +275,11 @@ public class BusinessBO implements Serializable {
|
||||
}else{
|
||||
map.put("newtype", "");
|
||||
}
|
||||
//根据当前经销商类是否给子经销赋值
|
||||
if(distributorType.equals("types03")){
|
||||
map.put("distributorNo", distributor_no);
|
||||
map.put("distributorName", distributor_name);
|
||||
}
|
||||
|
||||
JSONObject jsonObject = JSONObject.fromObject(map);
|
||||
this.fixedFlowParam = jsonObject.toString();
|
||||
@ -614,6 +627,30 @@ public class BusinessBO implements Serializable {
|
||||
this.newtype = newtype;
|
||||
}
|
||||
|
||||
public String getDistributor_name() {
|
||||
return distributor_name;
|
||||
}
|
||||
|
||||
public void setDistributor_name(String distributor_name) {
|
||||
this.distributor_name = distributor_name;
|
||||
}
|
||||
|
||||
public String getDistributor_no() {
|
||||
return distributor_no;
|
||||
}
|
||||
|
||||
public void setDistributor_no(String distributor_no) {
|
||||
this.distributor_no = distributor_no;
|
||||
}
|
||||
|
||||
public String getDistributorType() {
|
||||
return distributorType;
|
||||
}
|
||||
|
||||
public void setDistributorType(String distributorType) {
|
||||
this.distributorType = distributorType;
|
||||
}
|
||||
|
||||
public void sethaveCommission(String haveCommission) {
|
||||
haveCommission = haveCommission;
|
||||
}
|
||||
|
||||
@ -123,4 +123,22 @@ public class SelectCarAttributeController {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
|
||||
//»ñÈ¡×Ó¾ÏúÐÅÏ¢
|
||||
@Path("/subDistribution/name")
|
||||
@POST
|
||||
public Map<String, Object> SubDistributionName(
|
||||
@Context HttpServletRequest request, @Context Transaction sqlca,
|
||||
@Context JBOTransaction tx) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog()
|
||||
.info("[CONTROLLER] SelectCarAttributeController run .................");
|
||||
ARE.getLog().info("[Path] /select/subDistribution/name run .................");
|
||||
try {
|
||||
return service
|
||||
.SubDistributionName(request, sqlca, tx, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,4 +25,7 @@ public interface SelectCarAttributeService {
|
||||
Map<String, Object> selectProductName(@Context HttpServletRequest request,
|
||||
@Context Transaction sqlca, @Context JBOTransaction tx,
|
||||
ReturnMapUtil ReturnMapUtil) throws Exception;
|
||||
|
||||
Map<String, Object> SubDistributionName(HttpServletRequest request,
|
||||
Transaction sqlca, JBOTransaction tx, ReturnMapUtil returnMapUtil) throws Exception;
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package apx.com.amarsoft.als.currency.select.apzl.car.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@ -11,7 +13,9 @@ 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;
|
||||
|
||||
public class SelectCarAttributeServiceImpl implements SelectCarAttributeService{
|
||||
|
||||
@ -78,4 +82,19 @@ public class SelectCarAttributeServiceImpl implements SelectCarAttributeService{
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> SubDistributionName(HttpServletRequest request,
|
||||
Transaction sqlca, JBOTransaction tx, ReturnMapUtil ReturnMapUtil) throws Exception {
|
||||
|
||||
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil.readRequestParam(request, "UTF-8");
|
||||
Map<String, Object> fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
||||
String distributor_no = fieldMap.get("distributor_no") == null ? "" : fieldMap.get("distributor_no").toString();
|
||||
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql("SELECT distributor_name,distributor_no as new_distributor_no FROM distributor_info WHERE LIMIT_APPROVAL_DATE='"+distributor_no+"' AND DISTRIBUTOR_STATUS='distributor_status04'");
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
body.put("distributorList", dataList);
|
||||
ReturnMapUtil.setReturnMap(body,RestfullConstant.baseProperty.get("success").toString(),
|
||||
"²éѯ³É¹¦");
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -234,9 +234,17 @@ public class AppUserLoginServiceImpl implements AppUserLoginService {
|
||||
try {
|
||||
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql("SELECT menuid,displayname,sortno FROM app_menu_info WHERE menuid IN (SELECT menuid FROM app_role_menu WHERE roleid in (SELECT ROLEID FROM USER_ROLE WHERE userid='"+body.get("userid")+"'))");
|
||||
body.put("menu", dataList);
|
||||
|
||||
//根据角色id查询对应的经销商
|
||||
List<Map<String, String>> distributorList = DataOperatorUtil.getDataBySql("SELECT distributor_no,TYPE FROM distributor_info WHERE orgid='"+o.getOrgId()+"'");
|
||||
if(distributorList != null && distributorList.size() > 0 ){
|
||||
body.put("distributor_no", distributorList.get(0).get("distributor_no") );
|
||||
body.put("distributor_type", distributorList.get(0).get("TYPE") );
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
ReturnMapUtil.setReturnMap(body, (String) RestfullConstant.baseProperty
|
||||
.get("SUCCESS".toLowerCase()), sMsg);
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user