app添加一合同多车和租赁赋值车类型

This commit is contained in:
tangfutang 2021-09-23 11:37:36 +08:00
parent 40f35d9450
commit e6c2cc3dea
7 changed files with 84 additions and 3 deletions

View File

@ -415,6 +415,11 @@
setItemValue(0,getRow(),"gears","");
setItemValue(0,getRow(),"car_typea",sReturn[3]);
if("SYC"==sReturn[3]){
setItemValue(0,getRow(), "cartype" , "商用车" );
}else if ("CYC"==sReturn[3]){
setItemValue(0,getRow(), "cartype" , "乘用车" );
}
carReadonly(sReturn[3]);
},"ÇëÑ¡Ôñ³µÆ·ÅÆ",'');
}

View File

@ -74,6 +74,8 @@ public class BusinessBO implements Serializable {
private String distributor_no;
private String distributorType;
private String cartypea; //车辆类型CYC:乘用车SYC商用车
public void setParam(Map<String, Object> fieldMap, String param, Object obj) {
obj = fieldMap.get(param.toLowerCase()) == null ? null : fieldMap.get(
param.toLowerCase()).toString();
@ -202,6 +204,8 @@ public class BusinessBO implements Serializable {
this.SubjectName = MultiSubjectUtil.TJSUBJECTNAME;
}
}
//获取车辆类型字段
this.cartypea = fieldMap.get("cartypea".toLowerCase()) == null ? "": fieldMap.get("cartypea".toLowerCase()).toString();
CustomerInfoCheck CustomerInfoCheck = new CustomerInfoCheck();
@ -280,6 +284,9 @@ public class BusinessBO implements Serializable {
map.put("distributorNo", distributor_no);
map.put("distributorName", distributor_name);
}
//添加车型字段
map.put("cartypea", cartypea);
JSONObject jsonObject = JSONObject.fromObject(map);
this.fixedFlowParam = jsonObject.toString();
@ -650,6 +657,15 @@ public class BusinessBO implements Serializable {
public void setDistributorType(String distributorType) {
this.distributorType = distributorType;
}
public String getCartypea() {
return cartypea;
}
public void setCartypea(String cartypea) {
this.cartypea = cartypea;
}
public void sethaveCommission(String haveCommission) {
haveCommission = haveCommission;

View File

@ -9,6 +9,7 @@ import java.util.StringTokenizer;
import javax.servlet.http.HttpServletRequest;
import jbo.app.LB_EQUIPMENT_CAR_TEMP;
import jbo.sys.SELECT_CATALOG;
import apx.com.amarsoft.als.base.cache.instance.AppCodeCache;
@ -29,6 +30,7 @@ public class SelectCatalogWin {
private String sSelName;
private boolean loadSelectflag = true;
private Map<String, Object> param;
private String flowunid;
public boolean isLoadSelectflag() {
return loadSelectflag;
@ -81,6 +83,7 @@ public class SelectCatalogWin {
}
}
}
this.flowunid = param.get("flowunid") == null ? "" : param.get("flowunid").toString();
this.sSelName = sSelName;
try {
BizObjectManager bom = JBOFactory
@ -230,12 +233,14 @@ public class SelectCatalogWin {
.substring(sTableName.lastIndexOf(",") + 1);
if (i > 0) {
sql2 += " or ";
}else {
sql2 += " ( ";
}
sql2 += "A." + sSelectFilter + " like '%" + sGlobalText
sql2 += " A." + sSelectFilter + " like '%" + sGlobalText
+ "%'";
i++;
}
// sql2 += ")";
sql2 += " ) ";
// if (sql2.length() > 0) {
// if (sqlWhere.toLowerCase().contains("where")
// || sql2.toLowerCase().contains("where")) {
@ -245,6 +250,20 @@ public class SelectCatalogWin {
// }
// }
}
if(this.flowunid!=null && this.flowunid.length() > 0) {
BizObjectManager lectm = JBOFactory.getBizObjectManager(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME);
BizObject lect = lectm.createQuery("FLOWUNID=:FLOWUNID").setParameter("FLOWUNID", this.flowunid).getSingleResult(false);
if(lect!=null) {
if(sql2!=null && sql2.length() > 0) {
sql2 += " and (A.cartypea='"+lect.getAttribute("car_typea").toString()+"') ";
}else {
sql2 += " (A.cartypea='"+lect.getAttribute("car_typea").toString()+"') ";
}
}
}
if (!StringX.isSpace(sOtherWhere)) {
String[] array = sOtherWhere.split("&");
sql = sql.replace(array[0], array[1]);

View File

@ -141,4 +141,22 @@ public class SelectCarAttributeController {
return ReturnMapUtil.rollback(e);
}
}
//»ñȡͷ³µÐÅÏ¢
@Path("/headcar/info")
@POST
public Map<String, Object> selectHeadCarInfo(
@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/headcar/info run .................");
try {
return service
.selectHeadCarInfo(request, sqlca, tx, ReturnMapUtil);
} catch (Exception e) {
return ReturnMapUtil.rollback(e);
}
}
}

View File

@ -28,4 +28,7 @@ public interface SelectCarAttributeService {
Map<String, Object> SubDistributionName(HttpServletRequest request,
Transaction sqlca, JBOTransaction tx, ReturnMapUtil returnMapUtil) throws Exception;
Map<String, Object> selectHeadCarInfo(HttpServletRequest request, Transaction sqlca, JBOTransaction tx,
ReturnMapUtil returnMapUtil) throws Exception;
}

View File

@ -97,4 +97,18 @@ public class SelectCarAttributeServiceImpl implements SelectCarAttributeService{
return ReturnMapUtil.getReturnMap();
}
@Override
public Map<String, Object> selectHeadCarInfo(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 flowunid = fieldMap.get("flowunid") == null ? "" : fieldMap.get("flowunid").toString();
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql("SELECT UU_ID,BRAND,CAR_SERIES,MODEL,NOW_TOTAL FROM LB_EQUIPMENT_CAR_TEMP WHERE car_attribute='head' AND flowunid='"+flowunid+"' ");
Map<String, Object> body = new HashMap<String, Object>();
body.put("headCarInfo", dataList);
ReturnMapUtil.setReturnMap(body,RestfullConstant.baseProperty.get("success").toString(),
"²éѯ³É¹¦");
return ReturnMapUtil.getReturnMap();
}
}

View File

@ -326,7 +326,13 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
bmLEC.setAttributeValue("INPUTUSERID", asUser.getUserID());//登记人
bmLEC.setAttributeValue("INPUTORGID", asUser.getOrgID());//登记部门
bmLEC.setAttributeValue("INPUTTIME", StringFunction.getTodayNow());//登记时间,系统当前时间
bmLEC.setAttributeValue("cartype",this.getAttribute("cartype"));
// bmLEC.setAttributeValue("cartype",this.getAttribute("cartype"));
String cartypea = this.getAttribute("cartypea") == null ? "" : this.getAttribute("cartypea").toString() ;
if(cartypea.equals("SYC")) {
bmLEC.setAttributeValue("cartype","商用车");
}else if(cartypea.equals("CYC")){
bmLEC.setAttributeValue("cartype","乘用车");
}
bmLEC.setAttributeValue("vehicletype",this.getAttribute("vehicletype"));
bmLEC.setAttributeValue("vehiclelevel",this.getAttribute("vehiclelevel"));
bmLEC.setAttributeValue("car_attribute","head");