Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
| | |
| | | private String stateName; |
| | | private String communityId; |
| | | private String discountId; |
| | | |
| | | //是否可用 |
| | | private String inUse; |
| | | private String discountName; |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getApplyType() { |
| | | return applyType; |
| | |
| | | public void setArdId(String ardId) { |
| | | this.ardId = ardId; |
| | | } |
| | | |
| | | |
| | | public String getCheckUserId() { |
| | | return checkUserId; |
| | |
| | | this.discountId = discountId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | |
| | | public void setApplyTypeName(String applyTypeName) { |
| | | this.applyTypeName = applyTypeName; |
| | | } |
| | | |
| | | public String getInUse() { |
| | | return inUse; |
| | | } |
| | | |
| | | public void setInUse(String inUse) { |
| | | this.inUse = inUse; |
| | | } |
| | | |
| | | public String getDiscountName() { |
| | | return discountName; |
| | | } |
| | | |
| | | public void setDiscountName(String discountName) { |
| | | this.discountName = discountName; |
| | | } |
| | | } |
| | |
| | | |
| | | private Date preReadingTime; |
| | | private Date curReadingTime; |
| | | private String ardId; |
| | | |
| | | |
| | | public String getPrimeRate() { |
| | |
| | | public void setCurReadingTime(Date curReadingTime) { |
| | | this.curReadingTime = curReadingTime; |
| | | } |
| | | |
| | | public String getArdId() { |
| | | return ardId; |
| | | } |
| | | |
| | | public void setArdId(String ardId) { |
| | | this.ardId = ardId; |
| | | } |
| | | } |
| | |
| | | public static final String PAYER_OBJ_TYPE_CAR = "6666";//是车位 |
| | | public static final String PAYER_OBJ_TYPE_RENTING = "9999";//房源ID |
| | | |
| | | public static final String FEE_FLAG_ONCE = "2006012"; |
| | | public static final String FEE_FLAG_CYCLE = "1003006"; |
| | | public static final String FEE_FLAG_ONCE = "2006012";//一次性费用 |
| | | public static final String FEE_FLAG_CYCLE = "1003006";//周期性费用 |
| | | public static final String REDIS_PAY_OWE_FEE = "PAY_OWE_FEE_"; |
| | | |
| | | private String amount; |
| | |
| | | package com.java110.dto.feeCollectionDetail; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | |
| | | public class FeeCollectionDetailDto extends PageDto implements Serializable { |
| | | |
| | | private String orderId; |
| | | private String detailId; |
| | | private String ownerId; |
| | | private String collectionName; |
| | | private String payerObjName; |
| | | private String ownerName; |
| | | private String feeName; |
| | | private String oweAmount; |
| | | private String state; |
| | | private String communityId; |
| | | private String payerObjType; |
| | | private String collectionWay; |
| | | private String remarks; |
| | | private String payerObjId; |
| | | private String detailId; |
| | | private String ownerId; |
| | | private String collectionName; |
| | | private String payerObjName; |
| | | private String ownerName; |
| | | private String feeName; |
| | | private String oweAmount; |
| | | private String state; |
| | | private String communityId; |
| | | private String payerObjType; |
| | | private String collectionWay; |
| | | private String remarks; |
| | | private String payerObjId; |
| | | |
| | | |
| | | private Date createTime; |
| | |
| | | public String getOrderId() { |
| | | return orderId; |
| | | } |
| | | public void setOrderId(String orderId) { |
| | | |
| | | public void setOrderId(String orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | public String getDetailId() { |
| | | |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | | public void setDetailId(String detailId) { |
| | | |
| | | public void setDetailId(String detailId) { |
| | | this.detailId = detailId; |
| | | } |
| | | public String getOwnerId() { |
| | | |
| | | public String getOwnerId() { |
| | | return ownerId; |
| | | } |
| | | public void setOwnerId(String ownerId) { |
| | | |
| | | public void setOwnerId(String ownerId) { |
| | | this.ownerId = ownerId; |
| | | } |
| | | public String getCollectionName() { |
| | | |
| | | public String getCollectionName() { |
| | | return collectionName; |
| | | } |
| | | public void setCollectionName(String collectionName) { |
| | | |
| | | public void setCollectionName(String collectionName) { |
| | | this.collectionName = collectionName; |
| | | } |
| | | public String getPayerObjName() { |
| | | |
| | | public String getPayerObjName() { |
| | | return payerObjName; |
| | | } |
| | | public void setPayerObjName(String payerObjName) { |
| | | |
| | | public void setPayerObjName(String payerObjName) { |
| | | this.payerObjName = payerObjName; |
| | | } |
| | | public String getOwnerName() { |
| | | |
| | | public String getOwnerName() { |
| | | return ownerName; |
| | | } |
| | | public void setOwnerName(String ownerName) { |
| | | |
| | | public void setOwnerName(String ownerName) { |
| | | this.ownerName = ownerName; |
| | | } |
| | | public String getFeeName() { |
| | | |
| | | public String getFeeName() { |
| | | return feeName; |
| | | } |
| | | public void setFeeName(String feeName) { |
| | | |
| | | public void setFeeName(String feeName) { |
| | | this.feeName = feeName; |
| | | } |
| | | public String getOweAmount() { |
| | | |
| | | public String getOweAmount() { |
| | | return oweAmount; |
| | | } |
| | | public void setOweAmount(String oweAmount) { |
| | | |
| | | public void setOweAmount(String oweAmount) { |
| | | this.oweAmount = oweAmount; |
| | | } |
| | | public String getState() { |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | public void setState(String state) { |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | public String getCommunityId() { |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | public void setCommunityId(String communityId) { |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | public String getPayerObjType() { |
| | | |
| | | public String getPayerObjType() { |
| | | return payerObjType; |
| | | } |
| | | public void setPayerObjType(String payerObjType) { |
| | | |
| | | public void setPayerObjType(String payerObjType) { |
| | | this.payerObjType = payerObjType; |
| | | } |
| | | public String getCollectionWay() { |
| | | |
| | | public String getCollectionWay() { |
| | | return collectionWay; |
| | | } |
| | | public void setCollectionWay(String collectionWay) { |
| | | |
| | | public void setCollectionWay(String collectionWay) { |
| | | this.collectionWay = collectionWay; |
| | | } |
| | | public String getRemarks() { |
| | | |
| | | public String getRemarks() { |
| | | return remarks; |
| | | } |
| | | public void setRemarks(String remarks) { |
| | | |
| | | public void setRemarks(String remarks) { |
| | | this.remarks = remarks; |
| | | } |
| | | public String getPayerObjId() { |
| | | |
| | | public String getPayerObjId() { |
| | | return payerObjId; |
| | | } |
| | | public void setPayerObjId(String payerObjId) { |
| | | |
| | | public void setPayerObjId(String payerObjId) { |
| | | this.payerObjId = payerObjId; |
| | | } |
| | | |
| | |
| | | |
| | | //催缴方式,001 仅短信方式 002 短信微信方式 003 仅微信方式 |
| | | public static final String COLLECTION_WAY_SMS = "001"; |
| | | public static final String COLLECTION_WAY_WECHAT = "002"; |
| | | public static final String COLLECTION_WAY_WECHAT_SMS = "003"; |
| | | public static final String COLLECTION_WAY_WECHAT_SMS = "002"; |
| | | public static final String COLLECTION_WAY_WECHAT = "003"; |
| | | |
| | | private String orderId; |
| | | private String staffName; |
| | |
| | | private List<FeeDiscountSpecDto> feeDiscountSpecs; |
| | | |
| | | private double discountPrice; |
| | | private String ardId; |
| | | |
| | | |
| | | public String getDiscountId() { |
| | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public String getArdId() { |
| | | return ardId; |
| | | } |
| | | |
| | | public void setArdId(String ardId) { |
| | | this.ardId = ardId; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto.report; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName ReportDeposit |
| | | * @Description TODO |
| | | * @Author fqz |
| | | * @Date 2021/07/295 16:21 |
| | | **/ |
| | | public class ReportDeposit extends PageDto implements Serializable { |
| | | |
| | | private String amount; |
| | | |
| | | private String incomeObjId; |
| | | |
| | | private String feeTypeCd; |
| | | |
| | | private String startTime; |
| | | |
| | | private String endTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | private String communityId; |
| | | |
| | | private String bId; |
| | | |
| | | private String feeId; |
| | | |
| | | private String userId; |
| | | |
| | | private String payerObjId; |
| | | |
| | | private String squarePrice; |
| | | |
| | | private String additionalAmount; |
| | | |
| | | private String feeFlag; |
| | | |
| | | private String state; |
| | | |
| | | private String configId; |
| | | |
| | | private String feeName; |
| | | |
| | | private String feeTypeCdName; |
| | | |
| | | private String stateName; |
| | | |
| | | private String feeFlagName; |
| | | |
| | | private String computingFormula; |
| | | |
| | | private String computingFormulaText; |
| | | |
| | | private String billType; |
| | | |
| | | private String payerObjType; |
| | | |
| | | private String isDefault; |
| | | |
| | | private String configStartTime; |
| | | |
| | | private String configEndTime; |
| | | |
| | | private String paymentCd; |
| | | |
| | | private String paymentCycle; |
| | | |
| | | private String billTypeName; |
| | | |
| | | private String createTime; |
| | | |
| | | private String payerObjTypeName; |
| | | |
| | | private List<FeeConfigDto> feeConfigDtos; |
| | | |
| | | private String feeStartTime; |
| | | |
| | | private String feeEndTime; |
| | | |
| | | private String detailState; |
| | | |
| | | private String detailStateName; |
| | | |
| | | private String deadlineTime; |
| | | private String objName; |
| | | private String ownerName; |
| | | private String floorNum; |
| | | private String unitNum; |
| | | private String roomNum; |
| | | private String carNum; |
| | | private String floorId; |
| | | private String unitId; |
| | | |
| | | private String allAmount; |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getIncomeObjId() { |
| | | return incomeObjId; |
| | | } |
| | | |
| | | public void setIncomeObjId(String incomeObjId) { |
| | | this.incomeObjId = incomeObjId; |
| | | } |
| | | |
| | | public String getFeeTypeCd() { |
| | | return feeTypeCd; |
| | | } |
| | | |
| | | public void setFeeTypeCd(String feeTypeCd) { |
| | | this.feeTypeCd = feeTypeCd; |
| | | } |
| | | |
| | | public String getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(String startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public String getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(String endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getbId() { |
| | | return bId; |
| | | } |
| | | |
| | | public void setbId(String bId) { |
| | | this.bId = bId; |
| | | } |
| | | |
| | | public String getFeeId() { |
| | | return feeId; |
| | | } |
| | | |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | |
| | | public String getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(String userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getPayerObjId() { |
| | | return payerObjId; |
| | | } |
| | | |
| | | public void setPayerObjId(String payerObjId) { |
| | | this.payerObjId = payerObjId; |
| | | } |
| | | |
| | | public String getSquarePrice() { |
| | | return squarePrice; |
| | | } |
| | | |
| | | public void setSquarePrice(String squarePrice) { |
| | | this.squarePrice = squarePrice; |
| | | } |
| | | |
| | | public String getAdditionalAmount() { |
| | | return additionalAmount; |
| | | } |
| | | |
| | | public void setAdditionalAmount(String additionalAmount) { |
| | | this.additionalAmount = additionalAmount; |
| | | } |
| | | |
| | | public String getFeeFlag() { |
| | | return feeFlag; |
| | | } |
| | | |
| | | public void setFeeFlag(String feeFlag) { |
| | | this.feeFlag = feeFlag; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getConfigId() { |
| | | return configId; |
| | | } |
| | | |
| | | public void setConfigId(String configId) { |
| | | this.configId = configId; |
| | | } |
| | | |
| | | public String getFeeName() { |
| | | return feeName; |
| | | } |
| | | |
| | | public void setFeeName(String feeName) { |
| | | this.feeName = feeName; |
| | | } |
| | | |
| | | public String getFeeTypeCdName() { |
| | | return feeTypeCdName; |
| | | } |
| | | |
| | | public void setFeeTypeCdName(String feeTypeCdName) { |
| | | this.feeTypeCdName = feeTypeCdName; |
| | | } |
| | | |
| | | public String getStateName() { |
| | | return stateName; |
| | | } |
| | | |
| | | public void setStateName(String stateName) { |
| | | this.stateName = stateName; |
| | | } |
| | | |
| | | public String getFeeFlagName() { |
| | | return feeFlagName; |
| | | } |
| | | |
| | | public void setFeeFlagName(String feeFlagName) { |
| | | this.feeFlagName = feeFlagName; |
| | | } |
| | | |
| | | public String getComputingFormula() { |
| | | return computingFormula; |
| | | } |
| | | |
| | | public void setComputingFormula(String computingFormula) { |
| | | this.computingFormula = computingFormula; |
| | | } |
| | | |
| | | public String getComputingFormulaText() { |
| | | return computingFormulaText; |
| | | } |
| | | |
| | | public void setComputingFormulaText(String computingFormulaText) { |
| | | this.computingFormulaText = computingFormulaText; |
| | | } |
| | | |
| | | public String getBillType() { |
| | | return billType; |
| | | } |
| | | |
| | | public void setBillType(String billType) { |
| | | this.billType = billType; |
| | | } |
| | | |
| | | public String getPayerObjType() { |
| | | return payerObjType; |
| | | } |
| | | |
| | | public void setPayerObjType(String payerObjType) { |
| | | this.payerObjType = payerObjType; |
| | | } |
| | | |
| | | public String getIsDefault() { |
| | | return isDefault; |
| | | } |
| | | |
| | | public void setIsDefault(String isDefault) { |
| | | this.isDefault = isDefault; |
| | | } |
| | | |
| | | public String getConfigStartTime() { |
| | | return configStartTime; |
| | | } |
| | | |
| | | public void setConfigStartTime(String configStartTime) { |
| | | this.configStartTime = configStartTime; |
| | | } |
| | | |
| | | public String getConfigEndTime() { |
| | | return configEndTime; |
| | | } |
| | | |
| | | public void setConfigEndTime(String configEndTime) { |
| | | this.configEndTime = configEndTime; |
| | | } |
| | | |
| | | public String getPaymentCd() { |
| | | return paymentCd; |
| | | } |
| | | |
| | | public void setPaymentCd(String paymentCd) { |
| | | this.paymentCd = paymentCd; |
| | | } |
| | | |
| | | public String getPaymentCycle() { |
| | | return paymentCycle; |
| | | } |
| | | |
| | | public void setPaymentCycle(String paymentCycle) { |
| | | this.paymentCycle = paymentCycle; |
| | | } |
| | | |
| | | public String getBillTypeName() { |
| | | return billTypeName; |
| | | } |
| | | |
| | | public void setBillTypeName(String billTypeName) { |
| | | this.billTypeName = billTypeName; |
| | | } |
| | | |
| | | public String getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(String createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getPayerObjTypeName() { |
| | | return payerObjTypeName; |
| | | } |
| | | |
| | | public void setPayerObjTypeName(String payerObjTypeName) { |
| | | this.payerObjTypeName = payerObjTypeName; |
| | | } |
| | | |
| | | public List<FeeConfigDto> getFeeConfigDtos() { |
| | | return feeConfigDtos; |
| | | } |
| | | |
| | | public void setFeeConfigDtos(List<FeeConfigDto> feeConfigDtos) { |
| | | this.feeConfigDtos = feeConfigDtos; |
| | | } |
| | | |
| | | public String getFeeStartTime() { |
| | | return feeStartTime; |
| | | } |
| | | |
| | | public void setFeeStartTime(String feeStartTime) { |
| | | this.feeStartTime = feeStartTime; |
| | | } |
| | | |
| | | public String getFeeEndTime() { |
| | | return feeEndTime; |
| | | } |
| | | |
| | | public void setFeeEndTime(String feeEndTime) { |
| | | this.feeEndTime = feeEndTime; |
| | | } |
| | | |
| | | public String getDetailState() { |
| | | return detailState; |
| | | } |
| | | |
| | | public void setDetailState(String detailState) { |
| | | this.detailState = detailState; |
| | | } |
| | | |
| | | public String getDetailStateName() { |
| | | return detailStateName; |
| | | } |
| | | |
| | | public void setDetailStateName(String detailStateName) { |
| | | this.detailStateName = detailStateName; |
| | | } |
| | | |
| | | public String getDeadlineTime() { |
| | | return deadlineTime; |
| | | } |
| | | |
| | | public void setDeadlineTime(String deadlineTime) { |
| | | this.deadlineTime = deadlineTime; |
| | | } |
| | | |
| | | public String getObjName() { |
| | | return objName; |
| | | } |
| | | |
| | | public void setObjName(String objName) { |
| | | this.objName = objName; |
| | | } |
| | | |
| | | public String getOwnerName() { |
| | | return ownerName; |
| | | } |
| | | |
| | | public void setOwnerName(String ownerName) { |
| | | this.ownerName = ownerName; |
| | | } |
| | | |
| | | public String getFloorNum() { |
| | | return floorNum; |
| | | } |
| | | |
| | | public void setFloorNum(String floorNum) { |
| | | this.floorNum = floorNum; |
| | | } |
| | | |
| | | public String getUnitNum() { |
| | | return unitNum; |
| | | } |
| | | |
| | | public void setUnitNum(String unitNum) { |
| | | this.unitNum = unitNum; |
| | | } |
| | | |
| | | public String getRoomNum() { |
| | | return roomNum; |
| | | } |
| | | |
| | | public void setRoomNum(String roomNum) { |
| | | this.roomNum = roomNum; |
| | | } |
| | | |
| | | public String getCarNum() { |
| | | return carNum; |
| | | } |
| | | |
| | | public void setCarNum(String carNum) { |
| | | this.carNum = carNum; |
| | | } |
| | | |
| | | public String getFloorId() { |
| | | return floorId; |
| | | } |
| | | |
| | | public void setFloorId(String floorId) { |
| | | this.floorId = floorId; |
| | | } |
| | | |
| | | public String getUnitId() { |
| | | return unitId; |
| | | } |
| | | |
| | | public void setUnitId(String unitId) { |
| | | this.unitId = unitId; |
| | | } |
| | | |
| | | public String getAllAmount() { |
| | | return allAmount; |
| | | } |
| | | |
| | | public void setAllAmount(String allAmount) { |
| | | this.allAmount = allAmount; |
| | | } |
| | | } |
| | |
| | | //费用类型 |
| | | private String feeTypeCd; |
| | | |
| | | //费用类型名称 |
| | | private String feeTypeCdName; |
| | | |
| | | //打折金额(包括打折、减免、滞纳金、空置房打折、空置房减免金额等) |
| | | private String discountPrice; |
| | | |
| | |
| | | |
| | | //收费率 |
| | | private String chargeRate; |
| | | |
| | | //状态 |
| | | private String state; |
| | | |
| | | //状态名称 |
| | | private String stateName; |
| | | |
| | | public String getReceivableAmount() { |
| | | return receivableAmount; |
| | |
| | | public void setChargeRate(String chargeRate) { |
| | | this.chargeRate = chargeRate; |
| | | } |
| | | |
| | | public String getFeeTypeCdName() { |
| | | return feeTypeCdName; |
| | | } |
| | | |
| | | public void setFeeTypeCdName(String feeTypeCdName) { |
| | | this.feeTypeCdName = feeTypeCdName; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getStateName() { |
| | | return stateName; |
| | | } |
| | | |
| | | public void setStateName(String stateName) { |
| | | this.stateName = stateName; |
| | | } |
| | | } |
| | |
| | | public class UserDto extends PageDto implements Serializable { |
| | | |
| | | public static final String LEVEL_CD_MALL = "03";//商城用户 |
| | | public static final String LEVEL_CD_ADMIN = "00";//商城用户 |
| | | public static final String LEVEL_CD_STAFF = "01";//商城用户 |
| | | public static final String LEVEL_CD_USER = "02";//商城用户 |
| | | |
| | | private String userId; |
| | | |
| | |
| | | private String sex; |
| | | |
| | | private String levelCd; |
| | | private String[] levelCds; |
| | | |
| | | private String storeId; |
| | | |
| | |
| | | public void setUserFlag(String userFlag) { |
| | | this.userFlag = userFlag; |
| | | } |
| | | |
| | | public String[] getLevelCds() { |
| | | return levelCds; |
| | | } |
| | | |
| | | public void setLevelCds(String[] levelCds) { |
| | | this.levelCds = levelCds; |
| | | } |
| | | } |
| | |
| | | private String communityId; |
| | | private String discountId; |
| | | |
| | | //是否可用状态 |
| | | private String inUse; |
| | | |
| | | public String getApplyType() { |
| | | return applyType; |
| | | } |
| | |
| | | public void setCreateRemark(String createRemark) { |
| | | this.createRemark = createRemark; |
| | | } |
| | | |
| | | public String getInUse() { |
| | | return inUse; |
| | | } |
| | | |
| | | public void setInUse(String inUse) { |
| | | this.inUse = inUse; |
| | | } |
| | | } |
| | |
| | | double oweMonth = 0.0; |
| | | |
| | | Map<String, Object> targetEndDateAndOweMonth = new HashMap<>(); |
| | | |
| | | //判断当前费用是否已结束 |
| | | if (FeeDto.STATE_FINISH.equals(feeDto.getState())) { |
| | | targetEndDate = feeDto.getEndTime(); |
| | |
| | | } |
| | | //判断当前费用是不是导入费用 |
| | | oweMonth = 1.0; |
| | | |
| | | } else { //周期性费用 |
| | | //当前时间 |
| | | Date billEndTime = DateUtil.getCurrentDate(); |
| | |
| | | Date startDate = feeDto.getStartTime(); |
| | | //计费起始时间 |
| | | Date endDate = feeDto.getEndTime(); |
| | | |
| | | //缴费周期 |
| | | long paymentCycle = Long.parseLong(feeDto.getPaymentCycle()); |
| | | // 当前时间 - 开始时间 = 月份 |
| | |
| | | |
| | | // 月份/ 周期 = 轮数(向上取整) |
| | | double round = 0.0; |
| | | if ("1200".equals(feeDto.getPaymentCd())) { // 预付费 |
| | | if ("1200".equals(feeDto.getPaymentCd())) { // 1200预付费 |
| | | round = Math.floor(mulMonth / paymentCycle) + 1; |
| | | } else { //后付费 |
| | | } else { //2100后付费 |
| | | round = Math.floor(mulMonth / paymentCycle); |
| | | } |
| | | // 轮数 * 周期 * 30 + 开始时间 = 目标 到期时间 |
| | | targetEndDate = getTargetEndTime(round * paymentCycle, startDate); |
| | | //费用 快结束了 |
| | | targetEndDate = getTargetEndTime(round * paymentCycle, startDate);//目标结束时间 |
| | | //费用项的结束时间<缴费的结束时间 费用快结束了 取费用项的结束时间 |
| | | if (feeDto.getConfigEndTime().getTime() < targetEndDate.getTime()) { |
| | | targetEndDate = feeDto.getConfigEndTime(); |
| | | } |
| | |
| | | if (doubleMonth <= 0) { |
| | | return endDate.getTime(); |
| | | } |
| | | // Calendar futureDate = Calendar.getInstance(); |
| | | // futureDate.setTime(endDate.getTime()); |
| | | // futureDate.add(Calendar.MONTH, 1); |
| | | int futureDay = endDate.getActualMaximum(Calendar.DAY_OF_MONTH); |
| | | Double hour = doubleMonth * futureDay * 24; |
| | | endDate.add(Calendar.HOUR_OF_DAY, hour.intValue()); |
| | |
| | | and t.advert_id= #{advertId} |
| | | </if> |
| | | <if test="startTime !=null "> |
| | | and t.start_time= #{startTime} |
| | | and t.start_time <= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null "> |
| | | and t.end_time >= #{endTime} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="endTime !=null "> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | |
| | | <if test="headerImg !=null and headerImg != ''"> |
| | | and t.header_img= #{headerImg} |
| | | </if> |
| | | <if test="endTimeFlag == null or endTimeFlag == ''"> |
| | | and t.end_time > now() |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | |
| | | <select id="getBusinessParkingSpaceInfo" parameterType="Map" resultType="Map"> |
| | | select t.area,t.operate,t.num,t.ps_id,t.ps_id |
| | | psId,t.pa_id,t.pa_id |
| | | paId,t.remark,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | paId,t.remark,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.parking_type,t.parking_type parkingType |
| | | from business_parking_space t |
| | | where 1 =1 |
| | | <if test="area !=null and area != ''"> |
| | |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="parkingType !=null and parkingType != ''"> |
| | | and t.parking_type= #{parkingType} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="parkingType !=null and parkingType != ''"> |
| | | and t.parking_type= #{parkingType} |
| | | </if> |
| | | </insert> |
| | | |
| | | |
| | |
| | | <!-- 保存房屋折扣申请信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveApplyRoomDiscountInfo" parameterType="Map"> |
| | | insert into apply_room_discount( |
| | | apply_type,ard_id,create_user_name,create_user_tel,create_remark,check_user_id,check_remark,room_id,room_name,review_user_id,review_remark,start_time,end_time,state,community_id,discount_id |
| | | apply_type,ard_id,create_user_name,create_user_tel,create_remark,check_user_id,check_remark,room_id,room_name,review_user_id,review_remark,start_time,end_time,state,community_id,discount_id,in_use |
| | | ) values ( |
| | | #{applyType},#{ardId},#{createUserName},#{createUserTel},#{createRemark},#{checkUserId},#{checkRemark},#{roomId},#{roomName},#{reviewUserId},#{reviewRemark},#{startTime},#{endTime},#{state},#{communityId},#{discountId} |
| | | #{applyType},#{ardId},#{createUserName},#{createUserTel},#{createRemark},#{checkUserId},#{checkRemark},#{roomId},#{roomName},#{reviewUserId},#{reviewRemark},#{startTime},#{endTime},#{state}, |
| | | #{communityId},#{discountId},#{inUse} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | statusCd,t.check_remark,t.check_remark checkRemark,t.room_id,t.room_id roomId,t.room_name,t.room_name |
| | | roomName,t.review_user_id,t.review_user_id reviewUserId,t.review_remark,t.review_remark |
| | | reviewRemark,t.start_time,t.start_time startTime,t.end_time,t.end_time |
| | | endTime,t.state,td.name stateName,t.community_id,t.community_id communityId,t.discount_id,t.discount_id |
| | | discountId, |
| | | ardt.type_name applyTypeName |
| | | endTime,t.state,td.name stateName,t.community_id,t.community_id communityId,t.discount_id,t.discount_id discountId,t.in_use,t.in_use inUse, |
| | | ardt.type_name applyTypeName,fd.discount_name discountName |
| | | from apply_room_discount t |
| | | left join t_dict td on t.state = td.status_cd and td.table_name='apply_room_discount' and td.table_columns = |
| | | 'state' |
| | | left join apply_room_discount_type ardt on t.apply_type = ardt.apply_type and t.community_id = ardt.community_id |
| | | and ardt.status_cd = '0' |
| | | left join t_dict td on t.state = td.status_cd and td.table_name='apply_room_discount' and td.table_columns ='state' |
| | | left join apply_room_discount_type ardt on t.apply_type = ardt.apply_type and t.community_id = ardt.community_id and ardt.status_cd = '0' |
| | | left join fee_discount fd on t.discount_id=fd.discount_id |
| | | where t.status_cd = '0' |
| | | <if test="applyType !=null and applyType != ''"> |
| | | and t.apply_type= #{applyType} |
| | |
| | | </if> |
| | | <if test="discountId !=null and discountId != ''"> |
| | | and t.discount_id= #{discountId} |
| | | </if> |
| | | <if test="inUse !=null and inUse != ''"> |
| | | and t.in_use= #{inUse} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | <if test="discountId !=null and discountId != ''"> |
| | | and t.discount_id= #{discountId} |
| | | </if> |
| | | <if test="inUse !=null and inUse != ''"> |
| | | and t.in_use= #{inUse} |
| | | </if> |
| | | order by t.create_time desc limit 0,1 |
| | | </select> |
| | | |
| | |
| | | <if test="discountId !=null and discountId != ''"> |
| | | , t.discount_id= #{discountId} |
| | | </if> |
| | | <if test="inUse !=null and inUse != ''"> |
| | | , t.in_use= #{inUse} |
| | | </if> |
| | | where 1=1 |
| | | <if test="ardId !=null and ardId != ''"> |
| | | and t.ard_id= #{ardId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询房屋折扣申请数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="discountId !=null and discountId != ''"> |
| | | and t.discount_id= #{discountId} |
| | | </if> |
| | | |
| | | |
| | | <if test="inUse !=null and inUse != ''"> |
| | | and t.in_use= #{inUse} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="feeCollectionDetailServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存催缴单信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeCollectionDetailInfo" parameterType="Map"> |
| | | insert into fee_collection_detail( |
| | |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询催缴单信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeCollectionDetailInfo" parameterType="Map" resultType="Map"> |
| | | select t.order_id,t.order_id orderId,t.detail_id,t.detail_id detailId,t.status_cd,t.status_cd statusCd,t.owner_id,t.owner_id ownerId,t.collection_name,t.collection_name collectionName,t.payer_obj_name,t.payer_obj_name payerObjName,t.owner_name,t.owner_name ownerName,t.fee_name,t.fee_name feeName,t.owe_amount,t.owe_amount oweAmount,t.state,t.community_id,t.community_id communityId,t.payer_obj_type,t.payer_obj_type payerObjType,t.collection_way,t.collection_way collectionWay,t.remarks,t.payer_obj_id,t.payer_obj_id payerObjId |
| | | from fee_collection_detail t |
| | | where 1 =1 |
| | | <if test="orderId !=null and orderId != ''"> |
| | | and t.order_id= #{orderId} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | and t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="collectionName !=null and collectionName != ''"> |
| | | and t.collection_name= #{collectionName} |
| | | </if> |
| | | <if test="payerObjName !=null and payerObjName != ''"> |
| | | and t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name= #{ownerName} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | | </if> |
| | | <if test="oweAmount !=null and oweAmount != ''"> |
| | | and t.owe_amount= #{oweAmount} |
| | | </if> |
| | | <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="payerObjType !=null and payerObjType != ''"> |
| | | and t.payer_obj_type= #{payerObjType} |
| | | </if> |
| | | <if test="collectionWay !=null and collectionWay != ''"> |
| | | and t.collection_way= #{collectionWay} |
| | | </if> |
| | | <if test="remarks !=null and remarks != ''"> |
| | | and t.remarks= #{remarks} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | select t.order_id,t.order_id orderId,t.detail_id,t.detail_id detailId,t.status_cd,t.status_cd statusCd, |
| | | t.owner_id,t.owner_id ownerId,t.collection_name,t.collection_name |
| | | collectionName,t.payer_obj_name,t.payer_obj_name payerObjName, |
| | | t.owner_name,t.owner_name ownerName,t.fee_name,t.fee_name feeName,t.owe_amount,t.owe_amount oweAmount,t.state, |
| | | t.community_id,t.community_id communityId,t.payer_obj_type,t.payer_obj_type |
| | | payerObjType,t.collection_way,t.collection_way collectionWay, |
| | | t.remarks,t.payer_obj_id,t.payer_obj_id payerObjId,t.create_time,t.create_time createTime |
| | | from fee_collection_detail t |
| | | where 1 =1 |
| | | <if test="orderId !=null and orderId != ''"> |
| | | and t.order_id= #{orderId} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | and t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="collectionName !=null and collectionName != ''"> |
| | | and t.collection_name= #{collectionName} |
| | | </if> |
| | | <if test="payerObjName !=null and payerObjName != ''"> |
| | | and t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name= #{ownerName} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | | </if> |
| | | <if test="oweAmount !=null and oweAmount != ''"> |
| | | and t.owe_amount= #{oweAmount} |
| | | </if> |
| | | <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="payerObjType !=null and payerObjType != ''"> |
| | | and t.payer_obj_type= #{payerObjType} |
| | | </if> |
| | | <if test="collectionWay !=null and collectionWay != ''"> |
| | | and t.collection_way= #{collectionWay} |
| | | </if> |
| | | <if test="remarks !=null and remarks != ''"> |
| | | and t.remarks= #{remarks} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改催缴单信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeCollectionDetailInfo" parameterType="Map"> |
| | | update fee_collection_detail t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="orderId !=null and orderId != ''"> |
| | | , t.order_id= #{orderId} |
| | | </if> |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | , t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="collectionName !=null and collectionName != ''"> |
| | | , t.collection_name= #{collectionName} |
| | | </if> |
| | | <if test="payerObjName !=null and payerObjName != ''"> |
| | | , t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | , t.owner_name= #{ownerName} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | , t.fee_name= #{feeName} |
| | | </if> |
| | | <if test="oweAmount !=null and oweAmount != ''"> |
| | | , t.owe_amount= #{oweAmount} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="payerObjType !=null and payerObjType != ''"> |
| | | , t.payer_obj_type= #{payerObjType} |
| | | </if> |
| | | <if test="collectionWay !=null and collectionWay != ''"> |
| | | , t.collection_way= #{collectionWay} |
| | | </if> |
| | | <if test="remarks !=null and remarks != ''"> |
| | | , t.remarks= #{remarks} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | , t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | where 1=1 <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | update fee_collection_detail t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="orderId !=null and orderId != ''"> |
| | | , t.order_id= #{orderId} |
| | | </if> |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | , t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="collectionName !=null and collectionName != ''"> |
| | | , t.collection_name= #{collectionName} |
| | | </if> |
| | | <if test="payerObjName !=null and payerObjName != ''"> |
| | | , t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | , t.owner_name= #{ownerName} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | , t.fee_name= #{feeName} |
| | | </if> |
| | | <if test="oweAmount !=null and oweAmount != ''"> |
| | | , t.owe_amount= #{oweAmount} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="payerObjType !=null and payerObjType != ''"> |
| | | , t.payer_obj_type= #{payerObjType} |
| | | </if> |
| | | <if test="collectionWay !=null and collectionWay != ''"> |
| | | , t.collection_way= #{collectionWay} |
| | | </if> |
| | | <if test="remarks !=null and remarks != ''"> |
| | | , t.remarks= #{remarks} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | , t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询催缴单数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFeeCollectionDetailsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from fee_collection_detail t |
| | | where 1 =1 |
| | | <if test="orderId !=null and orderId != ''"> |
| | | and t.order_id= #{orderId} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | and t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="collectionName !=null and collectionName != ''"> |
| | | and t.collection_name= #{collectionName} |
| | | </if> |
| | | <if test="payerObjName !=null and payerObjName != ''"> |
| | | and t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name= #{ownerName} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | | </if> |
| | | <if test="oweAmount !=null and oweAmount != ''"> |
| | | and t.owe_amount= #{oweAmount} |
| | | </if> |
| | | <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="payerObjType !=null and payerObjType != ''"> |
| | | and t.payer_obj_type= #{payerObjType} |
| | | </if> |
| | | <if test="collectionWay !=null and collectionWay != ''"> |
| | | and t.collection_way= #{collectionWay} |
| | | </if> |
| | | <if test="remarks !=null and remarks != ''"> |
| | | and t.remarks= #{remarks} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | <select id="queryFeeCollectionDetailsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from fee_collection_detail t |
| | | where 1 =1 |
| | | <if test="orderId !=null and orderId != ''"> |
| | | and t.order_id= #{orderId} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | and t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="collectionName !=null and collectionName != ''"> |
| | | and t.collection_name= #{collectionName} |
| | | </if> |
| | | <if test="payerObjName !=null and payerObjName != ''"> |
| | | and t.payer_obj_name= #{payerObjName} |
| | | </if> |
| | | <if test="ownerName !=null and ownerName != ''"> |
| | | and t.owner_name= #{ownerName} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | | </if> |
| | | <if test="oweAmount !=null and oweAmount != ''"> |
| | | and t.owe_amount= #{oweAmount} |
| | | </if> |
| | | <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="payerObjType !=null and payerObjType != ''"> |
| | | and t.payer_obj_type= #{payerObjType} |
| | | </if> |
| | | <if test="collectionWay !=null and collectionWay != ''"> |
| | | and t.collection_way= #{collectionWay} |
| | | </if> |
| | | <if test="remarks !=null and remarks != ''"> |
| | | and t.remarks= #{remarks} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | from ( |
| | | select pfc.fee_name feeName,f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,oc.car_num carNum, |
| | | pf.payer_obj_type payerObjType,t.start_time startTime,t.end_time endTime,t.create_time createTime, |
| | | t.receivable_amount receivableAmount,t.received_amount receivedAmount,d.name |
| | | t.receivable_amount receivableAmount,t.received_amount receivedAmount,d.name,d2.name feeTypeCdName, |
| | | pfc.fee_type_cd feeTypeCd,t.state,d3.name stateName |
| | | from pay_fee_detail t |
| | | INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | |
| | | left join fee_discount_rule fdr on fd.rule_id = fdr.rule_id and fdr.status_cd = '0' |
| | | left join t_dict d on t.prime_rate = d.status_cd and d.table_name="pay_fee_detail" and |
| | | d.table_columns="prime_rate" |
| | | where t.status_cd = '0' and t.state not in ('1100','1300') |
| | | left join t_dict d2 on pfc.fee_type_cd = d2.status_cd and d2.table_name = "pay_fee_config" and d2.table_columns |
| | | = "fee_type_cd" |
| | | left join t_dict d3 on t.state = d3.status_cd and d3.table_name = "pay_fee_detail" and d3.table_columns = |
| | | "state" |
| | | where t.status_cd = '0' |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and br.room_num= #{roomNum} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="primeRate != null and primeRate != ''"> |
| | | and t.prime_rate = #{primeRate} |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and t.state = #{state} |
| | | </if> |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pfc.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.create_time >= #{startTime} |
| | |
| | | pf.payer_obj_type payerObjType,t.start_time startTime,t.end_time endTime,t.create_time createTime, |
| | | t.receivable_amount receivableAmount,t.received_amount receivedAmount,pfa.`value` |
| | | importFeeName,t.prime_rate,d.name primeRate,fdr.discount_small_type discountSmallType,fdr.rule_name |
| | | ruleName,pfdd.discount_price discountPrice,co.contract_code contractCode,pfo.`value` ownerName,cb.o_id oId |
| | | ruleName,pfdd.discount_price discountPrice,co.contract_code contractCode,pfo.`value` ownerName,cb.o_id oId, |
| | | d2.name feeTypeCdName,pfc.fee_type_cd feeTypeCd,t.state,d3.name stateName |
| | | from pay_fee_detail t |
| | | INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | |
| | | left join fee_discount_rule fdr on fd.rule_id = fdr.rule_id and fdr.status_cd = '0' |
| | | left join t_dict d on t.prime_rate = d.status_cd and d.table_name="pay_fee_detail" and |
| | | d.table_columns="prime_rate" |
| | | left join t_dict d2 on pfc.fee_type_cd = d2.status_cd and d2.table_name = "pay_fee_config" and d2.table_columns |
| | | = "fee_type_cd" |
| | | left join t_dict d3 on t.state = d3.status_cd and d3.table_name = "pay_fee_detail" and d3.table_columns = |
| | | "state" |
| | | LEFT JOIN contract co on pf.payer_obj_id = co.contract_id and co.status_cd = '0' and pf.payer_obj_type='7777' |
| | | LEFT JOIN c_business cb on t.b_id = cb.b_id |
| | | where t.status_cd = '0' and t.state not in ('1100','1300') |
| | | where t.status_cd = '0' |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and br.room_num= #{roomNum} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="primeRate != null and primeRate != ''"> |
| | | and t.prime_rate = #{primeRate} |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and t.state = #{state} |
| | | </if> |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and pfc.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.create_time >= #{startTime} |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询押金 --> |
| | | <select id="queryPayFeeDeposit" parameterType="Map" resultType="Map"> |
| | | select t.amount,t.income_obj_id,t.income_obj_id incomeObjId,t.fee_type_cd,t.fee_type_cd |
| | | feeTypeCd,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.end_time,t.end_time |
| | | endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.user_id,t.user_id |
| | | userId,t.payer_obj_id,t.payer_obj_id payerObjId,pfc.square_price squarePrice,pfc.additional_amount |
| | | additionalAmount,t.fee_flag,t.fee_flag feeFlag,t.state,t.config_id,t.config_id configId, |
| | | pfc.fee_name feeName,td1.name feeTypeCdName,td2.name stateName,td3.name feeFlagName,pfc.computing_formula |
| | | computingFormula,pfc.computing_formula_text computingFormulaText, |
| | | pfc.bill_type billType,t.payer_obj_type,t.payer_obj_type payerObjType,pfc.is_default isDefault,pfc.start_time |
| | | configStartTime,pfc.end_time configEndTime,pfc.payment_cd paymentCd,pfc.payment_cycle paymentCycle,td4.name |
| | | billTypeName,t.create_time createTime,td5.name payerObjTypeName,pfd.state detailState,td6.name |
| | | detailStateName,pfa1.`value` deadlineTime |
| | | ,pfo.`value` ownerName,f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,oc.car_num carNum |
| | | from pay_fee t |
| | | INNER join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' and pfc.fee_type_cd = |
| | | '888800010006' |
| | | left join pay_fee_detail pfd on t.fee_id = pfd.fee_id and pfd.status_cd = '0' and pfd.state != '1300' |
| | | left join t_dict td1 on pfc.fee_type_cd = td1.status_cd and td1.table_name = 'pay_fee_config' and |
| | | td1.table_columns = 'fee_type_cd' |
| | | left join t_dict td2 on t.state = td2.status_cd and td2.table_name = 'pay_fee' and td2.table_columns = 'state' |
| | | left join t_dict td3 on t.fee_flag = td3.status_cd and td3.table_name = 'pay_fee' and td3.table_columns = |
| | | 'fee_flag' |
| | | left join t_dict td4 on pfc.bill_type = td4.status_cd and td4.table_name = 'pay_fee_config' and |
| | | td4.table_columns = 'bill_type' |
| | | left join t_dict td5 on t.payer_obj_type = td5.status_cd and td5.table_name = 'pay_fee' and |
| | | td5.table_columns = 'payer_obj_type' |
| | | left join t_dict td6 on pfd.state = td6.status_cd and td6.table_name = 'pay_fee_detail' and |
| | | td6.table_columns = 'state' |
| | | left join pay_fee_attrs pfo on t.fee_id = pfo.fee_id and pfo.spec_cd = '390008' |
| | | LEFT JOIN pay_fee_attrs pfa1 on t.fee_id = pfa1.fee_id and pfa1.spec_cd = '390010' and pfa1.status_cd = '0' |
| | | left join building_room br on t.payer_obj_id = br.room_id and t.payer_obj_type = '3333' and br.status_cd = '0' |
| | | left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | | left join owner_car oc on t.payer_obj_id = oc.car_id and oc.status_cd = '0' and oc.car_type_cd='1001' |
| | | where 1 = 1 |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and br.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | and bu.unit_id= #{unitId} |
| | | </if> |
| | | <if test="floorId !=null and floorId != ''"> |
| | | and f.floor_id = #{floorId} |
| | | </if> |
| | | <if test="amount != null and amount != ''"> |
| | | and t.amount = #{amount} |
| | | </if> |
| | | <if test="incomeObjId != null and incomeObjId != ''"> |
| | | and t.income_obj_id = #{incomeObjId} |
| | | </if> |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and t.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime != null and startTime != ''"> |
| | | and t.start_time = #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and t.end_time = #{endTime} |
| | | </if> |
| | | <if test="statusCd != null and statusCd != ''"> |
| | | and t.status_cd = #{statusCd} |
| | | </if> |
| | | <if test="communityId != null and communityId != ''"> |
| | | and t.community_id = #{communityId} |
| | | </if> |
| | | <if test="feeId != null and feeId != ''"> |
| | | and t.fee_id = #{feeId} |
| | | </if> |
| | | <if test="userId != null and userId != ''"> |
| | | and t.user_id = #{userId} |
| | | </if> |
| | | <if test="payerObjId != null and payerObjId != ''"> |
| | | and t.payer_obj_id = #{payerObjId} |
| | | </if> |
| | | <if test="squarePrice != null and squarePrice != ''"> |
| | | and pfc.square_price = #{squarePrice} |
| | | </if> |
| | | <if test="additionalAmount != null and additionalAmount != ''"> |
| | | and pfc.additional_amount = #{additionalAmount} |
| | | </if> |
| | | <if test="feeFlag != null and feeFlag != ''"> |
| | | and t.fee_flag = #{feeFlag} |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and t.state = #{state} |
| | | </if> |
| | | <if test="configId != null and configId != ''"> |
| | | and t.config_id = #{configId} |
| | | </if> |
| | | <if test="feeName != null and feeName != ''"> |
| | | and pfc.fee_name = #{feeName} |
| | | </if> |
| | | <if test="computingFormula != null and computingFormula != ''"> |
| | | and pfc.computing_formula = #{computingFormula} |
| | | </if> |
| | | <if test="computingFormulaText != null and computingFormulaText != ''"> |
| | | and pfc.computing_formula_text = #{computingFormulaText} |
| | | </if> |
| | | <if test="billType != null and billType != ''"> |
| | | and pfc.bill_type = #{billType} |
| | | </if> |
| | | <if test="payerObjType != null and payerObjType != ''"> |
| | | and t.payer_obj_type = #{payerObjType} |
| | | </if> |
| | | <if test="isDefault != null and isDefault != ''"> |
| | | and pfc.is_default = #{isDefault} |
| | | </if> |
| | | <if test="configStartTime != null and configStartTime != ''"> |
| | | and pfc.start_time = #{configStartTime} |
| | | </if> |
| | | <if test="configEndTime != null and configEndTime != ''"> |
| | | and pfc.end_time = #{configEndTime} |
| | | </if> |
| | | <if test="paymentCd != null and paymentCd != ''"> |
| | | and pfc.payment_cd = #{paymentCd} |
| | | </if> |
| | | <if test="paymentCycle != null and paymentCycle != ''"> |
| | | and pfc.payment_cycle = #{paymentCycle} |
| | | </if> |
| | | <if test="feeStartTime != null and feeStartTime != ''"> |
| | | and t.create_time >= #{feeStartTime} |
| | | </if> |
| | | <if test="feeEndTime != null and feeEndTime != ''"> |
| | | and t.create_time <= #{feeEndTime} |
| | | </if> |
| | | <if test="detailState != null and detailState != ''"> |
| | | and pfd.state = #{detailState} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询押金退费总金额 --> |
| | | <select id="queryFeeDepositAmount" parameterType="Map" resultType="Map"> |
| | | select SUM(pfc.additional_amount) allAmount,pfd.state detailState |
| | | from pay_fee t |
| | | INNER join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' and pfc.fee_type_cd = |
| | | '888800010006' |
| | | left join pay_fee_detail pfd on t.fee_id = pfd.fee_id and pfd.status_cd = '0' and pfd.state != '1300' |
| | | left join t_dict td1 on pfc.fee_type_cd = td1.status_cd and td1.table_name = 'pay_fee_config' and |
| | | td1.table_columns = 'fee_type_cd' |
| | | left join t_dict td2 on t.state = td2.status_cd and td2.table_name = 'pay_fee' and td2.table_columns = 'state' |
| | | left join t_dict td3 on t.fee_flag = td3.status_cd and td3.table_name = 'pay_fee' and td3.table_columns = |
| | | 'fee_flag' |
| | | left join t_dict td4 on pfc.bill_type = td4.status_cd and td4.table_name = 'pay_fee_config' and |
| | | td4.table_columns = 'bill_type' |
| | | left join t_dict td5 on t.payer_obj_type = td5.status_cd and td5.table_name = 'pay_fee' and |
| | | td5.table_columns = 'payer_obj_type' |
| | | left join t_dict td6 on pfd.state = td6.status_cd and td6.table_name = 'pay_fee_detail' and |
| | | td6.table_columns = 'state' |
| | | left join pay_fee_attrs pfo on t.fee_id = pfo.fee_id and pfo.spec_cd = '390008' |
| | | LEFT JOIN pay_fee_attrs pfa1 on t.fee_id = pfa1.fee_id and pfa1.spec_cd = '390010' and pfa1.status_cd = '0' |
| | | left join building_room br on t.payer_obj_id = br.room_id and t.payer_obj_type = '3333' and br.status_cd = '0' |
| | | left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | | left join owner_car oc on t.payer_obj_id = oc.car_id and oc.status_cd = '0' and oc.car_type_cd='1001' |
| | | where 1 = 1 |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and br.room_num= #{roomNum} |
| | | </if> |
| | | <if test="unitId !=null and unitId != ''"> |
| | | and bu.unit_id= #{unitId} |
| | | </if> |
| | | <if test="floorId !=null and floorId != ''"> |
| | | and f.floor_id = #{floorId} |
| | | </if> |
| | | <if test="amount != null and amount != ''"> |
| | | and t.amount = #{amount} |
| | | </if> |
| | | <if test="incomeObjId != null and incomeObjId != ''"> |
| | | and t.income_obj_id = #{incomeObjId} |
| | | </if> |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and t.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime != null and startTime != ''"> |
| | | and t.start_time = #{startTime} |
| | | </if> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and t.end_time = #{endTime} |
| | | </if> |
| | | <if test="statusCd != null and statusCd != ''"> |
| | | and t.status_cd = #{statusCd} |
| | | </if> |
| | | <if test="communityId != null and communityId != ''"> |
| | | and t.community_id = #{communityId} |
| | | </if> |
| | | <if test="feeId != null and feeId != ''"> |
| | | and t.fee_id = #{feeId} |
| | | </if> |
| | | <if test="userId != null and userId != ''"> |
| | | and t.user_id = #{userId} |
| | | </if> |
| | | <if test="payerObjId != null and payerObjId != ''"> |
| | | and t.payer_obj_id = #{payerObjId} |
| | | </if> |
| | | <if test="squarePrice != null and squarePrice != ''"> |
| | | and pfc.square_price = #{squarePrice} |
| | | </if> |
| | | <if test="additionalAmount != null and additionalAmount != ''"> |
| | | and pfc.additional_amount = #{additionalAmount} |
| | | </if> |
| | | <if test="feeFlag != null and feeFlag != ''"> |
| | | and t.fee_flag = #{feeFlag} |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and t.state = #{state} |
| | | </if> |
| | | <if test="configId != null and configId != ''"> |
| | | and t.config_id = #{configId} |
| | | </if> |
| | | <if test="feeName != null and feeName != ''"> |
| | | and pfc.fee_name = #{feeName} |
| | | </if> |
| | | <if test="computingFormula != null and computingFormula != ''"> |
| | | and pfc.computing_formula = #{computingFormula} |
| | | </if> |
| | | <if test="computingFormulaText != null and computingFormulaText != ''"> |
| | | and pfc.computing_formula_text = #{computingFormulaText} |
| | | </if> |
| | | <if test="billType != null and billType != ''"> |
| | | and pfc.bill_type = #{billType} |
| | | </if> |
| | | <if test="payerObjType != null and payerObjType != ''"> |
| | | and t.payer_obj_type = #{payerObjType} |
| | | </if> |
| | | <if test="isDefault != null and isDefault != ''"> |
| | | and pfc.is_default = #{isDefault} |
| | | </if> |
| | | <if test="configStartTime != null and configStartTime != ''"> |
| | | and pfc.start_time = #{configStartTime} |
| | | </if> |
| | | <if test="configEndTime != null and configEndTime != ''"> |
| | | and pfc.end_time = #{configEndTime} |
| | | </if> |
| | | <if test="paymentCd != null and paymentCd != ''"> |
| | | and pfc.payment_cd = #{paymentCd} |
| | | </if> |
| | | <if test="paymentCycle != null and paymentCycle != ''"> |
| | | and pfc.payment_cycle = #{paymentCycle} |
| | | </if> |
| | | <if test="feeStartTime != null and feeStartTime != ''"> |
| | | and t.create_time >= #{feeStartTime} |
| | | </if> |
| | | <if test="feeEndTime != null and feeEndTime != ''"> |
| | | and t.create_time <= #{feeEndTime} |
| | | </if> |
| | | <if test="detailState != null and detailState != ''"> |
| | | and pfd.state = #{detailState} |
| | | </if> |
| | | group by pfd.state |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="valueId !=null and valueId != ''"> |
| | | and av.value_id= #{valueId} |
| | | </if> |
| | | <if test="userName !=null and userName != ''"> |
| | | and ra.person_name= #{userName} |
| | | </if> |
| | | <if test="repName !=null and repName != ''"> |
| | | and st.name= #{repName} |
| | | </if> |
| | | <if test="repTitle !=null and repTitle != ''"> |
| | | and tt.title like concat('%',#{repTitle},'%') |
| | | </if> |
| | | <if test="valueContent !=null and valueContent != ''"> |
| | | and av.value_content like concat('%',#{valueContent},'%') |
| | | </if> |
| | | <if test="createTime !=null and createTime != ''"> |
| | | and av.create_time= #{createTime} |
| | | </if> |
| | |
| | | <if test="settingId !=null and settingId != ''"> |
| | | and av.setting_id= #{settingId} |
| | | </if> |
| | | order by av.create_time desc |
| | | order by ra.person_name,tt.title,av.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | <if test="levelCd !=null and levelCd != ''"> |
| | | and u.level_cd= #{levelCd} |
| | | </if> |
| | | <if test="levelCds != null"> |
| | | and u.level_cd in |
| | | <foreach collection="levelCds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test='userFlag !=null and userFlag =="1"'> |
| | | and u.level_cd != '02' |
| | | </if> |
| | |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.report.ReportDeposit; |
| | | import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto; |
| | | import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryNoFeeRooms", method = RequestMethod.POST) |
| | | List<RoomDto> queryNoFeeRooms(@RequestBody RoomDto roomDto); |
| | | |
| | | /** |
| | | * 查询押金 |
| | | * |
| | | * @param reportDeposit |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/queryFeeDeposit", method = RequestMethod.POST) |
| | | List<ReportDeposit> queryPayFeeDeposit(@RequestBody ReportDeposit reportDeposit); |
| | | |
| | | /** |
| | | * 查询押金退费总金额 |
| | | */ |
| | | @RequestMapping(value = "/queryFeeDepositAmount", method = RequestMethod.POST) |
| | | List<ReportDeposit> queryFeeDepositAmount(@RequestBody ReportDeposit reportDeposit); |
| | | } |
| | |
| | | * 用户登录服务处理 |
| | | */ |
| | | public static final String SERVICE_CODE_USER_SERVICE_LOGIN = "user.service.login"; |
| | | /** |
| | | * 用户登录服务处理 |
| | | */ |
| | | public static final String SERVICE_CODE_PC_USER_LOGIN = "login.pcUserLogin"; |
| | | |
| | | /** |
| | | * 管理员免密登录 |
| | |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public JSONObject addRoomFee(RoomDto roomDto, JSONObject paramInJson, DataFlowContext dataFlowContext); /** |
| | | public JSONObject addRoomFee(RoomDto roomDto, JSONObject paramInJson, DataFlowContext dataFlowContext) throws ParseException; /** |
| | | * 添加物业费用 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public JSONObject addRoomFee(RoomDto roomDto, JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | public JSONObject addRoomFee(RoomDto roomDto, JSONObject paramInJson, DataFlowContext dataFlowContext) throws ParseException { |
| | | String time = DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A); |
| | | if (paramInJson.containsKey("feeEndDate")) { |
| | | time = paramInJson.getString("feeEndDate"); |
| | | } else if (paramInJson.containsKey("startTime")) { |
| | | time = paramInJson.getString("startTime"); |
| | | } |
| | | //获取费用标识 |
| | | String feeFlag = paramInJson.getString("feeFlag"); |
| | | //查询费用项 |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setConfigId(paramInJson.getString("configId")); |
| | | List<FeeConfigDto> feeConfigDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | Assert.listOnlyOne(feeConfigDtos, "查询费用项错误!"); |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FEE_INFO); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 1); |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.text.ParseException; |
| | | |
| | | /** |
| | | * 主要目的将soService 方法拆分为校验部分 和业务处理部分 |
| | | * Created by wuxw on 2018/11/15. |
| | |
| | | * 业务处理 |
| | | * @param event |
| | | */ |
| | | public final void soService(ServiceDataFlowEvent event) { |
| | | public final void soService(ServiceDataFlowEvent event) throws ParseException { |
| | | |
| | | DataFlowContext dataFlowContext = event.getDataFlowContext(); |
| | | //获取请求数据 |
| | |
| | | * @param context 数据上文对象 |
| | | * @param reqJson 请求报文 |
| | | */ |
| | | protected abstract void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson); |
| | | protected abstract void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) throws ParseException; |
| | | |
| | | |
| | | @Override |
| | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | //如果是大门 则只获取小区的广告 |
| | | |
| | | AdvertDto advertDto = BeanConvertUtil.covertBean(reqJson, AdvertDto.class); |
| | | if(!StringUtil.isEmpty("clientType") && "H5".equals(reqJson.get("clientType"))){ |
| | | Date day=new Date(); |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | advertDto.setStartTime(df.format(day)); |
| | | advertDto.setEndTime(df.format(day)); |
| | | } |
| | | List<AdvertDto> advertDtos = advertInnerServiceSMOImpl.queryAdverts(advertDto); |
| | | |
| | | if (advertDtos != null && advertDtos.size() != 0) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "必填,请填写商户ID"); |
| | |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeFeeConfigConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.api.feeConfig.ApiFeeConfigDataVo; |
| | | import com.java110.vo.api.feeConfig.ApiFeeConfigVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | FeeConfigDto feeConfigDto = BeanConvertUtil.covertBean(reqJson, FeeConfigDto.class); |
| | | |
| | | if(!StringUtil.isEmpty(reqJson.getString("isFlag")) && reqJson.getString("isFlag").equals("0")){ |
| | | feeConfigDto.setPage(PageDto.DEFAULT_PAGE); |
| | | } |
| | | |
| | | int count = feeConfigInnerServiceSMOImpl.queryFeeConfigsCount(feeConfigDto); |
| | | |
| | | List<ApiFeeConfigDataVo> feeConfigs = null; |
| | |
| | | List<ApiFeeDataVo> fees = null; |
| | | |
| | | if (count > 0) { |
| | | List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto); |
| | | computeFeePrice(feeDtos); |
| | | List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto);//查询费用项目 |
| | | computeFeePrice(feeDtos);//计算费用 |
| | | fees = BeanConvertUtil.covertBeanList(feeDtos, ApiFeeDataVo.class); |
| | | freshFeeAttrs(fees, feeDtos); |
| | | } else { |
| | |
| | | Map<String, Object> targetEndDateAndOweMonth = computeFeeSMOImpl.getTargetEndDateAndOweMonth(feeDto); |
| | | Date targetEndDate = (Date) targetEndDateAndOweMonth.get("targetEndDate"); |
| | | double oweMonth = (double) targetEndDateAndOweMonth.get("oweMonth"); |
| | | //一次性费用 |
| | | if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(feeDto.getPayerObjType())) { //房屋相关 |
| | | computeFeePriceByRoom(feeDto, oweMonth); |
| | | } else if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(feeDto.getPayerObjType())) {//车位相关 |
| | |
| | | import com.java110.utils.constant.ServiceCodeFeeConfigConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.api.ApiRoomDataVo; |
| | | import com.java110.vo.api.ApiRoomVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | if (total > 0) { |
| | | List<RoomDto> roomDtoList = roomInnerServiceSMOImpl.queryRooms(roomDto); |
| | | String userId = context.getUserId(); |
| | | refreshRoomOwners(userId, reqJson.getString("communityId"), roomDtoList); |
| | | //获取手机号、身份证号加密标识 |
| | | String flag = reqJson.getString("flag"); |
| | | refreshRoomOwners(userId, reqJson.getString("communityId"), roomDtoList, flag); |
| | | |
| | | apiRoomVo.setRooms(BeanConvertUtil.covertBeanList(roomDtoList, ApiRoomDataVo.class)); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return roomDtos; |
| | | } |
| | | |
| | |
| | | * |
| | | * @param roomDtos |
| | | */ |
| | | private void refreshRoomOwners(String userId, String communityId, List<RoomDto> roomDtos) { |
| | | private void refreshRoomOwners(String userId, String communityId, List<RoomDto> roomDtos, String flag) { |
| | | List<String> roomIds = new ArrayList<>(); |
| | | for (RoomDto roomDto : roomDtos) { |
| | | roomIds.add(roomDto.getRoomId()); |
| | |
| | | roomDto.setOwnerName(tmpOwnerDto.getName()); |
| | | //对业主身份证号隐藏处理 |
| | | String idCard = tmpOwnerDto.getIdCard(); |
| | | if (mark.size() == 0 && idCard != null && !idCard.equals("")) { |
| | | if (mark.size() == 0 && idCard != null && !idCard.equals("") && StringUtil.isEmpty(flag)) { |
| | | idCard = idCard.substring(0, 6) + "**********" + idCard.substring(16); |
| | | } |
| | | //对业主手机号隐藏处理 |
| | | String link = tmpOwnerDto.getLink(); |
| | | if (mark.size() == 0 && link != null && !link.equals("")) { |
| | | if (mark.size() == 0 && link != null && !link.equals("") && StringUtil.isEmpty(flag)) { |
| | | link = link.substring(0, 3) + "****" + link.substring(7); |
| | | } |
| | | roomDto.setIdCard(idCard); |
| | |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeAttrInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeReceiptDetailInnerServiceSMO; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | @Autowired |
| | | private IRepairInnerServiceSMO repairInnerServiceSMO; |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountInnerServiceSMO applyRoomDiscountInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeConstant.SERVICE_CODE_PAY_FEE; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //为停车费单独处理 |
| | | if (paramObj.containsKey("carPayerObjType") && FeeDto.PAYER_OBJ_TYPE_CAR.equals(paramObj.getString("carPayerObjType"))) { |
| | | Date feeEndTime = (Date) paramObj.get("carFeeEndTime"); |
| | |
| | | dataFlowContext.setResponseEntity(ResultVo.createResponseEntity(feeReceiptDetailDtos.get(0))); |
| | | return; |
| | | } |
| | | //修改折扣申请状态,空置房折扣只能用一次 |
| | | String selectDiscount = paramObj.getString("selectDiscount"); |
| | | JSONArray params = JSONArray.parseArray(selectDiscount); |
| | | for (int index = 0; index < params.size(); index++) { |
| | | JSONObject param = params.getJSONObject(index); |
| | | if (!StringUtil.isEmpty(param.getString("ardId"))) { |
| | | ApplyRoomDiscountPo applyRoomDiscountPo = new ApplyRoomDiscountPo(); |
| | | //空置房优惠不可用 |
| | | applyRoomDiscountPo.setInUse("1"); |
| | | applyRoomDiscountPo.setArdId(param.getString("ardId")); |
| | | applyRoomDiscountInnerServiceSMOImpl.updateApplyRoomDiscount(applyRoomDiscountPo); |
| | | } |
| | | } |
| | | dataFlowContext.setResponseEntity(ResultVo.createResponseEntity(feeReceiptDetailDto)); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import com.java110.entity.order.Orders; |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeAttrInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeDiscountInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.owner.RepairPoolPo; |
| | | import com.java110.po.owner.RepairUserPo; |
| | |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountInnerServiceSMO applyRoomDiscountInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeDetailInnerServiceSMO iFeeDetailInnerServiceSMO; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeConstant.SERVICE_CODE_PAY_FEE_PRE; |
| | |
| | | } else if (AppDto.WECHAT_OWNER_APP_ID.equals(appId)) { //微信公众号支付 |
| | | paramObj.put("primeRate", "6"); |
| | | paramObj.put("remark", "线上公众号支付"); |
| | | }else{ |
| | | } else { |
| | | paramObj.put("primeRate", "5"); |
| | | paramObj.put("remark", "线上小程序支付"); |
| | | } |
| | |
| | | addDiscount(paramObj, businesses, dataFlowContext); |
| | | } |
| | | |
| | | dealOwnerCartEndTime(paramObj,businesses); |
| | | dealOwnerCartEndTime(paramObj, businesses); |
| | | |
| | | //判断是否有派单属性ID |
| | | FeeAttrDto feeAttrDto = new FeeAttrDto(); |
| | |
| | | repairUserPo.setState(RepairUserDto.STATE_FINISH_PAY_FEE); |
| | | //如果是待评价状态,就更新结束时间 |
| | | repairUserPo.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | DecimalFormat df = new DecimalFormat("#.00"); |
| | | BigDecimal payment_amount=new BigDecimal(paramObj.getString("receivableAmount")); |
| | | DecimalFormat df = new DecimalFormat("0.00"); |
| | | BigDecimal payment_amount = new BigDecimal(paramObj.getString("receivableAmount")); |
| | | repairUserPo.setContext("已支付" + df.format(payment_amount) + "元"); |
| | | //新增待评价状态 |
| | | JSONObject object = JSONObject.parseObject("{\"datas\":{}}"); |
| | |
| | | dataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | private void dealOwnerCartEndTime(JSONObject paramObj,JSONArray businesses) { |
| | | private void dealOwnerCartEndTime(JSONObject paramObj, JSONArray businesses) { |
| | | //为停车费单独处理 |
| | | if (paramObj.containsKey("carPayerObjType") |
| | | && FeeDto.PAYER_OBJ_TYPE_CAR.equals(paramObj.getString("carPayerObjType"))) { |
| | |
| | | List<ComputeDiscountDto> computeDiscountDtos = (List<ComputeDiscountDto>) paramObj.get("computeDiscountDtos"); |
| | | JSONObject discountBusiness = null; |
| | | for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) { |
| | | if (!StringUtil.isEmpty(computeDiscountDto.getArdId())) { |
| | | //查询 pay_fee_detail 是否缴费 |
| | | FeeDetailDto feeDetailDto = new FeeDetailDto(); |
| | | feeDetailDto.setDetailId(paramObj.getString("detailId")); |
| | | List<FeeDetailDto> feeDetailDtoList = iFeeDetailInnerServiceSMO.queryFeeDetails(feeDetailDto); |
| | | logger.info("======使用空置房优惠信息======ardId======" + computeDiscountDto.getArdId()); |
| | | if (feeDetailDtoList != null && feeDetailDtoList.size() == 1) { |
| | | ApplyRoomDiscountPo applyRoomDiscountPo = new ApplyRoomDiscountPo(); |
| | | //空置房优惠不可用 |
| | | applyRoomDiscountPo.setInUse("1"); |
| | | applyRoomDiscountPo.setArdId(computeDiscountDto.getArdId()); |
| | | applyRoomDiscountInnerServiceSMOImpl.updateApplyRoomDiscount(applyRoomDiscountPo); |
| | | } |
| | | } |
| | | if (computeDiscountDto.getDiscountPrice() <= 0) { |
| | | continue; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) throws ParseException { |
| | | logger.debug("ServiceDataFlowEvent : {}", event); |
| | | List<RoomDto> roomDtos = null; |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | |
| | | /*if (reqJson.containsKey("roomState") && RoomDto.STATE_SELL.equals(reqJson.getString("roomState"))) { |
| | | roomDto.setState(RoomDto.STATE_SELL); |
| | | }*/ |
| | | if (reqJson.containsKey("roomState") && reqJson.getString("roomState").contains(",")) { |
| | | if (reqJson.containsKey("roomState") |
| | | && (reqJson.getString("roomState").contains(",") || !StringUtil.isEmpty(reqJson.getString("roomState")))) { |
| | | String states = reqJson.getString("roomState"); |
| | | roomDto.setStates(states.split(",")); |
| | | } |
| | |
| | | dealRoomFee(roomDtos, context, reqJson, event); |
| | | } |
| | | |
| | | private void dealRoomFee(List<RoomDto> roomDtos, DataFlowContext context, JSONObject reqJson, ServiceDataFlowEvent event) { |
| | | private void dealRoomFee(List<RoomDto> roomDtos, DataFlowContext context, JSONObject reqJson, ServiceDataFlowEvent event) throws ParseException { |
| | | AppService service = event.getAppService(); |
| | | List<String> roomIds = new ArrayList<>(); |
| | | for (RoomDto roomDto : roomDtos) { |
| New file |
| | |
| | | package com.java110.api.listener.login; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiDataFlowListener; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.core.factory.AuthenticationFactory; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.store.StoreUserDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.userLogin.UserLoginDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.intf.store.IStoreInnerServiceSMO; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.intf.user.IUserLoginInnerServiceSMO; |
| | | import com.java110.po.userLogin.UserLoginPo; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.exception.SMOException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 用户注册 侦听 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("pcUserLoginListener") |
| | | public class PcUserLoginListener extends AbstractServiceApiDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(PcUserLoginListener.class); |
| | | |
| | | |
| | | @Autowired |
| | | private IUserLoginInnerServiceSMO userLoginInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IStoreInnerServiceSMO storeInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeConstant.SERVICE_CODE_PC_USER_LOGIN; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 请求参数格式: |
| | | * { |
| | | * "username":"admin", |
| | | * "passwd":"1234565" |
| | | * } |
| | | * 返回报文: |
| | | * { |
| | | * "userId":"", |
| | | * "token":"12dddd" |
| | | * } |
| | | * |
| | | * @param event |
| | | */ |
| | | @Override |
| | | public void soService(ServiceDataFlowEvent event) { |
| | | //获取数据上下文对象 |
| | | DataFlowContext dataFlowContext = event.getDataFlowContext(); |
| | | String paramIn = dataFlowContext.getReqData(); |
| | | Assert.isJsonObject(paramIn, "用户注册请求参数有误,不是有效的json格式 " + paramIn); |
| | | Assert.jsonObjectHaveKey(paramIn, "username", "用户登录,未包含username节点,请检查" + paramIn); |
| | | Assert.jsonObjectHaveKey(paramIn, "passwd", "用户登录,未包含passwd节点,请检查" + paramIn); |
| | | ResponseEntity responseEntity = null; |
| | | JSONObject paramInJson = JSONObject.parseObject(paramIn); |
| | | //根据AppId 查询 是否有登录的服务,查询登录地址调用 |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setName(paramInJson.getString("username")); |
| | | userDto.setPassword(paramInJson.getString("passwd")); |
| | | userDto.setLevelCds(new String[]{UserDto.LEVEL_CD_ADMIN, UserDto.LEVEL_CD_STAFF}); |
| | | List<UserDto> userDtos = userInnerServiceSMOImpl.getUsers(userDto); |
| | | if (userDtos == null || userDtos.size() < 1) { |
| | | userDto.setTel(paramInJson.getString("username")); |
| | | userDtos = userInnerServiceSMOImpl.getUsers(userDto); |
| | | } |
| | | if (userDtos == null || userDtos.size() < 1) { |
| | | responseEntity = new ResponseEntity<String>("用户或密码错误", HttpStatus.UNAUTHORIZED); |
| | | dataFlowContext.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | |
| | | //检查商户状态 |
| | | StoreUserDto storeUserDto = new StoreUserDto(); |
| | | storeUserDto.setUserId(userDtos.get(0).getUserId()); |
| | | List<StoreUserDto> storeUserDtos = storeInnerServiceSMOImpl.getStoreUserInfo(storeUserDto); |
| | | |
| | | if (storeUserDtos != null && storeUserDtos.size() > 0) { |
| | | String state = storeUserDtos.get(0).getState(); |
| | | if ("48002".equals(state)) { |
| | | responseEntity = new ResponseEntity<String>("当前商户限制登录,请联系管理员", HttpStatus.UNAUTHORIZED); |
| | | dataFlowContext.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | try { |
| | | Map userMap = new HashMap(); |
| | | userMap.put(CommonConstant.LOGIN_USER_ID, userDtos.get(0).getUserId()); |
| | | userMap.put(CommonConstant.LOGIN_USER_NAME, userDtos.get(0).getUserName()); |
| | | String token = AuthenticationFactory.createAndSaveToken(userMap); |
| | | JSONObject userInfo = BeanConvertUtil.beanCovertJson(userDtos.get(0)); |
| | | userInfo.remove("userPwd"); |
| | | userInfo.put("token", token); |
| | | //记录登录日志 |
| | | UserLoginPo userLoginPo = new UserLoginPo(); |
| | | userLoginPo.setLoginId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_loginId)); |
| | | userLoginPo.setLoginTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | userLoginPo.setPassword(userDtos.get(0).getPassword()); |
| | | userLoginPo.setSource(UserLoginDto.SOURCE_WEB); |
| | | userLoginPo.setToken(token); |
| | | userLoginPo.setUserId(userInfo.getString("userId")); |
| | | userLoginPo.setUserName(userInfo.getString("userName")); |
| | | userLoginInnerServiceSMOImpl.saveUserLogin(userLoginPo); |
| | | responseEntity = new ResponseEntity<String>(userInfo.toJSONString(), HttpStatus.OK); |
| | | dataFlowContext.setResponseEntity(responseEntity); |
| | | } catch (Exception e) { |
| | | logger.error("登录异常:", e); |
| | | throw new SMOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "系统内部错误,请联系管理员"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 对请求报文处理 |
| | | * |
| | | * @param paramIn |
| | | * @return |
| | | */ |
| | | private JSONObject refreshParamIn(String paramIn) { |
| | | JSONObject paramObj = JSONObject.parseObject(paramIn); |
| | | paramObj.put("userId", "-1"); |
| | | paramObj.put("levelCd", "0"); |
| | | |
| | | return paramObj; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | repairUserDto.setStaffId(userId); |
| | | List<RepairUserDto> repairUserDtos = repairUserInnerServiceSMOImpl.queryRepairUsers(repairUserDto); |
| | | Assert.listOnlyOne(repairUserDtos, "当前用户没有需要处理订单"); |
| | | //把自己改成退单 |
| | | String ruId = repairUserDtos.get(0).getRuId(); |
| | | RepairUserPo repairUserPo = new RepairUserPo(); |
| | | repairUserPo.setRuId(repairUserDtos.get(0).getRuId()); |
| | | repairUserPo.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | repairUserPo.setState(RepairUserDto.STATE_BACK); |
| | | repairUserPo.setContext(reqJson.getString("context")); |
| | | repairUserPo.setCommunityId(reqJson.getString("communityId")); |
| | | super.update(context, repairUserPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_REPAIR_USER); |
| | | //处理人信息 |
| | | repairUserPo = new RepairUserPo(); |
| | | repairUserPo.setRuId("-1"); |
| | |
| | | || RepairDto.REPAIR_WAY_TRAINING.equals(repairDtos.get(0).getRepairWay()) |
| | | ) { |
| | | ownerRepairBMOImpl.modifyBusinessRepairDispatch(reqJson, context, RepairDto.STATE_WAIT); |
| | | //把自己改成退单 |
| | | RepairUserPo repairUser = new RepairUserPo(); |
| | | repairUser.setRuId(ruId); |
| | | repairUser.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | repairUser.setState(RepairUserDto.STATE_BACK); |
| | | repairUser.setContext(reqJson.getString("context")); |
| | | repairUser.setCommunityId(reqJson.getString("communityId")); |
| | | super.update(context, repairUser, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_REPAIR_USER); |
| | | return; |
| | | } else { |
| | | throw new IllegalArgumentException("非常抱歉当前不能退单"); |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "非常抱歉当前不能退单!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | //把自己改成退单 |
| | | RepairUserPo repairUser = new RepairUserPo(); |
| | | repairUser.setRuId(ruId); |
| | | repairUser.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | repairUser.setState(RepairUserDto.STATE_BACK); |
| | | repairUser.setContext(reqJson.getString("context")); |
| | | repairUser.setCommunityId(reqJson.getString("communityId")); |
| | | super.update(context, repairUser, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_REPAIR_USER); |
| | | |
| | | repairUserPo.setPreStaffId(repairUserDtos.get(0).getPreStaffId()); |
| | | repairUserPo.setPreStaffName(repairUserDtos.get(0).getPreStaffName()); |
| | | repairUserPo.setPreRuId(repairUserDtos.get(0).getPreRuId()); |
| | |
| | | if (unitCode.equals(miniUnitCode)) { //如果最小计量单位与物品单位相同,就不向上取整 |
| | | BigDecimal num3 = new BigDecimal(miniUnitStock); |
| | | double newStock = surplusStock.divide(num3, 2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
| | | userStorehousePo.setStock(String.valueOf(newStock)); |
| | | int remainingInventory = new Double(newStock).intValue(); |
| | | userStorehousePo.setStock(String.valueOf(remainingInventory)); |
| | | } else { //如果不相同就向上取整 |
| | | BigDecimal num3 = new BigDecimal(miniUnitStock); |
| | | double newStock = surplusStock.divide(num3, 2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
| | | double ceil = Math.ceil(newStock); |
| | | userStorehousePo.setStock(String.valueOf(ceil)); |
| | | int remainingInventory = new Double(ceil).intValue(); |
| | | userStorehousePo.setStock(String.valueOf(remainingInventory)); |
| | | } |
| | | userStorehousePo.setMiniStock(String.valueOf(surplusStock.doubleValue())); |
| | | if (useNumber.contains(".") || nowStock.contains(".")) { //如果传过来的使用数量为小数,或原有库存数量有小数,就保留小数 |
| | | userStorehousePo.setMiniStock(String.valueOf(surplusStock.doubleValue())); |
| | | } else { //如果传来的使用数量为整数,且原有库存数量为整数,就取整 |
| | | userStorehousePo.setMiniStock(String.valueOf(surplusStock.intValue())); |
| | | } |
| | | userStorehousePo.setUsId(userStorehouseDtoList.get(0).getUsId()); |
| | | userStorehousePo.setResId(resId); |
| | | userStorehousePo.setUserId(userId); |
| | |
| | | repairDto.setState(RepairDto.STATE_TAKING); |
| | | List<RepairDto> repairDtos = repairInnerServiceSMOImpl.queryRepairs(repairDto); |
| | | Assert.listOnlyOne(repairDtos, "当前没有需要处理订单"); |
| | | if (repairDtos != null && repairDtos.size() != 1) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "非常抱歉当前不能退单!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | |
| | | |
| | | //查询正在处理 工单的师傅 |
| | | RepairUserDto repairUserDto = new RepairUserDto(); |
| | |
| | | purchaseApplyPo.setState(purchaseApplyDto.STATE_DEALING); |
| | | super.update(context, purchaseApplyPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PURCHASE_APPLY); |
| | | super.commit(context); |
| | | } else if ((purchaseApplyDtos.get(0).getState().equals(purchaseApplyDto.STATE_DEALING) || purchaseApplyDtos.get(0).getState().equals(purchaseApplyDto.STATE_AUDITED)) |
| | | && reqJson.getString("state").equals("1100")) { //如果状态是审核中 并且是审核通过, |
| | | PurchaseApplyPo purchaseApplyPo = new PurchaseApplyPo(); |
| | | purchaseApplyPo.setApplyOrderId(purchaseApplyDtos.get(0).getApplyOrderId()); |
| | | super.update(context, purchaseApplyPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PURCHASE_APPLY); |
| | | super.commit(context); |
| | | } |
| | | |
| | | boolean isLastTask = purchaseApplyUserInnerServiceSMOImpl.completeTask(purchaseApplyDto); |
| | |
| | | resourceStorePo.setMiniUnitStock(originalResourceStoreDtos.get(0).getMiniUnitStock()); |
| | | } |
| | | super.update(dataFlowContext, resourceStorePo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_RESOURCE_STORE); |
| | | commit(dataFlowContext); |
| | | } else if (resourceStoreDtos != null && resourceStoreDtos.size() > 1) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "物品信息查询到多条,请核实后再处理!"); |
| | | dataFlowContext.setResponseEntity(responseEntity); |
| | |
| | | resourceStorePo.setMiniUnitCode(resourceStoreDtos.get(0).getMiniUnitCode()); |
| | | resourceStorePo.setMiniUnitStock(resourceStoreDtos.get(0).getMiniUnitStock()); |
| | | super.insert(dataFlowContext, resourceStorePo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_RESOURCE_STORE); |
| | | commit(dataFlowContext); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | List<AllocationStorehouseApplyDto> allocationStorehouseApplyDtos = null; |
| | | |
| | | int size = 0; |
| | | |
| | | if (count > 0) { |
| | | allocationStorehouseApplyDtos = allocationStorehouseUserInnerServiceSMOImpl.getUserTasks(auditUser); |
| | | if (allocationStorehouseApplyDtos.size() > 0) { |
| | | AuditUser auditUser1 = new AuditUser(); |
| | | auditUser1.setUserId(reqJson.getString("userId")); |
| | | auditUser1.setStoreId(reqJson.getString("storeId")); |
| | | List<AllocationStorehouseApplyDto> userTasks = allocationStorehouseUserInnerServiceSMOImpl.getUserTasks(auditUser1); |
| | | size = userTasks.size(); |
| | | } |
| | | } else { |
| | | allocationStorehouseApplyDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResponseEntity responseEntity |
| | | = ResultVo.createResponseEntity((int) Math.ceil((double) size / (double) reqJson.getInteger("row")), |
| | | size, |
| | | = ResultVo.createResponseEntity((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), |
| | | (int) count, |
| | | allocationStorehouseApplyDtos); |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | |
| | | |
| | | List<AllocationStorehouseApplyDto> purchaseApplyDtos = null; |
| | | |
| | | int size = 0; |
| | | |
| | | if (count > 0) { |
| | | purchaseApplyDtos = allocationStorehouseUserInnerServiceSMOImpl.getUserHistoryTasks(auditUser); |
| | | AuditUser auditUser1 = new AuditUser(); |
| | | auditUser1.setUserId(reqJson.getString("userId")); |
| | | auditUser1.setStoreId(reqJson.getString("storeId")); |
| | | List<AllocationStorehouseApplyDto> userHistoryTasks = allocationStorehouseUserInnerServiceSMOImpl.getUserHistoryTasks(auditUser1); |
| | | size = userHistoryTasks.size(); |
| | | } else { |
| | | purchaseApplyDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResponseEntity responseEntity |
| | | = ResultVo.createResponseEntity((int) Math.ceil((double) size / (double) reqJson.getInteger("row")), |
| | | size, |
| | | = ResultVo.createResponseEntity((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), |
| | | (int) count, |
| | | purchaseApplyDtos); |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | |
| | | floorDto.setCommunityId(communityId); |
| | | int floorCount = floorInnerServiceSMOImpl.queryFloorsCount(floorDto); |
| | | if (floorCount > 0) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "楼栋编号已经存在"); |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "楼栋已经存在"); |
| | | } |
| | | viewFloorInfo.put("floorId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_floorId)); |
| | | viewFloorInfo.put("userId", context.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID)); |
| | |
| | | roomBMOImpl.addCommunityMember(viewFloorInfo, context); |
| | | } |
| | | if (!hasKey(viewUnitInfo, "unitId")) { |
| | | if (viewFloorInfo.containsKey("floorId") && !StringUtil.isEmpty(viewFloorInfo.getString("floorId"))) { //如果前端选择的楼栋,而不是新增楼栋,就判断该楼栋下单元是否重复 |
| | | //获取楼栋id |
| | | String floorId1 = viewFloorInfo.getString("floorId"); |
| | | //获取小区id |
| | | String communityId = viewUnitInfo.getString("communityId"); |
| | | //获取单元编号 |
| | | String unitNum = viewUnitInfo.getString("unitNum"); |
| | | UnitDto unitDto = new UnitDto(); |
| | | unitDto.setFloorId(floorId1); |
| | | unitDto.setCommunityId(communityId); |
| | | unitDto.setUnitNum(unitNum); |
| | | int unitCount = unitInnerServiceSMOImpl.queryUnitsCount(unitDto); |
| | | if (unitCount > 0) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "单元已经存在"); |
| | | } |
| | | } |
| | | viewUnitInfo.put("unitId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_unitId)); |
| | | viewUnitInfo.put("userId", context.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID)); |
| | | viewUnitInfo.put("floorId", viewFloorInfo.getString("floorId")); |
| | | roomBMOImpl.addBusinessUnit(viewUnitInfo, context); |
| | | } |
| | | if (!hasKey(addRoomView, "roomId")) { |
| | | if (viewUnitInfo.containsKey("unitId") && !StringUtil.isEmpty(viewUnitInfo.getString("unitId"))) { //如果前端选择的单元,而不是添加的,就判断该楼栋单元下房屋是否重复 |
| | | //获取单元id |
| | | String unitId1 = viewUnitInfo.getString("unitId"); |
| | | RoomDto roomDto = new RoomDto(); |
| | | roomDto.setUnitId(unitId1); |
| | | roomDto.setRoomNum(addRoomView.getString("roomNum")); |
| | | roomDto.setCommunityId(addRoomView.getString("communityId")); |
| | | int roomCount = roomInnerServiceSMOImpl.queryRoomsCount(roomDto); |
| | | if (roomCount > 0) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "房屋已经存在"); |
| | | } |
| | | } |
| | | addRoomView.put("roomId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_roomId)); |
| | | addRoomView.put("userId", context.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID)); |
| | | addRoomView.put("unitId", viewUnitInfo.getString("unitId")); |
| | | addRoomView.put("roomType", RoomDto.ROOM_TYPE_ROOM); |
| | | |
| | | roomBMOImpl.addBusinessRoom(addRoomView, context); |
| | | //处理房屋属性 |
| | | dealRoomAttr(addRoomView, context); |
| | | } |
| | | |
| | | |
| | | commit(context); |
| | | |
| | |
| | | query.orderByTaskCreateTime().desc(); |
| | | List<Task> list = null; |
| | | if (user.getPage() >= 1) { |
| | | user.setPage(user.getPage() - 1); |
| | | user.setPage((user.getPage() - 1) * user.getRow()); |
| | | } |
| | | if (user.getPage() != PageDto.DEFAULT_PAGE) { |
| | | list = query.listPage(user.getPage(), user.getRow()); |
| | |
| | | query.orderByTaskCreateTime().desc(); |
| | | List<Task> list = null; |
| | | if (user.getPage() >= 1) { |
| | | user.setPage(user.getPage() - 1); |
| | | user.setPage((user.getPage() - 1) * user.getRow()); |
| | | } |
| | | if (user.getPage() != PageDto.DEFAULT_PAGE) { |
| | | list = query.listPage(user.getPage(), user.getRow()); |
| | |
| | | query.orderByTaskCreateTime().desc(); |
| | | List<Task> list = null; |
| | | if (user.getPage() >= 1) { |
| | | user.setPage(user.getPage() - 1); |
| | | user.setPage((user.getPage() - 1) * user.getRow()); |
| | | } |
| | | if (user.getPage() != PageDto.DEFAULT_PAGE) { |
| | | list = query.listPage(user.getPage(), user.getRow()); |
| | |
| | | taskBusinessKeyMap.put(business_key, task.getId()); |
| | | } |
| | | |
| | | //查询 投诉信息 |
| | | PurchaseApplyDto purchaseApplyDto = new PurchaseApplyDto(); |
| | | purchaseApplyDto.setStoreId(user.getStoreId()); |
| | | purchaseApplyDto.setApplyOrderIds(applyOrderIds.toArray(new String[applyOrderIds.size()])); |
| | |
| | | //获取本次填写的开始时间 |
| | | Date startDate = simpleDateFormat.parse(applyRoomDiscountPo.getStartTime()); |
| | | if (applyRoomDiscountDtos.size() == 0) { |
| | | //空置房优惠可用 |
| | | applyRoomDiscountPo.setInUse("0"); |
| | | return saveApplyRoomDiscountBMOImpl.save(applyRoomDiscountPo); |
| | | } else if (applyRoomDiscountDtos.size() > 0) { |
| | | //取出结束时间 |
| | | String endTime = applyRoomDiscountDtos.get(0).getEndTime(); |
| | | Date finishTime = simpleDateFormat.parse(endTime); |
| | | if (startDate.getTime() - finishTime.getTime() >= 0) { |
| | | //空置房优惠可用 |
| | | applyRoomDiscountPo.setInUse("0"); |
| | | return saveApplyRoomDiscountBMOImpl.save(applyRoomDiscountPo); |
| | | } else { |
| | | throw new UnsupportedOperationException("该时间段已经申请过空置房,请重新输入空置房申请开始和结束时间"); |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryFeeCollectionOrder", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryFeeCollectionOrder(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "state",required = false) String state, |
| | | @RequestParam(value = "staffName",required = false) String staffName, |
| | | @RequestParam(value = "collectionWay",required = false) String collectionWay, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | FeeCollectionOrderDto feeCollectionOrderDto = new FeeCollectionOrderDto(); |
| | | feeCollectionOrderDto.setPage(page); |
| | | feeCollectionOrderDto.setRow(row); |
| | | feeCollectionOrderDto.setCommunityId(communityId); |
| | | feeCollectionOrderDto.setState(state); |
| | | feeCollectionOrderDto.setStaffName(staffName); |
| | | feeCollectionOrderDto.setCollectionWay(collectionWay); |
| | | return getFeeCollectionOrderBMOImpl.get(feeCollectionOrderDto); |
| | | } |
| | | } |
| | |
| | | public ResponseEntity<String> queryFeeDiscount(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "discountType", required = false) String discountType, |
| | | @RequestParam(value = "discountName", required = false) String discountName, |
| | | @RequestParam(value = "discountId", required = false) String discountId, |
| | | @RequestParam(value = "ruleName", required = false) String ruleName, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | |
| | | feeDiscountDto.setDiscountType(discountType); |
| | | feeDiscountDto.setDiscountName(discountName); |
| | | feeDiscountDto.setRuleName(ruleName); |
| | | feeDiscountDto.setDiscountId(discountId); |
| | | return getFeeDiscountBMOImpl.get(feeDiscountDto); |
| | | } |
| | | |
| | |
| | | List<ComputeDiscountDto> computeDiscountDtoList = new ArrayList<>(); |
| | | for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) { |
| | | computeDiscountDto.setValue(value); |
| | | if (!StringUtil.isEmpty(computeDiscountDto.getDiscountType()) && "3003".equals(computeDiscountDto.getDiscountType())) { |
| | | computeDiscountDto.setArdId(feeDetailDto.getArdId()); |
| | | } |
| | | computeDiscountDtoList.add(computeDiscountDto); |
| | | } |
| | | return computeDiscountDtos; |
| | |
| | | List<ComputeDiscountDto> computeDiscountDtoList = new ArrayList<>(); |
| | | for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) { |
| | | computeDiscountDto.setValue(value); |
| | | if (!StringUtil.isEmpty(computeDiscountDto.getDiscountType()) && "3003".equals(computeDiscountDto.getDiscountType())) { |
| | | computeDiscountDto.setArdId(feeDetailDto.getArdId()); |
| | | } |
| | | computeDiscountDtoList.add(computeDiscountDto); |
| | | } |
| | | return computeDiscountDtoList; |
| | |
| | | ApplyRoomDiscountDto applyRoomDiscountDto = new ApplyRoomDiscountDto(); |
| | | //审核已通过 |
| | | applyRoomDiscountDto.setState("4"); |
| | | //是否可用状态标识(0表示在用;1表示不可用) |
| | | applyRoomDiscountDto.setInUse("0"); |
| | | //小区ID |
| | | applyRoomDiscountDto.setCommunityId(feeDetailDto.getCommunityId()); |
| | | //房屋id |
| | |
| | | if (applyRoomDiscountDtos != null && applyRoomDiscountDtos.size() > 0) { |
| | | //获取优惠id |
| | | String discountId = applyRoomDiscountDtos.get(0).getDiscountId(); |
| | | String ardId = applyRoomDiscountDtos.get(0).getArdId(); |
| | | feeDetailDto.setArdId(ardId); |
| | | PayFeeConfigDiscountDto payFeeConfigDiscount = new PayFeeConfigDiscountDto(); |
| | | payFeeConfigDiscount.setCommunityId(applyRoomDiscountDtos.get(0).getCommunityId()); |
| | | payFeeConfigDiscount.setDiscountId(discountId); |
| | |
| | | |
| | | @Autowired |
| | | private IToQrPayOweFeeSMO toQrPayOweFeeSMOImpl; |
| | | @Autowired |
| | | private IToPayInGoOutSMO toPayInGoOutSMOImpl; |
| | | @Autowired |
| | | private IToPayBackCitySMO toPayBackCitySMOImpl; |
| | | |
| | | /** |
| | | * <p>统一下单入口</p> |
| | |
| | | * @param request |
| | | * @throws Exception |
| | | */ |
| | | @RequestMapping(path = "/toQrInGoOutPay", method = RequestMethod.POST) |
| | | public ResponseEntity<String> toQrInGoOutPay(@RequestBody String postInfo, HttpServletRequest request) { |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | /*IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA);*/ |
| | | String appId = request.getHeader("APP_ID"); |
| | | if (StringUtil.isEmpty(appId)) { |
| | | appId = request.getHeader("APP-ID"); |
| | | } |
| | | |
| | | IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(), postInfo, |
| | | "", "", "", pd.getSessionId(), |
| | | appId); |
| | | return toPayInGoOutSMOImpl.toPay(newPd); |
| | | } |
| | | /** |
| | | * <p>统一下单入口</p> |
| | | * |
| | | * @param request |
| | | * @throws Exception |
| | | */ |
| | | @RequestMapping(path = "/toQrBackCityPay", method = RequestMethod.POST) |
| | | public ResponseEntity<String> toQrBackCityPay(@RequestBody String postInfo, HttpServletRequest request) { |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | /*IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA);*/ |
| | | String appId = request.getHeader("APP_ID"); |
| | | if (StringUtil.isEmpty(appId)) { |
| | | appId = request.getHeader("APP-ID"); |
| | | } |
| | | |
| | | IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(), postInfo, |
| | | "", "", "", pd.getSessionId(), |
| | | appId); |
| | | return toPayBackCitySMOImpl.toPay(newPd); |
| | | } |
| | | /** |
| | | * <p>统一下单入口</p> |
| | | * |
| | | * @param request |
| | | * @throws Exception |
| | | */ |
| | | @RequestMapping(path = "/toPayTempCarInout", method = RequestMethod.POST) |
| | | public ResponseEntity<String> toPayTempCarInout(@RequestBody String postInfo, HttpServletRequest request) { |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | |
| | | public static final String ALLOCATION_USER_STORE_HOUSE_MANAGE = "allocationUserStorehouseManage"; |
| | | public static final String RESOURCE_STORE_USE_RECORD_MANAGE = "resourceStoreUseRecordManage"; |
| | | public static final String RESOURCE_STAFF_FEE_MANAGE = "staffFeeManage"; |
| | | public static final String REPORT_PAY_FEE_DEPOSIT = "reportPayFeeDeposit"; |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | |
| | | break; |
| | | case RESOURCE_STAFF_FEE_MANAGE: |
| | | staffFeeManage(pd, result, workbook); |
| | | break; |
| | | case REPORT_PAY_FEE_DEPOSIT: |
| | | reportPayFeeDeposit(pd, result, workbook); |
| | | break; |
| | | } |
| | | ByteArrayOutputStream os = new ByteArrayOutputStream(); |
| | |
| | | Row row = sheet.createRow(0); |
| | | row.createCell(0).setCellValue("订单号"); |
| | | row.createCell(1).setCellValue("房号"); |
| | | row.createCell(2).setCellValue("费用项"); |
| | | row.createCell(3).setCellValue("支付方式"); |
| | | row.createCell(4).setCellValue("缴费开始时间"); |
| | | row.createCell(5).setCellValue("缴费结束时间"); |
| | | row.createCell(6).setCellValue("缴费时间"); |
| | | row.createCell(7).setCellValue("应收金额"); |
| | | row.createCell(8).setCellValue("实收金额"); |
| | | row.createCell(9).setCellValue("优惠金额"); |
| | | row.createCell(10).setCellValue("减免金额"); |
| | | row.createCell(11).setCellValue("滞纳金"); |
| | | row.createCell(12).setCellValue("空置房打折金额"); |
| | | row.createCell(13).setCellValue("空置房减免金额"); |
| | | row.createCell(14).setCellValue("业主"); |
| | | row.createCell(2).setCellValue("业主"); |
| | | row.createCell(3).setCellValue("费用项"); |
| | | row.createCell(4).setCellValue("费用类型"); |
| | | row.createCell(5).setCellValue("费用状态"); |
| | | row.createCell(6).setCellValue("支付方式"); |
| | | row.createCell(7).setCellValue("费用开始时间"); |
| | | row.createCell(8).setCellValue("费用结束时间"); |
| | | row.createCell(9).setCellValue("缴费时间"); |
| | | row.createCell(10).setCellValue("应收金额"); |
| | | row.createCell(11).setCellValue("实收金额"); |
| | | row.createCell(12).setCellValue("优惠金额"); |
| | | row.createCell(13).setCellValue("减免金额"); |
| | | row.createCell(14).setCellValue("滞纳金"); |
| | | row.createCell(15).setCellValue("空置房打折金额"); |
| | | row.createCell(16).setCellValue("空置房减免金额"); |
| | | // row.createCell(14).setCellValue("业主"); |
| | | //查询楼栋信息 |
| | | JSONArray rooms = this.getReportPayFeeDetail(pd, result); |
| | | if (rooms == null || rooms.size() == 0) { |
| | |
| | | dataObj = rooms.getJSONObject(roomIndex); |
| | | row.createCell(0).setCellValue(dataObj.getString("oId")); |
| | | row.createCell(1).setCellValue(dataObj.getString("objName")); |
| | | row.createCell(2).setCellValue(dataObj.getString("feeName")); |
| | | row.createCell(3).setCellValue(dataObj.getString("primeRate")); |
| | | row.createCell(4).setCellValue(dataObj.getString("startTime")); |
| | | row.createCell(5).setCellValue(dataObj.getString("endTime")); |
| | | row.createCell(6).setCellValue(dataObj.getString("createTime")); |
| | | row.createCell(7).setCellValue(dataObj.getDouble("receivableAmount")); |
| | | row.createCell(8).setCellValue(dataObj.getDouble("receivedAmount")); |
| | | row.createCell(9).setCellValue(dataObj.getDouble("preferentialAmount")); |
| | | row.createCell(10).setCellValue(dataObj.getDouble("deductionAmount")); |
| | | row.createCell(11).setCellValue(dataObj.getDouble("lateFee")); |
| | | row.createCell(12).setCellValue(dataObj.getDouble("vacantHousingDiscount")); |
| | | row.createCell(13).setCellValue(dataObj.getDouble("vacantHousingReduction")); |
| | | row.createCell(14).setCellValue(dataObj.getString("ownerName")); |
| | | |
| | | row.createCell(2).setCellValue(dataObj.getString("ownerName")); |
| | | row.createCell(3).setCellValue(dataObj.getString("feeName")); |
| | | row.createCell(4).setCellValue(dataObj.getString("feeTypeCdName")); |
| | | row.createCell(5).setCellValue(dataObj.getString("stateName")); |
| | | row.createCell(6).setCellValue(dataObj.getString("primeRate")); |
| | | row.createCell(7).setCellValue(dataObj.getString("startTime")); |
| | | row.createCell(8).setCellValue(dataObj.getString("endTime")); |
| | | row.createCell(9).setCellValue(dataObj.getString("createTime")); |
| | | row.createCell(10).setCellValue(dataObj.getDouble("receivableAmount")); |
| | | row.createCell(11).setCellValue(dataObj.getDouble("receivedAmount")); |
| | | row.createCell(12).setCellValue(dataObj.getDouble("preferentialAmount")); |
| | | row.createCell(13).setCellValue(dataObj.getDouble("deductionAmount")); |
| | | row.createCell(14).setCellValue(dataObj.getDouble("lateFee")); |
| | | row.createCell(15).setCellValue(dataObj.getDouble("vacantHousingDiscount")); |
| | | row.createCell(16).setCellValue(dataObj.getDouble("vacantHousingReduction")); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //押金报表导出 |
| | | private void reportPayFeeDeposit(IPageData pd, ComponentValidateResult result, Workbook workbook) { |
| | | Sheet sheet = workbook.createSheet("押金报表"); |
| | | Row row = sheet.createRow(0); |
| | | row.createCell(0).setCellValue("费用ID"); |
| | | row.createCell(1).setCellValue("房号"); |
| | | row.createCell(2).setCellValue("业主"); |
| | | row.createCell(3).setCellValue("费用类型"); |
| | | row.createCell(4).setCellValue("费用项"); |
| | | row.createCell(5).setCellValue("费用开始时间"); |
| | | row.createCell(6).setCellValue("费用结束时间"); |
| | | row.createCell(7).setCellValue("创建时间"); |
| | | row.createCell(8).setCellValue("付费对象类型"); |
| | | row.createCell(9).setCellValue("付款方ID"); |
| | | row.createCell(10).setCellValue("应收金额"); |
| | | row.createCell(11).setCellValue("状态"); |
| | | row.createCell(12).setCellValue("退费状态"); |
| | | JSONArray reportPayFeeDeposits = this.getReportPayFeeDeposit(pd, result); |
| | | if (reportPayFeeDeposits == null || reportPayFeeDeposits.size() == 0) { |
| | | return; |
| | | } |
| | | JSONObject dataObj = null; |
| | | for (int roomIndex = 0; roomIndex < reportPayFeeDeposits.size(); roomIndex++) { |
| | | row = sheet.createRow(roomIndex + 1); |
| | | dataObj = reportPayFeeDeposits.getJSONObject(roomIndex); |
| | | row.createCell(0).setCellValue(dataObj.getString("feeId")); |
| | | row.createCell(1).setCellValue(dataObj.getString("objName")); |
| | | row.createCell(2).setCellValue(dataObj.getString("ownerName")); |
| | | row.createCell(3).setCellValue(dataObj.getString("feeTypeCdName")); |
| | | row.createCell(4).setCellValue(dataObj.getString("feeName")); |
| | | row.createCell(5).setCellValue(dataObj.getString("startTime")); |
| | | row.createCell(6).setCellValue(dataObj.getString("deadlineTime")); |
| | | row.createCell(7).setCellValue(dataObj.getString("createTime")); |
| | | row.createCell(8).setCellValue(dataObj.getString("payerObjTypeName")); |
| | | row.createCell(9).setCellValue(dataObj.getString("payerObjId")); |
| | | row.createCell(10).setCellValue(dataObj.getString("additionalAmount")); |
| | | row.createCell(11).setCellValue(dataObj.getString("stateName")); |
| | | if (dataObj.getString("state").equals("2009001")) { |
| | | row.createCell(12).setCellValue(dataObj.getString("detailStateName")); |
| | | } else { |
| | | row.createCell(12).setCellValue("未缴费"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private void reportYearCollection(IPageData pd, ComponentValidateResult result, Workbook workbook) { |
| | | Sheet sheet = workbook.createSheet("费用台账"); |
| | |
| | | return savedStaffFeeManages.getJSONArray("staffFees"); |
| | | } |
| | | |
| | | private JSONArray getReportPayFeeDeposit(IPageData pd, ComponentValidateResult result) { |
| | | String apiUrl = ""; |
| | | ResponseEntity<String> responseEntity = null; |
| | | JSONObject reqJson = JSONObject.parseObject(pd.getReqData()); |
| | | reqJson.put("page", 1); |
| | | reqJson.put("row", 10000); |
| | | apiUrl = ServiceConstant.SERVICE_API_URL + "/api/reportFeeMonthStatistics/queryPayFeeDeposit" + mapToUrlParam(reqJson); |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", apiUrl, HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { //跳过 保存单元信息 |
| | | return null; |
| | | } |
| | | JSONObject savedReportPayFeeDeposits = JSONObject.parseObject(responseEntity.getBody(), Feature.OrderedField); |
| | | //获取限制条数的值 |
| | | int number = Integer.parseInt(MappingCache.getValue(DOMAIN_COMMON, EXPORT_NUMBER)); |
| | | if (savedReportPayFeeDeposits.getJSONArray("data").size() > number) { |
| | | throw new IllegalArgumentException("导出数据超过限制条数" + number + "条,无法继续导出操作!"); |
| | | } |
| | | if (!savedReportPayFeeDeposits.containsKey("data")) { |
| | | return null; |
| | | } |
| | | return savedReportPayFeeDeposits.getJSONArray("data"); |
| | | } |
| | | |
| | | private JSONArray getReportYearCollection(IPageData pd, ComponentValidateResult result) { |
| | | String apiUrl = ""; |
| | | ResponseEntity<String> responseEntity = null; |
| | |
| | | } |
| | | |
| | | loginInfo.put("passwd", AuthenticationFactory.passwdMd5(loginInfo.getString("passwd"))); |
| | | responseEntity = this.callCenterService(restTemplate, pd, loginInfo.toJSONString(), ServiceConstant.SERVICE_API_URL + "/api/user.service.login", HttpMethod.POST); |
| | | responseEntity = this.callCenterService(restTemplate, pd, loginInfo.toJSONString(), ServiceConstant.SERVICE_API_URL + "/api/login.pcUserLogin", HttpMethod.POST); |
| | | if (responseEntity.getStatusCode() == HttpStatus.OK) { |
| | | JSONObject userInfo = JSONObject.parseObject(responseEntity.getBody()); |
| | | pd.setToken(userInfo.getString("token")); |
| New file |
| | |
| | | package com.java110.front.smo.payment; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 统一下单接口类 |
| | | */ |
| | | public interface IToPayBackCitySMO { |
| | | |
| | | /** |
| | | * 下单 |
| | | * @param pd |
| | | * @return |
| | | */ |
| | | public ResponseEntity<String> toPay(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.front.smo.payment; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 统一下单接口类 |
| | | */ |
| | | public interface IToPayInGoOutSMO { |
| | | |
| | | /** |
| | | * 下单 |
| | | * @param pd |
| | | * @return |
| | | */ |
| | | public ResponseEntity<String> toPay(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.front.smo.payment.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.front.properties.WechatAuthProperties; |
| | | import com.java110.front.smo.AppAbstractComponentSMO; |
| | | import com.java110.front.smo.payment.IToPayBackCitySMO; |
| | | import com.java110.front.smo.payment.IToPayInGoOutSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.util.Assert; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Service("toPayBackCitySMOImpl") |
| | | public class ToPayBackCitySMOImpl extends AppAbstractComponentSMO implements IToPayBackCitySMO { |
| | | private static final Logger logger = LoggerFactory.getLogger( ToPayBackCitySMOImpl.class); |
| | | |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Autowired |
| | | private RestTemplate outRestTemplate; |
| | | |
| | | |
| | | @Autowired |
| | | private WechatAuthProperties wechatAuthProperties; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> toPay(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | Assert.jsonObjectHaveKey(paramIn, "communityId", "请求报文中未包含settingId节点"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) throws Exception { |
| | | |
| | | ResponseEntity responseEntity = null; |
| | | |
| | | String ownerUrl = MappingCache.getValue("OWNER_WECHAT_URL") |
| | | + "/#/pages/reportInfoBack/reportInfoBack?communityId=" |
| | | + paramIn.getString( "communityId" ) ; |
| | | Map result = new HashMap( ); |
| | | result.put( "codeUrl", ownerUrl); |
| | | responseEntity = new ResponseEntity(JSONObject.toJSONString(result), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.front.smo.payment.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.core.context.PageData; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.app.AppDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.owner.OwnerAppUserDto; |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import com.java110.front.properties.WechatAuthProperties; |
| | | import com.java110.front.smo.AppAbstractComponentSMO; |
| | | import com.java110.front.smo.payment.IToPayInGoOutSMO; |
| | | import com.java110.front.smo.payment.adapt.IPayAdapt; |
| | | import com.java110.utils.cache.CommonCache; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.constant.WechatConstant; |
| | | import com.java110.utils.factory.ApplicationContextFactory; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Service("toPayInGoOutSMOImpl") |
| | | public class ToPayInGoOutSMOImpl extends AppAbstractComponentSMO implements IToPayInGoOutSMO { |
| | | private static final Logger logger = LoggerFactory.getLogger( ToPayInGoOutSMOImpl.class); |
| | | |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Autowired |
| | | private RestTemplate outRestTemplate; |
| | | |
| | | |
| | | @Autowired |
| | | private WechatAuthProperties wechatAuthProperties; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> toPay(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | Assert.jsonObjectHaveKey(paramIn, "settingId", "请求报文中未包含communityId节点"); |
| | | Assert.jsonObjectHaveKey(paramIn, "communityId", "请求报文中未包含settingId节点"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) throws Exception { |
| | | |
| | | ResponseEntity responseEntity = null; |
| | | |
| | | |
| | | String ownerUrl = MappingCache.getValue("OWNER_WECHAT_URL") |
| | | + "/#/pages/reportInfoDetail/reportInfoDetail?settingId=" + |
| | | paramIn.getString( "settingId" ) + |
| | | "&communityId=" + paramIn.getString( "communityId" ) ; |
| | | Map result = new HashMap( ); |
| | | result.put( "codeUrl", ownerUrl); |
| | | responseEntity = new ResponseEntity(JSONObject.toJSONString(result), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | data.setKeyword3(new Content(paramIn.getString("context"))); |
| | | data.setRemark(new Content("请您及时确认信息,并安排相关人员进行处理,感谢您的使用!")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword4(new Content(paramIn.getString("context") + "\r\n" + "报修位置:" + paramIn.getString("repairObjName"))); |
| | | data.setRemark(new Content(paramIn.getString("preStaffName") + "转单给您,请及时登录公众号接单确认!")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword4(new Content(paramIn.getString("context") + "\r\n" + "报修位置:" + address)); |
| | | data.setRemark(new Content("请及时登录公众号接单确认!")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword4(new Content(paramIn.getString("time"))); |
| | | data.setRemark(new Content("您的报修已受理,请保持电话畅通,以便维修人员及时跟您取得联系!感谢您的使用!")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | data.setKeyword4(new Content(paramIn.getString("context") + "\r\n" + "报修位置:" + address)); |
| | | data.setRemark(new Content("请及时与客户取得联系!")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.factory.WechatFactory; |
| | | import com.java110.dto.basePrivilege.BasePrivilegeDto; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.owner.OwnerAppUserDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import com.java110.dto.smallWechatAttr.SmallWechatAttrDto; |
| | | import com.java110.dto.staffAppAuth.StaffAppAuthDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.entity.order.Business; |
| | | import com.java110.entity.wechat.Content; |
| | | import com.java110.entity.wechat.Data; |
| | |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairSettingInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | | import com.java110.intf.order.IPrivilegeInnerServiceSMO; |
| | | import com.java110.intf.store.ISmallWeChatInnerServiceSMO; |
| | | import com.java110.intf.store.ISmallWechatAttrInnerServiceSMO; |
| | | import com.java110.intf.user.*; |
| | |
| | | |
| | | @Autowired |
| | | private RestTemplate outRestTemplate; |
| | | |
| | | @Autowired |
| | | private IPrivilegeInnerServiceSMO privilegeInnerServiceSMO; |
| | | |
| | | @Autowired |
| | | private IOwnerAppUserInnerServiceSMO ownerAppUserInnerServiceSMO; |
| | |
| | | String staffName = repairUserDtos.get(0).getStaffName(); |
| | | //退单备注 |
| | | String returnContext = repairUserDtos.get(0).getContext(); |
| | | //上级操作人 |
| | | String preStaffId = repairUserDtos.get(0).getPreStaffId(); |
| | | //上级操作人姓名 |
| | | String preStaffName = repairUserDtos.get(0).getPreStaffName(); |
| | | paramIn.put("repairTypeName", repairTypeName); |
| | | paramIn.put("repairObjName", repairObjName); |
| | | paramIn.put("staffName", staffName); |
| | | paramIn.put("context", context); |
| | | paramIn.put("returnContext", returnContext); |
| | | paramIn.put("preStaffId", preStaffId); |
| | | paramIn.put("preStaffName", preStaffName); |
| | | sendReturnMessage(paramIn, communityDtos.get(0)); |
| | | } else if (state.equals("10002")) { //结单 |
| | | //获取用户id |
| | |
| | | logger.info("推送微信模板,获取accessToken失败:{}", accessToken); |
| | | return; |
| | | } |
| | | // 根据特定权限查询 有该权限的 员工 |
| | | BasePrivilegeDto basePrivilegeDto = new BasePrivilegeDto(); |
| | | basePrivilegeDto.setResource("/wechatRepairRegistration"); |
| | | List<UserDto> userDtos = privilegeInnerServiceSMO.queryPrivilegeUsers(basePrivilegeDto); |
| | | String url = sendMsgUrl + accessToken; |
| | | for (UserDto userDto : userDtos) { |
| | | //根据 userId 查询到openId |
| | | StaffAppAuthDto staffAppAuthDto = new StaffAppAuthDto(); |
| | | staffAppAuthDto.setStaffId(userDto.getUserId()); |
| | | staffAppAuthDto.setAppType("WECHAT"); |
| | | List<StaffAppAuthDto> staffAppAuthDtos = staffAppAuthInnerServiceSMO.queryStaffAppAuths(staffAppAuthDto); |
| | | //根据 userId 查询到openId |
| | | StaffAppAuthDto staffAppAuthDto = new StaffAppAuthDto(); |
| | | staffAppAuthDto.setStaffId(paramIn.getString("preStaffId")); |
| | | staffAppAuthDto.setAppType("WECHAT"); |
| | | List<StaffAppAuthDto> staffAppAuthDtos = staffAppAuthInnerServiceSMO.queryStaffAppAuths(staffAppAuthDto); |
| | | if (staffAppAuthDtos.size() > 0) { |
| | | String openId = staffAppAuthDtos.get(0).getOpenId(); |
| | | Data data = new Data(); |
| | | PropertyFeeTemplateMessage templateMessage = new PropertyFeeTemplateMessage(); |
| | |
| | | data.setKeyword3(new Content(paramIn.getString("context"))); |
| | | data.setRemark(new Content(paramIn.getString("returnContext"))); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 结单给管理员推送信息 |
| | | * 结单给业主推送信息 |
| | | * |
| | | * @param paramIn |
| | | * @param communityDto |
| | |
| | | data.setKeyword4(new Content(paramIn.getString("time"))); |
| | | data.setRemark(new Content("请点击查看详情,对我们的工作进行评价,以便提供更优质的服务,感谢您的配合和使用,祝您生活愉快,阖家欢乐!")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | data.setKeyword5(new Content(paramIn.getString("price") + "元")); |
| | | data.setRemark(new Content("请您及时缴费,感谢您的配合和使用,祝您生活愉快,阖家欢乐!")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | data.setKeyword5(new Content(paramIn.getString("stateName"))); |
| | | data.setRemark(new Content("请及时处理!")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword3(new Content(paramIn.getString("checkRemark"))); |
| | | data.setRemark(new Content("空置房申请验房已通过,系统已为您安排下一步审核流程,请耐心等待!")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | data.setKeyword3(new Content(paramIn.getString("checkRemark"))); |
| | | data.setRemark(new Content("感谢您的使用,如有疑问请联系相关物业人员。")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | data.setKeyword5(new Content(paramIn.getString("stateName"))); |
| | | data.setRemark(new Content("请及时处理!")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword3(new Content(paramIn.getString("reviewRemark"))); |
| | | data.setRemark(new Content("感谢您的使用!")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | data.setKeyword3(new Content(paramIn.getString("reviewRemark"))); |
| | | data.setRemark(new Content("感谢您的使用,如有疑问请联系相关物业人员。")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private String subDay(String date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date dt = sdf.parse(date); |
| | | Calendar rightNow = Calendar.getInstance(); |
| | | rightNow.setTime(dt); |
| | | rightNow.add(Calendar.DAY_OF_MONTH, -1); |
| | | Date dt1 = rightNow.getTime(); |
| | | String reStr = sdf.format(dt1); |
| | | return reStr; |
| | | } |
| | | |
| | | private void doSendPayFeeDetail(Business business, JSONObject businessPayFeeDetail) { |
| | | //查询缴费明细 |
| | | PayFeeDetailPo payFeeDetailPo = BeanConvertUtil.covertBean(businessPayFeeDetail, PayFeeDetailPo.class); |
| | |
| | | String startTime = DateUtil.dateTimeToDate(payFeeDetailPo.getStartTime()); |
| | | //获取用户缴费到期时间 |
| | | String endTime = DateUtil.dateTimeToDate(payFeeDetailPo.getEndTime()); |
| | | try { |
| | | endTime = subDay(endTime); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | //获取用户缴费金额 |
| | | String receivedAmount = payFeeDetailPo.getReceivedAmount(); |
| | | //获取费用类型 |
| | |
| | | data.setKeyword4(new Content(paramIn.getString("receivedAmount") + "元")); |
| | | data.setRemark(new Content("感谢您的使用,如有疑问请联系相关物业人员")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword4(new Content(paramIn.getString("receivedAmount") + "元")); |
| | | data.setRemark(new Content("请与客服管家核实费用")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword4(new Content(paramIn.getString("receivedAmount") + "元")); |
| | | data.setRemark(new Content("感谢您的使用,如有疑问请联系相关物业人员")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | data.setRemark(new Content("请及时处理!")); |
| | | } |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setRemark(new Content("请及时处理!")); |
| | | } |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword3(new Content("您的" + communityDtos.get(0).getName() + "小区" + paramIn.getString("roomName") + "房屋,有新的现场巡检记录,请您及时了解近期房屋装修状况!")); |
| | | data.setRemark(new Content("如有其它问题,请联系" + communityDtos.get(0).getName() + "客服,联系电话" + tel + ",感谢您的使用。")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | data.setKeyword5(new Content("待验收")); |
| | | data.setRemark(new Content("感谢您的使用。")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword3(new Content(paramIn.getString("createTime"))); |
| | | data.setRemark(new Content("如有任何疑问,请咨询" + communityDto.getName() + "客服部,咨询电话:" + tel + "。")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | } |
| | | data.setRemark(new Content("如有其它问题,请联系" + communityDto.getName() + "客服,联系电话" + tel + ",感谢您的使用。")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword5(new Content("待审核")); |
| | | data.setRemark(new Content("感谢您的使用。")); |
| | | templateMessage.setData(data); |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | //获取员工公众号地址 |
| | | String wechatUrl = MappingCache.getValue("STAFF_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | |
| | | data.setKeyword4(new Content(paramIn.getString("startTime") + "至" + paramIn.getString("endTime"))); |
| | | data.setRemark(new Content("物业联系电话:" + tel + ",请到物业管理处或通过手机缴纳装修押金!")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| New file |
| | |
| | | package com.java110.job.task.backupDatabase; |
| | | |
| | | import com.java110.dto.task.TaskDto; |
| | | import com.java110.job.quartz.TaskSystemQuartz; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 备份数据库定时任务 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-08-04 14:36 |
| | | */ |
| | | @Component |
| | | public class BackupDatabaseTemplate extends TaskSystemQuartz { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(BackupDatabaseTemplate.class); |
| | | |
| | | //域 |
| | | public static final String DOMAIN_COMMON = "DOMAIN.COMMON"; |
| | | |
| | | //键(tt) |
| | | public static final String BACKUP_DATABASE = "TT_BACKUP_DATABASE"; |
| | | |
| | | //键(hc_community) |
| | | public static final String HC_COMMUNITY_BACKUP_DATABASE = "HC_COMMUNITY_BACKUP_DATABASE"; |
| | | |
| | | //键(备份的数据库文件存储位置) |
| | | public static final String FILE_LOCATION = "FILE_LOCATION"; |
| | | |
| | | //键(区分windows和linux操作系统) |
| | | public static final String LINUX_OR_WINDOWS = "LINUX_OR_WINDOWS"; |
| | | |
| | | @Override |
| | | protected void process(TaskDto taskDto) throws Exception { |
| | | logger.debug("======开始执行数据库备份======" + taskDto.toString()); |
| | | //取出tt库开关映射的值 |
| | | String val = MappingCache.getValue(DOMAIN_COMMON, BACKUP_DATABASE); |
| | | //取出hc_community库开关映射的值 |
| | | String hcVal = MappingCache.getValue(DOMAIN_COMMON, HC_COMMUNITY_BACKUP_DATABASE); |
| | | //取出数据库文件存储位置 |
| | | String fileUrl = MappingCache.getValue(DOMAIN_COMMON, FILE_LOCATION); |
| | | if (StringUtil.isEmpty(fileUrl)) { |
| | | throw new IllegalArgumentException("文件存储位置不能为空!"); |
| | | } |
| | | //备份tt库 |
| | | if (!StringUtil.isEmpty(val)) { |
| | | String[] split = val.split("&"); |
| | | String userName = split[0]; |
| | | String password = split[1]; |
| | | String databaseName = split[2]; |
| | | String port = split[3]; |
| | | String backName = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()) + "-tt.sql"; |
| | | BackupDatabaseTemplate.dbBackUp(userName, password, databaseName, fileUrl, backName, port); |
| | | } |
| | | //备份hc_community库 |
| | | if (!StringUtil.isEmpty(hcVal)) { |
| | | String[] split = val.split("&"); |
| | | String userName = split[0]; |
| | | String password = split[1]; |
| | | String databaseName = split[2]; |
| | | String port = split[3]; |
| | | String backName = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()) + "-hc_community.sql"; |
| | | BackupDatabaseTemplate.dbBackUp(userName, password, databaseName, fileUrl, backName, port); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导出tt数据库 |
| | | * |
| | | * @param userName |
| | | * @param password |
| | | * @param dbName |
| | | * @param backPath |
| | | * @param backName |
| | | * @param port |
| | | * @throws Exception |
| | | */ |
| | | public static void dbBackUp(String userName, String password, String dbName, String backPath, String backName, String port) throws Exception { |
| | | //获取操作系统区分标识 |
| | | String operatingSystem = MappingCache.getValue(DOMAIN_COMMON, LINUX_OR_WINDOWS); |
| | | String pathSql = backPath + backName; |
| | | //创建备份sql文件 |
| | | try { |
| | | File file = new File(pathSql); |
| | | System.out.println("======文件位置======:" + file); |
| | | if (!file.exists()) { |
| | | file.createNewFile(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | StringBuffer sb = new StringBuffer(); |
| | | sb.append("mysqldump"); |
| | | sb.append(" -h" + port); |
| | | sb.append(" -u" + userName); |
| | | sb.append(" -p" + password); |
| | | sb.append(" " + dbName + " >"); |
| | | sb.append(" " + pathSql); |
| | | System.out.println("======命令为======:" + sb.toString()); |
| | | Runtime runtime = Runtime.getRuntime(); |
| | | System.out.println("======开始备份数据库======:" + dbName); |
| | | if (!StringUtil.isEmpty(operatingSystem) && operatingSystem.equals("1")) { //1表示windows操作系统 |
| | | Process process = runtime.exec("cmd /c" + sb.toString()); |
| | | System.out.println("======返回结果======:" + process.toString()); |
| | | } else if (!StringUtil.isEmpty(operatingSystem) && operatingSystem.equals("2")) { //2表示linux操作系统 |
| | | Process process = runtime.exec("/home/mysql/mysql/bin/" + sb.toString()); |
| | | System.out.println("======返回结果======:" + process.toString()); |
| | | } |
| | | System.out.println("======备份数据库" + dbName + "成功!======"); |
| | | } |
| | | |
| | | } |
| | |
| | | data.setKeyword3(new Content(finishTime)); |
| | | data.setRemark(new Content("请您及时续费,以免影响您的正常使用!")); |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | |
| | | import com.java110.job.quartz.TaskSystemQuartz; |
| | | import com.java110.po.owner.RepairPoolPo; |
| | | import com.java110.po.owner.RepairUserPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | Date startTime = repairUserDtoList.get(0).getStartTime(); |
| | | //获取当前时间 |
| | | Date nowTime = new Date(); |
| | | //判断时间是否超过了两天 |
| | | if ((nowTime.getTime() - startTime.getTime()) > 2 * 1000 * 60 * 60 * 24) { |
| | | //默认48小时 |
| | | Integer autoEvaluateHour = 48; |
| | | if (StringUtil.isEmpty(MappingCache.getValue("autoEvaluateHour"))) { |
| | | autoEvaluateHour = Integer.valueOf(MappingCache.getValue("autoEvaluateHour")); |
| | | } |
| | | if ((nowTime.getTime() - startTime.getTime()) > autoEvaluateHour * 1000 * 60 * 60) { |
| | | //超过两天未评价,状态变为待回访状态 |
| | | RepairPoolPo repairPoolPo = new RepairPoolPo(); |
| | | repairPoolPo.setRepairId(tmpRepairDto.getRepairId()); |
| | |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.job.quartz.TaskSystemQuartz; |
| | | import com.java110.po.feeCollectionDetail.FeeCollectionDetailPo; |
| | | import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo; |
| | | import com.java110.po.logSystemError.LogSystemErrorPo; |
| | | import com.java110.service.smo.ISaveSystemErrorSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.WechatConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.ExceptionUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | |
| | | |
| | | double maxPage = Math.ceil(oweCount / DEFAULT_FEE_COUNT); |
| | | |
| | | for (int roomIndex = 0; roomIndex < maxPage; roomIndex++) { |
| | | for (int roomIndex = 1; roomIndex <= maxPage; roomIndex++) { |
| | | try { |
| | | doReportOweFeePushMessage(roomIndex * DEFAULT_FEE_COUNT, (roomIndex + 1) * DEFAULT_FEE_COUNT, communityDto, feeCollectionOrderDtos.get(0)); |
| | | doReportOweFeePushMessage(roomIndex, DEFAULT_FEE_COUNT, communityDto, feeCollectionOrderDtos.get(0)); |
| | | FeeCollectionOrderPo feeCollectionOrderPo = BeanConvertUtil.covertBean(feeCollectionOrderDtos.get(0), FeeCollectionOrderPo.class); |
| | | feeCollectionOrderPo.setState("F"); |
| | | feeCollectionOrderInnerServiceSMOImpl.updateFeeCollectionOrder(feeCollectionOrderPo); |
| | | } catch (Exception e) { |
| | | LogSystemErrorPo logSystemErrorPo = new LogSystemErrorPo(); |
| | | logSystemErrorPo.setErrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_errId)); |
| | |
| | | logger.error("欠费推送失败" + communityDto.getCommunityId(), e); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | private void doReportOweFeePushMessage(int page, int row, CommunityDto communityDto, FeeCollectionOrderDto feeCollectionOrderDto) { |
| | |
| | | reportOweFeeDto.setRow(row); |
| | | List<ReportOweFeeDto> reportOweFeeDtos = reportOweFeeInnerServiceSMOImpl.queryReportOweFees(reportOweFeeDto); |
| | | refreshReportOwe(reportOweFeeDtos); |
| | | if (reportOweFeeDtos.size() > 0) { |
| | | pushMessage(reportOweFeeDtos, feeCollectionOrderDto); |
| | | } else { |
| | | logger.error("当前没有欠费信息" + communityDto.getCommunityId()); |
| | | } |
| | | |
| | | pushMessage(reportOweFeeDtos, feeCollectionOrderDto); |
| | | } |
| | | |
| | | private void pushMessage(List<ReportOweFeeDto> reportOweFeeDtos, FeeCollectionOrderDto feeCollectionOrderDto) { |
| | |
| | | ResultVo resultVo = null; |
| | | switch (feeCollectionOrderDto.getCollectionWay()) { |
| | | case FeeCollectionOrderDto.COLLECTION_WAY_SMS: |
| | | resultVo = doSendSms(reportOweFeeDo, feeCollectionOrderDto); |
| | | resultVo = doSendSms(reportOweFeeDo, feeCollectionOrderDto);//短信 |
| | | feeCollectionDetailPo.setCollectionWay(FeeCollectionOrderDto.COLLECTION_WAY_SMS); |
| | | break; |
| | | case FeeCollectionOrderDto.COLLECTION_WAY_WECHAT: |
| | | resultVo = doSendWechat(reportOweFeeDo, feeCollectionOrderDto); |
| | | feeCollectionDetailPo.setCollectionWay(FeeCollectionOrderDto.COLLECTION_WAY_WECHAT); |
| | | if (!StringUtil.isEmpty(reportOweFeeDo.getOwnerId())) { |
| | | Map paramInfo = getOwnerAppUserDto(feeCollectionOrderDto.getCommunityId(), reportOweFeeDo.getOwnerId()); |
| | | resultVo = doSendWechat(reportOweFeeDo, feeCollectionOrderDto, paramInfo);//微信 |
| | | feeCollectionDetailPo.setCollectionWay(FeeCollectionOrderDto.COLLECTION_WAY_WECHAT); |
| | | } |
| | | break; |
| | | case FeeCollectionOrderDto.COLLECTION_WAY_WECHAT_SMS: |
| | | resultVo = doSendWechatOrSms(reportOweFeeDo, feeCollectionOrderDto, feeCollectionDetailPo); |
| | | resultVo = doSendWechatOrSms(reportOweFeeDo, feeCollectionOrderDto, feeCollectionDetailPo);//短信或者微信 |
| | | break; |
| | | } |
| | | |
| | | |
| | | feeCollectionDetailPo.setCollectionName(feeCollectionOrderDto.getCollectionName()); |
| | | feeCollectionDetailPo.setCommunityId(feeCollectionOrderDto.getCommunityId()); |
| | | feeCollectionDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | feeCollectionDetailPo.setFeeName(feeCollectionOrderDto.getCollectionName() + "欠费"); |
| | | feeCollectionDetailPo.setOrderId(feeCollectionOrderDto.getOrderId()); |
| | | feeCollectionDetailPo.setOweAmount(reportOweFeeDo.getAmountOwed()); |
| | | feeCollectionDetailPo.setOwnerId(reportOweFeeDo.getOwnerId()); |
| | | feeCollectionDetailPo.setOwnerName(reportOweFeeDo.getOwnerName()); |
| | | feeCollectionDetailPo.setPayerObjId(reportOweFeeDo.getPayerObjId()); |
| | | feeCollectionDetailPo.setPayerObjName(reportOweFeeDo.getPayerObjName()); |
| | | feeCollectionDetailPo.setPayerObjType(reportOweFeeDo.getPayerObjType()); |
| | | feeCollectionDetailPo.setState(resultVo.getCode() == ResultVo.CODE_OK ? FeeCollectionOrderDto.STATE_FINISH : FeeCollectionOrderDto.STATE_ERROR); |
| | | feeCollectionDetailPo.setRemarks(resultVo.getMsg().length() > 512 ? resultVo.getMsg().substring(0, 450) : resultVo.getMsg()); |
| | | feeCollectionDetailInnerServiceSMOImpl.saveFeeCollectionDetail(feeCollectionDetailPo); |
| | | |
| | | |
| | | logger.info("微信模板返回内容:{}", resultVo); |
| | | if (resultVo != null) { |
| | | feeCollectionDetailPo.setCollectionName(feeCollectionOrderDto.getCollectionName()); |
| | | feeCollectionDetailPo.setCommunityId(feeCollectionOrderDto.getCommunityId()); |
| | | feeCollectionDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | feeCollectionDetailPo.setFeeName(feeCollectionOrderDto.getCollectionName() + "欠费"); |
| | | feeCollectionDetailPo.setOrderId(feeCollectionOrderDto.getOrderId()); |
| | | feeCollectionDetailPo.setOweAmount(reportOweFeeDo.getAmountOwed()); |
| | | feeCollectionDetailPo.setOwnerId(reportOweFeeDo.getOwnerId()); |
| | | feeCollectionDetailPo.setOwnerName(reportOweFeeDo.getOwnerName()); |
| | | feeCollectionDetailPo.setPayerObjId(reportOweFeeDo.getPayerObjId()); |
| | | feeCollectionDetailPo.setPayerObjName(reportOweFeeDo.getPayerObjName()); |
| | | feeCollectionDetailPo.setPayerObjType(reportOweFeeDo.getPayerObjType()); |
| | | feeCollectionDetailPo.setState(resultVo.getCode() == ResultVo.CODE_OK ? FeeCollectionOrderDto.STATE_FINISH : FeeCollectionOrderDto.STATE_ERROR); |
| | | feeCollectionDetailPo.setRemarks(resultVo.getMsg().length() > 512 ? resultVo.getMsg().substring(0, 450) : resultVo.getMsg()); |
| | | feeCollectionDetailInnerServiceSMOImpl.saveFeeCollectionDetail(feeCollectionDetailPo); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param feeCollectionOrderDto |
| | | */ |
| | | private ResultVo doSendWechatOrSms(ReportOweFeeDto reportOweFeeDo, FeeCollectionOrderDto feeCollectionOrderDto, FeeCollectionDetailPo feeCollectionDetailPo) { |
| | | Map paramInfo = getOwnerAppUserDto(feeCollectionOrderDto.getCommunityId(), reportOweFeeDo.getOwnerId()); |
| | | Map paramInfo = getOwnerAppUserDto(feeCollectionOrderDto.getCommunityId(), reportOweFeeDo.getOweId()); |
| | | if (paramInfo == null) { |
| | | feeCollectionDetailPo.setCollectionWay(FeeCollectionOrderDto.COLLECTION_WAY_SMS); |
| | | return doSendSms(reportOweFeeDo, feeCollectionOrderDto); |
| | | return doSendSms(reportOweFeeDo, feeCollectionOrderDto);//短信推送 |
| | | } |
| | | feeCollectionDetailPo.setCollectionWay(FeeCollectionOrderDto.COLLECTION_WAY_WECHAT); |
| | | return doSendWechat(reportOweFeeDo, feeCollectionOrderDto, paramInfo); |
| | | return doSendWechat(reportOweFeeDo, feeCollectionOrderDto, paramInfo);//微信推送 |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | String templateId = paramInfo.get("templateId").toString(); |
| | | String url = paramInfo.get("url").toString(); |
| | | String oweRoomUrl = paramInfo.get("oweCarUrl").toString(); |
| | | String oweRoomUrl = paramInfo.get("oweRoomUrl").toString(); |
| | | String oweCarUrl = paramInfo.get("oweCarUrl").toString(); |
| | | SmallWeChatDto weChatDto = (SmallWeChatDto) paramInfo.get("weChatDto"); |
| | | Miniprogram miniprogram = paramInfo.get("oweCarUrl") == null ? null : (Miniprogram) paramInfo.get("oweCarUrl"); |
| | | Miniprogram miniprogram = paramInfo.get("miniprogram") == null ? null : (Miniprogram) paramInfo.get("miniprogram"); |
| | | List<OwnerAppUserDto> ownerAppUserDtos = (List<OwnerAppUserDto>) paramInfo.get("ownerAppUserDtos"); |
| | | |
| | | List<ReportOweFeeItemDto> itemDtos = reportOweFeeDo.getItems(); |
| | |
| | | oweUrl = FeeDto.PAYER_OBJ_TYPE_ROOM.equals(reportOweFeeDo.getPayerObjType()) ? oweRoomUrl : oweCarUrl; |
| | | for (OwnerAppUserDto appUserDto : ownerAppUserDtos) { |
| | | try { |
| | | //获取用户缴费到期时间 |
| | | Date endTime = itemDto.getEndTime(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(endTime); |
| | | calendar.add(Calendar.DATE, -1); |
| | | endTime = calendar.getTime(); |
| | | |
| | | Data data = new Data(); |
| | | PropertyFeeTemplateMessage templateMessage = new PropertyFeeTemplateMessage(); |
| | | templateMessage.setTemplate_id(templateId); |
| | | templateMessage.setTouser(appUserDto.getOpenId()); |
| | | /*data.setFirst(new Content("物业费缴费提醒"));*/ |
| | | data.setFirst(new Content(itemDto.getFeeName() + "提醒")); |
| | | data.setKeyword1(new Content(itemDto.getPayerObjName())); |
| | | data.setKeyword2(new Content(itemDto.getAmountOwed())); |
| | | data.setKeyword3(new Content( |
| | | DateUtil.getFormatTimeString(itemDto.getStartTime(), DateUtil.DATE_FORMATE_STRING_B) |
| | | + "至" |
| | | + DateUtil.getFormatTimeString(itemDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_B))); |
| | | + DateUtil.getFormatTimeString(endTime, DateUtil.DATE_FORMATE_STRING_B))); |
| | | data.setRemark(new Content("请您及时缴费,如有疑问请联系相关物业人员")); |
| | | |
| | | if (!StringUtil.isEmpty(oweUrl)) { |
| | | if (miniprogram == null) { |
| | | templateMessage.setUrl(oweUrl + itemDto.getPayerObjId() + "&wAppId=" + weChatDto.getAppId()); |
| | |
| | | return new ResultVo(ResultVo.CODE_ERROR, "未配置短信信息"); |
| | | } |
| | | Object paramIn = null; |
| | | if ("ALI".equals(smsConfigDto.getSmsType())) { |
| | | List<ReportOweFeeItemDto> itemDtos = reportOweFeeDo.getItems(); |
| | | //获取用户缴费到期时间 |
| | | Date endTime = itemDtos.get(0).getEndTime(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(endTime); |
| | | calendar.add(Calendar.DATE, -1); |
| | | endTime = calendar.getTime(); |
| | | SmsConfigDto smsConfigDto1 = BeanConvertUtil.covertBean(smsConfigDtos.get(0), SmsConfigDto.class); |
| | | // 尊敬的业主${user},您${house}的${feeType},账单日期${date}至${date2},缴费金额:${mount}元,请及时缴费 |
| | | if ("ALI".equals(smsConfigDto1.getSmsType())) { |
| | | JSONObject param = new JSONObject(); |
| | | param.put("user", reportOweFeeDo.getOwnerName()); |
| | | param.put("house", reportOweFeeDo.getPayerObjName()); |
| | | param.put("amountOwed", reportOweFeeDo.getAmountOwed()); |
| | | param.put("feeType", itemDtos.get(0).getFeeName()); |
| | | param.put("date", DateUtil.getFormatTimeString(itemDtos.get(0).getStartTime(), DateUtil.DATE_FORMATE_STRING_B)); |
| | | param.put("date2", DateUtil.getFormatTimeString(endTime, DateUtil.DATE_FORMATE_STRING_B)); |
| | | param.put("mount", reportOweFeeDo.getAmountOwed()); |
| | | paramIn = param; |
| | | } else { |
| | | paramIn = new String[]{ |
| | |
| | | } |
| | | ResultVo resultVo = null; |
| | | for (OwnerDto ownerDto1 : ownerDtos) { |
| | | resultVo = SendSmsFactory.sendOweFeeSms(ownerDto1.getLink(), smsConfigDto, paramIn); |
| | | resultVo = SendSmsFactory.sendOweFeeSms(ownerDto1.getLink(), smsConfigDto1, paramIn); |
| | | } |
| | | |
| | | return resultVo; |
| | |
| | | OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto(); |
| | | ownerAppUserDto.setCommunityId(weChatDto.getObjId()); |
| | | ownerAppUserDto.setAppType(OwnerAppUserDto.APP_TYPE_WECHAT); |
| | | ownerAppUserDto.setMemberId(memberId); |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | |
| | | if (ownerAppUserDtos == null || ownerAppUserDtos.size() < 1) { |
| | |
| | | if (reportOweFee.getPayerObjType().equals("3333")) { |
| | | List<ReportOweFeeDto> reportOweFees = reportOweFeeInnerServiceSMOImpl.queryReportAllOweFeesByRoom(reportOwe); |
| | | reportOweFee.setOweId(reportOweFees.get(0).getOweId()); |
| | | reportOweFee.setOwnerId(reportOweFees.get(0).getOwnerId()); |
| | | reportOweFee.setOwnerName(reportOweFees.get(0).getOwnerName()); |
| | | } else if (reportOweFee.getPayerObjType().equals("6666")) { |
| | | List<ReportOweFeeDto> reportOweFees = reportOweFeeInnerServiceSMOImpl.queryReportAllOweFeesByCar(reportOwe); |
| | | reportOweFee.setOweId(reportOweFees.get(0).getOweId()); |
| | | reportOweFee.setOwnerId(reportOweFees.get(0).getOwnerId()); |
| | | reportOweFee.setOwnerName(reportOweFees.get(0).getOwnerName()); |
| | | } |
| | | reportOweFeeDtos.add(reportOweFee); |
| | |
| | | if (!StringUtil.isEmpty(reportOweFeeDto.getOwnerName()) && StringUtil.isEmpty(oldReportOweFeeDto.getOwnerName())) { |
| | | oldReportOweFeeDto.setOwnerName(reportOweFeeDto.getOwnerName()); |
| | | } |
| | | if (!StringUtil.isEmpty(reportOweFeeDto.getOwnerId()) && StringUtil.isEmpty(oldReportOweFeeDto.getOwnerId())) { |
| | | oldReportOweFeeDto.setOwnerId(reportOweFeeDto.getOwnerId()); |
| | | } |
| | | if (!StringUtil.isEmpty(reportOweFeeDto.getPayerObjType()) && StringUtil.isEmpty(oldReportOweFeeDto.getPayerObjType())) { |
| | | oldReportOweFeeDto.setPayerObjType(reportOweFeeDto.getPayerObjType()); |
| | | } |
| | | oldReportOweFeeDto.setUpdateTime(reportOweFeeDto.getUpdateTime()); |
| | | oldReportOweFeeDto.setConfigName(reportOweFeeDto.getConfigName()); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.report.ReportDeposit; |
| | | import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto; |
| | | import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo; |
| | | import com.java110.report.bmo.reportFeeMonthStatistics.IDeleteReportFeeMonthStatisticsBMO; |
| | |
| | | @RequestParam(value = "roomId", required = false) String roomId, |
| | | @RequestParam(value = "roomNum", required = false) String roomNum, |
| | | @RequestParam(value = "primeRate", required = false) String primeRate, |
| | | @RequestParam(value = "state", required = false) String state, |
| | | @RequestParam(value = "feeTypeCd", required = false) String feeTypeCd, |
| | | @RequestParam(value = "configId", required = false) String configId, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime, |
| | |
| | | reportFeeMonthStatisticsDto.setRoomId(roomId); |
| | | reportFeeMonthStatisticsDto.setRoomNum(roomNum); |
| | | reportFeeMonthStatisticsDto.setPrimeRate(primeRate); |
| | | reportFeeMonthStatisticsDto.setState(state); |
| | | reportFeeMonthStatisticsDto.setFeeTypeCd(feeTypeCd); |
| | | reportFeeMonthStatisticsDto.setConfigId(configId); |
| | | reportFeeMonthStatisticsDto.setStartTime(startTime); |
| | | reportFeeMonthStatisticsDto.setEndTime(endTime); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 押金报表 |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /reportFeeMonthStatistics/queryPayFeeDeposit |
| | | * @path /app/reportFeeMonthStatistics/queryPayFeeDeposit |
| | | */ |
| | | @RequestMapping(value = "/queryPayFeeDeposit", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryPayFeeDeposit(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "configId", required = false) String configId, |
| | | @RequestParam(value = "feeId", required = false) String feeId, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime, |
| | | @RequestParam(value = "payerObjType", required = false) String payerObjType, |
| | | @RequestParam(value = "state", required = false) String state, |
| | | @RequestParam(value = "detailState", required = false) String detailState, |
| | | @RequestParam(value = "floorId", required = false) String floorId, |
| | | @RequestParam(value = "unitId", required = false) String unitId, |
| | | @RequestParam(value = "roomNum", required = false) String roomNum, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ReportDeposit reportDeposit = new ReportDeposit(); |
| | | reportDeposit.setPage(page); |
| | | reportDeposit.setRow(row); |
| | | reportDeposit.setConfigId(configId); |
| | | reportDeposit.setFeeId(feeId); |
| | | reportDeposit.setFeeStartTime(startTime); |
| | | reportDeposit.setFeeEndTime(endTime); |
| | | reportDeposit.setPayerObjType(payerObjType); |
| | | reportDeposit.setState(state); |
| | | reportDeposit.setDetailState(detailState); |
| | | reportDeposit.setCommunityId(communityId); |
| | | reportDeposit.setFloorId(floorId); |
| | | reportDeposit.setUnitId(unitId); |
| | | reportDeposit.setRoomNum(roomNum); |
| | | return getReportFeeMonthStatisticsBMOImpl.queryPayFeeDeposit(reportDeposit); |
| | | } |
| | | |
| | | /** |
| | | * 报修统计表 |
| | | * |
| | | * @param communityId 小区id |
| | |
| | | package com.java110.report.api; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.reportInfoAnswerValue.ReportInfoAnswerValueDto; |
| | | import com.java110.po.reportInfoAnswerValue.ReportInfoAnswerValuePo; |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/saveReportInfoAnswerValue", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveReportInfoAnswerValue(@RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> saveReportInfoAnswerValue(@RequestHeader(value = "user-id") String userId,@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "anValueId", "请求报文中未包含anValueId"); |
| | | Assert.hasKeyAndValue(reqJson, "userAnId", "请求报文中未包含userAnId"); |
| | |
| | | Assert.hasKeyAndValue(reqJson, "valueId", "请求报文中未包含valueId"); |
| | | Assert.hasKeyAndValue(reqJson, "valueContent", "请求报文中未包含valueContent"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKey(reqJson, "questionAnswerTitles", "未包含回答项"); |
| | | JSONArray questionAnswerTitles = reqJson.getJSONArray("questionAnswerTitles"); |
| | | |
| | | if (questionAnswerTitles == null || questionAnswerTitles.size() < 1) { |
| | | throw new IllegalArgumentException("未包含答案"); |
| | | } |
| | | JSONObject titleObj = null; |
| | | for (int questionAnswerTitleIndex = 0; questionAnswerTitleIndex < questionAnswerTitles.size(); questionAnswerTitleIndex++) { |
| | | titleObj = questionAnswerTitles.getJSONObject(questionAnswerTitleIndex); |
| | | Assert.hasKeyAndValue(titleObj, "valueContent", titleObj.getString("qaTitle") + ",未填写答案"); |
| | | } |
| | | |
| | | ReportInfoAnswerValuePo reportInfoAnswerValuePo = BeanConvertUtil.covertBean(reqJson, ReportInfoAnswerValuePo.class); |
| | | return saveReportInfoAnswerValueBMOImpl.save(reportInfoAnswerValuePo); |
| | | |
| | | return saveReportInfoAnswerValueBMOImpl.save(reportInfoAnswerValuePo,questionAnswerTitles); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryReportInfoAnswerValue", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryReportInfoAnswerValue(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "titleId") String titleId, |
| | | @RequestParam(value = "userName",required = false) String userName, |
| | | @RequestParam(value = "repName",required = false) String repName, |
| | | @RequestParam(value = "repTitle",required = false) String repTitle, |
| | | @RequestParam(value = "valueContent",required = false) String valueContent, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ReportInfoAnswerValueDto reportInfoAnswerValueDto = new ReportInfoAnswerValueDto(); |
| | | reportInfoAnswerValueDto.setPage(page); |
| | | reportInfoAnswerValueDto.setRow(row); |
| | | reportInfoAnswerValueDto.setCommunityId(communityId); |
| | | reportInfoAnswerValueDto.setTitleId(titleId); |
| | | reportInfoAnswerValueDto.setUserName(userName); |
| | | reportInfoAnswerValueDto.setRepName(repName); |
| | | reportInfoAnswerValueDto.setRepTitle(repTitle); |
| | | reportInfoAnswerValueDto.setValueContent(valueContent); |
| | | return getReportInfoAnswerValueBMOImpl.get(reportInfoAnswerValueDto); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.report.ReportDeposit; |
| | | import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> queryNoFeeRooms(RoomDto roomDto); |
| | | |
| | | /** |
| | | * 查询押金 |
| | | * @param reportDeposit |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> queryPayFeeDeposit(ReportDeposit reportDeposit); |
| | | } |
| | |
| | | package com.java110.report.bmo.reportFeeMonthStatistics.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.report.ReportDeposit; |
| | | import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto; |
| | | import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsTotalDto; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO; |
| | | import com.java110.report.bmo.reportFeeMonthStatistics.IGetReportFeeMonthStatisticsBMO; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | @Service("getReportFeeMonthStatisticsBMOImpl") |
| | |
| | | |
| | | @Autowired |
| | | private IReportFeeMonthStatisticsInnerServiceSMO reportFeeMonthStatisticsInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param reportFeeMonthStatisticsDto |
| | |
| | | Double allVacantHousingDiscount = 0.0; |
| | | //空置房减免(大计) |
| | | Double allVacantHousingReduction = 0.0; |
| | | int size = 0; |
| | | if (count > 0) { |
| | | //查询缴费明细 |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto); |
| | | if (reportFeeMonthStatisticsDtos != null && reportFeeMonthStatisticsDtos.size() > 0) { |
| | | //查询所有缴费明细记录 |
| | | ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto1 = BeanConvertUtil.covertBean(reportFeeMonthStatisticsDto, ReportFeeMonthStatisticsDto.class); |
| | | reportFeeMonthStatisticsDto1.setPage(PageDto.DEFAULT_PAGE); |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos1 = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto1); |
| | | size = reportFeeMonthStatisticsDtos1.size(); |
| | | } |
| | | //查询应收、实收总金额(大计) |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsList = reportFeeMonthStatisticsInnerServiceSMOImpl.queryAllPayFeeDetail(reportFeeMonthStatisticsDto); |
| | | //查询(优惠、减免、滞纳金、空置房打折、空置房减免金额等)大计总金额 |
| | |
| | | reportFeeMonthStatisticsTotalDto = new ReportFeeMonthStatisticsTotalDto(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportList, reportFeeMonthStatisticsTotalDto); |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) size / (double) reportFeeMonthStatisticsDto.getRow()), size, reportList, reportFeeMonthStatisticsTotalDto); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryPayFeeDeposit(ReportDeposit reportDeposit) { |
| | | //查询押金 |
| | | List<ReportDeposit> reportDeposits = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDeposit(reportDeposit); |
| | | //查询押金退费总金额 |
| | | List<ReportDeposit> reportDepositAmounts = reportFeeMonthStatisticsInnerServiceSMOImpl.queryFeeDepositAmount(reportDeposit); |
| | | |
| | | //查询押金费用项 |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setCommunityId(reportDeposit.getCommunityId()); |
| | | feeConfigDto.setFeeTypeCd("888800010006"); |
| | | List<FeeConfigDto> feeConfigDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | |
| | | List<ReportDeposit> newReportDeposits = new ArrayList<>(); |
| | | BigDecimal unpaidfeeAmount = new BigDecimal(0);//未交费 |
| | | BigDecimal unpaidfeeAmounts = new BigDecimal(0);//未缴费总金额 |
| | | BigDecimal paidfeeAmount = new BigDecimal(0);//已缴费 |
| | | BigDecimal paidfeeAmounts = new BigDecimal(0);//已缴费总金额 |
| | | BigDecimal refundedAmount = new BigDecimal(0);//已退费 |
| | | BigDecimal refundedAmounts = new BigDecimal(0);//已退费总金额 |
| | | BigDecimal refundInProgressAmount = new BigDecimal(0); //退费中 |
| | | BigDecimal refundInProgressAmounts = new BigDecimal(0);//退费中总金额 |
| | | BigDecimal refundFailedAmount = new BigDecimal(0); //退费失败 |
| | | BigDecimal refundFailedAmounts = new BigDecimal(0);//退费失败总金额 |
| | | for (ReportDeposit deposit : reportDeposits) { |
| | | deposit.setFeeConfigDtos(feeConfigDtos); |
| | | newReportDeposits.add(deposit); |
| | | if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(deposit.getPayerObjType())) { |
| | | deposit.setObjName(deposit.getFloorNum() |
| | | + "栋" + deposit.getUnitNum() |
| | | + "单元" + deposit.getRoomNum() + "室"); |
| | | } else if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(deposit.getPayerObjType())) { |
| | | deposit.setObjName(deposit.getCarNum()); |
| | | } |
| | | //收费中(未交费) |
| | | if ("2008001".equals(deposit.getState())) { |
| | | unpaidfeeAmount = unpaidfeeAmount.add(new BigDecimal(deposit.getAdditionalAmount())); |
| | | } |
| | | //收费结束(已收费) |
| | | if ("2009001".equals(deposit.getState()) && !StringUtil.isEmpty(deposit.getDetailState()) && "1400".equals(deposit.getDetailState())) { |
| | | paidfeeAmount = paidfeeAmount.add(new BigDecimal(deposit.getAdditionalAmount())); |
| | | } |
| | | if (!StringUtil.isEmpty(deposit.getDetailState()) && "1100".equals(deposit.getDetailState())) {//已退费 |
| | | refundedAmount = refundedAmount.add(new BigDecimal(deposit.getAdditionalAmount())); |
| | | } |
| | | if (!StringUtil.isEmpty(deposit.getDetailState()) && "1000".equals(deposit.getDetailState())) {//退费中 |
| | | refundInProgressAmount = refundInProgressAmount.add(new BigDecimal(deposit.getAdditionalAmount())); |
| | | } |
| | | if (!StringUtil.isEmpty(deposit.getDetailState()) && "1200".equals(deposit.getDetailState())) {//退费失败 |
| | | refundFailedAmount = refundFailedAmount.add(new BigDecimal(deposit.getAdditionalAmount())); |
| | | } |
| | | } |
| | | for (ReportDeposit reportDeposit1 : reportDepositAmounts) { |
| | | if (StringUtil.isEmpty(reportDeposit1.getAllAmount())) { |
| | | throw new IllegalArgumentException("查询总金额错误!"); |
| | | } |
| | | //获取总金额 |
| | | BigDecimal bd = new BigDecimal(reportDeposit1.getAllAmount()); |
| | | if (StringUtil.isEmpty(reportDeposit1.getDetailState())) { //获取未缴费总金额 |
| | | unpaidfeeAmounts = bd; |
| | | } else if (reportDeposit1.getDetailState().equals("1000")) { //获取退费中总金额 |
| | | refundInProgressAmounts = bd; |
| | | } else if (reportDeposit1.getDetailState().equals("1100")) { //获取已退费总金额 |
| | | refundedAmounts = bd; |
| | | } else if (reportDeposit1.getDetailState().equals("1200")) { //获取退费失败总金额 |
| | | refundFailedAmounts = bd; |
| | | } else if (reportDeposit1.getDetailState().equals("1400")) { //获取已缴费总金额 |
| | | paidfeeAmounts = bd; |
| | | } |
| | | } |
| | | HashMap<String, String> mp = new HashMap<>(); |
| | | mp.put("unpaidfeeAmount", unpaidfeeAmount.toString()); |
| | | mp.put("paidfeeAmount", paidfeeAmount.toString()); |
| | | mp.put("refundedAmount", refundedAmount.toString()); |
| | | mp.put("refundInProgressAmount", refundInProgressAmount.toString()); |
| | | mp.put("refundFailedAmount", refundFailedAmount.toString()); |
| | | mp.put("unpaidfeeAmounts", unpaidfeeAmounts.toString()); |
| | | mp.put("paidfeeAmounts", paidfeeAmounts.toString()); |
| | | mp.put("refundedAmounts", refundedAmounts.toString()); |
| | | mp.put("refundInProgressAmounts", refundInProgressAmounts.toString()); |
| | | mp.put("refundFailedAmounts", refundFailedAmounts.toString()); |
| | | int size = 0; |
| | | if (newReportDeposits != null && newReportDeposits.size() > 0) { |
| | | //查询所有条数 |
| | | reportDeposit.setPage(PageDto.DEFAULT_PAGE); |
| | | List<ReportDeposit> reportDeposits1 = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPayFeeDeposit(reportDeposit); |
| | | size = reportDeposits1.size(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) size / (double) reportDeposit.getRow()), size, newReportDeposits, mp); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryPrePayment(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPrePaymentNewCount(reportFeeMonthStatisticsDto); |
| | |
| | | package com.java110.report.bmo.reportInfoAnswerValue; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.java110.po.reportInfoAnswerValue.ReportInfoAnswerValuePo; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface ISaveReportInfoAnswerValueBMO { |
| | |
| | | * @param reportInfoAnswerValuePo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(ReportInfoAnswerValuePo reportInfoAnswerValuePo); |
| | | ResponseEntity<String> save(ReportInfoAnswerValuePo reportInfoAnswerValuePo, JSONArray questionAnswerTitles); |
| | | |
| | | |
| | | } |
| | |
| | | package com.java110.report.bmo.reportInfoAnswerValue.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.reportInfoSetting.ReportInfoSettingDto; |
| | | import com.java110.intf.report.IReportInfoAnswerValueInnerServiceSMO; |
| | | import com.java110.intf.report.IReportInfoSettingInnerServiceSMO; |
| | | import com.java110.po.reportInfoAnswer.ReportInfoAnswerPo; |
| | | import com.java110.po.reportInfoAnswerValue.ReportInfoAnswerValuePo; |
| | | import com.java110.po.userQuestionAnswer.UserQuestionAnswerPo; |
| | | import com.java110.report.bmo.reportInfoAnswerValue.ISaveReportInfoAnswerValueBMO; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("saveReportInfoAnswerValueBMOImpl") |
| | | public class SaveReportInfoAnswerValueBMOImpl implements ISaveReportInfoAnswerValueBMO { |
| | | |
| | | @Autowired |
| | | private IReportInfoAnswerValueInnerServiceSMO reportInfoAnswerValueInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IReportInfoSettingInnerServiceSMO reportInfoSettingInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(ReportInfoAnswerValuePo reportInfoAnswerValuePo) { |
| | | public ResponseEntity<String> save(ReportInfoAnswerValuePo reportInfoAnswerValuePo, JSONArray questionAnswerTitles) { |
| | | ReportInfoSettingDto reportInfoSettingDto = new ReportInfoSettingDto(); |
| | | reportInfoSettingDto.setCommunityId(reportInfoAnswerValuePo.getCommunityId()); |
| | | reportInfoSettingDto.setSettingId(reportInfoAnswerValuePo.getSettingId()); |
| | | List<ReportInfoSettingDto> reportInfoSettingDtos = reportInfoSettingInnerServiceSMOImpl.queryReportInfoSettings(reportInfoSettingDto); |
| | | Assert.listOnlyOne(reportInfoSettingDtos, "疫情问卷不存在"); |
| | | |
| | | |
| | | |
| | | /* JSONObject titleObj = null; |
| | | ReportInfoAnswerValuePo tmpUserUserQuestionAnswerValue = null; |
| | | List<ReportInfoAnswerValuePo> tmpUserUserQuestionAnswerValues = new ArrayList<>(); |
| | | ReportInfoAnswerPo userQuestionAnswerPo = new ReportInfoAnswerPo(); |
| | | if(StringUtil.isEmpty(userQuestionAnswerValuePo.getUserQaId()) || userQuestionAnswerValuePo.getUserQaId().startsWith("-")){ |
| | | userQuestionAnswerPo.setUserQaId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_userQaId)); |
| | | }else{ |
| | | userQuestionAnswerPo.setUserQaId(userQuestionAnswerValuePo.getUserQaId()); |
| | | } |
| | | for (int questionAnswerTitleIndex = 0; questionAnswerTitleIndex < questionAnswerTitles.size(); questionAnswerTitleIndex++) { |
| | | titleObj = questionAnswerTitles.getJSONObject(questionAnswerTitleIndex); |
| | | tmpUserUserQuestionAnswerValue = new ReportInfoAnswerValuePo(); |
| | | tmpUserUserQuestionAnswerValue.setAnswerType(userQuestionAnswerValuePo.getAnswerType()); |
| | | tmpUserUserQuestionAnswerValue.setObjId(userQuestionAnswerValuePo.getObjId()); |
| | | tmpUserUserQuestionAnswerValue.setObjType(userQuestionAnswerValuePo.getObjType()); |
| | | tmpUserUserQuestionAnswerValue.setPersonId(userQuestionAnswerValuePo.getPersonId()); |
| | | tmpUserUserQuestionAnswerValue.setQaId(userQuestionAnswerValuePo.getQaId()); |
| | | tmpUserUserQuestionAnswerValue.setScore("0"); |
| | | tmpUserUserQuestionAnswerValue.setTitleId(titleObj.getString("titleId")); |
| | | tmpUserUserQuestionAnswerValue.setUserQaId(userQuestionAnswerPo.getUserQaId()); |
| | | tmpUserUserQuestionAnswerValue.setUserTitleId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_userTitleId)); |
| | | if ("3003".equals(titleObj.getString("titleType"))) { |
| | | tmpUserUserQuestionAnswerValue.setValueId("999"); |
| | | tmpUserUserQuestionAnswerValue.setValueContent(titleObj.getString("valueContent")); |
| | | } else { |
| | | tmpUserUserQuestionAnswerValue.setValueId(titleObj.getString("valueContent")); |
| | | tmpUserUserQuestionAnswerValue.setValueContent(titleObj.getString("valueContent")); |
| | | } |
| | | tmpUserUserQuestionAnswerValues.add(tmpUserUserQuestionAnswerValue); |
| | | } |
| | | |
| | | int flag = userQuestionAnswerValueInnerServiceSMOImpl.saveUserQuestionAnswerValue(tmpUserUserQuestionAnswerValues); |
| | | if (flag < 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | //如果是领导 评价 直接返回 |
| | | String answerType = userQuestionAnswerValuePo.getAnswerType(); |
| | | |
| | | if("2003".equals(answerType)){ |
| | | userQuestionAnswerPo.setState("1202"); |
| | | userQuestionAnswerInnerServiceSMOImpl.updateUserQuestionAnswer(userQuestionAnswerPo); |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | userQuestionAnswerPo.setEvaluationScore("0"); |
| | | userQuestionAnswerPo.setObjId(userQuestionAnswerValuePo.getObjId()); |
| | | userQuestionAnswerPo.setObjType(userQuestionAnswerValuePo.getObjType()); |
| | | userQuestionAnswerPo.setPersonId(userQuestionAnswerValuePo.getPersonId()); |
| | | userQuestionAnswerPo.setQaId(userQuestionAnswerValuePo.getQaId()); |
| | | userQuestionAnswerPo.setScore("0"); |
| | | |
| | | if ("2002".equals(questionAnswerDtos.get(0).getQaType())) { |
| | | userQuestionAnswerPo.setState("1201"); |
| | | } else { |
| | | userQuestionAnswerPo.setState("1202"); |
| | | } |
| | | flag = userQuestionAnswerInnerServiceSMOImpl.saveUserQuestionAnswer(userQuestionAnswerPo); |
| | | if (flag < 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | |
| | | } |
| | | |
| | | */ |
| | | |
| | | |
| | | reportInfoAnswerValuePo.setAnValueId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_anValueId)); |
| | | int flag = reportInfoAnswerValueInnerServiceSMOImpl.saveReportInfoAnswerValue(reportInfoAnswerValuePo); |
| | |
| | | int queryNoFeeRoomsCount(Map beanCovertMap); |
| | | |
| | | List<Map> queryNoFeeRooms(Map beanCovertMap); |
| | | |
| | | List<Map> queryPayFeeDeposit(Map beanCovertMap); |
| | | |
| | | List<Map> queryFeeDepositAmount(Map beanCovertMap); |
| | | } |
| | |
| | | return roomInfos; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> queryPayFeeDeposit(Map info) { |
| | | logger.debug("查询押金统计信息 入参 info : {}", info); |
| | | |
| | | List<Map> deposits = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryPayFeeDeposit", info); |
| | | |
| | | return deposits; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> queryFeeDepositAmount(Map info) { |
| | | logger.debug("查询押金退费总金额信息 入参 info : {}", info); |
| | | |
| | | List<Map> deposits = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryFeeDepositAmount", info); |
| | | |
| | | return deposits; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.report.ReportDeposit; |
| | | import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto; |
| | | import com.java110.intf.report.IReportFeeMonthStatisticsInnerServiceSMO; |
| | | import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo; |
| | |
| | | return rooms; |
| | | } |
| | | |
| | | @Override |
| | | public List<ReportDeposit> queryPayFeeDeposit(@RequestBody ReportDeposit reportDeposit) { |
| | | int page = reportDeposit.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | reportDeposit.setPage((page - 1) * reportDeposit.getRow()); |
| | | } |
| | | List<ReportDeposit> deposits = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.queryPayFeeDeposit(BeanConvertUtil.beanCovertMap(reportDeposit)), |
| | | ReportDeposit.class); |
| | | return deposits; |
| | | } |
| | | |
| | | @Override |
| | | public List<ReportDeposit> queryFeeDepositAmount(@RequestBody ReportDeposit reportDeposit) { |
| | | List<ReportDeposit> deposits = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.queryFeeDepositAmount(BeanConvertUtil.beanCovertMap(reportDeposit)), |
| | | ReportDeposit.class); |
| | | return deposits; |
| | | } |
| | | |
| | | public IReportFeeMonthStatisticsServiceDao getReportFeeMonthStatisticsServiceDaoImpl() { |
| | | return reportFeeMonthStatisticsServiceDaoImpl; |
| | |
| | | BigDecimal nowQuantity = new BigDecimal(purchaseApplyDetailPo.getPurchaseQuantity()); //获取出库数量 |
| | | BigDecimal nowMiniStock = nowQuantity.multiply(oldMiniUnitStock); //计算当前出库的最小计量总数 |
| | | BigDecimal surplusMiniStock = oldMiniStock.subtract(nowMiniStock); |
| | | if (surplusMiniStock.compareTo(BigDecimal.ZERO) == -1) { |
| | | throw new IllegalArgumentException("物品库存已经不足,请确认物品库存!"); |
| | | } |
| | | resourceStorePo.setMiniStock(String.valueOf(surplusMiniStock)); |
| | | resourceStoreInnerServiceSMOImpl.updateResourceStore(resourceStorePo); |
| | | //查询资源 |
| | |
| | | @RequestMapping(value = "/resourceEnter", method = RequestMethod.POST) |
| | | public ResponseEntity<String> resourceEnter(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "applyOrderId", "订单ID为空"); |
| | | PurchaseApplyDto purchaseApplyDto = new PurchaseApplyDto(); |
| | | purchaseApplyDto.setApplyOrderId(reqJson.getString("applyOrderId")); |
| | | purchaseApplyDto.setStatusCd("0"); |
| | | List<PurchaseApplyDto> purchaseApplyDtoList = purchaseApplyInnerServiceSMOImpl.queryPurchaseApplys(purchaseApplyDto); |
| | | if(purchaseApplyDtoList!=null && PurchaseApplyDto.STATE_AUDITED.equals(purchaseApplyDtoList.get(0).getState())){ |
| | | throw new IllegalArgumentException("该订单已经处理,请刷新确认订单状态!"); |
| | | } |
| | | JSONArray purchaseApplyDetails = reqJson.getJSONArray("purchaseApplyDetailVo"); |
| | | List<PurchaseApplyDetailPo> purchaseApplyDetailPos = new ArrayList<>(); |
| | | for (int detailIndex = 0; detailIndex < purchaseApplyDetails.size(); detailIndex++) { |
| | |
| | | auditOrders = new ArrayList<>(); |
| | | } |
| | | |
| | | |
| | | |
| | | return ResultVo.createResponseEntity((int) Math.ceil((double) count / (double) auditUser.getRow()),(int) count,auditOrders); |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | BigDecimal applyQuantity = purchaseQuantity.multiply(miniUnitStock1); |
| | | //计算物品领用后剩余的最小计量总数 |
| | | BigDecimal newMiniStock = miniStock1.subtract(applyQuantity); |
| | | if (newMiniStock.compareTo(BigDecimal.ZERO) == -1) { |
| | | throw new IllegalArgumentException("物品库存已经不足,请确认物品库存!"); |
| | | } |
| | | resourceStorePo.setMiniStock(String.valueOf(newMiniStock)); |
| | | resourceStoreInnerServiceSMOImpl.updateResourceStore(resourceStorePo); |
| | | ResourceStoreDto resourceStoreDto = new ResourceStoreDto(); |