Compare commits
4 Commits
ac32c13ad6
...
CLXCZC
| Author | SHA1 | Date | |
|---|---|---|---|
| f2f01d5095 | |||
| 0f0d714911 | |||
| 489e7de49c | |||
| 2022f778d1 |
@@ -4,6 +4,7 @@
|
|||||||
<beans default-autowire="byName">
|
<beans default-autowire="byName">
|
||||||
<bean id="assetsTenantConfigProvider" class="com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider" />
|
<bean id="assetsTenantConfigProvider" class="com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider" />
|
||||||
<bean id="assetsService" class="com.seeyon.apps.assetstenant.assets.AssetsService" />
|
<bean id="assetsService" class="com.seeyon.apps.assetstenant.assets.AssetsService" />
|
||||||
|
<bean id="shAssetsService" class="com.seeyon.apps.assetstenant.assets.ShAssetsService" />
|
||||||
<bean id="billService" class="com.seeyon.apps.assetstenant.bill.BillService" />
|
<bean id="billService" class="com.seeyon.apps.assetstenant.bill.BillService" />
|
||||||
<bean id="feeRecordService" class="com.seeyon.apps.assetstenant.bill.FeeRecordService" />
|
<bean id="feeRecordService" class="com.seeyon.apps.assetstenant.bill.FeeRecordService" />
|
||||||
<bean id="waeBillService" class="com.seeyon.apps.assetstenant.bill.WaeBillService" />
|
<bean id="waeBillService" class="com.seeyon.apps.assetstenant.bill.WaeBillService" />
|
||||||
@@ -91,16 +91,27 @@ public class AssetsService {
|
|||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(params.getString("keyWord"))){
|
if(StringUtils.isNotBlank(params.getString("keyWord"))){
|
||||||
conditions.add(FormWhereCondition.build().display("资产名称")
|
conditions.add(FormWhereCondition.build().display("资产名称")
|
||||||
.startWithBracket(true)
|
.startWithBracket(1)
|
||||||
.concatFactor(ClauseFactor.OR)
|
.concatFactor(ClauseFactor.OR)
|
||||||
.value(params.getString("keyWord"))
|
.value(params.getString("keyWord"))
|
||||||
.clauseFactor(ClauseFactor.LIKE));
|
.clauseFactor(ClauseFactor.LIKE));
|
||||||
handleBizZoneSet(conditions,params.getString("keyWord"));
|
handleBizZoneSet(conditions,params.getString("keyWord"));
|
||||||
conditions.add(FormWhereCondition.build().display("所在位置")
|
conditions.add(FormWhereCondition.build().display("详细地址")
|
||||||
.value(params.getString("keyWord"))
|
.value(params.getString("keyWord"))
|
||||||
.endWithBracket(true)
|
.endWithBracket(1)
|
||||||
.clauseFactor(ClauseFactor.LIKE));
|
.clauseFactor(ClauseFactor.LIKE));
|
||||||
}
|
}
|
||||||
|
if(StringUtils.isNotBlank(params.getString("rentRange"))) {
|
||||||
|
String rentRange = params.getString("rentRange");
|
||||||
|
String[] split = rentRange.split("-");
|
||||||
|
String rangeStart = split[0];
|
||||||
|
String rangeEnd = split.length > 1 ? split[1] : null;
|
||||||
|
conditions.add(FormWhereCondition.build().display("月租金").clauseFactor(ClauseFactor.GE).value(rangeStart));
|
||||||
|
if(rangeEnd != null) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("月租金").clauseFactor(ClauseFactor.LE).value(rangeEnd));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
conditions.add(FormWhereCondition.build().display("招商状态").value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"招商状态","上架")));
|
||||||
return conditions;
|
return conditions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,47 +150,16 @@ public class AssetsService {
|
|||||||
tempSet.add(enumItemId);
|
tempSet.add(enumItemId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
condition.setValues(Collections.singletonList(tempSet));
|
if(tempSet == null || tempSet.isEmpty()){
|
||||||
if(condition.getValues().size() > 0) {
|
return;
|
||||||
conditions.add(condition);
|
|
||||||
}
|
}
|
||||||
|
condition.setValues(Collections.singletonList(tempSet));
|
||||||
|
conditions.add(condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleAssetsSubType(List<FormWhereCondition> conditions,String type) throws BusinessException {
|
private void handleAssetsSubType(List<FormWhereCondition> conditions,String type) throws BusinessException {
|
||||||
TableContext master = FormTableExecutor.master(getFormNo());
|
TableContext master = FormTableExecutor.master(getFormNo());
|
||||||
FormTableBean masterTableBean = master.getTableBean();
|
FormTableBean masterTableBean = master.getTableBean();
|
||||||
// if("住房".equals(type)) {
|
|
||||||
// conditions
|
|
||||||
// .add(FormWhereCondition.build().display("资产二级类型")
|
|
||||||
// .startWithBracket(true)
|
|
||||||
// .concatFactor(ClauseFactor.OR)
|
|
||||||
// .value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型","住宅")));
|
|
||||||
// conditions.add(FormWhereCondition.build().display("资产二级类型")
|
|
||||||
// .endWithBracket(true)
|
|
||||||
// .value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型","保障性住房")));
|
|
||||||
// }
|
|
||||||
// if("商铺".equals(type)) {
|
|
||||||
// conditions
|
|
||||||
// .add(FormWhereCondition.build().display("资产二级类型")
|
|
||||||
// .startWithBracket(true)
|
|
||||||
// .concatFactor(ClauseFactor.OR)
|
|
||||||
// .value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型","写字楼")));
|
|
||||||
// conditions.add(FormWhereCondition.build().display("资产二级类型")
|
|
||||||
// .concatFactor(ClauseFactor.OR)
|
|
||||||
// .value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型","商业门面")));
|
|
||||||
// conditions.add(FormWhereCondition.build().display("资产二级类型")
|
|
||||||
// .concatFactor(ClauseFactor.OR)
|
|
||||||
// .value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型","商业用房")));
|
|
||||||
// conditions.add(FormWhereCondition.build().display("资产二级类型")
|
|
||||||
// .endWithBracket(true)
|
|
||||||
// .value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型","政府机构")));
|
|
||||||
// }
|
|
||||||
// if("厂房".equals(type)) {
|
|
||||||
// conditions.add(FormWhereCondition.build().display("资产二级类型").value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型","厂房")));
|
|
||||||
// }
|
|
||||||
// if("停车场".equals(type)) {
|
|
||||||
// conditions.add(FormWhereCondition.build().display("资产二级类型").value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型","车房")));
|
|
||||||
// }
|
|
||||||
conditions
|
conditions
|
||||||
.add(FormWhereCondition.build().display("资产二级类型")
|
.add(FormWhereCondition.build().display("资产二级类型")
|
||||||
.value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型",type)));
|
.value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型",type)));
|
||||||
@@ -212,7 +192,7 @@ public class AssetsService {
|
|||||||
assetsVo.setAssetsNo(getStringValue(fieldsMap,"资产编号"));
|
assetsVo.setAssetsNo(getStringValue(fieldsMap,"资产编号"));
|
||||||
assetsVo.setAssetsName(getStringValue(fieldsMap,"资产名称"));
|
assetsVo.setAssetsName(getStringValue(fieldsMap,"资产名称"));
|
||||||
assetsVo.setManager(getStringValue(fieldsMap,"资产管理员"));
|
assetsVo.setManager(getStringValue(fieldsMap,"资产管理员"));
|
||||||
assetsVo.setAddress(getStringValue(fieldsMap,"所在地址"));
|
assetsVo.setAddress(getStringValue(fieldsMap,"详细地址"));
|
||||||
assetsVo.setZone(getStringValue(fieldsMap,"所在区域"));
|
assetsVo.setZone(getStringValue(fieldsMap,"所在区域"));
|
||||||
if(fieldsMap.get("资产图片") != null) {
|
if(fieldsMap.get("资产图片") != null) {
|
||||||
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("资产图片"),attachmentManager));
|
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("资产图片"),attachmentManager));
|
||||||
@@ -233,6 +213,18 @@ public class AssetsService {
|
|||||||
return assetsVo;
|
return assetsVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long queryAssetsManageType(JSONObject params) throws Exception {
|
||||||
|
TableContext tableContext = getTableContext();
|
||||||
|
List<FormWhereCondition> conditions = buildConditions(params,tableContext.getTableBean());
|
||||||
|
OaAssetsVo assetsVo = new OaAssetsVo();
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(tableContext, conditions,false);
|
||||||
|
if(formColumn == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
|
return (Long) fieldsMap.get("运营类型");
|
||||||
|
}
|
||||||
|
|
||||||
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
||||||
Object o = fieldsMap.get(key);
|
Object o = fieldsMap.get(key);
|
||||||
if(o == null) {
|
if(o == null) {
|
||||||
@@ -248,7 +240,7 @@ public class AssetsService {
|
|||||||
assetsVo.setFormId(getStringValue(fieldsMap,"id"));
|
assetsVo.setFormId(getStringValue(fieldsMap,"id"));
|
||||||
assetsVo.setAssetsStatus(getStringValue(fieldsMap,"资产状态"));
|
assetsVo.setAssetsStatus(getStringValue(fieldsMap,"资产状态"));
|
||||||
assetsVo.setAssetsType(getStringValue(fieldsMap,"资产二级类型"));
|
assetsVo.setAssetsType(getStringValue(fieldsMap,"资产二级类型"));
|
||||||
assetsVo.setAssetsAddress(getStringValue(fieldsMap,"所在位置"));
|
assetsVo.setAssetsAddress(getStringValue(fieldsMap,"详细地址"));
|
||||||
assetsVo.setManageType(getStringValue(fieldsMap,"运营类型"));
|
assetsVo.setManageType(getStringValue(fieldsMap,"运营类型"));
|
||||||
String lnglat = getStringValue(fieldsMap, "坐落经纬度");
|
String lnglat = getStringValue(fieldsMap, "坐落经纬度");
|
||||||
if(StringUtils.isNotBlank(lnglat)){
|
if(StringUtils.isNotBlank(lnglat)){
|
||||||
@@ -268,7 +260,9 @@ public class AssetsService {
|
|||||||
assetsVo.setManagerPhone(getStringValue(fieldsMap,"管理员联系方式"));
|
assetsVo.setManagerPhone(getStringValue(fieldsMap,"管理员联系方式"));
|
||||||
assetsVo.setBizZone(getStringValue(fieldsMap,"商圈位置"));
|
assetsVo.setBizZone(getStringValue(fieldsMap,"商圈位置"));
|
||||||
assetsVo.setLayout(getStringValue(fieldsMap,"户型"));
|
assetsVo.setLayout(getStringValue(fieldsMap,"户型"));
|
||||||
|
assetsVo.setCommunityNo(getStringValue(fieldsMap,"楼盘编号"));
|
||||||
assetsVo.setRenovationStatus(getStringValue(fieldsMap,"装修情况"));
|
assetsVo.setRenovationStatus(getStringValue(fieldsMap,"装修情况"));
|
||||||
|
assetsVo.setSource(getStringValue(fieldsMap,"房源类型"));
|
||||||
V3xOrgMember member = null;
|
V3xOrgMember member = null;
|
||||||
try {
|
try {
|
||||||
member = orgManager.getMemberById(Long.parseLong((String)fieldsMap.get("运营管理员")));
|
member = orgManager.getMemberById(Long.parseLong((String)fieldsMap.get("运营管理员")));
|
||||||
@@ -280,24 +274,40 @@ public class AssetsService {
|
|||||||
}
|
}
|
||||||
String area = getStringValue(fieldsMap,"建筑面积");
|
String area = getStringValue(fieldsMap,"建筑面积");
|
||||||
String rentFee = Optional.ofNullable(getStringValue(fieldsMap,"月租金")).orElse(getStringValue(fieldsMap,"年租金"));
|
String rentFee = Optional.ofNullable(getStringValue(fieldsMap,"月租金")).orElse(getStringValue(fieldsMap,"年租金"));
|
||||||
assetsVo.setFootPrint(area.toString());
|
|
||||||
if(area != null && rentFee != null) {
|
if(area != null && rentFee != null) {
|
||||||
|
assetsVo.setFootPrint(area.toString());
|
||||||
|
}
|
||||||
|
if(rentFee != null) {
|
||||||
assetsVo.setRentFee(rentFee.toString());
|
assetsVo.setRentFee(rentFee.toString());
|
||||||
}
|
}
|
||||||
if(fieldsMap.get("资产图片") != null) {
|
if(fieldsMap.get("资产图片") != null) {
|
||||||
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("资产图片"),attachmentManager));
|
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("资产图片"),attachmentManager));
|
||||||
}
|
}
|
||||||
if(fieldsMap.get("VR文件上传") != null) {
|
TableContext sub = FormTableExecutor.sub(getFormNo(), "VR文件");
|
||||||
assetsVo.setVrImg(OaFileVo.getInstance(fieldsMap.get("VR文件上传"),attachmentManager));
|
List<FormWhereCondition> subConditions = new ArrayList<>();
|
||||||
|
subConditions.add(FormWhereCondition.build().display("formmain_id").value(fieldsMap.get("id")));
|
||||||
|
List<FormColumn> formColumns = FormTableExecutor.query(sub, null, subConditions, false);
|
||||||
|
List<AssetsVrVo> assetsVrVos = new ArrayList<>();
|
||||||
|
if(formColumns != null && formColumns.size() > 0) {
|
||||||
|
for (FormColumn formColumn : formColumns) {
|
||||||
|
Map<String, Object> subFieldsMap = formColumn.getFieldsMap();
|
||||||
|
AssetsVrVo assetsVrVo = new AssetsVrVo();
|
||||||
|
assetsVrVo.setUrl((String)subFieldsMap.get("VR文件链接"));
|
||||||
|
assetsVrVo.setAssetsName((String)subFieldsMap.get("VR名称"));
|
||||||
|
assetsVrVos.add(assetsVrVo);
|
||||||
|
}
|
||||||
|
assetsVo.setVrImg(assetsVrVos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fillPageQueryVo(Map<String, Object> fieldsMap,OaAssetsVo assetsVo) throws BusinessException {
|
public void fillPageQueryVo(Map<String, Object> fieldsMap,OaAssetsVo assetsVo) throws BusinessException {
|
||||||
assetsVo.setAssetsNo(getStringValue(fieldsMap,"资产编号"));
|
assetsVo.setAssetsNo(getStringValue(fieldsMap,"资产编号"));
|
||||||
assetsVo.setAssetsName(getStringValue(fieldsMap,"品牌名称"));
|
assetsVo.setAssetsName(getStringValue(fieldsMap,"资产名称"));
|
||||||
assetsVo.setAssetsDesc(getStringValue(fieldsMap,"详情信息"));
|
assetsVo.setAssetsDesc(getStringValue(fieldsMap,"详情信息"));
|
||||||
assetsVo.setFormId(getStringValue(fieldsMap,"id"));
|
assetsVo.setFormId(getStringValue(fieldsMap,"id"));
|
||||||
assetsVo.setLayout(getStringValue(fieldsMap,"户型"));
|
assetsVo.setLayout(getStringValue(fieldsMap,"户型"));
|
||||||
|
assetsVo.setCommunityNo(getStringValue(fieldsMap,"楼盘编号"));
|
||||||
|
assetsVo.setRoomNo(getStringValue(fieldsMap,"门牌号"));
|
||||||
assetsVo.setRenovationStatus(getStringValue(fieldsMap,"装修情况"));
|
assetsVo.setRenovationStatus(getStringValue(fieldsMap,"装修情况"));
|
||||||
String area = getStringValue(fieldsMap,"建筑面积");
|
String area = getStringValue(fieldsMap,"建筑面积");
|
||||||
String rentFee = Optional.ofNullable(getStringValue(fieldsMap,"月租金")).orElse(getStringValue(fieldsMap,"年租金"));
|
String rentFee = Optional.ofNullable(getStringValue(fieldsMap,"月租金")).orElse(getStringValue(fieldsMap,"年租金"));
|
||||||
@@ -306,6 +316,7 @@ public class AssetsService {
|
|||||||
if(fieldsMap.get("资产图片") != null) {
|
if(fieldsMap.get("资产图片") != null) {
|
||||||
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("资产图片"),attachmentManager));
|
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("资产图片"),attachmentManager));
|
||||||
}
|
}
|
||||||
|
assetsVo.setSource(getStringValue(fieldsMap,"房源类型"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String,Object> getAssetsManagerInfo(String assetsNo) throws Exception {
|
public Map<String,Object> getAssetsManagerInfo(String assetsNo) throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.seeyon.apps.assetstenant.assets;
|
||||||
|
|
||||||
|
public class AssetsVrVo {
|
||||||
|
private String assetsName;
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
public String getAssetsName() {
|
||||||
|
return assetsName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAssetsName(String assetsName) {
|
||||||
|
this.assetsName = assetsName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ public class OaAssetsVo {
|
|||||||
private String footPrint; //占地大小
|
private String footPrint; //占地大小
|
||||||
private String formId; //表单记录ID
|
private String formId; //表单记录ID
|
||||||
private OaFileVo detailImg; //详情图片
|
private OaFileVo detailImg; //详情图片
|
||||||
private OaFileVo vrImg; //vr图
|
private List<AssetsVrVo> vrImg; //vr图
|
||||||
private String assetsDesc; //资产描述
|
private String assetsDesc; //资产描述
|
||||||
private String assetsAddress; //资产地址
|
private String assetsAddress; //资产地址
|
||||||
private String latitude; //纬度
|
private String latitude; //纬度
|
||||||
@@ -37,6 +37,8 @@ public class OaAssetsVo {
|
|||||||
private String manageType; //运营类型
|
private String manageType; //运营类型
|
||||||
private String[] tags;
|
private String[] tags;
|
||||||
private String renovationStatus; //装修状态
|
private String renovationStatus; //装修状态
|
||||||
|
private String source;//来源
|
||||||
|
private String communityNo;// 楼盘
|
||||||
|
|
||||||
public String getAssetsNo() {
|
public String getAssetsNo() {
|
||||||
return assetsNo;
|
return assetsNo;
|
||||||
@@ -102,11 +104,11 @@ public class OaAssetsVo {
|
|||||||
this.detailImg = detailImg;
|
this.detailImg = detailImg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OaFileVo getVrImg() {
|
public List<AssetsVrVo> getVrImg() {
|
||||||
return vrImg;
|
return vrImg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVrImg(OaFileVo vrImg) {
|
public void setVrImg(List<AssetsVrVo> vrImg) {
|
||||||
this.vrImg = vrImg;
|
this.vrImg = vrImg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,4 +287,20 @@ public class OaAssetsVo {
|
|||||||
public void setManageType(String manageType) {
|
public void setManageType(String manageType) {
|
||||||
this.manageType = manageType;
|
this.manageType = manageType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(String source) {
|
||||||
|
this.source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCommunityNo() {
|
||||||
|
return communityNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommunityNo(String communityNo) {
|
||||||
|
this.communityNo = communityNo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
package com.seeyon.apps.assetstenant.assets;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
|
import com.seeyon.apps.assetstenant.contract.ContractAssetsVo;
|
||||||
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
|
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
||||||
|
import com.seeyon.cap4.form.bean.FormTableBean;
|
||||||
|
import com.seeyon.ctp.common.AppContext;
|
||||||
|
import com.seeyon.ctp.common.exceptions.BusinessException;
|
||||||
|
import com.seeyon.ctp.common.filemanager.manager.AttachmentManager;
|
||||||
|
import com.seeyon.ctp.organization.bo.V3xOrgMember;
|
||||||
|
import com.seeyon.ctp.organization.manager.OrgManager;
|
||||||
|
import com.seeyon.utils.form.*;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class ShAssetsService {
|
||||||
|
|
||||||
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
|
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
||||||
|
private String getFormNo() {
|
||||||
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.ASSETS_SH_FORMNO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PageQueryVo pageQuery(JSONObject params) throws Exception {
|
||||||
|
TableContext master = FormTableExecutor.master(getFormNo());
|
||||||
|
FormTableBean masterTableBean = master.getTableBean();
|
||||||
|
List<FormWhereCondition> conditions = buildConditions(params,masterTableBean);
|
||||||
|
Integer pageNo = params.getInteger("pageNo") == null ? 1 : params.getInteger("pageNo");
|
||||||
|
Integer pageSize = params.getInteger("pageSize") == null ? 10 : params.getInteger("pageSize");
|
||||||
|
PageQueryVo<OaAssetsVo> pageQueryVo = new PageQueryVo();
|
||||||
|
List<FormColumn> datas = FormTableExecutor.pageQuery(master,null,conditions,pageNo,pageSize,true);
|
||||||
|
List<OaAssetsVo> vos = new ArrayList<>();
|
||||||
|
Long count = FormTableExecutor.count(master,null, conditions);
|
||||||
|
if(datas.size() > 0){
|
||||||
|
for (FormColumn data : datas) {
|
||||||
|
Map<String, Object> map = data.getFieldsMap();
|
||||||
|
OaAssetsVo oaAssetsVo = new OaAssetsVo();
|
||||||
|
fillPageQueryVo(map, oaAssetsVo);
|
||||||
|
vos.add(oaAssetsVo);
|
||||||
|
}
|
||||||
|
pageQueryVo.setDatas(vos);
|
||||||
|
pageQueryVo.setTotalCount(count);
|
||||||
|
}
|
||||||
|
return pageQueryVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<FormWhereCondition> buildConditions(JSONObject params, FormTableBean formTableBean) throws BusinessException {
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
if(StringUtils.isNotBlank(params.getString("cusNo"))) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("租户编码").value(params.getString("cusNo")));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(params.getString("assetsNo"))) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("资产编号").value(params.getString("assetsNo")));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(params.getString("assetsStatus"))) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("资产状态").value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"资产状态",params.getString("assetsStatus"))));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(params.getString("assetsType"))) {
|
||||||
|
handleAssetsSubType(conditions,params.getString("assetsType"));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(params.getString("manageType"))) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("运营类型")
|
||||||
|
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"运营类型",params.getString("manageType"))));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(params.getString("layout"))) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("户型")
|
||||||
|
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"户型",params.getString("layout"))));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isNotBlank(params.getString("keyWord"))){
|
||||||
|
conditions.add(FormWhereCondition.build().display("资产名称")
|
||||||
|
.startWithBracket(1)
|
||||||
|
.concatFactor(ClauseFactor.OR)
|
||||||
|
.value(params.getString("keyWord"))
|
||||||
|
.clauseFactor(ClauseFactor.LIKE));
|
||||||
|
conditions.add(FormWhereCondition.build().display("房屋地址")
|
||||||
|
.value(params.getString("keyWord"))
|
||||||
|
.endWithBracket(1)
|
||||||
|
.clauseFactor(ClauseFactor.LIKE));
|
||||||
|
}
|
||||||
|
return conditions;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleAssetsSubType(List<FormWhereCondition> conditions,String type) throws BusinessException {
|
||||||
|
TableContext master = FormTableExecutor.master(getFormNo());
|
||||||
|
FormTableBean masterTableBean = master.getTableBean();
|
||||||
|
}
|
||||||
|
|
||||||
|
public OaAssetsVo queryAssetsDetail(String id) throws Exception {
|
||||||
|
if(id == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
JSONObject object = new JSONObject();
|
||||||
|
object.put("assetsNo", id);
|
||||||
|
return queryAssetsDetail(object);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TableContext getTableContext() throws BusinessException {
|
||||||
|
TableContext tableContext = FormTableExecutor.master(getFormNo());
|
||||||
|
return tableContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContractAssetsVo queryContractAssetsDetail(JSONObject params) throws Exception {
|
||||||
|
TableContext tableContext = getTableContext();
|
||||||
|
List<FormWhereCondition> conditions = buildConditions(params,tableContext.getTableBean());
|
||||||
|
ContractAssetsVo assetsVo = new ContractAssetsVo();
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(tableContext,conditions,true);
|
||||||
|
if(formColumn == null) {
|
||||||
|
return assetsVo;
|
||||||
|
}
|
||||||
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
|
assetsVo.setFormId(formColumn.getId());
|
||||||
|
assetsVo.setAssetsNo(getStringValue(fieldsMap,"资产编号"));
|
||||||
|
assetsVo.setAssetsName(getStringValue(fieldsMap,"资产名称"));
|
||||||
|
assetsVo.setManager(getStringValue(fieldsMap,"资产管理员"));
|
||||||
|
assetsVo.setAddress(getStringValue(fieldsMap,"所在地址"));
|
||||||
|
assetsVo.setZone(getStringValue(fieldsMap,"所在区域"));
|
||||||
|
if(fieldsMap.get("资产图片") != null) {
|
||||||
|
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("资产图片"),attachmentManager));
|
||||||
|
}
|
||||||
|
return assetsVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OaAssetsVo queryAssetsDetail(JSONObject params) throws Exception {
|
||||||
|
TableContext tableContext = getTableContext();
|
||||||
|
List<FormWhereCondition> conditions = buildConditions(params,tableContext.getTableBean());
|
||||||
|
OaAssetsVo assetsVo = new OaAssetsVo();
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(tableContext, conditions,true);
|
||||||
|
if(formColumn == null) {
|
||||||
|
return assetsVo;
|
||||||
|
}
|
||||||
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
|
fillDetailVo(fieldsMap,assetsVo);
|
||||||
|
return assetsVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long queryAssetsManageType(JSONObject params) throws Exception {
|
||||||
|
TableContext tableContext = getTableContext();
|
||||||
|
List<FormWhereCondition> conditions = buildConditions(params,tableContext.getTableBean());
|
||||||
|
OaAssetsVo assetsVo = new OaAssetsVo();
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(tableContext, conditions,false);
|
||||||
|
if(formColumn == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
|
return (Long) fieldsMap.get("运营类型");
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
||||||
|
Object o = fieldsMap.get(key);
|
||||||
|
if(o == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return o + "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fillDetailVo(Map<String, Object> fieldsMap,OaAssetsVo assetsVo) throws BusinessException {
|
||||||
|
assetsVo.setAssetsNo(getStringValue(fieldsMap,"资产编号"));
|
||||||
|
assetsVo.setAssetsName(getStringValue(fieldsMap,"资产名称"));
|
||||||
|
// assetsVo.setAssetsDesc(getStringValue(fieldsMap,"详情信息"));
|
||||||
|
assetsVo.setFormId(getStringValue(fieldsMap,"id"));
|
||||||
|
assetsVo.setAssetsStatus(getStringValue(fieldsMap,"资产状态"));
|
||||||
|
assetsVo.setAssetsAddress(getStringValue(fieldsMap,"房屋地址"));
|
||||||
|
assetsVo.setManageType(getStringValue(fieldsMap,"运营类型"));
|
||||||
|
assetsVo.setSource(getStringValue(fieldsMap,"房源类型"));
|
||||||
|
String lnglat = getStringValue(fieldsMap, "坐落经纬度");
|
||||||
|
if(StringUtils.isNotBlank(lnglat)){
|
||||||
|
// 统一替换逗号为分号,然后分割,兼容 ; 和 , 两种格式
|
||||||
|
String[] lnglatArr = lnglat.replace(",", ";").split(";");
|
||||||
|
// 增加数组长度判断,防止越界异常
|
||||||
|
if (lnglatArr.length >= 2) {
|
||||||
|
assetsVo.setLongitude(lnglatArr[0].trim()); // trim() 去除多余空格
|
||||||
|
assetsVo.setLatitude(lnglatArr[1].trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assetsVo.setFloorNo(getStringValue(fieldsMap,"楼层"));
|
||||||
|
assetsVo.setManagerPhone(getStringValue(fieldsMap,"委托经办人电话"));
|
||||||
|
assetsVo.setLayout(getStringValue(fieldsMap,"户型"));
|
||||||
|
assetsVo.setRenovationStatus(getStringValue(fieldsMap,"装修情况"));
|
||||||
|
assetsVo.setManagerName(getStringValue(fieldsMap,"委托经办人") + "管家");
|
||||||
|
String area = getStringValue(fieldsMap,"建筑面积");
|
||||||
|
assetsVo.setFootPrint(area);
|
||||||
|
if(fieldsMap.get("房源图片") != null) {
|
||||||
|
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("房源图片"),attachmentManager));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fillPageQueryVo(Map<String, Object> fieldsMap,OaAssetsVo assetsVo) throws BusinessException {
|
||||||
|
assetsVo.setAssetsNo(getStringValue(fieldsMap,"资产编号"));
|
||||||
|
assetsVo.setAssetsName(getStringValue(fieldsMap,"资产名称"));
|
||||||
|
assetsVo.setManageType(getStringValue(fieldsMap,"运营类型"));
|
||||||
|
assetsVo.setFormId(getStringValue(fieldsMap,"id"));
|
||||||
|
assetsVo.setLayout(getStringValue(fieldsMap,"户型"));
|
||||||
|
assetsVo.setOrientation(getStringValue(fieldsMap,"朝向"));
|
||||||
|
assetsVo.setSource(getStringValue(fieldsMap,"房源类型"));
|
||||||
|
assetsVo.setRenovationStatus(getStringValue(fieldsMap,"装修情况"));
|
||||||
|
String area = getStringValue(fieldsMap,"建筑面积");
|
||||||
|
assetsVo.setFootPrint(area);
|
||||||
|
if(fieldsMap.get("房源图片") != null) {
|
||||||
|
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("房源图片"),attachmentManager));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String,Object> getAssetsManagerInfo(String assetsNo) throws Exception {
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build().display("资产编号").value(assetsNo));
|
||||||
|
TableContext tableContext = getTableContext();
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(tableContext, conditions,false);
|
||||||
|
if(formColumn == null || formColumn.getFieldsMap() == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return formColumn.getFieldsMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -72,8 +72,8 @@ public class BillService {
|
|||||||
if ("已缴费".equals(params.getString("billStatus"))) {
|
if ("已缴费".equals(params.getString("billStatus"))) {
|
||||||
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").clauseFactor(ClauseFactor.NOT_NULL));
|
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").clauseFactor(ClauseFactor.NOT_NULL));
|
||||||
} else {
|
} else {
|
||||||
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").clauseFactor(ClauseFactor.NULL).startWithBracket(true).concatFactor(ClauseFactor.OR));
|
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").clauseFactor(ClauseFactor.NULL).startWithBracket(1).concatFactor(ClauseFactor.OR));
|
||||||
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean, "账单-收款结果反馈", "未收款")).endWithBracket(true));
|
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean, "账单-收款结果反馈", "未收款")).endWithBracket(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return conditions;
|
return conditions;
|
||||||
@@ -142,8 +142,8 @@ public class BillService {
|
|||||||
public Integer countUnpayRentBills(JSONObject params) throws Exception {
|
public Integer countUnpayRentBills(JSONObject params) throws Exception {
|
||||||
TableContext tableContext = getTableContext();
|
TableContext tableContext = getTableContext();
|
||||||
List<FormWhereCondition> conditions = buildConditions(params, tableContext.getTableBean());
|
List<FormWhereCondition> conditions = buildConditions(params, tableContext.getTableBean());
|
||||||
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").clauseFactor(ClauseFactor.NULL).startWithBracket(true).concatFactor(ClauseFactor.OR));
|
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").clauseFactor(ClauseFactor.NULL).startWithBracket(1).concatFactor(ClauseFactor.OR));
|
||||||
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "账单-收款结果反馈", "未收款")).endWithBracket(true));
|
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "账单-收款结果反馈", "未收款")).endWithBracket(1));
|
||||||
Long count = FormTableExecutor.count(tableContext, null, conditions);
|
Long count = FormTableExecutor.count(tableContext, null, conditions);
|
||||||
return count.intValue();
|
return count.intValue();
|
||||||
}
|
}
|
||||||
@@ -288,6 +288,7 @@ public class BillService {
|
|||||||
// 8. 组装子表数据
|
// 8. 组装子表数据
|
||||||
Map<String, Object> subTableRowData = new HashMap<>();
|
Map<String, Object> subTableRowData = new HashMap<>();
|
||||||
subTableRowData.put("账单-明细编号", fieldsMap.get("账单-账单明细编号"));
|
subTableRowData.put("账单-明细编号", fieldsMap.get("账单-账单明细编号"));
|
||||||
|
subTableRowData.put("账单-租赁账单编号", fieldsMap.get("租赁账单编号"));
|
||||||
subTableRowData.put("账单-开始日期", df.format((Date)fieldsMap.get("账单-开始日期")));
|
subTableRowData.put("账单-开始日期", df.format((Date)fieldsMap.get("账单-开始日期")));
|
||||||
subTableRowData.put("账单-结束日期", df.format((Date)fieldsMap.get("账单-结束日期")));
|
subTableRowData.put("账单-结束日期", df.format((Date)fieldsMap.get("账单-结束日期")));
|
||||||
subTableRowData.put("账单-当期缴费期限", fieldsMap.get("账单-当前缴费时限"));
|
subTableRowData.put("账单-当期缴费期限", fieldsMap.get("账单-当前缴费时限"));
|
||||||
@@ -309,7 +310,7 @@ public class BillService {
|
|||||||
subTableRowData.put("账单-资产编号", fieldsMap.get("资产编号"));
|
subTableRowData.put("账单-资产编号", fieldsMap.get("资产编号"));
|
||||||
subTableRowData.put("账单-资产名称", fieldsMap.get("资产名称"));
|
subTableRowData.put("账单-资产名称", fieldsMap.get("资产名称"));
|
||||||
FormFieldBean formFieldBean = subTableBean.getFieldBeanByDisplay("收款结果");
|
FormFieldBean formFieldBean = subTableBean.getFieldBeanByDisplay("收款结果");
|
||||||
subTableRowData.put("账单-收款结果", EnumMapUtils.getEnumItemValueByEnumId("已结清",formFieldBean.getEnumId()));
|
subTableRowData.put("收款结果", EnumMapUtils.getEnumItemValueByEnumId("已结清",formFieldBean.getEnumId()));
|
||||||
subFormDataList.add(subTableRowData);
|
subFormDataList.add(subTableRowData);
|
||||||
// 9. 获取合同信息 + 非空校验
|
// 9. 获取合同信息 + 非空校验
|
||||||
String contractNo = (String) fieldsMap.get("合同编号");
|
String contractNo = (String) fieldsMap.get("合同编号");
|
||||||
@@ -338,7 +339,7 @@ public class BillService {
|
|||||||
}
|
}
|
||||||
// 11. 组装主表数据(线程安全日期)
|
// 11. 组装主表数据(线程安全日期)
|
||||||
TableContext receivePayFlowTableContext = FormTableExecutor.master(templateCode);
|
TableContext receivePayFlowTableContext = FormTableExecutor.master(templateCode);
|
||||||
mainData.put("选择收款项", EnumMapUtils.getEnumItemValueByDisplayValue(receivePayFlowTableContext.getTableBean(), "收款项", "租金"));
|
mainData.put("选择收款项", EnumMapUtils.getEnumItemValueByDisplayValue(receivePayFlowTableContext.getTableBean(), "选择收款项", "租金"));
|
||||||
mainData.put("经办日期", LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
mainData.put("经办日期", LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
mainData.put("合同编号", contractNo);
|
mainData.put("合同编号", contractNo);
|
||||||
mainData.put("本次收款金额", actualReceipts);
|
mainData.put("本次收款金额", actualReceipts);
|
||||||
|
|||||||
@@ -94,12 +94,10 @@ public class FeeRecordService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void payCallBack(String billNo, String bizType, String payDate) throws Exception {
|
public void payCallBack(String billNo, String bizType, String payDate) throws Exception {
|
||||||
if("rent".equals(bizType)) {
|
if("rent".equals(bizType) || "margin".equals(bizType)) {
|
||||||
billService.payCallBack(billNo,payDate);
|
billService.payCallBack(billNo,payDate);
|
||||||
}else if("wae".equals(bizType)){
|
}else if("wae".equals(bizType)){
|
||||||
// waeBillService.payCallBack(billNo,payDate);
|
// waeBillService.payCallBack(billNo,payDate);
|
||||||
}else if("margin".equals(bizType)){
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public class WaeBillService {
|
|||||||
if("已缴费".equals(params.getString("billStatus"))) {
|
if("已缴费".equals(params.getString("billStatus"))) {
|
||||||
conditions.add(FormWhereCondition.build().display("缴费状态").clauseFactor(ClauseFactor.NOT_NULL));
|
conditions.add(FormWhereCondition.build().display("缴费状态").clauseFactor(ClauseFactor.NOT_NULL));
|
||||||
}else {
|
}else {
|
||||||
conditions.add(FormWhereCondition.build().display("缴费状态").clauseFactor(ClauseFactor.NULL).startWithBracket(true).concatFactor(ClauseFactor.OR));
|
conditions.add(FormWhereCondition.build().display("缴费状态").clauseFactor(ClauseFactor.NULL).startWithBracket(1).concatFactor(ClauseFactor.OR));
|
||||||
conditions.add(FormWhereCondition.build().display("缴费状态").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "缴费状态", "未结清")).endWithBracket(true));
|
conditions.add(FormWhereCondition.build().display("缴费状态").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "缴费状态", "未结清")).endWithBracket(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return conditions;
|
return conditions;
|
||||||
@@ -97,8 +97,8 @@ public class WaeBillService {
|
|||||||
public Integer countUnpayWaeBills(JSONObject params) throws Exception {
|
public Integer countUnpayWaeBills(JSONObject params) throws Exception {
|
||||||
TableContext tableContext = getTableContext();
|
TableContext tableContext = getTableContext();
|
||||||
List<FormWhereCondition> conditions = buildConditions(params);
|
List<FormWhereCondition> conditions = buildConditions(params);
|
||||||
conditions.add(FormWhereCondition.build().display("缴费状态").clauseFactor(ClauseFactor.NULL).startWithBracket(true).concatFactor(ClauseFactor.OR));
|
conditions.add(FormWhereCondition.build().display("缴费状态").clauseFactor(ClauseFactor.NULL).startWithBracket(1).concatFactor(ClauseFactor.OR));
|
||||||
conditions.add(FormWhereCondition.build().display("缴费状态").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(),"缴费状态","未结清")).endWithBracket(true));
|
conditions.add(FormWhereCondition.build().display("缴费状态").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(),"缴费状态","未结清")).endWithBracket(1));
|
||||||
Long count = FormTableExecutor.count(tableContext,null, conditions);
|
Long count = FormTableExecutor.count(tableContext,null, conditions);
|
||||||
return count.intValue();
|
return count.intValue();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public class CommunitityVo {
|
|||||||
private String contactPhone;//联系电话
|
private String contactPhone;//联系电话
|
||||||
private String communityNo;//楼盘编号
|
private String communityNo;//楼盘编号
|
||||||
private String communityDesc;//楼盘描述
|
private String communityDesc;//楼盘描述
|
||||||
|
private String construction; //建筑类型
|
||||||
|
|
||||||
public String getReferenceTotalPrice() {
|
public String getReferenceTotalPrice() {
|
||||||
return referenceTotalPrice;
|
return referenceTotalPrice;
|
||||||
@@ -156,4 +157,12 @@ public class CommunitityVo {
|
|||||||
public void setCommunityDesc(String communityDesc) {
|
public void setCommunityDesc(String communityDesc) {
|
||||||
this.communityDesc = communityDesc;
|
this.communityDesc = communityDesc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getConstruction() {
|
||||||
|
return construction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConstruction(String construction) {
|
||||||
|
this.construction = construction;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ public class CommunityService {
|
|||||||
communitityVo.setPropertyType(getStringValue(fieldsMap,"物业类型")); //物业类型
|
communitityVo.setPropertyType(getStringValue(fieldsMap,"物业类型")); //物业类型
|
||||||
communitityVo.setCommunityNo(getStringValue(fieldsMap,"台账编号")); //楼盘编号
|
communitityVo.setCommunityNo(getStringValue(fieldsMap,"台账编号")); //楼盘编号
|
||||||
communitityVo.setCommunityDesc(getStringValue(fieldsMap,"小区详情")); //楼盘描述
|
communitityVo.setCommunityDesc(getStringValue(fieldsMap,"小区详情")); //楼盘描述
|
||||||
|
communitityVo.setConstruction(getStringValue(fieldsMap,"建筑类型"));//建筑类型
|
||||||
String lnglat = getStringValue(fieldsMap,"坐落经纬度");
|
String lnglat = getStringValue(fieldsMap,"坐落经纬度");
|
||||||
if(StringUtils.isNotBlank(lnglat)) {
|
if(StringUtils.isNotBlank(lnglat)) {
|
||||||
// 统一替换逗号为分号,然后分割,兼容 ; 和 , 两种格式
|
// 统一替换逗号为分号,然后分割,兼容 ; 和 , 两种格式
|
||||||
|
|||||||
@@ -10,10 +10,12 @@ public enum AssetsTenantConstants {
|
|||||||
restPwd("",""),
|
restPwd("",""),
|
||||||
formLoginName("2019","表单数据录入登录名"),
|
formLoginName("2019","表单数据录入登录名"),
|
||||||
ASSETS_FORMNO("","资产运营档案编码"),
|
ASSETS_FORMNO("","资产运营档案编码"),
|
||||||
|
ASSETS_SH_FORMNO("","二手房档案编码"),
|
||||||
CONTRACT_FORMNO("","租赁合同表单编码"),
|
CONTRACT_FORMNO("","租赁合同表单编码"),
|
||||||
DISCHARGE_TEMPLATECODE("","退租申请模板编码"),
|
DISCHARGE_TEMPLATECODE("","退租申请模板编码"),
|
||||||
FALLBACK_FORMNO("","留言板表单编码"),
|
FALLBACK_FORMNO("","留言板表单编码"),
|
||||||
RESERVE_FORMNO("","看房预约表单编码"),
|
RESERVE_FORMNO("","看房预约表单编码"),
|
||||||
|
RESERVE_FLOW_FORMNO("","看房预约流程表编码"),
|
||||||
VIEWRECORD_FORMNO("","浏览记录表单编码"),
|
VIEWRECORD_FORMNO("","浏览记录表单编码"),
|
||||||
FORMAPPNAME("","表单应用名称"),
|
FORMAPPNAME("","表单应用名称"),
|
||||||
FEERECORDFORMNO("","费用收支台账表单编码"),
|
FEERECORDFORMNO("","费用收支台账表单编码"),
|
||||||
|
|||||||
@@ -26,10 +26,12 @@ public class CustomerService {
|
|||||||
|
|
||||||
public String matchCusPerson(Customer customer) throws Exception {
|
public String matchCusPerson(Customer customer) throws Exception {
|
||||||
String cardNo = customer.getCardNo();
|
String cardNo = customer.getCardNo();
|
||||||
|
String phone = customer.getCusPhone();
|
||||||
List<FormWhereCondition> conditions = new ArrayList<>();
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
conditions.add(FormWhereCondition.build().display("纳税人识别号或身份证号").value(cardNo).clauseFactor(ClauseFactor.EQ));
|
conditions.add(FormWhereCondition.build().display("纳税人识别号或身份证号").value(cardNo).clauseFactor(ClauseFactor.EQ));
|
||||||
TableContext tableContext = getTableContext();
|
TableContext tableContext = getTableContext();
|
||||||
conditions.add(FormWhereCondition.build().display("客商分类").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(),"客商分类","个人")));
|
conditions.add(FormWhereCondition.build().display("客商分类").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(),"客商分类","个人")));
|
||||||
|
conditions.add(FormWhereCondition.build().display("客户联系方式").value(phone).clauseFactor(ClauseFactor.EQ));
|
||||||
List<FormColumn> formColumnList = FormTableExecutor.query(tableContext,null,conditions,true);
|
List<FormColumn> formColumnList = FormTableExecutor.query(tableContext,null,conditions,true);
|
||||||
if(formColumnList != null && formColumnList.size() > 0){
|
if(formColumnList != null && formColumnList.size() > 0){
|
||||||
Map<String, Object> fieldsMap = formColumnList.get(0).getFieldsMap();
|
Map<String, Object> fieldsMap = formColumnList.get(0).getFieldsMap();
|
||||||
@@ -40,10 +42,12 @@ public class CustomerService {
|
|||||||
|
|
||||||
public String matchCusOrg(Customer customer) throws BusinessException {
|
public String matchCusOrg(Customer customer) throws BusinessException {
|
||||||
String orgNo = customer.getOrgNo();
|
String orgNo = customer.getOrgNo();
|
||||||
|
String phone = customer.getCusPhone();
|
||||||
List<FormWhereCondition> conditions = new ArrayList<>();
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
TableContext tableContext = getTableContext();
|
TableContext tableContext = getTableContext();
|
||||||
conditions.add(FormWhereCondition.build().display("纳税人识别号或身份证号").value(orgNo).clauseFactor(ClauseFactor.EQ));
|
conditions.add(FormWhereCondition.build().display("纳税人识别号或身份证号").value(orgNo).clauseFactor(ClauseFactor.EQ));
|
||||||
conditions.add(FormWhereCondition.build().display("客商分类").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(),"客商分类","企业")));
|
conditions.add(FormWhereCondition.build().display("客商分类").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(),"客商分类","企业")));
|
||||||
|
conditions.add(FormWhereCondition.build().display("客户联系方式").value(phone).clauseFactor(ClauseFactor.EQ));
|
||||||
List<FormColumn> formColumnList = FormTableExecutor.query(tableContext,null,conditions,true);
|
List<FormColumn> formColumnList = FormTableExecutor.query(tableContext,null,conditions,true);
|
||||||
if(formColumnList != null && formColumnList.size() > 0){
|
if(formColumnList != null && formColumnList.size() > 0){
|
||||||
Map<String, Object> fieldsMap = formColumnList.get(0).getFieldsMap();
|
Map<String, Object> fieldsMap = formColumnList.get(0).getFieldsMap();
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.seeyon.apps.assetstenant.flow;
|
package com.seeyon.apps.assetstenant.flow;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.log.Log;
|
||||||
|
import com.seeyon.aicloud.common.JsonUtils;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.ctp.common.AppContext;
|
import com.seeyon.ctp.common.AppContext;
|
||||||
@@ -13,6 +15,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class FlowCreateService {
|
public class FlowCreateService {
|
||||||
|
|
||||||
|
private static final Log log = Log.get(FlowCreateService.class);
|
||||||
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
|
|
||||||
public void flowStart(String flowName,Map<String,Object> mainFormData, Map<String, List<Object>> subFormDatas,String appName,String templateCode) throws Exception {
|
public void flowStart(String flowName,Map<String,Object> mainFormData, Map<String, List<Object>> subFormDatas,String appName,String templateCode) throws Exception {
|
||||||
@@ -34,6 +37,7 @@ public class FlowCreateService {
|
|||||||
for (String key : subFormDatas.keySet()) {
|
for (String key : subFormDatas.keySet()) {
|
||||||
formDatas.put(key,subFormDatas.get(key));
|
formDatas.put(key,subFormDatas.get(key));
|
||||||
}
|
}
|
||||||
|
log.info("流程发起的参数为: " + JsonUtils.toJSONString(params));
|
||||||
OaResp oaResp = client.sendPost(flowName, url, params);
|
OaResp oaResp = client.sendPost(flowName, url, params);
|
||||||
if(oaResp.getCode() != 0) {
|
if(oaResp.getCode() != 0) {
|
||||||
throw new Exception(flowName + "流程发起失败:" + oaResp.getMessage());
|
throw new Exception(flowName + "流程发起失败:" + oaResp.getMessage());
|
||||||
|
|||||||
@@ -3,22 +3,33 @@ package com.seeyon.apps.assetstenant.reserve;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.seeyon.apps.assetstenant.assets.AssetsService;
|
import com.seeyon.apps.assetstenant.assets.AssetsService;
|
||||||
import com.seeyon.apps.assetstenant.assets.OaAssetsVo;
|
import com.seeyon.apps.assetstenant.assets.OaAssetsVo;
|
||||||
|
import com.seeyon.apps.assetstenant.assets.ShAssetsService;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
|
import com.seeyon.apps.assetstenant.flow.FlowCreateService;
|
||||||
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
||||||
|
import com.seeyon.cap4.form.api.FormApi4Cap4;
|
||||||
|
import com.seeyon.cap4.form.bean.FormBean;
|
||||||
|
import com.seeyon.cap4.form.bean.FormFieldBean;
|
||||||
import com.seeyon.cap4.form.bean.FormTableBean;
|
import com.seeyon.cap4.form.bean.FormTableBean;
|
||||||
import com.seeyon.ctp.common.AppContext;
|
import com.seeyon.ctp.common.AppContext;
|
||||||
import com.seeyon.ctp.common.exceptions.BusinessException;
|
import com.seeyon.ctp.common.exceptions.BusinessException;
|
||||||
|
import com.seeyon.ctp.organization.bo.V3xOrgMember;
|
||||||
import com.seeyon.utils.form.*;
|
import com.seeyon.utils.form.*;
|
||||||
import com.seeyon.v3x.services.form.FormFactory;
|
import com.seeyon.v3x.services.form.FormFactory;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class ReserveService {
|
public class ReserveService {
|
||||||
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
private AssetsService assetsService = (AssetsService) AppContext.getBean("assetsService");
|
private AssetsService assetsService = (AssetsService) AppContext.getBean("assetsService");
|
||||||
private FormFactory factory = (FormFactory) AppContext.getBean("formFactory");
|
private FlowCreateService flowCreateService = (FlowCreateService) AppContext.getBean("flowCreateService");
|
||||||
|
private ShAssetsService shAssetsService = (ShAssetsService) AppContext.getBean("shAssetsService");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(AssetsTenantConstants.RESERVE_FORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.RESERVE_FORMNO);
|
||||||
@@ -89,40 +100,88 @@ public class ReserveService {
|
|||||||
vo.setStatus(status);
|
vo.setStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public void saveReserve(JSONObject params) throws Exception {
|
||||||
|
// Map<String,Object> mainData = new HashMap<>();
|
||||||
|
// mainData.put("资产编号", params.getString("assetsNo"));
|
||||||
|
// mainData.put("资产名称", params.getString("assetsName"));
|
||||||
|
// mainData.put("看房人姓名", params.getString("reserveName"));
|
||||||
|
// mainData.put("看房人手机号", params.getString("phone"));
|
||||||
|
// mainData.put("微信openId", params.getString("openId"));
|
||||||
|
// mainData.put("预约时间", params.getString("reserveTime"));
|
||||||
|
// String tenantType = params.getString("tenantType");
|
||||||
|
// if(StringUtils.isNotBlank(tenantType)) {
|
||||||
|
// TableContext tableContext = getMasterTableContext();
|
||||||
|
// FormTableBean tableBean = tableContext.getTableBean();
|
||||||
|
// if("0".equals(tenantType)) {
|
||||||
|
// mainData.put("客户属性",EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"客户属性","个人"));
|
||||||
|
// }else {
|
||||||
|
// mainData.put("客户属性",EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"客户属性","企业"));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// String docNo = "weChat_" + UUID.randomUUID().toString().replace("-","");
|
||||||
|
// mainData.put("档案编号",docNo);
|
||||||
|
// mainData.put("运营类型",getManageType(params.getString("assetsNo")));
|
||||||
|
// mainData.put("处理状态", EnumMapUtils.getEnumItemValueByDisplayValue(getMasterTableContext().getTableBean(), "处理状态", "未处理"));
|
||||||
|
// String loginName = configProvider.getBizConfigByKey(AssetsTenantConstants.formLoginName);
|
||||||
|
// FormSaveUtil.formSave(loginName,getFormNo(),factory,mainData,null);
|
||||||
|
// }
|
||||||
|
|
||||||
public void saveReserve(JSONObject params) throws Exception {
|
public void saveReserve(JSONObject params) throws Exception {
|
||||||
Map<String,Object> mainFormData = new HashMap<>();
|
// 1. 获取Bean + 非空校验
|
||||||
mainFormData.put("资产编号", params.getString("assetsNo"));
|
FormApi4Cap4 formApi4Cap4 = (FormApi4Cap4) AppContext.getBean("formApi4Cap4");
|
||||||
mainFormData.put("资产名称", params.getString("assetsName"));
|
if (formApi4Cap4 == null) {
|
||||||
mainFormData.put("看房人姓名", params.getString("reserveName"));
|
throw new Exception("Spring容器中未找到formApi4Cap4 Bean");
|
||||||
mainFormData.put("看房人手机号", params.getString("phone"));
|
}
|
||||||
mainFormData.put("微信openId", params.getString("openId"));
|
|
||||||
mainFormData.put("预约时间", params.getString("reserveTime"));
|
// 2. 复用配置,避免重复查询
|
||||||
|
String templateCode = this.configProvider.getBizConfigByKey(AssetsTenantConstants.RESERVE_FLOW_FORMNO);
|
||||||
|
String appName = this.configProvider.getBizConfigByKey(AssetsTenantConstants.FORMAPPNAME);
|
||||||
|
|
||||||
|
// 3. 获取表单结构
|
||||||
|
FormBean cap4FormBean = formApi4Cap4.getFormByFormCode(templateCode);
|
||||||
|
FormTableBean masterTableBean = cap4FormBean.getMasterTableBean();
|
||||||
|
String tableName = masterTableBean.getTableName();
|
||||||
|
|
||||||
|
// 5. 构造数据结构(规范泛型)
|
||||||
|
Map<String, Object> mainFormData = new HashMap<>();
|
||||||
|
Map<String, List<Object>> subFormDataMap = new HashMap<>();
|
||||||
|
List<Object> subFormDataList = new ArrayList<>();
|
||||||
|
|
||||||
|
Map<String, Object> mainData = new HashMap<>();
|
||||||
|
mainFormData.put(tableName, mainData);
|
||||||
|
|
||||||
|
TableContext tableContext = getMasterTableContext();
|
||||||
|
FormTableBean tableBean = tableContext.getTableBean();
|
||||||
|
// 9. 获取合同信息 + 非空校验
|
||||||
|
mainData.put("资产编号", params.getString("assetsNo"));
|
||||||
|
mainData.put("资产名称", params.getString("assetsName"));
|
||||||
|
mainData.put("看房人姓名", params.getString("reserveName"));
|
||||||
|
mainData.put("看房人手机号", params.getString("phone"));
|
||||||
|
mainData.put("微信openId", params.getString("openId"));
|
||||||
|
mainData.put("预约时间", params.getString("reserveTime"));
|
||||||
|
mainData.put("房源类型",EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"房源类型",params.getString("houseSourceType")));
|
||||||
String tenantType = params.getString("tenantType");
|
String tenantType = params.getString("tenantType");
|
||||||
if(StringUtils.isNotBlank(tenantType)) {
|
if(StringUtils.isNotBlank(tenantType)) {
|
||||||
TableContext tableContext = getMasterTableContext();
|
|
||||||
FormTableBean tableBean = tableContext.getTableBean();
|
|
||||||
if("0".equals(tenantType)) {
|
if("0".equals(tenantType)) {
|
||||||
mainFormData.put("客户属性",EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"客户属性","个人"));
|
mainData.put("客户属性",EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"客户属性","个人"));
|
||||||
}else {
|
}else {
|
||||||
mainFormData.put("客户属性",EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"客户属性","企业"));
|
mainData.put("客户属性",EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"客户属性","企业"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String docNo = "weChat_" + UUID.randomUUID().toString().replace("-","");
|
String docNo = "weChat_" + UUID.randomUUID().toString().replace("-","");
|
||||||
mainFormData.put("档案编号",docNo);
|
mainData.put("档案编号",docNo);
|
||||||
mainFormData.put("运营类型",getManageType(params.getString("assetsNo")));
|
mainData.put("运营类型",getManageType(params.getString("assetsNo"),params.getString("houseSourceType")));
|
||||||
mainFormData.put("处理状态", EnumMapUtils.getEnumItemValueByDisplayValue(getMasterTableContext().getTableBean(), "处理状态", "未处理"));
|
mainData.put("处理状态", EnumMapUtils.getEnumItemValueByDisplayValue(getMasterTableContext().getTableBean(), "处理状态", "未处理"));
|
||||||
String loginName = configProvider.getBizConfigByKey(AssetsTenantConstants.formLoginName);
|
// 12. 启动流程
|
||||||
FormSaveUtil.formSave(loginName,getFormNo(),factory,mainFormData,null);
|
this.flowCreateService.flowStart("预约看房流程",
|
||||||
|
mainFormData, subFormDataMap, appName, templateCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getManageType(String assetsNo) throws Exception {
|
public Long getManageType(String assetsNo,String houseType) throws Exception {
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("assetsNo", assetsNo);
|
param.put("assetsNo", assetsNo);
|
||||||
OaAssetsVo oaAssetsVo = assetsService.queryAssetsDetail(param);
|
Long manageType = "二手房".equals(houseType) ? shAssetsService.queryAssetsManageType(param) : assetsService.queryAssetsManageType(param);
|
||||||
if(oaAssetsVo == null) {
|
return manageType;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return oaAssetsVo.getManageType();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancelReserve(String id) throws BusinessException {
|
public void cancelReserve(String id) throws BusinessException {
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.seeyon.ctp.rest.resources.assetstenant;
|
|||||||
import cn.hutool.log.Log;
|
import cn.hutool.log.Log;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.seeyon.apps.assetstenant.assets.AssetsService;
|
import com.seeyon.apps.assetstenant.assets.AssetsService;
|
||||||
|
import com.seeyon.apps.assetstenant.assets.OaAssetsVo;
|
||||||
|
import com.seeyon.apps.assetstenant.assets.ShAssetsService;
|
||||||
import com.seeyon.ctp.common.AppContext;
|
import com.seeyon.ctp.common.AppContext;
|
||||||
import com.seeyon.ctp.rest.resources.BaseResource;
|
import com.seeyon.ctp.rest.resources.BaseResource;
|
||||||
|
|
||||||
@@ -20,6 +22,7 @@ public class AssetsQueryResource extends BaseResource {
|
|||||||
|
|
||||||
private static final Log log = Log.get(AssetsQueryResource.class);
|
private static final Log log = Log.get(AssetsQueryResource.class);
|
||||||
private AssetsService assetsService = (AssetsService) AppContext.getBean("assetsService");
|
private AssetsService assetsService = (AssetsService) AppContext.getBean("assetsService");
|
||||||
|
private ShAssetsService shAssetsService = (ShAssetsService) AppContext.getBean("shAssetsService");
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/queryPage")
|
@Path("/queryPage")
|
||||||
@@ -27,8 +30,9 @@ public class AssetsQueryResource extends BaseResource {
|
|||||||
@Consumes({"application/json"})
|
@Consumes({"application/json"})
|
||||||
public Response queryPage(JSONObject params) throws IOException {
|
public Response queryPage(JSONObject params) throws IOException {
|
||||||
log.info("分页查询资产信息参数为:"+params);
|
log.info("分页查询资产信息参数为:"+params);
|
||||||
|
String secHouse = params.getString("secHouse");
|
||||||
try{
|
try{
|
||||||
return success(assetsService.pageQuery(params));
|
return "0".equals(secHouse) ? success(assetsService.pageQuery(params)) : success(shAssetsService.pageQuery(params));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(),e);
|
log.error(e.getMessage(),e);
|
||||||
return fail(e.getMessage());
|
return fail(e.getMessage());
|
||||||
@@ -41,8 +45,9 @@ public class AssetsQueryResource extends BaseResource {
|
|||||||
@Consumes({"application/json"})
|
@Consumes({"application/json"})
|
||||||
public Response queryDetail(JSONObject params) throws IOException {
|
public Response queryDetail(JSONObject params) throws IOException {
|
||||||
log.info("查询资产详情信息参数为:"+params);
|
log.info("查询资产详情信息参数为:"+params);
|
||||||
|
String secHouse = params.getString("secHouse");
|
||||||
try{
|
try{
|
||||||
return success(assetsService.queryAssetsDetail(params));
|
return "0".equals(secHouse) ? success(assetsService.queryAssetsDetail(params)) : success(shAssetsService.queryAssetsDetail(params));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(),e);
|
log.error(e.getMessage(),e);
|
||||||
return fail(e.getMessage());
|
return fail(e.getMessage());
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ public class CustomerMatchResource extends BaseResource {
|
|||||||
log.info("匹配客商参数为:" + params);
|
log.info("匹配客商参数为:" + params);
|
||||||
Customer customer = new Customer();
|
Customer customer = new Customer();
|
||||||
String userType = params.getString("userType");
|
String userType = params.getString("userType");
|
||||||
|
String phone = params.getString("phone");
|
||||||
|
customer.setCusPhone(phone );
|
||||||
if("个人".equals(userType)) {
|
if("个人".equals(userType)) {
|
||||||
customer.setCardNo(params.getString("cardNo"));
|
customer.setCardNo(params.getString("cardNo"));
|
||||||
return success(customerService.matchCusPerson(customer));
|
return success(customerService.matchCusPerson(customer));
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class ViewRecordResource extends BaseResource {
|
|||||||
log.info("增加租户浏览记录:"+params);
|
log.info("增加租户浏览记录:"+params);
|
||||||
try{
|
try{
|
||||||
viewRecordService.record(params);
|
viewRecordService.record(params);
|
||||||
return success("预约成功");
|
return success("记录成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(),e);
|
log.error(e.getMessage(),e);
|
||||||
return fail(e.getMessage());
|
return fail(e.getMessage());
|
||||||
|
|||||||
Reference in New Issue
Block a user