| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.dict.DictDto; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.importData.*; |
| | | import com.java110.dto.log.AssetImportLogDetailDto; |
| | | import com.java110.dto.menu.MenuDto; |
| | | import com.java110.dto.oweFeeCallable.OweFeeCallableDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.fee.api.ApplyRoomDiscountApi; |
| | | import com.java110.fee.bmo.fee.IFeeBMO; |
| | | import com.java110.fee.dao.IApplyRoomDiscountServiceDao; |
| | | import com.java110.fee.dao.IPayFeeConfigV1ServiceDao; |
| | | import com.java110.intf.community.ICommunityInnerServiceSMO; |
| | | import com.java110.intf.community.IImportOwnerRoomInnerServiceSMO; |
| | | import com.java110.intf.community.IMenuInnerServiceSMO; |
| | | import com.java110.intf.dev.IDictV1InnerServiceSMO; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerV1InnerServiceSMO; |
| | | import com.java110.job.importData.DefaultImportData; |
| | | import com.java110.job.importData.IImportDataAdapt; |
| | | import com.java110.po.dict.DictPo; |
| | | import com.java110.po.fee.FeeAttrPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.oweFeeCallable.OweFeeCallablePo; |
| | | import com.java110.po.owner.OwnerPo; |
| | | import com.java110.po.room.ApplyRoomDiscountPo; |
| | | import com.java110.po.room.LitigationInfoPo; |
| | | import com.java110.po.room.PayeeReceiveInfoPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.mybatis.spring.SqlSessionTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 房产信息导入 适配器 |
| | |
| | | |
| | | |
| | | @Autowired |
| | | private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOweFeeCallableV1InnerServiceSMO oweFeeCallableV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IImportOwnerRoomInnerServiceSMO importOwnerRoomInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | protected SqlSessionTemplate sqlSessionTemplate; |
| | | |
| | | @Autowired |
| | | private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountServiceDao applyRoomDiscountServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IDictV1InnerServiceSMO dictV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IPayFeeV1InnerServiceSMO payFeeV1InnerServiceSMO; |
| | | |
| | | |
| | | @Autowired |
| | | private IFeeAttrInnerServiceSMO feeAttrInnerServiceSMO; |
| | | @Override |
| | | public void importData(List<AssetImportLogDetailDto> assetImportLogDetailDtos) { |
| | | importDatas(assetImportLogDetailDtos); |
| | |
| | | doImportData(assetImportLogDetailDto); |
| | | |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId()); |
| | | try { |
| | | Thread.sleep(200); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), e); |
| | | String errorMsg = e.getMessage(); |
| | | // 先判空,再判断包含关系 |
| | | if (errorMsg != null && errorMsg.contains("### Error updating database")) { |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), |
| | | "未知错误,请联系管理员" + errorMsg); |
| | | } else { |
| | | // 补充:这里也建议对 e 做兜底处理,避免传递空的异常信息 |
| | | String finalMsg = errorMsg != null ? errorMsg : e.toString(); |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), finalMsg); |
| | | // 如果原方法 updateImportLogDetailState 接收 Exception 类型参数,可保留: |
| | | // updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | * @param assetImportLogDetailDto |
| | | */ |
| | | private void doImportData(AssetImportLogDetailDto assetImportLogDetailDto) { |
| | | |
| | | int a = 6; |
| | | JSONArray objects = JSONObject.parseArray(assetImportLogDetailDto.getContent()); |
| | | |
| | | ImportOwnerRoomDto importOwnerRoomDto = new ImportOwnerRoomDto(); |
| | | importOwnerRoomDto.setRoomId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_roomId)); |
| | | importOwnerRoomDto.setOwnerId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ownerId)); |
| | | importOwnerRoomDto.setCommunityId(assetImportLogDetailDto.getCommunityId()); |
| | | importOwnerRoomDto.setFloorNum(objects.get(5).toString()); |
| | | importOwnerRoomDto.setUnitNum(objects.get(6).toString()); |
| | | importOwnerRoomDto.setRoomNum(objects.get(7).toString()); |
| | | // if (Vtil.defaultValue(objects.get(11)) == null) { |
| | | // throw new IllegalArgumentException("业主名称不能为空"); |
| | | // } |
| | | |
| | | importOwnerRoomDto.setDoorRoomNum(objects.get(8).toString()); |
| | | |
| | | importOwnerRoomDto.setPropertyType(objects.get(2).toString()); |
| | | importOwnerRoomDto.setPropertyAddress(objects.get(9).toString()); |
| | | importOwnerRoomDto.setHouseCertificateNo(""); |
| | | |
| | | importOwnerRoomDto.setLift("1010"); |
| | | importOwnerRoomDto.setRoomSubType(objects.get(2).toString()); |
| | | importOwnerRoomDto.setSection("10102"); |
| | | importOwnerRoomDto.setBuiltUpArea(objects.get(15).toString()); |
| | | importOwnerRoomDto.setRoomRent(objects.get(15).toString()); |
| | | importOwnerRoomDto.setRoomState("0"); |
| | | importOwnerRoomDto.setOwnerName(objects.get(53).toString()); |
| | | importOwnerRoomDto.setSex(objects.get(57).toString()); |
| | | importOwnerRoomDto.setAge("1"); |
| | | importOwnerRoomDto.setTel(objects.get(52).toString()); |
| | | importOwnerRoomDto.setIdCard(objects.get(55).toString()); |
| | | importOwnerRoomDto.setOwnerTypeCd("1001"); |
| | | importOwnerRoomDto.setPersonType("P"); |
| | | importOwnerRoomDto.setPersonRole("1"); |
| | | importOwnerRoomDto.setConcactPerson(objects.get(53).toString()); |
| | | importOwnerRoomDto.setConcactLink(objects.get(52).toString()); |
| | | importOwnerRoomDto.setHouseholdPoliceStation(objects.get(58).toString()); |
| | | |
| | | importOwnerRoomDto.setRoadName(objects.get(4).toString()); |
| | | importOwnerRoomDto.setBuyDate(objects.get(10).toString()); |
| | | importOwnerRoomDto.setSellDate(objects.get(11).toString()); |
| | | importOwnerRoomDto.setSellState(objects.get(12).toString()); |
| | | importOwnerRoomDto.setRoomBuyer(objects.get(13).toString()); |
| | | importOwnerRoomDto.setEoc(objects.get(32).toString()); |
| | | |
| | | importOwnerRoomDto.setPropertyCertificateNo(objects.get(59).toString()); |
| | | importOwnerRoomDto.setIsEvChargerInstalled(objects.get(60).toString()); |
| | | |
| | | int flag = importOwnerRoomInnerServiceSMOImpl.saveOwnerRoom(importOwnerRoomDto); |
| | | if (flag < 1) { |
| | | throw new IllegalArgumentException("导入失败"); |
| | | if (Vtil.defaultValue(objects.get(16)) == null){ |
| | | throw new IllegalArgumentException("房屋面积不能为空"); |
| | | } |
| | | |
| | | OwnerCollectionDto ownerCollectionDto = new OwnerCollectionDto(); |
| | | // if (Vtil.defaultValue(objects.get(54)) == null){ |
| | | // throw new IllegalArgumentException("性别内容有误!"); |
| | | // } |
| | | |
| | | ownerCollectionDto.setCollectionId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_collId)); |
| | | ownerCollectionDto.setRoomId(importOwnerRoomDto.getRoomId()); |
| | | ownerCollectionDto.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | ownerCollectionDto.setCollectionStartDate(objects.get(33).toString()); |
| | | ownerCollectionDto.setCollectionEndDate(objects.get(34).toString()); |
| | | ownerCollectionDto.setAmount(objects.get(35).toString()); |
| | | ownerCollectionDto.setFirstCollector(objects.get(36).toString()); |
| | | ownerCollectionDto.setSecondCollectorName(objects.get(37).toString()); |
| | | ownerCollectionDto.setSecondCollectorPhone(objects.get(38).toString()); |
| | | ownerCollectionDto.setSecondCollectorAddress(objects.get(39).toString()); |
| | | ownerCollectionDto.setReceiptNumber(objects.get(40).toString()); |
| | | ownerCollectionDto.setReceiptPhotoUrl(objects.get(41).toString()); |
| | | ownerCollectionDto.setRemark(objects.get(42).toString()); |
| | | |
| | | importOwnerRoomInnerServiceSMOImpl.saveOwnerCollection(ownerCollectionDto); |
| | | ImportOwnerRoomDto importOwnerRoomDto = new ImportOwnerRoomDto();//房屋 |
| | | importOwnerRoomDto.setRoomId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_roomId)); |
| | | importOwnerRoomDto.setOwnerId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ownerId)); |
| | | importOwnerRoomDto.setUserId(objects.getString(169)); |
| | | importOwnerRoomDto.setLayerCount("0"); |
| | | importOwnerRoomDto.setLayer("0"); |
| | | importOwnerRoomDto.setLift("未知"); |
| | | importOwnerRoomDto.setSection("10102"); |
| | | importOwnerRoomDto.setOwnerTypeCd("1001"); |
| | | importOwnerRoomDto.setPersonType(OwnerDto.PERSON_TYPE_PERSON); |
| | | importOwnerRoomDto.setPersonRole(OwnerDto.PERSON_ROLE_OWNER); |
| | | importOwnerRoomDto.setMonthlyUnitPrice(objects.getString(23)); |
| | | importOwnerRoomDto.setPropertyFeeMonth(objects.getString(24)); |
| | | if (Vtil.defaultValue(objects.get(1)) != null) { |
| | | //--------设置物业类型 |
| | | DictDto dictDto = new DictDto(); |
| | | dictDto.setTableName("building_room"); |
| | | dictDto.setTableColumns("room_sub_type"); |
| | | dictDto.setName(Vtil.defaultValue(objects.get(1))); |
| | | List<DictDto> dictDtos = dictV1InnerServiceSMOImpl.queryDictAndSpecs(dictDto); |
| | | if (dictDtos.isEmpty()) { |
| | | DictPo dictPo = new DictPo(); |
| | | dictPo.setStatusCd(GenerateCodeFactory.getGeneratorId("2")); |
| | | dictPo.setTableName("building_room"); |
| | | dictPo.setTableColumns("room_sub_type"); |
| | | dictPo.setName(Vtil.defaultValue(objects.get(1))); |
| | | dictV1InnerServiceSMOImpl.saveDict(dictPo); |
| | | dictDtos = dictV1InnerServiceSMOImpl.queryDictAndSpecs(dictDto); |
| | | if (dictDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("导入失败:字典中不存在物业类型:" + Vtil.defaultValue(objects.get(1))); |
| | | } |
| | | } |
| | | importOwnerRoomDto.setRoomSubType(dictDtos.get(0).getStatusCd()); |
| | | } |
| | | //---------- |
| | | |
| | | if (objects.get(46) != null) { |
| | | ApplyRoomDiscountPo applyRoomDiscountPo = new ApplyRoomDiscountPo(); |
| | | importOwnerRoomDto.setPropertyType(Vtil.defaultValue(objects.get(2)));//住宅类型 |
| | | |
| | | //--------匹配小区 |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityCode(Vtil.defaultValue(objects.get(3))); |
| | | communityDto.setName(Vtil.defaultValue(objects.get(4))); |
| | | if (communityDto.getCommunityCode() == null && communityDto.getName() == null) { |
| | | throw new IllegalArgumentException("导入失败:小区编码和小区名称都为空"); |
| | | } |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | if (communityDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("导入失败:小区中不存在小区‘" + Vtil.defaultValue(objects.get(3))+Vtil.defaultValue(objects.get(4)) + "’"); |
| | | } else if (communityDtos.size() > 1) { |
| | | String communityNames = communityDtos.stream() |
| | | .map(CommunityDto::getName) // 提取每个小区的名称 |
| | | .collect(Collectors.joining(", ")); |
| | | |
| | | throw new IllegalArgumentException("导入失败:小区编码(" + communityDto.getCommunityCode() + ") + 小区名称(" + communityDto.getName() + ")条件存在多个小区:" + communityNames); |
| | | } |
| | | String communityId = communityDtos.get(0).getCommunityId(); |
| | | importOwnerRoomDto.setCommunityId(communityId);//小区编号 |
| | | //--------- |
| | | |
| | | |
| | | importOwnerRoomDto.setRoadName(Vtil.defaultValue(objects.get(5)));//路名 |
| | | importOwnerRoomDto.setFloorNum(Vtil.defaultValue(objects.get(6)));//弄 |
| | | importOwnerRoomDto.setUnitNum(Vtil.defaultValue(objects.get(7)));//门 |
| | | importOwnerRoomDto.setRoomNum(Vtil.defaultValue(objects.get(8)));//室 |
| | | importOwnerRoomDto.setDoorRoomNum(Vtil.defaultValue(objects.get(9)));//门市号 |
| | | importOwnerRoomDto.setPropertyAddress(Vtil.defaultValue(objects.get(10)));//业主地址 |
| | | importOwnerRoomDto.setRoomBuyer(Vtil.defaultValue(objects.get(11) , null) == null ? "房屋:" + importOwnerRoomDto.getPropertyAddress() + "购房人姓名为空,待补全": Vtil.defaultValue(objects.get(11)));//购房人 |
| | | |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setCommunityId(importOwnerRoomDto.getCommunityId()); |
| | | roomDto.setRoadName(importOwnerRoomDto.getRoadName()); |
| | | roomDto.setFloorNum(importOwnerRoomDto.getFloorNum()); |
| | | roomDto.setUnitNum(importOwnerRoomDto.getUnitNum()); |
| | | roomDto.setRoomNum(importOwnerRoomDto.getRoomNum()); |
| | | roomDto.setDoorRoomNum(importOwnerRoomDto.getDoorRoomNum()); |
| | | roomDto.setPropertyAddress(importOwnerRoomDto.getPropertyAddress()); |
| | | // if (roomDto.getRoomNum() ==null || roomDto.getRoomNum().equals("")){ |
| | | // roomDto.setPropertyType("商铺"); |
| | | // } |
| | | |
| | | List<Object> objects1 = sqlSessionTemplate.selectList("roomServiceDaoImpl.getRoomInfo", BeanConvertUtil.beanCovertMap(roomDto)); |
| | | if (!objects1.isEmpty()) { |
| | | throw new IllegalArgumentException("重复的房屋:"); |
| | | } |
| | | List<FeeConfigDto> feeDtos = null; |
| | | if (!importOwnerRoomDto.getCommunityId().isEmpty()){ |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setCommunityId(importOwnerRoomDto.getCommunityId()); |
| | | if (importOwnerRoomDto.getPropertyType() == null) { |
| | | throw new IllegalArgumentException("物业类型为空"); |
| | | } |
| | | feeConfigDto.setSecondaryFeeTypeCdName(importOwnerRoomDto.getPropertyType()); |
| | | feeDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | if (feeDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("物业类型`"+importOwnerRoomDto.getPropertyType()+"`未查询到收费项"); |
| | | } |
| | | } |
| | | |
| | | |
| | | //---------家庭成员、租客 |
| | | OwnerPo ownerPoTo3 = new OwnerPo();// |
| | | if (Vtil.defaultValue(objects.get(13)) != null) { |
| | | String link = Vtil.defaultValue(objects.get(13)); |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setLink(link); |
| | | ownerDto.setCommunityId(communityId); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryAllOwners(ownerDto); |
| | | if (!ownerDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("导入失败:该小区已存在手机号:" + link + "的业主"); |
| | | } |
| | | ownerPoTo3.setOwnerId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ownerId)); |
| | | ownerPoTo3.setAge("0"); |
| | | ownerPoTo3.setState(OwnerDto.STATE_FINISH); |
| | | ownerPoTo3.setPersonType(OwnerDto.PERSON_TYPE_PERSON); |
| | | ownerPoTo3.setOwnerTypeCd(OwnerDto.OWNER_TYPE_CD_MEMBER); |
| | | ownerPoTo3.setName(Vtil.defaultValue(objects.get(12))); |
| | | ownerPoTo3.setLink(link); |
| | | ownerPoTo3.setSex("2"); |
| | | ownerPoTo3.setPersonRole(OwnerDto.PERSON_ROLE_MEMBER); |
| | | } |
| | | |
| | | OwnerPo ownerPoTo2 = new OwnerPo();//TODO 租客未导入 |
| | | if (Vtil.defaultValue(objects.get(15)) != null) { |
| | | String link = Vtil.defaultValue(objects.get(15)); |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setLink(link); |
| | | ownerDto.setCommunityId(communityId); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryAllOwners(ownerDto); |
| | | if (!ownerDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("导入失败:该小区已存在手机号:" + link + "的业主"); |
| | | } |
| | | ownerPoTo2.setOwnerId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ownerId)); |
| | | ownerPoTo2.setAge("0"); |
| | | // ownerPo.setUserId(userId); |
| | | ownerPoTo2.setState(OwnerDto.STATE_FINISH); |
| | | ownerPoTo2.setPersonType(OwnerDto.PERSON_ROLE_RENT); |
| | | ownerPoTo2.setOwnerTypeCd(OwnerDto.OWNER_TYPE_CD_MEMBER); |
| | | ownerPoTo2.setName(Vtil.defaultValue(objects.get(21+a))); |
| | | ownerPoTo2.setLink(link); |
| | | ownerPoTo2.setSex("2"); |
| | | ownerPoTo2.setPersonRole(OwnerDto.PERSON_ROLE_MEMBER); |
| | | } |
| | | //--------- |
| | | importOwnerRoomDto.setBuiltUpArea(Vtil.defaultValue(objects.get(16)));//面积 |
| | | importOwnerRoomDto.setRoomArea(Vtil.defaultValue(objects.get(16)));//面积 |
| | | importOwnerRoomDto.setRoomRent(Vtil.defaultValue(objects.get(16)));//面积 |
| | | importOwnerRoomDto.setBuyDate(Vtil.defaultValueToDate(objects.get(28)));//购入日期 |
| | | importOwnerRoomDto.setSellDate(Vtil.defaultValueToDate(objects.get(26)));//卖出日期 |
| | | importOwnerRoomDto.setSellState(Vtil.defaultValue(objects.get(23+a)));//房屋状态 |
| | | |
| | | importOwnerRoomDto.setEoc(Vtil.defaultNum(objects.get(24+a)).toString());//设备运行费 |
| | | |
| | | //-----TODO 待导入 催缴信息 |
| | | if (Vtil.defaultValue(objects.get(31)) != null) { |
| | | OwnerCollectionDto ownerCollection = new OwnerCollectionDto(); |
| | | ownerCollection.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | ownerCollection.setRoomId(importOwnerRoomDto.getRoomId()); |
| | | ownerCollection.setCollectionStartDate(Vtil.defaultValueToDate(objects.get(25+a))); |
| | | ownerCollection.setCollectionEndDate(Vtil.defaultValueToDate(objects.get(26+a))); |
| | | ownerCollection.setAmount(Vtil.defaultValue(objects.get(27+a))); |
| | | ownerCollection.setFirstCollector(Vtil.defaultValue(objects.get(28+a))); |
| | | ownerCollection.setSecondCollectorName(Vtil.defaultValue(objects.get(29+a))); |
| | | ownerCollection.setSecondCollectorPhone(Vtil.defaultValue(objects.get(30+a))); |
| | | ownerCollection.setSecondCollectorAddress(Vtil.defaultValue(objects.get(31+a))); |
| | | ownerCollection.setReceiptNumber(Vtil.defaultValue(objects.get(32+a))); |
| | | ownerCollection.setReceiptPhotoUrl(Vtil.defaultValue(objects.get(33+a))); |
| | | ownerCollection.setRemark(Vtil.defaultValue(objects.get(34+a))); |
| | | } |
| | | //----- |
| | | |
| | | //-----打折信息 TODO 未添加重复校验 |
| | | if (Vtil.defaultValue(objects.get(42)) != null) { |
| | | ApplyRoomDiscountPo applyRoomDiscountPo = new ApplyRoomDiscountPo();//打折 |
| | | applyRoomDiscountPo.setArdId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ardId)); |
| | | applyRoomDiscountPo.setCommunityId(importOwnerRoomDto.getCommunityId()); |
| | | applyRoomDiscountPo.setRoomId(importOwnerRoomDto.getRoomId()); |
| | | applyRoomDiscountPo.setRoomName(importOwnerRoomDto.getPropertyAddress()); |
| | | applyRoomDiscountPo.setDiscountId("132025112781200067"); |
| | | applyRoomDiscountPo.setApplyType("152025112756040048"); |
| | | String dateStr = "2019/3-2019/12"; |
| | | |
| | | // 1. 拆分字符串 |
| | | String[] dateParts = dateStr.split("-", 2); |
| | | if (dateParts.length != 2) { |
| | | throw new IllegalArgumentException("日期格式错误,需符合 '年/月-年/月'"); |
| | | } |
| | | |
| | | // 2. 定义格式化器(注意:SimpleDateFormat 线程不安全,每次使用新建实例) |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy/M"); |
| | | |
| | | try { |
| | | SimpleDateFormat outputSdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | applyRoomDiscountPo.setStartTime(outputSdf.format(sdf.parse(dateParts[0]))); |
| | | applyRoomDiscountPo.setEndTime(outputSdf.format(sdf.parse(dateParts[1]))); |
| | | }catch (Exception e){ |
| | | throw new IllegalArgumentException("导入失败:处理折扣日期区间时出错"); |
| | | } |
| | | applyRoomDiscountPo.setCreateUserName(objects.get(49).toString()); |
| | | applyRoomDiscountPo.setFixedDiscountValue(Vtil.defaultNum(objects.get(36+a))); |
| | | applyRoomDiscountPo.setDiscountedAmount(Vtil.defaultNum(objects.get(37+a))); |
| | | applyRoomDiscountPo.setStartTime(Vtil.defaultValueToDate(objects.get(38+a),"start", null)); |
| | | applyRoomDiscountPo.setEndTime(Vtil.defaultValueToDate(objects.get(39+a), "end", null)); |
| | | applyRoomDiscountPo.setDiscountArchiveDate(Vtil.defaultValueToDate(objects.get(40+a))); |
| | | applyRoomDiscountPo.setCreateRemark(Vtil.defaultValue(objects.get(41+a))); |
| | | applyRoomDiscountPo.setCheckRemark("审批人:" + Vtil.defaultValue(objects.get(42+a))); |
| | | applyRoomDiscountPo.setReviewRemark("审批人:" + Vtil.defaultValue(objects.get(43+a))); |
| | | applyRoomDiscountPo.setCreateUserTel("无"); |
| | | applyRoomDiscountPo.setCreateUserName("由系统导入"); |
| | | applyRoomDiscountPo.setState("4"); |
| | | applyRoomDiscountPo.setCreateRemark("由系统导入"); |
| | | applyRoomDiscountPo.setCheckRemark("审批人:" + objects.get(50).toString()); |
| | | applyRoomDiscountPo.setReviewRemark("审批人:" + objects.get(50).toString()); |
| | | applyRoomDiscountPo.setStatusCd("0"); |
| | | applyRoomDiscountPo.setInUse("0"); |
| | | applyRoomDiscountPo.setReturnWay("1001"); |
| | | applyRoomDiscountPo.setRelatedAttachments(Vtil.defaultValue(objects.get(44+a))); |
| | | try { |
| | | applyRoomDiscountServiceDaoImpl.saveApplyRoomDiscountInfo(BeanConvertUtil.beanCovertMap(applyRoomDiscountPo)); |
| | | }catch (Exception e){ |
| | | throw new IllegalArgumentException("导入失败"); |
| | | throw new IllegalArgumentException("导入失败:打折信息导入存在错误" + e.getMessage()); |
| | | } |
| | | } |
| | | //-----业主信息 |
| | | importOwnerRoomDto.setTel(Vtil.defaultValue(objects.get(45+a)));//手机号 |
| | | importOwnerRoomDto.setIdCard(Vtil.defaultValue(objects.get(46+a)));//身份证 |
| | | importOwnerRoomDto.setAddress(Vtil.defaultValue(objects.get(47+a)));//TODO 导入逻辑未添加该字段 联络地址 |
| | | importOwnerRoomDto.setSex(Vtil.defaultValue(objects.get(48+a)) == null ?"2" : Vtil.defaultValue(objects.get(48+a))); |
| | | importOwnerRoomDto.setOwnerName(Vtil.defaultValue(Vtil.defaultValue(objects.get(11) , null) == null ? "房屋:" + importOwnerRoomDto.getPropertyAddress() + "购房人姓名为空,待补全": Vtil.defaultValue(objects.get(11)))); |
| | | importOwnerRoomDto.setHouseholdPoliceStation(Vtil.defaultValue(objects.get(50+a))); |
| | | importOwnerRoomDto.setPropertyCertificateNo(Vtil.defaultValue(objects.get(51+a))); |
| | | importOwnerRoomDto.setIsEvChargerInstalled(Vtil.defaultValue(objects.get(52+a))); |
| | | |
| | | |
| | | for (int i = 0; i < 5 ; i++) { |
| | | int index = i*4 + 67; |
| | | if(objects.get(index) == null){ |
| | | break; |
| | | |
| | | if (Vtil.defaultValue(objects.get(61),null) != null || Vtil.defaultValue(objects.get(141)) == null || Vtil.defaultValue(objects.get(147+a)) == null || Vtil.defaultValue(objects.get(149+a)) == null) { |
| | | OweFeeCallablePo oweFeeCallablePo = new OweFeeCallablePo(); |
| | | oweFeeCallablePo.setOfcId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId)); |
| | | oweFeeCallablePo.setAmountdOwed("0"); |
| | | oweFeeCallablePo.setCallableWay(OweFeeCallableDto.CALLABLE_WAY_PRINT); |
| | | oweFeeCallablePo.setOfcId(GenerateCodeFactory.getGeneratorId("11")); |
| | | oweFeeCallablePo.setFeeId(""); |
| | | oweFeeCallablePo.setFeeName("导入催收信息"); |
| | | oweFeeCallablePo.setCommunityId(communityId); |
| | | oweFeeCallablePo.setConfigId(""); |
| | | oweFeeCallablePo.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | oweFeeCallablePo.setOwnerName(importOwnerRoomDto.getOwnerName()); |
| | | oweFeeCallablePo.setPayerObjId(importOwnerRoomDto.getRoomId()); |
| | | oweFeeCallablePo.setPayerObjName(importOwnerRoomDto.getPropertyAddress()); |
| | | oweFeeCallablePo.setPayerObjType("3333"); |
| | | oweFeeCallablePo.setRemark(Vtil.defaultValue(objects.get(57+a)) + "\n\n催收时段:" + Vtil.defaultValueToDate(objects.get(61))); |
| | | oweFeeCallablePo.setStaffId("302025062612580518"); |
| | | oweFeeCallablePo.setStaffName("刘志勇"); |
| | | oweFeeCallablePo.setState(OweFeeCallableDto.STATE_COMPLETE); |
| | | oweFeeCallablePo.setReceivableAmount(Vtil.defaultValue(objects.get(155+a))); |
| | | oweFeeCallablePo.setReceivedAmount(Vtil.defaultValue(objects.get(156+a))); |
| | | // oweFeeCallablePo.setDifferenceReason(Vtil.defaultValue(objects.get(157+a))); |
| | | // oweFeeCallablePo.setReceiptTime(Vtil.defaultValue(objects.get(158+a))); |
| | | oweFeeCallablePo.setPayee(Vtil.defaultValue(objects.get(159+a))); |
| | | if (Vtil.defaultValue(objects.get(160+a), "") != null) { |
| | | oweFeeCallablePo.setRemark(oweFeeCallablePo.getRemark() + "。备注信息:" + Vtil.defaultValue(objects.get(160+a))); |
| | | } |
| | | HouseMailRecord houseMailRecord = new HouseMailRecord(); |
| | | houseMailRecord.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_houseId)); |
| | | houseMailRecord.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | houseMailRecord.setHouseId(importOwnerRoomDto.getRoomId()); |
| | | houseMailRecord.setCreateTime(objects.get(index).toString()); |
| | | houseMailRecord.setMailNo(objects.get(index+1).toString()); |
| | | houseMailRecord.setServiceFee(objects.get(index+2).toString()); |
| | | houseMailRecord.setMailResult(objects.get(index+3).toString()); |
| | | houseMailRecord.setRemark(objects.get(87).toString()); |
| | | // oweFeeCallablePo.setStartTime(Vtil.defaultValueToDate(objects.get(61)));//TODO 时间段需要拆分 |
| | | // oweFeeCallablePo.setEndTime(Vtil.defaultValueToDate(objects.get(61))); |
| | | oweFeeCallablePo.setCreateTime(Vtil.defaultValueToDate(objects.get(53+a))); |
| | | int flag = oweFeeCallableV1InnerServiceSMOImpl.saveOweFeeCallable(oweFeeCallablePo); |
| | | if (flag < 1) { |
| | | throw new IllegalArgumentException("催收信息导入失败"); |
| | | } |
| | | |
| | | int save = applyRoomDiscountServiceDaoImpl.saveHouseMailRecord(BeanConvertUtil.beanCovertMap(houseMailRecord)); |
| | | } |
| | | for (int i = 0; i < 5 ; i++) { |
| | | int index = i*4 + 65; |
| | | // if(objects.get(index) == null || objects.get(index).equals("")) { |
| | | // break; |
| | | // } |
| | | HouseMailRecord houseMailRecord = new HouseMailRecord(); |
| | | houseMailRecord.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_houseId)); |
| | | houseMailRecord.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | houseMailRecord.setHouseId(importOwnerRoomDto.getRoomId()); |
| | | houseMailRecord.setCallableId(oweFeeCallablePo.getOfcId()); |
| | | houseMailRecord.setSendDate(Vtil.defaultValueToDate(objects.get(index))); |
| | | houseMailRecord.setMailNo(Vtil.defaultValue(objects.get(index+1))); |
| | | houseMailRecord.setServiceFee(Vtil.defaultValue(objects.get(index+2))); |
| | | houseMailRecord.setMailResult(Vtil.defaultValue(objects.get(index+3))); |
| | | houseMailRecord.setRemark(Vtil.defaultValue(objects.get(79+a))); |
| | | |
| | | for (int i = 0 ; i < 9 ; i++) { |
| | | int index = i * 3 + 88; |
| | | if(objects.get(index) == null){ |
| | | if (i == 0){ |
| | | MailCallRecord mailCallRecord = new MailCallRecord(); |
| | | mailCallRecord.setRemark(objects.get(115).toString()); |
| | | int save = applyRoomDiscountServiceDaoImpl.saveHouseMailRecord(BeanConvertUtil.beanCovertMap(houseMailRecord)); |
| | | } |
| | | |
| | | int save = applyRoomDiscountServiceDaoImpl.saveMailCallRecord(BeanConvertUtil.beanCovertMap(mailCallRecord)); |
| | | //----对方收款单位表 |
| | | PayeeReceiveInfoPo payeeReceiveInfoPo = new PayeeReceiveInfoPo(); |
| | | payeeReceiveInfoPo.setCallableId(oweFeeCallablePo.getOfcId()); |
| | | payeeReceiveInfoPo.setCallerName(Vtil.defaultValue(objects.get(88))); |
| | | payeeReceiveInfoPo.setContactInfo(Vtil.defaultValue(objects.get(89))); |
| | | payeeReceiveInfoPo.setPayeeInfo(Vtil.defaultValue(objects.get(90))); |
| | | payeeReceiveInfoPo.setInvoiceNo(Vtil.defaultValue(objects.get(91))); |
| | | payeeReceiveInfoPo.setInvoiceDate(objects.getDate(92)); |
| | | payeeReceiveInfoPo.setReceiptNo(Vtil.defaultValue(objects.get(93))); |
| | | payeeReceiveInfoPo.setReceiptDate(objects.getDate(94)); |
| | | payeeReceiveInfoPo.setReceiptNote(Vtil.defaultValue(objects.get(95))); |
| | | payeeReceiveInfoPo.setReceiptNoteDate(objects.getDate(96)); |
| | | payeeReceiveInfoPo.setImageFile(Vtil.defaultValue(objects.get(97))); |
| | | payeeReceiveInfoPo.setOurCompanyReceiveDate(objects.getDate(98)); |
| | | payeeReceiveInfoPo.setAttachmentFile(Vtil.defaultValue(objects.get(99))); |
| | | payeeReceiveInfoPo.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | payeeReceiveInfoPo.setRoomId(importOwnerRoomDto.getRoomId()); |
| | | int insert = sqlSessionTemplate.insert("payeeReceiveInfoServiceDaoImpl.savePayeeReceiveInfo", |
| | | BeanConvertUtil.beanCovertMap(payeeReceiveInfoPo)); |
| | | |
| | | //---- |
| | | |
| | | //----法院审理程序 |
| | | // if (!Vtil.defaultValue(objects.get(141)).isEmpty()) { |
| | | CourtTrialProcedure courtTrialProcedure = new CourtTrialProcedure(); |
| | | courtTrialProcedure.setCallableId(oweFeeCallablePo.getOfcId()); |
| | | courtTrialProcedure.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | courtTrialProcedure.setAcceptCourtName(Vtil.defaultValue(objects.get(132+a))); |
| | | courtTrialProcedure.setJudgeName(Vtil.defaultValue(objects.get(133+a))); |
| | | courtTrialProcedure.setJudgeContact(Vtil.defaultValue(objects.get(134+a))); |
| | | courtTrialProcedure.setJudgeNoticeAcceptDate(Vtil.defaultValueToDate(objects.get(135+a))); |
| | | courtTrialProcedure.setCourtMediationDate(Vtil.defaultValueToDate(objects.get(136+a))); |
| | | courtTrialProcedure.setMediationResult(Vtil.defaultValue(objects.get(137+a))); |
| | | courtTrialProcedure.setSubpoenaSignDate(Vtil.defaultValueToDate(objects.get(138+a))); |
| | | courtTrialProcedure.setUndeliveredDate(Vtil.defaultValueToDate(objects.get(139+a))); |
| | | courtTrialProcedure.setCourtSessionDate1(Vtil.defaultValueToDate(objects.get(140+a))); |
| | | courtTrialProcedure.setCourtSessionDate2(Vtil.defaultValueToDate(objects.get(141+a))); |
| | | courtTrialProcedure.setCaseNumber(Vtil.defaultValue(objects.get(142+a))); |
| | | courtTrialProcedure.setCourtSessionResult(Vtil.defaultValue(objects.get(143+a))); |
| | | courtTrialProcedure.setJudgmentDate(Vtil.defaultValueToDate(objects.get(144+a))); |
| | | courtTrialProcedure.setJudgmentResult(Vtil.defaultValue(objects.get(145+a))); |
| | | courtTrialProcedure.setRemark(Vtil.defaultValue(objects.get(146+a))); |
| | | applyRoomDiscountServiceDaoImpl.saveCourtTrialProcedure(BeanConvertUtil.beanCovertMap(courtTrialProcedure)); |
| | | // } |
| | | //----- |
| | | |
| | | //法院执行程序 |
| | | // if (!Vtil.defaultValue(objects.get(147+a)).isEmpty() || !Vtil.defaultValue(objects.get(149+a)).isEmpty()) { |
| | | CourtExecutionProcedure courtExecutionProcedure = new CourtExecutionProcedure(); |
| | | courtExecutionProcedure.setCallableId(oweFeeCallablePo.getOfcId()); |
| | | courtExecutionProcedure.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | courtExecutionProcedure.setApplyTime(Vtil.defaultValueToDate(objects.get(147+a))); |
| | | courtExecutionProcedure.setJudgmentDocNumber(Vtil.defaultValue(objects.get(148+a))); |
| | | courtExecutionProcedure.setArrearsPeriod(Vtil.defaultValue(objects.get(149+a))); |
| | | courtExecutionProcedure.setArrearsAmount(Vtil.defaultValue(objects.get(150+a))); |
| | | courtExecutionProcedure.setLateFee(Vtil.defaultValue(objects.get(151+a))); |
| | | courtExecutionProcedure.setAcceptanceFee(Vtil.defaultValue(objects.get(152+a))); |
| | | courtExecutionProcedure.setOtherFee(Vtil.defaultValue(objects.get(153+a))); |
| | | courtExecutionProcedure.setTotalAmount(Vtil.defaultValue(objects.get(154+a))); |
| | | courtExecutionProcedure.setRemark(Vtil.defaultValue(objects.get(160+a))); |
| | | |
| | | applyRoomDiscountServiceDaoImpl.saveCourtExecutionProcedure(BeanConvertUtil.beanCovertMap(courtExecutionProcedure)); |
| | | // } |
| | | |
| | | //----添加电联 |
| | | List<Object> mailCallRecords = new ArrayList<Object>(); |
| | | for (int i = 0 ; i < 9 ; i++) { |
| | | int index = i * 3 + 86; |
| | | if(Vtil.defaultValue(objects.get(index)) == null){ |
| | | // if (i == 0){ |
| | | // MailCallRecord mailCallRecord = new MailCallRecord(); |
| | | // mailCallRecord.setRemark(objects.get(115).toString()); |
| | | // |
| | | // int save = applyRoomDiscountServiceDaoImpl.saveMailCallRecord(BeanConvertUtil.beanCovertMap(mailCallRecord)); |
| | | // } |
| | | break; |
| | | } |
| | | break; |
| | | MailCallRecord mailCallRecord = new MailCallRecord(); |
| | | mailCallRecord.setMailId(oweFeeCallablePo.getOfcId()); |
| | | mailCallRecord.setCallDate(Vtil.defaultValueToDate(objects.get(index + (i == 0 ? 0 : 12)))); |
| | | mailCallRecord.setCallResult(Vtil.defaultValue(objects.get(index+1 + (i == 0 ? 0 : 12)))); |
| | | mailCallRecord.setCallContact(Vtil.defaultValue(objects.get(index+2 + 12))); |
| | | mailCallRecord.setRemark(Vtil.defaultValue(objects.get(125))); |
| | | mailCallRecords.add(mailCallRecord); |
| | | } |
| | | MailCallRecord mailCallRecord = new MailCallRecord(); |
| | | mailCallRecord.setCallDate(objects.get(index).toString()); |
| | | mailCallRecord.setCallResult(objects.get(index+1).toString()); |
| | | mailCallRecord.setCallContact(objects.get(index+2).toString()); |
| | | mailCallRecord.setRemark(objects.get(115).toString()); |
| | | if (mailCallRecords.size() > 0) { |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("mailCallRecordList", BeanConvertUtil.beanCovertMapList(mailCallRecords)); |
| | | |
| | | int save = applyRoomDiscountServiceDaoImpl.saveMailCallRecord(BeanConvertUtil.beanCovertMap(mailCallRecord)); |
| | | sqlSessionTemplate.insert("mailCallRecordServiceDaoImpl.batchSaveMailCallRecord", param); |
| | | } |
| | | //---- |
| | | |
| | | } |
| | | if (objects.get(116) != null) { |
| | | |
| | | |
| | | //产调日期 |
| | | // if (!Vtil.defaultValue(objects.get(126)).isEmpty()) { |
| | | OwnerPropertySurvey ownerPropertySurvey = new OwnerPropertySurvey(); |
| | | ownerPropertySurvey.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | ownerPropertySurvey.setRoomId(importOwnerRoomDto.getRoomId()); |
| | | ownerPropertySurvey.setSurveyWarrantApplyDate(objects.get(119).toString()); |
| | | ownerPropertySurvey.setPropertySurveyDate(objects.get(116).toString()); |
| | | ownerPropertySurvey.setName(objects.get(117).toString()); |
| | | ownerPropertySurvey.setExtraDate(objects.get(118).toString()); |
| | | |
| | | ownerPropertySurvey.setSurveyWarrantApplyDate(Vtil.defaultValueToDate(objects.get(129))); |
| | | ownerPropertySurvey.setPropertySurveyDate(Vtil.defaultValueToDate(objects.get(126))); |
| | | ownerPropertySurvey.setName(Vtil.defaultValue(objects.get(127))); |
| | | ownerPropertySurvey.setExtraDate(Vtil.defaultValueToDate(objects.get(128))); |
| | | int save = applyRoomDiscountServiceDaoImpl.saveOwnerPropertySurvey(BeanConvertUtil.beanCovertMap(ownerPropertySurvey)); |
| | | // } |
| | | //---- |
| | | |
| | | //诉讼 |
| | | LitigationInfoPo litigationInfoPo = new LitigationInfoPo(); |
| | | litigationInfoPo.setLitigationDate(Vtil.defaultValue(objects.get(130))); |
| | | litigationInfoPo.setArrearsPeriod(Vtil.defaultValue(objects.get(131))); |
| | | litigationInfoPo.setArrearsAmount(Vtil.defaultValue(objects.get(132))); |
| | | litigationInfoPo.setLateFee(Vtil.defaultValue(objects.get(133))); |
| | | litigationInfoPo.setAcceptanceFee(Vtil.defaultValue(objects.get(134))); |
| | | litigationInfoPo.setOtherFee(Vtil.defaultValue(objects.get(135))); |
| | | litigationInfoPo.setTotalAmount(Vtil.defaultValue(objects.get(136))); |
| | | litigationInfoPo.setSubmitter(Vtil.defaultValue(objects.get(137))); |
| | | litigationInfoPo.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | sqlSessionTemplate.insert("litigationInfoServiceDaoImpl.saveLitigationInfo", |
| | | BeanConvertUtil.beanCovertMap(litigationInfoPo)); |
| | | importOwnerRoomDto.setRoomState(importOwnerRoomDto.getOwnerName() == null ? "2004" : "2001"); |
| | | |
| | | importOwnerRoomInnerServiceSMOImpl.saveOwnerRoom(importOwnerRoomDto); |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | List<OwnerDto> ownerDtos = ownerV1InnerServiceSMOImpl.queryOwners(ownerDto); |
| | | if (ownerDtos.size() == 1) { |
| | | ownerPoTo2.setUserId(ownerDtos.get(0).getUserId()); |
| | | ownerPoTo3.setUserId(ownerDtos.get(0).getUserId()); |
| | | if (ownerPoTo2.getLink() != null) { |
| | | ownerV1InnerServiceSMOImpl.saveOwner(ownerPoTo2); |
| | | } |
| | | if (ownerPoTo2.getLink() != null) { |
| | | ownerV1InnerServiceSMOImpl.saveOwner(ownerPoTo3); |
| | | } |
| | | } |
| | | |
| | | if (objects.get(120) != null){ |
| | | CourtExecutionProcedure courtExecutionProcedure = new CourtExecutionProcedure(); |
| | | courtExecutionProcedure.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | courtExecutionProcedure.setApplyTime(objects.get(120).toString()); |
| | | courtExecutionProcedure.setArrearsPeriod(objects.get(121).toString()); |
| | | courtExecutionProcedure.setArrearsAmount(objects.get(122).toString()); |
| | | courtExecutionProcedure.setLateFee(objects.get(123).toString()); |
| | | courtExecutionProcedure.setAcceptanceFee(objects.get(124).toString()); |
| | | courtExecutionProcedure.setOtherFee(objects.get(125).toString()); |
| | | courtExecutionProcedure.setTotalAmount(objects.get(126).toString()); |
| | | courtExecutionProcedure.setRemark("送件人:"+objects.get(127).toString()); |
| | | |
| | | int save = applyRoomDiscountServiceDaoImpl.saveCourtExecutionProcedure(BeanConvertUtil.beanCovertMap(courtExecutionProcedure)); |
| | | } |
| | | |
| | | if (objects.get(128) != null) { |
| | | CourtTrialProcedure courtTrialProcedure = new CourtTrialProcedure(); |
| | | courtTrialProcedure.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | courtTrialProcedure.setAcceptCourtName(objects.get(128).toString()); |
| | | courtTrialProcedure.setJudgeName(objects.get(129).toString()); |
| | | courtTrialProcedure.setJudgeContact(objects.get(130).toString()); |
| | | courtTrialProcedure.setJudgeNoticeAcceptDate(objects.get(131).toString()); |
| | | courtTrialProcedure.setCourtMediationDate(objects.get(132).toString()); |
| | | courtTrialProcedure.setMediationResult(objects.get(133).toString()); |
| | | courtTrialProcedure.setSubpoenaSignDate(objects.get(134).toString()); |
| | | courtTrialProcedure.setUndeliveredDate(objects.get(135).toString()); |
| | | courtTrialProcedure.setCourtSessionDate1(objects.get(136).toString()); |
| | | courtTrialProcedure.setCourtSessionDate2(objects.get(137).toString()); |
| | | courtTrialProcedure.setCaseNumber(objects.get(138).toString()); |
| | | courtTrialProcedure.setCourtSessionResult(objects.get(139).toString()); |
| | | courtTrialProcedure.setJudgmentDate(objects.get(140).toString()); |
| | | courtTrialProcedure.setJudgmentResult(objects.get(141).toString()); |
| | | courtTrialProcedure.setRemark(objects.get(142).toString()); |
| | | |
| | | int save = applyRoomDiscountServiceDaoImpl.saveCourtTrialProcedure(BeanConvertUtil.beanCovertMap(courtTrialProcedure)); |
| | | } |
| | | |
| | | if (objects.get(143) != null) { |
| | | CourtExecutionProcedure courtExecutionProcedure = new CourtExecutionProcedure(); |
| | | courtExecutionProcedure.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | courtExecutionProcedure.setApplyTime(objects.get(143).toString()); |
| | | courtExecutionProcedure.setJudgmentDocNumber(objects.get(144).toString()); |
| | | courtExecutionProcedure.setArrearsPeriod(objects.get(145).toString()); |
| | | courtExecutionProcedure.setArrearsAmount(objects.get(146).toString()); |
| | | courtExecutionProcedure.setLateFee(objects.get(147).toString()); |
| | | courtExecutionProcedure.setAcceptanceFee(objects.get(148).toString()); |
| | | courtExecutionProcedure.setOtherFee(objects.get(149).toString()); |
| | | courtExecutionProcedure.setTotalAmount(objects.get(150).toString()); |
| | | |
| | | int save = applyRoomDiscountServiceDaoImpl.saveCourtExecutionProcedure(BeanConvertUtil.beanCovertMap(courtExecutionProcedure)); |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |