| | |
| | | * @param assetImportLogDetailDto |
| | | */ |
| | | private void doImportData(AssetImportLogDetailDto assetImportLogDetailDto) { |
| | | |
| | | String test = ""; |
| | | int a = 6; |
| | | JSONArray objects = JSONObject.parseArray(assetImportLogDetailDto.getContent()); |
| | | |
| | | // if (Vtil.defaultValue(objects.get(11)) == null) { |
| | | if (Vtil.defaultValue(objects.get(11)) == null) { |
| | | objects.set(11, "无名"); |
| | | test = test + "\n业主名称为空"; |
| | | // throw new IllegalArgumentException("业主名称不能为空"); |
| | | // } |
| | | } |
| | | |
| | | if (Vtil.defaultValue(objects.get(16)) == null){ |
| | | throw new IllegalArgumentException("房屋面积不能为空"); |
| | | objects.set(16, "0"); |
| | | test = test + "\n房屋面积为空"; |
| | | } |
| | | |
| | | // if (Vtil.defaultValue(objects.get(54)) == null){ |
| | |
| | | |
| | | List<Object> objects1 = sqlSessionTemplate.selectList("roomServiceDaoImpl.getRoomInfo", BeanConvertUtil.beanCovertMap(roomDto)); |
| | | if (!objects1.isEmpty()) { |
| | | throw new IllegalArgumentException("重复的房屋:"); |
| | | // throw new IllegalArgumentException("重复的房屋:"); |
| | | test = test + "\n重复的房屋:来自导入记录:" + assetImportLogDetailDto.getLogId() + "\t" + assetImportLogDetailDto.getDetailId(); |
| | | } |
| | | List<FeeConfigDto> feeDtos = null; |
| | | if (!importOwnerRoomDto.getCommunityId().isEmpty()){ |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setCommunityId(importOwnerRoomDto.getCommunityId()); |
| | | if (importOwnerRoomDto.getPropertyType() == null) { |
| | | throw new IllegalArgumentException("物业类型为空"); |
| | | // throw new IllegalArgumentException("物业类型为空"); |
| | | test = test + "\n物业类型为空,无法添加费用"; |
| | | } |
| | | feeConfigDto.setSecondaryFeeTypeCdName(importOwnerRoomDto.getPropertyType()); |
| | | feeDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | if (feeDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("物业类型`"+importOwnerRoomDto.getPropertyType()+"`未查询到收费项"); |
| | | else { |
| | | feeConfigDto.setSecondaryFeeTypeCdName(importOwnerRoomDto.getPropertyType()); |
| | | feeDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | if (feeDtos.isEmpty()) { |
| | | // throw new IllegalArgumentException("物业类型`"+importOwnerRoomDto.getPropertyType()+"`未查询到收费项"); |
| | | test = test + "\n物业类型`"+importOwnerRoomDto.getPropertyType()+"`未查询到收费项,无法添加费用"; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | sqlSessionTemplate.insert("litigationInfoServiceDaoImpl.saveLitigationInfo", |
| | | BeanConvertUtil.beanCovertMap(litigationInfoPo)); |
| | | importOwnerRoomDto.setRoomState(importOwnerRoomDto.getOwnerName() == null ? "2004" : "2001"); |
| | | |
| | | importOwnerRoomDto.setRemark(test); |
| | | importOwnerRoomInnerServiceSMOImpl.saveOwnerRoom(importOwnerRoomDto); |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | |
| | | ownerV1InnerServiceSMOImpl.saveOwner(ownerPoTo3); |
| | | } |
| | | } |
| | | for (int i = 0 ; i < feeDtos.size(); i++) { |
| | | FeeConfigDto feeDto = feeDtos.get(i); |
| | | PayFeePo payFeePo = new PayFeePo(); |
| | | payFeePo.setFeeId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_feeId)); |
| | | payFeePo.setbId("-1"); |
| | | payFeePo.setFeeTypeCd(feeDto.getFeeTypeCd()); |
| | | payFeePo.setSecondaryFeeTypeCd(feeDto.getSecondaryFeeTypeCd()); |
| | | payFeePo.setCommunityId(importOwnerRoomDto.getCommunityId()); |
| | | payFeePo.setPayerObjId(importOwnerRoomDto.getRoomId()); |
| | | payFeePo.setIncomeObjId("102025062610470035"); |
| | | payFeePo.setStartTime(feeDto.getStartTime()); |
| | | payFeePo.setEndTime(feeDto.getStartTime()); |
| | | payFeePo.setUserId(importOwnerRoomDto.getUserId()); |
| | | payFeePo.setStatusCd("0"); |
| | | payFeePo.setFeeFlag(feeDto.getFeeFlag()); |
| | | payFeePo.setConfigId(feeDto.getConfigId()); |
| | | payFeePo.setState("2008001"); |
| | | payFeePo.setPayerObjType("3333"); |
| | | payFeePo.setBatchId(assetImportLogDetailDto.getLogId()); |
| | | payFeeV1InnerServiceSMO.savePayFee(payFeePo); |
| | | List<FeeAttrPo> feeAttrPos = new ArrayList<>(); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390007" , importOwnerRoomDto.getOwnerId())); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390010" , feeDto.getEndTime().split(" ")[0] + " 23:59:59")); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390009" , importOwnerRoomDto.getTel())); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390008" , importOwnerRoomDto.getOwnerName())); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390012" , importOwnerRoomDto.getDoorRoomNum())); |
| | | int i1 = feeAttrInnerServiceSMO.saveFeeAttrs(feeAttrPos); |
| | | if (feeDtos != null) { |
| | | for (int i = 0 ; i < feeDtos.size(); i++) { |
| | | FeeConfigDto feeDto = feeDtos.get(i); |
| | | PayFeePo payFeePo = new PayFeePo(); |
| | | payFeePo.setFeeId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_feeId)); |
| | | payFeePo.setbId("-1"); |
| | | payFeePo.setFeeTypeCd(feeDto.getFeeTypeCd()); |
| | | payFeePo.setSecondaryFeeTypeCd(feeDto.getSecondaryFeeTypeCd()); |
| | | payFeePo.setCommunityId(importOwnerRoomDto.getCommunityId()); |
| | | payFeePo.setPayerObjId(importOwnerRoomDto.getRoomId()); |
| | | payFeePo.setIncomeObjId("102025062610470035"); |
| | | payFeePo.setStartTime(feeDto.getStartTime()); |
| | | payFeePo.setEndTime(feeDto.getStartTime()); |
| | | payFeePo.setUserId(importOwnerRoomDto.getUserId()); |
| | | payFeePo.setStatusCd("0"); |
| | | payFeePo.setFeeFlag(feeDto.getFeeFlag()); |
| | | payFeePo.setConfigId(feeDto.getConfigId()); |
| | | payFeePo.setState("2008001"); |
| | | payFeePo.setPayerObjType("3333"); |
| | | payFeePo.setBatchId(assetImportLogDetailDto.getLogId()); |
| | | payFeeV1InnerServiceSMO.savePayFee(payFeePo); |
| | | List<FeeAttrPo> feeAttrPos = new ArrayList<>(); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390007" , importOwnerRoomDto.getOwnerId())); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390010" , feeDto.getEndTime().split(" ")[0] + " 23:59:59")); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390009" , importOwnerRoomDto.getTel())); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390008" , importOwnerRoomDto.getOwnerName())); |
| | | feeAttrPos.add(new FeeAttrPo(payFeePo.getFeeId(), payFeePo.getCommunityId(), GenerateCodeFactory.getGeneratorId("11"), "390012" , importOwnerRoomDto.getDoorRoomNum())); |
| | | int i1 = feeAttrInnerServiceSMO.saveFeeAttrs(feeAttrPos); |
| | | } |
| | | } |
| | | } |
| | | } |