feat(contract):装修申请、场地预约前后端代码提交;

master
jiyufei 3 months ago
parent 42b2a45093
commit ad63e25c04

@ -53,4 +53,12 @@ public interface ContractService extends IService<ContractEntity> {
* @return string
*/
String finish(ContractRequest request);
/**
* id
*
* @param id id
* @return name
*/
String findNameById(String id);
}

@ -42,4 +42,12 @@ public interface EnterpriseMerchantsService extends IService<EnterpriseMerchants
* @param parkId id
*/
void updateStatus(String contractStatus, String contractName, String parkId);
/**
* id
*
* @param id id
* @return name
*/
String findNameById(String id);
}

@ -509,7 +509,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
ContractEntity entity = JsonUtil.getJsonToBean(contractForm, ContractEntity.class);
//todo 设置园区名称
//商户名称
String merchantName = enterpriseMerchantsService.findNameById(contractForm.getMerchantName().toString());
if (isSave) {
//获取当前年月日
String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
@ -521,6 +522,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
} else {
entity.setCreationTime(DateUtil.getNowDate());
}
//字段设置错误 由于代码已经修改极大部分 所以将商户id以及name反过来使用
entity.setMerchantId(merchantName);
this.saveOrUpdate(entity);
//Spacecontract子表数据新增修改
@ -601,4 +604,13 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
}
return "合同结束成功";
}
@Override
public String findNameById(String id) {
ContractEntity contract = this.getById(id);
if (ObjectUtil.isNull(contract)) {
return "";
}
return contract.getContractName();
}
}

