添加app方案测算接口和业务申请去掉商务条件测算风险预警
This commit is contained in:
parent
aad48419e3
commit
a25e203aa9
@ -40,4 +40,24 @@ public class BusinessDataController {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
|
||||
//·½°¸²âËã
|
||||
@Path("/get/rentbyproductid")
|
||||
@POST
|
||||
public Map<String, Object> getRentByProductId(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog()
|
||||
.info("[CONTROLLER] BusinessDataController run .................");
|
||||
ARE.getLog().info(
|
||||
"[Path] /business/data/get/rentbyproductid" + " run .................");
|
||||
|
||||
BusinessDataService service = new BusinessDataServiceImpl();
|
||||
try {
|
||||
return service.getRentByProductId(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,4 +15,8 @@ public interface BusinessDataService {
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil)
|
||||
throws Exception;
|
||||
Map<String, Object> getRentByProductId(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil)
|
||||
throws Exception;
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package apx.com.amarsoft.als.apzl.apply.business.data.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -13,6 +14,7 @@ import com.base.constant.RestfullConstant;
|
||||
import com.base.util.MultipartDataUtil;
|
||||
import com.base.util.ReturnMapUtil;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.flow.util.CalculateUtil;
|
||||
|
||||
import apx.com.amarsoft.als.apzl.apply.business.data.service.BusinessDataService;
|
||||
|
||||
@ -44,4 +46,33 @@ public class BusinessDataServiceImpl implements BusinessDataService {
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getRentByProductId(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 product_id = fieldMap.get("productid") == null ? "" : fieldMap.get("productid").toString();
|
||||
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql("SELECT typeno FROM BUSINESS_TYPE WHERE typeno='"+product_id+"'");
|
||||
if(dataList.size()>0){
|
||||
String clean_lease_money = fieldMap.get("cleanleasemoney") == null ? "" : fieldMap.get("cleanleasemoney").toString();
|
||||
String income_number = fieldMap.get("incomenumber") == null ? "" : fieldMap.get("incomenumber").toString();
|
||||
String rent = CalculateUtil.getRentByProductId(product_id, clean_lease_money, income_number);
|
||||
BigDecimal rentMoney = new BigDecimal(rent);
|
||||
BigDecimal sumRent = rentMoney.multiply(new BigDecimal(income_number));
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
body.put("sumRent", sumRent);
|
||||
body.put("incomenumber", income_number);
|
||||
body.put("rent", rent);
|
||||
ReturnMapUtil.setReturnMap(body,
|
||||
RestfullConstant.baseProperty.get("success").toString(), "");
|
||||
}else{
|
||||
ReturnMapUtil.setReturnMap(null,
|
||||
RestfullConstant.baseProperty.get("fail").toString(), "²úÆ·±àºÅ´íÎó£¡");
|
||||
}
|
||||
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -348,14 +348,14 @@ public class BusinessBO implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
BizObjectManager conditionM = JBOFactory.getBizObjectManager(LC_CALC_CONDITION_TEMP.CLASS_NAME);
|
||||
/*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("")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user