|
@@ -164,9 +164,9 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(customerManagementId);
|
|
|
String groupId = customerManagement.getGroupId();
|
|
|
String discId = customerManagement.getDiscId();
|
|
|
- // 查找这个小区已收取意向金的 数据量
|
|
|
+ // 查找已收取意向金的 数据量
|
|
|
IntentionalDepositExample example = new IntentionalDepositExample();
|
|
|
- example.createCriteria().andGroupIdEqualTo(groupId);
|
|
|
+// example.createCriteria().andGroupIdEqualTo(groupId);
|
|
|
Long count = countByExample(example);
|
|
|
String number = "";
|
|
|
if (count.doubleValue() == 0) {
|
|
@@ -175,9 +175,10 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
count++;
|
|
|
number = String.format("%05d", count);
|
|
|
}
|
|
|
- ParkInfo parkInfo = parkInfoMapper.selectByPrimaryKey(groupId);
|
|
|
- ParkFloorDisc parkFloorDisc = parkFloorDiscMapper.selectByPrimaryKey(discId);
|
|
|
- String serialNumber = parkInfo.getGroupName() + parkFloorDisc.getName() + "-YXJ" + number;
|
|
|
+// ParkInfo parkInfo = parkInfoMapper.selectByPrimaryKey(groupId);
|
|
|
+// ParkFloorDisc parkFloorDisc = parkFloorDiscMapper.selectByPrimaryKey(discId);
|
|
|
+// String serialNumber = parkInfo.getGroupName() + parkFloorDisc.getName() + "-YXJ" + number;
|
|
|
+ String serialNumber = "YXJ" + number;
|
|
|
return serialNumber;
|
|
|
}
|
|
|
|
|
@@ -187,9 +188,9 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
* @param id
|
|
|
* @return
|
|
|
*/
|
|
|
- public String getDepositSerialNumber(String id) {
|
|
|
+ public String getDepositSerialNumber(IntentionalDeposit deposit) {
|
|
|
|
|
|
- IntentionalDeposit deposit = selectByPrimaryKey(id);
|
|
|
+// IntentionalDeposit deposit = selectByPrimaryKey(id);
|
|
|
String groupId = deposit.getGroupId();
|
|
|
String discId = deposit.getDiscId();
|
|
|
ParkInfo parkInfo = parkInfoMapper.selectByPrimaryKey(groupId);
|
|
@@ -224,6 +225,8 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
}
|
|
|
CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(model.getCustomerManagementId());
|
|
|
String id = IdUtil.simpleUUID();
|
|
|
+ // 重新获取流水号
|
|
|
+ String serialNumber = getSerialNumber(model.getCustomerManagementId());
|
|
|
// 已收取
|
|
|
model.setStatus(1);
|
|
|
model.setGroupId(customerManagement.getGroupId());
|
|
@@ -231,6 +234,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
model.setCreatedAt(new Date());
|
|
|
model.setCreatedId(userId);
|
|
|
model.setId(id);
|
|
|
+ model.setSerialNumber(serialNumber);
|
|
|
int result = insertWithoutId(model);
|
|
|
|
|
|
// 票据管理 新增一条记录
|
|
@@ -373,19 +377,27 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
if (StringUtils.isEmpty(uerId)){
|
|
|
uerId = ShiroUtils.getUserId();
|
|
|
}
|
|
|
+ String houseId = model.getHouseId();
|
|
|
+ ParkRoomResponse response = roomExtendMapper.getFullName(houseId);
|
|
|
+ //重新获取定金编号
|
|
|
+ model.setDiscId(response.getDiscId());
|
|
|
+ model.setGroupId(response.getGroupId());
|
|
|
+ String depositSerialNumber = getDepositSerialNumber(model);
|
|
|
+ model.setDepositSerialNumber(depositSerialNumber);
|
|
|
+
|
|
|
String roomSelectionInfoId;
|
|
|
RoomSelectionInfo roomSelectionInfo;
|
|
|
- String houseId = model.getHouseId();
|
|
|
String customerManagementId = model.getCustomerManagementId();
|
|
|
|
|
|
+ // 更新客户信息
|
|
|
CustomerManagement customerManagement = customerManagementMapper.selectByPrimaryKey(customerManagementId);
|
|
|
// 购房状态 已订房
|
|
|
customerManagement.setStatus(7);
|
|
|
customerManagement.setHouseId(houseId);
|
|
|
+ customerManagement.setDiscId(response.getDiscId());
|
|
|
+ customerManagement.setGroupId(response.getGroupId());
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
-
|
|
|
// 拼接房屋名称
|
|
|
- ParkRoomResponse response = roomExtendMapper.getFullName(houseId);
|
|
|
builder.append(response.getBuildName()).append("-").append(response.getRoomNo()).append(",");
|
|
|
if (builder.length() > 0) {
|
|
|
builder.deleteCharAt(builder.length() - 1);
|
|
@@ -393,6 +405,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
customerManagement.setHouseName(builder.toString());
|
|
|
customerManagementMapper.updateByPrimaryKeySelective(customerManagement);
|
|
|
|
|
|
+ // 更新定金信息
|
|
|
RoomSelectionInfoExample roomSelectionInfoExample = new RoomSelectionInfoExample();
|
|
|
roomSelectionInfoExample.createCriteria().andCustomerManagementIdEqualTo(customerManagementId);
|
|
|
List<RoomSelectionInfo> list = roomSelectionInfoMapper.selectByExample(roomSelectionInfoExample);
|