@ -45,6 +45,8 @@ import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/**
* DecorationApplicationForm
* V3.5
@ -60,6 +62,12 @@ public class DecorationApplicationFormServiceImpl extends ServiceImpl<Decoration
@Autowired
private UserProvider userProvider;
@Resource
private EnterpriseMerchantsService enterpriseMerchantsService;
@Resource
private ContractService contractService;
@Override
public List<DecorationApplicationFormEntity> getList(DecorationApplicationFormPagination decorationApplicationFormPagination) {
return getTypeList(decorationApplicationFormPagination, decorationApplicationFormPagination.getDataType());
@ -355,6 +363,10 @@ public class DecorationApplicationFormServiceImpl extends ServiceImpl<Decoration
generaterSwapUtil.swapDatetime(DecorationApplicationFormConstant.getFormData(), decorationApplicationFormForm), DecorationApplicationFormForm.class);
DecorationApplicationFormEntity entity = JsonUtil.getJsonToBean(decorationApplicationFormForm, DecorationApplicationFormEntity.class);
//todo 需要更新空间信息
//商户名称
String merchantName = enterpriseMerchantsService.findNameById(decorationApplicationFormForm.getMerchantId());
//合同名称
String contractName = contractService.findNameById(decorationApplicationFormForm.getContractId());
if (isSave) {
//获取当前年月日
String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
@ -367,6 +379,8 @@ public class DecorationApplicationFormServiceImpl extends ServiceImpl<Decoration
} else {
entity.setCreationTime(DateUtil.getNowDate());
}
entity.setMerchantName(merchantName);
entity.setContractName(contractName);
this.saveOrUpdate(entity);
}

@ -429,4 +429,13 @@ public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMercha
entity.setParkId(parkId);
this.updateById(entity);
}
@Override
public String findNameById(String id) {
EnterpriseMerchantsEntity merchants = this.getById(id);
if (ObjectUtil.isNull(merchants)) {
return "";
}
return merchants.getCmpNm();
}
}

@ -64,6 +64,9 @@ public class EquipmentRentalRecordsServiceImpl extends ServiceImpl<EquipmentRent
@Resource
private EquipmentService equipmentService;
@Resource
private EnterpriseMerchantsService enterpriseMerchantsService;
@Override
public List<EquipmentRentalRecordsEntity> getList(EquipmentRentalRecordsPagination equipmentRentalRecordsPagination) {
return getTypeList(equipmentRentalRecordsPagination, equipmentRentalRecordsPagination.getDataType());
@ -311,7 +314,7 @@ public class EquipmentRentalRecordsServiceImpl extends ServiceImpl<EquipmentRent
public String update(String id, EquipmentRentalRecordsEntity entity) {
//判断设备是否是可用状态
EquipmentEntity equipment = equipmentService.getById(entity.getEquipmentId());
if ("1".equals(equipment.getStatus())){
if ("1".equals(equipment.getStatus())) {
return "该设备未归还,不可删除!";
}
//异步更改状态
@ -372,13 +375,14 @@ public class EquipmentRentalRecordsServiceImpl extends ServiceImpl<EquipmentRent
equipmentRentalRecordsForm = JsonUtil.getJsonToBean(
generaterSwapUtil.swapDatetime(EquipmentRentalRecordsConstant.getFormData(), equipmentRentalRecordsForm), EquipmentRentalRecordsForm.class);
EquipmentRentalRecordsEntity entity = JsonUtil.getJsonToBean(equipmentRentalRecordsForm, EquipmentRentalRecordsEntity.class);
if (isSave) {
//查询设备
EquipmentEntity equipment = equipmentService.getById(equipmentRentalRecordsForm.getEquipmentId());
if (ObjectUtil.isNotNull(equipment)){
if (ObjectUtil.isNotNull(equipment)) {
entity.setEquipmentCoding(equipment.getCode());
entity.setEquipmentName(equipment.getName());
}
String merchantName = enterpriseMerchantsService.findNameById(equipmentRentalRecordsForm.getMerchantId());
if (isSave) {
//查询设备
String mainId = RandomUtil.uuId();
entity.setCreationTime(DateUtil.getNowDate());
entity.setId(mainId);
@ -390,6 +394,7 @@ public class EquipmentRentalRecordsServiceImpl extends ServiceImpl<EquipmentRent
} else {
entity.setCreationTime(DateUtil.getNowDate());
}
entity.setMerchantName(merchantName);
boolean result = this.saveOrUpdate(entity);
if (result) {
String status;

@ -45,6 +45,8 @@ import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/**
* VenueReservationRecord
* V3.5
@ -60,6 +62,9 @@ public class VenueReservationRecordServiceImpl extends ServiceImpl<VenueReservat
@Autowired
private UserProvider userProvider;
@Resource
private EnterpriseMerchantsService enterpriseMerchantsService;
@Override
public List<VenueReservationRecordEntity> getList(VenueReservationRecordPagination venueReservationRecordPagination) {
return getTypeList(venueReservationRecordPagination, venueReservationRecordPagination.getDataType());
@ -355,6 +360,8 @@ public class VenueReservationRecordServiceImpl extends ServiceImpl<VenueReservat
generaterSwapUtil.swapDatetime(VenueReservationRecordConstant.getFormData(), venueReservationRecordForm), VenueReservationRecordForm.class);
VenueReservationRecordEntity entity = JsonUtil.getJsonToBean(venueReservationRecordForm, VenueReservationRecordEntity.class);
//todo 更新空间表
//商户名称
String merchantName = enterpriseMerchantsService.findNameById(venueReservationRecordForm.getMerchantId());
if (isSave) {
//获取当前年月日
String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
@ -367,6 +374,7 @@ public class VenueReservationRecordServiceImpl extends ServiceImpl<VenueReservat
} else {
entity.setCreationTime(DateUtil.getNowDate());
}
entity.setMerchantName(merchantName);
this.saveOrUpdate(entity);
}

@ -288,9 +288,9 @@ export default {
},
],
},
merchantIdcolumnOptions: [{ "label": "公司编码", "value": "cmp_no" }, { "label": "公司名称", "value": "cmp_nm" }, { "label": "入驻状态", "value": "entry_status" }, { "label": "园区名称", "value": "park_name" },],
contractIdcolumnOptions: [{ "label": "合同编码", "value": "contract_number" }, { "label": "合同名称", "value": "contract_name" }, { "label": "合同状态", "value": "contract_status" }, { "label": "商户名称", "value": "merchant_id" }, { "label": "园区名称", "value": "park_name" },],
spaceIdcolumnOptions: [{ "label": "空间编码", "value": "code" }, { "label": "空间名称", "value": "name" }, { "label": "空间面积", "value": "space_area" }, { "label": "空间状态", "value": "state" },],
merchantIdcolumnOptions: [{ "label": "公司编码", "value": "cmp_no" }, { "label": "公司名称", "value": "cmp_nm" }, { "label": "入驻状态", "value": "entry_status_cn" }, { "label": "园区名称", "value": "park_name" },],
contractIdcolumnOptions: [{ "label": "合同编码", "value": "contract_number" }, { "label": "合同名称", "value": "contract_name" }, { "label": "合同状态", "value": "contract_status_cn" }, { "label": "商户名称", "value": "merchant_id" }, { "label": "园区名称", "value": "park_name" },],
spaceIdcolumnOptions: [{ "label": "空间编码", "value": "code" }, { "label": "空间名称", "value": "name" }, { "label": "空间面积", "value": "space_area" }, { "label": "空间状态", "value": "state_cn" },],
isTheDepositRefundedOptions: [{ "fullName": "是", "id": "1" }, { "fullName": "否", "id": "2" }],
isTheDepositRefundedProps: { "label": "fullName", "value": "id" },
decorationProgressOptions: [{ "fullName": "待装修", "id": "1" }, { "fullName": "装修中", "id": "2" }, { "fullName": "已装修", "id": "3" }],

@ -280,7 +280,7 @@ export default {
],
},
equipmentIdcolumnOptions: [{ "label": "设备编码", "value": "code" }, { "label": "设备名称", "value": "name" }, { "label": "设备品牌", "value": "brand" }, { "label": "设备型号", "value": "model" }, { "label": "供应商", "value": "supplier" },],
merchantIdcolumnOptions: [{ "label": "公司名称", "value": "cmp_nm" }, { "label": "公司类型", "value": "comp_type" }, { "label": "成立日期", "value": "incorporation_date" }, { "label": "办公地址", "value": "office_address" },],
merchantIdcolumnOptions: [{ "label": "公司名称", "value": "cmp_nm" }, { "label": "公司类型", "value": "comp_type_cn" }, { "label": "成立日期", "value": "incorporation_date" }, { "label": "办公地址", "value": "office_address" },],
leaseStatusOptions: [{ "fullName": "已租", "id": "1" }, { "fullName": "归还", "id": "2" }],
leaseStatusProps: { "label": "fullName", "value": "id" },
returnStatusOptions: [{ "fullName": "正常", "id": "1" }, { "fullName": "异常", "id": "2" }],

@ -249,8 +249,8 @@ export default {
},
],
},
merchantIdcolumnOptions: [{ "label": "公司编码", "value": "cmp_no" }, { "label": "公司名称", "value": "cmp_nm" }, { "label": "入状态", "value": "entry_status" }, { "label": "园区名称", "value": "park_name" },],
spaceIdcolumnOptions: [{ "label": "空间编码", "value": "code" }, { "label": "空间名称", "value": "name" }, { "label": "空间面积", "value": "space_area" }, { "label": "空间状态", "value": "state" },],
merchantIdcolumnOptions: [{ "label": "公司编码", "value": "cmp_no" }, { "label": "公司名称", "value": "cmp_nm" }, { "label": "入状态", "value": "entry_status_cn" }, { "label": "园区名称", "value": "park_name" },],
spaceIdcolumnOptions: [{ "label": "空间编码", "value": "code" }, { "label": "空间名称", "value": "name" }, { "label": "空间面积", "value": "space_area" }, { "label": "空间状态", "value": "state_cn" },],
usageProgressOptions: [{ "fullName": "预约中", "id": "1" }, { "fullName": "已结束", "id": "2" }],
usageProgressProps: { "label": "fullName", "value": "id" },
childIndex: -1,

Loading…
Cancel
Save