提交代码
This commit is contained in:
@@ -22,4 +22,5 @@
|
|||||||
<bean id="customerService" class="com.seeyon.apps.assetstenant.cus.CustomerService"/>
|
<bean id="customerService" class="com.seeyon.apps.assetstenant.cus.CustomerService"/>
|
||||||
<bean id="viewRecordService" class="com.seeyon.apps.assetstenant.viewrecord.ViewRecordService"/>
|
<bean id="viewRecordService" class="com.seeyon.apps.assetstenant.viewrecord.ViewRecordService"/>
|
||||||
<bean id="weAppConfigService" class="com.seeyon.apps.assetstenant.weappconfig.WeAppConfigService"/>
|
<bean id="weAppConfigService" class="com.seeyon.apps.assetstenant.weappconfig.WeAppConfigService"/>
|
||||||
|
<bean id="communityService" class="com.seeyon.apps.assetstenant.community.CommunityService"/>
|
||||||
</beans>
|
</beans>
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.seeyon.apps.assetstenant;
|
package com.seeyon.apps.assetstenant;
|
||||||
|
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.common.plugin.api.APluginInfoApi;
|
import com.seeyon.apps.common.plugin.api.APluginInfoApi;
|
||||||
import com.seeyon.apps.common.plugin.vo.ConfigVo;
|
import com.seeyon.apps.common.plugin.vo.ConfigVo;
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
public class AssetsTenantPluginApi extends APluginInfoApi {
|
public class AssetsTenantPluginApi extends APluginInfoApi {
|
||||||
public AssetsTenantPluginApi() {
|
public AssetsTenantPluginApi() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPluginId() {
|
public String getPluginId() {
|
||||||
return RentConstants.getPluginId();
|
return AssetsTenantConstants.getPluginId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCreateUser() {
|
public String getCreateUser() {
|
||||||
@@ -23,12 +22,12 @@ public class AssetsTenantPluginApi extends APluginInfoApi {
|
|||||||
|
|
||||||
public ConfigVo getDefaultConfig() {
|
public ConfigVo getDefaultConfig() {
|
||||||
ConfigVo configVo = new ConfigVo();
|
ConfigVo configVo = new ConfigVo();
|
||||||
RentConstants[] var2 = RentConstants.values();
|
AssetsTenantConstants[] var2 = AssetsTenantConstants.values();
|
||||||
int var3 = var2.length;
|
int var3 = var2.length;
|
||||||
|
|
||||||
for(int var4 = 0; var4 < var3; ++var4) {
|
for(int var4 = 0; var4 < var3; ++var4) {
|
||||||
RentConstants value = var2[var4];
|
AssetsTenantConstants value = var2[var4];
|
||||||
if (value != RentConstants.plugin) {
|
if (value != AssetsTenantConstants.plugin) {
|
||||||
configVo.getDevParams().put(value.name(), value.getDefaultValue());
|
configVo.getDevParams().put(value.name(), value.getDefaultValue());
|
||||||
configVo.getProdParams().put(value.name(), value.getDefaultValue());
|
configVo.getProdParams().put(value.name(), value.getDefaultValue());
|
||||||
configVo.getParamMap().put(value.name(), value.getDescription());
|
configVo.getParamMap().put(value.name(), value.getDescription());
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.seeyon.apps.assetstenant.assets;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.assetstenant.contract.ContractAssetsVo;
|
import com.seeyon.apps.assetstenant.contract.ContractAssetsVo;
|
||||||
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
||||||
@@ -15,16 +15,15 @@ import com.seeyon.ctp.organization.manager.OrgManager;
|
|||||||
import com.seeyon.utils.form.*;
|
import com.seeyon.utils.form.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class AssetsService {
|
public class AssetsService {
|
||||||
|
|
||||||
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("AssetsTenantConfigProvider");
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
||||||
private OrgManager orgManager = (OrgManager) AppContext.getBean("orgManager");
|
private OrgManager orgManager = (OrgManager) AppContext.getBean("orgManager");
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.ASSETS_FORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.ASSETS_FORMNO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PageQueryVo pageQuery(JSONObject params) throws Exception {
|
public PageQueryVo pageQuery(JSONObject params) throws Exception {
|
||||||
@@ -38,8 +37,8 @@ public class AssetsService {
|
|||||||
List<OaAssetsVo> vos = new ArrayList<>();
|
List<OaAssetsVo> vos = new ArrayList<>();
|
||||||
Long count = FormTableExecutor.count(master,null, conditions);
|
Long count = FormTableExecutor.count(master,null, conditions);
|
||||||
if(datas.size() > 0){
|
if(datas.size() > 0){
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
Map<String,Object> map = (Map<String, Object>) data;
|
Map<String, Object> map = data.getFieldsMap();
|
||||||
OaAssetsVo oaAssetsVo = new OaAssetsVo();
|
OaAssetsVo oaAssetsVo = new OaAssetsVo();
|
||||||
fillPageQueryVo(map, oaAssetsVo);
|
fillPageQueryVo(map, oaAssetsVo);
|
||||||
vos.add(oaAssetsVo);
|
vos.add(oaAssetsVo);
|
||||||
@@ -53,7 +52,7 @@ public class AssetsService {
|
|||||||
private List<FormWhereCondition> buildConditions(JSONObject params, FormTableBean formTableBean) throws BusinessException {
|
private List<FormWhereCondition> buildConditions(JSONObject params, FormTableBean formTableBean) throws BusinessException {
|
||||||
List<FormWhereCondition> conditions = new ArrayList<>();
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
if(StringUtils.isNotBlank(params.getString("cusNo"))) {
|
if(StringUtils.isNotBlank(params.getString("cusNo"))) {
|
||||||
conditions.add(FormWhereCondition.build().display("租户-租户编号").value(params.getString("cusNo")));
|
conditions.add(FormWhereCondition.build().display("租户编码").value(params.getString("cusNo")));
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(params.getString("assetsNo"))) {
|
if(StringUtils.isNotBlank(params.getString("assetsNo"))) {
|
||||||
conditions.add(FormWhereCondition.build().display("资产编号").value(params.getString("assetsNo")));
|
conditions.add(FormWhereCondition.build().display("资产编号").value(params.getString("assetsNo")));
|
||||||
@@ -72,37 +71,26 @@ public class AssetsService {
|
|||||||
conditions.add(FormWhereCondition.build().display("商圈位置")
|
conditions.add(FormWhereCondition.build().display("商圈位置")
|
||||||
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"商圈位置",params.getString("bizZone"))));
|
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"商圈位置",params.getString("bizZone"))));
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(params.getString("renovationStatus"))) {
|
|
||||||
conditions.add(FormWhereCondition.build().display("装修情况")
|
|
||||||
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"装修情况",params.getString("renovationStatus"))));
|
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(params.getString("layout"))) {
|
if(StringUtils.isNotBlank(params.getString("layout"))) {
|
||||||
conditions.add(FormWhereCondition.build().display("房屋户型")
|
conditions.add(FormWhereCondition.build().display("户型")
|
||||||
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"房屋户型",params.getString("layout"))));
|
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"户型",params.getString("layout"))));
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(params.getString("rentFeeRange"))) {
|
|
||||||
String[] split = params.getString("rentFeeRange").split("-");
|
|
||||||
String rentFeeStart = null;
|
|
||||||
if(split.length > 1) {
|
|
||||||
rentFeeStart = split[0];
|
|
||||||
}
|
|
||||||
String rentFeeEnd = split[split.length - 1];
|
|
||||||
if(rentFeeStart != null) {
|
|
||||||
conditions.add(FormWhereCondition.build().display("评估-参考租金").clauseFactor(ClauseFactor.GE)
|
|
||||||
.value(new BigDecimal(rentFeeStart)));
|
|
||||||
}
|
|
||||||
conditions.add(FormWhereCondition.build().display("评估-参考租金").clauseFactor(ClauseFactor.LE)
|
|
||||||
.value(new BigDecimal(rentFeeEnd)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotBlank(params.getString("features"))){
|
if(StringUtils.isNotBlank(params.getString("features"))){
|
||||||
String[] features = params.getString("features").split(",");
|
String[] features = params.getString("features").split(",");
|
||||||
for (Object feature : features) {
|
// for (Object feature : features) {
|
||||||
conditions.add(FormWhereCondition.build().display("基础配套").value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"基础配套",feature + ""))
|
// conditions.add(FormWhereCondition.build().display("基础配套").value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"基础配套",feature + ""))
|
||||||
.index("FIND_IN_SET(?").clauseFactor(ClauseFactor.GT));
|
// .index("FIND_IN_SET(?").clauseFactor(ClauseFactor.GT));
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
if(StringUtils.isNotBlank(params.getString("communityNo"))) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("楼盘编号").value(params.getString("communityNo")));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(params.getString("buildingNo"))) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("楼栋").value(params.getString("buildingNo")));
|
||||||
}
|
}
|
||||||
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(true)
|
||||||
.concatFactor(ClauseFactor.OR)
|
.concatFactor(ClauseFactor.OR)
|
||||||
.value(params.getString("keyWord"))
|
.value(params.getString("keyWord"))
|
||||||
@@ -194,7 +182,6 @@ public class AssetsService {
|
|||||||
// }
|
// }
|
||||||
conditions
|
conditions
|
||||||
.add(FormWhereCondition.build().display("资产二级类型")
|
.add(FormWhereCondition.build().display("资产二级类型")
|
||||||
.startWithBracket(true)
|
|
||||||
.value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型",type)));
|
.value(EnumMapUtils.getEnumItemValueByDisplayValue(masterTableBean,"资产二级类型",type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,10 +210,12 @@ public class AssetsService {
|
|||||||
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
assetsVo.setFormId(formColumn.getId());
|
assetsVo.setFormId(formColumn.getId());
|
||||||
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.setZone(getStringValue(fieldsMap,"所在区域"));
|
||||||
if(fieldsMap.get("资产图片") != null) {
|
if(fieldsMap.get("资产图片") != null) {
|
||||||
assetsVo.setDetailImg(OaFileVo.getInstance(Long.parseLong((String)fieldsMap.get("资产图片")),attachmentManager));
|
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("资产图片"),attachmentManager));
|
||||||
}
|
}
|
||||||
return assetsVo;
|
return assetsVo;
|
||||||
}
|
}
|
||||||
@@ -254,14 +243,23 @@ public class AssetsService {
|
|||||||
|
|
||||||
public void fillDetailVo(Map<String, Object> fieldsMap,OaAssetsVo assetsVo) throws BusinessException {
|
public void fillDetailVo(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.setAssetsStatus(getStringValue(fieldsMap,"资产状态"));
|
assetsVo.setAssetsStatus(getStringValue(fieldsMap,"资产状态"));
|
||||||
assetsVo.setAssetsType(getStringValue(fieldsMap,"资产类型"));
|
assetsVo.setAssetsType(getStringValue(fieldsMap,"资产二级类型"));
|
||||||
assetsVo.setAssetsAddress(getStringValue(fieldsMap,"所在位置"));
|
assetsVo.setAssetsAddress(getStringValue(fieldsMap,"所在位置"));
|
||||||
assetsVo.setLongitude(getStringValue(fieldsMap,"坐落经度")); //经度
|
assetsVo.setManageType(getStringValue(fieldsMap,"运营类型"));
|
||||||
assetsVo.setLatitude(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.setFloorNo(getStringValue(fieldsMap,"楼层"));
|
||||||
assetsVo.setUnitNo(getStringValue(fieldsMap,"单元"));
|
assetsVo.setUnitNo(getStringValue(fieldsMap,"单元"));
|
||||||
assetsVo.setRoomNo(getStringValue(fieldsMap,"门牌号"));
|
assetsVo.setRoomNo(getStringValue(fieldsMap,"门牌号"));
|
||||||
@@ -269,7 +267,7 @@ public class AssetsService {
|
|||||||
assetsVo.setHasLift(getStringValue(fieldsMap,"有无电梯"));
|
assetsVo.setHasLift(getStringValue(fieldsMap,"有无电梯"));
|
||||||
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.setRenovationStatus(getStringValue(fieldsMap,"装修情况"));
|
assetsVo.setRenovationStatus(getStringValue(fieldsMap,"装修情况"));
|
||||||
V3xOrgMember member = null;
|
V3xOrgMember member = null;
|
||||||
try {
|
try {
|
||||||
@@ -280,17 +278,17 @@ public class AssetsService {
|
|||||||
if(member != null) {
|
if(member != null) {
|
||||||
assetsVo.setManagerName(member.getName().substring(0,1) + "管家");
|
assetsVo.setManagerName(member.getName().substring(0,1) + "管家");
|
||||||
}
|
}
|
||||||
BigDecimal area = (BigDecimal)fieldsMap.get("评估-评估面积");
|
String area = getStringValue(fieldsMap,"建筑面积");
|
||||||
BigDecimal rentFee = (BigDecimal)fieldsMap.get("评估-参考租金");
|
String rentFee = Optional.ofNullable(getStringValue(fieldsMap,"月租金")).orElse(getStringValue(fieldsMap,"年租金"));
|
||||||
assetsVo.setFootPrint(area.toString());
|
assetsVo.setFootPrint(area.toString());
|
||||||
if(area != null && rentFee != null) {
|
if(area != null && rentFee != null) {
|
||||||
assetsVo.setRentFee(rentFee.toString());
|
assetsVo.setRentFee(rentFee.toString());
|
||||||
}
|
}
|
||||||
if(fieldsMap.get("VR文件上传") != null) {
|
|
||||||
assetsVo.setVrImg(OaFileVo.getInstance((Long)fieldsMap.get("VR文件上传"),attachmentManager));
|
|
||||||
}
|
|
||||||
if(fieldsMap.get("资产图片") != null) {
|
if(fieldsMap.get("资产图片") != null) {
|
||||||
assetsVo.setDetailImg(OaFileVo.getInstance(Long.parseLong((String)fieldsMap.get("资产图片")),attachmentManager));
|
assetsVo.setDetailImg(OaFileVo.getInstance(fieldsMap.get("资产图片"),attachmentManager));
|
||||||
|
}
|
||||||
|
if(fieldsMap.get("VR文件上传") != null) {
|
||||||
|
assetsVo.setVrImg(OaFileVo.getInstance(fieldsMap.get("VR文件上传"),attachmentManager));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,14 +297,25 @@ public class AssetsService {
|
|||||||
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.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,"年租金"));
|
||||||
assetsVo.setFootPrint(area);
|
assetsVo.setFootPrint(area);
|
||||||
assetsVo.setRentFee(rentFee);
|
assetsVo.setRentFee(rentFee);
|
||||||
if(fieldsMap.get("资产图片") != null) {
|
if(fieldsMap.get("资产图片") != null) {
|
||||||
assetsVo.setDetailImg(OaFileVo.getInstance(Long.parseLong((String)fieldsMap.get("资产图片")),attachmentManager));
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ public class OaAssetsVo {
|
|||||||
private String powerFee; //电费
|
private String powerFee; //电费
|
||||||
private String powerFeeUnit; //电费单位
|
private String powerFeeUnit; //电费单位
|
||||||
private String bizZone;
|
private String bizZone;
|
||||||
private List<String> features;
|
private String manageType; //运营类型
|
||||||
|
private String[] tags;
|
||||||
private String renovationStatus; //装修状态
|
private String renovationStatus; //装修状态
|
||||||
|
|
||||||
public String getAssetsNo() {
|
public String getAssetsNo() {
|
||||||
@@ -253,12 +254,12 @@ public class OaAssetsVo {
|
|||||||
this.bizZone = bizZone;
|
this.bizZone = bizZone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getFeatures() {
|
public String[] getTags() {
|
||||||
return features;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFeatures(List<String> features) {
|
public void setTags(String[] tags) {
|
||||||
this.features = features;
|
this.tags = tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRenovationStatus() {
|
public String getRenovationStatus() {
|
||||||
@@ -276,4 +277,12 @@ public class OaAssetsVo {
|
|||||||
public void setRentFeeUnit(String rentFeeUnit) {
|
public void setRentFeeUnit(String rentFeeUnit) {
|
||||||
this.rentFeeUnit = rentFeeUnit;
|
this.rentFeeUnit = rentFeeUnit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getManageType() {
|
||||||
|
return manageType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManageType(String manageType) {
|
||||||
|
this.manageType = manageType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,31 +1,47 @@
|
|||||||
package com.seeyon.apps.assetstenant.bill;
|
package com.seeyon.apps.assetstenant.bill;
|
||||||
|
|
||||||
|
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.OaAssetsVo;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
|
import com.seeyon.apps.assetstenant.contract.ContractPayBaseInfo;
|
||||||
import com.seeyon.apps.assetstenant.contract.ContractService;
|
import com.seeyon.apps.assetstenant.contract.ContractService;
|
||||||
|
import com.seeyon.apps.assetstenant.contract.OaContractDetailVo;
|
||||||
|
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.ctp.organization.manager.OrgManager;
|
||||||
import com.seeyon.utils.form.*;
|
import com.seeyon.utils.form.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.math.RoundingMode;
|
||||||
import java.util.List;
|
import java.text.DateFormat;
|
||||||
import java.util.Map;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public class BillService {
|
public class BillService {
|
||||||
|
|
||||||
|
private static final Log log = Log.get(BillService.class);
|
||||||
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
private ContractService contractService = (ContractService) AppContext.getBean("contractService");
|
private ContractService contractService = (ContractService) AppContext.getBean("contractService");
|
||||||
private AssetsService assetsService = (AssetsService) AppContext.getBean("assetsService");
|
private AssetsService assetsService = (AssetsService) AppContext.getBean("assetsService");
|
||||||
|
private FlowCreateService flowCreateService = (FlowCreateService) AppContext.getBean("flowCreateService");
|
||||||
|
private OrgManager orgManager = (OrgManager) AppContext.getBean("orgManager");
|
||||||
|
private DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.CONTRACTBILLFORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.CONTRACTBILLFORMNO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TableContext getTableContext() throws BusinessException {
|
private TableContext getTableContext() throws BusinessException {
|
||||||
@@ -47,7 +63,10 @@ public class BillService {
|
|||||||
conditions.add(FormWhereCondition.build().display("承租方编号").value(params.getString("cusNo")));
|
conditions.add(FormWhereCondition.build().display("承租方编号").value(params.getString("cusNo")));
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(params.getString("billNo"))) {
|
if (StringUtils.isNotBlank(params.getString("billNo"))) {
|
||||||
conditions.add(FormWhereCondition.build().display("租赁账单编号").value(params.getString("billNo")));
|
conditions.add(FormWhereCondition.build().display("账单-账单明细编号").value(params.getString("billNo")));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(params.getString("contractNo"))) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("合同编号").value(params.getString("contractNo")));
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(params.getString("billStatus"))) {
|
if (StringUtils.isNotBlank(params.getString("billStatus"))) {
|
||||||
if ("已缴费".equals(params.getString("billStatus"))) {
|
if ("已缴费".equals(params.getString("billStatus"))) {
|
||||||
@@ -60,13 +79,13 @@ public class BillService {
|
|||||||
return conditions;
|
return conditions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BillVo> queryAllContractBill(List<FormWhereCondition> conditions) throws Exception {;
|
public List<BillVo> queryAllContractBill(List<FormWhereCondition> conditions) throws Exception {
|
||||||
TableContext tableContext = getTableContext();
|
TableContext tableContext = getTableContext();
|
||||||
List<FormColumn> datas = FormTableExecutor.query(tableContext, null, conditions, true);
|
List<FormColumn> datas = FormTableExecutor.query(tableContext, null, conditions, true);
|
||||||
List<BillVo> vos = new ArrayList<>();
|
List<BillVo> vos = new ArrayList<>();
|
||||||
if (datas.size() > 0) {
|
if (datas.size() > 0) {
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
Map<String,Object> map = (Map<String, Object>) data;
|
Map<String, Object> map = data.getFieldsMap();
|
||||||
BillVo billVo = new BillVo();
|
BillVo billVo = new BillVo();
|
||||||
fillVo(map, billVo);
|
fillVo(map, billVo);
|
||||||
vos.add(billVo);
|
vos.add(billVo);
|
||||||
@@ -75,6 +94,51 @@ public class BillService {
|
|||||||
return vos;
|
return vos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ContractPayBaseInfo> queryContractPayBaseInfoList(String contractNo) throws BusinessException {
|
||||||
|
List<ContractPayBaseInfo> contractPayBaseInfoList = new ArrayList<>();
|
||||||
|
String formNo = configProvider.getBizConfigByKey(AssetsTenantConstants.BILLCREATEFORMNO);
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build().display("合同编号").value(contractNo));
|
||||||
|
TableContext master = FormTableExecutor.master(formNo);
|
||||||
|
List<FormColumn> formColumns = FormTableExecutor.query(master, null, conditions, true);
|
||||||
|
if(formColumns == null || formColumns.size() <= 0){
|
||||||
|
return contractPayBaseInfoList;
|
||||||
|
}
|
||||||
|
for (FormColumn formColumn : formColumns) {
|
||||||
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
|
ContractPayBaseInfo baseInfo = new ContractPayBaseInfo();
|
||||||
|
baseInfo.setContractNo(contractNo);
|
||||||
|
baseInfo.setAssetsName(getStringValue(fieldsMap, "资产名称"));
|
||||||
|
baseInfo.setAssetsNo(getStringValue(fieldsMap,"资产编号"));
|
||||||
|
baseInfo.setTotalRentFee(getStringValue(fieldsMap,"本账单金额"));
|
||||||
|
Integer totalPeriod = contractService.countTotalPeriod(contractNo);
|
||||||
|
baseInfo.setTotalTermNum(totalPeriod + "");
|
||||||
|
Integer countPaidTermNum = countPaidTermNum(baseInfo.getAssetsNo(), baseInfo.getContractNo());
|
||||||
|
baseInfo.setPaidTermNum(countPaidTermNum + "");
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("contractNo", contractNo);
|
||||||
|
try {
|
||||||
|
OaContractDetailVo detailVo = contractService.queryContractDetail(param);
|
||||||
|
baseInfo.setDeposit(detailVo.getDeposit());
|
||||||
|
}catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
contractPayBaseInfoList.add(baseInfo);
|
||||||
|
}
|
||||||
|
return contractPayBaseInfoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer countPaidTermNum(String assetsNo,String contractNo) throws BusinessException {
|
||||||
|
TableContext tableContext = getTableContext();
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build().display("资产编号").value(assetsNo));
|
||||||
|
conditions.add(FormWhereCondition.build().display("合同编号").value(contractNo));
|
||||||
|
conditions.add(FormWhereCondition.build().display("账单-收款结果反馈").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(),"收款结果反馈", "已结清")));
|
||||||
|
conditions.add(FormWhereCondition.build().display("账单类型").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(),"账单类型", "租金")));
|
||||||
|
Long count = FormTableExecutor.count(tableContext, null, conditions);
|
||||||
|
return count.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
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());
|
||||||
@@ -94,8 +158,8 @@ public class BillService {
|
|||||||
List<BillVo> vos = new ArrayList<>();
|
List<BillVo> vos = new ArrayList<>();
|
||||||
Long count = FormTableExecutor.count(tableContext, null, conditions);
|
Long count = FormTableExecutor.count(tableContext, null, conditions);
|
||||||
if (datas.size() > 0) {
|
if (datas.size() > 0) {
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
Map<String,Object> map = (Map<String, Object>) data;
|
Map<String, Object> map = data.getFieldsMap();
|
||||||
BillVo billVo = new BillVo();
|
BillVo billVo = new BillVo();
|
||||||
fillVo(map, billVo);
|
fillVo(map, billVo);
|
||||||
vos.add(billVo);
|
vos.add(billVo);
|
||||||
@@ -120,37 +184,166 @@ public class BillService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void fillVo(Map<String, Object> fieldsMap, BillVo billVo) throws Exception {
|
public void fillVo(Map<String, Object> fieldsMap, BillVo billVo) throws Exception {
|
||||||
billVo.setBillType("CONTRACT");
|
billVo.setBillType(getStringValue(fieldsMap, "账单类型"));
|
||||||
billVo.setBillNo(getStringValue(fieldsMap,"租赁账单编号" ));
|
billVo.setBillNo(getStringValue(fieldsMap, "账单-账单明细编号"));
|
||||||
String payStatus = fieldsMap.get("账单-收款结果反馈") == null ? "待缴费" : getStringValue(fieldsMap,"收款结果反馈");
|
String payStatus = fieldsMap.get("账单-收款结果反馈") == null ? "待缴费" : getStringValue(fieldsMap, "账单-收款结果反馈");
|
||||||
billVo.setBillStatus(payStatus);
|
billVo.setBillStatus(payStatus);
|
||||||
billVo.setCusNo(getStringValue(fieldsMap, "承租方编号"));
|
billVo.setCusNo(getStringValue(fieldsMap, "承租方编号"));
|
||||||
billVo.setBillStartDate(getStringValue(fieldsMap, "账单-开始日期"));
|
billVo.setBillStartDate(getStringValue(fieldsMap, "账单-开始日期"));
|
||||||
billVo.setContractNo(getStringValue(fieldsMap, "合同编号"));
|
billVo.setContractNo(getStringValue(fieldsMap, "合同编号"));
|
||||||
billVo.setBillPayEndDate(getStringValue(fieldsMap, "账单-当前缴费时限"));
|
billVo.setBillPayEndDate(getStringValue(fieldsMap, "账单-当前缴费时限"));
|
||||||
billVo.setBillEndDate(getStringValue(fieldsMap, "账单-结束日期"));
|
billVo.setBillEndDate(getStringValue(fieldsMap, "账单-结束日期"));
|
||||||
OaAssetsVo oaAssetsVo = assetsService.queryAssetsDetail(getStringValue(fieldsMap,"资产编号"));
|
String billName = buildBillName(fieldsMap, billVo);
|
||||||
String asssetsName = null;
|
billVo.setBillPayDate(getStringValue(fieldsMap, "账单-实际收款时间"));
|
||||||
if(oaAssetsVo != null) {
|
billVo.setBillName(billName);
|
||||||
asssetsName = oaAssetsVo.getAssetsName();
|
if(billVo.getBillTermNum() != null && 1 == billVo.getBillTermNum()) {
|
||||||
|
billVo.setDeposit(getDeposit(getStringValue(fieldsMap, "合同编号")));
|
||||||
}
|
}
|
||||||
String roomNo = fieldsMap.get("门牌号") == null ? "" : fieldsMap.get("门牌号") + "-";
|
if("租金".equals(billVo.getBillType())) {
|
||||||
String billTerm = "(" + billVo.getBillStartDate() + "-" + billVo.getBillEndDate() + ")";
|
|
||||||
billVo.setBillName(asssetsName + roomNo + billTerm);
|
|
||||||
BigDecimal bigDecimal = (BigDecimal) fieldsMap.get("账单-租费");
|
BigDecimal bigDecimal = (BigDecimal) fieldsMap.get("账单-租费");
|
||||||
billVo.setBillAmount(bigDecimal == null ? null : bigDecimal.toString());
|
billVo.setBillAmount(bigDecimal == null ? null : bigDecimal.toString());
|
||||||
billVo.setBillPayTime(getStringValue(fieldsMap,"账单-实际收款时间"));
|
}else if("履约保证金".equals(billVo.getBillType())){
|
||||||
|
BigDecimal bigDecimal = (BigDecimal) fieldsMap.get("约定履约保证金");
|
||||||
|
billVo.setBillAmount(bigDecimal == null ? null : bigDecimal.toString());
|
||||||
|
}else if("违约金".equals(billVo.getBillType())){
|
||||||
|
BigDecimal bigDecimal = (BigDecimal) fieldsMap.get("应收违约金");
|
||||||
|
billVo.setBillAmount(bigDecimal == null ? null : bigDecimal.toString());
|
||||||
|
}else if("滞纳金".equals(billVo.getBillType())){
|
||||||
|
BigDecimal bigDecimal = (BigDecimal) fieldsMap.get("应收滞纳金");
|
||||||
|
billVo.setBillAmount(bigDecimal == null ? null : bigDecimal.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String buildBillName(Map<String, Object> fieldsMap) throws Exception {
|
private String getDeposit(String contractNo) throws Exception {
|
||||||
|
JSONObject params = new JSONObject();
|
||||||
|
params.put("contractNo", contractNo);
|
||||||
|
OaContractDetailVo oaContractVo = contractService.queryContractDetail(params);
|
||||||
|
return oaContractVo == null ? null : oaContractVo.getDeposit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildBillName(Map<String, Object> fieldsMap, BillVo billVo) throws Exception {
|
||||||
String contractNo = getStringValue(fieldsMap, "合同编号");
|
String contractNo = getStringValue(fieldsMap, "合同编号");
|
||||||
String term = contractService.queryContractPayPeriod(contractNo,getStringValue(fieldsMap,"账单-开始日期")) + "-";
|
Integer termNum = contractService.queryContractPayPeriod(contractNo, getStringValue(fieldsMap, "账单-开始日期"));
|
||||||
|
billVo.setBillTermNum(termNum);
|
||||||
OaAssetsVo oaAssetsVo = assetsService.queryAssetsDetail(getStringValue(fieldsMap, "资产编号"));
|
OaAssetsVo oaAssetsVo = assetsService.queryAssetsDetail(getStringValue(fieldsMap, "资产编号"));
|
||||||
String asssetsName = null;
|
String asssetsName = null;
|
||||||
if (oaAssetsVo != null) {
|
if (oaAssetsVo != null) {
|
||||||
asssetsName = oaAssetsVo.getAssetsName();
|
asssetsName = oaAssetsVo.getAssetsName();
|
||||||
}
|
}
|
||||||
String roomNo = fieldsMap.get("门牌号") == null ? "" : fieldsMap.get("门牌号") + "-";
|
String roomNo = fieldsMap.get("门牌号") == null ? "" : fieldsMap.get("门牌号") + "-";
|
||||||
return asssetsName + roomNo + term;
|
return asssetsName + roomNo + termNum + "期";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void payCallBack(String billNo,String payDate) throws Exception {
|
||||||
|
// 1. 获取Bean + 非空校验
|
||||||
|
FormApi4Cap4 formApi4Cap4 = (FormApi4Cap4) AppContext.getBean("formApi4Cap4");
|
||||||
|
if (formApi4Cap4 == null) {
|
||||||
|
throw new Exception("Spring容器中未找到formApi4Cap4 Bean");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 复用配置,避免重复查询
|
||||||
|
String templateCode = this.configProvider.getBizConfigByKey(AssetsTenantConstants.PAYMENT_REGISTRATION_TEMPLATECODE);
|
||||||
|
String appName = this.configProvider.getBizConfigByKey(AssetsTenantConstants.FORMAPPNAME);
|
||||||
|
|
||||||
|
// 3. 获取表单结构
|
||||||
|
FormBean cap4FormBean = formApi4Cap4.getFormByFormCode(templateCode);
|
||||||
|
FormTableBean masterTableBean = cap4FormBean.getMasterTableBean();
|
||||||
|
String tableName = masterTableBean.getTableName();
|
||||||
|
List<FormTableBean> subTableBeanList = cap4FormBean.getSubTableBean();
|
||||||
|
FormTableBean subTableBean = null;
|
||||||
|
// 4. 获取子表名 + 非空校验
|
||||||
|
String subDbTableName = null;
|
||||||
|
for (FormTableBean tableBean : subTableBeanList) {
|
||||||
|
if ("租金收款明细".equals(tableBean.getDisplay())) {
|
||||||
|
subDbTableName = tableBean.getTableName();
|
||||||
|
subTableBean = tableBean;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 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);
|
||||||
|
if (subDbTableName != null) {
|
||||||
|
log.info("明细表表名为: " + subDbTableName);
|
||||||
|
subFormDataMap.put(subDbTableName, subFormDataList);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. 查询账单数据
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build().display("账单-账单明细编号").value(billNo));
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(getTableContext(), conditions,false);
|
||||||
|
// 7. 主数据非空判断
|
||||||
|
if (formColumn == null || formColumn.getFieldsMap() == null) {
|
||||||
|
throw new Exception("根据账单编号:" + billNo + "未查询到账单数据");
|
||||||
|
}
|
||||||
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
|
BigDecimal accountsReceivable = BigDecimal.ZERO;
|
||||||
|
// 初始化实际收款金额(避免null)
|
||||||
|
BigDecimal actualReceipts = BigDecimal.ZERO;
|
||||||
|
BigDecimal rate = new BigDecimal("0.994");
|
||||||
|
// 8. 组装子表数据
|
||||||
|
Map<String, Object> subTableRowData = new HashMap<>();
|
||||||
|
subTableRowData.put("账单-明细编号", fieldsMap.get("账单-账单明细编号"));
|
||||||
|
subTableRowData.put("账单-开始日期", df.format((Date)fieldsMap.get("账单-开始日期")));
|
||||||
|
subTableRowData.put("账单-结束日期", df.format((Date)fieldsMap.get("账单-结束日期")));
|
||||||
|
subTableRowData.put("账单-当期缴费期限", fieldsMap.get("账单-当前缴费时限"));
|
||||||
|
subTableRowData.put("账单-综合减免", fieldsMap.get("账单-减免金额") == null ? BigDecimal.ZERO : fieldsMap.get("账单-减免金额"));
|
||||||
|
subTableRowData.put("账单-租费递增", fieldsMap.get("账单-租费递增") == null ? BigDecimal.ZERO : fieldsMap.get("账单-租费递增"));
|
||||||
|
// 应收金额计算
|
||||||
|
BigDecimal receivable = (BigDecimal) fieldsMap.get("账单-应收租金");
|
||||||
|
if (receivable != null) {
|
||||||
|
accountsReceivable = accountsReceivable.add(receivable);
|
||||||
|
// 修复BigDecimal.setScale不生效问题
|
||||||
|
actualReceipts = accountsReceivable.multiply(rate).setScale(2, RoundingMode.HALF_UP);
|
||||||
|
}
|
||||||
|
subTableRowData.put("账单-应收租金", receivable);
|
||||||
|
subTableRowData.put("账单-未收租金", fieldsMap.get("账单-未收租金"));
|
||||||
|
subTableRowData.put("账单-本次收租金", receivable);
|
||||||
|
subTableRowData.put("账单-本次收款日期", payDate);
|
||||||
|
subTableRowData.put("账单-本次开票金额", receivable);
|
||||||
|
subTableRowData.put("账单-未开票金额", receivable);
|
||||||
|
subTableRowData.put("账单-资产编号", fieldsMap.get("资产编号"));
|
||||||
|
subTableRowData.put("账单-资产名称", fieldsMap.get("资产名称"));
|
||||||
|
FormFieldBean formFieldBean = subTableBean.getFieldBeanByDisplay("收款结果");
|
||||||
|
subTableRowData.put("账单-收款结果", EnumMapUtils.getEnumItemValueByEnumId("已结清",formFieldBean.getEnumId()));
|
||||||
|
subFormDataList.add(subTableRowData);
|
||||||
|
// 9. 获取合同信息 + 非空校验
|
||||||
|
String contractNo = (String) fieldsMap.get("合同编号");
|
||||||
|
mainData.put("合同名称", fieldsMap.get("合同名称"));
|
||||||
|
mainData.put("合同金额", fieldsMap.get("合同金额"));
|
||||||
|
mainData.put("签订单位", fieldsMap.get("签订单位"));
|
||||||
|
mainData.put("承租方类型", fieldsMap.get("承租方类型"));
|
||||||
|
mainData.put("承租方名称", fieldsMap.get("承租方"));
|
||||||
|
mainData.put("承租方编码", fieldsMap.get("承租方编号"));
|
||||||
|
mainData.put("租金_费项_文本",fieldsMap.get("账单类型"));
|
||||||
|
// 10. 经办人/部门信息(安全赋值)
|
||||||
|
String assetNo = (String) fieldsMap.get("资产编号");
|
||||||
|
Map<String, Object> assetsManagerInfo = this.assetsService.getAssetsManagerInfo(assetNo);
|
||||||
|
if (assetsManagerInfo != null && assetsManagerInfo.get("运营管理员") != null) {
|
||||||
|
String managerId = String.valueOf(assetsManagerInfo.get("运营管理员"));
|
||||||
|
try {
|
||||||
|
V3xOrgMember member = this.orgManager.getMemberById(Long.parseLong(managerId));
|
||||||
|
if (member != null) {
|
||||||
|
mainData.put("经办部门", member.getOrgDepartmentId());
|
||||||
|
mainData.put("经办单位", member.getOrgAccountId());
|
||||||
|
mainData.put("经办人员", managerId);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("获取经办人信息失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 11. 组装主表数据(线程安全日期)
|
||||||
|
TableContext receivePayFlowTableContext = FormTableExecutor.master(templateCode);
|
||||||
|
mainData.put("选择收款项", EnumMapUtils.getEnumItemValueByDisplayValue(receivePayFlowTableContext.getTableBean(), "收款项", "租金"));
|
||||||
|
mainData.put("经办日期", LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
|
mainData.put("合同编号", contractNo);
|
||||||
|
mainData.put("本次收款金额", actualReceipts);
|
||||||
|
// 12. 启动流程
|
||||||
|
this.flowCreateService.flowStart("微信小程序支付完成收款登记",
|
||||||
|
mainFormData, subFormDataMap, appName, templateCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,12 @@ public class BillVo {
|
|||||||
private String billStartDate; //账单开始日期
|
private String billStartDate; //账单开始日期
|
||||||
private String billEndDate; //账单结束日期
|
private String billEndDate; //账单结束日期
|
||||||
private String billPayEndDate; //账单支付截止日期
|
private String billPayEndDate; //账单支付截止日期
|
||||||
|
private String billPayDate; //账单支付日期
|
||||||
private String billName;// 账单名称
|
private String billName;// 账单名称
|
||||||
private String billPayTime;
|
|
||||||
private String formId;
|
private String formId;
|
||||||
|
private Integer billTermNum;//账期号
|
||||||
|
private String deposit; //押金
|
||||||
|
private String refundDate;//退款日期
|
||||||
|
|
||||||
public String getBillType() {
|
public String getBillType() {
|
||||||
return billType;
|
return billType;
|
||||||
@@ -86,14 +89,6 @@ public class BillVo {
|
|||||||
this.formId = formId;
|
this.formId = formId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getBillPayTime() {
|
|
||||||
return billPayTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBillPayTime(String billPayTime) {
|
|
||||||
this.billPayTime = billPayTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBillStartDate() {
|
public String getBillStartDate() {
|
||||||
return billStartDate;
|
return billStartDate;
|
||||||
}
|
}
|
||||||
@@ -109,4 +104,36 @@ public class BillVo {
|
|||||||
public void setBillPayEndDate(String billPayEndDate) {
|
public void setBillPayEndDate(String billPayEndDate) {
|
||||||
this.billPayEndDate = billPayEndDate;
|
this.billPayEndDate = billPayEndDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getBillTermNum() {
|
||||||
|
return billTermNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBillTermNum(Integer billTermNum) {
|
||||||
|
this.billTermNum = billTermNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeposit() {
|
||||||
|
return deposit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeposit(String deposit) {
|
||||||
|
this.deposit = deposit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBillPayDate() {
|
||||||
|
return billPayDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBillPayDate(String billPayDate) {
|
||||||
|
this.billPayDate = billPayDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRefundDate() {
|
||||||
|
return refundDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRefundDate(String refundDate) {
|
||||||
|
this.refundDate = refundDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.seeyon.apps.assetstenant.bill;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
||||||
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;
|
||||||
@@ -21,7 +21,7 @@ public class FeeRecordService {
|
|||||||
private WaeBillService waeBillService = (WaeBillService) AppContext.getBean("waeBillService");
|
private WaeBillService waeBillService = (WaeBillService) AppContext.getBean("waeBillService");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.FEERECORDFORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.FEERECORDFORMNO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
||||||
@@ -43,30 +43,18 @@ public class FeeRecordService {
|
|||||||
if(StringUtils.isNotBlank(params.getString("cusNo"))) {
|
if(StringUtils.isNotBlank(params.getString("cusNo"))) {
|
||||||
conditions.add(FormWhereCondition.build().display("客商编号").value(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("contractNo"))) {
|
|
||||||
conditions.add(FormWhereCondition.build().display("合同编号").value(params.getString("contractNo")));
|
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(params.getString("leType"))) {
|
if(StringUtils.isNotBlank(params.getString("leType"))) {
|
||||||
conditions.add(FormWhereCondition.build().display("收支类型").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "收支类型", params.getString("leType"))));
|
conditions.add(FormWhereCondition.build().display("收支类型").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "收支类型", params.getString("leType"))));
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(params.getString("year"))) {
|
|
||||||
conditions.add(FormWhereCondition.build()
|
|
||||||
.display("收付款日期")
|
|
||||||
.startWithBracket(true)
|
|
||||||
.clauseFactor(ClauseFactor.GE)
|
|
||||||
.value(params.getString("year") + "-01-01"));
|
|
||||||
conditions.add(FormWhereCondition.build()
|
|
||||||
.display("收付款日期")
|
|
||||||
.endWithBracket(true)
|
|
||||||
.clauseFactor(ClauseFactor.LE)
|
|
||||||
.value(params.getString("year") + "-12-31"));
|
|
||||||
}
|
|
||||||
return conditions;
|
return conditions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer countAll(JSONObject params) throws Exception {
|
||||||
|
TableContext tableContext = getTableContext();
|
||||||
|
List<FormWhereCondition> conditions = buildConditions(params);
|
||||||
|
Long count = FormTableExecutor.count(tableContext, null, conditions);
|
||||||
|
return count.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
public PageQueryVo queryBillPayRecord(JSONObject params) throws Exception {
|
public PageQueryVo queryBillPayRecord(JSONObject params) throws Exception {
|
||||||
TableContext tableContext = getTableContext();
|
TableContext tableContext = getTableContext();
|
||||||
@@ -77,9 +65,9 @@ public class FeeRecordService {
|
|||||||
List<FormColumn> datas = FormTableExecutor.pageQuery(tableContext, null,conditions, pageNo, pageSize,true);
|
List<FormColumn> datas = FormTableExecutor.pageQuery(tableContext, null,conditions, pageNo, pageSize,true);
|
||||||
List<PayRecordVo> payRecordVos = new ArrayList<>();
|
List<PayRecordVo> payRecordVos = new ArrayList<>();
|
||||||
Long count = FormTableExecutor.count(tableContext, null,conditions);
|
Long count = FormTableExecutor.count(tableContext, null,conditions);
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
PayRecordVo payRecordVo = new PayRecordVo();
|
PayRecordVo payRecordVo = new PayRecordVo();
|
||||||
Map<String,Object> fieldsMap = (Map<String, Object>) data;
|
Map<String, Object>fieldsMap = data.getFieldsMap();
|
||||||
fillVo(fieldsMap,payRecordVo);
|
fillVo(fieldsMap,payRecordVo);
|
||||||
payRecordVos.add(payRecordVo);
|
payRecordVos.add(payRecordVo);
|
||||||
}
|
}
|
||||||
@@ -104,4 +92,15 @@ public class FeeRecordService {
|
|||||||
payRecordVo.setItemName(getStringValue(fieldsMap,"费用类型"));
|
payRecordVo.setItemName(getStringValue(fieldsMap,"费用类型"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void payCallBack(String billNo, String bizType, String payDate) throws Exception {
|
||||||
|
if("rent".equals(bizType)) {
|
||||||
|
billService.payCallBack(billNo,payDate);
|
||||||
|
}else if("wae".equals(bizType)){
|
||||||
|
// waeBillService.payCallBack(billNo,payDate);
|
||||||
|
}else if("margin".equals(bizType)){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ package com.seeyon.apps.assetstenant.bill;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
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.AppContext;
|
||||||
import com.seeyon.ctp.common.exceptions.BusinessException;
|
import com.seeyon.ctp.common.exceptions.BusinessException;
|
||||||
import com.seeyon.utils.form.*;
|
import com.seeyon.utils.form.*;
|
||||||
@@ -21,7 +22,7 @@ public class WaeBillService {
|
|||||||
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.WAEBILLFORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.WAEBILLFORMNO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
||||||
@@ -66,8 +67,8 @@ public class WaeBillService {
|
|||||||
List<BillVo> vos = new ArrayList<>();
|
List<BillVo> vos = new ArrayList<>();
|
||||||
Long count = FormTableExecutor.count(tableContext,null, conditions);
|
Long count = FormTableExecutor.count(tableContext,null, conditions);
|
||||||
if(datas.size() > 0){
|
if(datas.size() > 0){
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
Map<String,Object> map = (Map<String, Object>) data;
|
Map<String,Object> map = data.getFieldsMap();
|
||||||
BillVo billVo = new BillVo();
|
BillVo billVo = new BillVo();
|
||||||
fillVo(map, billVo);
|
fillVo(map, billVo);
|
||||||
vos.add(billVo);
|
vos.add(billVo);
|
||||||
@@ -114,4 +115,14 @@ public class WaeBillService {
|
|||||||
billVo.setBillAmount((powerFee.add(waterFee)).toString());
|
billVo.setBillAmount((powerFee.add(waterFee)).toString());
|
||||||
billVo.setBillName("水电费");
|
billVo.setBillName("水电费");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void payCallBack(String billNo, String payDate) throws BusinessException {
|
||||||
|
TableContext tableContext = getTableContext();
|
||||||
|
FormTableBean tableBean = tableContext.getTableBean();
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build().display("档案编号").value(billNo));
|
||||||
|
List<FormUpdateField> updateFields = new ArrayList<>();
|
||||||
|
updateFields.add(FormUpdateField.build().display("缴费状态").value(EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"缴费状态","结清")));
|
||||||
|
FormTableExecutor.update(tableContext,updateFields,conditions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,16 @@ public class CommunitityVo {
|
|||||||
private String referenceAvgPrice;//参考均价
|
private String referenceAvgPrice;//参考均价
|
||||||
private OaFileVo coverImg;//封面图
|
private OaFileVo coverImg;//封面图
|
||||||
private String communityName;//楼盘名称
|
private String communityName;//楼盘名称
|
||||||
|
private String greenRate;//绿化率
|
||||||
|
private String address;//地址
|
||||||
|
private String completeDate;//竣工时间
|
||||||
|
private String transactionOwnership;//交易权属
|
||||||
|
private String propertyType;//物业类型
|
||||||
|
private String lng;//经度
|
||||||
|
private String lat;//纬度
|
||||||
|
private String contactPhone;//联系电话
|
||||||
|
private String communityNo;//楼盘编号
|
||||||
|
private String communityDesc;//楼盘描述
|
||||||
|
|
||||||
public String getReferenceTotalPrice() {
|
public String getReferenceTotalPrice() {
|
||||||
return referenceTotalPrice;
|
return referenceTotalPrice;
|
||||||
@@ -66,4 +76,84 @@ public class CommunitityVo {
|
|||||||
public void setCommunityName(String communityName) {
|
public void setCommunityName(String communityName) {
|
||||||
this.communityName = communityName;
|
this.communityName = communityName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGreenRate() {
|
||||||
|
return greenRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGreenRate(String greenRate) {
|
||||||
|
this.greenRate = greenRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress() {
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompleteDate() {
|
||||||
|
return completeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompleteDate(String completeDate) {
|
||||||
|
this.completeDate = completeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransactionOwnership() {
|
||||||
|
return transactionOwnership;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactionOwnership(String transactionOwnership) {
|
||||||
|
this.transactionOwnership = transactionOwnership;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPropertyType() {
|
||||||
|
return propertyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPropertyType(String propertyType) {
|
||||||
|
this.propertyType = propertyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLng() {
|
||||||
|
return lng;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLng(String lng) {
|
||||||
|
this.lng = lng;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLat() {
|
||||||
|
return lat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLat(String lat) {
|
||||||
|
this.lat = lat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContactPhone() {
|
||||||
|
return contactPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContactPhone(String contactPhone) {
|
||||||
|
this.contactPhone = contactPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCommunityNo() {
|
||||||
|
return communityNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommunityNo(String communityNo) {
|
||||||
|
this.communityNo = communityNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCommunityDesc() {
|
||||||
|
return communityDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommunityDesc(String communityDesc) {
|
||||||
|
this.communityDesc = communityDesc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.seeyon.apps.assetstenant.community;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class CommunityLayoutAggVo {
|
||||||
|
private Integer totalCount; // 总户型数
|
||||||
|
private Map<String, Integer> layoutTypeCount; // 户型类型统计(key: 三室/四室)
|
||||||
|
private Map<String, Integer> buildingLayoutCount; // 按楼栋统计户型
|
||||||
|
private String avgPrice; // 平均参考均价
|
||||||
|
private List<CommunityLayoutVo> layoutList; // 原始户型列表
|
||||||
|
|
||||||
|
public Integer getTotalCount() {
|
||||||
|
return totalCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalCount(Integer totalCount) {
|
||||||
|
this.totalCount = totalCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Integer> getLayoutTypeCount() {
|
||||||
|
return layoutTypeCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLayoutTypeCount(Map<String, Integer> layoutTypeCount) {
|
||||||
|
this.layoutTypeCount = layoutTypeCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Integer> getBuildingLayoutCount() {
|
||||||
|
return buildingLayoutCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuildingLayoutCount(Map<String, Integer> buildingLayoutCount) {
|
||||||
|
this.buildingLayoutCount = buildingLayoutCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAvgPrice() {
|
||||||
|
return avgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvgPrice(String avgPrice) {
|
||||||
|
this.avgPrice = avgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CommunityLayoutVo> getLayoutList() {
|
||||||
|
return layoutList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLayoutList(List<CommunityLayoutVo> layoutList) {
|
||||||
|
this.layoutList = layoutList;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,107 @@
|
|||||||
package com.seeyon.apps.assetstenant.community;
|
package com.seeyon.apps.assetstenant.community;
|
||||||
|
|
||||||
|
|
||||||
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
|
|
||||||
public class CommunityLayoutVo {
|
public class CommunityLayoutVo {
|
||||||
|
|
||||||
|
private String completeTime; // 明细-竣工时间
|
||||||
|
private String saleStatus; // 明细-售卖状态
|
||||||
|
private String buildType; // 明细-建筑类型
|
||||||
|
private String decoration; // 明细-装修标准
|
||||||
|
private String saleBuilding; // 明细-售卖楼栋
|
||||||
|
private String saleLayout; // 明细-售卖户型
|
||||||
|
private String openTime; // 明细-开盘时间
|
||||||
|
private String deliveryTime; // 明细-交房时间
|
||||||
|
private String avgPrice; // 明细-参考均价
|
||||||
|
private OaFileVo img; //户型图
|
||||||
|
private String communityNo; //小区编号
|
||||||
|
|
||||||
|
public String getCompleteTime() {
|
||||||
|
return completeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompleteTime(String completeTime) {
|
||||||
|
this.completeTime = completeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSaleStatus() {
|
||||||
|
return saleStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSaleStatus(String saleStatus) {
|
||||||
|
this.saleStatus = saleStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBuildType() {
|
||||||
|
return buildType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuildType(String buildType) {
|
||||||
|
this.buildType = buildType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDecoration() {
|
||||||
|
return decoration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDecoration(String decoration) {
|
||||||
|
this.decoration = decoration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSaleBuilding() {
|
||||||
|
return saleBuilding;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSaleBuilding(String saleBuilding) {
|
||||||
|
this.saleBuilding = saleBuilding;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSaleLayout() {
|
||||||
|
return saleLayout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSaleLayout(String saleLayout) {
|
||||||
|
this.saleLayout = saleLayout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOpenTime() {
|
||||||
|
return openTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenTime(String openTime) {
|
||||||
|
this.openTime = openTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeliveryTime() {
|
||||||
|
return deliveryTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeliveryTime(String deliveryTime) {
|
||||||
|
this.deliveryTime = deliveryTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAvgPrice() {
|
||||||
|
return avgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvgPrice(String avgPrice) {
|
||||||
|
this.avgPrice = avgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OaFileVo getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(OaFileVo img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCommunityNo() {
|
||||||
|
return communityNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommunityNo(String communityNo) {
|
||||||
|
this.communityNo = communityNo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,13 @@ package com.seeyon.apps.assetstenant.community;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
||||||
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.common.filemanager.manager.AttachmentManager;
|
import com.seeyon.ctp.common.filemanager.manager.AttachmentManager;
|
||||||
import com.seeyon.ctp.organization.bo.V3xOrgMember;
|
|
||||||
import com.seeyon.utils.form.*;
|
import com.seeyon.utils.form.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
@@ -24,7 +23,7 @@ public class CommunityService {
|
|||||||
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.ASSETS_FORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.COMMUNITYFORMNO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PageQueryVo pageQuery(JSONObject params) throws Exception {
|
public PageQueryVo pageQuery(JSONObject params) throws Exception {
|
||||||
@@ -38,10 +37,11 @@ public class CommunityService {
|
|||||||
List<CommunitityVo> vos = new ArrayList<>();
|
List<CommunitityVo> vos = new ArrayList<>();
|
||||||
Long count = FormTableExecutor.count(master,null, conditions);
|
Long count = FormTableExecutor.count(master,null, conditions);
|
||||||
if(datas.size() > 0){
|
if(datas.size() > 0){
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
Map<String,Object> map = (Map<String, Object>) data;
|
Map<String, Object> map = data.getFieldsMap();
|
||||||
CommunitityVo communitityVo = new CommunitityVo();
|
CommunitityVo communitityVo = new CommunitityVo();
|
||||||
fillVo(map, communitityVo);
|
fillPageQueryVo(map, communitityVo);
|
||||||
|
communitityVo.setCommunityId(data.getId());
|
||||||
vos.add(communitityVo);
|
vos.add(communitityVo);
|
||||||
}
|
}
|
||||||
pageQueryVo.setDatas(vos);
|
pageQueryVo.setDatas(vos);
|
||||||
@@ -60,64 +60,21 @@ public class CommunityService {
|
|||||||
return tableContext;
|
return tableContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ====================== 填充楼栋VO(严格匹配UI字段) ======================
|
private List<FormWhereCondition> buildConditions(JSONObject params, FormTableBean formTableBean) throws BusinessException {
|
||||||
private void fillBuildingVo(Map<String, Object> map, CommunityBuildingVo vo) {
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
vo.setSort(getStringValue(map, "序号1"));
|
if(StringUtils.isNotBlank(params.getString("communityId"))){
|
||||||
vo.setOpenTime(getStringValue(map, "明细-开盘时间"));
|
conditions.add(FormWhereCondition.build().display("ID").value(params.getString("communityId")));
|
||||||
// 注意:如果数据库没有直接的"层数/单元数/在售户数/户梯比"字段,需要从表单字段映射
|
}
|
||||||
// 假设表单字段如下:
|
return conditions;
|
||||||
// vo.setLayers(getStringValue(map, "层数"));
|
|
||||||
// vo.setUnitCount(getInteger(map, "单元数"));
|
|
||||||
// vo.setSaleHouseCount(getInteger(map, "在售户数"));
|
|
||||||
// vo.setBuildType(getStr(map, "明细-建筑类型"));
|
|
||||||
// vo.setLiftRatio(getStr(map, "户梯比"));
|
|
||||||
// vo.setAvgPrice(getBigDecimal(map, "明细-参考均价"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<FormWhereCondition> buildConditions(JSONObject params, FormTableBean formTableBean) throws BusinessException {
|
private List<FormWhereCondition> buildSubTableQueryConditions(JSONObject params, FormTableBean formTableBean) throws BusinessException {
|
||||||
List<FormWhereCondition> conditions = new ArrayList<>();
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
if(StringUtils.isNotBlank(params.getString("communityId"))){
|
if(StringUtils.isNotBlank(params.getString("communityId"))){
|
||||||
conditions.add(FormWhereCondition.build().display("formmain_id").value(params.getString("communityId")));
|
conditions.add(FormWhereCondition.build().display("formmain_id").value(params.getString("communityId")));
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(params.getString("assetsStatus"))) {
|
if(StringUtils.isNotBlank(params.getString("buildingNo"))) {
|
||||||
conditions.add(FormWhereCondition.build().display("资产状态").value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"资产状态",params.getString("assetsStatus"))));
|
conditions.add(FormWhereCondition.build().display("明细-售卖楼栋").value(params.getString("buildingNo")));
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(params.getString("manageType"))) {
|
|
||||||
conditions.add(FormWhereCondition.build().display("运营类型")
|
|
||||||
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"运营类型",params.getString("manageType"))));
|
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(params.getString("bizZone"))) {
|
|
||||||
conditions.add(FormWhereCondition.build().display("商圈位置")
|
|
||||||
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"商圈位置",params.getString("bizZone"))));
|
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(params.getString("renovationStatus"))) {
|
|
||||||
conditions.add(FormWhereCondition.build().display("装修情况")
|
|
||||||
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"装修情况",params.getString("renovationStatus"))));
|
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(params.getString("layout"))) {
|
|
||||||
conditions.add(FormWhereCondition.build().display("房屋户型")
|
|
||||||
.value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"房屋户型",params.getString("layout"))));
|
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(params.getString("rentFeeRange"))) {
|
|
||||||
String[] split = params.getString("rentFeeRange").split("-");
|
|
||||||
String rentFeeStart = null;
|
|
||||||
if(split.length > 1) {
|
|
||||||
rentFeeStart = split[0];
|
|
||||||
}
|
|
||||||
String rentFeeEnd = split[split.length - 1];
|
|
||||||
if(rentFeeStart != null) {
|
|
||||||
conditions.add(FormWhereCondition.build().display("评估-参考租金").clauseFactor(ClauseFactor.GE)
|
|
||||||
.value(new BigDecimal(rentFeeStart)));
|
|
||||||
}
|
|
||||||
conditions.add(FormWhereCondition.build().display("评估-参考租金").clauseFactor(ClauseFactor.LE)
|
|
||||||
.value(new BigDecimal(rentFeeEnd)));
|
|
||||||
}
|
|
||||||
if(StringUtils.isNotBlank(params.getString("features"))){
|
|
||||||
String[] features = params.getString("features").split(",");
|
|
||||||
for (Object feature : features) {
|
|
||||||
conditions.add(FormWhereCondition.build().display("基础配套").value(EnumMapUtils.getEnumItemValueByDisplayValue(formTableBean,"基础配套",feature + ""))
|
|
||||||
.index("FIND_IN_SET(?").clauseFactor(ClauseFactor.GT));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return conditions;
|
return conditions;
|
||||||
}
|
}
|
||||||
@@ -133,13 +90,14 @@ public class CommunityService {
|
|||||||
return communitityVo;
|
return communitityVo;
|
||||||
}
|
}
|
||||||
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
fillVo(fieldsMap,communitityVo);
|
fillDetailVo(fieldsMap,communitityVo);
|
||||||
|
communitityVo.setCommunityId(formColumn.getId());
|
||||||
return communitityVo;
|
return communitityVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<CommunityBuildingVo> queryBuildingList(JSONObject params) throws Exception {
|
public List<CommunityBuildingVo> queryBuildingList(JSONObject params) throws Exception {
|
||||||
TableContext tableContext = getSubTableContext();
|
TableContext tableContext = getSubTableContext();
|
||||||
List<FormWhereCondition> conditions = buildConditions(params,tableContext.getTableBean());
|
List<FormWhereCondition> conditions = buildSubTableQueryConditions(params,tableContext.getTableBean());
|
||||||
List<FormColumn> formColumns = FormTableExecutor.query(tableContext, null, conditions, true);
|
List<FormColumn> formColumns = FormTableExecutor.query(tableContext, null, conditions, true);
|
||||||
if(formColumns.size() == 0) {
|
if(formColumns.size() == 0) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
@@ -154,8 +112,9 @@ public class CommunityService {
|
|||||||
communityBuildingVo.setBuildingNo(buildingNo);
|
communityBuildingVo.setBuildingNo(buildingNo);
|
||||||
communityBuildingVo.setBuildType(getStringValue(fieldsMap,"明细-建筑类型"));
|
communityBuildingVo.setBuildType(getStringValue(fieldsMap,"明细-建筑类型"));
|
||||||
communityBuildingVo.setOpenTime(getStringValue(fieldsMap,"明细-开盘时间"));
|
communityBuildingVo.setOpenTime(getStringValue(fieldsMap,"明细-开盘时间"));
|
||||||
communityBuildingVo.setUnitNo(buildingNo);
|
communityBuildingVo.setUnitNo(getStringValue(fieldsMap,"明细-所属单元"));
|
||||||
communityBuildingVo.setSaleHouseCount(1);
|
communityBuildingVo.setSaleHouseCount(1);
|
||||||
|
buildingVoMap.put(buildingNo, communityBuildingVo);
|
||||||
}else {
|
}else {
|
||||||
CommunityBuildingVo buildingVo = buildingVoMap.get(buildingNo);
|
CommunityBuildingVo buildingVo = buildingVoMap.get(buildingNo);
|
||||||
buildingVo.setSaleHouseCount(buildingVo.getSaleHouseCount() + 1);
|
buildingVo.setSaleHouseCount(buildingVo.getSaleHouseCount() + 1);
|
||||||
@@ -165,12 +124,92 @@ public class CommunityService {
|
|||||||
return buildingVos;
|
return buildingVos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<CommunityLayoutVo> queryLayoutList(JSONObject params) throws Exception {
|
// ====================== 从子表获取户型列表 + 聚合统计 ======================
|
||||||
TableContext tableContext = getSubTableContext();
|
public CommunityLayoutAggVo getLayoutListWithAgg(JSONObject params) throws Exception {
|
||||||
List<FormWhereCondition> conditions = buildConditions(params,tableContext.getTableBean());
|
TableContext sub = FormTableExecutor.sub(getFormNo(), "楼盘明细");
|
||||||
List<FormColumn> formColumns = FormTableExecutor.query(tableContext, null, conditions, true);
|
List<FormWhereCondition> conditions = buildSubTableQueryConditions(params, sub.getTableBean());
|
||||||
|
List<FormColumn> columnList = FormTableExecutor.query(sub, null, conditions, true);
|
||||||
|
List<CommunityLayoutVo> voList = new ArrayList<>();
|
||||||
|
Map<String, Integer> layoutTypeCount = new HashMap<>();
|
||||||
|
Map<String, Integer> buildingLayoutCount = new HashMap<>();
|
||||||
|
BigDecimal totalPrice = BigDecimal.ZERO;
|
||||||
|
int priceCount = 0;
|
||||||
|
for (FormColumn column : columnList) {
|
||||||
|
Map<String, Object> map = column.getFieldsMap();
|
||||||
|
CommunityLayoutVo vo = new CommunityLayoutVo();
|
||||||
|
fillLayoutVo(map, vo);
|
||||||
|
voList.add(vo);
|
||||||
|
|
||||||
|
// 1. 户型类型统计(从枚举值映射为名称,再提取类型)
|
||||||
|
String layoutType = extractLayoutType(vo.getSaleLayout());
|
||||||
|
layoutTypeCount.merge(layoutType, 1, Integer::sum);
|
||||||
|
// 2. 按楼栋统计户型
|
||||||
|
buildingLayoutCount.merge(vo.getSaleBuilding(), 1, Integer::sum);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CommunityLayoutAggVo agg = new CommunityLayoutAggVo();
|
||||||
|
agg.setLayoutList(voList);
|
||||||
|
agg.setTotalCount(voList.size());
|
||||||
|
agg.setLayoutTypeCount(layoutTypeCount);
|
||||||
|
agg.setBuildingLayoutCount(buildingLayoutCount);
|
||||||
|
return agg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CommunityLayoutVo> getLayoutList(JSONObject params) throws BusinessException {
|
||||||
|
TableContext sub = FormTableExecutor.sub(getFormNo(), "楼盘明细");
|
||||||
|
TableContext master = FormTableExecutor.master(getFormNo());
|
||||||
|
List<FormWhereCondition> masterTableQueryConditions = buildConditions(params, master.getTableBean());
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(master, masterTableQueryConditions, true);
|
||||||
|
if(formColumn == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
String communityNo = (String)formColumn.getFieldsMap().get("台账编号");
|
||||||
|
List<FormWhereCondition> conditions = buildSubTableQueryConditions(params, sub.getTableBean());
|
||||||
|
List<FormColumn> columnList = FormTableExecutor.query(sub, null, conditions, true);
|
||||||
|
List<CommunityLayoutVo> voList = new ArrayList<>();
|
||||||
|
Map<String,CommunityLayoutVo> voMap = new HashMap<>();
|
||||||
|
for (FormColumn column : columnList) {
|
||||||
|
Map<String, Object> map = column.getFieldsMap();
|
||||||
|
if(!voMap.containsKey(map.get("户型"))) {
|
||||||
|
CommunityLayoutVo vo = new CommunityLayoutVo();
|
||||||
|
vo.setSaleStatus(getStringValue(map, "明细-售卖状态"));
|
||||||
|
vo.setSaleBuilding(getStringValue(map, "明细-售卖楼栋"));
|
||||||
|
vo.setSaleLayout(getStringValue(map, "明细-售卖户型"));
|
||||||
|
vo.setCommunityNo(communityNo);
|
||||||
|
if(map.get("户型图片") != null) {
|
||||||
|
vo.setImg(OaFileVo.getInstance(map.get("户型图片"),attachmentManager));
|
||||||
|
}
|
||||||
|
voMap.put((String)map.get("户型"),vo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
voList.addAll(voMap.values());
|
||||||
|
return voList;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====================== 填充户型VO(严格映射子表字段) ======================
|
||||||
|
private void fillLayoutVo(Map<String, Object> map, CommunityLayoutVo vo) throws BusinessException {
|
||||||
|
vo.setCompleteTime(getStringValue(map, "明细-竣工时间"));
|
||||||
|
vo.setSaleStatus(getStringValue(map, "明细-售卖状态"));
|
||||||
|
vo.setBuildType(getStringValue(map, "明细-建筑类型"));
|
||||||
|
vo.setDecoration(getStringValue(map, "明细-装修标准"));
|
||||||
|
vo.setSaleBuilding(getStringValue(map, "明细-售卖楼栋"));
|
||||||
|
vo.setSaleLayout(getStringValue(map, "明细-售卖户型"));
|
||||||
|
vo.setOpenTime(getStringValue(map, "明细-开盘时间"));
|
||||||
|
vo.setDeliveryTime(getStringValue(map, "明细-交房时间"));
|
||||||
|
vo.setAvgPrice(getStringValue(map, "明细-参考均价"));
|
||||||
|
// 若面积/总价需从其他表获取,在此补充逻辑
|
||||||
|
// vo.setArea(getBigDecimal(map, "户型面积"));
|
||||||
|
// vo.setTotalPrice(vo.getAvgPrice().multiply(vo.getArea()).setScale(2, RoundingMode.HALF_UP));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====================== 辅助方法:提取户型类型(如"三室两厅两卫" → "三室") ======================
|
||||||
|
private String extractLayoutType(String saleLayoutName) {
|
||||||
|
if (StringUtils.isBlank(saleLayoutName)) return "其他";
|
||||||
|
if (saleLayoutName.contains("三室")) return "三室";
|
||||||
|
if (saleLayoutName.contains("四室")) return "四室";
|
||||||
|
return "其他";
|
||||||
|
}
|
||||||
|
|
||||||
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);
|
||||||
@@ -180,18 +219,53 @@ public class CommunityService {
|
|||||||
return o + "";
|
return o + "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fillVo(Map<String, Object> fieldsMap,CommunitityVo communitityVo) throws BusinessException {
|
public void fillPageQueryVo(Map<String, Object> fieldsMap,CommunitityVo communitityVo) throws BusinessException {
|
||||||
communitityVo.setCommunityId(getStringValue(fieldsMap,"资产编号")); //楼盘id
|
communitityVo.setCommunityName(getStringValue(fieldsMap,"楼盘名称")); //楼盘名称
|
||||||
communitityVo.setCommunityName(getStringValue(fieldsMap,"品牌名称")); //楼盘名称
|
communitityVo.setRenovation(getStringValue(fieldsMap,"装修标准")); //装修情况
|
||||||
communitityVo.setFeatures(getStringValue(fieldsMap,"详情信息")); //楼盘特点
|
communitityVo.setReferenceAvgPrice(getStringValue(fieldsMap,"参考均价")); //楼盘参考均价
|
||||||
communitityVo.setRenovation(getStringValue(fieldsMap,"id")); //装修情况
|
communitityVo.setReferenceTotalPrice(getStringValue(fieldsMap,"参考总价"));//楼盘参考总价
|
||||||
communitityVo.setReferenceAvgPrice(getStringValue(fieldsMap,"资产状态")); //楼盘参考均价
|
communitityVo.setCommunityNo(getStringValue(fieldsMap,"台账编号"));
|
||||||
communitityVo.setReferenceTotalPrice(getStringValue(fieldsMap,"资产类型"));//楼盘参考总价
|
String lnglat = getStringValue(fieldsMap,"坐落经纬度");
|
||||||
V3xOrgMember member = null;
|
if(StringUtils.isNotBlank(lnglat)) {
|
||||||
BigDecimal area = (BigDecimal)fieldsMap.get("评估-评估面积");
|
// 统一替换逗号为分号,然后分割,兼容 ; 和 , 两种格式
|
||||||
BigDecimal rentFee = (BigDecimal)fieldsMap.get("评估-参考租金");
|
String[] lnglatArr = lnglat.replace(",", ";").split(";");
|
||||||
if(fieldsMap.get("VR文件上传") != null) {
|
// 增加数组长度判断,防止越界异常
|
||||||
communitityVo.setCoverImg(OaFileVo.getInstance((Long)fieldsMap.get("VR文件上传"),attachmentManager));
|
if (lnglatArr.length >= 2) {
|
||||||
|
communitityVo.setLng(lnglatArr[0].trim()); // trim() 去除多余空格
|
||||||
|
communitityVo.setLat(lnglatArr[1].trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(fieldsMap.get("小区图片") != null) {
|
||||||
|
communitityVo.setCoverImg(OaFileVo.getInstance(fieldsMap.get("小区图片"),attachmentManager));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fillDetailVo(Map<String, Object> fieldsMap,CommunitityVo communitityVo) throws BusinessException {
|
||||||
|
communitityVo.setCommunityName(getStringValue(fieldsMap,"楼盘名称")); //楼盘名称
|
||||||
|
communitityVo.setRenovation(getStringValue(fieldsMap,"装修标准")); //装修情况
|
||||||
|
communitityVo.setFeatures(getStringValue(fieldsMap,"楼盘特色"));//楼盘特点
|
||||||
|
communitityVo.setGreenRate(getStringValue(fieldsMap,"绿化率"));//绿化率
|
||||||
|
communitityVo.setContactPhone(getStringValue(fieldsMap,"联系电话")); //联系电话
|
||||||
|
communitityVo.setReferenceAvgPrice(getStringValue(fieldsMap,"参考均价")); //楼盘参考均价
|
||||||
|
communitityVo.setReferenceTotalPrice(getStringValue(fieldsMap,"参考总价"));//楼盘参考总价
|
||||||
|
communitityVo.setAddress(getStringValue(fieldsMap,"楼盘地址")); //地址
|
||||||
|
communitityVo.setCompleteDate(getStringValue(fieldsMap,"竣工时间")); //竣工时间
|
||||||
|
communitityVo.setTransactionOwnership(getStringValue(fieldsMap,"交易权属")); //交易权属
|
||||||
|
communitityVo.setPropertyType(getStringValue(fieldsMap,"物业类型")); //物业类型
|
||||||
|
communitityVo.setCommunityNo(getStringValue(fieldsMap,"台账编号")); //楼盘编号
|
||||||
|
communitityVo.setCommunityDesc(getStringValue(fieldsMap,"小区详情")); //楼盘描述
|
||||||
|
String lnglat = getStringValue(fieldsMap,"坐落经纬度");
|
||||||
|
if(StringUtils.isNotBlank(lnglat)) {
|
||||||
|
// 统一替换逗号为分号,然后分割,兼容 ; 和 , 两种格式
|
||||||
|
String[] lnglatArr = lnglat.replace(",", ";").split(";");
|
||||||
|
// 增加数组长度判断,防止越界异常
|
||||||
|
if (lnglatArr.length >= 2) {
|
||||||
|
communitityVo.setLng(lnglatArr[0].trim()); // trim() 去除多余空格
|
||||||
|
communitityVo.setLat(lnglatArr[1].trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(fieldsMap.get("小区图片") != null) {
|
||||||
|
communitityVo.setCoverImg(OaFileVo.getInstance(fieldsMap.get("小区图片"),attachmentManager));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
package com.seeyon.apps.assetstenant.config;
|
package com.seeyon.apps.assetstenant.config;
|
||||||
|
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.common.config.ICstConfigApi;
|
import com.seeyon.apps.common.config.ICstConfigApi;
|
||||||
import com.seeyon.apps.common.plugin.vo.ConfigVo;
|
import com.seeyon.apps.common.plugin.vo.ConfigVo;
|
||||||
import com.seeyon.ctp.common.AppContext;
|
import com.seeyon.ctp.common.AppContext;
|
||||||
|
|
||||||
import static com.seeyon.apps.assetstenant.constants.RentConstants.getPluginId;
|
import static com.seeyon.apps.assetstenant.constants.AssetsTenantConstants.getPluginId;
|
||||||
|
|
||||||
public class AssetsTenantConfigProvider {
|
public class AssetsTenantConfigProvider {
|
||||||
|
|
||||||
protected ICstConfigApi cstConfigApi = (ICstConfigApi) AppContext.getBean("cstConfigApi");
|
protected ICstConfigApi cstConfigApi = (ICstConfigApi) AppContext.getBean("cstConfigApi");
|
||||||
|
|
||||||
public String getBizConfigByKey(RentConstants key) {
|
public String getBizConfigByKey(AssetsTenantConstants key) {
|
||||||
ConfigVo config = cstConfigApi.getConfig(getPluginId());
|
ConfigVo config = cstConfigApi.getConfig(getPluginId());
|
||||||
return config.getParamVal(key.name());
|
return config.getParamVal(key.name());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package com.seeyon.apps.assetstenant.constants;
|
package com.seeyon.apps.assetstenant.constants;
|
||||||
|
|
||||||
public enum RentConstants {
|
public enum AssetsTenantConstants {
|
||||||
|
|
||||||
plugin("assetstenant","插件ID"),
|
plugin("assetstenant","插件ID"),
|
||||||
OA_HOST("",""),
|
OA_HOST("",""),
|
||||||
FORMEDITLOGINNAME("","表单修改登录名"),
|
FORMEDITLOGINNAME("","表单修改登录名"),
|
||||||
updateAccountName("表单",""),
|
updateAccountName("表单","OA组织名称"),
|
||||||
restName("",""),
|
restName("",""),
|
||||||
restPwd("",""),
|
restPwd("",""),
|
||||||
formLoginName("2019","表单数据录入登录名"),
|
formLoginName("2019","表单数据录入登录名"),
|
||||||
ASSETS_FORMNO("","资产运营档案编码"),
|
ASSETS_FORMNO("","资产运营档案编码"),
|
||||||
CONTRACT_FORMNO("","租赁合同表单编码"),
|
CONTRACT_FORMNO("","租赁合同表单编码"),
|
||||||
DISCHARGE_TEMPLATECODE("","退租申请模板编码"),
|
DISCHARGE_TEMPLATECODE("","退租申请模板编码"),
|
||||||
DISCHARGE_FORMNO("","退租申请表单编码"),
|
|
||||||
FALLBACK_FORMNO("","留言板表单编码"),
|
FALLBACK_FORMNO("","留言板表单编码"),
|
||||||
RESERVE_FORMNO("","看房预约表单编码"),
|
RESERVE_FORMNO("","看房预约表单编码"),
|
||||||
VIEWRECORD_FORMNO("","浏览记录表单编码"),
|
VIEWRECORD_FORMNO("","浏览记录表单编码"),
|
||||||
@@ -23,9 +22,12 @@ public enum RentConstants {
|
|||||||
CUSDOCFORMNO("","客商档案表单编码"),
|
CUSDOCFORMNO("","客商档案表单编码"),
|
||||||
NOTICEFORMNO("","招商公告表单编码"),
|
NOTICEFORMNO("","招商公告表单编码"),
|
||||||
WECHATBACKENDHOST("","微信小程序后端host"),
|
WECHATBACKENDHOST("","微信小程序后端host"),
|
||||||
WEAPPCONFIGFORMNO("","小程序配置表")
|
WEAPPCONFIGFORMNO("","小程序配置表"),
|
||||||
|
COMMUNITYFORMNO("","楼盘表单编码"),
|
||||||
|
BILLCREATEFORMNO("","租赁账单生成台账表单编码"),
|
||||||
|
PAYMENT_REGISTRATION_TEMPLATECODE("","收款登记模板编码"),
|
||||||
;
|
;
|
||||||
RentConstants(String defaultValue, String description) {
|
AssetsTenantConstants(String defaultValue, String description) {
|
||||||
this.defaultValue = defaultValue;
|
this.defaultValue = defaultValue;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,8 @@ public class ContractAssetsVo {
|
|||||||
private String powerFeeUnit; //电费单位
|
private String powerFeeUnit; //电费单位
|
||||||
private String footPrint; //占地大小
|
private String footPrint; //占地大小
|
||||||
private String manager;//管理员
|
private String manager;//管理员
|
||||||
|
private String zone;//所在区域
|
||||||
|
private String address;//详细地址
|
||||||
|
|
||||||
public String getAssetsNo() {
|
public String getAssetsNo() {
|
||||||
return assetsNo;
|
return assetsNo;
|
||||||
@@ -104,4 +106,20 @@ public class ContractAssetsVo {
|
|||||||
public void setManager(String manager) {
|
public void setManager(String manager) {
|
||||||
this.manager = manager;
|
this.manager = manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getZone() {
|
||||||
|
return zone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZone(String zone) {
|
||||||
|
this.zone = zone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress() {
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
package com.seeyon.apps.assetstenant.contract;
|
package com.seeyon.apps.assetstenant.contract;
|
||||||
|
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
|
||||||
import com.seeyon.ctp.common.AppContext;
|
import com.seeyon.ctp.common.AppContext;
|
||||||
import com.seeyon.utils.form.FormWhereCondition;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class ContractDocService {
|
public class ContractDocService {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.seeyon.apps.assetstenant.contract;
|
||||||
|
|
||||||
|
public class ContractFeeInfo {
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.seeyon.apps.assetstenant.contract;
|
||||||
|
|
||||||
|
public class ContractPayBaseInfo {
|
||||||
|
|
||||||
|
private String contractNo;
|
||||||
|
private String startDate;
|
||||||
|
private String endDate;
|
||||||
|
private String totalRentFee;//总租金
|
||||||
|
private String deposit; //押金
|
||||||
|
private String paidTermNum; //已付期数
|
||||||
|
private String totalTermNum; //总期数
|
||||||
|
private String assetsName; //资产名称
|
||||||
|
private String assetsNo;
|
||||||
|
|
||||||
|
public String getContractNo() {
|
||||||
|
return contractNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContractNo(String contractNo) {
|
||||||
|
this.contractNo = contractNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAssetsName() {
|
||||||
|
return assetsName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAssetsName(String assetsName) {
|
||||||
|
this.assetsName = assetsName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAssetsNo() {
|
||||||
|
return assetsNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAssetsNo(String assetsNo) {
|
||||||
|
this.assetsNo = assetsNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartDate() {
|
||||||
|
return startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartDate(String startDate) {
|
||||||
|
this.startDate = startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndDate() {
|
||||||
|
return endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndDate(String endDate) {
|
||||||
|
this.endDate = endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeposit() {
|
||||||
|
return deposit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeposit(String deposit) {
|
||||||
|
this.deposit = deposit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPaidTermNum() {
|
||||||
|
return paidTermNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPaidTermNum(String paidTermNum) {
|
||||||
|
this.paidTermNum = paidTermNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTotalTermNum() {
|
||||||
|
return totalTermNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalTermNum(String totalTermNum) {
|
||||||
|
this.totalTermNum = totalTermNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTotalRentFee() {
|
||||||
|
return totalRentFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalRentFee(String totalRentFee) {
|
||||||
|
this.totalRentFee = totalRentFee;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ 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.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
||||||
import com.seeyon.apps.esign.service.SignLinkService;
|
import com.seeyon.apps.esign.service.SignLinkService;
|
||||||
@@ -33,7 +33,7 @@ public class ContractService {
|
|||||||
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.CONTRACT_FORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.CONTRACT_FORMNO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
||||||
@@ -58,8 +58,7 @@ public class ContractService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public PageQueryVo pageQuery(JSONObject params) throws Exception {
|
public PageQueryVo pageQuery(JSONObject params) throws Exception {
|
||||||
TableContext tableContext = getTableContext();
|
TableContext tableContext = getTableContext();List<FormWhereCondition> conditions = buildConditions(params);
|
||||||
List<FormWhereCondition> conditions = buildConditions(params);
|
|
||||||
Integer pageNo = params.getInteger("pageNo") == null ? 1 : params.getInteger("pageNo");
|
Integer pageNo = params.getInteger("pageNo") == null ? 1 : params.getInteger("pageNo");
|
||||||
Integer pageSize = params.getInteger("pageSize") == null ? 10 : params.getInteger("pageSize");
|
Integer pageSize = params.getInteger("pageSize") == null ? 10 : params.getInteger("pageSize");
|
||||||
PageQueryVo<OaContractVo> pageQueryVo = new PageQueryVo();
|
PageQueryVo<OaContractVo> pageQueryVo = new PageQueryVo();
|
||||||
@@ -69,9 +68,9 @@ public class ContractService {
|
|||||||
pageQueryVo.setDatas(oaContractVos);
|
pageQueryVo.setDatas(oaContractVos);
|
||||||
pageQueryVo.setTotalCount(count);
|
pageQueryVo.setTotalCount(count);
|
||||||
TableContext subTableContext = FormTableExecutor.sub(getFormNo(), "租赁资产明细");
|
TableContext subTableContext = FormTableExecutor.sub(getFormNo(), "租赁资产明细");
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
OaContractVo oaContractVo = new OaContractVo();
|
OaContractVo oaContractVo = new OaContractVo();
|
||||||
Map<String, Object> dataMap = (Map<String, Object>) data;
|
Map<String, Object> dataMap = data.getFieldsMap();
|
||||||
fillVo(dataMap,oaContractVo);
|
fillVo(dataMap,oaContractVo);
|
||||||
Long id = Long.parseLong((String)dataMap.get("id"));
|
Long id = Long.parseLong((String)dataMap.get("id"));
|
||||||
List<FormWhereCondition> subConditions = new ArrayList<>();
|
List<FormWhereCondition> subConditions = new ArrayList<>();
|
||||||
@@ -79,7 +78,7 @@ public class ContractService {
|
|||||||
List<FormColumn> subDatas = FormTableExecutor.pageQuery(subTableContext, null, subConditions, 1, 10,true);
|
List<FormColumn> subDatas = FormTableExecutor.pageQuery(subTableContext, null, subConditions, 1, 10,true);
|
||||||
log.info("查询到的关联资产数量: " + subDatas.size());
|
log.info("查询到的关联资产数量: " + subDatas.size());
|
||||||
if(subDatas.size() > 0) {
|
if(subDatas.size() > 0) {
|
||||||
Map<String, Object> subOneRowData = (Map<String, Object>) subDatas.get(0);
|
Map<String, Object> subOneRowData = subDatas.get(0).getFieldsMap();
|
||||||
String assetsNo = (String) subOneRowData.get("资产编号");
|
String assetsNo = (String) subOneRowData.get("资产编号");
|
||||||
JSONObject temp = new JSONObject();
|
JSONObject temp = new JSONObject();
|
||||||
temp.put("assetsNo",assetsNo);
|
temp.put("assetsNo",assetsNo);
|
||||||
@@ -89,10 +88,11 @@ public class ContractService {
|
|||||||
}
|
}
|
||||||
oaContractVo.setTenantName(getStringValue(dataMap,"承租方名称"));
|
oaContractVo.setTenantName(getStringValue(dataMap,"承租方名称"));
|
||||||
oaContractVo.setDeposit(getStringValue(dataMap,"履约保证金"));
|
oaContractVo.setDeposit(getStringValue(dataMap,"履约保证金"));
|
||||||
oaContractVo.setRentFee(getStringValue(dataMap,"租金"));
|
oaContractVo.setRentFee(getStringValue(dataMap,"合同金额"));
|
||||||
oaContractVo.setRentTotalTime(ContractDurationUtil.calculateContractDuration(getStringValue(dataMap,"合同开始日期"),getStringValue(dataMap,"合同截止日期")));
|
oaContractVo.setRentTotalTime(ContractDurationUtil.calculateContractDuration(getStringValue(dataMap,"合同开始日期"),getStringValue(dataMap,"合同截止日期")));
|
||||||
oaContractVo.setRentFee(getViewRentFee(dataMap));
|
oaContractVo.setRentFee(getViewRentFee(dataMap));
|
||||||
String payWay = getStringValue(dataMap,"租金单位");
|
String payWay = getStringValue(dataMap,"缴费方式");
|
||||||
|
if(payWay != null) {
|
||||||
switch (payWay) {
|
switch (payWay) {
|
||||||
case "季度缴": oaContractVo.setRentFeeUnit("季");break;
|
case "季度缴": oaContractVo.setRentFeeUnit("季");break;
|
||||||
case "月缴": oaContractVo.setRentFeeUnit("月");break;
|
case "月缴": oaContractVo.setRentFeeUnit("月");break;
|
||||||
@@ -101,6 +101,7 @@ public class ContractService {
|
|||||||
case "半年缴": oaContractVo.setRentFeeUnit("半年");break;
|
case "半年缴": oaContractVo.setRentFeeUnit("半年");break;
|
||||||
default: oaContractVo.setRentFeeUnit(null);break;
|
default: oaContractVo.setRentFeeUnit(null);break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
oaContractVos.add(oaContractVo);
|
oaContractVos.add(oaContractVo);
|
||||||
}
|
}
|
||||||
return pageQueryVo;
|
return pageQueryVo;
|
||||||
@@ -138,8 +139,8 @@ public class ContractService {
|
|||||||
subConditions.add(FormWhereCondition.build().display("formmain_id").value(id));
|
subConditions.add(FormWhereCondition.build().display("formmain_id").value(id));
|
||||||
List<FormColumn> subDatas = FormTableExecutor.query(subTableContext, null, subConditions, true);
|
List<FormColumn> subDatas = FormTableExecutor.query(subTableContext, null, subConditions, true);
|
||||||
List<ContractAssetsVo> assetsVos = new ArrayList<>();
|
List<ContractAssetsVo> assetsVos = new ArrayList<>();
|
||||||
for (Object subData : subDatas) {
|
for (FormColumn subData : subDatas) {
|
||||||
Map<String, Object> subOneRowData = (Map<String, Object>) subData;
|
Map<String, Object> subOneRowData = subData.getFieldsMap();
|
||||||
String assetsNo = (String) subOneRowData.get("资产编号");
|
String assetsNo = (String) subOneRowData.get("资产编号");
|
||||||
JSONObject temp = new JSONObject();
|
JSONObject temp = new JSONObject();
|
||||||
temp.put("assetsNo",assetsNo);
|
temp.put("assetsNo",assetsNo);
|
||||||
@@ -154,6 +155,34 @@ public class ContractService {
|
|||||||
return oaContractVos;
|
return oaContractVos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void fillDetailVo(Map<String, Object> fieldsMap, OaContractDetailVo oaContractVo) {
|
||||||
|
//合同基本信息
|
||||||
|
oaContractVo.setContractNo(getStringValue(fieldsMap,"合同编号"));
|
||||||
|
oaContractVo.setTenantName(getStringValue(fieldsMap,"承租方名称")); //租客姓名
|
||||||
|
Integer years = parseInt(fieldsMap.get("文本-年"));
|
||||||
|
Integer months = parseInt(fieldsMap.get("文本-月"));
|
||||||
|
Integer days = parseInt(fieldsMap.get("文本-日"));
|
||||||
|
oaContractVo.setLeaseTerm(getLeaseTermText(years,months,days)); //租赁期限
|
||||||
|
oaContractVo.setEndDate(getStringValue(fieldsMap,"合同截止日期")); //到期日期
|
||||||
|
oaContractVo.setStartDate(getStringValue(fieldsMap,"合同开始日期"));
|
||||||
|
if(fieldsMap.get("盖章后合同附件") != null) {
|
||||||
|
oaContractVo.seteContractFile(OaFileVo.getInstance(fieldsMap.get("盖章后合同附件"),attachmentManager));
|
||||||
|
}
|
||||||
|
oaContractVo.seteContractFlowId(getStringValue(fieldsMap,"电子签合同流程ID"));
|
||||||
|
oaContractVo.setSignStatus(getStringValue(fieldsMap,"签署状态"));
|
||||||
|
|
||||||
|
//房屋费用信息
|
||||||
|
oaContractVo.setContractFee(getStringValue(fieldsMap,"合同金额")); //租金
|
||||||
|
oaContractVo.setDeposit(getStringValue(fieldsMap,"押金")); //押金
|
||||||
|
oaContractVo.setRentFeeUnit(getRentUnit(getStringValue(fieldsMap,"缴费方式"))); //租金单位
|
||||||
|
|
||||||
|
oaContractVo.setDeposit(getStringValue(fieldsMap,"履约保证金"));
|
||||||
|
if(fieldsMap.get("盖章后合同附件") != null) {
|
||||||
|
oaContractVo.seteContractFile(OaFileVo.getInstance(fieldsMap.get("盖章后合同附件"),attachmentManager));
|
||||||
|
}
|
||||||
|
oaContractVo.seteContractFlowId(getStringValue(fieldsMap,"电子签合同流程ID"));
|
||||||
|
}
|
||||||
|
|
||||||
public void fillVo(Map<String, Object> fieldsMap, OaContractVo oaContractVo) {
|
public void fillVo(Map<String, Object> fieldsMap, OaContractVo oaContractVo) {
|
||||||
oaContractVo.setFormId(getStringValue(fieldsMap, "id"));
|
oaContractVo.setFormId(getStringValue(fieldsMap, "id"));
|
||||||
oaContractVo.setContractNo(getStringValue(fieldsMap,"合同编号"));
|
oaContractVo.setContractNo(getStringValue(fieldsMap,"合同编号"));
|
||||||
@@ -164,8 +193,9 @@ public class ContractService {
|
|||||||
oaContractVo.setContractEndTime(getStringValue(fieldsMap,"合同截止日期"));
|
oaContractVo.setContractEndTime(getStringValue(fieldsMap,"合同截止日期"));
|
||||||
oaContractVo.setStartDate(oaContractVo.getContractStartTime());
|
oaContractVo.setStartDate(oaContractVo.getContractStartTime());
|
||||||
oaContractVo.setEndDate(oaContractVo.getContractEndTime());
|
oaContractVo.setEndDate(oaContractVo.getContractEndTime());
|
||||||
|
oaContractVo.setDeposit(getStringValue(fieldsMap,"履约保证金"));
|
||||||
if(fieldsMap.get("盖章后合同附件") != null) {
|
if(fieldsMap.get("盖章后合同附件") != null) {
|
||||||
oaContractVo.seteContractFile(OaFileVo.getInstance(Long.parseLong((String)fieldsMap.get("盖章后合同附件")),attachmentManager));
|
oaContractVo.seteContractFile(OaFileVo.getInstance(fieldsMap.get("盖章后合同附件"),attachmentManager));
|
||||||
}
|
}
|
||||||
oaContractVo.seteContractFlowId(getStringValue(fieldsMap,"电子签合同流程ID"));
|
oaContractVo.seteContractFlowId(getStringValue(fieldsMap,"电子签合同流程ID"));
|
||||||
}
|
}
|
||||||
@@ -198,76 +228,176 @@ public class ContractService {
|
|||||||
return conditions;
|
return conditions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String queryContractPayPeriod(String contractNo, String billDate) throws Exception {
|
public String getLeaseTermText(Integer years, Integer months, Integer days) {
|
||||||
|
// 处理 null → 0
|
||||||
|
int y = years == null ? 0 : years;
|
||||||
|
int m = months == null ? 0 : months;
|
||||||
|
int d = days == null ? 0 : days;
|
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
// 拼接年
|
||||||
|
if (y > 0) {
|
||||||
|
sb.append(y).append("年");
|
||||||
|
}
|
||||||
|
// 拼接月
|
||||||
|
if (m > 0) {
|
||||||
|
sb.append(m).append("个月");
|
||||||
|
}
|
||||||
|
// 拼接日
|
||||||
|
if (d > 0) {
|
||||||
|
sb.append(d).append("天");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 都为0的情况
|
||||||
|
if (sb.length() == 0) {
|
||||||
|
return "0天";
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getRentUnit(String payWay) {
|
||||||
|
if (payWay == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
switch (payWay.trim()) {
|
||||||
|
case "月缴": return "月";
|
||||||
|
case "季度缴": return "季";
|
||||||
|
case "半年缴": return "半年";
|
||||||
|
case "年缴": return "年";
|
||||||
|
case "一次性": return "年"; // 一次性默认按年单位
|
||||||
|
default: return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer queryContractPayPeriod(String contractNo, String billDate) throws Exception {
|
||||||
|
// 1. 基础参数校验
|
||||||
|
if (contractNo == null || contractNo.isEmpty() || billDate == null || billDate.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 2. 查询合同数据
|
||||||
List<FormWhereCondition> conditions = new ArrayList<>();
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
conditions.add(FormWhereCondition.build()
|
conditions.add(FormWhereCondition.build()
|
||||||
.display("合同编号")
|
.display("合同编号")
|
||||||
.value(contractNo));
|
.value(contractNo));
|
||||||
FormColumn formColumn = FormTableExecutor.queryOne(getTableContext(), conditions, true);
|
FormColumn formColumn = FormTableExecutor.queryOne(getTableContext(), conditions, true);
|
||||||
if (formColumn == null || formColumn.getFieldsMap() == null) {
|
if (formColumn == null || formColumn.getFieldsMap() == null) {
|
||||||
return "";
|
return null;
|
||||||
|
}
|
||||||
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
|
// 3. 提取字段并安全转换
|
||||||
|
String payWay = toStr(fieldsMap.get("缴费方式"));
|
||||||
|
Integer years = parseInt(fieldsMap.get("文本-年"));
|
||||||
|
Integer months = parseInt(fieldsMap.get("文本-月"));
|
||||||
|
Integer days = parseInt(fieldsMap.get("文本-日"));
|
||||||
|
String rentStartDateStr = toStr(fieldsMap.get("计租日期"));
|
||||||
|
// 计租日期为空直接返回
|
||||||
|
if (rentStartDateStr.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 4. 日期解析(增加异常捕获,避免格式错误导致程序崩溃)
|
||||||
|
LocalDate startDate;
|
||||||
|
LocalDate billLocalDate;
|
||||||
|
try {
|
||||||
|
startDate = LocalDate.parse(rentStartDateStr);
|
||||||
|
billLocalDate = LocalDate.parse(billDate);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 计算合同结束日期
|
||||||
|
LocalDate endDate = startDate.plusYears(years).plusMonths(months).plusDays(days);
|
||||||
|
// 计算合同总月数
|
||||||
|
int totalMonths = years * 12 + months;
|
||||||
|
// 5. 核心业务逻辑
|
||||||
|
// 一次性/年缴 固定返回1期
|
||||||
|
if ("一次性".equals(payWay)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
// 账单日期早于计租开始日 → 第1期
|
||||||
|
if (billLocalDate.isBefore(startDate)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
// 账单日期超过合同结束日 → 返回总期数
|
||||||
|
if (billLocalDate.isAfter(endDate)) {
|
||||||
|
return calculateTotalPeriod(payWay, totalMonths);
|
||||||
|
}
|
||||||
|
// 账单日期在合同期内 → 计算当前期数
|
||||||
|
return calculateCurrentPeriod(startDate, billLocalDate, payWay);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer countTotalPeriod(String contractNo) throws BusinessException {
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build()
|
||||||
|
.display("合同编号")
|
||||||
|
.value(contractNo));
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(getTableContext(), conditions, true);
|
||||||
|
if (formColumn == null || formColumn.getFieldsMap() == null) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
String payWay = toStr(fieldsMap.get("缴费方式"));
|
String payWay = toStr(fieldsMap.get("缴费方式"));
|
||||||
int years = parseInt(fieldsMap.get("文本-年"));
|
Integer years = parseInt(fieldsMap.get("文本-年"));
|
||||||
int months = parseInt(fieldsMap.get("文本-月"));
|
Integer months = parseInt(fieldsMap.get("文本-月"));
|
||||||
int days = parseInt(fieldsMap.get("文本-日"));
|
Integer days = parseInt(fieldsMap.get("文本-日"));
|
||||||
|
|
||||||
String rentStartDateStr = toStr(fieldsMap.get("计租日期"));
|
String rentStartDateStr = toStr(fieldsMap.get("计租日期"));
|
||||||
if (rentStartDateStr.isEmpty() || billDate == null || billDate.isEmpty()) {
|
return calculateTotalPeriod(payWay, years * 12 + months);
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalDate startDate = LocalDate.parse(rentStartDateStr);
|
/**
|
||||||
LocalDate billLocalDate = LocalDate.parse(billDate);
|
* 计算账单超出合同结束日时的【总期数】
|
||||||
LocalDate endDate = startDate.plusYears(years).plusMonths(months).plusDays(days);
|
*/
|
||||||
|
private Integer calculateTotalPeriod(String payWay, int totalMonths) {
|
||||||
// 一次性/年付 1期
|
int period;
|
||||||
if ("一次性".equals(payWay) || "年缴".equals(payWay)) {
|
|
||||||
return "1";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 账单早于开始日
|
|
||||||
if (billLocalDate.isBefore(startDate)) {
|
|
||||||
return "1";
|
|
||||||
}
|
|
||||||
|
|
||||||
int totalMonths = years * 12 + months;
|
|
||||||
|
|
||||||
// 账单超过结束日
|
|
||||||
if (billLocalDate.isAfter(endDate)) {
|
|
||||||
switch (payWay) {
|
switch (payWay) {
|
||||||
case "季度缴":
|
case "季度缴":
|
||||||
int quarterPeriod = totalMonths / 3;
|
period = totalMonths / 3;
|
||||||
return (quarterPeriod > 0 ? quarterPeriod : 1) + "";
|
break;
|
||||||
case "月缴":
|
case "月缴":
|
||||||
return (totalMonths > 0 ? totalMonths : 1) + "";
|
period = totalMonths;
|
||||||
// 修复后 半年缴
|
break;
|
||||||
case "半年缴":
|
case "半年缴":
|
||||||
int halfYearPeriod = totalMonths / 6;
|
period = totalMonths / 6;
|
||||||
return (halfYearPeriod > 0 ? halfYearPeriod : 1) + "";
|
break;
|
||||||
|
case "年缴":
|
||||||
|
period = totalMonths / 12;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return "1";
|
return 1;
|
||||||
}
|
}
|
||||||
|
return Math.max(period, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 账单在合同期内
|
/**
|
||||||
switch (payWay) {
|
* 计算账单在合同期内的【当前期数】
|
||||||
case "季度缴":
|
*/
|
||||||
long monthsBetweenQ = ChronoUnit.MONTHS.between(startDate, billLocalDate);
|
private Integer calculateCurrentPeriod(LocalDate startDate, LocalDate billLocalDate, String payWay) {
|
||||||
return ((monthsBetweenQ / 3) + 1) + "";
|
|
||||||
case "月缴":
|
|
||||||
long monthsBetween = ChronoUnit.MONTHS.between(startDate, billLocalDate);
|
long monthsBetween = ChronoUnit.MONTHS.between(startDate, billLocalDate);
|
||||||
return (monthsBetween + 1) + "";
|
int period;
|
||||||
// 修复后 半年缴
|
|
||||||
|
switch (payWay) {
|
||||||
|
case "季度缴":
|
||||||
|
period = (int) (monthsBetween / 3) + 1;
|
||||||
|
break;
|
||||||
|
case "月缴":
|
||||||
|
period = (int) monthsBetween + 1;
|
||||||
|
break;
|
||||||
case "半年缴":
|
case "半年缴":
|
||||||
long monthsBetweenHalf = ChronoUnit.MONTHS.between(startDate, billLocalDate);
|
period = (int) (monthsBetween / 6) + 1;
|
||||||
return (monthsBetweenHalf / 6 + 1) + "";
|
break;
|
||||||
|
case "年缴":
|
||||||
|
period = (int) (monthsBetween / 12) + 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return "1";
|
return 1;
|
||||||
}
|
}
|
||||||
|
return Math.max(period, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private String toStr(Object obj) {
|
private String toStr(Object obj) {
|
||||||
return obj == null ? "" : obj.toString().trim();
|
return obj == null ? "" : obj.toString().trim();
|
||||||
}
|
}
|
||||||
@@ -281,34 +411,31 @@ public class ContractService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public OaContractVo queryContractDetail(JSONObject params) throws Exception {
|
public OaContractDetailVo queryContractDetail(JSONObject params) throws Exception {
|
||||||
List<FormWhereCondition> conditions = buildConditions(params);
|
List<FormWhereCondition> conditions = buildConditions(params);
|
||||||
FormColumn formColumn = FormTableExecutor.queryOne(getTableContext(),conditions,true);
|
FormColumn formColumn = FormTableExecutor.queryOne(getTableContext(),conditions,true);
|
||||||
if(formColumn == null) {
|
if(formColumn == null) {
|
||||||
return new OaContractVo();
|
return new OaContractDetailVo();
|
||||||
}
|
}
|
||||||
Map<String, Object> dataMap = formColumn.getFieldsMap();
|
Map<String, Object> dataMap = formColumn.getFieldsMap();
|
||||||
OaContractVo oaContractVo = new OaContractVo();
|
OaContractDetailVo oaContractVo = new OaContractDetailVo();
|
||||||
fillVo(dataMap,oaContractVo);
|
oaContractVo.setId(formColumn.getId());
|
||||||
|
fillDetailVo(dataMap,oaContractVo);
|
||||||
Long id = Long.parseLong((String)dataMap.get("id"));
|
Long id = Long.parseLong((String)dataMap.get("id"));
|
||||||
List<FormWhereCondition> subConditions = new ArrayList<>();
|
List<FormWhereCondition> subConditions = new ArrayList<>();
|
||||||
subConditions.add(FormWhereCondition.build().display("formmain_id").value(id));
|
subConditions.add(FormWhereCondition.build().display("formmain_id").value(id));
|
||||||
TableContext subTableContext = FormTableExecutor.sub(getFormNo(), "租赁资产明细");
|
TableContext subTableContext = FormTableExecutor.sub(getFormNo(), "租赁资产明细");
|
||||||
List<FormColumn> subDatas = FormTableExecutor.pageQuery(subTableContext, null, subConditions, 1, 10,true);
|
List<FormColumn> subDatas = FormTableExecutor.pageQuery(subTableContext, null, subConditions, 1, 10,true);
|
||||||
if(subDatas.size() > 0) {
|
if(subDatas.size() > 0) {
|
||||||
Map<String, Object> subOneRowData = (Map<String, Object>) subDatas.get(0);
|
FormColumn subFormColumn = subDatas.get(0);
|
||||||
|
Map<String, Object> subOneRowData = subFormColumn.getFieldsMap();
|
||||||
String assetsNo = (String) subOneRowData.get("资产编号");
|
String assetsNo = (String) subOneRowData.get("资产编号");
|
||||||
BigDecimal unitFee = (BigDecimal) subOneRowData.get("租赁单价");
|
|
||||||
BigDecimal rentArea = (BigDecimal)subOneRowData.get("租赁面积");
|
|
||||||
String rentFee = unitFee != null && rentArea != null ?unitFee.multiply(rentArea).toString() : null;
|
|
||||||
JSONObject temp = new JSONObject();
|
JSONObject temp = new JSONObject();
|
||||||
temp.put("assetsNo",assetsNo);
|
temp.put("assetsNo",assetsNo);
|
||||||
ContractAssetsVo assetsVo = assetsService.queryContractAssetsDetail(temp);
|
ContractAssetsVo assetsVo = assetsService.queryContractAssetsDetail(temp);
|
||||||
assetsVo.setRentFee(rentFee);
|
|
||||||
assetsVo.setFootPrint(rentArea.toString());
|
|
||||||
List<ContractAssetsVo> vos = new ArrayList<>();
|
List<ContractAssetsVo> vos = new ArrayList<>();
|
||||||
vos.add(assetsVo);
|
vos.add(assetsVo);
|
||||||
oaContractVo.setAssetsVos(vos);
|
oaContractVo.setContractAssetsList(vos);
|
||||||
}
|
}
|
||||||
return oaContractVo;
|
return oaContractVo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,169 @@
|
|||||||
|
package com.seeyon.apps.assetstenant.contract;
|
||||||
|
|
||||||
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class OaContractDetailVo {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
// 合同基本信息
|
||||||
|
/** 租客姓名 */
|
||||||
|
private String tenantName;
|
||||||
|
|
||||||
|
/** 开始时间 */
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
|
/** 合同编号 */
|
||||||
|
private String contractNo;
|
||||||
|
|
||||||
|
/** 租赁期限(年) */
|
||||||
|
private String leaseTerm;
|
||||||
|
|
||||||
|
/** 截止时间 */
|
||||||
|
private String endDate;
|
||||||
|
|
||||||
|
/** 租约状态(如:已退租) */
|
||||||
|
private String contractStatus;
|
||||||
|
|
||||||
|
// 房屋费用信息
|
||||||
|
/** 合同金额 */
|
||||||
|
private String contractFee;
|
||||||
|
|
||||||
|
/** 押金(元) */
|
||||||
|
private String deposit;
|
||||||
|
|
||||||
|
/** 付款形式(如:押一付三) */
|
||||||
|
private String paymentMethod;
|
||||||
|
|
||||||
|
private List<ContractAssetsVo> contractAssetsList;
|
||||||
|
|
||||||
|
private String rentFeeUnit; //租金单位
|
||||||
|
|
||||||
|
private OaFileVo eContractFile; //合同附件
|
||||||
|
|
||||||
|
private String eContractFlowId; //电子签流程ID
|
||||||
|
|
||||||
|
private String signStatus;//签署状态
|
||||||
|
|
||||||
|
public String getTenantName() {
|
||||||
|
return tenantName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTenantName(String tenantName) {
|
||||||
|
this.tenantName = tenantName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContractNo() {
|
||||||
|
return contractNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContractNo(String contractNo) {
|
||||||
|
this.contractNo = contractNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getContractStatus() {
|
||||||
|
return contractStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContractStatus(String contractStatus) {
|
||||||
|
this.contractStatus = contractStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContractFee() {
|
||||||
|
return contractFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContractFee(String contractFee) {
|
||||||
|
this.contractFee = contractFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeposit() {
|
||||||
|
return deposit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeposit(String deposit) {
|
||||||
|
this.deposit = deposit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPaymentMethod() {
|
||||||
|
return paymentMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPaymentMethod(String paymentMethod) {
|
||||||
|
this.paymentMethod = paymentMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ContractAssetsVo> getContractAssetsList() {
|
||||||
|
return contractAssetsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContractAssetsList(List<ContractAssetsVo> contractAssetsList) {
|
||||||
|
this.contractAssetsList = contractAssetsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRentFeeUnit() {
|
||||||
|
return rentFeeUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRentFeeUnit(String rentFeeUnit) {
|
||||||
|
this.rentFeeUnit = rentFeeUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OaFileVo geteContractFile() {
|
||||||
|
return eContractFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void seteContractFile(OaFileVo eContractFile) {
|
||||||
|
this.eContractFile = eContractFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String geteContractFlowId() {
|
||||||
|
return eContractFlowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void seteContractFlowId(String eContractFlowId) {
|
||||||
|
this.eContractFlowId = eContractFlowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSignStatus() {
|
||||||
|
return signStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignStatus(String signStatus) {
|
||||||
|
this.signStatus = signStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartDate() {
|
||||||
|
return startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartDate(String startDate) {
|
||||||
|
this.startDate = startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndDate() {
|
||||||
|
return endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndDate(String endDate) {
|
||||||
|
this.endDate = endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeaseTerm() {
|
||||||
|
return leaseTerm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeaseTerm(String leaseTerm) {
|
||||||
|
this.leaseTerm = leaseTerm;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -186,4 +186,5 @@ public class OaContractVo {
|
|||||||
public void setRentFeeUnit(String rentFeeUnit) {
|
public void setRentFeeUnit(String rentFeeUnit) {
|
||||||
this.rentFeeUnit = rentFeeUnit;
|
this.rentFeeUnit = rentFeeUnit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ public class Customer {
|
|||||||
private String cusNo;
|
private String cusNo;
|
||||||
private String orgNo;
|
private String orgNo;
|
||||||
private String orgManagerName;
|
private String orgManagerName;
|
||||||
|
private String cusType;
|
||||||
private int isOrg = 0;
|
private int isOrg = 0;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
@@ -73,4 +74,12 @@ public class Customer {
|
|||||||
public void setIsOrg(int isOrg) {
|
public void setIsOrg(int isOrg) {
|
||||||
this.isOrg = isOrg;
|
this.isOrg = isOrg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCusType() {
|
||||||
|
return cusType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCusType(String cusType) {
|
||||||
|
this.cusType = cusType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.seeyon.apps.assetstenant.cus;
|
package com.seeyon.apps.assetstenant.cus;
|
||||||
|
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
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.utils.form.*;
|
import com.seeyon.utils.form.*;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -16,7 +15,7 @@ public class CustomerService {
|
|||||||
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.CUSDOCFORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.CUSDOCFORMNO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TableContext getTableContext() throws BusinessException {
|
private TableContext getTableContext() throws BusinessException {
|
||||||
@@ -74,7 +73,9 @@ public class CustomerService {
|
|||||||
customer.setCusPhone(getStringValue(fieldsMap,"客户联系方式"));
|
customer.setCusPhone(getStringValue(fieldsMap,"客户联系方式"));
|
||||||
customer.setOrgManagerName(getStringValue(fieldsMap,"客商联系人"));
|
customer.setOrgManagerName(getStringValue(fieldsMap,"客商联系人"));
|
||||||
customer.setOrgNo(getStringValue(fieldsMap,"纳税人识别号或身份证号"));
|
customer.setOrgNo(getStringValue(fieldsMap,"纳税人识别号或身份证号"));
|
||||||
customer.setIsOrg(StringUtils.isNotEmpty(customer.getOrgNo()) ? 1 : 0);
|
String cusType = getStringValue(fieldsMap, "客商分类");
|
||||||
|
customer.setCusType(cusType);
|
||||||
|
customer.setIsOrg("企业".equals(cusType) ? 1 : 0);
|
||||||
return customer;
|
return customer;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -2,19 +2,21 @@ package com.seeyon.apps.assetstenant.discharge;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.seeyon.apps.assetstenant.assets.OaAssetsVo;
|
import com.seeyon.apps.assetstenant.assets.OaAssetsVo;
|
||||||
|
import com.seeyon.apps.assetstenant.bill.BillVo;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.assetstenant.contract.ContractService;
|
import com.seeyon.apps.assetstenant.contract.ContractService;
|
||||||
import com.seeyon.apps.assetstenant.flow.FlowCreateService;
|
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.apps.assetstenant.utils.ProtUtil;
|
||||||
import com.seeyon.cap4.form.bean.FormBean;
|
import com.seeyon.apps.esign.constants.EsignConfigConstants;
|
||||||
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.utils.form.*;
|
import com.seeyon.utils.form.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -25,7 +27,7 @@ public class DisCharegeService {
|
|||||||
private ContractService contractService = (ContractService) AppContext.getBean("contractService");
|
private ContractService contractService = (ContractService) AppContext.getBean("contractService");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.DISCHARGE_FORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.DISCHARGE_TEMPLATECODE);
|
||||||
}
|
}
|
||||||
private TableContext getTableContext() throws BusinessException {
|
private TableContext getTableContext() throws BusinessException {
|
||||||
return FormTableExecutor.master(getFormNo());
|
return FormTableExecutor.master(getFormNo());
|
||||||
@@ -50,8 +52,8 @@ public class DisCharegeService {
|
|||||||
List<FormColumn> datas = FormTableExecutor.pageQuery(tableContext, queryColumnVos, conditions, pageNo, pageSize,true);
|
List<FormColumn> datas = FormTableExecutor.pageQuery(tableContext, queryColumnVos, conditions, pageNo, pageSize,true);
|
||||||
Long count = FormTableExecutor.count(tableContext,null, conditions);
|
Long count = FormTableExecutor.count(tableContext,null, conditions);
|
||||||
if(datas.size() > 0){
|
if(datas.size() > 0){
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
Map<String,Object> map = (Map<String, Object>) data;
|
Map<String,Object> map = data.getFieldsMap();
|
||||||
DisChargeRecordVo vo = new DisChargeRecordVo();
|
DisChargeRecordVo vo = new DisChargeRecordVo();
|
||||||
fillVo(map,vo);
|
fillVo(map,vo);
|
||||||
vos.add(vo);
|
vos.add(vo);
|
||||||
@@ -74,8 +76,8 @@ public class DisCharegeService {
|
|||||||
List<Object> subFormDataList = new ArrayList<>();
|
List<Object> subFormDataList = new ArrayList<>();
|
||||||
Map<String,Object> data = new HashMap<>();
|
Map<String,Object> data = new HashMap<>();
|
||||||
subFormDataMap.put(subDbTableName,subFormDataList);
|
subFormDataMap.put(subDbTableName,subFormDataList);
|
||||||
String templateCode = configProvider.getBizConfigByKey(RentConstants.DISCHARGE_TEMPLATECODE);
|
String templateCode = configProvider.getBizConfigByKey(AssetsTenantConstants.DISCHARGE_TEMPLATECODE);
|
||||||
String appName = configProvider.getBizConfigByKey(RentConstants.FORMAPPNAME);
|
String appName = configProvider.getBizConfigByKey(AssetsTenantConstants.FORMAPPNAME);
|
||||||
mainFormData.put(tableName,data);
|
mainFormData.put(tableName,data);
|
||||||
String contractNo = params.getString("contractNo");
|
String contractNo = params.getString("contractNo");
|
||||||
List<String> assetsNoList = (List<String>) params.get("assetsNoList");
|
List<String> assetsNoList = (List<String>) params.get("assetsNoList");
|
||||||
@@ -101,6 +103,40 @@ public class DisCharegeService {
|
|||||||
flowCreateService.flowStart("退租申请",mainFormData,subFormDataMap,appName,templateCode);
|
flowCreateService.flowStart("退租申请",mainFormData,subFormDataMap,appName,templateCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cancelApply(String id) throws BusinessException, IOException {
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build().display("ID").value(id));
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(getTableContext(), conditions, true);
|
||||||
|
if(formColumn == null) {
|
||||||
|
throw new BusinessException("未找到退租申请");
|
||||||
|
}
|
||||||
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
|
String nodeId = (String)fieldsMap.get("流程节点ID");
|
||||||
|
JSONObject params = new JSONObject();
|
||||||
|
params.put("message", "租户取消退租申请");
|
||||||
|
params.put("returnCode", 5);
|
||||||
|
ProtUtil.sendPostNotification(configProvider,params.toString(),"/seeyon/rest/flow/notification/", nodeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void forwardApply(String id) throws BusinessException, IOException {
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build().display("ID").value(id));
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(getTableContext(), conditions, true);
|
||||||
|
if(formColumn == null) {
|
||||||
|
throw new BusinessException("未找到退租申请");
|
||||||
|
}
|
||||||
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
|
String nodeId = (String)fieldsMap.get("流程节点ID");
|
||||||
|
JSONObject params = new JSONObject();
|
||||||
|
params.put("message", "租户已确认清退费用");
|
||||||
|
params.put("returnCode", 1);
|
||||||
|
ProtUtil.sendPostNotification(configProvider,params.toString(),"/seeyon/rest/flow/notification/", nodeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// public List<BillVo> queryDisChargeBill(String id) {
|
||||||
|
// List
|
||||||
|
// }
|
||||||
|
|
||||||
public void fillVo(Map<String, Object> fieldsMap,DisChargeRecordVo vo) throws BusinessException {
|
public void fillVo(Map<String, Object> fieldsMap,DisChargeRecordVo vo) throws BusinessException {
|
||||||
vo.setContractName(getStringValue(fieldsMap,"合同名称"));
|
vo.setContractName(getStringValue(fieldsMap,"合同名称"));
|
||||||
vo.setId(getStringValue(fieldsMap,"id"));
|
vo.setId(getStringValue(fieldsMap,"id"));
|
||||||
|
|||||||
@@ -2,11 +2,21 @@ package com.seeyon.apps.assetstenant.fallback;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
|
import com.seeyon.apps.assetstenant.cus.Customer;
|
||||||
|
import com.seeyon.apps.assetstenant.cus.CustomerService;
|
||||||
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
import com.seeyon.apps.assetstenant.flow.FlowCreateService;
|
import com.seeyon.apps.assetstenant.flow.FlowCreateService;
|
||||||
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
||||||
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.common.filemanager.manager.AttachmentManager;
|
||||||
|
import com.seeyon.ctp.common.filemanager.manager.FileManager;
|
||||||
|
import com.seeyon.ctp.common.po.filemanager.Attachment;
|
||||||
|
import com.seeyon.ctp.common.po.filemanager.V3XFile;
|
||||||
|
import com.seeyon.ctp.organization.bo.V3xOrgAccount;
|
||||||
|
import com.seeyon.ctp.organization.bo.V3xOrgMember;
|
||||||
|
import com.seeyon.ctp.organization.manager.OrgManager;
|
||||||
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;
|
||||||
@@ -21,9 +31,12 @@ public class FallbackService {
|
|||||||
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
private FlowCreateService flowCreateService = (FlowCreateService) AppContext.getBean("flowCreateService");
|
private FlowCreateService flowCreateService = (FlowCreateService) AppContext.getBean("flowCreateService");
|
||||||
private FormFactory factory = (FormFactory) AppContext.getBean("formFactory");
|
private FormFactory factory = (FormFactory) AppContext.getBean("formFactory");
|
||||||
|
private FileManager fileManager = (FileManager)AppContext.getBean("fileManager");
|
||||||
|
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
||||||
|
private CustomerService customerService = (CustomerService) AppContext.getBean("customerService");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.FALLBACK_FORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.FALLBACK_FORMNO);
|
||||||
}
|
}
|
||||||
private TableContext getMasterTableContext() throws BusinessException {
|
private TableContext getMasterTableContext() throws BusinessException {
|
||||||
return FormTableExecutor.master(getFormNo());
|
return FormTableExecutor.master(getFormNo());
|
||||||
@@ -38,10 +51,10 @@ public class FallbackService {
|
|||||||
Long count = FormTableExecutor.count(getMasterTableContext(),null, conditions);
|
Long count = FormTableExecutor.count(getMasterTableContext(),null, conditions);
|
||||||
List<FallbackVo> vos = new ArrayList<>();
|
List<FallbackVo> vos = new ArrayList<>();
|
||||||
if(datas.size() > 0) {
|
if(datas.size() > 0) {
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
FallbackVo fallbackVo = new FallbackVo();
|
FallbackVo fallbackVo = new FallbackVo();
|
||||||
Map<String, Object> dataMap = (Map<String, Object>) data;
|
Map<String, Object> dataMap = data.getFieldsMap();
|
||||||
fillVo(dataMap,fallbackVo);
|
fillPageQueryVo(dataMap,fallbackVo);
|
||||||
vos.add(fallbackVo);
|
vos.add(fallbackVo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,7 +68,7 @@ public class FallbackService {
|
|||||||
FormColumn formColumn = FormTableExecutor.queryOne(getMasterTableContext(),conditions, true);
|
FormColumn formColumn = FormTableExecutor.queryOne(getMasterTableContext(),conditions, true);
|
||||||
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
Map<String, Object> fieldsMap = formColumn.getFieldsMap();
|
||||||
FallbackVo fallbackVo = new FallbackVo();
|
FallbackVo fallbackVo = new FallbackVo();
|
||||||
fillVo(fieldsMap,fallbackVo);
|
fillDetailVo(fieldsMap,fallbackVo);
|
||||||
return fallbackVo;
|
return fallbackVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,17 +76,71 @@ public class FallbackService {
|
|||||||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
Map<String,Object> mainFormData = new HashMap<>();
|
Map<String,Object> mainFormData = new HashMap<>();
|
||||||
TableContext tableContext = getMasterTableContext();
|
TableContext tableContext = getMasterTableContext();
|
||||||
|
String refId = String.valueOf(Math.abs(UUID.randomUUID().getLeastSignificantBits()));
|
||||||
mainFormData.put("承租方编号", params.getString("cusNo"));
|
mainFormData.put("承租方编号", params.getString("cusNo"));
|
||||||
mainFormData.put("承租方姓名", params.getString("tenantName"));
|
Customer customer = customerService.getCustomerInfo(params.getString("cusNo"));
|
||||||
mainFormData.put("承租方类型", EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "承租方类型", params.getString("tenantType")));
|
if(customer != null) {
|
||||||
|
mainFormData.put("承租方姓名", customer.getCusName());
|
||||||
|
mainFormData.put("承租方类型", EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "承租方类型", customer.getCusType()));
|
||||||
|
}
|
||||||
mainFormData.put("承租方手机号", params.getString("tenantPhone"));
|
mainFormData.put("承租方手机号", params.getString("tenantPhone"));
|
||||||
mainFormData.put("留言内容", params.getString("content"));
|
mainFormData.put("留言内容", params.getString("content"));
|
||||||
mainFormData.put("留言日期", df.format(new Date()));
|
mainFormData.put("留言日期", df.format(new Date()));
|
||||||
|
mainFormData.put("图片索引ID文本",refId);
|
||||||
mainFormData.put("处理状态", EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "处理状态", "未处理"));
|
mainFormData.put("处理状态", EnumMapUtils.getEnumItemValueByDisplayValue(tableContext.getTableBean(), "处理状态", "未处理"));
|
||||||
String docNo = "weChat_" + UUID.randomUUID().toString().replace("-","");
|
String docNo = "weChat_" + UUID.randomUUID().toString().replace("-","");
|
||||||
mainFormData.put("档案编号",docNo);
|
mainFormData.put("档案编号",docNo);
|
||||||
String loginName = configProvider.getBizConfigByKey(RentConstants.formLoginName);
|
String loginName = configProvider.getBizConfigByKey(AssetsTenantConstants.formLoginName);
|
||||||
FormSaveUtil.formSave(loginName,getFormNo(),factory,mainFormData,null);
|
FormSaveUtil.formSave(loginName,getFormNo(),factory,mainFormData,null);
|
||||||
|
List<String> imgUrls = (ArrayList<String>)params.get("imgUrls");
|
||||||
|
if(imgUrls != null && imgUrls.size() > 0) {
|
||||||
|
buildImgRef(refId,imgUrls);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buildImgRef(String refId, List<String> imgUrls) throws BusinessException {
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build().display("图片索引ID文本").value(refId));
|
||||||
|
FormColumn formColumn = FormTableExecutor.queryOne(getMasterTableContext(), conditions, true);
|
||||||
|
if(formColumn == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String formId = formColumn.getId();
|
||||||
|
List<Attachment> attachments = new ArrayList<>();
|
||||||
|
int index = 0;
|
||||||
|
for (String url : imgUrls) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
Map<String, String> attachMeta = new HashMap<>();
|
||||||
|
attachMeta.put("type", "0");
|
||||||
|
attachMeta.put("fileUrl", url);
|
||||||
|
V3XFile v3xfile = fileManager.getV3XFile(Long.parseLong(url));
|
||||||
|
if(v3xfile != null) {
|
||||||
|
attachMeta.put("size", String.valueOf(v3xfile.getSize()));
|
||||||
|
}
|
||||||
|
attachMeta.put("subReference", refId);
|
||||||
|
attachMeta.put("category", "66");
|
||||||
|
attachMeta.put("createdate", sdf.format(new Date()));
|
||||||
|
attachMeta.put("filename", index +"");
|
||||||
|
attachMeta.put("reference", formId);
|
||||||
|
attachMeta.put("mimeType", "application/" + "octet-stream");
|
||||||
|
attachments.add(new Attachment(attachMeta));
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
OrgManager orgManager = (OrgManager) AppContext.getBean("orgManager");
|
||||||
|
V3xOrgMember member = orgManager.getMemberByLoginName(configProvider.getBizConfigByKey(AssetsTenantConstants.formLoginName));
|
||||||
|
V3xOrgAccount account = orgManager.getAccountByName(configProvider.getBizConfigByKey(AssetsTenantConstants.updateAccountName));
|
||||||
|
AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
||||||
|
attachmentManager.create(attachments, member.getId(), account.getId());
|
||||||
|
List<FormUpdateField> updateFields = new ArrayList<>();
|
||||||
|
updateFields.add(FormUpdateField.build().display("留言图片").value(refId));
|
||||||
|
conditions.clear();
|
||||||
|
conditions.add(FormWhereCondition.build().display("ID").value(formId));
|
||||||
|
System.out.println("开始绑定图片关系");
|
||||||
|
try {
|
||||||
|
FormTableExecutor.update(getMasterTableContext(),updateFields,conditions);
|
||||||
|
}catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
private String getStringValue(Map<String, Object> fieldsMap,String key) {
|
||||||
@@ -95,14 +162,28 @@ public class FallbackService {
|
|||||||
return conditions;
|
return conditions;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillVo(Map<String, Object> fieldMap, FallbackVo vo) {
|
private void fillPageQueryVo(Map<String, Object> fieldMap, FallbackVo vo) {
|
||||||
vo.setId(getStringValue(fieldMap,"id"));
|
vo.setId(getStringValue(fieldMap,"id"));
|
||||||
vo.setContent(getStringValue(fieldMap,"留言内容"));
|
vo.setContent(getStringValue(fieldMap,"留言内容"));
|
||||||
vo.setStatus(getStringValue(fieldMap,"处理状态"));
|
vo.setStatus(getStringValue(fieldMap,"处理状态"));
|
||||||
vo.setComment(getStringValue(fieldMap,"处理意见"));
|
vo.setComment(getStringValue(fieldMap,"处理回复"));
|
||||||
vo.setSummitDate(getStringValue(fieldMap,"留言日期"));
|
vo.setSummitDate(getStringValue(fieldMap,"留言日期"));
|
||||||
if(StringUtils.isNotBlank(vo.getComment())) {
|
if(StringUtils.isNotBlank(vo.getComment())) {
|
||||||
vo.setHandleDate(getStringValue(fieldMap,"modify_date"));
|
vo.setHandleDate(getStringValue(fieldMap,"modify_date"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void fillDetailVo(Map<String, Object> fieldMap, FallbackVo vo) {
|
||||||
|
vo.setId(getStringValue(fieldMap,"id"));
|
||||||
|
vo.setContent(getStringValue(fieldMap,"留言内容"));
|
||||||
|
vo.setStatus(getStringValue(fieldMap,"处理状态"));
|
||||||
|
vo.setComment(getStringValue(fieldMap,"处理回复"));
|
||||||
|
vo.setSummitDate(getStringValue(fieldMap,"留言日期"));
|
||||||
|
if(StringUtils.isNotBlank(vo.getComment())) {
|
||||||
|
vo.setHandleDate(getStringValue(fieldMap,"modify_date"));
|
||||||
|
}
|
||||||
|
if(fieldMap.get("留言图片") != null) {
|
||||||
|
vo.setImgs(OaFileVo.getInstance(fieldMap.get("资产图片"),attachmentManager));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.seeyon.apps.assetstenant.fallback;
|
package com.seeyon.apps.assetstenant.fallback;
|
||||||
|
|
||||||
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
|
|
||||||
public class FallbackVo {
|
public class FallbackVo {
|
||||||
private String id;
|
private String id;
|
||||||
private String content;
|
private String content;
|
||||||
@@ -7,6 +9,7 @@ public class FallbackVo {
|
|||||||
private String comment;
|
private String comment;
|
||||||
private String summitDate;
|
private String summitDate;
|
||||||
private String handleDate;
|
private String handleDate;
|
||||||
|
private OaFileVo imgs;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
@@ -55,4 +58,12 @@ public class FallbackVo {
|
|||||||
public void setHandleDate(String handleDate) {
|
public void setHandleDate(String handleDate) {
|
||||||
this.handleDate = handleDate;
|
this.handleDate = handleDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OaFileVo getImgs() {
|
||||||
|
return imgs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImgs(OaFileVo imgs) {
|
||||||
|
this.imgs = imgs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -6,8 +6,6 @@ import com.seeyon.ctp.common.filemanager.manager.FileManager;
|
|||||||
import com.seeyon.ctp.common.po.filemanager.Attachment;
|
import com.seeyon.ctp.common.po.filemanager.Attachment;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.BufferedOutputStream;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -38,7 +36,7 @@ public class FileHandlerService {
|
|||||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||||
response.setHeader(
|
response.setHeader(
|
||||||
"Content-Disposition",
|
"Content-Disposition",
|
||||||
"attachment; filename=\"" + attachment.getFilename() + "\"; filename*=UTF-8''" + encodedFileName
|
"attachment; filename*=UTF-8''" + encodedFileName
|
||||||
);
|
);
|
||||||
|
|
||||||
// ⭐ 输出流
|
// ⭐ 输出流
|
||||||
|
|||||||
@@ -25,13 +25,18 @@ public class OaFileVo {
|
|||||||
this.mainRefId = mainRefId;
|
this.mainRefId = mainRefId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static OaFileVo getInstance(Long refId, AttachmentManager attachmentManager) {
|
public static OaFileVo getInstance(Object refId, AttachmentManager attachmentManager) {
|
||||||
if(refId == null) {
|
if(refId == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
OaFileVo oaFileVo = new OaFileVo();
|
OaFileVo oaFileVo = new OaFileVo();
|
||||||
List<String> subRefIds = new ArrayList<>();
|
List<String> subRefIds = new ArrayList<>();
|
||||||
List<Long> fileUrls = attachmentManager.getBySubReference(refId);
|
List<Long> fileUrls = null;
|
||||||
|
if(refId instanceof java.lang.Long) {
|
||||||
|
fileUrls = attachmentManager.getBySubReference((Long)refId);
|
||||||
|
}else if( refId instanceof java.lang.String){
|
||||||
|
fileUrls = attachmentManager.getBySubReference(Long.parseLong((String)refId));
|
||||||
|
}
|
||||||
oaFileVo.setMainRefId(refId + "");
|
oaFileVo.setMainRefId(refId + "");
|
||||||
for (Long fileUrl : fileUrls) {
|
for (Long fileUrl : fileUrls) {
|
||||||
subRefIds.add(fileUrl + "");
|
subRefIds.add(fileUrl + "");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.seeyon.apps.assetstenant.flow;
|
|||||||
|
|
||||||
|
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.ctp.common.AppContext;
|
import com.seeyon.ctp.common.AppContext;
|
||||||
import com.seeyon.utils.http.OaResp;
|
import com.seeyon.utils.http.OaResp;
|
||||||
import com.seeyon.utils.http.OaRestClient;
|
import com.seeyon.utils.http.OaRestClient;
|
||||||
@@ -16,9 +16,9 @@ public class FlowCreateService {
|
|||||||
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 {
|
||||||
OaRestClient client = new OaRestClient(configProvider.getBizConfigByKey(RentConstants.OA_HOST),
|
OaRestClient client = new OaRestClient(configProvider.getBizConfigByKey(AssetsTenantConstants.OA_HOST),
|
||||||
configProvider.getBizConfigByKey(RentConstants.restName),
|
configProvider.getBizConfigByKey(AssetsTenantConstants.restName),
|
||||||
configProvider.getBizConfigByKey(RentConstants.restPwd),false);
|
configProvider.getBizConfigByKey(AssetsTenantConstants.restPwd),false);
|
||||||
String url = "/bpm/process/start";
|
String url = "/bpm/process/start";
|
||||||
Map<String,Object> params = new HashMap<>();
|
Map<String,Object> params = new HashMap<>();
|
||||||
Map<String,Object> datas = new HashMap<>();
|
Map<String,Object> datas = new HashMap<>();
|
||||||
@@ -40,4 +40,17 @@ public class FlowCreateService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void flowStop(String flowName,String affairId,String member) throws Exception {
|
||||||
|
OaRestClient client = new OaRestClient(configProvider.getBizConfigByKey(AssetsTenantConstants.OA_HOST),
|
||||||
|
configProvider.getBizConfigByKey(AssetsTenantConstants.restName),
|
||||||
|
configProvider.getBizConfigByKey(AssetsTenantConstants.restPwd),false);
|
||||||
|
String url = "/affair/stop";
|
||||||
|
Map<String,Object> params = new HashMap<>();
|
||||||
|
params.put("affairId", affairId);
|
||||||
|
params.put("member", member);//当前处理人登录名;
|
||||||
|
OaResp oaResp = client.sendPost(flowName +"流程终止", url, params);
|
||||||
|
if(oaResp.getCode() != 0) {
|
||||||
|
throw new Exception(flowName + "流程终止失败:" + oaResp.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.seeyon.apps.assetstenant.node;
|
||||||
|
|
||||||
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
|
import com.seeyon.apps.common.workflow.node.ACommonSuperNode;
|
||||||
|
import com.seeyon.apps.ext.workflow.vo.FormDataVo;
|
||||||
|
import com.seeyon.apps.ext.workflow.vo.SuperNodeContext;
|
||||||
|
import com.seeyon.cap4.form.bean.FormDataMasterBean;
|
||||||
|
|
||||||
|
public class DisChargeFeeConfirmNode extends ACommonSuperNode {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return AssetsTenantConstants.getPluginId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getFormParse() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuperNodeContext proceed(String s, FormDataVo formDataVo, FormDataMasterBean formDataMasterBean) throws Exception {
|
||||||
|
SuperNodeContext context = new SuperNodeContext();
|
||||||
|
context.setNeedSave(true);
|
||||||
|
String nodeId = formDataVo.getToken();
|
||||||
|
formDataVo.getNewFieldDataMap().put("流程节点ID", nodeId);
|
||||||
|
return context.wait("等待租户确认");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNodeId() {
|
||||||
|
return "ndDis20260520";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNodeName() {
|
||||||
|
return "退租申请清退费用确认节点";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ package com.seeyon.apps.assetstenant.notice;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
||||||
import com.seeyon.ctp.common.AppContext;
|
import com.seeyon.ctp.common.AppContext;
|
||||||
@@ -21,7 +21,7 @@ public class NoticeService {
|
|||||||
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
private AttachmentManager attachmentManager = (AttachmentManager) AppContext.getBean("attachmentManager");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.NOTICEFORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.NOTICEFORMNO);
|
||||||
}
|
}
|
||||||
private TableContext getMasterTableContext() throws BusinessException {
|
private TableContext getMasterTableContext() throws BusinessException {
|
||||||
return FormTableExecutor.master(getFormNo());
|
return FormTableExecutor.master(getFormNo());
|
||||||
@@ -36,8 +36,8 @@ public class NoticeService {
|
|||||||
Long count = FormTableExecutor.count(getMasterTableContext(),null, conditions);
|
Long count = FormTableExecutor.count(getMasterTableContext(),null, conditions);
|
||||||
List<NoticeVo> vos = new ArrayList<>();
|
List<NoticeVo> vos = new ArrayList<>();
|
||||||
if(datas.size() > 0){
|
if(datas.size() > 0){
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
Map<String,Object> map = (Map<String, Object>) data;
|
Map<String,Object> map = data.getFieldsMap();
|
||||||
NoticeVo vo = new NoticeVo();
|
NoticeVo vo = new NoticeVo();
|
||||||
fillVo(map, vo);
|
fillVo(map, vo);
|
||||||
vos.add(vo);
|
vos.add(vo);
|
||||||
@@ -88,11 +88,11 @@ public class NoticeService {
|
|||||||
vo.setNoticeContent(getStringValue(fieldsMap,"招租公告"));
|
vo.setNoticeContent(getStringValue(fieldsMap,"招租公告"));
|
||||||
vo.setCreateTime(fieldsMap.get("申请日期") + "");
|
vo.setCreateTime(fieldsMap.get("申请日期") + "");
|
||||||
if(fieldsMap.get("相关附件") != null) {
|
if(fieldsMap.get("相关附件") != null) {
|
||||||
vo.setAttachments(OaFileVo.getInstance((Long)fieldsMap.get("相关附件"),attachmentManager));
|
vo.setAttachments(OaFileVo.getInstance(fieldsMap.get("相关附件"),attachmentManager));
|
||||||
}
|
}
|
||||||
if(fieldsMap.get("VR文件") != null) {
|
if(fieldsMap.get("VR文件") != null) {
|
||||||
|
|
||||||
vo.setImgs(OaFileVo.getInstance((Long)fieldsMap.get("VR文件"),attachmentManager));
|
vo.setImgs(OaFileVo.getInstance(fieldsMap.get("VR文件"),attachmentManager));
|
||||||
}
|
}
|
||||||
vo.setNoticeType("bussiness");
|
vo.setNoticeType("bussiness");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ 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.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.assetstenant.po.PageQueryVo;
|
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.AppContext;
|
||||||
import com.seeyon.ctp.common.exceptions.BusinessException;
|
import com.seeyon.ctp.common.exceptions.BusinessException;
|
||||||
import com.seeyon.utils.form.*;
|
import com.seeyon.utils.form.*;
|
||||||
@@ -20,7 +21,7 @@ public class ReserveService {
|
|||||||
private FormFactory factory = (FormFactory) AppContext.getBean("formFactory");
|
private FormFactory factory = (FormFactory) AppContext.getBean("formFactory");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.RESERVE_FORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.RESERVE_FORMNO);
|
||||||
}
|
}
|
||||||
private TableContext getMasterTableContext() throws BusinessException {
|
private TableContext getMasterTableContext() throws BusinessException {
|
||||||
return FormTableExecutor.master(getFormNo());
|
return FormTableExecutor.master(getFormNo());
|
||||||
@@ -35,8 +36,8 @@ public class ReserveService {
|
|||||||
List<FormColumn> datas = FormTableExecutor.pageQuery(getMasterTableContext(), null,conditions, pageNo, pageSize,true);
|
List<FormColumn> datas = FormTableExecutor.pageQuery(getMasterTableContext(), null,conditions, pageNo, pageSize,true);
|
||||||
Long count = FormTableExecutor.count(getMasterTableContext(),null, conditions);
|
Long count = FormTableExecutor.count(getMasterTableContext(),null, conditions);
|
||||||
if(datas.size() > 0){
|
if(datas.size() > 0){
|
||||||
for (Object data : datas) {
|
for (FormColumn data : datas) {
|
||||||
Map<String,Object> map = (Map<String, Object>) data;
|
Map<String,Object> map = data.getFieldsMap();
|
||||||
ReservationVo vo = new ReservationVo();
|
ReservationVo vo = new ReservationVo();
|
||||||
fillVo(map,vo);
|
fillVo(map,vo);
|
||||||
vos.add(vo);
|
vos.add(vo);
|
||||||
@@ -63,6 +64,13 @@ public class ReserveService {
|
|||||||
return count.intValue();
|
return count.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer countAll(JSONObject params) throws BusinessException {
|
||||||
|
List<FormWhereCondition> conditions = buildConditions(params);
|
||||||
|
TableContext tableContext = getMasterTableContext();
|
||||||
|
Long count = FormTableExecutor.count(tableContext,null, conditions);
|
||||||
|
return count.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
public void fillVo(Map<String, Object> fieldsMap,ReservationVo vo) throws Exception {
|
public void fillVo(Map<String, Object> fieldsMap,ReservationVo vo) throws Exception {
|
||||||
String assetsNo = getStringValue(fieldsMap,"资产编号");
|
String assetsNo = getStringValue(fieldsMap,"资产编号");
|
||||||
OaAssetsVo oaAssetsVo = assetsService.queryAssetsDetail(assetsNo);
|
OaAssetsVo oaAssetsVo = assetsService.queryAssetsDetail(assetsNo);
|
||||||
@@ -89,13 +97,40 @@ public class ReserveService {
|
|||||||
mainFormData.put("看房人手机号", params.getString("phone"));
|
mainFormData.put("看房人手机号", params.getString("phone"));
|
||||||
mainFormData.put("微信openId", params.getString("openId"));
|
mainFormData.put("微信openId", params.getString("openId"));
|
||||||
mainFormData.put("预约时间", params.getString("reserveTime"));
|
mainFormData.put("预约时间", params.getString("reserveTime"));
|
||||||
|
String tenantType = params.getString("tenantType");
|
||||||
|
if(StringUtils.isNotBlank(tenantType)) {
|
||||||
|
TableContext tableContext = getMasterTableContext();
|
||||||
|
FormTableBean tableBean = tableContext.getTableBean();
|
||||||
|
if("0".equals(tenantType)) {
|
||||||
|
mainFormData.put("客户属性",EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"客户属性","个人"));
|
||||||
|
}else {
|
||||||
|
mainFormData.put("客户属性",EnumMapUtils.getEnumItemValueByDisplayValue(tableBean,"客户属性","企业"));
|
||||||
|
}
|
||||||
|
}
|
||||||
String docNo = "weChat_" + UUID.randomUUID().toString().replace("-","");
|
String docNo = "weChat_" + UUID.randomUUID().toString().replace("-","");
|
||||||
mainFormData.put("档案编号",docNo);
|
mainFormData.put("档案编号",docNo);
|
||||||
|
mainFormData.put("运营类型",getManageType(params.getString("assetsNo")));
|
||||||
mainFormData.put("处理状态", EnumMapUtils.getEnumItemValueByDisplayValue(getMasterTableContext().getTableBean(), "处理状态", "未处理"));
|
mainFormData.put("处理状态", EnumMapUtils.getEnumItemValueByDisplayValue(getMasterTableContext().getTableBean(), "处理状态", "未处理"));
|
||||||
String loginName = configProvider.getBizConfigByKey(RentConstants.formLoginName);
|
String loginName = configProvider.getBizConfigByKey(AssetsTenantConstants.formLoginName);
|
||||||
FormSaveUtil.formSave(loginName,getFormNo(),factory,mainFormData,null);
|
FormSaveUtil.formSave(loginName,getFormNo(),factory,mainFormData,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getManageType(String assetsNo) throws Exception {
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("assetsNo", assetsNo);
|
||||||
|
OaAssetsVo oaAssetsVo = assetsService.queryAssetsDetail(param);
|
||||||
|
if(oaAssetsVo == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return oaAssetsVo.getManageType();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void cancelReserve(String id) throws BusinessException {
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
conditions.add(FormWhereCondition.build().display("ID").value(id));
|
||||||
|
FormTableExecutor.delete(getMasterTableContext(),conditions);
|
||||||
|
}
|
||||||
|
|
||||||
private List<FormWhereCondition> buildConditions(JSONObject params) {
|
private List<FormWhereCondition> buildConditions(JSONObject params) {
|
||||||
List<FormWhereCondition> conditions = new ArrayList<>();
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
if(StringUtils.isNotBlank(params.getString("openId"))){
|
if(StringUtils.isNotBlank(params.getString("openId"))){
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.seeyon.apps.assetstenant.utils;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.seeyon.aicloud.common.JsonUtils;
|
||||||
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
|
import org.apache.commons.httpclient.HttpStatus;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.apache.http.HttpResponse;
|
||||||
|
import org.apache.http.client.methods.HttpGet;
|
||||||
|
import org.apache.http.impl.client.DefaultHttpClient;
|
||||||
|
import org.apache.http.message.BasicHeader;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
|
import www.seeyon.com.utils.StringUtil;
|
||||||
|
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
public class ProtUtil {
|
||||||
|
|
||||||
|
private static final Log log = LogFactory.getLog(ProtUtil.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取一个token
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
* @throws FileNotFoundException
|
||||||
|
*/
|
||||||
|
private static String getToken(AssetsTenantConfigProvider configProvider, String oatokenurl, String restName, String restPassword, String loginName) throws FileNotFoundException, IOException {
|
||||||
|
String address = oatokenurl + restName + "/" + restPassword;
|
||||||
|
if(StringUtil.isNotEmpty(loginName)){
|
||||||
|
address = address +"?loginName="+loginName;
|
||||||
|
}
|
||||||
|
DefaultHttpClient client = new DefaultHttpClient();
|
||||||
|
String result = "";
|
||||||
|
HttpGet get = new HttpGet(address);
|
||||||
|
// 添加 Headers 信息
|
||||||
|
get.addHeader(new BasicHeader("Accept", "application/json"));
|
||||||
|
try {
|
||||||
|
HttpResponse res = client.execute(get);
|
||||||
|
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
|
||||||
|
result = EntityUtils.toString(res.getEntity());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
String token = "";
|
||||||
|
if(result.contains("{")) {
|
||||||
|
JSONObject jsObj = JSONObject.parseObject(result);
|
||||||
|
token = jsObj.get("id").toString();
|
||||||
|
}else {
|
||||||
|
token = result;
|
||||||
|
}
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用post接口
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String sendPostNotification(AssetsTenantConfigProvider configProvider,String params, String urlParam, String token) throws IOException {
|
||||||
|
String host = configProvider.getBizConfigByKey(AssetsTenantConstants.OA_HOST);
|
||||||
|
String tokenGetUrl = "/seeyon/rest/token/";
|
||||||
|
String restName = configProvider.getBizConfigByKey(AssetsTenantConstants.restName);
|
||||||
|
String restPwd = configProvider.getBizConfigByKey(AssetsTenantConstants.restPwd);
|
||||||
|
String oatoken = getToken(configProvider,host + tokenGetUrl,restName,restPwd,null);
|
||||||
|
String url = host + urlParam+ token+"?token="+oatoken;
|
||||||
|
log.info("调用恢复超级节点接口请求地址为: " + url);
|
||||||
|
String respStr = HttpClient.httpPostRaw(url, params, null, null);
|
||||||
|
log.info("调用恢复超级节点接口响应结果: " + respStr);
|
||||||
|
if(!"1".equals(respStr)) {
|
||||||
|
Map map = JsonUtils.parseObject(respStr, Map.class);
|
||||||
|
throw new RuntimeException("恢复阻塞的超级节点失败: " + map.get("message"));
|
||||||
|
}
|
||||||
|
return respStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,18 +3,17 @@ package com.seeyon.apps.assetstenant.viewrecord;
|
|||||||
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.config.AssetsTenantConfigProvider;
|
import com.seeyon.apps.assetstenant.config.AssetsTenantConfigProvider;
|
||||||
import com.seeyon.apps.assetstenant.constants.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
|
import com.seeyon.cap4.form.bean.FormTableBean;
|
||||||
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;
|
||||||
import com.seeyon.utils.form.FormSaveUtil;
|
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 java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public class ViewRecordService extends BaseResource {
|
public class ViewRecordService extends BaseResource {
|
||||||
|
|
||||||
@@ -23,7 +22,7 @@ public class ViewRecordService extends BaseResource {
|
|||||||
private FormFactory factory = (FormFactory) AppContext.getBean("formFactory");
|
private FormFactory factory = (FormFactory) AppContext.getBean("formFactory");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.VIEWRECORD_FORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.VIEWRECORD_FORMNO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void record(JSONObject params) throws Exception {
|
public void record(JSONObject params) throws Exception {
|
||||||
@@ -35,7 +34,22 @@ public class ViewRecordService extends BaseResource {
|
|||||||
String docNo = "weChat_" + UUID.randomUUID().toString().replace("-","");
|
String docNo = "weChat_" + UUID.randomUUID().toString().replace("-","");
|
||||||
mainFormData.put("档案编号",docNo);
|
mainFormData.put("档案编号",docNo);
|
||||||
mainFormData.put("浏览时间",df.format(new Date()));
|
mainFormData.put("浏览时间",df.format(new Date()));
|
||||||
String loginName = configProvider.getBizConfigByKey(RentConstants.formLoginName);
|
String loginName = configProvider.getBizConfigByKey(AssetsTenantConstants.formLoginName);
|
||||||
FormSaveUtil.formSave(loginName,getFormNo(),factory,mainFormData,null);
|
FormSaveUtil.formSave(loginName,getFormNo(),factory,mainFormData,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<FormWhereCondition> buildConditions(JSONObject params) {
|
||||||
|
List<FormWhereCondition> conditions = new ArrayList<>();
|
||||||
|
if (StringUtils.isNotBlank(params.getString("phone"))) {
|
||||||
|
conditions.add(FormWhereCondition.build().display("浏览人手机号").value(params.getString("phone")));
|
||||||
|
}
|
||||||
|
return conditions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer countViewHistory(JSONObject params) throws Exception {
|
||||||
|
TableContext tableContext = FormTableExecutor.master(getFormNo());
|
||||||
|
List<FormWhereCondition> conditions = buildConditions(params);
|
||||||
|
Long count = FormTableExecutor.count(tableContext, null, conditions);
|
||||||
|
return count.intValue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.seeyon.apps.assetstenant.weappconfig;
|
|||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.seeyon.aicloud.common.JsonUtils;
|
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.RentConstants;
|
import com.seeyon.apps.assetstenant.constants.AssetsTenantConstants;
|
||||||
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
import com.seeyon.apps.assetstenant.file.OaFileVo;
|
||||||
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;
|
||||||
@@ -22,7 +22,7 @@ public class WeAppConfigService {
|
|||||||
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
private AssetsTenantConfigProvider configProvider = (AssetsTenantConfigProvider) AppContext.getBean("assetsTenantConfigProvider");
|
||||||
|
|
||||||
private String getFormNo() {
|
private String getFormNo() {
|
||||||
return configProvider.getBizConfigByKey(RentConstants.WEAPPCONFIGFORMNO);
|
return configProvider.getBizConfigByKey(AssetsTenantConstants.WEAPPCONFIGFORMNO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TableContext getMasterTableContext() throws BusinessException {
|
private TableContext getMasterTableContext() throws BusinessException {
|
||||||
@@ -48,7 +48,7 @@ public class WeAppConfigService {
|
|||||||
}
|
}
|
||||||
BannerConfigVo bannerConfigVo = new BannerConfigVo();
|
BannerConfigVo bannerConfigVo = new BannerConfigVo();
|
||||||
if(fieldsMap.get("图片") != null) {
|
if(fieldsMap.get("图片") != null) {
|
||||||
bannerConfigVo.setImg(OaFileVo.getInstance(Long.parseLong((String)fieldsMap.get("图片")),attachmentManager));
|
bannerConfigVo.setImg(OaFileVo.getInstance(fieldsMap.get("图片"),attachmentManager));
|
||||||
}
|
}
|
||||||
bannerConfigVo.setFormId(formColumn.getId());
|
bannerConfigVo.setFormId(formColumn.getId());
|
||||||
bannerConfigVo.setShowStatus((String)fieldsMap.get("显示状态"));
|
bannerConfigVo.setShowStatus((String)fieldsMap.get("显示状态"));
|
||||||
@@ -60,8 +60,8 @@ public class WeAppConfigService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getAssetsTypeList() throws BusinessException {
|
public List<String> getAssetsTypeList() throws BusinessException {
|
||||||
TableContext tableContext = getMasterTableContext();
|
TableContext tableContext = FormTableExecutor.master(configProvider.getBizConfigByKey(AssetsTenantConstants.ASSETS_FORMNO));
|
||||||
Set<String> sets = EnumMapUtils.getEnumItemValues(tableContext.getTableBean(), "资产类型");
|
Set<String> sets = EnumMapUtils.getEnumItemValues(tableContext.getTableBean(), "资产二级类型");
|
||||||
return new ArrayList<>(sets);
|
return new ArrayList<>(sets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,9 @@ import com.seeyon.apps.assetstenant.bill.WaeBillService;
|
|||||||
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;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.ws.rs.POST;
|
import javax.ws.rs.*;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.core.Context;
|
||||||
import javax.ws.rs.Produces;
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@@ -69,20 +68,6 @@ public class BillResource extends BaseResource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
|
||||||
@Path("/pay/callback")
|
|
||||||
@Produces({"application/json"})
|
|
||||||
@Consumes({"application/json"})
|
|
||||||
public Response onlinePayCallback(JSONObject params) throws IOException {
|
|
||||||
log.info("支付回调信息参数为:"+params);
|
|
||||||
try{
|
|
||||||
return success(waeBillService.pageQueryWaeBill(params));
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error(e.getMessage(),e);
|
|
||||||
return fail(e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/countUnpay/rent")
|
@Path("/countUnpay/rent")
|
||||||
@Produces({"application/json"})
|
@Produces({"application/json"})
|
||||||
@@ -98,6 +83,21 @@ public class BillResource extends BaseResource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/countAllPayHistory")
|
||||||
|
@Produces({"application/json"})
|
||||||
|
@Consumes({"application/json"})
|
||||||
|
public Response countAllPayHistory(JSONObject params) throws IOException {
|
||||||
|
log.info("统计交易数量:" + params, new Object[0]);
|
||||||
|
|
||||||
|
try {
|
||||||
|
return this.success(feeRecordService.countAll(params));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), new Object[]{e});
|
||||||
|
return this.fail(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/countUnpay/wae")
|
@Path("/countUnpay/wae")
|
||||||
@Produces({"application/json"})
|
@Produces({"application/json"})
|
||||||
@@ -113,4 +113,38 @@ public class BillResource extends BaseResource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/contractBill/baseInfoList")
|
||||||
|
@Produces({"application/json"})
|
||||||
|
public Response queryContractBillBaseInfo(@Context HttpServletRequest request) throws IOException {
|
||||||
|
String contractNo = request.getParameter("contractNo");
|
||||||
|
log.info("查询合同账单基本信息的参数:" + contractNo, new Object[0]);
|
||||||
|
|
||||||
|
try {
|
||||||
|
return this.success(billService.queryContractPayBaseInfoList(contractNo));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), new Object[]{e});
|
||||||
|
return this.fail(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/pay/callback")
|
||||||
|
@Produces({"application/json"})
|
||||||
|
@Consumes({"application/json"})
|
||||||
|
public Response onlinePayCallback(JSONObject params) throws IOException {
|
||||||
|
String billNo = params.getString("billNo");
|
||||||
|
String bizType = params.getString("bizType");
|
||||||
|
String payDate = params.getString("payDate");
|
||||||
|
log.info("支付回调信息参数为:"+ billNo +"," + bizType + "," + payDate);
|
||||||
|
try{
|
||||||
|
feeRecordService.payCallBack(billNo,bizType,payDate);
|
||||||
|
return this.success("回调处理成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
return fail(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,4 +61,18 @@ public class CommunityResource extends BaseResource {
|
|||||||
return fail(e.getMessage());
|
return fail(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/layout/queryList")
|
||||||
|
@Produces({"application/json"})
|
||||||
|
@Consumes({"application/json"})
|
||||||
|
public Response queryList(JSONObject params) throws IOException {
|
||||||
|
log.info("查询户型信息参数为:"+params);
|
||||||
|
try{
|
||||||
|
return success(communityService.getLayoutList(params));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
return fail(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,4 +30,5 @@ public class FileTransportResource extends BaseResource {
|
|||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,9 @@ import com.seeyon.apps.assetstenant.reserve.ReserveService;
|
|||||||
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;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.ws.rs.POST;
|
import javax.ws.rs.*;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.core.Context;
|
||||||
import javax.ws.rs.Produces;
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@@ -52,6 +51,20 @@ public class ReserveResource extends BaseResource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/countAll")
|
||||||
|
@Produces({"application/json"})
|
||||||
|
@Consumes({"application/json"})
|
||||||
|
public Response countAll(JSONObject params) throws IOException {
|
||||||
|
log.info("统计所有预约数量:"+params);
|
||||||
|
try{
|
||||||
|
return success(reserveService.countAll(params));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
return fail(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/apply")
|
@Path("/apply")
|
||||||
@Produces({"application/json"})
|
@Produces({"application/json"})
|
||||||
@@ -67,4 +80,19 @@ public class ReserveResource extends BaseResource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/cancel")
|
||||||
|
@Produces({"application/json"})
|
||||||
|
public Response cancel(@Context HttpServletRequest request) throws IOException {
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
log.info("取消预约看房参数为:"+ id);
|
||||||
|
try{
|
||||||
|
reserveService.cancelReserve(id);
|
||||||
|
return success("取消成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
return fail(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,4 +36,18 @@ public class ViewRecordResource extends BaseResource {
|
|||||||
return fail(e.getMessage());
|
return fail(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/countViewHistory")
|
||||||
|
@Produces({"application/json"})
|
||||||
|
@Consumes({"application/json"})
|
||||||
|
public Response countViewHistory(JSONObject params) throws IOException {
|
||||||
|
log.info("统计浏览记录:"+params);
|
||||||
|
try{
|
||||||
|
return success(viewRecordService.countViewHistory(params));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
return fail(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user