| | |
| | | private String collectionPeriodEnd; |
| | | // 应收款 |
| | | private String receivableMoney; |
| | | // 新增字段:收费类型 |
| | | private String chargeType; // 收费类型(如:服务费、定金、尾款等) |
| | | |
| | | // 新增字段:发票/收据号码 |
| | | private String invoiceReceiptNo; // 发票/收据号码 |
| | | |
| | | // 新增字段:白单存档编号 |
| | | private String whiteListArchiveNo; // 白单存档编号 |
| | | // 收款日期 |
| | | private String collectionDate; |
| | | // 收款金额 |
| | |
| | | this.collectionPeriodStart = collectionPeriodStart; |
| | | } |
| | | |
| | | public String getChargeType() { |
| | | return chargeType; |
| | | } |
| | | |
| | | public void setChargeType(String chargeType) { |
| | | this.chargeType = chargeType; |
| | | } |
| | | |
| | | public String getInvoiceReceiptNo() { |
| | | return invoiceReceiptNo; |
| | | } |
| | | |
| | | public void setInvoiceReceiptNo(String invoiceReceiptNo) { |
| | | this.invoiceReceiptNo = invoiceReceiptNo; |
| | | } |
| | | |
| | | public String getWhiteListArchiveNo() { |
| | | return whiteListArchiveNo; |
| | | } |
| | | |
| | | public void setWhiteListArchiveNo(String whiteListArchiveNo) { |
| | | this.whiteListArchiveNo = whiteListArchiveNo; |
| | | } |
| | | |
| | | public String getCollectionPeriodEnd() { |
| | | return collectionPeriodEnd; |
| | | } |
| | |
| | | } |
| | | |
| | | public static String defaultValue(Object o, String defaultValue) { |
| | | return o == null ? defaultValue : o.toString(); |
| | | return o == null || o.equals("") ? defaultValue : o.toString(); |
| | | } |
| | | |
| | | public static String defaultValueToNull(Object o) { |
| | |
| | | |
| | | private String stateName; |
| | | |
| | | private String importFileName; |
| | | |
| | | |
| | | List<AssetImportLogDetailDto> assetImportLogDetailDtos; |
| | | |
| | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getImportFileName() { |
| | | return importFileName; |
| | | } |
| | | |
| | | public void setImportFileName(String importFileName) { |
| | | this.importFileName = importFileName; |
| | | } |
| | | |
| | | public String getLogType() { |
| | | return logType; |
| | | } |
| | |
| | | private String psId; |
| | | private String userId; |
| | | private String remark; |
| | | private String parkingLocation; |
| | | |
| | | private String startTime; |
| | | |
| | |
| | | this.parkingType = parkingType; |
| | | } |
| | | |
| | | |
| | | public String getParkingLocation() { |
| | | return parkingLocation; |
| | | } |
| | | |
| | | public void setParkingLocation(String parkingLocation) { |
| | | this.parkingLocation = parkingLocation; |
| | | } |
| | | |
| | | public String getCarId() { |
| | | return carId; |
| | | } |
| | |
| | | private String statusCd = "0"; |
| | | private String userId; |
| | | private String bId; |
| | | private String communityCode; |
| | | private String communityName; |
| | | |
| | | public String getCommunityCode() { |
| | | return communityCode; |
| | | } |
| | | |
| | | public void setCommunityCode(String communityCode) { |
| | | this.communityCode = communityCode; |
| | | } |
| | | |
| | | public String getCommunityName() { |
| | | return communityName; |
| | | } |
| | | |
| | | public void setCommunityName(String communityName) { |
| | | this.communityName = communityName; |
| | | } |
| | | |
| | | // 新增字段 |
| | | private String powerSupplyBureau; // 供电局 |
| | | private String householdName; // 户名 |
| | |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <!-- <if test="communityId !=null and communityId != ''">--> |
| | | <!-- and t.community_id= #{communityId}--> |
| | | <!-- </if>--> |
| | | <if test="paymentName !=null and paymentName != ''"> |
| | | and t.payment_name= #{paymentName} |
| | | </if> |
| | |
| | | <select id="getAssetImportLogInfo" parameterType="Map" resultType="Map"> |
| | | select t.log_type,t.log_type logType,t.log_id,t.log_id |
| | | logId,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id |
| | | communityId,t.create_time createTime,t.state,td.`name` |
| | | communityId, t.import_file_name as importFileName,t.create_time createTime,t.state,td.`name` |
| | | logTypeName,td1.name stateName,t.user_name userName, |
| | | COALESCE(d.successCount, 0) AS successCount, |
| | | COALESCE(d.errorCount, 0) AS errorCount, |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="importFileName !=null and importFileName != ''"> |
| | | and t.import_file_name= #{importFileName} |
| | | </if> |
| | | <if test="errorCount !=null and errorCount != ''"> |
| | | and t.error_count= #{errorCount} |
| | | </if> |
| | |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="merchantId !=null and merchantId != ''"> |
| | | and t.merchant_id= #{merchantId} |
| | | </if> |
| | | <if test="states !=null"> |
| | | and t.state in |
| | | <foreach collection="states" item="item" index="index" open="(" close=")" separator=","> |
| | |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.in_time < #{endTime} |
| | | </if> |
| | | <if test="merchantId !=null and merchantId != ''"> |
| | | and t.merchant_id < #{merchantId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="doorRoomNum !=null and doorRoomNum != ''"> |
| | | and t.door_room_num= #{doorRoomNum} |
| | | </if> |
| | | <if test="propertyType !=null and propertyType != ''"> |
| | | and t.property_type= #{propertyType} |
| | | </if> |
| | | <if test="propertyAddress !=null and propertyAddress != ''"> |
| | | and t.property_address= #{propertyAddress} |
| | | </if> |
| | | <if test="roadName !=null and roadName != ''"> |
| | | and t.road_name= #{roadName} |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="roadName !=null and roadName != ''"> |
| | | AND t.`road_name` = #{roadName} |
| | | </if> |
| | | <if test="floorId !=null and floorId != ''"> |
| | | and f.`floor_id`= #{floorId} |
| | | </if> |
| | |
| | | <if test="floorId !=null and floorId != ''"> |
| | | and f.floor_id= #{floorId} |
| | | </if> |
| | | <if test="doorRoomNum !=null and doorRoomNum != ''"> |
| | | and t.door_room_num= #{doorRoomNum} |
| | | </if> |
| | | <if test="propertyType !=null and propertyType != ''"> |
| | | and t.property_type= #{propertyType} |
| | | </if> |
| | | <if test="propertyAddress !=null and propertyAddress != ''"> |
| | | and t.property_address= #{propertyAddress} |
| | | </if> |
| | | <if test="floorNum !=null and floorNum != ''"> |
| | | and f.`floor_num`= #{floorNum} |
| | | </if> |
| | |
| | | and t.end_time > #{nowDate} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= in (#{communityId},'9999') |
| | | and t.community_id in (#{communityId},'9999') |
| | | and pfc.community_id in (#{communityId},'9999') |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | |
| | | <insert id="saveContractCollectionDetail" parameterType="Map"> |
| | | insert into contract_collection_detail(contract_id, collection_period_start, collection_period_end, |
| | | receivable_money, collection_date, collection_amount, |
| | | special_reduction, unpaid_money) |
| | | special_reduction, unpaid_money, charge_type, invoice_receipt_no, white_list_archive_no) |
| | | values (#{contractId}, #{collectionPeriodStart}, #{collectionPeriodEnd}, |
| | | #{receivableMoney}, #{collectionDate}, #{collectionAmount}, |
| | | #{specialReduction}, #{unpaidMoney}) |
| | | #{specialReduction}, #{unpaidMoney}, #{chargeType}, #{invoiceReceiptNo}, #{whiteListArchiveNo}) |
| | | </insert> |
| | | |
| | | <!-- 查询合同收款明细信息 add by wuxw 2018-07-03 --> |
| | |
| | | <!-- 保存车辆信息 add by wuxw 2018-07-03 --> |
| | | <!-- 新增字段:first_payment_date、payment_deadline_date、unit_price_per_month、annual_receivable_amount --> |
| | | <insert id="saveOwnerCarInfo" parameterType="Map"> |
| | | insert into owner_car(car_brand, car_num, ps_id, remark, owner_id, car_type_cd, user_id, car_id, car_color, |
| | | insert into owner_car(parking_location, car_brand, car_num, ps_id, remark, owner_id, car_type_cd, user_id, car_id, car_color, |
| | | car_type, road_name, floor_num, unit_num, room_num, start_time, end_time, state, community_id, member_id, b_id,lease_type, |
| | | first_payment_date, payment_deadline_date, unit_price_per_month, annual_receivable_amount, parking_type) |
| | | values (#{carBrand}, #{carNum}, #{psId}, #{remark}, #{ownerId}, #{carTypeCd}, #{userId}, #{carId}, #{carColor}, |
| | | values (#{parkingLocation}, #{carBrand}, #{carNum}, #{psId}, #{remark}, #{ownerId}, #{carTypeCd}, #{userId}, #{carId}, #{carColor}, |
| | | #{carType},#{roadName},#{floorNum},#{unitNum},#{roomNum}, |
| | | <!-- 正确处理start_time:为空则赋值NULL,否则取参数值 --> |
| | | <choose> |
| | |
| | | |
| | | public class ValueUtil { |
| | | public static String defaultValue(Object o) { |
| | | return o == null ? "" : o.toString(); |
| | | try { |
| | | return o == null ? "" : o.toString(); |
| | | } catch (Exception e) { |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | public static String defaultValue(Object[] o, int i) { |
| | | try { |
| | | return o[i] == null ? "" : o[i].toString(); |
| | | } catch (Exception e) { |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | public static String defaultValue(Object o, String defaultValue) { |
| | |
| | | package com.java110.api.importData.adapt; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.components.ValueUtil; |
| | | import com.java110.api.importData.DefaultImportDataAdapt; |
| | | import com.java110.api.importData.IImportDataCleaningAdapt; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.importData.Vtil; |
| | | import com.java110.dto.system.ComponentValidateResult; |
| | | import com.java110.intf.community.ICommunityInnerServiceSMO; |
| | | import com.java110.intf.community.IVisitInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerV1InnerServiceSMO; |
| | | import com.java110.po.car.CarInoutPo; |
| | | import com.java110.po.meter.MeterWaterPo; |
| | | import com.java110.po.owner.VisitPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.ImportExcelUtils; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service("importCarInoutDataCleaning") |
| | | public class ImportCarInoutDataCleaningAdapt extends DefaultImportDataAdapt implements IImportDataCleaningAdapt { |
| | |
| | | @Autowired |
| | | private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMOImpl; |
| | | @Autowired |
| | | private IVisitInnerServiceSMO visitInnerServiceSMOImpl; |
| | | @Override |
| | |
| | | */ |
| | | private void getCarInouts(Workbook workbook, List<CarInoutPo> carInoutPos, ComponentValidateResult result) throws ParseException { |
| | | Sheet sheet = null; |
| | | sheet = ImportExcelUtils.getSheet(workbook, "临时停车费 导入模板"); |
| | | sheet = ImportExcelUtils.getSheet(workbook, "临时停车费模板"); |
| | | List<Object[]> oList = ImportExcelUtils.listFromSheet(sheet); |
| | | List<Map<String, Object>> maps = BeanConvertUtil.beanCovertMapListC(communityInnerServiceSMOImpl.queryCommunitys(new CommunityDto())); |
| | | for (int osIndex = 0; osIndex < oList.size(); osIndex++) { |
| | | Object[] os = oList.get(osIndex); |
| | | if (osIndex <= 2) { // 第一行是 头部信息 直接跳过 |
| | | if (osIndex <= 1) { // 第一行是 头部信息 直接跳过 |
| | | continue; |
| | | } |
| | | Assert.hasValue(os[1], (osIndex + 1) + "行小区编码不能为空"); |
| | | if (defaultValue(os[3]).equals("")) { |
| | | if (Vtil.defaultValue(os[0], null) == null) { |
| | | continue; |
| | | } |
| | | if (Vtil.defaultValue(os[3], null) == null) { |
| | | os[3] = "A888888"; |
| | | } |
| | | Assert.hasValue(os[6], (osIndex + 1) + "行到访日期不能为空"); |
| | | // Assert.hasValue(os[6], (osIndex + 1) + "行到访日期不能为空"); |
| | | Assert.hasValue(os[11], (osIndex + 1) + "行进场时间不能为空"); |
| | | |
| | | CarInoutPo carInoutPo = new CarInoutPo(); |
| | | carInoutPo.setCommunityCode(defaultValue(os[1])); |
| | | carInoutPo.setCarNum(defaultValue(os[3])); |
| | | carInoutPo.setVehicleType(defaultValue(os[5])); |
| | | VisitPo visitPo = new VisitPo(); |
| | | visitPo.setVisitTime(defaultValue(os[6])); |
| | | visitPo.setvName(defaultValue(os[7])); |
| | | visitPo.setPhoneNumber(defaultValue(os[8])); |
| | | visitPo.setCarNum(defaultValue(os[3])); |
| | | visitPo.setVisitCase(defaultValue(os[10])); |
| | | carInoutPo.setVisitPo(visitPo); |
| | | carInoutPo.setInTime(defaultValue(os[11])); |
| | | carInoutPo.setInAddress(defaultValue(os[12])); |
| | | carInoutPo.setOutTime(defaultValue(os[13])); |
| | | carInoutPo.setOutAddress(defaultValue(os[14])); |
| | | carInoutPo.setParkingDuration(defaultValue(os[15])); |
| | | carInoutPo.setPayDate(defaultValue(os[16])); |
| | | carInoutPo.setPaymentAmount(defaultValue(os[17])); |
| | | carInoutPo.setMerchantId(defaultValue(os[18])); |
| | | carInoutPo.setPayer(defaultValue(os[19])); |
| | | carInoutPo.setBankDepositDate(defaultValue(os[20])); |
| | | carInoutPo.setBankDepositor(defaultValue(os[21])); |
| | | try { |
| | | carInoutPo.setCommunityCode(defaultValue(os[1])); |
| | | carInoutPo.setCommunityName(defaultValue(os[2])); |
| | | setCommunityId(carInoutPo, os, maps); |
| | | carInoutPo.setCarNum(defaultValue(os[3])); |
| | | carInoutPo.setVehicleType(defaultValue(os[5])); |
| | | VisitPo visitPo = new VisitPo(); |
| | | visitPo.setVisitTime(Vtil.defaultValueToDate(defaultValue(os[6]))); |
| | | visitPo.setvName(defaultValue(os[7])); |
| | | visitPo.setPhoneNumber(defaultValue(os[8])); |
| | | visitPo.setCarNum(defaultValue(os[3])); |
| | | visitPo.setVisitCase(defaultValue(os[10])); |
| | | carInoutPo.setVisitPo(visitPo); |
| | | carInoutPo.setInTime(Vtil.defaultValueToDate(os[11])); |
| | | carInoutPo.setInAddress(defaultValue(os[12])); |
| | | carInoutPo.setOutTime(Vtil.defaultValueToDate(os[13])); |
| | | carInoutPo.setOutAddress(defaultValue(os[14])); |
| | | carInoutPo.setParkingDuration(defaultValue(os[15])); |
| | | carInoutPo.setPayDate(Vtil.defaultValueToDate(os[16])); |
| | | carInoutPo.setPaymentAmount(defaultValue(os[17])); |
| | | carInoutPo.setMerchantId(defaultValue(os[18])); |
| | | carInoutPo.setPayer(defaultValue(os[19])); |
| | | carInoutPo.setBankDepositDate(Vtil.defaultValueToDate(os[20])); |
| | | carInoutPo.setBankDepositor(defaultValue(os[21])); |
| | | } catch (ArrayIndexOutOfBoundsException e) { |
| | | |
| | | } catch (Exception e) { |
| | | throw new IllegalArgumentException("未知错误:" + e); |
| | | } |
| | | carInoutPos.add(carInoutPo); |
| | | } |
| | | } |
| | | |
| | | public void setCommunityId(CarInoutPo po, Object[] os, List<Map<String, Object>> maps) { |
| | | for (Map<String, Object> map : maps) { |
| | | if (ValueUtil.defaultValue(os[1]).isEmpty() && ValueUtil.defaultValue(os[2]).isEmpty()){ |
| | | throw new IllegalArgumentException("小区名称和小区编号均为空"); |
| | | } |
| | | if (ValueUtil.defaultValue(os[1]).isEmpty()) { |
| | | if (Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[2]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } else if (ValueUtil.defaultValue(os[2]).isEmpty()){ |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[1]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } else { |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[1])) && Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[2]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | throw new IllegalArgumentException("未查询到小区:" + Vtil.appendHyphenToRight(ValueUtil.defaultValue(os[1])) + ValueUtil.defaultValue(os[2])); |
| | | } |
| | | |
| | | public String defaultValue(Object o) { |
| | | return o == null ? "" : o.toString(); |
| | | return o == null ? null : o.toString(); |
| | | } |
| | | } |
| | |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.contract.*; |
| | | import com.java110.dto.importData.ImportOwnerRoomDto; |
| | | import com.java110.dto.importData.Vtil; |
| | | import com.java110.dto.system.ComponentValidateResult; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | } |
| | | |
| | | Object[] os = oList.get(osIndex); |
| | | if (os == null) { // 新增空值判断 |
| | | os = new Object[142]; // 空数组则直接创建长度为 142 的数组 |
| | | } else if (os.length < 142) { |
| | | os = Arrays.copyOf(os, 142); |
| | | } |
| | | |
| | | ContractDto contractDto = new ContractDto(); |
| | | contractDto.setContractId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_contractId)); |
| | | contractDto.setPropertyCompany(defaultValue(os[qbl + 1])); |
| | | contractDto.setCommunityName(defaultValue(os[qbl + 2])); |
| | | contractDto.setState(defaultValue(os[qbl + 3])); |
| | | contractDto.setStartTime(defaultValue(os[qbl + 4])); |
| | | contractDto.setEndTime(defaultValue(os[qbl + 5])); |
| | | String now = DateUtil.getFormatTimeStringB(new Date()); |
| | | contractDto.setSigningTime(defaultValue(os[qbl + 6]).equals("") ? now : defaultValue(os[qbl + 6])); |
| | | contractDto.setStartTime(Vtil.defaultValueToDate(os[qbl + 4])); |
| | | contractDto.setEndTime(Vtil.defaultValueToDate(os[qbl + 5])); |
| | | contractDto.setSigningTime(Vtil.defaultValueToDate(os[qbl + 6])); |
| | | contractDto.setContractTerm(defaultValue(os[qbl + 7])); |
| | | contractDto.setContractCode(defaultValue(os[qbl + 8])); |
| | | contractDto.setIsArchived(defaultValue(os[qbl + 9])); |
| | | contractDto.setContractType(defaultValue(os[qbl + 11])); |
| | | contractDto.setHasSupplementAgreement(defaultValue(os[qbl + 12])); |
| | | contractDto.setContractReminderDate(defaultValue(os[qbl + 13])); |
| | | contractDto.setContractReminderDate(Vtil.defaultValueToDate(os[qbl + 13])); |
| | | contractDto.setPartyA(defaultValue(os[qbl + 14])); |
| | | contractDto.setPartyB(defaultValue(os[qbl + 1])); |
| | | contractDto.setSignatoryAddress(defaultValue(os[qbl + 15])); |
| | |
| | | private void setCcds(ContractDto contractDto, Object[] os) { |
| | | for (int j = 0; j < 10; j++) { |
| | | try { |
| | | int index = j * 7 + 58; |
| | | int index = j * 10 + 53; |
| | | if (os[index] == null || os[index].equals("")) { |
| | | return; |
| | | } |
| | | ContractCollectionDetailDto ccd = new ContractCollectionDetailDto(); |
| | | ccd.setContractId(contractDto.getContractId()); |
| | | ccd.setCollectionPeriodStart(defaultValue(os[qbl + index])); |
| | | ccd.setQueryCollectionPeriodEnd(defaultValue(os[qbl + index + 1])); |
| | | ccd.setCollectionAmount(defaultValue(os[qbl + index + 2])); |
| | | ccd.setCollectionDate(defaultValue(os[qbl + index + 3])); |
| | | ccd.setCollectionAmount(defaultValue(os[qbl + index + 4])); |
| | | ccd.setSpecialReduction(defaultValue(os[qbl + index + 5])); |
| | | ccd.setUnpaidMoney(defaultValue(os[qbl + index + 6])); |
| | | |
| | | ccd.setChargeType(Vtil.defaultValue(os[index])); |
| | | ccd.setInvoiceReceiptNo(Vtil.defaultValue(os[index+1])); |
| | | ccd.setWhiteListArchiveNo(Vtil.defaultValue(os[index+2])); |
| | | |
| | | ccd.setCollectionPeriodStart(Vtil.defaultValueToDate(os[qbl + index + 3])); |
| | | ccd.setQueryCollectionPeriodEnd(Vtil.defaultValueToDate(os[qbl + index + 4])); |
| | | ccd.setCollectionAmount(defaultValue(os[qbl + index + 5])); |
| | | ccd.setCollectionDate(defaultValue(os[qbl + index + 6])); |
| | | ccd.setCollectionAmount(defaultValue(os[qbl + index + 7])); |
| | | ccd.setSpecialReduction(defaultValue(os[qbl + index + 8])); |
| | | ccd.setUnpaidMoney(defaultValue(os[qbl + index + 9])); |
| | | contractDto.getContractCollectionDetailDtos().add(ccd); |
| | | } catch (Exception e){ |
| | | continue; |
| | |
| | | private void setCps(ContractDto contractDto, Object[] os) { |
| | | ContractPaymentStatusDto cps = new ContractPaymentStatusDto(); |
| | | cps.setContractId(contractDto.getContractId()); |
| | | cps.setPaymentStatus(defaultValue(os[qbl + 49])); |
| | | cps.setReceivableAmount(defaultValue(os[qbl + 50])); |
| | | cps.setReceivedAmount(defaultValue(os[qbl + 51])); |
| | | cps.setUnpaidAmount(defaultValue(os[qbl + 52])); |
| | | cps.setSpecialDiscount(defaultValue(os[qbl + 53])); |
| | | cps.setCollectionProgress(defaultValue(os[qbl + 54])); |
| | | cps.setFinalCollectionDeadline(defaultValue(os[qbl + 55])); |
| | | cps.setCollectionReminderStatus(defaultValue(os[qbl + 56])); |
| | | cps.setRemark(defaultValue(os[qbl + 57])); |
| | | cps.setPaymentStatus(defaultValue(os[qbl + 44])); |
| | | cps.setReceivableAmount(defaultValue(os[qbl + 45])); |
| | | cps.setReceivedAmount(defaultValue(os[qbl + 46])); |
| | | cps.setUnpaidAmount(defaultValue(os[qbl + 47])); |
| | | cps.setSpecialDiscount(defaultValue(os[qbl + 48])); |
| | | cps.setCollectionProgress(defaultValue(os[qbl + 49])); |
| | | cps.setFinalCollectionDeadline(defaultValue(os[qbl + 50])); |
| | | cps.setCollectionReminderStatus(defaultValue(os[qbl + 51])); |
| | | cps.setRemark(defaultValue(os[qbl + 52])); |
| | | |
| | | contractDto.setContractPaymentStatus(cps); |
| | | } |
| | |
| | | private void setCms(ContractDto contractDto, Object[] os) { |
| | | ContractManagementShareDto cms = new ContractManagementShareDto(); |
| | | cms.setContractId(contractDto.getContractId()); |
| | | cms.setManagementRatio(defaultValue(os[qbl + 45])); |
| | | cms.setOurCompanyAmount(defaultValue(os[qbl + 46])); |
| | | cms.setOurCommitteeShare(defaultValue(os[qbl + 47])); |
| | | cms.setOurCompanyReceivable(defaultValue(os[qbl + 48])); |
| | | cms.setManagementRatio(defaultValue(os[qbl + 40])); |
| | | cms.setOurCompanyAmount(defaultValue(os[qbl + 41])); |
| | | cms.setOurCommitteeShare(defaultValue(os[qbl + 42])); |
| | | cms.setOurCompanyReceivable(defaultValue(os[qbl + 43])); |
| | | |
| | | contractDto.setContractManagementShare(cms); |
| | | } |
| | |
| | | cad.setAnnualAmount(defaultValue(os[qbl + 29])); |
| | | cad.setTotalAmount(defaultValue(os[qbl + 30])); |
| | | cad.setSettlementMethod(defaultValue(os[qbl + 31])); |
| | | cad.setSettlementAmount(defaultValue(os[qbl + 32])); |
| | | cad.setFeeType(defaultValue(os[qbl + 33])); |
| | | cad.setAccountInfo(defaultValue(os[qbl + 34])); |
| | | cad.setMainMeterNo(defaultValue(os[qbl + 35])); |
| | | cad.setSubMeterNo(defaultValue(os[qbl + 36])); |
| | | cad.setLastMonthReading(defaultValue(os[qbl + 37])); |
| | | cad.setCurrentMonthReading(defaultValue(os[qbl + 38])); |
| | | cad.setCurrentPeriodConsumption(defaultValue(os[qbl + 39])); |
| | | cad.setElectricityUnitPrice(defaultValue(os[qbl + 40])); |
| | | cad.setElectricityFee(defaultValue(os[qbl + 41])); |
| | | cad.setDeposit(defaultValue(os[qbl + 42])); |
| | | cad.setSettlementCycle(defaultValue(os[qbl + 43])); |
| | | cad.setPaymentRemark(defaultValue(os[qbl + 44])); |
| | | |
| | | cad.setAccountInfo(defaultValue(os[qbl + 32])); |
| | | cad.setMainMeterNo(defaultValue(os[qbl + 33])); |
| | | cad.setSubMeterNo(defaultValue(os[qbl + 34])); |
| | | cad.setDeposit(defaultValue(os[qbl + 35])); |
| | | cad.setSettlementCycle(defaultValue(os[qbl + 38])); |
| | | cad.setPaymentRemark(defaultValue(os[qbl + 39])); |
| | | // |
| | | // cad.setSettlementAmount(defaultValue(os[qbl + 32])); |
| | | // cad.setFeeType(defaultValue(os[qbl + 33])); |
| | | // cad.setAccountInfo(defaultValue(os[qbl + 34])); |
| | | // cad.setMainMeterNo(defaultValue(os[qbl + 35])); |
| | | // cad.setSubMeterNo(defaultValue(os[qbl + 36])); |
| | | // cad.setLastMonthReading(defaultValue(os[qbl + 37])); |
| | | // cad.setCurrentMonthReading(defaultValue(os[qbl + 38])); |
| | | // cad.setCurrentPeriodConsumption(defaultValue(os[qbl + 39])); |
| | | // cad.setElectricityUnitPrice(defaultValue(os[qbl + 40])); |
| | | // cad.setElectricityFee(defaultValue(os[qbl + 41])); |
| | | // cad.setDeposit(defaultValue(os[qbl + 42])); |
| | | // cad.setSettlementCycle(defaultValue(os[qbl + 43])); |
| | | // cad.setPaymentRemark(defaultValue(os[qbl + 44])); |
| | | |
| | | contractDto.setContractAmountDetail(cad); |
| | | } |
| | |
| | | import com.java110.api.components.ValueUtil; |
| | | import com.java110.api.importData.DefaultImportDataAdapt; |
| | | import com.java110.api.importData.IImportDataCleaningAdapt; |
| | | import com.java110.dto.PropertyWhiteListFlowDto; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.importData.Vtil; |
| | | import com.java110.dto.system.ComponentValidateResult; |
| | |
| | | po.setStatusCd("0"); |
| | | po.setUserId(paramIn.getString("userId")); |
| | | po.setRemark(ValueUtil.defaultValue(os[28])); |
| | | po.setCommunityCode(Vtil.appendHyphenToRight(ValueUtil.defaultValue(os[0]))); |
| | | po.setCommunityName(ValueUtil.defaultValue(os[1])); |
| | | try { |
| | | po.setPrice(Vtil.defaultDouble(os[26])); |
| | | } catch (Exception e) { |
| | |
| | | po.setRemark2(ValueUtil.defaultValue(os[34])); |
| | | po.setAddress(ValueUtil.defaultValue(os[16])); |
| | | po.setWriter(ValueUtil.defaultValue(os[35])); |
| | | po.setWriteTime(ValueUtil.defaultValue(os[36])); |
| | | po.setAuditUserName(ValueUtil.defaultValue(os[37])); |
| | | po.setWriteTime(ValueUtil.defaultValue(os,36)); |
| | | po.setAuditUserName(ValueUtil.defaultValue(os,37)); |
| | | try { |
| | | po.setCreateTime(DateUtil.getDateFromStringB(ValueUtil.defaultValue(os[38]))); |
| | | } catch (Exception e) { |
| | |
| | | po.setObjName(po.getRoadName() + "-" + po.getFloorNum() + "-" + po.getUnitNum() + "-" + po.getRoomNum()); |
| | | } |
| | | |
| | | |
| | | public void setCommunityId(MeterWaterPo po, Object[] os, List<Map<String, Object>> maps) { |
| | | for (Map<String, Object> map : maps) { |
| | | if (ValueUtil.defaultValue(os[0]).isEmpty() && ValueUtil.defaultValue(os[1]).isEmpty()){ |
| | | throw new IllegalArgumentException("小区名称和小区编号均为空"); |
| | | } |
| | | if (ValueUtil.defaultValue(os[0]).isEmpty()) { |
| | | if (ValueUtil.defaultValue(os[1]).equals(map.get("name"))) { |
| | | if (Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[1]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } else if (ValueUtil.defaultValue(os[1]).isEmpty()){ |
| | | if (ValueUtil.defaultValue(os[0]).equals(map.get("communityCode"))) { |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[0]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } else { |
| | | if (ValueUtil.defaultValue(os[0]).equals(map.get("communityCode")) && ValueUtil.defaultValue(os[1]).equals(map.get("name"))) { |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[0])) && Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[1]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | throw new IllegalArgumentException("未查询到小区:" + Vtil.appendHyphenToRight(ValueUtil.defaultValue(os[0])) + ValueUtil.defaultValue(os[1])); |
| | | po.setCommunityId(null); |
| | | po.setCommunityCode(ValueUtil.defaultValue(os[0])); |
| | | po.setCommunityName(ValueUtil.defaultValue(os[1])); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | throw new IllegalArgumentException("未查询到小区:" + Vtil.appendHyphenToRight(ValueUtil.defaultValue(os[0])) + ValueUtil.defaultValue(os[1])); |
| | | po.setCommunityCode(Vtil.defaultValue(os[0])); |
| | | po.setCommunityName(Vtil.defaultValue(os[1])); |
| | | po.setCommunityId(null); |
| | | } |
| | | } |
| | |
| | | // Assert.hasValue(os[15], (osIndex + 1) + "截止时间不能为空"); |
| | | Assert.hasValue(os[12], (osIndex + 1) + "行停车类型不能为空"); |
| | | // Assert.hasValue(os[11], (osIndex + 1) + "停车场类型不能为空"); |
| | | String startTime = os.length >= 14 && os[14] != null ? Vtil.defaultValueToDate(os[14], "start") : null; |
| | | String endTime = os.length >= 15 && os[15] != null ? Vtil.defaultValueToDate(os[15], "end") : null; |
| | | String startTime = os.length > 14 && os[14] != null ? Vtil.defaultValueToDate(os[14], "start") : null; |
| | | String endTime = os.length > 15 && os[15] != null ? Vtil.defaultValueToDate(os[15], "end") : null; |
| | | // Assert.isDate(startTime, DateUtil.DATE_FORMATE_STRING_B, (osIndex + 1) + "行开始时间格式错误 请填写YYYY-MM-DD文本格式"); |
| | | // Assert.isDate(endTime, DateUtil.DATE_FORMATE_STRING_B, (osIndex + 1) + "行结束时间格式错误 请填写YYYY-MM-DD文本格式"); |
| | | importOwnerCar = new OwnerCarDto(); |
| | |
| | | // Assert.hasValue(os[15], (osIndex + 1) + "截止时间不能为空"); |
| | | Assert.hasValue(os[12], (osIndex + 1) + "行停车类型不能为空"); |
| | | // Assert.hasValue(os[11], (osIndex + 1) + "停车场类型不能为空"); |
| | | String startTime = os.length >= 14 && os[14] != null ? Vtil.defaultValueToDate(os[14], "start") : null; |
| | | String endTime = os.length >= 15 && os[15] != null ? Vtil.defaultValueToDate(os[15], "end") : null; |
| | | String startTime = os.length > 14 && os[14] != null ? Vtil.defaultValueToDate(os[14], "start") : null; |
| | | String endTime = os.length > 15 && os[15] != null ? Vtil.defaultValueToDate(os[15], "end") : null; |
| | | // Assert.isDate(startTime, DateUtil.DATE_FORMATE_STRING_B, (osIndex + 1) + "行开始时间格式错误 请填写YYYY-MM-DD文本格式"); |
| | | // Assert.isDate(endTime, DateUtil.DATE_FORMATE_STRING_B, (osIndex + 1) + "行结束时间格式错误 请填写YYYY-MM-DD文本格式"); |
| | | importOwnerCar = new OwnerCarDto(); |
| | |
| | | //获取车辆信息 |
| | | getPropertyWhiteListFlowDtos(workbook, whiteLists); |
| | | |
| | | for (PropertyWhiteListFlowDto whiteList : whiteLists){ |
| | | whiteList.setCommunityId(paramIn.getString("communityId")); |
| | | } |
| | | return whiteLists; |
| | | } |
| | | |
| | |
| | | |
| | | public void setCommunityId(PropertyWhiteListFlowDto po, Object[] os, List<Map<String, Object>> maps) { |
| | | for (Map<String, Object> map : maps) { |
| | | if (ValueUtil.defaultValue(os[1]).isEmpty() && ValueUtil.defaultValue(os[2]).isEmpty()){ |
| | | throw new IllegalArgumentException("小区名称和小区编号均为空"); |
| | | } |
| | | if (ValueUtil.defaultValue(os[1]).isEmpty()) { |
| | | if (ValueUtil.defaultValue(os[2]).equals(map.get("name"))) { |
| | | if (Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[2]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } else if (ValueUtil.defaultValue(os[2]).isEmpty()){ |
| | | if (ValueUtil.defaultValue(os[1]).equals(map.get("communityCode"))) { |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[1]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } else { |
| | | if (ValueUtil.defaultValue(os[1]).equals(map.get("communityCode")) && ValueUtil.defaultValue(os[1]).equals(map.get("name"))) { |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[1])) && Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[2]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | |
| | | import com.java110.api.importData.DefaultImportDataAdapt; |
| | | import com.java110.api.importData.IImportDataCleaningAdapt; |
| | | import com.java110.dto.importData.ImportOwnerRoomDto; |
| | | import com.java110.dto.importData.Vtil; |
| | | import com.java110.dto.system.ComponentValidateResult; |
| | | import com.java110.utils.util.ImportExcelUtils; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | |
| | | List<Object[]> oList = ImportExcelUtils.listFromSheet(sheet); |
| | | ImportOwnerRoomDto importOwnerRoomDto = null; |
| | | for (int osIndex = 0; osIndex < oList.size(); osIndex++) { |
| | | if (osIndex < 5) { |
| | | if (osIndex < 6) { |
| | | continue; |
| | | } |
| | | Object[] os = oList.get(osIndex); |
| | | |
| | | if (Vtil.defaultValue(os[1]).equals("")) { |
| | | continue; |
| | | } |
| | | ownerRoomDtos.add(os); |
| | | |
| | | } |
| | |
| | | filter.setInTime(record.getInTime()); |
| | | filter.setOutTime(record.getOutTime()); |
| | | filter.setDirection(record.getDirection()); |
| | | filter.setMerchantId(record.getMerchantId()); |
| | | int existCount = carInoutServiceDaoImpl.queryCarInoutsCount(BeanConvertUtil.beanCovertMap(filter)); |
| | | |
| | | if (existCount > 0) { |
| | |
| | | roomDto.setCommunityId(importOwnerRoomDto.getCommunityId()); |
| | | roomDto.setRoomNum(importOwnerRoomDto.getRoomNum()); |
| | | roomDto.setUnitId(unitId); |
| | | roomDto.setPropertyAddress(importOwnerRoomDto.getPropertyAddress()); |
| | | List<RoomDto> roomDtos = roomV1InnerServiceSMOImpl.queryRooms(roomDto); |
| | | RoomPo roomPo = null; |
| | | String roomId = ""; |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryAnnouncementTimeRangeInfo", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryAnnouncementTimeRangeInfo( |
| | | @RequestParam(value = "mpId") Long mpId, |
| | | @RequestParam(value = "mpId") String mpId, |
| | | @RequestParam(value = "page", defaultValue = "1") int page, |
| | | @RequestParam(value = "row", defaultValue = "10") int row, |
| | | @RequestParam(value = "id", required = false) String id, |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryAnnouncementTimeRangeStatistics", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryAnnouncementTimeRangeStatistics( |
| | | @RequestParam(value = "mpId", required = false) Integer mpId, |
| | | @RequestParam(value = "mpId", required = false) String mpId, |
| | | @RequestParam(value = "startCreateTime", required = false) String startCreateTime, |
| | | @RequestParam(value = "endCreateTime", required = false) String endCreateTime) { |
| | | |
| | | AnnouncementTimeRangePo queryPo = new AnnouncementTimeRangePo(); |
| | | queryPo.setMpId(Long.valueOf(mpId)); |
| | | queryPo.setMpId(mpId); |
| | | queryPo.setStartCreateTime(startCreateTime); |
| | | queryPo.setEndCreateTime(endCreateTime); |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryAnnouncementTimeRangeByMonth", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryAnnouncementTimeRangeByMonth( |
| | | @RequestParam(value = "mpId", required = false) Long mpId, |
| | | @RequestParam(value = "mpId", required = false) String mpId, |
| | | @RequestParam(value = "startCreateTime", required = false) String startCreateTime, |
| | | @RequestParam(value = "endCreateTime", required = false) String endCreateTime) { |
| | | |
| | |
| | | * @path /app/announcementTimeRange/getLatestAnnouncementTimeRangeByMpId |
| | | */ |
| | | @RequestMapping(value = "/getLatestAnnouncementTimeRangeByMpId", method = RequestMethod.GET) |
| | | public ResponseEntity<String> getLatestAnnouncementTimeRangeByMpId(@RequestParam(value = "mpId") Long mpId) { |
| | | public ResponseEntity<String> getLatestAnnouncementTimeRangeByMpId(@RequestParam(value = "mpId") String mpId) { |
| | | Assert.notNull(mpId, "外键编号mpId不能为空"); |
| | | |
| | | AnnouncementTimeRangePo queryPo = new AnnouncementTimeRangePo(); |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private Long id; // 主键ID |
| | | private Long mpId; // 外键编号 |
| | | private String mpId; // 外键编号 |
| | | private String plannedAnnouncementStart; // 拟公布-起始(年月) |
| | | private String plannedAnnouncementEnd; // 拟公布-止(年月) |
| | | private String publishedAnnouncementStart; // 已公布-起始(年月) |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getMpId() { |
| | | public String getMpId() { |
| | | return mpId; |
| | | } |
| | | |
| | | public void setMpId(Long mpId) { |
| | | public void setMpId(String mpId) { |
| | | this.mpId = mpId; |
| | | } |
| | | |
| | |
| | | queryPo.setId(id); |
| | | } |
| | | if (availableWithdrawalDate != null && !availableWithdrawalDate.isEmpty()) { |
| | | try { |
| | | // 假设前端传入的日期格式为 yyyy-MM-dd |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date date = sdf.parse(availableWithdrawalDate); |
| | | queryPo.setAvailableWithdrawalDate(date); |
| | | } catch (ParseException e) { |
| | | // 处理日期格式错误 |
| | | throw new IllegalArgumentException("可启动支取日期格式错误,正确格式为yyyy-MM-dd", e); |
| | | } |
| | | queryPo.setAvailableWithdrawalDate(availableWithdrawalDate); |
| | | } |
| | | if (qualityGuaranteePeriod2 != null && !qualityGuaranteePeriod2.isEmpty()) { |
| | | queryPo.setQualityGuaranteePeriod2(qualityGuaranteePeriod2); |
| | |
| | | // 表字段 |
| | | private Long id; // 自增主键ID |
| | | private String mpId; // 业务标识(mp_id) |
| | | private Date availableWithdrawalDate; // 可启动支取日期(年月日) |
| | | private String availableWithdrawalDate; // 可启动支取日期(年月日) |
| | | private String qualityGuaranteePeriod2; // 质保期 |
| | | private String qualityGuaranteePeriod2Start; // 质保期 |
| | | private String qualityGuaranteePeriod2End; // 质保期 |
| | | private Double qualityGuaranteeRatio; // 质保金占比 |
| | | private Double qualityGuaranteeAmount; // 质保金金额(元) |
| | | private Date createTime; // 创建时间 |
| | | private Date updateTime; // 更新时间 |
| | | private String createTime; // 创建时间 |
| | | private String updateTime; // 更新时间 |
| | | |
| | | // 分页参数(非表字段) |
| | | private Integer page; // 分页偏移量 |
| | |
| | | public void setMpId(String mpId) { |
| | | this.mpId = mpId; |
| | | } |
| | | |
| | | public Date getAvailableWithdrawalDate() { |
| | | return availableWithdrawalDate; |
| | | } |
| | | |
| | | public void setAvailableWithdrawalDate(Date availableWithdrawalDate) { |
| | | this.availableWithdrawalDate = availableWithdrawalDate; |
| | | } |
| | | |
| | | public String getQualityGuaranteePeriod2Start() { |
| | | return qualityGuaranteePeriod2Start; |
| | | } |
| | |
| | | this.qualityGuaranteeAmount = qualityGuaranteeAmount; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | public void setAvailableWithdrawalDate(String availableWithdrawalDate) { |
| | | this.availableWithdrawalDate = availableWithdrawalDate; |
| | | } |
| | | |
| | | public String getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | public void setCreateTime(String createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | public String getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | public void setUpdateTime(String updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryOwnersCommitteeConvention", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryOwnersCommitteeConvention( |
| | | @RequestParam(value = "mpId") Long mpId, |
| | | @RequestParam(value = "mpId") String mpId, |
| | | @RequestParam(value = "page", defaultValue = "1") int page, |
| | | @RequestParam(value = "row", defaultValue = "10") int row, |
| | | @RequestParam(value = "id", required = false) String id, |
| | |
| | | * @path /app/ownersCommitteeConvention/getOwnersCommitteeConventionByMpId |
| | | */ |
| | | @RequestMapping(value = "/getOwnersCommitteeConventionByMpId", method = RequestMethod.GET) |
| | | public ResponseEntity<String> getOwnersCommitteeConventionByMpId(@RequestParam(value = "mpId") Long mpId) { |
| | | public ResponseEntity<String> getOwnersCommitteeConventionByMpId(@RequestParam(value = "mpId") String mpId) { |
| | | Assert.notNull(mpId, "业务唯一标识mpId不能为空"); |
| | | |
| | | OwnersCommitteeConventionPo queryPo = new OwnersCommitteeConventionPo(); |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryOwnersCommitteeConventionStatistics", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryOwnersCommitteeConventionStatistics( |
| | | @RequestParam(value = "mpId", required = false) Long mpId, |
| | | @RequestParam(value = "mpId", required = false) String mpId, |
| | | @RequestParam(value = "ownersCommitteeResolution", required = false) String ownersCommitteeResolution, |
| | | @RequestParam(value = "startCreateTime", required = false) String startCreateTime, |
| | | @RequestParam(value = "endCreateTime", required = false) String endCreateTime) { |
| | |
| | | |
| | | // 表字段 |
| | | private Long id; // 自增主键ID |
| | | private Long mpId; // 业务唯一标识(业委会公约mp_id) |
| | | private String mpId; // 业务唯一标识(业委会公约mp_id) |
| | | private Double quota; // 额度(DECIMAL(18,2)) |
| | | private String ownersCommitteeResolution; // 业委会大会决议(是/否) |
| | | private String ownersCommitteeConsultation; // 业委会征询表(是否) |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getMpId() { |
| | | public String getMpId() { |
| | | return mpId; |
| | | } |
| | | |
| | | public void setMpId(Long mpId) { |
| | | public void setMpId(String mpId) { |
| | | this.mpId = mpId; |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public ResponseEntity<String> save(MaintenancePayment importFeeDetailPo) { |
| | | importFeeDetailPo.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_feeId)); |
| | | int flag = importFeeDetailInnerServiceSMOImpl.saveImportFeeDetail(importFeeDetailPo); |
| | | |
| | | if (flag > 0) { |
| | |
| | | SmallWeChatDto smallWeChatDto = new SmallWeChatDto(); |
| | | //由于富有支付方式要从数据库里面取值,所以此处要查询 |
| | | PaymentPoolDto paymentPoolDto = new PaymentPoolDto(); |
| | | paymentPoolDto.setCommunityId(community); |
| | | // paymentPoolDto.setCommunityId(community); |
| | | paymentPoolDto.setPage(1); |
| | | paymentPoolDto.setRow(10); |
| | | List<PaymentPoolDto> paymentPoolDtos = paymentPoolV1InnerServiceSMOImpl.queryPaymentPools(paymentPoolDto); |
| | |
| | | package com.java110.job.importData.adapt; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.log.AssetImportLogDetailDto; |
| | | import com.java110.intf.common.ICarInoutInnerServiceSMO; |
| | | import com.java110.intf.community.*; |
| | | import com.java110.job.importData.DefaultImportData; |
| | | import com.java110.job.importData.IImportDataAdapt; |
| | | import com.java110.po.car.CarInoutPo; |
| | | import com.java110.po.owner.VisitPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | try { |
| | | doImportData(assetImportLogDetailDto); |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId()); |
| | | try { |
| | | Thread.sleep(100); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), e); |
| | |
| | | * @param assetImportLogDetailDto |
| | | */ |
| | | private void doImportData(AssetImportLogDetailDto assetImportLogDetailDto) { |
| | | CarInoutPo carInoutPo = BeanConvertUtil.covertBean(JSONObject.parseObject(assetImportLogDetailDto.getContent()), CarInoutPo.class); |
| | | JSONObject jsonObj = JSONObject.parseObject(assetImportLogDetailDto.getContent()); |
| | | VisitPo visitPo = BeanConvertUtil.covertBean(jsonObj.get("visitPo"), VisitPo.class); |
| | | visitPo.setvId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_vId)); |
| | | visitPo.setState("0"); |
| | | jsonObj.remove("visitPo"); |
| | | CarInoutPo carInoutPo = BeanConvertUtil.covertBean(jsonObj, CarInoutPo.class); |
| | | carInoutPo.setVisitPo(visitPo); |
| | | carInoutPo.setbId("-1"); |
| | | carInoutPo.setVehicleType("temp"); |
| | | carInoutPo.setInoutId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_inoutId)); |
| | | carInoutPo.setCreateTime(DateUtil.getNow("yyyy-MM-dd HH:mm:ss")); |
| | | if (carInoutPo.getPaymentAmount() == null) { |
| | | carInoutPo.setState("100300"); |
| | | } else if (carInoutPo.getOutTime() == null) { |
| | | carInoutPo.setState("100400"); |
| | | } else { |
| | | carInoutPo.setState("100500"); |
| | | } |
| | | List<CarInoutPo> objects = new ArrayList<>(); |
| | | objects.add(carInoutPo); |
| | | int[] ints = carInoutInnerServiceSMOImpl.batchSaveCarInout(objects); |
| | | if (carInoutPo.getErrorTest()!= null) { |
| | | throw new IllegalArgumentException(carInoutPo.getErrorTest()); |
| | | } |
| | | if (ints == null || ints.length == 0) { |
| | | throw new IllegalArgumentException("添加临时停车费失败"); |
| | | } |
| | | if (carInoutPo.getCarNum() != null && !"".equals(carInoutPo.getCarNum())) { |
| | | try { |
| | | |
| | | visitInnerServiceSMOImpl.saveVisit(carInoutPo.getVisitPo()); |
| | | } catch (Exception e) { |
| | | throw new IllegalArgumentException("添加临时停车访客失败"); |
| | |
| | | private void doImportData(AssetImportLogDetailDto assetImportLogDetailDto) { |
| | | JSONObject data = JSONObject.parseObject(assetImportLogDetailDto.getContent()); |
| | | MeterWaterPo po = BeanConvertUtil.covertBean(data, MeterWaterPo.class); |
| | | if (po.getCommunityId() == null) { |
| | | throw new IllegalArgumentException("未查询到小区:" + po.getCommunityCode() + po.getCommunityName()); |
| | | } |
| | | validateRoom(po, assetImportLogDetailDto); |
| | | addFee(po, data, assetImportLogDetailDto.getLogId(), assetImportLogDetailDto); |
| | | int i = 1; |
| | | try { |
| | | Thread.sleep(100); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | private void addFee(MeterWaterPo po, JSONObject reqJson, String batchId, AssetImportLogDetailDto assetImportLogDetailDto) { |
| | |
| | | // } |
| | | // po.setObjId(importOwnerRoomDto.getRoomId()); |
| | | } else if (roomDtos.size() > 1) { |
| | | throw new IllegalArgumentException("存在重复的房屋:" + po.getObjName()); |
| | | po.setObjId("1"); |
| | | po.setRemark3("\n\n房屋:" + |
| | | roomDto.getCommunityId() + "-" + roomDto.getRoadName() + "-" + roomDto.getFloorNum() + "-" + roomDto.getUnitNum() + "-" + |
| | | roomDto.getRoomNum() + "不存在,该费用存入公司账户"); |
| | | } else { |
| | | po.setObjId(roomDtos.get(0).getRoomId()); |
| | | } |
| | |
| | | private void doImportData(AssetImportLogDetailDto assetImportLogDetailDto) { |
| | | JSONObject data = JSONObject.parseObject(assetImportLogDetailDto.getContent()); |
| | | MeterWaterPo po = BeanConvertUtil.covertBean(data, MeterWaterPo.class); |
| | | if (po.getCommunityId() == null) { |
| | | throw new IllegalArgumentException("未查询到小区:" + po.getCommunityCode() + po.getCommunityName()); |
| | | } |
| | | validateRoom(po, assetImportLogDetailDto); |
| | | addFee(po, data, assetImportLogDetailDto.getLogId(), assetImportLogDetailDto); |
| | | int i = 1; |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | private void addFee(MeterWaterPo po, JSONObject reqJson, String batchId, AssetImportLogDetailDto assetImportLogDetailDto) { |
| | |
| | | // } |
| | | // po.setObjId(importOwnerRoomDto.getRoomId()); |
| | | } else if (roomDtos.size() > 1) { |
| | | throw new IllegalArgumentException("存在重复的房屋:" + po.getObjName()); |
| | | po.setObjId("1"); |
| | | po.setRemark3("\n\n房屋:" + |
| | | roomDto.getCommunityId() + "-" + roomDto.getRoadName() + "-" + roomDto.getFloorNum() + "-" + roomDto.getUnitNum() + "-" + |
| | | roomDto.getRoomNum() + "存在重复的房屋,该费用存入公司账户"); |
| | | } else { |
| | | po.setObjId(roomDtos.get(0).getRoomId()); |
| | | } |
| | |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.fee.dao.IApplyRoomDiscountServiceDao; |
| | | import com.java110.intf.community.ICommunityV1InnerServiceSMO; |
| | | import com.java110.intf.community.IParkingAreaV1InnerServiceSMO; |
| | | import com.java110.intf.community.IParkingSpaceV1InnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.community.*; |
| | | import com.java110.intf.dev.IDictV1InnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeAttrInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.security.acl.Owner; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 车辆导入 适配器 |
| | |
| | | private IRoomInnerServiceSMO iroomInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | ICommunityV1InnerServiceSMO communityV1InnerServiceSMOImpl; |
| | | ICommunityInnerServiceSMO communityInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMOImpl; |
| | |
| | | OwnerCarDto ownerCarDto = null; |
| | | doImportData(assetImportLogDetailDto,ownerCarDto); |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId()); |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | |
| | |
| | | } |
| | | List<RoomDto> roomDtos = iroomInnerServiceSMOImpl.queryRooms(roomDto); |
| | | if (roomDtos.isEmpty()) { |
| | | ownerCarDto.setRemark("房屋:" + roomDto.getRoadName() + "-" + roomDto.getFloorNum() + "-" + roomDto.getUnitNum() + "-" + Vtil.defaultValue(ownerCarDto.getRoomName()) + "未查询到"); |
| | | ownerCarDto.setRemark("房屋:" + roomDto.getRoadName() + "-" + roomDto.getFloorNum() + "-" + roomDto.getUnitNum() + "-" + Vtil.defaultValue(ownerCarDto.getRoomNum(),"空") + "未查询到"); |
| | | // throw new IllegalArgumentException("未填写业主且房屋不存在"); |
| | | } else if (roomDtos.size() > 1) { |
| | | ownerCarDto.setRemark("房屋:" + roomDto.getRoadName() + "-" + roomDto.getFloorNum() + "-" + roomDto.getUnitNum() + "-" + Vtil.defaultValue(ownerCarDto.getRoomName()) + "查询到多个房屋"); |
| | |
| | | if (ownerRoomRelDtos.isEmpty()) { |
| | | ownerCarDto.setRemark("房屋:" + roomDto.getRoadName() + "-" + roomDto.getFloorNum() + "-" + roomDto.getUnitNum() + "-" + Vtil.defaultValue(ownerCarDto.getRoomName()) + "未查询到业主"); |
| | | // throw new IllegalArgumentException("未填写业主且该房屋未绑定业主"); |
| | | } else { |
| | | } |
| | | else { |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setOwnerId(ownerRoomRelDtos.get(0).getOwnerId()); |
| | | List<OwnerDto> ownerDtos = ownerV1InnerServiceSMOImpl.queryOwners(ownerDto); |
| | |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setName(ownerCarDto.getOwnerName()); |
| | | ownerDto.setCommunityId(ownerCarDto.getCommunityId()); |
| | | List<OwnerDto> ownerDtos = ownerV1InnerServiceSMOImpl.queryOwners(ownerDto); |
| | | if (ownerDtos.isEmpty()) { |
| | | ownerCarDto.setRemark("未查询到业主:" + ownerCarDto.getOwnerName()); |
| | | } else if (ownerDtos.size() > 1) { |
| | | ownerCarDto.setRemark("存在多个业主:" + ownerCarDto.getOwnerName()); |
| | | } else { |
| | | ownerCarDto.setOwnerId(ownerDtos.get(0).getOwnerId()); |
| | | } |
| | | } |
| | | ownerCarDto.setOtherItem(o); |
| | | ownerCarDto.setLeaseType("H"); |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | Object[] os = ownerCarDto.getOtherItem(); |
| | | // 原代码 |
| | | Object[] os2 = ownerCarDto.getOtherItem(); |
| | | Object[] os = new Object[102]; |
| | | |
| | | // 数组复制核心代码 |
| | | if (os2.length > 101) { |
| | | throw new IllegalArgumentException("长度超过限制(100列)"); |
| | | } |
| | | if (os2 != null) { // 先判空,避免空指针异常 |
| | | // 参数说明:源数组、源数组起始位置、目标数组、目标数组起始位置、复制长度 |
| | | System.arraycopy(os2, 0, os, 0, os2.length); |
| | | } |
| | | |
| | | String communityId = ownerCarDto.getCommunityId(); |
| | | JSONArray objects = JSONObject.parseArray(otherItem); |
| | | while (objects.size() < 100) { |
| | | objects.add(null); // 也可以填 ""、0 等自定义默认值 |
| | | } |
| | | |
| | | OwnerCarDto carDto = new OwnerCarDto(); |
| | | carDto.setCommunityId(ownerCarDto.getCommunityId()); |
| | | carDto.setCarNum(ownerCarDto.getCarNum()); |
| | | communityDto.setCommunityCode(defaultValue(os[1])); |
| | | communityDto.setName(defaultValue(os[2])); |
| | | List<CommunityDto> communityDtos = communityV1InnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | if (communityDto.getCommunityCode().equals("") && communityDto.getName().equals("")) { |
| | | throw new IllegalArgumentException("导入失败:小区编码和小区名称都为空"); |
| | | } |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | if (communityDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("不存在小区编码为:" + communityDto.getCommunityCode() + "的小区"); |
| | | throw new IllegalArgumentException("不存在的小区:" + communityDto.getCommunityCode() + communityDto.getName() + ""); |
| | | } |
| | | assetImportLogDetailDto.setCommunityId(communityDtos.get(0).getCommunityId()); |
| | | ownerCarDto.setCommunityId(communityDtos.get(0).getCommunityId()); |
| | |
| | | |
| | | |
| | | //获取房屋名称 |
| | | String carTypeCd = defaultValue(os[12]); |
| | | if (!carTypeCd.equals("")){ |
| | | DictDto dictDto = new DictDto(); |
| | | dictDto.setTableName("owner_car"); |
| | | dictDto.setTableColumns("car_type_cd"); |
| | | dictDto.setName(carTypeCd); |
| | | List<DictDto> dictDtos = dictV1InnerServiceSMOImpl.queryDicts(dictDto); |
| | | if (dictDtos.isEmpty()) { |
| | | dictDto.setName(null); |
| | | List<DictDto> dictDtos1 = dictV1InnerServiceSMOImpl.queryDicts(dictDto); |
| | | DictPo dictPo = new DictPo(); |
| | | dictPo.setTableName("owner_car"); |
| | | dictPo.setTableColumns("car_type_cd"); |
| | | dictPo.setName(carTypeCd); |
| | | dictPo.setStatusCd(dictDtos1.get(dictDtos1.size() - 1).getStatusCd() + 100); |
| | | int i = dictV1InnerServiceSMOImpl.saveDict(dictPo); |
| | | if (i == 0) { |
| | | throw new IllegalArgumentException("添加字典失败!"); |
| | | } |
| | | } else { |
| | | ownerCarPo.setCarTypeCd(dictDtos.get(0).getStatusCd()); |
| | | } |
| | | } |
| | | else { |
| | | ownerCarPo.setCarTypeCd("1001"); //默认主车辆 |
| | | } |
| | | // String carTypeCd = defaultValue(os[12]); |
| | | // if (!carTypeCd.equals("")){ |
| | | // DictDto dictDto = new DictDto(); |
| | | // dictDto.setTableName("owner_car"); |
| | | // dictDto.setTableColumns("car_type_cd"); |
| | | // dictDto.setName(carTypeCd); |
| | | // List<DictDto> dictDtos = dictV1InnerServiceSMOImpl.queryDicts(dictDto); |
| | | // if (dictDtos.isEmpty()) { |
| | | // dictDto.setName(null); |
| | | // List<DictDto> dictDtos1 = dictV1InnerServiceSMOImpl.queryDicts(dictDto); |
| | | // DictPo dictPo = new DictPo(); |
| | | // dictPo.setTableName("owner_car"); |
| | | // dictPo.setTableColumns("car_type_cd"); |
| | | // dictPo.setName(carTypeCd); |
| | | // dictPo.setStatusCd(String.valueOf(Integer.parseInt(dictDtos1.get(dictDtos1.size() - 1).getStatusCd()) + 100)); |
| | | // int i = dictV1InnerServiceSMOImpl.saveDict(dictPo); |
| | | // if (i == 0) { |
| | | // throw new IllegalArgumentException("添加字典失败!"); |
| | | // } |
| | | // } else { |
| | | // ownerCarPo.setCarTypeCd(dictDtos.get(0).getStatusCd()); |
| | | // } |
| | | // } |
| | | // else { |
| | | // ownerCarPo.setCarTypeCd("1001"); //默认主车辆 |
| | | // } |
| | | |
| | | ownerCarPo.setCarTypeCd("1001"); //默认主车辆 |
| | | |
| | | int i1 = ownerCarInnerServiceSMOImpl.queryOwnerCarsCount(carDto); |
| | | if (i1 > 0) { |
| | |
| | | ownerCarPo.setFloorNum(defaultValue(os[4])); |
| | | ownerCarPo.setUnitNum(defaultValue(os[5])); |
| | | ownerCarPo.setRoomNum(defaultValue(os[6])); |
| | | ownerCarPo.setParkingLocation(defaultValue(os[12])); |
| | | ownerCarV1InnerServiceSMOImpl.saveOwnerCar(ownerCarPo); |
| | | ParkingSpacePo parkingSpacePo = new ParkingSpacePo(); |
| | | parkingSpacePo.setPsId(psId); //车位id |
| | |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setCommunityId(ownerCarPo.getCommunityId()); |
| | | feeConfigDto.setSquarePrice(Vtil.processCount(ownerCarPo.getUnitPricePerMonth(), 2, null)); |
| | | switch (Vtil.defaultValue(os[12])) { |
| | | case "地面停车": feeConfigDto.setFeeTypeCd("630000003");break; |
| | | case "地下停车": feeConfigDto.setFeeTypeCd("630000004");break; |
| | | default: feeConfigDto.setFeeTypeCds(new String[]{"630000003","630000004"}); |
| | | } |
| | | feeConfigDto.setFeeTypeCds(new String[]{"630000003","630000004","630000005"}); |
| | | if (feeConfigDto.getSquarePrice() == null) { |
| | | throw new IllegalArgumentException("未查询到收费项"); |
| | | throw new IllegalArgumentException("未传入收费单价"); |
| | | } |
| | | feeDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | if (feeDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("单价`"+ownerCarPo.getUnitPricePerMonth()+"`未查询到收费项"); |
| | | } else if (feeDtos.size() > 1) { |
| | | switch (Vtil.defaultValue(os[12])) { |
| | | case "地面停车": feeConfigDto.setFeeTypeCd("630000003");break; |
| | | case "地下停车": feeConfigDto.setFeeTypeCd("630000004");break; |
| | | default: feeConfigDto.setFeeTypeCd("630000005");break; |
| | | } |
| | | feeDtos.removeIf(feeConfigDto1 -> !feeConfigDto1.getFeeTypeCd().equals(feeConfigDto.getFeeTypeCd())); |
| | | } |
| | | |
| | | if (feeDtos.size() > 1) { |
| | | throw new IllegalArgumentException("系统错误,查询到的费用项超过一个"); |
| | | } |
| | | } |
| | | FeeConfigDto feeDto = feeDtos.get(0); |
| | |
| | | po.setRemark1(Vtil.defaultValue(po.getRemark1()) + po.getRemark3()); |
| | | } |
| | | addFee(po, data, assetImportLogDetailDto.getLogId(), assetImportLogDetailDto); |
| | | int i = 1; |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | private void addFee(PhoneBillFlow po, JSONObject reqJson, String batchId, AssetImportLogDetailDto assetImportLogDetailDto) { |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.importData.Vtil; |
| | | import com.java110.dto.log.AssetImportLogDetailDto; |
| | | import com.java110.dto.msg.MaintenancePaymentPo; |
| | | import com.java110.dto.msg.MpFifthPaymentRecordPo; |
| | |
| | | String flowNumber = getCellValue(cellArray, 1); // 第2列:流转编号 |
| | | String projectName = getCellValue(cellArray, 4); // 第5列:项目名称 |
| | | String ownersCommitteeAmountStr = getCellValue(cellArray, 12); // 第13列:业委会金额 |
| | | if (isBlank(flowNumber) || isBlank(projectName) || isBlank(ownersCommitteeAmountStr)) { |
| | | throw new IllegalArgumentException( |
| | | String.format("核心字段缺失:流转编号[%s]、项目名称[%s]、业委会金额[%s]", |
| | | flowNumber, projectName, ownersCommitteeAmountStr) |
| | | ); |
| | | if (Vtil.defaultValue(getCellValue(cellArray, 1)).equals("")) { |
| | | continue; |
| | | } |
| | | AnnouncementTimeRangePo announcementTimeRangePo = null; |
| | | OwnersCommitteeConventionPo ocoPo = null; |
| | |
| | | |
| | | // 3. 构建3张表的PO对象(字段映射+业务计算) |
| | | MaintenancePayment mainPo = buildMaintenancePaymentPoV2(cellArray);//主表 |
| | | if (!getCellValue(cellArray, 22).isEmpty() && !getCellValue(cellArray, 23).isEmpty()) { |
| | | announcementTimeRangePo = buildAnnouncementTimeRangePo(cellArray, Long.valueOf(mainPo.getId()));//公共收益金 |
| | | } |
| | | if (!getCellValue(cellArray, 26).isEmpty() && !getCellValue(cellArray, 27).isEmpty()) { |
| | | ocoPo = buildOwnersCommitteeConventionPo(cellArray, Long.valueOf(mainPo.getId())); |
| | | } |
| | | if (!getCellValue(cellArray, 29).isEmpty()) { |
| | | owiPo = buildOwnerWithdrawalInfoPo(cellArray, Long.valueOf(mainPo.getId())); |
| | | } |
| | | if (!getCellValue(cellArray, 39).isEmpty()) { |
| | | oqgPo = buildOwnerQualityGuaranteePo(cellArray, Long.valueOf(mainPo.getId())); |
| | | } |
| | | List<MpPaymentRecordPo> paymentRecordPos = buildMpPaymentRecordPos(cellArray, mainPo.getFlowNumber(), String.valueOf(mainPo.getId())); |
| | | List<MpFifthPaymentRecord> fifthPos = buildMpFifthPaymentRecordPos(cellArray, mainPo.getFlowNumber(), String.valueOf(mainPo.getId())); |
| | | if (!getCellValue(cellArray, 137).isEmpty()) { |
| | | ownerRemarkInfoPo = buildOwnerRemarkInfoPo(cellArray, mainPo.getFlowNumber(), String.valueOf(mainPo.getId())); |
| | | } |
| | | // if (!getCellValue(cellArray, 22).isEmpty() && !getCellValue(cellArray, 23).isEmpty()) { |
| | | announcementTimeRangePo = buildAnnouncementTimeRangePo(cellArray, mainPo.getId());//公共收益金 |
| | | // } |
| | | // if (!getCellValue(cellArray, 26).isEmpty() && !getCellValue(cellArray, 27).isEmpty()) { |
| | | ocoPo = buildOwnersCommitteeConventionPo(cellArray, mainPo.getId()); |
| | | // } |
| | | // if (!getCellValue(cellArray, 29).isEmpty()) { |
| | | owiPo = buildOwnerWithdrawalInfoPo(cellArray, mainPo.getId()); |
| | | // } |
| | | // if (!getCellValue(cellArray, 39).isEmpty()) { |
| | | oqgPo = buildOwnerQualityGuaranteePo(cellArray, mainPo.getId()); |
| | | // } |
| | | List<MpPaymentRecordPo> paymentRecordPos = buildMpPaymentRecordPos(cellArray, mainPo.getFlowNumber(), mainPo.getId()); |
| | | List<MpFifthPaymentRecord> fifthPos = buildMpFifthPaymentRecordPos(cellArray, mainPo.getFlowNumber(), mainPo.getId()); |
| | | // if (!getCellValue(cellArray, 137).isEmpty()) { |
| | | ownerRemarkInfoPo = buildOwnerRemarkInfoPo(cellArray, mainPo.getFlowNumber(), mainPo.getId()); |
| | | // } |
| | | |
| | | importData(mainPo, announcementTimeRangePo, ocoPo, owiPo, oqgPo, paymentRecordPos, fifthPos, ownerRemarkInfoPo); |
| | | |
| | | // 5. 更新导入日志状态(成功)- 调用父类方法 |
| | | super.updateImportLogDetailState(logDetailDto.getDetailId()); |
| | | |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new IllegalArgumentException(e.getMessage()); |
| | | } |
| | |
| | | return po; |
| | | } |
| | | |
| | | private OwnerQualityGuaranteePo buildOwnerQualityGuaranteePo(JSONArray cellArray, Long aLong) { |
| | | private OwnerQualityGuaranteePo buildOwnerQualityGuaranteePo(JSONArray cellArray, String aLong) { |
| | | OwnerQualityGuaranteePo po = new OwnerQualityGuaranteePo(); |
| | | long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 避免负数 |
| | | po.setId(longId); // 主键ID |
| | | po.setMpId(aLong.toString()); |
| | | try { |
| | | po.setQualityGuaranteePeriod2Start(parseDateToString(getCellValue(cellArray, 37))); |
| | | po.setQualityGuaranteePeriod2End(parseDateToString(getCellValue(cellArray, 38))); |
| | | po.setAcceptanceDate(parseDateToString(getCellValue(cellArray, 41))); |
| | | po.setAvailableWithdrawalDate(parseDate(getCellValue(cellArray, 43))); |
| | | } catch (ParseException e) { |
| | | throw new RuntimeException("日期转换错误"); |
| | | } |
| | | po.setMpId(aLong); |
| | | po.setQualityGuaranteePeriod2Start(Vtil.defaultValueToDate(getCellValue(cellArray, 37))); |
| | | po.setQualityGuaranteePeriod2End(Vtil.defaultValueToDate(getCellValue(cellArray, 38))); |
| | | po.setAcceptanceDate(Vtil.defaultValueToDate(getCellValue(cellArray, 41))); |
| | | po.setAvailableWithdrawalDate(Vtil.defaultValueToDate(getCellValue(cellArray, 43))); |
| | | po.setQualityGuaranteeRatio(getCellNum(cellArray, 39)); |
| | | po.setQualityGuaranteeAmount(getCellNum(cellArray, 12) * po.getQualityGuaranteeRatio()); |
| | | po.setAuditStatus(getCellValue(cellArray, 42)); |
| | | return po; |
| | | } |
| | | |
| | | private OwnerWithdrawalInfoPo buildOwnerWithdrawalInfoPo(JSONArray cellArray, Long aLong) { |
| | | private OwnerWithdrawalInfoPo buildOwnerWithdrawalInfoPo(JSONArray cellArray, String aLong) { |
| | | OwnerWithdrawalInfoPo po = new OwnerWithdrawalInfoPo(); |
| | | long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 避免负数 |
| | | po.setId(longId); // 主键ID |
| | | po.setMpId(aLong.toString()); |
| | | po.setMpId(aLong); |
| | | po.setWithdrawalEncounteredProblem(getCellValue(cellArray, 28)); |
| | | po.setShortageOrArrears(getCellNum(cellArray, 29)); |
| | | po.setRoadName(getCellValue(cellArray, 30)); |
| | |
| | | return po; |
| | | } |
| | | |
| | | private OwnersCommitteeConventionPo buildOwnersCommitteeConventionPo(JSONArray cellArray, Long mpId) { |
| | | private OwnersCommitteeConventionPo buildOwnersCommitteeConventionPo(JSONArray cellArray, String mpId) { |
| | | OwnersCommitteeConventionPo po = new OwnersCommitteeConventionPo(); |
| | | |
| | | long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 避免负数 |
| | |
| | | return po; |
| | | } |
| | | |
| | | private AnnouncementTimeRangePo buildAnnouncementTimeRangePo(JSONArray cellArray, Long mpId) { |
| | | private AnnouncementTimeRangePo buildAnnouncementTimeRangePo(JSONArray cellArray, String mpId) { |
| | | AnnouncementTimeRangePo po = new AnnouncementTimeRangePo(); |
| | | long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 避免负数 |
| | | po.setId(longId); // 主键ID |
| | |
| | | po.setReportDepartment(getCellValue(cellArray, 15)); // 第16列:签报部门 |
| | | po.setFundTypeLevel1(getCellValue(cellArray, 16)); // 第17列:基金类型-一级分类 |
| | | po.setFundTypeLevel2(getCellValue(cellArray, 17)); // 第18列:基金类型-二级分类 |
| | | po.setMaintenanceType(getCellValue(cellArray, 18)); // 第19列:幢/全体 |
| | | po.setBuildingOrAll(getCellValue(cellArray, 19)); // 第20列:维修类型 |
| | | po.setMaintenanceType(getCellValue(cellArray, 19)); // 第19列:幢/全体 |
| | | po.setBuildingOrAll(getCellValue(cellArray, 18)); // 第20列:维修类型 |
| | | po.setPayeeName(getCellValue(cellArray, 145)); // 支付公司名称/个人名字 |
| | | po.setIdCardNumber(getCellValue(cellArray, 146)); // 个人身份证号码 |
| | | po.setBankName(getCellValue(cellArray, 147)); // 开户银行 |
| | |
| | | po.setBuildingOrAll(getCellValue(cellArray, 18)); // 第19列:幢/全体 |
| | | po.setMaintenanceType(getCellValue(cellArray, 19)); // 第20列:维修类型 |
| | | po.setQualityGuaranteePeriod1(getCellValue(cellArray, 20)); // 第21列:质保期(第一个) |
| | | po.setPublicIncomeAnnouncement(getCellValue(cellArray, 21)); // 第22列:公共收益金公布情况 |
| | | // po.setPublicIncomeAnnouncement(getCellValue(cellArray, 21)); // 第22列:公共收益金公布情况 |
| | | // 公共收益金公布子字段(第23-26列) |
| | | po.setPlannedAnnouncementStart(getCellValue(cellArray, 21)); // 拟公布-起始(年月) |
| | | po.setPlannedAnnouncementEnd(getCellValue(cellArray, 22)); // 拟公布-止(年月) |
| | |
| | | po.setDoorRoomNumber(getCellValue(cellArray, 34)); // 门室号 |
| | | po.setOwnerAddress(getCellValue(cellArray, 35)); // 业主地址 |
| | | // po.setWithdrawalProblem(getCellValue(cellArray, 36)); // 第38列:支取存在问题 |
| | | po.setProblemDifficulty(getCellValue(cellArray, 36)); // 第39列:问题难度 |
| | | po.setAvailableWithdrawalDate(parseDate(getCellValue(cellArray, 37))); // 第40列:可启动支取日期(年月日) |
| | | po.setQualityGuaranteePeriod2(getCellValue(cellArray, 39) + "~" + getCellValue(cellArray, 40)); // 第41列:质保期(第二个) |
| | | po.setQualityGuaranteeRatio(parseBigDecimal(getCellValue(cellArray, 40))); // 第42列:质保金占比 |
| | | po.setQualityGuaranteeAmount(parseBigDecimal(getCellValue(cellArray, 41))); // 第43列:质保金金额(元) |
| | | po.setReceivedQualityGuarantee(parseBigDecimal(getCellValue(cellArray, 42))); // 第44列:已到账质保金 |
| | | po.setProblemDifficulty(getCellValue(cellArray, 36)); // 第36列:问题难度 |
| | | po.setAvailableWithdrawalDate(parseDate(getCellValue(cellArray, 43))); // 第40列:可启动支取日期(年月日) |
| | | po.setQualityGuaranteePeriod2(getCellValue(cellArray, 37) + "~" + getCellValue(cellArray, 38)); // 第41列:质保期(第二个) |
| | | po.setQualityGuaranteeRatio(parseBigDecimal(getCellValue(cellArray, 39))); // 第42列:质保金占比 |
| | | po.setQualityGuaranteeAmount(parseBigDecimal(getCellValue(cellArray, 40))); // 第43列:质保金金额(元) |
| | | po.setReceivedQualityGuarantee(parseBigDecimal(getCellValue(cellArray, 44))); // 第44列:已到账质保金 |
| | | // po.setStartDate(parseDate(getCellValue(cellArray, 44))); // 第45列:起始(年月日) |
| | | // po.setEndDate(parseDate(getCellValue(cellArray, 45))); // 第46列:终止(年月日) |
| | | |
| | | // -------------------------- 17个自动计算字段(核心业务逻辑)-------------------------- |
| | | // 1. 打印合计 = 第一次~第五次打印金额之和(第47列打印金额+第54列+第61列+第68列+第75列) |
| | | BigDecimal print1 = parseBigDecimal(getCellValue(cellArray, 45)); // 第一次打印金额(第50列) |
| | | BigDecimal print2 = parseBigDecimal(getCellValue(cellArray, 57)); // 第二次打印金额(第57列) |
| | | BigDecimal print3 = parseBigDecimal(getCellValue(cellArray, 69)); // 第三次打印金额(第64列) |
| | | BigDecimal print4 = parseBigDecimal(getCellValue(cellArray, 81)); // 第四次打印金额(第71列) |
| | | BigDecimal print5 = parseBigDecimal(getCellValue(cellArray, 93)); // 第五次打印金额(第78列) |
| | | // BigDecimal printTotal = add(print1, print2, print3, print4, print5); |
| | | // po.setPrintTotal(printTotal); // 自定义字段:打印合计 |
| | | |
| | | // 2. 到账合计 = 第一次~第五次到账金额之和(第51列+第58列+第65列+第72列+第79列) |
| | | BigDecimal arrival1 = parseBigDecimal(getCellValue(cellArray, 48)); // 第一次到账金额(第52列) |
| | | BigDecimal arrival2 = parseBigDecimal(getCellValue(cellArray, 60)); // 第二次到账金额(第59列) |
| | | BigDecimal arrival3 = parseBigDecimal(getCellValue(cellArray, 72)); // 第三次到账金额(第66列) |
| | | BigDecimal arrival4 = parseBigDecimal(getCellValue(cellArray, 84)); // 第四次到账金额(第73列) |
| | | BigDecimal arrival5 = parseBigDecimal(getCellValue(cellArray, 96)); // 第五次到账金额(第80列) |
| | | // BigDecimal arrivalTotal = add(arrival1, arrival2, arrival3, arrival4, arrival5); |
| | | // po.setArrivalTotal(arrivalTotal); // 自定义字段:到账合计 |
| | | |
| | | // 3. 维修基金到账率 = IF(到账合计<>0, 到账合计/业委会金额, 0) |
| | | BigDecimal ownersAmount = po.getOwnersCommitteeAmount(); |
| | | // BigDecimal fundArrivalRate = (arrivalTotal.compareTo(BigDecimal.ZERO) != 0 && ownersAmount.compareTo(BigDecimal.ZERO) != 0) |
| | | // ? arrivalTotal.divide(ownersAmount, 4, BigDecimal.ROUND_HALF_UP) // 保留4位小数 |
| | | // : BigDecimal.ZERO; |
| | | // po.setFundArrivalRate(fundArrivalRate); // 自定义字段:维修基金到账率 |
| | | |
| | | // 4. 尚缺金额 = IF(基金类型<>"维修基金", 0, 业委会金额-到账合计) |
| | | String fundType = po.getFundTypeLevel1(); |
| | | // BigDecimal shortageAmount = ("维修基金".equals(fundType)) |
| | | // ? subtract(ownersAmount, arrivalTotal) |
| | | // : BigDecimal.ZERO; |
| | | // po.setFundShortageAmount(shortageAmount); // 自定义字段:尚缺金额 |
| | | |
| | | // 5. 管理费 = 管理处金额 * 管理费占比(百分比转小数) |
| | | BigDecimal managementFeeRatio = po.getManagementFeeRatio() == null ? BigDecimal.ZERO : po.getManagementFeeRatio().divide(new BigDecimal(100)); |
| | | BigDecimal managementFee = multiply(po.getManagementOfficeAmount(), managementFeeRatio); |
| | | // po.setManagementFee(managementFee); // 自定义字段:管理费 |
| | | |
| | | // 6. 应付金额A = IF(审计金额为空, 业委会金额-管理费, 审计金额-管理费) |
| | | BigDecimal auditAmount = po.getAuditAmount() == null ? BigDecimal.ZERO : po.getAuditAmount(); |
| | | BigDecimal payableA = (auditAmount.compareTo(BigDecimal.ZERO) == 0) |
| | | ? subtract(ownersAmount, managementFee) |
| | | : subtract(auditAmount, managementFee); |
| | | // po.setPayableAmountA(payableA); // 自定义字段:应付金额A |
| | | |
| | | // 7. 应付金额B = 业委会金额-管理费-质保金金额 |
| | | BigDecimal qualityGuaranteeAmount = po.getQualityGuaranteeAmount() == null ? BigDecimal.ZERO : po.getQualityGuaranteeAmount(); |
| | | BigDecimal payableB = subtract(ownersAmount, managementFee, qualityGuaranteeAmount); |
| | | // po.setPayableAmountB(payableB); // 自定义字段:应付金额B |
| | | |
| | | // 8. 应付金额C = 实收金额-实收金额×管理费比例(实收金额取到账合计) |
| | | // BigDecimal payableC = multiply(arrivalTotal, BigDecimal.ONE.subtract(managementFeeRatio)); |
| | | // po.setPayableAmountC(payableC); // 自定义字段:应付金额C |
| | | |
| | | // 9. 拟付合计 = 第一次~第五次拟付金额之和(第82列+第88列+第94列+第100列+第106列) |
| | | BigDecimal plannedPay1 = parseBigDecimal(getCellValue(cellArray, 113)); // 第一次拟付金额(第83列) |
| | | BigDecimal plannedPay2 = parseBigDecimal(getCellValue(cellArray, 119)); // 第二次拟付金额(第89列) |
| | | BigDecimal plannedPay3 = parseBigDecimal(getCellValue(cellArray, 125)); // 第三次拟付金额(第95列) |
| | | BigDecimal plannedPay4 = parseBigDecimal(getCellValue(cellArray, 131)); // 第四次拟付金额(第101列) |
| | | BigDecimal plannedPay5 = parseBigDecimal(getCellValue(cellArray, 137)); // 第五次拟付金额(第107列) |
| | | BigDecimal plannedPayTotal = add(plannedPay1, plannedPay2, plannedPay3, plannedPay4, plannedPay5); |
| | | // po.setPlannedPayTotal(plannedPayTotal); // 自定义字段:拟付合计 |
| | | |
| | | // 10. 实付合计 = 第一次~第五次实付金额之和(第85列+第91列+第97列+第103列+第109列) |
| | | BigDecimal actualPay1 = parseBigDecimal(getCellValue(cellArray, 117)); // 第一次实付金额(第86列) |
| | | BigDecimal actualPay2 = parseBigDecimal(getCellValue(cellArray, 123)); // 第二次实付金额(第92列) |
| | | BigDecimal actualPay3 = parseBigDecimal(getCellValue(cellArray, 130)); // 第三次实付金额(第98列) |
| | | BigDecimal actualPay4 = parseBigDecimal(getCellValue(cellArray, 135)); // 第四次实付金额(第104列) |
| | | BigDecimal actualPay5 = parseBigDecimal(getCellValue(cellArray, 141)); // 第五次实付金额(第110列) |
| | | BigDecimal actualPayTotal = add(actualPay1, actualPay2, actualPay3, actualPay4, actualPay5); |
| | | // po.setActualPayTotal(actualPayTotal); // 自定义字段:实付合计 |
| | | |
| | | // 11. 未付合计 = 审定金额-实付合计(审定金额取审计金额,无则取业委会金额) |
| | | BigDecimal approvedAmount = (auditAmount.compareTo(BigDecimal.ZERO) == 0) ? ownersAmount : auditAmount; |
| | | BigDecimal unpaidTotal = subtract(approvedAmount, actualPayTotal); |
| | | // po.setUnpaidTotal(unpaidTotal); // 自定义字段:未付合计 |
| | | |
| | | // 12. 垫付金额 = 复杂条件判断(基金类型、到账合计、公布情况) |
| | | // BigDecimal advanceAmount = calculateAdvanceAmount(fundType, arrivalTotal, actualPayTotal, po.getPublicIncomeAnnouncement()); |
| | | // po.setAdvanceAmount(advanceAmount); // 自定义字段:垫付金额 |
| | | |
| | | // 13. 未付合计(到账口径) = 按公布情况分支计算 |
| | | // BigDecimal unpaidByArrival = calculateUnpaidByArrival(po.getPublicIncomeAnnouncement(), ownersAmount, managementFee, actualPayTotal, arrivalTotal); |
| | | // po.setUnpaidByArrival(unpaidByArrival); // 自定义字段:未付合计(到账口径) |
| | | |
| | | // 14-16. 待付金额A/B/C |
| | | // po.setPendingPayA(subtract(auditAmount, managementFee)); // 待付金额A = 审价金额 - 管理费 |
| | | // po.setPendingPayB(subtract(auditAmount, qualityGuaranteeAmount, managementFee)); // 待付金额B = 审价金额 - 质保金 - 管理费 |
| | | // po.setPendingPayC(multiply(arrivalTotal, BigDecimal.ONE.subtract(managementFeeRatio))); // 待付金额C = 到账合计*(1-管理费占比) |
| | | |
| | | // 支付信息(第111-116列) |
| | | po.setPayeeName(getCellValue(cellArray, 143)); // 支付公司名称/个人名字 |
| | |
| | | private void buildSinglePaymentRecord(String mpId, JSONArray cellArray, String flowNumber, int printTimes, |
| | | int index, List<MpPaymentRecordPo> pos) throws ParseException { |
| | | |
| | | if (getCellValue(cellArray, index).isEmpty()) { |
| | | return; |
| | | } |
| | | // if (getCellValue(cellArray, index).isEmpty()) { |
| | | // return; |
| | | // } |
| | | |
| | | MpPaymentRecordPo po = new MpPaymentRecordPo(); |
| | | |
| | |
| | | |
| | | private void buildMpFifthPaymentRecordPo(List<MpFifthPaymentRecord> pos, JSONArray cellArray, String flowNumber, String mainPo, int index) { |
| | | |
| | | if (getCellValue(cellArray, index).isEmpty()) { |
| | | return; |
| | | } |
| | | // if (getCellValue(cellArray, index).isEmpty()) { |
| | | // return; |
| | | // } |
| | | |
| | | MpFifthPaymentRecord po = new MpFifthPaymentRecord(); |
| | | |
| | | long longId = UUID.randomUUID().getMostSignificantBits() & Long.MAX_VALUE; // 避免负数 |
| | | po.setId(longId+""); |
| | | po.setMpId(flowNumber); |
| | | po.setFifthPlannedPaymentAmount(new BigDecimal(getCellValue(cellArray, index)).toString()); |
| | | po.setFifthPlannedPaymentAmount(Vtil.defaultValue(getCellValue(cellArray, index))); |
| | | try { |
| | | po.setPlannedPaymentDate(parseDate(getCellValue(cellArray, index + 1))); |
| | | po.setActualPaymentDate(parseDate(getCellValue(cellArray, index + 5))); |
| | |
| | | } |
| | | po.setCategory(getCellValue(cellArray, index + 2)); |
| | | po.setReimburser(getCellValue(cellArray, index + 3)); |
| | | po.setActualPaymentAmount(new BigDecimal(getCellValue(cellArray, index + 4)).toString()); |
| | | po.setActualPaymentAmount(getCellValue(cellArray, index + 4)); |
| | | } |
| | | |
| | | /** |
| | |
| | | doImportData(assetImportLogDetailDto); |
| | | |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId()); |
| | | try { |
| | | Thread.sleep(200); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | if (e.getMessage().contains("### Error updating database")){ |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), "未知错误,请联系管理员"); |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), "未知错误,请联系管理员" + e.getMessage()); |
| | | } |
| | | else { |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), e); |
| | |
| | | |
| | | int a = 6; |
| | | JSONArray objects = JSONObject.parseArray(assetImportLogDetailDto.getContent()); |
| | | |
| | | if (Vtil.defaultValue(objects.get(16)).equals("")){ |
| | | throw new IllegalArgumentException("房屋面积不能为空"); |
| | | } |
| | | |
| | | if (Vtil.defaultValue(objects.get(54)).length() > 1){ |
| | | throw new IllegalArgumentException("性别内容有误!"); |
| | | } |
| | | |
| | | |
| | | ImportOwnerRoomDto importOwnerRoomDto = new ImportOwnerRoomDto();//房屋 |
| | | importOwnerRoomDto.setRoomId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_roomId)); |
| | |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityCode(Vtil.defaultValue(objects.get(3))); |
| | | communityDto.setName(Vtil.defaultValue(objects.get(4))); |
| | | if (communityDto.getCommunityCode().equals("") && communityDto.getName().equals("")) { |
| | | throw new IllegalArgumentException("导入失败:小区编码和小区名称都为空"); |
| | | } |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | if (communityDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("导入失败:小区中不存在小区编码为‘" + Vtil.defaultValue(objects.get(1)) + "’的小区"); |
| | | 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) // 提取每个小区的名称 |
| | |
| | | roomDto.setFloorNum(importOwnerRoomDto.getFloorNum()); |
| | | roomDto.setUnitNum(importOwnerRoomDto.getUnitNum()); |
| | | roomDto.setRoomNum(importOwnerRoomDto.getRoomNum()); |
| | | if (roomDto.getRoomNum() ==null || roomDto.getRoomNum().equals("")){ |
| | | roomDto.setPropertyType("商铺"); |
| | | } |
| | | 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("重复的房屋"); |
| | | throw new IllegalArgumentException("重复的房屋:"); |
| | | } |
| | | List<FeeConfigDto> feeDtos = null; |
| | | if (!importOwnerRoomDto.getCommunityId().isEmpty()){ |
| | |
| | | try { |
| | | applyRoomDiscountServiceDaoImpl.saveApplyRoomDiscountInfo(BeanConvertUtil.beanCovertMap(applyRoomDiscountPo)); |
| | | }catch (Exception e){ |
| | | throw new IllegalArgumentException("导入失败:打折信息导入存在错误"); |
| | | throw new IllegalArgumentException("导入失败:打折信息导入存在错误" + e.getMessage()); |
| | | } |
| | | } |
| | | //-----业主信息 |
| | |
| | | |
| | | |
| | | |
| | | if (Vtil.defaultValue(objects.get(61),null) != null) { |
| | | if (Vtil.defaultValue(objects.get(61),null) != null || Vtil.defaultValue(objects.get(141)).isEmpty() || Vtil.defaultValue(objects.get(147+a)).isEmpty() || Vtil.defaultValue(objects.get(149+a)).isEmpty()) { |
| | | OweFeeCallablePo oweFeeCallablePo = new OweFeeCallablePo(); |
| | | oweFeeCallablePo.setOfcId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId)); |
| | | oweFeeCallablePo.setAmountdOwed("0"); |
| | |
| | | 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), "").equals("")) { |
| | | oweFeeCallablePo.setRemark(oweFeeCallablePo.getRemark() + "。备注信息:" + Vtil.defaultValue(objects.get(160+a))); |
| | | } |
| | | // oweFeeCallablePo.setStartTime(Vtil.defaultValueToDate(objects.get(61)));//TODO 时间段需要拆分 |
| | | // oweFeeCallablePo.setEndTime(Vtil.defaultValueToDate(objects.get(61))); |
| | | oweFeeCallablePo.setCreateTime(Vtil.defaultValueToDate(objects.get(53+a))); |
| | |
| | | |
| | | for (int i = 0; i < 5 ; i++) { |
| | | int index = i*4 + 65; |
| | | if(objects.get(index) == null){ |
| | | if(objects.get(index) == null || objects.get(index).equals("")) { |
| | | break; |
| | | } |
| | | HouseMailRecord houseMailRecord = new HouseMailRecord(); |
| | |
| | | houseMailRecord.setOwnerId(importOwnerRoomDto.getOwnerId()); |
| | | houseMailRecord.setHouseId(importOwnerRoomDto.getRoomId()); |
| | | houseMailRecord.setCallableId(oweFeeCallablePo.getOfcId()); |
| | | houseMailRecord.setCreateTime(Vtil.defaultValueToDate(objects.get(index))); |
| | | 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))); |
| | |
| | | //----- |
| | | |
| | | //法院执行程序 |
| | | if (!Vtil.defaultValue(objects.get(147+a)).isEmpty()) { |
| | | 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()); |
| | |
| | | //todo 车辆数 |
| | | |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | | ownerCarDto.setLeaseTypes(new String[]{OwnerCarDto.LEASE_TYPE_INNER, |
| | | OwnerCarDto.LEASE_TYPE_STORE, |
| | | OwnerCarDto.LEASE_TYPE_NO_MONEY, |
| | | OwnerCarDto.LEASE_TYPE_RESERVE |
| | | }); |
| | | // ownerCarDto.setLeaseTypes(new String[]{OwnerCarDto.LEASE_TYPE_INNER, |
| | | // OwnerCarDto.LEASE_TYPE_STORE, |
| | | // OwnerCarDto.LEASE_TYPE_NO_MONEY, |
| | | // OwnerCarDto.LEASE_TYPE_RESERVE |
| | | // }); |
| | | int carCount = ownerCarV1InnerServiceSMOImpl.queryOwnerCarsCount(ownerCarDto); |
| | | setDatas(datas, "车辆数", carCount); |
| | | |
| | |
| | | if (total > 0) { |
| | | ownerCarDtoList = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | //小区20条时刷房屋和车位信息 |
| | | if (row < 20) { |
| | | if (row < 21) { |
| | | freshPs(ownerCarDtoList); |
| | | freshRoomInfo(ownerCarDtoList); |
| | | //刷入同步物联网状态 |
| | |
| | | spring: |
| | | profiles: |
| | | active: devlocal |
| | | active: debug |
| | | |
| | | import: |
| | | line: |
| | | max: 40000 |
| | | max: 50000 |
| | | |
| | | |
| | | # docker build -t lx . |