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

master
jiyufei 3 months ago
parent 42b2a45093
commit ad63e25c04

@ -53,4 +53,12 @@ public interface ContractService extends IService<ContractEntity> {
* @return string * @return string
*/ */
String finish(ContractRequest request); 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 * @param parkId id
*/ */
void updateStatus(String contractStatus, String contractName, String parkId); 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); ContractEntity entity = JsonUtil.getJsonToBean(contractForm, ContractEntity.class);
//todo 设置园区名称 //todo 设置园区名称
//商户名称
String merchantName = enterpriseMerchantsService.findNameById(contractForm.getMerchantName().toString());
if (isSave) { if (isSave) {
//获取当前年月日 //获取当前年月日
String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
@ -521,6 +522,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
} else { } else {
entity.setCreationTime(DateUtil.getNowDate()); entity.setCreationTime(DateUtil.getNowDate());
} }
//字段设置错误 由于代码已经修改极大部分 所以将商户id以及name反过来使用
entity.setMerchantId(merchantName);
this.saveOrUpdate(entity); this.saveOrUpdate(entity);
//Spacecontract子表数据新增修改 //Spacecontract子表数据新增修改
@ -601,4 +604,13 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
} }
return "合同结束成功"; 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.base.UserInfo;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/** /**
* DecorationApplicationForm * DecorationApplicationForm
* V3.5 * V3.5
@ -60,6 +62,12 @@ public class DecorationApplicationFormServiceImpl extends ServiceImpl<Decoration
@Autowired @Autowired
private UserProvider userProvider; private UserProvider userProvider;
@Resource
private EnterpriseMerchantsService enterpriseMerchantsService;
@Resource
private ContractService contractService;
@Override @Override
public List<DecorationApplicationFormEntity> getList(DecorationApplicationFormPagination decorationApplicationFormPagination) { public List<DecorationApplicationFormEntity> getList(DecorationApplicationFormPagination decorationApplicationFormPagination) {
return getTypeList(decorationApplicationFormPagination, decorationApplicationFormPagination.getDataType()); return getTypeList(decorationApplicationFormPagination, decorationApplicationFormPagination.getDataType());
@ -355,6 +363,10 @@ public class DecorationApplicationFormServiceImpl extends ServiceImpl<Decoration
generaterSwapUtil.swapDatetime(DecorationApplicationFormConstant.getFormData(), decorationApplicationFormForm), DecorationApplicationFormForm.class); generaterSwapUtil.swapDatetime(DecorationApplicationFormConstant.getFormData(), decorationApplicationFormForm), DecorationApplicationFormForm.class);
DecorationApplicationFormEntity entity = JsonUtil.getJsonToBean(decorationApplicationFormForm, DecorationApplicationFormEntity.class); DecorationApplicationFormEntity entity = JsonUtil.getJsonToBean(decorationApplicationFormForm, DecorationApplicationFormEntity.class);
//todo 需要更新空间信息 //todo 需要更新空间信息
//商户名称
String merchantName = enterpriseMerchantsService.findNameById(decorationApplicationFormForm.getMerchantId());
//合同名称
String contractName = contractService.findNameById(decorationApplicationFormForm.getContractId());
if (isSave) { if (isSave) {
//获取当前年月日 //获取当前年月日
String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
@ -367,6 +379,8 @@ public class DecorationApplicationFormServiceImpl extends ServiceImpl<Decoration
} else { } else {
entity.setCreationTime(DateUtil.getNowDate()); entity.setCreationTime(DateUtil.getNowDate());
} }
entity.setMerchantName(merchantName);
entity.setContractName(contractName);
this.saveOrUpdate(entity); this.saveOrUpdate(entity);
} }

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

@ -45,6 +45,8 @@ import java.util.*;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/** /**
* VenueReservationRecord * VenueReservationRecord
* V3.5 * V3.5
@ -60,6 +62,9 @@ public class VenueReservationRecordServiceImpl extends ServiceImpl<VenueReservat
@Autowired @Autowired
private UserProvider userProvider; private UserProvider userProvider;
@Resource
private EnterpriseMerchantsService enterpriseMerchantsService;
@Override @Override
public List<VenueReservationRecordEntity> getList(VenueReservationRecordPagination venueReservationRecordPagination) { public List<VenueReservationRecordEntity> getList(VenueReservationRecordPagination venueReservationRecordPagination) {
return getTypeList(venueReservationRecordPagination, venueReservationRecordPagination.getDataType()); return getTypeList(venueReservationRecordPagination, venueReservationRecordPagination.getDataType());
@ -355,6 +360,8 @@ public class VenueReservationRecordServiceImpl extends ServiceImpl<VenueReservat
generaterSwapUtil.swapDatetime(VenueReservationRecordConstant.getFormData(), venueReservationRecordForm), VenueReservationRecordForm.class); generaterSwapUtil.swapDatetime(VenueReservationRecordConstant.getFormData(), venueReservationRecordForm), VenueReservationRecordForm.class);
VenueReservationRecordEntity entity = JsonUtil.getJsonToBean(venueReservationRecordForm, VenueReservationRecordEntity.class); VenueReservationRecordEntity entity = JsonUtil.getJsonToBean(venueReservationRecordForm, VenueReservationRecordEntity.class);
//todo 更新空间表 //todo 更新空间表
//商户名称
String merchantName = enterpriseMerchantsService.findNameById(venueReservationRecordForm.getMerchantId());
if (isSave) { if (isSave) {
//获取当前年月日 //获取当前年月日
String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
@ -367,6 +374,7 @@ public class VenueReservationRecordServiceImpl extends ServiceImpl<VenueReservat
} else { } else {
entity.setCreationTime(DateUtil.getNowDate()); entity.setCreationTime(DateUtil.getNowDate());
} }
entity.setMerchantName(merchantName);
this.saveOrUpdate(entity); 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" },], 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" }, { "label": "商户名称", "value": "merchant_id" }, { "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" },], spaceIdcolumnOptions: [{ "label": "空间编码", "value": "code" }, { "label": "空间名称", "value": "name" }, { "label": "空间面积", "value": "space_area" }, { "label": "空间状态", "value": "state_cn" },],
isTheDepositRefundedOptions: [{ "fullName": "是", "id": "1" }, { "fullName": "否", "id": "2" }], isTheDepositRefundedOptions: [{ "fullName": "是", "id": "1" }, { "fullName": "否", "id": "2" }],
isTheDepositRefundedProps: { "label": "fullName", "value": "id" }, isTheDepositRefundedProps: { "label": "fullName", "value": "id" },
decorationProgressOptions: [{ "fullName": "待装修", "id": "1" }, { "fullName": "装修中", "id": "2" }, { "fullName": "已装修", "id": "3" }], 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" },], 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" }], leaseStatusOptions: [{ "fullName": "已租", "id": "1" }, { "fullName": "归还", "id": "2" }],
leaseStatusProps: { "label": "fullName", "value": "id" }, leaseStatusProps: { "label": "fullName", "value": "id" },
returnStatusOptions: [{ "fullName": "正常", "id": "1" }, { "fullName": "异常", "id": "2" }], 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" },], 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" },], spaceIdcolumnOptions: [{ "label": "空间编码", "value": "code" }, { "label": "空间名称", "value": "name" }, { "label": "空间面积", "value": "space_area" }, { "label": "空间状态", "value": "state_cn" },],
usageProgressOptions: [{ "fullName": "预约中", "id": "1" }, { "fullName": "已结束", "id": "2" }], usageProgressOptions: [{ "fullName": "预约中", "id": "1" }, { "fullName": "已结束", "id": "2" }],
usageProgressProps: { "label": "fullName", "value": "id" }, usageProgressProps: { "label": "fullName", "value": "id" },
childIndex: -1, childIndex: -1,

Loading…
Cancel
Save