| | |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | //积分账户最大使用积分 |
| | | private String maximumNumber; |
| | | |
| | | //积分账户抵扣比例 |
| | | private String deductionProportion; |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | |
| | | public void setObjType(String objType) { |
| | | this.objType = objType; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | |
| | | public void setAcctIds(String[] acctIds) { |
| | | this.acctIds = acctIds; |
| | | } |
| | | |
| | | public String getMaximumNumber() { |
| | | return maximumNumber; |
| | | } |
| | | |
| | | public void setMaximumNumber(String maximumNumber) { |
| | | this.maximumNumber = maximumNumber; |
| | | } |
| | | |
| | | public String getDeductionProportion() { |
| | | return deductionProportion; |
| | | } |
| | | |
| | | public void setDeductionProportion(String deductionProportion) { |
| | | this.deductionProportion = deductionProportion; |
| | | } |
| | | } |
| | |
| | | package com.java110.dto.fee; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.feeAccountDetail.FeeAccountDetailDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | |
| | | private String ardId; |
| | | private String[] states; |
| | | |
| | | private List<FeeAccountDetailDto> feeAccountDetailDtoList; |
| | | |
| | | private String fadState; |
| | | private String fadStateName; |
| | | private String amount; |
| | | |
| | | public String getPrimeRate() { |
| | | return primeRate; |
| | |
| | | public void setStates(String[] states) { |
| | | this.states = states; |
| | | } |
| | | |
| | | public String getFadState() { |
| | | return fadState; |
| | | } |
| | | |
| | | public void setFadState(String fadState) { |
| | | this.fadState = fadState; |
| | | } |
| | | |
| | | public String getFadStateName() { |
| | | return fadStateName; |
| | | } |
| | | |
| | | public void setFadStateName(String fadStateName) { |
| | | this.fadStateName = fadStateName; |
| | | } |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public List<FeeAccountDetailDto> getFeeAccountDetailDtoList() { |
| | | return feeAccountDetailDtoList; |
| | | } |
| | | |
| | | public void setFeeAccountDetailDtoList(List<FeeAccountDetailDto> feeAccountDetailDtoList) { |
| | | this.feeAccountDetailDtoList = feeAccountDetailDtoList; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto.feeAccountDetail; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class FeeAccountDetailDto extends PageDto implements Serializable { |
| | | |
| | | private String fadId; |
| | | |
| | | private String detailId; |
| | | |
| | | private String communityId; |
| | | |
| | | private String createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | private String state; |
| | | |
| | | private String stateName; |
| | | |
| | | private String amount; |
| | | |
| | | public String getFadId() { |
| | | return fadId; |
| | | } |
| | | |
| | | public void setFadId(String fadId) { |
| | | this.fadId = fadId; |
| | | } |
| | | |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | | |
| | | public void setDetailId(String detailId) { |
| | | this.detailId = detailId; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(String createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getStateName() { |
| | | return stateName; |
| | | } |
| | | |
| | | public void setStateName(String stateName) { |
| | | this.stateName = stateName; |
| | | } |
| | | } |
| | |
| | | public static final String CMD_UPDATE_ATTENDANCE_CLASSES = "912"; |
| | | public static final String CMD_DELETE_ATTENDANCE_CLASSES = "913"; |
| | | |
| | | public static final String CMD_ADD_VISIT = "921"; |
| | | |
| | | public static final String CMD_OPEN_DOOR = "5"; |
| | | |
| | | //小区信息 |
| | |
| | | package com.java110.dto.menuUser; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | |
| | | public class MenuUserDto extends PageDto implements Serializable { |
| | | |
| | | private String muId; |
| | | private String name; |
| | | private String icon; |
| | | private String mId; |
| | | private String staffId; |
| | | private String url; |
| | | private String seq; |
| | | |
| | | private String name; |
| | | private String icon; |
| | | private String mId; |
| | | private String staffId; |
| | | private String url; |
| | | private String seq; |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getMuId() { |
| | | return muId; |
| | | } |
| | | public void setMuId(String muId) { |
| | | |
| | | public void setMuId(String muId) { |
| | | this.muId = muId; |
| | | } |
| | | public String getName() { |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | public void setName(String name) { |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | public String getIcon() { |
| | | |
| | | public String getIcon() { |
| | | return icon; |
| | | } |
| | | public void setIcon(String icon) { |
| | | |
| | | public void setIcon(String icon) { |
| | | this.icon = icon; |
| | | } |
| | | public String getMId() { |
| | | |
| | | public String getMId() { |
| | | return mId; |
| | | } |
| | | public void setMId(String mId) { |
| | | |
| | | public void setMId(String mId) { |
| | | this.mId = mId; |
| | | } |
| | | public String getStaffId() { |
| | | |
| | | public String getStaffId() { |
| | | return staffId; |
| | | } |
| | | public void setStaffId(String staffId) { |
| | | |
| | | public void setStaffId(String staffId) { |
| | | this.staffId = staffId; |
| | | } |
| | | public String getUrl() { |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | public void setUrl(String url) { |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | public String getSeq() { |
| | | |
| | | public String getSeq() { |
| | | return seq; |
| | | } |
| | | public void setSeq(String seq) { |
| | | |
| | | public void setSeq(String seq) { |
| | | this.seq = seq; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | |
| | | package com.java110.dto.owner; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.RoomAttrDto; |
| | | import com.java110.dto.ownerCarAttr.OwnerCarAttrDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | |
| | | private String unitNum; |
| | | private String roomNum; |
| | | private String oweAmount; |
| | | |
| | | private List<OwnerCarAttrDto> ownerCarAttrDto; |
| | | |
| | | |
| | | public String getCarColor() { |
| | |
| | | public void setOweAmount(String oweAmount) { |
| | | this.oweAmount = oweAmount; |
| | | } |
| | | |
| | | public List<OwnerCarAttrDto> getOwnerCarAttrDto() { |
| | | return ownerCarAttrDto; |
| | | } |
| | | |
| | | public void setOwnerCarAttrDto(List<OwnerCarAttrDto> ownerCarAttrDto) { |
| | | this.ownerCarAttrDto = ownerCarAttrDto; |
| | | } |
| | | } |
| | |
| | | private String value; |
| | | private String memberId; |
| | | private String carId; |
| | | private String valueName; |
| | | private String specName; |
| | | private String listShow; |
| | | |
| | | private Date createTime; |
| | | |
| | |
| | | public void setCarId(String carId) { |
| | | this.carId = carId; |
| | | } |
| | | |
| | | public String getValueName() { |
| | | return valueName; |
| | | } |
| | | |
| | | public void setValueName(String valueName) { |
| | | this.valueName = valueName; |
| | | } |
| | | |
| | | public String getSpecName() { |
| | | return specName; |
| | | } |
| | | |
| | | public void setSpecName(String specName) { |
| | | this.specName = specName; |
| | | } |
| | | |
| | | public String getListShow() { |
| | | return listShow; |
| | | } |
| | | |
| | | public void setListShow(String listShow) { |
| | | this.listShow = listShow; |
| | | } |
| | | } |
| | |
| | | **/ |
| | | public class StoreDto extends PageDto implements Serializable { |
| | | |
| | | |
| | | //运营团队store_id |
| | | public static final String STORE_ADMIN = "400000000000000001"; |
| | | |
| | |
| | | private String corporation; |
| | | private String foundingTime; |
| | | private String state; |
| | | |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | |
| | | private String vName; |
| | | private String visitGender; |
| | | private String ownerId; |
| | | private String ownerName; |
| | | private String userId; |
| | | private String vId; |
| | | private String visitTime; |
| | |
| | | private String communityId; |
| | | private String bId; |
| | | private String visitStartTime; |
| | | private String freeTime; |
| | | private String visitEndTime; |
| | | private String departureEndTime; |
| | | private String statusCd = "0"; |
| | | private String carNum; |
| | | private String entourage; |
| | |
| | | private String createTime; |
| | | private String sameDay; |
| | | private String carNumNoEmpty; |
| | | private String psId; |
| | | private String recordState; |
| | | private String parkingAreaName; |
| | | private String parkingSpaceNum; |
| | | private String flag; |
| | | private String fileRelName; |
| | | private String fileSaveName; |
| | | |
| | | public String getvName() { |
| | | return vName; |
| | |
| | | public void setCarNumNoEmpty(String carNumNoEmpty) { |
| | | this.carNumNoEmpty = carNumNoEmpty; |
| | | } |
| | | |
| | | public String getPsId() { |
| | | return psId; |
| | | } |
| | | |
| | | public void setPsId(String psId) { |
| | | this.psId = psId; |
| | | } |
| | | |
| | | public String getFreeTime() { |
| | | return freeTime; |
| | | } |
| | | |
| | | public void setFreeTime(String freeTime) { |
| | | this.freeTime = freeTime; |
| | | } |
| | | |
| | | public String getRecordState() { |
| | | return recordState; |
| | | } |
| | | |
| | | public void setRecordState(String recordState) { |
| | | this.recordState = recordState; |
| | | } |
| | | |
| | | public String getParkingAreaName() { |
| | | return parkingAreaName; |
| | | } |
| | | |
| | | public void setParkingAreaName(String parkingAreaName) { |
| | | this.parkingAreaName = parkingAreaName; |
| | | } |
| | | |
| | | public String getParkingSpaceNum() { |
| | | return parkingSpaceNum; |
| | | } |
| | | |
| | | public void setParkingSpaceNum(String parkingSpaceNum) { |
| | | this.parkingSpaceNum = parkingSpaceNum; |
| | | } |
| | | |
| | | public String getFlag() { |
| | | return flag; |
| | | } |
| | | |
| | | public void setFlag(String flag) { |
| | | this.flag = flag; |
| | | } |
| | | |
| | | public String getDepartureEndTime() { |
| | | return departureEndTime; |
| | | } |
| | | |
| | | public void setDepartureEndTime(String departureEndTime) { |
| | | this.departureEndTime = departureEndTime; |
| | | } |
| | | |
| | | public String getOwnerName() { |
| | | return ownerName; |
| | | } |
| | | |
| | | public void setOwnerName(String ownerName) { |
| | | this.ownerName = ownerName; |
| | | } |
| | | |
| | | public String getFileRelName() { |
| | | return fileRelName; |
| | | } |
| | | |
| | | public void setFileRelName(String fileRelName) { |
| | | this.fileRelName = fileRelName; |
| | | } |
| | | |
| | | public String getFileSaveName() { |
| | | return fileSaveName; |
| | | } |
| | | |
| | | public void setFileSaveName(String fileSaveName) { |
| | | this.fileSaveName = fileSaveName; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.po.feeAccountDetail; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class FeeAccountDetailPo implements Serializable { |
| | | |
| | | private String fadId; |
| | | |
| | | private String detailId; |
| | | |
| | | private String communityId; |
| | | |
| | | private String createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | private String state; |
| | | |
| | | private String amount; |
| | | |
| | | public String getFadId() { |
| | | return fadId; |
| | | } |
| | | |
| | | public void setFadId(String fadId) { |
| | | this.fadId = fadId; |
| | | } |
| | | |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | | |
| | | public void setDetailId(String detailId) { |
| | | this.detailId = detailId; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(String createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | } |
| | |
| | | private String ownerId; |
| | | private String visitCase; |
| | | private String visitTime; |
| | | private String freeTime; |
| | | private String departureTime; |
| | | private String statusCd; |
| | | private String statusCd = "0"; |
| | | private String carNum; |
| | | private String entourage; |
| | | private String reasonType; |
| | | private String state; |
| | | private String stateName; |
| | | private String stateRemark; |
| | | private String psId; |
| | | private String flag; |
| | | private String recordState; |
| | | |
| | | public String getvId() { |
| | | return vId; |
| | |
| | | public void setStateRemark(String stateRemark) { |
| | | this.stateRemark = stateRemark; |
| | | } |
| | | |
| | | public String getPsId() { |
| | | return psId; |
| | | } |
| | | |
| | | public void setPsId(String psId) { |
| | | this.psId = psId; |
| | | } |
| | | |
| | | public String getFlag() { |
| | | return flag; |
| | | } |
| | | |
| | | public void setFlag(String flag) { |
| | | this.flag = flag; |
| | | } |
| | | |
| | | public String getFreeTime() { |
| | | return freeTime; |
| | | } |
| | | |
| | | public void setFreeTime(String freeTime) { |
| | | this.freeTime = freeTime; |
| | | } |
| | | |
| | | public String getRecordState() { |
| | | return recordState; |
| | | } |
| | | |
| | | public void setRecordState(String recordState) { |
| | | this.recordState = recordState; |
| | | } |
| | | } |
| | |
| | | private String value; |
| | | private String memberId; |
| | | private String carId; |
| | | private String bId; |
| | | |
| | | public String getAttrId() { |
| | | return attrId; |
| | |
| | | public void setCarId(String carId) { |
| | | this.carId = carId; |
| | | } |
| | | |
| | | public String getbId() { |
| | | return bId; |
| | | } |
| | | |
| | | public void setbId(String bId) { |
| | | this.bId = bId; |
| | | } |
| | | } |
| | |
| | | private String address; |
| | | private String tel; |
| | | private String storeTypeCd; |
| | | private String nearbyLandmarks; |
| | | private String nearByLandmarks; |
| | | private String mapX; |
| | | private String mapY; |
| | | private String state; |
| | |
| | | this.storeTypeCd = storeTypeCd; |
| | | } |
| | | |
| | | public String getNearbyLandmarks() { |
| | | return nearbyLandmarks; |
| | | public String getNearByLandmarks() { |
| | | return nearByLandmarks; |
| | | } |
| | | |
| | | public void setNearbyLandmarks(String nearbyLandmarks) { |
| | | this.nearbyLandmarks = nearbyLandmarks; |
| | | public void setNearByLandmarks(String nearByLandmarks) { |
| | | this.nearByLandmarks = nearByLandmarks; |
| | | } |
| | | |
| | | public String getMapX() { |
| | |
| | | package com.java110.vo.api; |
| | | |
| | | import com.java110.dto.feeAccountDetail.FeeAccountDetailDto; |
| | | import com.java110.vo.Vo; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName ApiFeeVo |
| | |
| | | * add by wuxw 2019/6/2 |
| | | **/ |
| | | public class ApiFeeDetailDataVo extends Vo { |
| | | |
| | | |
| | | private String primeRate; |
| | | private String detailId; |
| | | private String receivableAmount; |
| | |
| | | private String receivedAmount; |
| | | private String communityId; |
| | | private String feeId; |
| | | |
| | | |
| | | private String createTime; |
| | | private String state; |
| | |
| | | private Date preReadingTime; |
| | | private Date curReadingTime; |
| | | |
| | | private List<FeeAccountDetailDto> feeAccountDetailDtoList; |
| | | |
| | | private String fadState; |
| | | private String fadStateName; |
| | | private String amount; |
| | | |
| | | public String getPrimeRate() { |
| | | return primeRate; |
| | |
| | | public void setFeeId(String feeId) { |
| | | this.feeId = feeId; |
| | | } |
| | | |
| | | |
| | | public String getCreateTime() { |
| | | return createTime; |
| | |
| | | public void setCurReadingTime(Date curReadingTime) { |
| | | this.curReadingTime = curReadingTime; |
| | | } |
| | | |
| | | public String getFadState() { |
| | | return fadState; |
| | | } |
| | | |
| | | public void setFadState(String fadState) { |
| | | this.fadState = fadState; |
| | | } |
| | | |
| | | public String getFadStateName() { |
| | | return fadStateName; |
| | | } |
| | | |
| | | public void setFadStateName(String fadStateName) { |
| | | this.fadStateName = fadStateName; |
| | | } |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(String amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public List<FeeAccountDetailDto> getFeeAccountDetailDtoList() { |
| | | return feeAccountDetailDtoList; |
| | | } |
| | | |
| | | public void setFeeAccountDetailDtoList(List<FeeAccountDetailDto> feeAccountDetailDtoList) { |
| | | this.feeAccountDetailDtoList = feeAccountDetailDtoList; |
| | | } |
| | | } |
| | |
| | | private String userId; |
| | | private String communityId; |
| | | private String ownerId; |
| | | private String ownerName; |
| | | private String visitCase; |
| | | private String visitTime; |
| | | private String freeTime; |
| | | private String departureTime; |
| | | private String createTime; |
| | | private String statusCd = "0"; |
| | |
| | | private String reasonType; |
| | | private String state; |
| | | private String stateName; |
| | | private String psId; |
| | | private String parkingAreaName; |
| | | private String parkingSpaceNum; |
| | | private String recordState; |
| | | private String stateRemark; |
| | | private String fileRelName; |
| | | private String fileSaveName; |
| | | private String url; |
| | | |
| | | public String getvId() { |
| | | return vId; |
| | |
| | | public void setStateName(String stateName) { |
| | | this.stateName = stateName; |
| | | } |
| | | |
| | | public String getPsId() { |
| | | return psId; |
| | | } |
| | | |
| | | public void setPsId(String psId) { |
| | | this.psId = psId; |
| | | } |
| | | |
| | | public String getFreeTime() { |
| | | return freeTime; |
| | | } |
| | | |
| | | public void setFreeTime(String freeTime) { |
| | | this.freeTime = freeTime; |
| | | } |
| | | |
| | | public String getRecordState() { |
| | | return recordState; |
| | | } |
| | | |
| | | public void setRecordState(String recordState) { |
| | | this.recordState = recordState; |
| | | } |
| | | |
| | | public String getParkingAreaName() { |
| | | return parkingAreaName; |
| | | } |
| | | |
| | | public void setParkingAreaName(String parkingAreaName) { |
| | | this.parkingAreaName = parkingAreaName; |
| | | } |
| | | |
| | | public String getParkingSpaceNum() { |
| | | return parkingSpaceNum; |
| | | } |
| | | |
| | | public void setParkingSpaceNum(String parkingSpaceNum) { |
| | | this.parkingSpaceNum = parkingSpaceNum; |
| | | } |
| | | |
| | | public String getStateRemark() { |
| | | return stateRemark; |
| | | } |
| | | |
| | | public void setStateRemark(String stateRemark) { |
| | | this.stateRemark = stateRemark; |
| | | } |
| | | |
| | | public String getOwnerName() { |
| | | return ownerName; |
| | | } |
| | | |
| | | public void setOwnerName(String ownerName) { |
| | | this.ownerName = ownerName; |
| | | } |
| | | |
| | | public String getFileRelName() { |
| | | return fileRelName; |
| | | } |
| | | |
| | | public void setFileRelName(String fileRelName) { |
| | | this.fileRelName = fileRelName; |
| | | } |
| | | |
| | | public String getFileSaveName() { |
| | | return fileSaveName; |
| | | } |
| | | |
| | | public void setFileSaveName(String fileSaveName) { |
| | | this.fileSaveName = fileSaveName; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | } |
| | |
| | | public static final String CODE_PREFIX_propertyUserId = "93"; |
| | | public static final String CODE_PREFIX_propertyFeeId = "94"; |
| | | public static final String CODE_PREFIX_houseId = "95"; |
| | | public static final String CODE_PREFIX_fadId = "96"; |
| | | public static final String CODE_PREFIX_pgId = "600"; |
| | | |
| | | public static final String CODE_PREFIX_floorId = "73"; |
| | |
| | | |
| | | <!-- 查询报修回访信息 add by wuxw 2018-07-03 --> |
| | | <select id="getRepairReturnVisitInfo" parameterType="Map" resultType="Map"> |
| | | select t.visit_id,t.visit_id visitId,t.context,t.repair_id |
| | | statusCd,t.community_id,t.community_id communityId,t.visit_person_name,t.visit_person_name |
| | | select t.visit_id,t.visit_id visitId,t.context,t.community_id,t.community_id communityId,t.visit_person_name,t.visit_person_name |
| | | visitPersonName,t.visit_person_id,t.visit_person_id visitPersonId,t.visit_type,t.visit_type visitType, |
| | | rrp.repair_id repairId,rrp.repair_obj_name repairObjName,rs.repair_type_name repairTypeName,rrp.tel,rrp.repair_name repairName, |
| | | rrp.appointment_time appointmentTime |
| | |
| | | <insert id="saveBusinessVisitInfo" parameterType="Map"> |
| | | insert into business_visit_info(departure_time, v_name, visit_gender, owner_id, user_id, v_id, phone_number, |
| | | operate, visit_case, community_id, b_id, visit_time, car_num, entourage, |
| | | reason_type, state, state_remark) |
| | | reason_type, state, state_remark, ps_id, free_time, record_state) |
| | | values (#{departureTime}, #{vName}, #{visitGender}, #{ownerId}, #{userId}, #{vId}, #{phoneNumber}, #{operate}, |
| | | #{visitCase}, #{communityId}, #{bId}, #{visitTime}, #{carNum}, #{entourage}, #{reasonType}, #{state}, |
| | | #{stateRemark}) |
| | | #{stateRemark}, #{psId}, #{freeTime}, #{recordState}) |
| | | </insert> |
| | | |
| | | <!-- 查询访客信息信息(Business) add by wuxw 2018-07-03 --> |
| | |
| | | visitTime,t.phone_number,t.phone_number phoneNumber,t.operate,t.visit_case,t.visit_case |
| | | visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id ,t.car_num,t.car_num carNum,t.entourage, |
| | | t.reason_type,t.reason_type reasonType,t.state,t.state_remark,t.state_remark |
| | | stateRemark,t.create_time,t.create_time createTime |
| | | stateRemark,t.create_time,t.create_time createTime,t.ps_id,t.ps_id psId,t.free_time,t.free_time freeTime, |
| | | t.record_state,t.record_state recordState |
| | | from business_visit_info t |
| | | where 1 =1 |
| | | <if test="departureTime !=null "> |
| | |
| | | <if test="visitTime !=null "> |
| | | and t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="freeTime !=null "> |
| | | and t.free_time= #{freeTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | | and t.phone_number= #{phoneNumber} |
| | | </if> |
| | |
| | | <if test="reasonType !=null and reasonType != ''"> |
| | | and t.reason_type= #{reasonType} |
| | | </if> |
| | | <if test="recordState !=null and recordState != ''"> |
| | | and t.record_state= #{recordState} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="stateRemark !=null and stateRemark != ''"> |
| | | and t.state_remark= #{stateRemark} |
| | | </if> |
| | | <if test="psId !=null and psId != ''"> |
| | | and t.ps_id= #{psId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | <insert id="saveVisitInfoInstance" parameterType="Map"> |
| | | insert into s_visit_info( |
| | | departure_time,v_name,status_cd,visit_gender,owner_id,user_id,v_id,visit_time,phone_number,visit_case,community_id,b_id,car_num, |
| | | entourage,reason_type,state,state_remark |
| | | entourage,reason_type,state,state_remark,ps_id,free_time,record_state |
| | | ) select |
| | | t.departure_time,t.v_name,'0',t.visit_gender,t.owner_id,t.user_id,t.v_id,t.visit_time,t.phone_number,t.visit_case,t.community_id,t.b_id, |
| | | t.car_num,t.entourage,t.reason_type,t.state,t.state_remark |
| | | t.car_num,t.entourage,t.reason_type,t.state,t.state_remark,t.ps_id,t.free_time,t.record_state |
| | | from business_visit_info t where 1=1 |
| | | <if test="departureTime !=null "> |
| | | and t.departure_time= #{departureTime} |
| | |
| | | <if test="visitTime !=null "> |
| | | and t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="freeTime !=null "> |
| | | and t.free_time= #{freeTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | | and t.phone_number= #{phoneNumber} |
| | | </if> |
| | |
| | | <if test="reasonType !=null and reasonType != ''"> |
| | | and t.reason_type= #{reasonType} |
| | | </if> |
| | | <if test="recordState !=null and recordState != ''"> |
| | | and t.record_state= #{recordState} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="stateRemark !=null and stateRemark != ''"> |
| | | and t.state_remark= #{stateRemark} |
| | | </if> |
| | | <if test="psId !=null and psId != ''"> |
| | | and t.ps_id= #{psId} |
| | | </if> |
| | | and t.operate= 'ADD' |
| | | <if test="visitCase !=null and visitCase != ''"> |
| | |
| | | phoneNumber,t.visit_case,t.visit_case visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id bId, |
| | | t.car_num,t.car_num carNum,t.entourage,t.reason_type,t.reason_type |
| | | reasonType,t.state,t.state_remark,t.state_remark stateRemark,td.name stateName,t.create_time, |
| | | t.create_time createTime |
| | | t.create_time createTime,t.ps_id,t.ps_id psId,t.free_time,t.free_time freeTime, |
| | | t.record_state,t.record_state recordState,ps.num parkingSpaceNum,pa.num parkingAreaName,bo.name ownerName, |
| | | fr.file_real_name fileRealName,fr.file_save_name fileSaveName |
| | | from s_visit_info t |
| | | left join t_dict td on t.state = td.status_cd and td.table_name = 's_visit_info' and td.table_columns = 'state' |
| | | where 1 =1 |
| | | left join parking_space ps on t.ps_id = ps.ps_id and ps.status_cd = '0' |
| | | left join parking_area pa on ps.pa_id = pa.pa_id and pa.status_cd = '0' |
| | | left join building_owner bo on t.owner_id = bo.owner_id and bo.owner_type_cd = '1001' and bo.status_cd = '0' |
| | | left join file_rel fr on fr.obj_id = t.v_id and fr.status_cd = '0' |
| | | where 1 = 1 |
| | | <if test="departureTime !=null "> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | |
| | | <if test="visitTime !=null "> |
| | | and t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="freeTime !=null "> |
| | | and t.free_time= #{freeTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | | and t.phone_number= #{phoneNumber} |
| | | </if> |
| | |
| | | <if test="visitEndTime !=null and visitEndTime !='' "> |
| | | and t.visit_time <= #{visitEndTime} |
| | | </if> |
| | | <if test="departureEndTime != null and departureEndTime != ''"> |
| | | and t.departure_time <= #{departureEndTime} |
| | | </if> |
| | | <if test="carNum !=null and carNum != ''"> |
| | | and t.car_num= #{carNum} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="reasonType !=null and reasonType != ''"> |
| | | and t.reason_type= #{reasonType} |
| | | </if> |
| | | <if test="recordState !=null and recordState != ''"> |
| | | and t.record_state= #{recordState} |
| | | </if> |
| | | <if test="psId !=null and psId != ''"> |
| | | and t.ps_id= #{psId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | |
| | | </if> |
| | | <if test="sameDay !=null and sameDay != ''"> |
| | | and TO_DAYS(t.create_time) = TO_DAYS(NOW()) |
| | | </if> |
| | | <if test="flag != null and flag == '1'"> |
| | | and t.ps_id != '' and t.ps_id != '-1' and t.ps_id is not null |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | <if test="visitTime !=null "> |
| | | , t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="freeTime !=null "> |
| | | , t.free_time= #{freeTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | | , t.phone_number= #{phoneNumber} |
| | | </if> |
| | |
| | | <if test="reasonType !=null and reasonType != ''"> |
| | | , t.reason_type= #{reasonType} |
| | | </if> |
| | | <if test="recordState !=null and recordState != ''"> |
| | | , t.record_state= #{recordState} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="stateRemark !=null and stateRemark != ''"> |
| | | , t.state_remark= #{stateRemark} |
| | | </if> |
| | | <if test="psId !=null and psId != ''"> |
| | | , t.ps_id= #{psId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="vId !=null and vId != ''"> |
| | |
| | | <select id="queryVisitsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from s_visit_info t |
| | | where 1 =1 |
| | | left join t_dict td on t.state = td.status_cd and td.table_name = 's_visit_info' and td.table_columns = 'state' |
| | | left join parking_space ps on t.ps_id = ps.ps_id and ps.status_cd = '0' |
| | | left join parking_area pa on ps.pa_id = pa.pa_id and pa.status_cd = '0' |
| | | left join building_owner bo on t.owner_id = bo.owner_id and bo.owner_type_cd = '1001' and bo.status_cd = '0' |
| | | left join file_rel fr on fr.obj_id = t.v_id and fr.status_cd = '0' |
| | | where 1 = 1 |
| | | <if test="departureTime !=null "> |
| | | and t.departure_time= #{departureTime} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="visitTime !=null "> |
| | | and t.visit_time= #{visitTime} |
| | | </if> |
| | | <if test="freeTime !=null "> |
| | | and t.free_time= #{freeTime} |
| | | </if> |
| | | <if test="phoneNumber !=null and phoneNumber != ''"> |
| | | and t.phone_number= #{phoneNumber} |
| | |
| | | <if test="reasonType !=null and reasonType != ''"> |
| | | and t.reason_type= #{reasonType} |
| | | </if> |
| | | <if test="recordState !=null and recordState != ''"> |
| | | and t.record_state= #{recordState} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="stateRemark !=null and stateRemark != ''"> |
| | | and t.state_remark= #{stateRemark} |
| | | </if> |
| | | <if test="psId !=null and psId != ''"> |
| | | and t.ps_id= #{psId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="feeAccountDetailServiceDaoImpl"> |
| | | |
| | | <!-- 查询费用明细信息 add by wuxw 2018-07-03 --> |
| | | <select id="getFeeAccountDetailInfo" parameterType="Map" resultType="Map"> |
| | | select |
| | | t.fad_id,t.fad_id fadId, |
| | | t.detail_id,t.detail_id detailId, |
| | | t.community_id,t.community_id communityId, |
| | | t.state,t.amount,td.name stateName |
| | | from fee_account_detail t |
| | | left join t_dict td on t.state = td.status_cd and td.table_name = 'fee_account_detail' and td.table_columns = 'state' |
| | | where 1 = 1 |
| | | <if test="fadId != null and fadId != ''"> |
| | | and t.fadId = #{fadId} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </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 --> |
| | | <select id="queryFeeAccountDetailsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from fee_account_detail t |
| | | where 1 =1 |
| | | <if test="fadId != null and fadId != ''"> |
| | | and t.fadId = #{fadId} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 保存费用明细信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeAccountDetail" parameterType="Map"> |
| | | insert into fee_account_detail( |
| | | fad_id,detail_id,community_id,state,amount |
| | | <if test="createTime != null and createTime != ''"> |
| | | ,create_time |
| | | </if> |
| | | ) |
| | | values(#{fadId},#{detailId},#{communityId},#{state},#{amount} |
| | | <if test="createTime != null and createTime != ''"> |
| | | ,#{createTime} |
| | | </if> |
| | | ) |
| | | </insert> |
| | | |
| | | </mapper> |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | <!-- 保存商户信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessStoreInfo" parameterType="Map"> |
| | | insert into |
| | | business_store(store_id,b_id,user_id,name,address,tel,store_type_cd,nearby_landmarks,map_x,map_y,month,operate) |
| | | values(#{storeId},#{bId},#{userId},#{name},#{address},#{tel},#{storeTypeCd},#{nearByLandmarks},#{mapX},#{mapY},#{month},#{operate}) |
| | | insert into business_store(store_id, b_id, user_id, name, address, tel, store_type_cd, nearby_landmarks, map_x, |
| | | map_y, month, operate) |
| | | values (#{storeId}, #{bId}, #{userId}, #{name}, #{address}, #{tel}, #{storeTypeCd}, #{nearByLandmarks}, #{mapX}, |
| | | #{mapY}, #{month}, #{operate}) |
| | | </insert> |
| | | <!-- 保存商户属性信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessStoreAttr" parameterType="Map"> |
| | | insert into business_store_attr(b_id,attr_id,store_id,spec_cd,value,month,operate) |
| | | values(#{bId},#{attrId},#{storeId},#{specCd},#{value},#{month},#{operate}) |
| | | insert into business_store_attr(b_id, attr_id, store_id, spec_cd, value, month, operate) |
| | | values (#{bId}, #{attrId}, #{storeId}, #{specCd}, #{value}, #{month}, #{operate}) |
| | | </insert> |
| | | <!-- 保存商户照片信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessStorePhoto" parameterType="Map"> |
| | | insert into business_store_photo(store_photo_id,b_id,store_id,store_photo_type_cd,photo,month,operate) |
| | | values(#{storePhotoId},#{bId},#{storeId},#{storePhotoTypeCd},#{photo},#{month},#{operate}) |
| | | insert into business_store_photo(store_photo_id, b_id, store_id, store_photo_type_cd, photo, month, operate) |
| | | values (#{storePhotoId}, #{bId}, #{storeId}, #{storePhotoTypeCd}, #{photo}, #{month}, #{operate}) |
| | | </insert> |
| | | <!-- 保存商户证件信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessStoreCerdentials" parameterType="Map"> |
| | | insert into |
| | | business_store_cerdentials(store_cerdentials_id,b_id,store_id,credentials_cd,value,validity_period,positive_photo,negative_photo,month,operate) |
| | | values(#{storeCerdentialsId},#{bId},#{storeId},#{credentialsCd},#{value},#{validityPeriod},#{positivePhoto},#{negativePhoto},#{month},#{operate}) |
| | | insert into business_store_cerdentials(store_cerdentials_id, b_id, store_id, credentials_cd, value, |
| | | validity_period, positive_photo, negative_photo, month, operate) |
| | | values (#{storeCerdentialsId}, #{bId}, #{storeId}, #{credentialsCd}, #{value}, #{validityPeriod}, |
| | | #{positivePhoto}, #{negativePhoto}, #{month}, #{operate}) |
| | | </insert> |
| | | |
| | | <!-- 查询商户信息(Business) add by wuxw 2018-07-03 --> |
| | |
| | | |
| | | <!-- 保存商户信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveStoreInfoInstance" parameterType="Map"> |
| | | insert into s_store(store_id,b_id,user_id,name,address,tel,store_type_cd,nearby_landmarks,map_x,map_y,status_cd) |
| | | select s.store_id,s.b_id,s.user_id,s.name,s.address,s.tel,s.store_type_cd,s.nearby_landmarks,s.map_x,s.map_y,'0' |
| | | from business_store s where |
| | | s.operate = 'ADD' and s.b_id=#{bId} |
| | | insert into s_store(store_id, b_id, user_id, name, address, tel, store_type_cd, nearby_landmarks, map_x, map_y, |
| | | status_cd) |
| | | select s.store_id, |
| | | s.b_id, |
| | | s.user_id, |
| | | s.name, |
| | | s.address, |
| | | s.tel, |
| | | s.store_type_cd, |
| | | s.nearby_landmarks, |
| | | s.map_x, |
| | | s.map_y, |
| | | '0' |
| | | from business_store s |
| | | where s.operate = 'ADD' |
| | | and s.b_id = #{bId} |
| | | </insert> |
| | | |
| | | <!-- 保存商户属性信息到 instance add by wuxw 2018-07-03 --> |
| | | <insert id="saveStoreAttrsInstance" parameterType="Map"> |
| | | insert into s_store_attr(b_id,attr_id,store_id,spec_cd,value,status_cd) |
| | | select sa.b_id,sa.attr_id,sa.store_id,sa.spec_cd,sa.value,'0' |
| | | insert into s_store_attr(b_id, attr_id, store_id, spec_cd, value, status_cd) |
| | | select sa.b_id, sa.attr_id, sa.store_id, sa.spec_cd, sa.value, '0' |
| | | from business_store_attr sa |
| | | where sa.operate = 'ADD' and sa.b_id=#{bId} |
| | | where sa.operate = 'ADD' |
| | | and sa.b_id = #{bId} |
| | | </insert> |
| | | |
| | | <!-- 保存 商户照片信息 instance add by wuxw 2018-07-03 --> |
| | | <insert id="saveStorePhotoInstance" parameterType="Map"> |
| | | insert into s_store_photo(store_photo_id,b_id,store_id,store_photo_type_cd,photo,status_cd) |
| | | select sp.store_photo_id,sp.b_id,sp.store_id,sp.store_photo_type_cd,sp.photo,'0' |
| | | insert into s_store_photo(store_photo_id, b_id, store_id, store_photo_type_cd, photo, status_cd) |
| | | select sp.store_photo_id, sp.b_id, sp.store_id, sp.store_photo_type_cd, sp.photo, '0' |
| | | from business_store_photo sp |
| | | where sp.operate = 'ADD' and sp.b_id=#{bId} |
| | | where sp.operate = 'ADD' |
| | | and sp.b_id = #{bId} |
| | | </insert> |
| | | <!-- 保存 商户证件信息 instance add by wuxw 2018-07-03 --> |
| | | <insert id="saveStoreCerdentialsInstance" parameterType="Map"> |
| | | insert into |
| | | s_store_cerdentials(store_cerdentials_id,b_id,store_id,credentials_cd,value,validity_period,positive_photo,negative_photo,status_cd) |
| | | select |
| | | sc.store_cerdentials_id,sc.b_id,sc.store_id,sc.credentials_cd,sc.value,sc.validity_period,sc.positive_photo,sc.negative_photo,'0' |
| | | insert into s_store_cerdentials(store_cerdentials_id, b_id, store_id, credentials_cd, value, validity_period, |
| | | positive_photo, negative_photo, status_cd) |
| | | select sc.store_cerdentials_id, |
| | | sc.b_id, |
| | | sc.store_id, |
| | | sc.credentials_cd, |
| | | sc.value, |
| | | sc.validity_period, |
| | | sc.positive_photo, |
| | | sc.negative_photo, |
| | | '0' |
| | | from business_store_cerdentials sc |
| | | where sc.operate = 'ADD' and sc.b_id=#{bId} |
| | | where sc.operate = 'ADD' |
| | | and sc.b_id = #{bId} |
| | | </insert> |
| | | |
| | | <!-- 查询商户信息 add by wuxw 2018-07-03 --> |
| | |
| | | |
| | | <!--商户成员加入 add by wuxw 2018-10-27 saveBusinessMemberStore--> |
| | | <insert id="saveBusinessMemberStore" parameterType="Map"> |
| | | insert into business_member_store(member_store_id,b_id,store_id,member_id,month,operate) |
| | | values(#{memberStoreId},#{bId},#{storeId},#{memberId},#{month},#{operate}) |
| | | insert into business_member_store(member_store_id, b_id, store_id, member_id, month, operate) |
| | | values (#{memberStoreId}, #{bId}, #{storeId}, #{memberId}, #{month}, #{operate}) |
| | | </insert> |
| | | |
| | | <!-- 商户成员加入 instance表中 add by wuxw 2018-10-27 --> |
| | | <insert id="saveMemberStoreInstance" parameterType="Map"> |
| | | insert into s_member_store(member_store_id,b_id,store_id,member_id,status_cd) |
| | | select ms.member_store_id,ms.b_id,ms.store_id,ms.member_id,'0' |
| | | from business_member_store ms where |
| | | ms.operate = 'ADD' and ms.b_id=#{bId} |
| | | insert into s_member_store(member_store_id, b_id, store_id, member_id, status_cd) |
| | | select ms.member_store_id, ms.b_id, ms.store_id, ms.member_id, '0' |
| | | from business_member_store ms |
| | | where ms.operate = 'ADD' |
| | | and ms.b_id = #{bId} |
| | | </insert> |
| | | |
| | | <!-- 查询商户成员 add by wuxw 2018-10-27 getBusinessMemberStore--> |
| | |
| | | |
| | | <!-- 保存物业用户信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessStoreUser" parameterType="Map"> |
| | | insert into business_store_user(store_user_id,b_id,store_id,user_id,rel_cd,month,operate) |
| | | values(#{storeUserId},#{bId},#{storeId},#{userId},#{relCd},#{month},#{operate}) |
| | | insert into business_store_user(store_user_id, b_id, store_id, user_id, rel_cd, month, operate) |
| | | values (#{storeUserId}, #{bId}, #{storeId}, #{userId}, #{relCd}, #{month}, #{operate}) |
| | | </insert> |
| | | |
| | | <!-- 查询物业 用户信息 add by wuxw 2018-07-03 --> |
| | |
| | | |
| | | <!-- 保存 商户用户信息 instance add by wuxw 2018-07-03 --> |
| | | <insert id="saveStoreUserInstance" parameterType="Map"> |
| | | insert into s_store_user(store_user_id,b_id,store_id,user_id,rel_cd,status_cd) |
| | | select sc.store_user_id,sc.b_id,sc.store_id,sc.user_id,sc.rel_cd,'0' |
| | | insert into s_store_user(store_user_id, b_id, store_id, user_id, rel_cd, status_cd) |
| | | select sc.store_user_id, sc.b_id, sc.store_id, sc.user_id, sc.rel_cd, '0' |
| | | from business_store_user sc |
| | | where sc.operate = 'ADD' and sc.b_id=#{bId} |
| | | where sc.operate = 'ADD' |
| | | and sc.b_id = #{bId} |
| | | </insert> |
| | | |
| | | <!-- 查询商户证件信息 add by wuxw 2018-07-03 --> |
| | |
| | | from s_store s,store_type st |
| | | where s.status_cd = '0' |
| | | and s.store_type_cd = st.store_type_cd |
| | | |
| | | <if test="userId != null and userId != ''"> |
| | | and s.user_id = #{userId} |
| | | </if> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="storeV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存商户信息信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveStoreInfo" parameterType="Map"> |
| | | insert into s_store( |
| | | address,store_type_cd,name,tel,state,store_id,user_id,map_y,map_x,nearby_landmarks |
| | | ) values ( |
| | | #{address},#{storeTypeCd},#{name},#{tel},#{state},#{storeId},#{userId},#{mapY},#{mapX},#{nearbyLandmarks} |
| | | ) |
| | | insert into s_store(address, store_type_cd, name, tel, state, store_id, user_id, map_y, map_x, nearby_landmarks) |
| | | values (#{address}, #{storeTypeCd}, #{name}, #{tel}, #{state}, #{storeId}, #{userId}, #{mapY}, #{mapX}, |
| | | #{nearByLandmarks}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询商户信息信息 add by wuxw 2018-07-03 --> |
| | | <select id="getStoreInfo" parameterType="Map" resultType="Map"> |
| | | select t.address,t.store_type_cd,t.store_type_cd storeTypeCd,t.name,t.tel,t.status_cd,t.status_cd |
| | | statusCd,t.state,t.store_id,t.store_id storeId,t.user_id,t.user_id userId,t.map_y,t.map_y mapY,t.map_x,t.map_x |
| | | mapX,t.create_time createTime,t.nearby_landmarks nearbyLandmarks,sa.value corporation,sa1.value foundingTime, |
| | | mapX,t.create_time createTime,t.nearby_landmarks,t.nearby_landmarks nearByLandmarks,sa.value corporation,sa1.value foundingTime, |
| | | CASE t.store_type_cd |
| | | WHEN '800900000000' THEN '开发团队' |
| | | WHEN '800900000001' THEN '运营团队' |
| | |
| | | <if test="mapX !=null and mapX != ''"> |
| | | and t.map_x= #{mapX} |
| | | </if> |
| | | <if test="nearByLandmarks !=null and nearByLandmarks != ''"> |
| | | and t.nearby_landmarks= #{nearByLandmarks} |
| | | </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 t.nearby_landmarks nearbyLandmarks --> |
| | | <update id="updateStoreInfo" parameterType="Map"> |
| | |
| | | <if test="storeTypeCd !=null and storeTypeCd != ''"> |
| | | , t.store_type_cd= #{storeTypeCd} |
| | | </if> |
| | | |
| | | <if test="nearbyLandmarks !=null and nearbyLandmarks != ''"> |
| | | , t.nearby_landmarks= #{nearbyLandmarks} |
| | | <if test="nearByLandmarks !=null and nearByLandmarks != ''"> |
| | | , t.nearby_landmarks= #{nearByLandmarks} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | , t.name= #{name} |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询商户信息数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="mapX !=null and mapX != ''"> |
| | | and t.map_x= #{mapX} |
| | | </if> |
| | | |
| | | |
| | | <if test="nearByLandmarks !=null and nearByLandmarks != ''"> |
| | | and t.nearby_landmarks= #{nearByLandmarks} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="menuUserV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存自定义菜单信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveMenuUserInfo" parameterType="Map"> |
| | | insert into m_menu_user( |
| | | mu_id,name,icon,m_id,staff_id,url,seq |
| | | ) values ( |
| | | #{muId},#{name},#{icon},#{mId},#{staffId},#{url},#{seq} |
| | | ) |
| | | insert into m_menu_user(mu_id, name, icon, m_id, staff_id, url, seq) |
| | | values (#{muId}, #{name}, #{icon}, #{mId}, #{staffId}, #{url}, #{seq}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询自定义菜单信息 add by wuxw 2018-07-03 --> |
| | | <select id="getMenuUserInfo" parameterType="Map" resultType="Map"> |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改自定义菜单信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateMenuUserInfo" parameterType="Map"> |
| | |
| | | <if test="muId !=null and muId != ''"> |
| | | and t.mu_id= #{muId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询自定义菜单数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="seq !=null and seq != ''"> |
| | | and t.seq= #{seq} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <select id="getOwnerCarAttrInfo" parameterType="Map" resultType="Map"> |
| | | select t.attr_id,t.attr_id attrId,t.create_time,t.create_time createTime,t.spec_cd,t.spec_cd |
| | | specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id |
| | | bId,t.value,t.car_id,t.car_id carId |
| | | bId,t.value,t.car_id,t.car_id carId, |
| | | s.spec_name specName, |
| | | v.value_name valueName, |
| | | s.list_show listShow |
| | | from owner_car_attr t |
| | | left join attr_spec s on t.spec_cd = s.spec_cd and s.status_cd = '0' and s.table_name = 'owner_car_attr' |
| | | left join attr_value v on t.`value` = v.`value` and t.spec_cd = v.spec_cd and v.status_cd = '0' |
| | | where 1 =1 |
| | | <if test="attrId !=null and attrId != ''"> |
| | | and t.attr_id= #{attrId} |
| | |
| | | <if test="carId !=null and carId != ''"> |
| | | and t.car_id= #{carId} |
| | | </if> |
| | | <if test="carIds != null and carIds != null"> |
| | | and t.car_id in |
| | | <foreach collection="carIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="ownerCarAttrV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存车辆属性信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveOwnerCarAttrInfo" parameterType="Map"> |
| | | insert into owner_car_attr( |
| | | attr_id,spec_cd,community_id,value,member_id |
| | | ) values ( |
| | | #{attrId},#{specCd},#{communityId},#{value},#{memberId} |
| | | ) |
| | | insert into owner_car_attr(attr_id, spec_cd, community_id, value, member_id) |
| | | values (#{attrId}, #{specCd}, #{communityId}, #{value}, #{memberId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询车辆属性信息 add by wuxw 2018-07-03 --> |
| | | <select id="getOwnerCarAttrInfo" parameterType="Map" resultType="Map"> |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改车辆属性信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateOwnerCarAttrInfo" parameterType="Map"> |
| | |
| | | , t.member_id= #{memberId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="carId !=null and carId != ''"> |
| | | and t.car_id= #{carId} |
| | | </if> |
| | | <if test="attrId !=null and attrId != ''"> |
| | | and t.attr_id= #{attrId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询车辆属性数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="memberId !=null and memberId != ''"> |
| | | and t.member_id= #{memberId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | , t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="carTypeCd !=null and carTypeCd != ''"> |
| | | , t.car_type_cd= #{carTypeCd} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | , t.user_id= #{userId} |
| | | </if> |
| | | <if test="carId !=null and carId != ''"> |
| | | , t.car_id= #{carId} |
| | | </if> |
| | | <if test="carColor !=null and carColor != ''"> |
| | | , t.car_color= #{carColor} |
| | |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | where 1=1 |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="carId !=null and carId != ''"> |
| | | and t.car_id= #{carId} |
| | | </if> |
| | | <if test="memberId !=null and memberId != ''"> |
| | | and t.member_id= #{memberId} |
| | | </if> |
| | | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="carTypeCd !=null and carTypeCd != ''"> |
| | | and t.car_type_cd= #{carTypeCd} |
| | | </if> |
| | | </update> |
| | | |
| | | <!-- 查询车辆数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="memberId !=null and memberId != ''"> |
| | | and t.member_id= #{memberId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询业主信息 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="ownerTypeCd !=null and ownerTypeCd != ''"> |
| | | and t.owner_type_cd= #{ownerTypeCd} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.visit.VisitDto; |
| | | import com.java110.po.owner.VisitPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param visitDto 数据对象分享 |
| | | * @return VisitDto 对象数据 |
| | | */ |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryVisitsCount", method = RequestMethod.POST) |
| | | int queryVisitsCount(@RequestBody VisitDto visitDto); |
| | | |
| | | /** |
| | | * 添加访客信息 |
| | | * |
| | | * @param visitPo |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/saveVisit", method = RequestMethod.POST) |
| | | void saveVisit(@RequestBody VisitPo visitPo); |
| | | |
| | | /** |
| | | * 修改访客信息 |
| | | * |
| | | * @param visitPo |
| | | */ |
| | | @RequestMapping(value = "/updateVisit", method = RequestMethod.POST) |
| | | void updateVisit(@RequestBody VisitPo visitPo); |
| | | } |
| New file |
| | |
| | | package com.java110.intf.feeAccountDetail; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.feeAccountDetail.FeeAccountDetailDto; |
| | | import com.java110.po.feeAccountDetail.FeeAccountDetailPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 抵扣明细接口类 |
| | | * |
| | | * @author fqz |
| | | * @date 2022-05-16 |
| | | */ |
| | | @FeignClient(name = "${java110.fee-service}", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/feeAccountDetailApi") |
| | | public interface IFeeAccountDetailServiceSMO { |
| | | |
| | | @RequestMapping(value = "/queryFeeAccountDetails", method = RequestMethod.POST) |
| | | List<FeeAccountDetailDto> queryFeeAccountDetails(@RequestBody FeeAccountDetailDto feeAccountDetailDto); |
| | | |
| | | @RequestMapping(value = "/queryFeeAccountDetailsCount", method = RequestMethod.POST) |
| | | int queryFeeAccountDetailsCount(@RequestBody FeeAccountDetailDto feeAccountDetailDto); |
| | | |
| | | @RequestMapping(value = "saveFeeAccountDetail") |
| | | int saveFeeAccountDetail(@RequestBody FeeAccountDetailPo feeAccountDetailPo); |
| | | |
| | | } |
| | |
| | | @RequestParam(value = "feeId", required = false) String feeId, |
| | | @RequestParam(value = "link", required = false) String link, |
| | | @RequestParam(value = "idCard", required = false) String idCard, |
| | | @RequestParam(value = "acctType", required = false) String acctType, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | AccountDto accountDto = new AccountDto(); |
| | |
| | | accountDto.setObjType(AccountDto.OBJ_TYPE_PERSON); |
| | | accountDto.setAcctName(ownerName); |
| | | accountDto.setPartId(communityId); |
| | | accountDto.setAcctType(acctType); |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setOwnerId(ownerId); |
| | | ownerDto.setCommunityId(communityId); |
| | |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "ownerId", "业主不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "amount", "金额不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "acctType", "账户类型不能为空"); |
| | | AccountDetailPo accountDetailPo = new AccountDetailPo(); |
| | | accountDetailPo.setRemark(reqJson.getString("remark")); |
| | | accountDetailPo.setObjId(reqJson.getString("ownerId")); |
| | |
| | | package com.java110.acct.bmo.account.impl; |
| | | |
| | | import com.java110.acct.bmo.account.IGetAccountBMO; |
| | | import com.java110.core.factory.CommunitySettingFactory; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.account.AccountDto; |
| | | import com.java110.dto.accountDetail.AccountDetailDto; |
| | |
| | | |
| | | @Autowired |
| | | private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl; |
| | | |
| | | //键(积分账户最大使用积分) |
| | | public static final String MAXIMUM_NUMBER = "MAXIMUM_NUMBER"; |
| | | |
| | | //键(积分账户抵扣比例) |
| | | public static final String DEDUCTION_PROPORTION = "DEDUCTION_PROPORTION"; |
| | | |
| | | /** |
| | | * @param accountDto |
| | |
| | | accountDtos = addAccountDto(accountDto, ownerDto); |
| | | |
| | | } |
| | | //积分账户最大使用积分 |
| | | String maximumNumber = CommunitySettingFactory.getValue(ownerDto.getCommunityId(), MAXIMUM_NUMBER); |
| | | //积分账户抵扣比例 |
| | | String deductionProportion = CommunitySettingFactory.getValue(ownerDto.getCommunityId(), DEDUCTION_PROPORTION); |
| | | List<AccountDto> accountList = new ArrayList<>(); |
| | | for (AccountDto account : accountDtos) { |
| | | if (!StringUtil.isEmpty(maximumNumber)) { |
| | | account.setMaximumNumber(maximumNumber); |
| | | } |
| | | if (!StringUtil.isEmpty(deductionProportion)) { |
| | | account.setDeductionProportion(deductionProportion); |
| | | } |
| | | accountList.add(account); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) accountDto.getRow()), count, accountDtos); |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) accountDto.getRow()), count, accountList); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | |
| | | accountDto.setObjId(accountDetailPo.getObjId()); |
| | | accountDto.setObjType(AccountDto.OBJ_TYPE_PERSON); |
| | | accountDto.setPartId(reqJson.getString("communityId")); |
| | | accountDto.setAcctType(AccountDto.ACCT_TYPE_CASH); |
| | | accountDto.setAcctType(reqJson.getString("acctType")); |
| | | List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | if (accountDtos == null || accountDtos.size() < 1) { |
| | | accountDto = addAccountDto(reqJson); |
| | |
| | | accountPo.setAcctId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_acctId)); |
| | | accountPo.setObjId(reqJson.getString("ownerId")); |
| | | accountPo.setObjType(AccountDto.OBJ_TYPE_PERSON); |
| | | accountPo.setAcctType(AccountDto.ACCT_TYPE_CASH); |
| | | accountPo.setAcctType(reqJson.getString("acctType")); |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setMemberId(reqJson.getString("ownerId")); |
| | | ownerDto.setCommunityId(reqJson.getString("communityId")); |
| | |
| | | import com.java110.api.bmo.ApiBaseBMO; |
| | | import com.java110.api.bmo.parkingSpace.IParkingSpaceBMO; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.ownerCarAttr.OwnerCarAttrPo; |
| | | import com.java110.po.parking.ParkingSpacePo; |
| | | import com.java110.po.room.RoomAttrPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.FeeTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | |
| | | ownerCarPo.setCarTypeCd(OwnerCarDto.CAR_TYPE_PRIMARY); |
| | | } |
| | | //添加车辆属性 |
| | | OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo(); |
| | | ownerCarAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_cartId)); |
| | | ownerCarAttrPo.setCarId(ownerCarPo.getCarId()); |
| | | ownerCarAttrPo.setCommunityId(ownerCarPo.getCommunityId()); |
| | | String carAttrs = paramInJson.getString("carAttrs"); |
| | | if (StringUtil.isEmpty(carAttrs)) { |
| | | throw new IllegalArgumentException("属性值为空"); |
| | | } |
| | | JSONArray jsonArray = JSONArray.parseArray(carAttrs); |
| | | String specCd = ""; |
| | | if (jsonArray.size() > 0) { |
| | | specCd = jsonArray.getJSONObject(0).getString("specCd"); |
| | | } |
| | | ownerCarAttrPo.setSpecCd(specCd); |
| | | ownerCarAttrPo.setValue(paramInJson.getString("value")); |
| | | ownerCarAttrInnerServiceSMOImpl.saveOwnerCarAttr(ownerCarAttrPo); |
| | | dealOwnerCarAttr(paramInJson, ownerCarPo, dataFlowContext); |
| | | super.insert(dataFlowContext, ownerCarPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_OWNER_CAR); |
| | | } |
| | | |
| | | private void dealOwnerCarAttr(JSONObject paramInJson, OwnerCarPo ownerCarPo, DataFlowContext dataFlowContext) { |
| | | |
| | | if (!paramInJson.containsKey("attrs")) { |
| | | return; |
| | | } |
| | | |
| | | JSONArray attrs = paramInJson.getJSONArray("attrs"); |
| | | if (attrs.size() < 1) { |
| | | return; |
| | | } |
| | | JSONObject attr = null; |
| | | int flag = 0; |
| | | for (int attrIndex = 0; attrIndex < attrs.size(); attrIndex++) { |
| | | attr = attrs.getJSONObject(attrIndex); |
| | | OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo(); |
| | | ownerCarAttrPo.setAttrId(GenerateCodeFactory.getAttrId()); |
| | | ownerCarAttrPo.setCommunityId(ownerCarPo.getCommunityId()); |
| | | ownerCarAttrPo.setCarId(ownerCarPo.getCarId()); |
| | | ownerCarAttrPo.setSpecCd(attr.getString("specCd")); |
| | | ownerCarAttrPo.setValue(attr.getString("value")); |
| | | flag = ownerCarAttrInnerServiceSMOImpl.saveOwnerCarAttr(ownerCarAttrPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("保存车辆属性失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 修改停车位状态信息 |
| | | * |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiDataFlowListener; |
| | | import com.java110.dto.feeAccountDetail.FeeAccountDetailDto; |
| | | import com.java110.intf.feeAccountDetail.IFeeAccountDetailServiceSMO; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | |
| | | @Autowired |
| | | private IFeeDetailInnerServiceSMO feeDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeAccountDetailServiceSMO feeAccountDetailServiceSMOImpl; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | |
| | | feeDetail.setReceivedAmount(receivedAmount.substring(1)); |
| | | } |
| | | } |
| | | FeeAccountDetailDto feeAccountDetailDto = new FeeAccountDetailDto(); |
| | | feeAccountDetailDto.setDetailId(feeDetail.getDetailId()); |
| | | List<FeeAccountDetailDto> feeAccountDetailDtos = feeAccountDetailServiceSMOImpl.queryFeeAccountDetails(feeAccountDetailDto); |
| | | feeDetail.setFeeAccountDetailDtoList(feeAccountDetailDtos); |
| | | feeDetailList.add(feeDetail); |
| | | } |
| | | List<ApiFeeDetailDataVo> feeDetails = BeanConvertUtil.covertBeanList(feeDetailList, ApiFeeDetailDataVo.class); |
| | |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import com.java110.core.log.LoggerFactory; |
| | |
| | | |
| | | @Java110Listener("deleteCarParkingSpaceListener") |
| | | public class DeleteCarParkingSpaceListener extends AbstractServiceApiPlusListener { |
| | | |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(DeleteCarParkingSpaceListener.class); |
| | | |
| | |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param event 事件对象 |
| | |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.po.car.OwnerCarPo; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("deleteOwnerCarListener") |
| | | public class DeleteOwnerCarListener extends AbstractServiceApiPlusListener { |
| | | |
| | | |
| | | @Autowired |
| | | private IFeeInnerServiceSMO feeInnerServiceSMOImpl; |
| | |
| | | |
| | | @Autowired |
| | | private IParkingSpaceBMO parkingSpaceBMOImpl; |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | if (reqJson.containsKey("psId") && !StringUtil.isEmpty(reqJson.getString("psId"))) { |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setPsId(reqJson.getString("psId")); |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | Assert.listOnlyOne(parkingSpaceDtos, "查询车位错误!"); |
| | | if (!StringUtil.isEmpty(parkingSpaceDtos.get(0).getParkingType()) && parkingSpaceDtos.get(0).getParkingType().equals("2") |
| | | && !StringUtil.isEmpty(reqJson.getString("carTypeCd")) && reqJson.getString("carTypeCd").equals("1001")) { //子母车位 |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | | ownerCarDto.setCarId(reqJson.getString("carId")); |
| | | ownerCarDto.setPsId(reqJson.getString("psId")); |
| | | ownerCarDto.setOwnerId(reqJson.getString("ownerId")); |
| | | ownerCarDto.setCarTypeCd("1002"); //成员车辆 |
| | | List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | if (ownerCarDtos != null && ownerCarDtos.size() > 0) { |
| | | throw new IllegalArgumentException("该车位下含有子车辆,请先删除子车辆后再进行操作!"); |
| | | } |
| | | } |
| | | } |
| | | OwnerCarPo ownerCarPo = new OwnerCarPo(); |
| | | ownerCarPo.setCommunityId(reqJson.getString("communityId")); |
| | | ownerCarPo.setCarId(reqJson.getString("carId")); |
| | |
| | | package com.java110.api.listener.owner; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiDataFlowListener; |
| | | import com.java110.core.annotation.Java110Listener; |
| | |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | //添加小区楼 |
| | | //添加车辆 |
| | | parkingSpaceBMOImpl.sellParkingSpace(reqJson, context); |
| | | parkingSpaceBMOImpl.modifySellParkingSpaceState(reqJson, context); |
| | | } |
| | |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | |
| | | |
| | | //查询正在处理 工单的师傅 |
| | | RepairUserDto repairUserDto = new RepairUserDto(); |
| | | repairUserDto.setRepairId(reqJson.getString("repairId")); |
| | |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | parkingSpaceBMOImpl.deleteParkingSpace(reqJson, context); |
| | | if (reqJson.containsKey("state") && !StringUtil.isEmpty("state") && reqJson.getString("state").equals("F")) { |
| | | parkingSpaceBMOImpl.deleteParkingSpace(reqJson, context); |
| | | } else if (reqJson.containsKey("state") && !StringUtil.isEmpty("state") && reqJson.getString("state").equals("S")) { |
| | | throw new IllegalArgumentException("车位已出售,不能删除!"); |
| | | } else if (reqJson.containsKey("state") && !StringUtil.isEmpty("state") && reqJson.getString("state").equals("H")) { |
| | | throw new IllegalArgumentException("车位已出租,不能删除!"); |
| | | } else { |
| | | throw new IllegalArgumentException("未知车位!"); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.dto.repair.RepairTypeUserDto; |
| | | import com.java110.intf.community.IRepairTypeUserInnerServiceSMO; |
| | | import com.java110.utils.constant.ServiceCodeRepairTypeUserConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 保存商户侦听 |
| | |
| | | @Autowired |
| | | private IRepairTypeUserBMO repairTypeUserBMOImpl; |
| | | |
| | | @Autowired |
| | | private IRepairTypeUserInnerServiceSMO repairTypeUserInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "staffId", "请求报文中未包含staffId"); |
| | | Assert.hasKeyAndValue(reqJson, "staffName", "请求报文中未包含staffName"); |
| | | Assert.hasKeyAndValue(reqJson, "repairType", "请求报文中未包含repairType"); |
| | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | reqJson.put("state", RepairTypeUserDto.STATE_ONLINE); |
| | | |
| | | RepairTypeUserDto repairTypeUserDto = new RepairTypeUserDto(); |
| | | repairTypeUserDto.setRepairType(reqJson.getString("repairType")); |
| | | repairTypeUserDto.setStaffId(reqJson.getString("staffId")); |
| | | repairTypeUserDto.setCommunityId(reqJson.getString("communityId")); |
| | | List<RepairTypeUserDto> repairTypeUserDtos = repairTypeUserInnerServiceSMOImpl.queryRepairTypeUsers(repairTypeUserDto); |
| | | Assert.listIsNull(repairTypeUserDtos, "维修师傅已存在,不能重复添加!"); |
| | | repairTypeUserBMOImpl.addRepairTypeUser(reqJson, context); |
| | | } |
| | | |
| | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | apiRoomVo.setTotal(total); |
| | | if (total > 0) { |
| | | List<RoomDto> roomDtoList = roomInnerServiceSMOImpl.queryRoomsWithSell(roomDto); |
| | | apiRoomVo.setRooms(BeanConvertUtil.covertBeanList(roomDtoList, ApiRoomDataVo.class)); |
| | | List<RoomDto> rooms = new ArrayList<>(); |
| | | for (RoomDto room : roomDtoList) { |
| | | room.setFloorId(reqJson.getString("floorId")); |
| | | room.setFloorNum(reqJson.getString("floorNum")); |
| | | rooms.add(room); |
| | | } |
| | | apiRoomVo.setRooms(BeanConvertUtil.covertBeanList(rooms, ApiRoomDataVo.class)); |
| | | } |
| | | int row = reqJson.getInteger("row"); |
| | | apiRoomVo.setRecords((int) Math.ceil((double) total / (double) row)); |
| | |
| | | try { |
| | | //if (!reqJson.containsKey("floorNum") || StringUtils.isEmpty(reqJson.getString("floorNum"))) { |
| | | |
| | | List<FloorDto> floorDtos = floorInnerServiceSMOImpl.queryFloors(floorDto); |
| | | List<FloorDto> floorDtos = floorInnerServiceSMOImpl.queryFloors(floorDto); |
| | | |
| | | if (floorDtos.size() == 0) { |
| | | return; |
| | | } |
| | | if (floorDtos.size() == 0) { |
| | | return; |
| | | } |
| | | |
| | | floorId = floorDtos.get(0).getFloorId(); |
| | | floorId = floorDtos.get(0).getFloorId(); |
| | | //} |
| | | } finally { |
| | | reqJson.put("floorId", floorId); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.core.factory.CommunitySettingFactory; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.intf.community.IVisitInnerServiceSMO; |
| | | import com.java110.dto.visit.VisitDto; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.api.visit.ApiVisitDataVo; |
| | | import com.java110.vo.api.visit.ApiVisitVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import com.java110.utils.constant.ServiceCodeVisitConstant; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 查询小区侦听类 |
| | |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.GET; |
| | | } |
| | | |
| | | //键 |
| | | public static final String CAR_FREE_TIME = "CAR_FREE_TIME"; |
| | | |
| | | //键 |
| | | public static final String VISIT_NUMBER = "VISIT_NUMBER"; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | VisitDto visitDto = BeanConvertUtil.covertBean(reqJson, VisitDto.class); |
| | | |
| | | int count = visitInnerServiceSMOImpl.queryVisitsCount(visitDto); |
| | | |
| | | List<ApiVisitDataVo> visits = null; |
| | | |
| | | if (count > 0) { |
| | | visits = BeanConvertUtil.covertBeanList(visitInnerServiceSMOImpl.queryVisits(visitDto), ApiVisitDataVo.class); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>("", HttpStatus.OK); |
| | | if (reqJson.containsKey("addVisitType") && !StringUtil.isEmpty(reqJson.getString("addVisitType")) |
| | | && "initAddVisitParameter".equals(reqJson.getString("addVisitType"))) { |
| | | //预约车免费时长 |
| | | String freeTime = CommunitySettingFactory.getValue(reqJson.getString("communityId"), CAR_FREE_TIME); |
| | | //预约车免费次数 |
| | | int number = Integer.parseInt(CommunitySettingFactory.getValue(reqJson.getString("communityId"), VISIT_NUMBER)); |
| | | Map initAddVisitParameter = new HashMap(); |
| | | initAddVisitParameter.put("freeTime", freeTime); |
| | | initAddVisitParameter.put("freeTimes", number); |
| | | responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(initAddVisitParameter), HttpStatus.OK); |
| | | } else { |
| | | visits = new ArrayList<>(); |
| | | VisitDto visitDto = BeanConvertUtil.covertBean(reqJson, VisitDto.class); |
| | | int count = visitInnerServiceSMOImpl.queryVisitsCount(visitDto); |
| | | |
| | | List<ApiVisitDataVo> visits = new ArrayList<>(); |
| | | if (count > 0) { |
| | | List<VisitDto> visitDtos = visitInnerServiceSMOImpl.queryVisits(visitDto); |
| | | for (VisitDto visit : visitDtos) { |
| | | ApiVisitDataVo apiVisitDataVo = BeanConvertUtil.covertBean(visit, ApiVisitDataVo.class); |
| | | if (!StringUtil.isEmpty(visit.getFileSaveName())) { |
| | | apiVisitDataVo.setUrl("/callComponent/download/getFile/file?fileId=" + visit.getFileSaveName() + "&communityId=-1"); |
| | | } |
| | | visits.add(apiVisitDataVo); |
| | | } |
| | | } else { |
| | | visits = new ArrayList<>(); |
| | | } |
| | | |
| | | ApiVisitVo apiVisitVo = new ApiVisitVo(); |
| | | apiVisitVo.setTotal(count); |
| | | apiVisitVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row"))); |
| | | apiVisitVo.setVisits(visits); |
| | | |
| | | responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiVisitVo), HttpStatus.OK); |
| | | } |
| | | |
| | | ApiVisitVo apiVisitVo = new ApiVisitVo(); |
| | | |
| | | apiVisitVo.setTotal(count); |
| | | apiVisitVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row"))); |
| | | apiVisitVo.setVisits(visits); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiVisitVo), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.core.factory.CommunitySettingFactory; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.visit.VisitDto; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.dto.file.FileDto; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IVisitInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarV1InnerServiceSMO; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.file.FileRelPo; |
| | | import com.java110.po.owner.VisitPo; |
| | | import com.java110.po.ownerCarAttr.OwnerCarAttrPo; |
| | | import com.java110.po.parking.ParkingSpacePo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ServiceCodeVisitConstant; |
| | | import com.java110.utils.util.Assert; |
| | |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.TimeZone; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | |
| | | @Autowired |
| | | private IFileInnerServiceSMO fileInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarV1InnerServiceSMO ownerCarV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | //键 |
| | | public static final String IS_NEED_REVIEW = "IS_NEED_REVIEW"; |
| | | |
| | | //键 |
| | | public static final String VISIT_NUMBER = "VISIT_NUMBER"; |
| | | |
| | | //键 |
| | | public static final String CAR_FREE_TIME = "CAR_FREE_TIME"; |
| | | |
| | | //键 |
| | | public static final String ASCRIPTION_CAR_AREA_ID = "ASCRIPTION_CAR_AREA_ID"; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) throws ParseException { |
| | | reqJson.put("vId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_vId)); |
| | | //是否需要审核 |
| | | String val = CommunitySettingFactory.getValue(reqJson.getString("communityId"), IS_NEED_REVIEW); |
| | | if (!StringUtils.isEmpty(val) && val.equals("true") && reqJson.containsKey("carNum") && !StringUtil.isEmpty(reqJson.getString("carNum"))) { |
| | | String isNeedReviewFlag = CommunitySettingFactory.getValue(reqJson.getString("communityId"), IS_NEED_REVIEW); |
| | | //是否有空闲车位 false 有空闲 true无空闲 |
| | | boolean freeSpace = false; |
| | | //是否超过规定次数 |
| | | boolean specifiedTimes = false; |
| | | //是否存在车辆 |
| | | boolean existCar = false; |
| | | if (!StringUtils.isEmpty(isNeedReviewFlag) && isNeedReviewFlag.equals("true") && reqJson.containsKey("carNum") && !StringUtil.isEmpty(reqJson.getString("carNum"))) { |
| | | reqJson.put("state", "0"); //0表示未审核;1表示审核通过;2表示审核拒绝 |
| | | } else { |
| | | reqJson.put("state", "1"); |
| | |
| | | if (reqJson.containsKey("entourage") && reqJson.getString("entourage").equals("")) { |
| | | reqJson.put("entourage", "0"); |
| | | } |
| | | //是否超过规定次数 |
| | | boolean specifiedTimes = false; |
| | | reqJson.put("recordState", "0"); |
| | | if (reqJson.containsKey("carNum") && !StringUtil.isEmpty(reqJson.getString("carNum"))) { |
| | | //获取预约车免费时长的值 |
| | | String freeTime = CommunitySettingFactory.getValue(reqJson.getString("communityId"), CAR_FREE_TIME); |
| | | String visitTime = reqJson.getString("visitTime"); |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date time = df.parse(visitTime); |
| | | Calendar newTime = Calendar.getInstance(); |
| | | newTime.setTime(time); |
| | | newTime.add(Calendar.MINUTE, Integer.parseInt(freeTime));//日期加上分钟 |
| | | Date newDate = newTime.getTime(); |
| | | String finishFreeTime = df.format(newDate); |
| | | reqJson.put("freeTime", finishFreeTime); |
| | | if (!StringUtils.isEmpty(isNeedReviewFlag) && isNeedReviewFlag.equals("false")) { //不需要审核就随机自动分配车位 |
| | | //获取小区配置里配置的停车场id |
| | | String parkingAreaId = CommunitySettingFactory.getValue(reqJson.getString("communityId"), ASCRIPTION_CAR_AREA_ID); |
| | | if (StringUtil.isEmpty(parkingAreaId)) { //如果没有配置停车场id,就随便分配该小区下一个空闲车位 |
| | | ParkingSpaceDto parkingSpace = new ParkingSpaceDto(); |
| | | parkingSpace.setCommunityId(reqJson.getString("communityId")); |
| | | parkingSpace.setState("F"); //车位状态 出售 S,出租 H ,空闲 F |
| | | parkingSpace.setParkingType("1"); //1:普通车位 2:子母车位 3:豪华车位 |
| | | //查询小区空闲车位 |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpace); |
| | | if (parkingSpaceDtos == null || parkingSpaceDtos.size() < 1) { |
| | | freeSpace = true; |
| | | } else { |
| | | //随机生成一个不大于集合长度的整数 |
| | | Random random = new Random(); |
| | | int i = random.nextInt(parkingSpaceDtos.size()); |
| | | //获取车位id |
| | | String psId = parkingSpaceDtos.get(i).getPsId(); |
| | | reqJson.put("psId", psId); |
| | | } |
| | | } else { |
| | | ParkingSpaceDto parkingSpace = new ParkingSpaceDto(); |
| | | parkingSpace.setCommunityId(reqJson.getString("communityId")); |
| | | parkingSpace.setPaId(parkingAreaId); //停车场id |
| | | parkingSpace.setState("F"); //车位状态 出售 S,出租 H ,空闲 F |
| | | parkingSpace.setParkingType("1"); //1:普通车位 2:子母车位 3:豪华车位 |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpace); |
| | | if (parkingSpaceDtos == null || parkingSpaceDtos.size() < 1) { |
| | | freeSpace = true; |
| | | } else { |
| | | //随机生成一个不大于集合长度的整数 |
| | | Random random = new Random(); |
| | | int i = random.nextInt(parkingSpaceDtos.size()); |
| | | //获取车位id |
| | | String psId = parkingSpaceDtos.get(i).getPsId(); |
| | | reqJson.put("psId", psId); |
| | | } |
| | | } |
| | | } else { //需要审核就在审核通过时才分配车位 |
| | | reqJson.put("psId", "-1"); |
| | | } |
| | | //查询预约车辆登记次数 |
| | | int number = Integer.parseInt(CommunitySettingFactory.getValue(reqJson.getString("communityId"), VISIT_NUMBER)); |
| | | VisitDto visitDto = new VisitDto(); |
| | |
| | | List<VisitDto> visitDtos = visitInnerServiceSMOImpl.queryVisits(visitDto); |
| | | int count = visitDtos.size(); |
| | | //预约车辆登记次数0不做限制 |
| | | if (count >= number && number>0) { |
| | | if (!StringUtils.isEmpty(val) && val.equals("false")) { |
| | | if (count >= number && number > 0) { |
| | | if (!StringUtils.isEmpty(isNeedReviewFlag) && isNeedReviewFlag.equals("false")) { |
| | | reqJson.put("state", "0"); |
| | | reqJson.put("psId", null); |
| | | reqJson.put("freeTime", null); |
| | | } |
| | | specifiedTimes = true; |
| | | } |
| | | //校验车牌号是否存在 |
| | | OwnerCarDto ownerCarDto1 = new OwnerCarDto(); |
| | | ownerCarDto1.setCommunityId(reqJson.getString("communityId")); |
| | | ownerCarDto1.setCarNum(reqJson.getString("carNum")); |
| | | int existCarCount = ownerCarInnerServiceSMOImpl.queryOwnerCarsCount(ownerCarDto1); |
| | | if (existCarCount > 0) { |
| | | existCar = true; |
| | | reqJson.put("psId", "-1"); |
| | | } |
| | | } |
| | | |
| | | String result = ""; |
| | | if (existCar) { |
| | | result = "访客信息登记成功,车辆已经存在预约,请您在预约到期后,再次进行车辆预约,谢谢!"; |
| | | } |
| | | if (specifiedTimes) { |
| | | result = "访客信息登记成功,您已经超过预约车辆登记次数限制,车辆将无法自动审核!"; |
| | | } |
| | | if (freeSpace) { |
| | | result = "访客信息登记成功,当前停车场已无空闲车位,登记车辆将暂时不能进入停车场,请您合理安排出行。"; |
| | | } |
| | | reqJson.put("stateRemark", result); |
| | | visitBMOImpl.addVisit(reqJson, context); |
| | | if (reqJson.containsKey("photo") && !StringUtils.isEmpty(reqJson.getString("photo"))) { |
| | | FileDto fileDto = new FileDto(); |
| | |
| | | super.insert(context, fileRelPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FILE_REL); |
| | | } |
| | | commit(context); |
| | | if (specifiedTimes) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "登记成功,您已经超过预约车辆登记次数限制,车辆将无法自动审核!"); |
| | | if (!StringUtil.isEmpty(reqJson.getString("state")) && reqJson.getString("state").equals("1") |
| | | && reqJson.containsKey("carNum") && !StringUtil.isEmpty(reqJson.getString("carNum")) |
| | | && !existCar && !StringUtil.isEmpty(reqJson.getString("psId"))) { //审核通过且有车位就更新车位状态 |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setPsId(reqJson.getString("psId")); |
| | | //查询停车位 |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | Assert.listOnlyOne(parkingSpaceDtos, "访客登记,查询停车位错误!"); |
| | | //添加车辆信息 |
| | | OwnerCarPo ownerCarPo = new OwnerCarPo(); |
| | | ownerCarPo.setCarId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_carId)); |
| | | ownerCarPo.setOwnerId(reqJson.getString("ownerId")); |
| | | ownerCarPo.setbId("-1"); |
| | | ownerCarPo.setCarNum(reqJson.getString("carNum")); |
| | | ownerCarPo.setCarBrand("无(预约车)"); |
| | | ownerCarPo.setCarType("9901"); |
| | | ownerCarPo.setCarColor("无(预约车)"); |
| | | ownerCarPo.setPsId(reqJson.getString("psId")); |
| | | ownerCarPo.setUserId(context.getUserId()); |
| | | ownerCarPo.setRemark("访客登记预约车"); |
| | | ownerCarPo.setCommunityId(reqJson.getString("communityId")); |
| | | ownerCarPo.setStartTime(reqJson.getString("visitTime")); |
| | | ownerCarPo.setEndTime(reqJson.getString("freeTime")); |
| | | ownerCarPo.setState(OwnerCarDto.STATE_NORMAL); //1001 正常状态,2002 车位释放欠费状态 3003 车位释放 |
| | | ownerCarPo.setCarTypeCd(OwnerCarDto.CAR_TYPE_TEMP); //1001 业主车辆 1002 成员车辆 1003 临时车 |
| | | ownerCarPo.setMemberId(reqJson.getString("ownerId")); |
| | | ownerCarV1InnerServiceSMOImpl.saveOwnerCar(ownerCarPo); |
| | | //添加车辆属性 |
| | | OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo(); |
| | | ownerCarAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_cartId)); |
| | | ownerCarAttrPo.setCarId(ownerCarPo.getCarId()); |
| | | ownerCarAttrPo.setCommunityId(ownerCarPo.getCommunityId()); |
| | | ownerCarAttrPo.setSpecCd("6443000036"); //6443000036业主车辆 |
| | | ownerCarAttrPo.setValue("true"); //预约车 |
| | | ownerCarAttrPo.setbId("-1"); |
| | | ownerCarAttrInnerServiceSMOImpl.saveOwnerCarAttr(ownerCarAttrPo); |
| | | //更改车位状态 |
| | | ParkingSpacePo parkingSpacePo = new ParkingSpacePo(); |
| | | parkingSpacePo.setPsId(reqJson.getString("psId")); |
| | | parkingSpacePo.setState("H"); //车位状态 出售 S,出租 H ,空闲 F |
| | | parkingSpaceInnerServiceSMOImpl.updateParkingSpace(parkingSpacePo); |
| | | } |
| | | if (existCar) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_OK, "访客信息登记成功,车辆已经存在预约,请您在预约到期后,再次进行车辆预约,谢谢!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | |
| | | if (specifiedTimes) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_OK, "访客信息登记成功,您已经超过预约车辆登记次数限制,车辆将无法自动审核!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | if (freeSpace) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_OK, "访客信息登记成功,当前停车场已无空闲车位,登记车辆将暂时不能进入停车场,请您合理安排出行。"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | 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.CommunitySettingFactory; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarV1InnerServiceSMO; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.ownerCarAttr.OwnerCarAttrPo; |
| | | import com.java110.po.parking.ParkingSpacePo; |
| | | import com.java110.utils.constant.ServiceCodeVisitConstant; |
| | | 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.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * 保存访客登记侦听 |
| | |
| | | |
| | | @Autowired |
| | | private IVisitBMO visitBMOImpl; |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarV1InnerServiceSMO ownerCarV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | //键 |
| | | public static final String CAR_FREE_TIME = "CAR_FREE_TIME"; |
| | | |
| | | //键 |
| | | public static final String ASCRIPTION_CAR_AREA_ID = "ASCRIPTION_CAR_AREA_ID"; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) throws ParseException { |
| | | //是否有空闲车位 |
| | | boolean freeSpace = false; |
| | | //是否存在车辆 |
| | | boolean existCar = false; |
| | | //校验车牌号是否存在 |
| | | OwnerCarDto ownerCarDto1 = new OwnerCarDto(); |
| | | ownerCarDto1.setCommunityId(reqJson.getString("communityId")); |
| | | ownerCarDto1.setCarNum(reqJson.getString("carNum")); |
| | | int count = ownerCarInnerServiceSMOImpl.queryOwnerCarsCount(ownerCarDto1); |
| | | if (count > 0) { |
| | | existCar = true; |
| | | reqJson.put("psId", "-1"); |
| | | } |
| | | //flag审核操作 并且 审核通过 state=1 并且业主车辆不存在的情况先existCar=false |
| | | if (reqJson.containsKey("flag") && !StringUtil.isEmpty(reqJson.getString("flag")) && reqJson.getString("flag").equals("1") |
| | | && reqJson.containsKey("state") && !StringUtil.isEmpty(reqJson.getString("state")) && reqJson.getString("state").equals("1") |
| | | && !existCar) { |
| | | //获取预约车免费时长的值 |
| | | String freeTime = CommunitySettingFactory.getValue(reqJson.getString("communityId"), CAR_FREE_TIME); |
| | | String visitTime = reqJson.getString("visitTime"); |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date time = df.parse(visitTime); |
| | | Calendar newTime = Calendar.getInstance(); |
| | | newTime.setTime(time); |
| | | newTime.add(Calendar.MINUTE, Integer.parseInt(freeTime));//日期加上分钟 |
| | | Date newDate = newTime.getTime(); |
| | | String finishFreeTime = df.format(newDate); |
| | | reqJson.put("freeTime", finishFreeTime); |
| | | |
| | | //获取小区配置里配置的停车场id |
| | | String parkingAreaId = CommunitySettingFactory.getValue(reqJson.getString("communityId"), ASCRIPTION_CAR_AREA_ID); |
| | | if (StringUtil.isEmpty(parkingAreaId)) { //如果没有配置停车场id,就随便分配该小区下一个空闲车位 |
| | | ParkingSpaceDto parkingSpace = new ParkingSpaceDto(); |
| | | parkingSpace.setCommunityId(reqJson.getString("communityId")); |
| | | parkingSpace.setState("F"); //车位状态 出售 S,出租 H ,空闲 F |
| | | parkingSpace.setParkingType("1"); //1:普通车位 2:子母车位 3:豪华车位 |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpace); |
| | | if (parkingSpaceDtos == null || parkingSpaceDtos.size() < 1) { |
| | | freeSpace = true; |
| | | } else { |
| | | //随机生成一个不大于集合长度的整数 |
| | | Random random = new Random(); |
| | | int i = random.nextInt(parkingSpaceDtos.size()); |
| | | //获取车位id |
| | | String psId = parkingSpaceDtos.get(i).getPsId(); |
| | | reqJson.put("psId", psId); |
| | | } |
| | | } else { |
| | | ParkingSpaceDto parkingSpace = new ParkingSpaceDto(); |
| | | parkingSpace.setCommunityId(reqJson.getString("communityId")); |
| | | parkingSpace.setPaId(parkingAreaId); //停车场id |
| | | parkingSpace.setState("F"); //车位状态 出售 S,出租 H ,空闲 F |
| | | parkingSpace.setParkingType("1"); //1:普通车位 2:子母车位 3:豪华车位 |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpace); |
| | | if (parkingSpaceDtos == null || parkingSpaceDtos.size() < 1) { |
| | | freeSpace = true; |
| | | } else { |
| | | //随机生成一个不大于集合长度的整数 |
| | | Random random = new Random(); |
| | | int i = random.nextInt(parkingSpaceDtos.size()); |
| | | //获取车位id |
| | | String psId = parkingSpaceDtos.get(i).getPsId(); |
| | | reqJson.put("psId", psId); |
| | | } |
| | | } |
| | | } |
| | | String result = ""; |
| | | if (reqJson.containsKey("state") && !StringUtil.isEmpty(reqJson.getString("state")) && reqJson.getString("state").equals("1")) { |
| | | result = "审核通过!"; |
| | | } else if (reqJson.containsKey("state") && !StringUtil.isEmpty(reqJson.getString("state")) && reqJson.getString("state").equals("2")) { |
| | | result = "审核不通过!"; |
| | | } |
| | | if (existCar) { |
| | | result = "访客信息审核成功,车辆已经存在预约,请您在预约到期后,再次进行车辆预约,谢谢!"; |
| | | } |
| | | if (freeSpace) { |
| | | result = "访客信息审核成功,当前停车场已无空闲车位,登记车辆将暂时不能进入停车场,请您合理安排出行。"; |
| | | } |
| | | reqJson.put("stateRemark", result); |
| | | visitBMOImpl.updateVisit(reqJson, context); |
| | | commit(context); |
| | | if (existCar) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "访客信息审核成功,车辆已经存在预约,请您在预约到期后,再次进行车辆预约,谢谢!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | if (freeSpace) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "访客信息审核成功,当前停车场已无空闲车位,登记车辆将暂时不能进入停车场,请您合理安排出行。"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | //审核通过且有车位就更新车位状态 |
| | | if (reqJson.containsKey("state") && !StringUtil.isEmpty(reqJson.getString("state")) && reqJson.getString("state").equals("1") |
| | | && reqJson.containsKey("flag") && !StringUtil.isEmpty(reqJson.getString("flag")) && reqJson.getString("flag").equals("1") |
| | | && !existCar) { |
| | | ParkingSpaceDto parkingSpace = new ParkingSpaceDto(); |
| | | parkingSpace.setPsId(reqJson.getString("psId")); |
| | | //查询停车位 |
| | | List<ParkingSpaceDto> parkingSpaces = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpace); |
| | | Assert.listOnlyOne(parkingSpaces, "查询停车位错误!"); |
| | | //添加车辆信息 |
| | | OwnerCarPo ownerCarPo = new OwnerCarPo(); |
| | | ownerCarPo.setCarId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_carId)); |
| | | ownerCarPo.setOwnerId(reqJson.getString("ownerId")); |
| | | ownerCarPo.setbId("-1"); |
| | | ownerCarPo.setCarNum(reqJson.getString("carNum")); |
| | | ownerCarPo.setCarBrand("无(预约车)"); |
| | | ownerCarPo.setCarType("9901"); |
| | | ownerCarPo.setCarColor("无(预约车)"); |
| | | ownerCarPo.setPsId(reqJson.getString("psId")); |
| | | ownerCarPo.setUserId(context.getUserId()); |
| | | ownerCarPo.setRemark("访客登记预约车"); |
| | | ownerCarPo.setCommunityId(reqJson.getString("communityId")); |
| | | ownerCarPo.setStartTime(reqJson.getString("visitTime")); |
| | | ownerCarPo.setEndTime(reqJson.getString("freeTime")); |
| | | ownerCarPo.setState(OwnerCarDto.STATE_NORMAL); //1001 正常状态,2002 车位释放欠费状态 3003 车位释放 |
| | | ownerCarPo.setCarTypeCd(OwnerCarDto.CAR_TYPE_TEMP); //1001 业主车辆 1002 成员车辆 1003 临时车 |
| | | ownerCarPo.setMemberId(reqJson.getString("ownerId")); |
| | | ownerCarV1InnerServiceSMOImpl.saveOwnerCar(ownerCarPo); |
| | | //添加车辆属性 |
| | | OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo(); |
| | | ownerCarAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_cartId)); |
| | | ownerCarAttrPo.setCarId(ownerCarPo.getCarId()); |
| | | ownerCarAttrPo.setCommunityId(ownerCarPo.getCommunityId()); |
| | | ownerCarAttrPo.setSpecCd("6443000036"); //6443000036业主车辆 |
| | | ownerCarAttrPo.setValue("true"); //预约车 |
| | | ownerCarAttrPo.setbId("-1"); |
| | | ownerCarAttrInnerServiceSMOImpl.saveOwnerCarAttr(ownerCarAttrPo); |
| | | //更新车位状态 |
| | | ParkingSpacePo parkingSpacePo = new ParkingSpacePo(); |
| | | parkingSpacePo.setPsId(reqJson.getString("psId")); |
| | | parkingSpacePo.setState("H"); //车位状态 出售 S,出租 H ,空闲 F |
| | | parkingSpaceInnerServiceSMOImpl.updateParkingSpace(parkingSpacePo); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | @RestController |
| | | @RequestMapping("/repair") |
| | | public class RepairApi { |
| | | |
| | | @Autowired |
| | | private IAppraiseRepairBMO appraiseRepairBMOImpl; |
| | | |
| | | @Autowired |
| | | private ISaveRepairReturnVisitBMO saveRepairReturnVisitBMOImpl; |
| | | |
| | | @Autowired |
| | | private IUpdateRepairReturnVisitBMO updateRepairReturnVisitBMOImpl; |
| | | |
| | | @Autowired |
| | | private IDeleteRepairReturnVisitBMO deleteRepairReturnVisitBMOImpl; |
| | | |
| | |
| | | * @path /app/repair/saveRepairReturnVisit |
| | | */ |
| | | @RequestMapping(value = "/saveRepairReturnVisit", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveRepairReturnVisit( |
| | | @RequestHeader(value = "user-id") String userId, |
| | | @RequestHeader(value = "user-name") String userName, |
| | | @RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> saveRepairReturnVisit(@RequestHeader(value = "user-id") String userId, |
| | | @RequestHeader(value = "user-name") String userName, |
| | | @RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "repairId", "请求报文中未包含repairId"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "visitType", "请求报文中未包含满意度"); |
| | | Assert.hasKeyAndValue(reqJson, "context", "请求报文中未包含context"); |
| | | |
| | | |
| | | RepairReturnVisitPo repairReturnVisitPo = BeanConvertUtil.covertBean(reqJson, RepairReturnVisitPo.class); |
| | | repairReturnVisitPo.setVisitPersonId(userId); |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryRepairReturnVisit", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryRepairReturnVisit(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "repairId",required = false) String repairId, |
| | | @RequestParam(value = "repairName",required = false) String repairName, |
| | | @RequestParam(value = "tel",required = false) String tel, |
| | | @RequestParam(value = "repairType",required = false) String repairType, |
| | | @RequestParam(value = "repairId", required = false) String repairId, |
| | | @RequestParam(value = "repairName", required = false) String repairName, |
| | | @RequestParam(value = "tel", required = false) String tel, |
| | | @RequestParam(value = "repairType", required = false) String repairType, |
| | | @RequestParam(value = "state") String state, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | |
| | | |
| | | import com.java110.po.repairReturnVisit.RepairReturnVisitPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface ISaveRepairReturnVisitBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加报修回访 |
| | | * add by wuxw |
| | | * |
| | | * @param repairReturnVisitPo |
| | | * @return |
| | | */ |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | repairUserDto.setState(RepairUserDto.STATE_CLOSE); |
| | | } |
| | | //查询报修派单状态 |
| | | List<RepairUserDto> repairUserDtos = repairUserInnerServiceSMOImpl.queryRepairUsers(repairUserDto); |
| | | Assert.listOnlyOne(repairUserDtos, "信息错误"); |
| | | List<RepairUserDto> repairUserDtos = new ArrayList<>(); |
| | | List<RepairUserDto> repairUsers = repairUserInnerServiceSMOImpl.queryRepairUsers(repairUserDto); |
| | | if (repairUsers != null && repairUsers.size() > 0) { |
| | | repairUserDtos.add(repairUsers.get(repairUsers.size() - 1)); |
| | | } else if (repairUsers == null && repairUsers.size() < 1) { |
| | | throw new IllegalArgumentException("信息错误!"); |
| | | } |
| | | RepairUserPo repairUserPo = new RepairUserPo(); |
| | | repairUserPo.setRuId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ruId)); |
| | | repairUserPo.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | |
| | | businessVisitInfo.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存访客信息信息 入参 businessVisitInfo : {}",businessVisitInfo); |
| | | businessVisitInfo.put("visitTime",new Date()); |
| | | int saveFlag = sqlSessionTemplate.insert("visitServiceDaoImpl.saveBusinessVisitInfo",businessVisitInfo); |
| | | |
| | | if(saveFlag < 1){ |
| | |
| | | businessVisitInfo.put("reasonType", businessVisitInfo.get("reason_type")); |
| | | businessVisitInfo.put("state", businessVisitInfo.get("state")); |
| | | businessVisitInfo.put("stateRemark", businessVisitInfo.get("state_remark")); |
| | | businessVisitInfo.put("psId", businessVisitInfo.get("ps_id")); |
| | | businessVisitInfo.put("freeTime", businessVisitInfo.get("free_time")); |
| | | businessVisitInfo.put("reasonType", businessVisitInfo.get("reason_type")); |
| | | businessVisitInfo.put("recordState", businessVisitInfo.get("record_state")); |
| | | businessVisitInfo.remove("bId"); |
| | | businessVisitInfo.put("statusCd", statusCd); |
| | | } |
| | |
| | | currentVisitInfo.put("reasonType", currentVisitInfo.get("reason_type")); |
| | | currentVisitInfo.put("state", currentVisitInfo.get("state")); |
| | | currentVisitInfo.put("stateRemark", currentVisitInfo.get("state_remark")); |
| | | currentVisitInfo.put("psId", currentVisitInfo.get("ps_id")); |
| | | currentVisitInfo.put("freeTime", currentVisitInfo.get("free_time")); |
| | | currentVisitInfo.put("reasonType", currentVisitInfo.get("reason_type")); |
| | | currentVisitInfo.put("recordState", currentVisitInfo.get("record_state")); |
| | | currentVisitInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | getVisitServiceDaoImpl().saveBusinessVisitInfo(currentVisitInfo); |
| | | |
| | |
| | | package com.java110.community.smo.impl; |
| | | |
| | | |
| | | import com.java110.community.dao.IRoomAttrServiceDao; |
| | | import com.java110.community.dao.IRoomServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | |
| | | package com.java110.community.smo.impl; |
| | | |
| | | |
| | | import com.java110.po.owner.VisitPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.community.dao.IVisitServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.intf.community.IVisitInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.visit.VisitDto; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public List<VisitDto> queryVisits(@RequestBody VisitDto visitDto) { |
| | | public List<VisitDto> queryVisits(@RequestBody VisitDto visitDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | |
| | | */ |
| | | private void refreshVisit(VisitDto visit, List<UserDto> users) { |
| | | for (UserDto user : users) { |
| | | if (visit.getUserId().equals(user.getUserId())) { |
| | | if (!StringUtil.isEmpty(visit.getUserId()) && visit.getUserId().equals(user.getUserId())) { |
| | | BeanConvertUtil.covertBean(user, visit); |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | public int queryVisitsCount(@RequestBody VisitDto visitDto) { |
| | | return visitServiceDaoImpl.queryVisitsCount(BeanConvertUtil.beanCovertMap(visitDto)); } |
| | | return visitServiceDaoImpl.queryVisitsCount(BeanConvertUtil.beanCovertMap(visitDto)); |
| | | } |
| | | |
| | | @Override |
| | | public void saveVisit(@RequestBody VisitPo visitPo) { |
| | | visitServiceDaoImpl.saveBusinessVisitInfo(BeanConvertUtil.beanCovertMap(visitPo)); |
| | | } |
| | | |
| | | @Override |
| | | public void updateVisit(@RequestBody VisitPo visitPo) { |
| | | visitServiceDaoImpl.updateVisitInfoInstance(BeanConvertUtil.beanCovertMap(visitPo)); |
| | | } |
| | | |
| | | public IVisitServiceDao getVisitServiceDaoImpl() { |
| | | return visitServiceDaoImpl; |
| | |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.feeAccountDetail.IFeeAccountDetailServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.feeAccountDetail.FeeAccountDetailPo; |
| | | import com.java110.po.owner.RepairPoolPo; |
| | | import com.java110.po.owner.RepairUserPo; |
| | | import com.java110.po.payFeeDetailDiscount.PayFeeDetailDiscountPo; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @Java110Cmd(serviceCode = "fee.payFee") |
| | | public class PayFeeCmd extends AbstractServiceCmdListener { |
| | | private static Logger logger = LoggerFactory.getLogger(PayFeeCmd.class); |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(PayFeeCmd.class); |
| | | |
| | | @Autowired |
| | | private IPayFeeV1InnerServiceSMO payFeeV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IPayFeeDetailNewV1InnerServiceSMO payFeeDetailNewV1InnerServiceSMOImpl; |
| | | |
| | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IAccountInnerServiceSMO accountInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IComputeFeeSMO computeFeeSMOImpl; |
| | | |
| | | @Autowired |
| | | private IPayFeeDetailDiscountNewV1InnerServiceSMO payFeeDetailDiscountNewV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IRepairPoolNewV1InnerServiceSMO repairPoolNewV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IRepairUserNewV1InnerServiceSMO repairUserNewV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ICouponUserV1InnerServiceSMO couponUserV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ICouponUserDetailV1InnerServiceSMO couponUserDetailV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarNewV1InnerServiceSMO ownerCarNewV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeAccountDetailServiceSMO feeAccountDetailServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | |
| | | logger.error("比较费用日期失败", e); |
| | | } |
| | | } |
| | | String selectUserAccount = reqJson.getString("selectUserAccount"); |
| | | JSONArray params = JSONArray.parseArray(selectUserAccount); |
| | | for (int paramIndex = 0; paramIndex < params.size(); paramIndex++) { |
| | | JSONObject param = params.getJSONObject(paramIndex); |
| | | String maximumNumber = param.getString("maximumNumber"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | DistributedLock.waitGetDistributedLock(key, requestId); |
| | | JSONObject feeDetail = addFeeDetail(paramObj); |
| | | PayFeeDetailPo payFeeDetailPo = BeanConvertUtil.covertBean(feeDetail, PayFeeDetailPo.class); |
| | | //判断选择的账号 |
| | | JSONArray jsonArray = paramObj.getJSONArray("selectUserAccount"); |
| | | if (jsonArray == null || jsonArray.size() < 1) { |
| | | FeeAccountDetailPo feeAccountDetailPo = new FeeAccountDetailPo(); |
| | | feeAccountDetailPo.setFadId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_fadId)); |
| | | feeAccountDetailPo.setDetailId(payFeeDetailPo.getDetailId()); |
| | | feeAccountDetailPo.setCommunityId(payFeeDetailPo.getCommunityId()); |
| | | feeAccountDetailPo.setState("1001"); //1001 无抵扣 1002 现金账户抵扣 1003 积分账户抵扣 1004 优惠券抵扣 |
| | | feeAccountDetailPo.setAmount(paramObj.getString("receivedAmount")); |
| | | feeAccountDetailServiceSMOImpl.saveFeeAccountDetail(feeAccountDetailPo); |
| | | } |
| | | for (int columnIndex = 0; columnIndex < jsonArray.size(); columnIndex++) { |
| | | JSONObject param = jsonArray.getJSONObject(columnIndex); |
| | | if (!StringUtil.isEmpty(param.getString("acctType")) && param.getString("acctType").equals("2004")) { //积分账户 |
| | | //账户金额 |
| | | BigDecimal amount = new BigDecimal(param.getString("amount")); |
| | | //获取最大抵扣积分 |
| | | BigDecimal maximumNumber = new BigDecimal(param.getString("maximumNumber")); |
| | | //获取积分抵扣 |
| | | BigDecimal deductionProportion = new BigDecimal(param.getString("deductionProportion")); |
| | | int flag = amount.compareTo(maximumNumber); |
| | | BigDecimal redepositAmount = new BigDecimal("0.00"); |
| | | if (flag == 1) { //账户积分大于最大使用积分,就用最大使用积分抵扣 |
| | | redepositAmount = maximumNumber; |
| | | } |
| | | if (flag > -1) { //账户积分大于等于最大使用积分,就用最大使用积分抵扣 |
| | | redepositAmount = maximumNumber; |
| | | } |
| | | if (flag == -1) { //账户积分小于最大使用积分,就用账户积分抵扣 |
| | | redepositAmount = amount; |
| | | } |
| | | if (flag < 1) { //账户积分小于等于最大使用积分,就用账户积分抵扣 |
| | | redepositAmount = amount; |
| | | } |
| | | if (flag == 0) { //账户积分等于最大使用积分 |
| | | redepositAmount = amount; |
| | | } |
| | | //计算积分换算的金额 |
| | | BigDecimal divide = redepositAmount.divide(deductionProportion); |
| | | BigDecimal receivedAmount = new BigDecimal(payFeeDetailPo.getReceivedAmount()); |
| | | //计算实付金额 |
| | | int flag2 = divide.compareTo(receivedAmount); |
| | | BigDecimal subtract = new BigDecimal("0.00"); |
| | | //生成抵扣明细记录 |
| | | FeeAccountDetailPo feeAccountDetailPo = new FeeAccountDetailPo(); |
| | | if (flag2 == -1) { //积分换算金额小于实付金额 |
| | | subtract = receivedAmount.subtract(divide); |
| | | feeAccountDetailPo.setAmount(divide.toString()); //积分抵扣金额 |
| | | } else if (flag < 1) { //积分换算金额小于等于实付金额 |
| | | subtract = receivedAmount.subtract(divide); |
| | | feeAccountDetailPo.setAmount(divide.toString()); //积分抵扣金额 |
| | | } else { |
| | | feeAccountDetailPo.setAmount(receivedAmount.toString()); //积分抵扣金额 |
| | | } |
| | | payFeeDetailPo.setReceivedAmount(subtract.toString()); |
| | | feeAccountDetailPo.setFadId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_fadId)); |
| | | feeAccountDetailPo.setDetailId(payFeeDetailPo.getDetailId()); |
| | | feeAccountDetailPo.setCommunityId(payFeeDetailPo.getCommunityId()); |
| | | feeAccountDetailPo.setState("1003"); //1001 无抵扣 1002 现金账户抵扣 1003 积分账户抵扣 1004 优惠券抵扣 |
| | | feeAccountDetailServiceSMOImpl.saveFeeAccountDetail(feeAccountDetailPo); |
| | | } else if (!StringUtil.isEmpty(param.getString("acctType")) && param.getString("acctType").equals("2003")) { //现金账户 |
| | | //账户金额 |
| | | BigDecimal amount = new BigDecimal(param.getString("amount")); |
| | | //实收金额 |
| | | BigDecimal receivedAmount = new BigDecimal(payFeeDetailPo.getReceivedAmount()); |
| | | int flag = amount.compareTo(receivedAmount); |
| | | BigDecimal redepositAmount = new BigDecimal("0.00"); |
| | | if (flag == 1) { //现金账户大于实收金额,就用实收金额 |
| | | redepositAmount = receivedAmount; |
| | | } |
| | | if (flag > -1) { //现金账户大于等于实收金额,就用实收金额 |
| | | redepositAmount = receivedAmount; |
| | | } |
| | | if (flag == -1) { //现金账户小于实收金额,就用现金账户 |
| | | redepositAmount = amount; |
| | | } |
| | | if (flag < 1) { //现金账户小于等于实收金额,就用现金账户 |
| | | redepositAmount = amount; |
| | | } |
| | | if (flag == 0) { //现金账户等于实收金额 |
| | | redepositAmount = amount; |
| | | } |
| | | //生成抵扣明细记录 |
| | | FeeAccountDetailPo feeAccountDetailPo = new FeeAccountDetailPo(); |
| | | feeAccountDetailPo.setFadId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_fadId)); |
| | | feeAccountDetailPo.setDetailId(payFeeDetailPo.getDetailId()); |
| | | feeAccountDetailPo.setCommunityId(payFeeDetailPo.getCommunityId()); |
| | | feeAccountDetailPo.setState("1002"); //1001 无抵扣 1002 现金账户抵扣 1003 积分账户抵扣 1004 优惠券抵扣 |
| | | feeAccountDetailPo.setAmount(redepositAmount.toString()); //积分抵扣金额 |
| | | feeAccountDetailServiceSMOImpl.saveFeeAccountDetail(feeAccountDetailPo); |
| | | } |
| | | } |
| | | int flag = payFeeDetailNewV1InnerServiceSMOImpl.savePayFeeDetailNew(payFeeDetailPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("缴费失败"); |
| | |
| | | if (jsonArray == null || jsonArray.size() < 1) { |
| | | return; |
| | | } |
| | | //应收款 totalFeePrice |
| | | BigDecimal totalFeePrice = new BigDecimal(paramObj.getString("totalFeePrice")); //应收款 |
| | | //实收款 receivedAmount |
| | | BigDecimal receivedAmount = new BigDecimal(paramObj.getString("receivedAmount")); //实收款(扣款金额) |
| | | |
| | | BigDecimal redepositAmount = new BigDecimal("0.00");//抵扣金额 |
| | | List<AccountDto> accountDtos = new ArrayList<>(); |
| | | for (int columnIndex = 0; columnIndex < jsonArray.size(); columnIndex++) { |
| | | //应收款 totalFeePrice |
| | | BigDecimal totalFeePrice = new BigDecimal(paramObj.getString("totalFeePrice")); //应收款 |
| | | //实收款 receivedAmount |
| | | BigDecimal receivedAmount = new BigDecimal(paramObj.getString("receivedAmount")); //实收款(扣款金额) |
| | | BigDecimal redepositAmount = new BigDecimal("0.00");//抵扣金额 |
| | | JSONObject param = jsonArray.getJSONObject(columnIndex); |
| | | if (!StringUtil.isEmpty(param.getString("acctType")) && param.getString("acctType").equals("2004")) { //积分账户 |
| | | //获取抵扣比例 |
| | | BigDecimal deductionProportion = new BigDecimal(param.getString("deductionProportion")); |
| | | //计算实收款所扣的积分 |
| | | BigDecimal multiply = receivedAmount.multiply(deductionProportion); |
| | | receivedAmount = multiply; |
| | | } |
| | | //账户金额 |
| | | BigDecimal amount = new BigDecimal(param.getString("amount")); //账户金额 |
| | | BigDecimal amount = new BigDecimal(param.getString("amount")); |
| | | int flag = amount.compareTo(receivedAmount); |
| | | if (flag == -1) {//账户金额小于实收款 |
| | | receivedAmount = receivedAmount.subtract(amount); |
| | | if (flag == -1) { //账户金额小于实收款 |
| | | redepositAmount = amount;//抵扣金额 |
| | | } else { |
| | | redepositAmount = receivedAmount;//抵扣金额 |
| | | } |
| | | //剩余金额 |
| | | amount.compareTo(receivedAmount); |
| | | if (!StringUtil.isEmpty(param.getString("acctType")) && param.getString("acctType").equals("2004")) { |
| | | //获取最大抵扣积分 |
| | | BigDecimal maximumNumber = new BigDecimal(param.getString("maximumNumber")); |
| | | //获取积分抵扣 |
| | | BigDecimal deductionProportion = new BigDecimal(param.getString("deductionProportion")); |
| | | int flag2 = amount.compareTo(maximumNumber); |
| | | if (flag2 == 1) { //账户积分大于最大使用积分,就用最大使用积分抵扣 |
| | | int flag3 = maximumNumber.compareTo(receivedAmount); |
| | | if (flag3 == 1) { //如果最大使用积分大于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else if (flag3 > -1) {//如果最大使用积分大于等于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else { |
| | | redepositAmount = maximumNumber; |
| | | } |
| | | } |
| | | if (flag2 > -1) { //账户积分大于等于最大使用积分,就用最大使用积分抵扣 |
| | | int flag3 = maximumNumber.compareTo(receivedAmount); |
| | | if (flag3 == 1) { //如果最大使用积分大于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else if (flag3 > -1) {//如果最大使用积分大于等于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else { |
| | | redepositAmount = maximumNumber; |
| | | } |
| | | } |
| | | if (flag2 == -1) { //账户积分小于最大使用积分,就用账户积分抵扣 |
| | | int flag3 = amount.compareTo(receivedAmount); |
| | | if (flag3 == 1) { //如果积分账户大于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else if (flag3 > -1) {//如果积分账户大于等于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else { |
| | | redepositAmount = amount; |
| | | } |
| | | } |
| | | if (flag2 < 1) { //账户积分小于等于最大使用积分,就用账户积分抵扣 |
| | | int flag3 = amount.compareTo(receivedAmount); |
| | | if (flag3 == 1) { //如果积分账户大于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else if (flag3 > -1) {//如果积分账户大于等于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else { |
| | | redepositAmount = amount; |
| | | } |
| | | } |
| | | if (flag2 == 0) { //账户积分等于最大使用积分 |
| | | int flag3 = amount.compareTo(receivedAmount); |
| | | if (flag3 == 1) { //如果积分账户大于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else if (flag3 > -1) {//如果积分账户大于等于实收金额抵扣积分,就把实收金额抵扣积分赋值给抵扣积分 |
| | | redepositAmount = receivedAmount; |
| | | } else { |
| | | redepositAmount = amount; |
| | | } |
| | | } |
| | | //计算积分换算的金额 |
| | | BigDecimal divide = redepositAmount.divide(deductionProportion); |
| | | BigDecimal divide1 = receivedAmount.divide(deductionProportion); |
| | | //计算还需支付的金额 |
| | | BigDecimal subtract = divide1.subtract(divide); |
| | | paramObj.put("receivedAmount", subtract); |
| | | } |
| | | String acctId = param.getString("acctId"); |
| | | if (StringUtil.isEmpty(acctId)) { |
| | | throw new IllegalArgumentException("账户id为空!"); |
| | |
| | | AccountDto accountDto = new AccountDto(); |
| | | accountDto.setAcctId(acctId); |
| | | //查询账户金额 |
| | | List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | Assert.listOnlyOne(accountDtos, "查询账户金额错误!"); |
| | | if (accountDtos != null && accountDtos.size() > 0) { |
| | | AccountDto accountDto1 = accountDtos.get(0); |
| | |
| | | throw new UnsupportedOperationException("账户金额抵扣不足,请您确认账户金额!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | AccountDetailPo accountDetailPo = new AccountDetailPo(); |
| | | accountDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | int flag1 = redepositAmount.compareTo(BigDecimal.ZERO); |
| | |
| | | throw new CmdException("扣款失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private static Calendar getTargetEndTime(Calendar endCalender, Double cycles) { |
| New file |
| | |
| | | package com.java110.fee.dao; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 抵扣明细接口类 |
| | | * |
| | | * @author fqz |
| | | * @date 2022-05-16 |
| | | */ |
| | | public interface IFeeAccountDetailServiceDao { |
| | | |
| | | List<Map> getFeeAccountDetailsInfo(Map info); |
| | | |
| | | int queryFeeAccountDetailsCount(Map info); |
| | | |
| | | void saveFeeAccountDetail(Map info); |
| | | |
| | | } |
| | |
| | | package com.java110.fee.dao; |
| | | |
| | | |
| | | import com.java110.utils.exception.DAOException; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * 费用明细组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 费用明细服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * <p> |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IFeeDetailServiceDao { |
| | | |
| | | /** |
| | | * 保存 费用明细信息 |
| | | * |
| | | * @param businessFeeDetailInfo 费用明细信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessFeeDetailInfo(Map businessFeeDetailInfo) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询费用明细信息(business过程) |
| | | * 根据bId 查询费用明细信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 费用明细信息 |
| | | * @throws DAOException DAO异常 |
| | |
| | | List<Map> getBusinessFeeDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存 费用明细信息 Business数据到 Instance中 |
| | | * |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveFeeDetailInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询费用明细信息(instance过程) |
| | | * 根据bId 查询费用明细信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 费用明细信息 |
| | | * @throws DAOException DAO异常 |
| | |
| | | List<Map> getFeeDetailInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改费用明细信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 保存 费用明细信息 |
| | | * |
| | | * @param feeDetail 费用明细信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| New file |
| | |
| | | package com.java110.fee.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.fee.dao.IFeeAccountDetailServiceDao; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service("feeAccountDetailServiceDaoImpl") |
| | | public class FeeAccountDetailServiceDaoImpl extends BaseServiceDao implements IFeeAccountDetailServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(FeeAccountDetailServiceDaoImpl.class); |
| | | |
| | | @Override |
| | | public List<Map> getFeeAccountDetailsInfo(Map info) { |
| | | logger.debug("查询费用明细信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessFeeAccountDetailInfos = sqlSessionTemplate.selectList("feeAccountDetailServiceDaoImpl.getFeeAccountDetailInfo", info); |
| | | |
| | | return businessFeeAccountDetailInfos; |
| | | } |
| | | |
| | | @Override |
| | | public int queryFeeAccountDetailsCount(Map info) { |
| | | logger.debug("查询费用明细数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessFeeAccountDetailInfos = sqlSessionTemplate.selectList("feeAccountDetailServiceDaoImpl.queryFeeAccountDetailsCount", info); |
| | | if (businessFeeAccountDetailInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessFeeAccountDetailInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | @Override |
| | | public void saveFeeAccountDetail(Map info) { |
| | | logger.debug("保存明细 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("feeAccountDetailServiceDaoImpl.saveFeeAccountDetail", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存明细 数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.feeAccountDetail.FeeAccountDetailDto; |
| | | import com.java110.fee.dao.IFeeAccountDetailServiceDao; |
| | | import com.java110.intf.feeAccountDetail.IFeeAccountDetailServiceSMO; |
| | | import com.java110.po.feeAccountDetail.FeeAccountDetailPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | public class FeeAccountDetailServiceSMOImpl extends BaseServiceSMO implements IFeeAccountDetailServiceSMO { |
| | | |
| | | @Autowired |
| | | private IFeeAccountDetailServiceDao feeAccountDetailServiceDaoImpl; |
| | | |
| | | @Override |
| | | public List<FeeAccountDetailDto> queryFeeAccountDetails(@RequestBody FeeAccountDetailDto feeAccountDetailDto) { |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = feeAccountDetailDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | feeAccountDetailDto.setPage((page - 1) * feeAccountDetailDto.getRow()); |
| | | } |
| | | |
| | | List<FeeAccountDetailDto> feeAccountDetails = BeanConvertUtil.covertBeanList(feeAccountDetailServiceDaoImpl.getFeeAccountDetailsInfo(BeanConvertUtil.beanCovertMap(feeAccountDetailDto)), FeeAccountDetailDto.class); |
| | | |
| | | return feeAccountDetails; |
| | | } |
| | | |
| | | @Override |
| | | public int queryFeeAccountDetailsCount(@RequestBody FeeAccountDetailDto feeAccountDetailDto) { |
| | | return feeAccountDetailServiceDaoImpl.queryFeeAccountDetailsCount(BeanConvertUtil.beanCovertMap(feeAccountDetailDto)); |
| | | } |
| | | |
| | | @Override |
| | | public int saveFeeAccountDetail(@RequestBody FeeAccountDetailPo feeAccountDetailPo) { |
| | | feeAccountDetailServiceDaoImpl.saveFeeAccountDetail(BeanConvertUtil.beanCovertMap(feeAccountDetailPo)); |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.PageDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用 |
| New file |
| | |
| | | package com.java110.job.adapt.hcGov.visit; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.factory.WechatFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.basePrivilege.BasePrivilegeDto; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.ownerCarAttr.OwnerCarAttrDto; |
| | | import com.java110.dto.parking.ParkingAreaDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | 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.dto.visit.VisitDto; |
| | | import com.java110.entity.order.Business; |
| | | import com.java110.entity.wechat.Content; |
| | | import com.java110.entity.wechat.Data; |
| | | import com.java110.entity.wechat.PropertyFeeTemplateMessage; |
| | | import com.java110.intf.community.ICommunityInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingAreaInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IVisitInnerServiceSMO; |
| | | import com.java110.intf.order.IPrivilegeInnerServiceSMO; |
| | | import com.java110.intf.store.ISmallWeChatInnerServiceSMO; |
| | | import com.java110.intf.store.ISmallWechatAttrInnerServiceSMO; |
| | | import com.java110.intf.user.*; |
| | | import com.java110.job.adapt.DatabusAdaptImpl; |
| | | import com.java110.job.adapt.hcIot.asyn.IIotSendAsyn; |
| | | import com.java110.po.owner.VisitPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 访客登记适配器 |
| | | * |
| | | * @author fqz |
| | | * @date 2022-04-11 |
| | | */ |
| | | @Component(value = "addVisitAdapt") |
| | | public class AddVisitAdapt extends DatabusAdaptImpl { |
| | | |
| | | @Autowired |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IIotSendAsyn hcOwnerVisitAsynImpl; |
| | | |
| | | @Autowired |
| | | private IVisitInnerServiceSMO visitInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IParkingAreaInnerServiceSMO parkingAreaInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMO; |
| | | |
| | | @Autowired |
| | | private ISmallWeChatInnerServiceSMO smallWeChatInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ISmallWechatAttrInnerServiceSMO smallWechatAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IPrivilegeInnerServiceSMO privilegeInnerServiceSMO; |
| | | |
| | | @Autowired |
| | | private IStaffAppAuthInnerServiceSMO staffAppAuthInnerServiceSMO; |
| | | |
| | | @Autowired |
| | | private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private RestTemplate outRestTemplate; |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(AddVisitAdapt.class); |
| | | |
| | | //模板信息推送地址 |
| | | private static String sendMsgUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="; |
| | | |
| | | /** |
| | | * @param business 当前处理业务 |
| | | * @param businesses 所有业务信息 |
| | | */ |
| | | @Override |
| | | public void execute(Business business, List<Business> businesses) { |
| | | JSONObject data = business.getData(); |
| | | if (data.containsKey(VisitPo.class.getSimpleName())) { |
| | | Object bObj = data.get(VisitPo.class.getSimpleName()); |
| | | JSONArray businessVisits = null; |
| | | if (bObj instanceof JSONObject) { |
| | | businessVisits = new JSONArray(); |
| | | businessVisits.add(bObj); |
| | | } else if (bObj instanceof List) { |
| | | businessVisits = JSONArray.parseArray(JSONObject.toJSONString(bObj)); |
| | | } else { |
| | | businessVisits = (JSONArray) bObj; |
| | | } |
| | | for (int bVisitIndex = 0; bVisitIndex < businessVisits.size(); bVisitIndex++) { |
| | | JSONObject businessVisit = businessVisits.getJSONObject(bVisitIndex); |
| | | if (businessVisit.containsKey("state") && !StringUtil.isEmpty(businessVisit.getString("state")) && businessVisit.getString("state").equals("0")) { |
| | | publishMsg(business, businessVisit); |
| | | } |
| | | doAddVisit(business, businessVisit); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 登记成功给有审核权限的员工推送消息 |
| | | * |
| | | * @param business |
| | | * @param businessVisit |
| | | */ |
| | | private void publishMsg(Business business, JSONObject businessVisit) { |
| | | VisitPo visitPo = BeanConvertUtil.covertBean(businessVisit, VisitPo.class); |
| | | //查询小区信息 |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityId(visitPo.getCommunityId()); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMO.queryCommunitys(communityDto); |
| | | Assert.listOnlyOne(communityDtos, "查询小区错误!"); |
| | | //查询公众号配置 |
| | | SmallWeChatDto smallWeChatDto = new SmallWeChatDto(); |
| | | smallWeChatDto.setWeChatType("1100"); |
| | | smallWeChatDto.setObjType(SmallWeChatDto.OBJ_TYPE_COMMUNITY); |
| | | smallWeChatDto.setObjId(visitPo.getCommunityId()); |
| | | List<SmallWeChatDto> smallWeChatDtos = smallWeChatInnerServiceSMOImpl.querySmallWeChats(smallWeChatDto); |
| | | if (smallWeChatDto == null || smallWeChatDtos.size() <= 0) { |
| | | logger.info("未配置微信公众号信息,定时任务执行结束"); |
| | | return; |
| | | } |
| | | SmallWeChatDto weChatDto = smallWeChatDtos.get(0); |
| | | SmallWechatAttrDto smallWechatAttrDto = new SmallWechatAttrDto(); |
| | | smallWechatAttrDto.setCommunityId(visitPo.getCommunityId()); |
| | | smallWechatAttrDto.setWechatId(weChatDto.getWeChatId()); |
| | | smallWechatAttrDto.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_PROCESS_TEMPLATE); |
| | | List<SmallWechatAttrDto> smallWechatAttrDtos = smallWechatAttrInnerServiceSMOImpl.querySmallWechatAttrs(smallWechatAttrDto); |
| | | if (smallWechatAttrDtos == null || smallWechatAttrDtos.size() <= 0) { |
| | | logger.info("未配置微信公众号消息模板"); |
| | | return; |
| | | } |
| | | String templateId = smallWechatAttrDtos.get(0).getValue(); |
| | | String accessToken = WechatFactory.getAccessToken(weChatDto.getAppId(), weChatDto.getAppSecret()); |
| | | if (StringUtil.isEmpty(accessToken)) { |
| | | logger.info("推送微信模板,获取accessToken失败:{}", accessToken); |
| | | return; |
| | | } |
| | | // 根据特定权限查询 有该权限的 员工(预约车审核权限) |
| | | BasePrivilegeDto basePrivilegeDto = new BasePrivilegeDto(); |
| | | basePrivilegeDto.setResource("/reviewVisitJurisdiction"); |
| | | List<UserDto> userDtos = privilegeInnerServiceSMO.queryPrivilegeUsers(basePrivilegeDto); |
| | | String url = sendMsgUrl + accessToken; |
| | | //查询业主信息 |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setOwnerId(visitPo.getOwnerId()); |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto); |
| | | Assert.listOnlyOne(ownerDtos, "查询业主信息错误!"); |
| | | for (UserDto userDto : userDtos) { |
| | | //根据 userId 查询到openId |
| | | StaffAppAuthDto staffAppAuthDto = new StaffAppAuthDto(); |
| | | staffAppAuthDto.setStaffId(userDto.getUserId()); |
| | | staffAppAuthDto.setAppType("WECHAT"); |
| | | List<StaffAppAuthDto> staffAppAuthDtos = staffAppAuthInnerServiceSMO.queryStaffAppAuths(staffAppAuthDto); |
| | | if (staffAppAuthDtos != null && staffAppAuthDtos.size() > 0) { |
| | | String openId = staffAppAuthDtos.get(0).getOpenId(); |
| | | Data data = new Data(); |
| | | PropertyFeeTemplateMessage templateMessage = new PropertyFeeTemplateMessage(); |
| | | templateMessage.setTemplate_id(templateId); |
| | | templateMessage.setTouser(openId); |
| | | data.setFirst(new Content("访客预约车辆,登记信息如下:")); |
| | | data.setKeyword1(new Content(visitPo.getvId())); |
| | | data.setKeyword2(new Content("访客预约车辆-审核")); |
| | | data.setKeyword3(new Content(ownerDtos.get(0).getName())); |
| | | data.setKeyword4(new Content(ownerDtos.get(0).getName() + "提交的访客预约车辆-" + visitPo.getCarNum() + ",需要进行车辆审核。")); |
| | | data.setKeyword5(new Content("待审核")); |
| | | data.setRemark(new Content("请及时处理!")); |
| | | templateMessage.setData(data); |
| | | //获取员工公众号地址 |
| | | 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); |
| | | logger.info("微信模板返回内容:{}", responseEntity); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 审核通过预约车下发 |
| | | * |
| | | * @param business |
| | | * @param businessVisit |
| | | */ |
| | | private void doAddVisit(Business business, JSONObject businessVisit) { |
| | | VisitPo visitPo = BeanConvertUtil.covertBean(businessVisit, VisitPo.class); |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityId(visitPo.getCommunityId()); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | Assert.listNotNull(communityDtos, "未包含小区信息"); |
| | | |
| | | if (!StringUtil.isEmpty(visitPo.getState()) && visitPo.getState().equals("1")) { //状态为审核通过 |
| | | VisitDto visitDto = new VisitDto(); |
| | | visitDto.setvId(visitPo.getvId()); |
| | | List<VisitDto> visits = visitInnerServiceSMOImpl.queryVisits(visitDto); |
| | | Assert.listOnlyOne(visits, "访客信息不存在或存在多条"); |
| | | if (!StringUtil.isEmpty(visits.get(0).getPsId())) { |
| | | //查询停车位 |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setPsId(visits.get(0).getPsId()); |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | Assert.listOnlyOne(parkingSpaceDtos, "访客登记适配器,查询停车位错误!"); |
| | | //查询停车场 |
| | | ParkingAreaDto parkingAreaDto = new ParkingAreaDto(); |
| | | parkingAreaDto.setPaId(parkingSpaceDtos.get(0).getPaId()); |
| | | List<ParkingAreaDto> parkingAreaDtos = parkingAreaInnerServiceSMOImpl.queryParkingAreas(parkingAreaDto); |
| | | Assert.listOnlyOne(parkingAreaDtos, "查询停车场错误!"); |
| | | |
| | | //查询车辆信息 |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | | ownerCarDto.setCarNum(visitPo.getCarNum()); |
| | | ownerCarDto.setCommunityId(visitPo.getCommunityId()); |
| | | List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | Assert.listOnlyOne(ownerCarDtos, "未找到车辆,或存在多条!"); |
| | | |
| | | //查询属性 |
| | | OwnerCarAttrDto ownerCarAttrDto = new OwnerCarAttrDto(); |
| | | ownerCarAttrDto.setCarId(ownerCarDtos.get(0).getCarId()); |
| | | ownerCarAttrDto.setCommunityId(ownerCarDtos.get(0).getCommunityId()); |
| | | List<OwnerCarAttrDto> parkingAreaAttrDtos = ownerCarAttrInnerServiceSMOImpl.queryOwnerCarAttrs(ownerCarAttrDto); |
| | | |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | JSONObject body = new JSONObject(); |
| | | body.put("vId", visits.get(0).getvId()); |
| | | body.put("vName", visits.get(0).getvName()); |
| | | body.put("visitGender", visits.get(0).getVisitGender()); |
| | | body.put("phoneNumber", visits.get(0).getPhoneNumber()); |
| | | body.put("userId", visits.get(0).getUserId()); |
| | | body.put("communityId", visits.get(0).getCommunityId()); |
| | | body.put("ownerId", visits.get(0).getOwnerId()); |
| | | body.put("visitCase", visits.get(0).getVisitCase()); |
| | | body.put("visitTime", df.format(ownerCarDtos.get(0).getStartTime())); |
| | | body.put("departureTime", df.format(ownerCarDtos.get(0).getEndTime())); |
| | | body.put("carNum", visits.get(0).getCarNum()); |
| | | body.put("entourage", visits.get(0).getEntourage()); |
| | | body.put("reasonType", visits.get(0).getReasonType()); |
| | | body.put("state", visits.get(0).getState()); |
| | | body.put("stateRemark", visits.get(0).getStateRemark()); |
| | | body.put("stateName", visits.get(0).getStateName()); |
| | | body.put("paId", parkingAreaDtos.get(0).getPaId()); |
| | | body.put("psId", parkingSpaceDtos.get(0).getPsId()); |
| | | body.put("extCarId", ownerCarDtos.get(0).getCarId()); |
| | | body.put("attrs", parkingAreaAttrDtos); |
| | | body.put("extCommunityId", visits.get(0).getCommunityId()); |
| | | hcOwnerVisitAsynImpl.addVisit(body); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.job.adapt.hcGov.visit; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.factory.WechatFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.owner.OwnerAppUserDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.ownerCarAttr.OwnerCarAttrDto; |
| | | import com.java110.dto.parking.ParkingAreaDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import com.java110.dto.smallWechatAttr.SmallWechatAttrDto; |
| | | import com.java110.dto.visit.VisitDto; |
| | | import com.java110.entity.order.Business; |
| | | import com.java110.entity.wechat.Content; |
| | | import com.java110.entity.wechat.Data; |
| | | import com.java110.entity.wechat.PropertyFeeTemplateMessage; |
| | | import com.java110.intf.community.ICommunityInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingAreaInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IVisitInnerServiceSMO; |
| | | import com.java110.intf.store.ISmallWeChatInnerServiceSMO; |
| | | import com.java110.intf.store.ISmallWechatAttrInnerServiceSMO; |
| | | import com.java110.intf.user.*; |
| | | import com.java110.job.adapt.DatabusAdaptImpl; |
| | | import com.java110.job.adapt.hcIot.asyn.IIotSendAsyn; |
| | | import com.java110.po.owner.VisitPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 访客登记审核适配器 |
| | | * |
| | | * @author fqz |
| | | * @date 2022-04-12 |
| | | */ |
| | | @Component(value = "examineVisitAdapt") |
| | | public class ExamineVisitAdapt extends DatabusAdaptImpl { |
| | | |
| | | @Autowired |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IIotSendAsyn hcOwnerVisitAsynImpl; |
| | | |
| | | @Autowired |
| | | private IVisitInnerServiceSMO visitInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IParkingAreaInnerServiceSMO parkingAreaInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMO; |
| | | |
| | | @Autowired |
| | | private ISmallWeChatInnerServiceSMO smallWeChatInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ISmallWechatAttrInnerServiceSMO smallWechatAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private RestTemplate outRestTemplate; |
| | | |
| | | @Autowired |
| | | private IOwnerInnerServiceSMO ownerInnerServiceSMO; |
| | | |
| | | @Autowired |
| | | private IOwnerAppUserInnerServiceSMO ownerAppUserInnerServiceSMO; |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ExamineVisitAdapt.class); |
| | | |
| | | //模板信息推送地址 |
| | | private static String sendMsgUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="; |
| | | |
| | | /** |
| | | * @param business 当前处理业务 |
| | | * @param businesses 所有业务信息 |
| | | */ |
| | | @Override |
| | | public void execute(Business business, List<Business> businesses) { |
| | | JSONObject data = business.getData(); |
| | | if (data.containsKey(VisitPo.class.getSimpleName())) { |
| | | Object bObj = data.get(VisitPo.class.getSimpleName()); |
| | | JSONArray businessVisits = null; |
| | | if (bObj instanceof JSONObject) { |
| | | businessVisits = new JSONArray(); |
| | | businessVisits.add(bObj); |
| | | } else if (bObj instanceof List) { |
| | | businessVisits = JSONArray.parseArray(JSONObject.toJSONString(bObj)); |
| | | } else { |
| | | businessVisits = (JSONArray) bObj; |
| | | } |
| | | for (int bVisitIndex = 0; bVisitIndex < businessVisits.size(); bVisitIndex++) { |
| | | JSONObject businessVisit = businessVisits.getJSONObject(bVisitIndex); |
| | | if (!StringUtil.isEmpty(businessVisit.getString("flag")) && businessVisit.getString("flag").equals("1")) { |
| | | sendMessage(business, businessVisit); |
| | | } |
| | | if (!StringUtil.isEmpty(businessVisit.getString("flag")) && businessVisit.getString("flag").equals("1") |
| | | && !StringUtil.isEmpty(businessVisit.getString("state")) && businessVisit.getString("state").equals("1")) { //审核通过时走适配器 |
| | | doAddVisit(business, businessVisit); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 给业主推送消息 |
| | | * |
| | | * @param business |
| | | * @param businessVisit |
| | | */ |
| | | private void sendMessage(Business business, JSONObject businessVisit) { |
| | | VisitPo visitPo = BeanConvertUtil.covertBean(businessVisit, VisitPo.class); |
| | | //查询停车位 |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setPsId(visitPo.getPsId()); |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | //查询小区信息 |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityId(visitPo.getCommunityId()); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMO.queryCommunitys(communityDto); |
| | | Assert.listOnlyOne(communityDtos, "查询小区错误!"); |
| | | //查询公众号配置 |
| | | SmallWeChatDto smallWeChatDto = new SmallWeChatDto(); |
| | | smallWeChatDto.setWeChatType("1100"); |
| | | smallWeChatDto.setObjType(SmallWeChatDto.OBJ_TYPE_COMMUNITY); |
| | | smallWeChatDto.setObjId(visitPo.getCommunityId()); |
| | | List<SmallWeChatDto> smallWeChatDtos = smallWeChatInnerServiceSMOImpl.querySmallWeChats(smallWeChatDto); |
| | | if (smallWeChatDto == null || smallWeChatDtos.size() <= 0) { |
| | | logger.info("未配置微信公众号信息,定时任务执行结束"); |
| | | return; |
| | | } |
| | | SmallWeChatDto weChatDto = smallWeChatDtos.get(0); |
| | | SmallWechatAttrDto smallWechatAttrDto = new SmallWechatAttrDto(); |
| | | smallWechatAttrDto.setCommunityId(visitPo.getCommunityId()); |
| | | smallWechatAttrDto.setWechatId(weChatDto.getWeChatId()); |
| | | smallWechatAttrDto.setSpecCd(SmallWechatAttrDto.SPEC_CD_WECHAT_ROOM_STATE_TEMPLATE); |
| | | List<SmallWechatAttrDto> smallWechatAttrDtos = smallWechatAttrInnerServiceSMOImpl.querySmallWechatAttrs(smallWechatAttrDto); |
| | | if (smallWechatAttrDtos == null || smallWechatAttrDtos.size() <= 0) { |
| | | logger.info("未配置微信公众号消息模板"); |
| | | return; |
| | | } |
| | | String templateId = smallWechatAttrDtos.get(0).getValue(); |
| | | String accessToken = WechatFactory.getAccessToken(weChatDto.getAppId(), weChatDto.getAppSecret()); |
| | | if (StringUtil.isEmpty(accessToken)) { |
| | | logger.info("推送微信模板,获取accessToken失败:{}", accessToken); |
| | | return; |
| | | } |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setOwnerId(visitPo.getOwnerId()); |
| | | //1001 业主本人 1002 家庭成员 |
| | | ownerDto.setOwnerTypeCd("1001"); |
| | | //查询业主 |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMO.queryOwners(ownerDto); |
| | | Assert.listOnlyOne(ownerDtos, "业主不存在!"); |
| | | //获得成员id |
| | | String memberId = ownerDtos.get(0).getMemberId(); |
| | | OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto(); |
| | | ownerAppUserDto.setMemberId(memberId); |
| | | ownerAppUserDto.setAppType("WECHAT"); |
| | | //查询绑定业主 |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserInnerServiceSMO.queryOwnerAppUsers(ownerAppUserDto); |
| | | if (ownerAppUserDtos.size() > 0) { |
| | | //获取openId |
| | | String openId = ownerAppUserDtos.get(0).getOpenId(); |
| | | String url = sendMsgUrl + accessToken; |
| | | Data data = new Data(); |
| | | PropertyFeeTemplateMessage templateMessage = new PropertyFeeTemplateMessage(); |
| | | templateMessage.setTemplate_id(templateId); |
| | | templateMessage.setTouser(openId); |
| | | data.setFirst(new Content("您提交的访客预约车辆-" + visitPo.getCarNum() + ",申请结果如下:")); |
| | | data.setKeyword1(new Content("访客预约车辆-审核")); |
| | | if (!StringUtil.isEmpty(visitPo.getState()) && visitPo.getState().equals("1")) { //审核通过 |
| | | data.setKeyword2(new Content("审核通过")); |
| | | if (parkingSpaceDtos != null && parkingSpaceDtos.size() == 1) { |
| | | //查询停车场 |
| | | ParkingAreaDto parkingAreaDto = new ParkingAreaDto(); |
| | | parkingAreaDto.setPaId(parkingSpaceDtos.get(0).getPaId()); |
| | | List<ParkingAreaDto> parkingAreaDtos = parkingAreaInnerServiceSMOImpl.queryParkingAreas(parkingAreaDto); |
| | | Assert.listOnlyOne(parkingAreaDtos, "查询停车场错误!"); |
| | | data.setKeyword3(new Content("请将车辆(" + visitPo.getCarNum() + ")停放于" + |
| | | parkingAreaDtos.get(0).getNum() + "-" + parkingSpaceDtos.get(0).getNum() + "号停车位," + "停车免费时间截至到" + visitPo.getFreeTime())); |
| | | } else if (parkingSpaceDtos == null || parkingSpaceDtos.size() <= 0) { |
| | | data.setKeyword3(new Content(visitPo.getStateRemark())); |
| | | } else { |
| | | throw new IllegalArgumentException("查询停车位错误!"); |
| | | } |
| | | } else if (!StringUtil.isEmpty(visitPo.getState()) && visitPo.getState().equals("2")) { //审核不通过 |
| | | data.setKeyword2(new Content("审核不通过")); |
| | | data.setKeyword3(new Content(visitPo.getStateRemark())); |
| | | } |
| | | if (!StringUtil.isEmpty(visitPo.getState()) && visitPo.getState().equals("1")) { //审核通过 |
| | | data.setRemark(new Content("访客预约车辆审核已通过,请您合理安排出行!")); |
| | | } else if (!StringUtil.isEmpty(visitPo.getState()) && visitPo.getState().equals("2")) { //审核不通过 |
| | | data.setRemark(new Content("访客预约车辆审核未通过,请您合理安排出行!")); |
| | | } |
| | | templateMessage.setData(data); |
| | | //获取业主公众号地址 |
| | | String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | templateMessage.setUrl(wechatUrl); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class); |
| | | logger.info("微信模板返回内容:{}", responseEntity); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 审核通过预约车下发 |
| | | * |
| | | * @param business |
| | | * @param businessVisit |
| | | */ |
| | | private void doAddVisit(Business business, JSONObject businessVisit) { |
| | | VisitPo visitPo = BeanConvertUtil.covertBean(businessVisit, VisitPo.class); |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityId(visitPo.getCommunityId()); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | Assert.listNotNull(communityDtos, "未包含小区信息"); |
| | | VisitDto visitDto = new VisitDto(); |
| | | visitDto.setvId(visitPo.getvId()); |
| | | List<VisitDto> visits = visitInnerServiceSMOImpl.queryVisits(visitDto); |
| | | Assert.listOnlyOne(visits, "访客信息不存在或存在多条"); |
| | | |
| | | //查询停车位 |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setPsId(visits.get(0).getPsId()); |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | Assert.listOnlyOne(parkingSpaceDtos, "查询停车位错误!"); |
| | | //查询停车场 |
| | | ParkingAreaDto parkingAreaDto = new ParkingAreaDto(); |
| | | parkingAreaDto.setPaId(parkingSpaceDtos.get(0).getPaId()); |
| | | List<ParkingAreaDto> parkingAreaDtos = parkingAreaInnerServiceSMOImpl.queryParkingAreas(parkingAreaDto); |
| | | Assert.listOnlyOne(parkingAreaDtos, "查询停车场错误!"); |
| | | |
| | | //查询车辆信息 |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | | ownerCarDto.setCarNum(visitPo.getCarNum()); |
| | | ownerCarDto.setCommunityId(visitPo.getCommunityId()); |
| | | List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | Assert.listOnlyOne(ownerCarDtos, "未找到车辆"); |
| | | |
| | | //查询属性 |
| | | OwnerCarAttrDto ownerCarAttrDto = new OwnerCarAttrDto(); |
| | | ownerCarAttrDto.setCarId(ownerCarDtos.get(0).getCarId()); |
| | | ownerCarAttrDto.setCommunityId(ownerCarDtos.get(0).getCommunityId()); |
| | | List<OwnerCarAttrDto> parkingAreaAttrDtos = ownerCarAttrInnerServiceSMOImpl.queryOwnerCarAttrs(ownerCarAttrDto); |
| | | |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | JSONObject body = new JSONObject(); |
| | | body.put("vId", visits.get(0).getvId()); |
| | | body.put("vName", visits.get(0).getvName()); |
| | | body.put("visitGender", visits.get(0).getVisitGender()); |
| | | body.put("phoneNumber", visits.get(0).getPhoneNumber()); |
| | | body.put("userId", visits.get(0).getUserId()); |
| | | body.put("communityId", visits.get(0).getCommunityId()); |
| | | body.put("ownerId", visits.get(0).getOwnerId()); |
| | | body.put("visitCase", visits.get(0).getVisitCase()); |
| | | body.put("visitTime", df.format(ownerCarDtos.get(0).getStartTime())); |
| | | body.put("departureTime", df.format(ownerCarDtos.get(0).getEndTime())); |
| | | body.put("carNum", visits.get(0).getCarNum()); |
| | | body.put("entourage", visits.get(0).getEntourage()); |
| | | body.put("reasonType", visits.get(0).getReasonType()); |
| | | body.put("state", visits.get(0).getState()); |
| | | body.put("stateRemark", visits.get(0).getStateRemark()); |
| | | body.put("stateName", visits.get(0).getStateName()); |
| | | body.put("paId", parkingAreaDtos.get(0).getPaId()); |
| | | body.put("psId", parkingSpaceDtos.get(0).getPsId()); |
| | | body.put("extCarId", ownerCarDtos.get(0).getCarId()); |
| | | body.put("attrs", parkingAreaAttrDtos); |
| | | hcOwnerVisitAsynImpl.addVisit(body); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | //添加车辆 |
| | | public static final String ADD_OWNER_CAR_URL = "/extApi/car/addCar"; |
| | | |
| | | //添加访客 |
| | | public static final String ADD_VISIT_URL = "/extApi/car/addVisit"; |
| | | |
| | | //修改车辆 |
| | | public static final String UPDATE_OWNER_CAR_URL = "/extApi/car/updateCar"; |
| | | //删除车辆 |
| | |
| | | */ |
| | | void addOwnerCar(JSONObject postParameters); |
| | | |
| | | /** |
| | | * 添加访客信息 |
| | | * |
| | | * @param postParameters |
| | | */ |
| | | void addVisit(JSONObject postParameters); |
| | | |
| | | void updateOwnerCar(JSONObject postParameters); |
| | | |
| | | void deleteOwnerCar(JSONObject postParameters); |
| | |
| | | |
| | | /** |
| | | * 考勤班组同步 |
| | | * |
| | | * @param postParameters |
| | | * @param staffs |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 考勤员工同步 |
| | | * |
| | | * @param postParameters |
| | | * @param staffs |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 编辑考勤 同步 |
| | | * |
| | | * @param postParameters |
| | | */ |
| | | void updateAttendance(JSONObject postParameters); |
| | | |
| | | /** |
| | | * 删除考勤 同步 |
| | | * |
| | | * @param postParameters |
| | | */ |
| | | void deleteAttendance(JSONObject postParameters); |
| | |
| | | |
| | | /** |
| | | * 添加 道闸问候语 |
| | | * |
| | | * @param postParameters |
| | | */ |
| | | void addParkingAreaText(JSONObject postParameters); |
| | | |
| | | /** |
| | | * 添加岗亭 |
| | | * |
| | | * @param postParameters |
| | | */ |
| | | void addParkingBox(JSONObject postParameters); |
| | | |
| | | /** |
| | | * 删除岗亭 |
| | | * |
| | | * @param postParameters |
| | | */ |
| | | void deleteParkingBox(JSONObject postParameters); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void addVisit(JSONObject postParameters) { |
| | | MachineTranslateDto machineTranslateDto = getMachineTranslateDto(postParameters, |
| | | MachineTranslateDto.CMD_ADD_VISIT, |
| | | DEFAULT_MACHINE_CODE, |
| | | DEFAULT_MACHINE_ID, |
| | | "extCarId", |
| | | "carNum", |
| | | MachineTranslateDto.TYPE_OWNER_CAR); |
| | | ResponseEntity<String> responseEntity = null; |
| | | String url = IotConstant.getUrl(IotConstant.ADD_VISIT_URL); |
| | | try { |
| | | postParameters.put("taskId", machineTranslateDto.getMachineTranslateId()); |
| | | HttpEntity httpEntity = new HttpEntity(postParameters.toJSONString(), getHeaders()); |
| | | responseEntity = outRestTemplate.exchange(url, HttpMethod.POST, httpEntity, String.class); |
| | | |
| | | logger.debug("调用HC IOT信息:" + responseEntity); |
| | | |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | machineTranslateDto.setState(MachineTranslateDto.STATE_ERROR); |
| | | machineTranslateDto.setRemark(responseEntity.getBody()); |
| | | saveTranslateError(machineTranslateDto, postParameters.toJSONString(), responseEntity != null ? responseEntity.getBody() : "", url); |
| | | return; |
| | | } |
| | | JSONObject tokenObj = JSONObject.parseObject(responseEntity.getBody()); |
| | | |
| | | if (!tokenObj.containsKey("code") || ResultVo.CODE_OK != tokenObj.getInteger("code")) { |
| | | machineTranslateDto.setState(MachineTranslateDto.STATE_ERROR); |
| | | machineTranslateDto.setRemark(tokenObj.getString("msg")); |
| | | //保存 失败报文 |
| | | saveTranslateError(machineTranslateDto, postParameters.toJSONString(), responseEntity != null ? responseEntity.getBody() : "", url); |
| | | |
| | | return; |
| | | } |
| | | } catch (Exception e) { |
| | | machineTranslateDto.setState(MachineTranslateDto.STATE_ERROR); |
| | | machineTranslateDto.setRemark(e.getLocalizedMessage()); |
| | | //保存 失败报文 |
| | | saveTranslateError(machineTranslateDto, postParameters.toJSONString(), responseEntity != null ? responseEntity.getBody() : "", url); |
| | | |
| | | return; |
| | | } finally { |
| | | saveTranslateLog(machineTranslateDto); |
| | | refreshAccessToken(responseEntity); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Async |
| | | public void updateOwnerCar(JSONObject postParameters) { |
| | | MachineTranslateDto machineTranslateDto = getMachineTranslateDto(postParameters, MachineTranslateDto.CMD_UPDATE_OWNER_CAR, |
| | |
| | | */ |
| | | package com.java110.job.adapt.hcIot.asyn.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.client.RestTemplate; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | |
| | | import com.java110.utils.kafka.KafkaFactory; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @Override |
| | | @Async |
| | | public void addVisit(JSONObject postParameters) { |
| | | MachineTranslateDto machineTranslateDto = getMachineTranslateDto(postParameters, |
| | | MachineTranslateDto.CMD_ADD_VISIT, |
| | | DEFAULT_MACHINE_CODE, |
| | | DEFAULT_MACHINE_ID, |
| | | "extCarId", |
| | | "carNum", |
| | | MachineTranslateDto.TYPE_OWNER_CAR); |
| | | ResponseEntity<String> responseEntity = null; |
| | | try { |
| | | postParameters.put("taskId", machineTranslateDto.getMachineTranslateId()); |
| | | sendKafkaMessage(IotConstant.ADD_VISIT_URL, postParameters); |
| | | machineTranslateDto.setState(MachineTranslateDto.STATE_DOING); |
| | | machineTranslateDto.setRemark("正在同步"); |
| | | } catch (Exception e) { |
| | | machineTranslateDto.setState(MachineTranslateDto.STATE_ERROR); |
| | | machineTranslateDto.setRemark(e.getLocalizedMessage()); |
| | | //保存 失败报文 |
| | | saveTranslateError(machineTranslateDto, postParameters.toJSONString(), responseEntity != null ? responseEntity.getBody() : "", IotConstant.ADD_OWNER_CAR_URL); |
| | | |
| | | return; |
| | | } finally { |
| | | saveTranslateLog(machineTranslateDto); |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Async |
| | | public void updateOwnerCar(JSONObject postParameters) { |
| | | MachineTranslateDto machineTranslateDto = getMachineTranslateDto(postParameters, MachineTranslateDto.CMD_UPDATE_OWNER_CAR, |
| | | DEFAULT_MACHINE_CODE, |
| | |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.ownerCarAttr.OwnerCarAttrDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.parkingAreaAttr.ParkingAreaAttrDto; |
| | | import com.java110.entity.order.Business; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO; |
| | |
| | | |
| | | @Autowired |
| | | private IIotSendAsyn hcOwnerCarAsynImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| New file |
| | |
| | | package com.java110.job.task.parkingSpace; |
| | | |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.ownerCarAttr.OwnerCarAttrDto; |
| | | import com.java110.dto.task.TaskDto; |
| | | import com.java110.dto.visit.VisitDto; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IVisitInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarAttrV1InnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarV1InnerServiceSMO; |
| | | import com.java110.job.quartz.TaskSystemQuartz; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.ownerCarAttr.OwnerCarAttrPo; |
| | | import com.java110.po.parking.ParkingSpacePo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 预约车定时释放车位 |
| | | * |
| | | * @author fqz |
| | | * @date 2022-04-21 |
| | | */ |
| | | @Component |
| | | public class ReleaseCarParkingSpaceTemplate extends TaskSystemQuartz { |
| | | |
| | | @Autowired |
| | | private IVisitInnerServiceSMO visitInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarAttrV1InnerServiceSMO ownerCarAttrV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarV1InnerServiceSMO ownerCarV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ReleaseCarParkingSpaceTemplate.class); |
| | | |
| | | @Override |
| | | protected void process(TaskDto taskDto) throws Exception { |
| | | logger.debug("开始执行微信模板信息推送" + taskDto.toString()); |
| | | // 获取小区 |
| | | List<CommunityDto> communityDtos = getAllCommunity(); |
| | | for (CommunityDto communityDto : communityDtos) { |
| | | doReleaseParkingSpace(taskDto, communityDto); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据小区释放预约车辆车位 |
| | | * |
| | | * @param taskDto |
| | | * @param communityDto |
| | | */ |
| | | private void doReleaseParkingSpace(TaskDto taskDto, CommunityDto communityDto) { |
| | | //查询小区下的访客信息 |
| | | VisitDto visitDto = new VisitDto(); |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | visitDto.setCommunityId(communityDto.getCommunityId()); |
| | | visitDto.setDepartureEndTime(df.format(new Date())); |
| | | visitDto.setState("1"); //审核通过 |
| | | visitDto.setFlag("1"); |
| | | List<VisitDto> visitDtos = visitInnerServiceSMOImpl.queryVisits(visitDto); |
| | | if (visitDtos == null || visitDtos.size() < 1) { |
| | | return; |
| | | } |
| | | for (VisitDto visit : visitDtos) { |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | | ownerCarDto.setCommunityId(communityDto.getCommunityId()); |
| | | ownerCarDto.setCarTypeCd(OwnerCarDto.CAR_TYPE_TEMP); //临时车 |
| | | ownerCarDto.setCarNum(visit.getCarNum()); |
| | | List<OwnerCarDto> ownerCarDtos = ownerCarV1InnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | if (ownerCarDtos == null || ownerCarDtos.size() != 1) { |
| | | continue; |
| | | } |
| | | OwnerCarAttrDto ownerCarAttrDto = new OwnerCarAttrDto(); |
| | | ownerCarAttrDto.setCarId(ownerCarDtos.get(0).getCarId()); |
| | | ownerCarAttrDto.setSpecCd("6443000036"); //是否是预约车 |
| | | //查询车辆属性 |
| | | List<OwnerCarAttrDto> ownerCarAttrDtos = ownerCarAttrInnerServiceSMOImpl.queryOwnerCarAttrs(ownerCarAttrDto); |
| | | if (ownerCarAttrDtos == null || ownerCarAttrDtos.size() != 1) { //只看是否是预约车属性 |
| | | continue; |
| | | } |
| | | if (!ownerCarAttrDtos.get(0).getValue().equals("true")) { //不是预约车的不走定时任务 |
| | | continue; |
| | | } |
| | | //释放车位并删除过期的车辆 |
| | | OwnerCarPo ownerCarPo = new OwnerCarPo(); |
| | | ownerCarPo.setCarId(ownerCarDtos.get(0).getCarId()); |
| | | ownerCarPo.setCommunityId(communityDto.getCommunityId()); |
| | | ownerCarPo.setCarTypeCd(OwnerCarDto.CAR_TYPE_TEMP); |
| | | ownerCarPo.setState(OwnerCarDto.STATE_FINISH); //车位释放状态 |
| | | ownerCarPo.setStatusCd("1"); //不可用状态 |
| | | //修改车辆状态,改为车辆释放状态并删除 |
| | | ownerCarV1InnerServiceSMOImpl.updateOwnerCar(ownerCarPo); |
| | | //修改车辆属性状态 |
| | | OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo(); |
| | | ownerCarAttrPo.setCarId(ownerCarDtos.get(0).getCarId()); |
| | | ownerCarAttrPo.setStatusCd("1"); |
| | | //删除过期车辆属性 |
| | | ownerCarAttrV1InnerServiceSMOImpl.updateOwnerCarAttr(ownerCarAttrPo); |
| | | //修改车位状态 |
| | | ParkingSpacePo parkingSpacePo = new ParkingSpacePo(); |
| | | parkingSpacePo.setPsId(ownerCarDtos.get(0).getPsId()); |
| | | parkingSpacePo.setState("F");//车位状态 出售 S,出租 H ,空闲 F |
| | | //车位状态改为空闲状态 |
| | | parkingSpaceInnerServiceSMOImpl.updateParkingSpace(parkingSpacePo); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.job.task.parkingSpace; |
| | | |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.ownerCarAttr.OwnerCarAttrDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.task.TaskDto; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarAttrV1InnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarV1InnerServiceSMO; |
| | | import com.java110.job.quartz.TaskSystemQuartz; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.ownerCarAttr.OwnerCarAttrPo; |
| | | import com.java110.po.parking.ParkingSpacePo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author fqz |
| | | * @Description 释放预约车车位 |
| | | * @date 2022-04-18 17:08 |
| | | */ |
| | | @Component |
| | | public class ReleaseParkingSpaceTemplate extends TaskSystemQuartz { |
| | | |
| | | @Autowired |
| | | private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarAttrV1InnerServiceSMO ownerCarAttrV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarV1InnerServiceSMO ownerCarV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ReleaseParkingSpaceTemplate.class); |
| | | |
| | | @Override |
| | | protected void process(TaskDto taskDto) throws Exception { |
| | | logger.debug("开始执行微信模板信息推送" + taskDto.toString()); |
| | | // 获取小区 |
| | | List<CommunityDto> communityDtos = getAllCommunity(); |
| | | for (CommunityDto communityDto : communityDtos) { |
| | | doReleaseParkingSpace(taskDto, communityDto); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据小区释放预约车辆车位 |
| | | * |
| | | * @param taskDto |
| | | * @param communityDto |
| | | */ |
| | | private void doReleaseParkingSpace(TaskDto taskDto, CommunityDto communityDto) { |
| | | //查询预约车信息 |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | | ownerCarDto.setCommunityId(communityDto.getCommunityId()); |
| | | ownerCarDto.setCarTypeCd(OwnerCarDto.CAR_TYPE_TEMP);//临时车 |
| | | List<OwnerCarDto> ownerCarDtos = ownerCarV1InnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | if (ownerCarDtos == null || ownerCarDtos.size() < 1) { |
| | | return; |
| | | } |
| | | for (OwnerCarDto ownerCar : ownerCarDtos) { |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setPsId(ownerCar.getPsId()); |
| | | //查询车位 |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | if (parkingSpaceDtos == null || parkingSpaceDtos.size() < 1) { //车位不存在 |
| | | continue; |
| | | } |
| | | OwnerCarAttrDto ownerCarAttrDto = new OwnerCarAttrDto(); |
| | | ownerCarAttrDto.setCarId(ownerCar.getCarId()); |
| | | ownerCarAttrDto.setSpecCd("6443000036"); //是否是预约车 |
| | | //查询车辆属性 |
| | | List<OwnerCarAttrDto> ownerCarAttrDtos = ownerCarAttrInnerServiceSMOImpl.queryOwnerCarAttrs(ownerCarAttrDto); |
| | | if (ownerCarAttrDtos == null || ownerCarAttrDtos.size() != 1) { //只看是否是预约车属性 |
| | | continue; |
| | | } |
| | | if (!ownerCarAttrDtos.get(0).getValue().equals("true")) { //不是预约车的不走定时任务 |
| | | continue; |
| | | } |
| | | //获取车辆截租时间 |
| | | Date endTime = ownerCar.getEndTime(); |
| | | //当前时间 |
| | | Date date = new Date(); |
| | | if (endTime.getTime() <= date.getTime()) { //如果车辆截租时间小于等于当前时间,说明到期了,需要释放掉 |
| | | OwnerCarPo car = new OwnerCarPo(); |
| | | car.setCarId(ownerCar.getCarId()); |
| | | car.setCommunityId(communityDto.getCommunityId()); |
| | | car.setCarTypeCd(OwnerCarDto.CAR_TYPE_TEMP); |
| | | car.setState(OwnerCarDto.STATE_FINISH); //车位释放状态 |
| | | car.setStatusCd("1"); //不可用状态 |
| | | //修改车辆状态,改为车辆释放状态并删除 |
| | | ownerCarV1InnerServiceSMOImpl.updateOwnerCar(car); |
| | | OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo(); |
| | | ownerCarAttrPo.setCarId(ownerCar.getCarId()); |
| | | ownerCarAttrPo.setStatusCd("1"); |
| | | //删除过期车辆属性 |
| | | ownerCarAttrV1InnerServiceSMOImpl.updateOwnerCarAttr(ownerCarAttrPo); |
| | | ParkingSpacePo parkingSpacePo = new ParkingSpacePo(); |
| | | parkingSpacePo.setPsId(ownerCar.getPsId()); |
| | | parkingSpacePo.setState("F");//车位状态 出售 S,出租 H ,空闲 F |
| | | //车位状态改为空闲状态 |
| | | parkingSpaceInnerServiceSMOImpl.updateParkingSpace(parkingSpacePo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.job.task.visiterToMachine; |
| | | |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.task.TaskDto; |
| | | import com.java110.dto.visit.VisitDto; |
| | | import com.java110.intf.community.IVisitInnerServiceSMO; |
| | | import com.java110.job.quartz.TaskSystemQuartz; |
| | | import com.java110.po.owner.VisitPo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 预约状态修改定时任务 |
| | | * |
| | | * @author fqz |
| | | * @date 2022-04-20 |
| | | */ |
| | | @Component |
| | | public class EditRecordStateTemplate extends TaskSystemQuartz { |
| | | |
| | | @Autowired |
| | | private IVisitInnerServiceSMO visitInnerServiceSMOImpl; |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(EditRecordStateTemplate.class); |
| | | |
| | | @Override |
| | | protected void process(TaskDto taskDto) throws Exception { |
| | | logger.debug("开始执行微信模板信息推送" + taskDto.toString()); |
| | | // 获取小区 |
| | | List<CommunityDto> communityDtos = getAllCommunity(); |
| | | for (CommunityDto communityDto : communityDtos) { |
| | | doEditRecordState(taskDto, communityDto); |
| | | } |
| | | } |
| | | |
| | | private void doEditRecordState(TaskDto taskDto, CommunityDto communityDto) throws ParseException { |
| | | //查询访客记录信息 |
| | | VisitDto visitDto = new VisitDto(); |
| | | visitDto.setCommunityId(communityDto.getCommunityId()); |
| | | List<VisitDto> visitDtos = visitInnerServiceSMOImpl.queryVisits(visitDto); |
| | | if (visitDtos == null || visitDtos.size() < 1) { |
| | | return; |
| | | } |
| | | for (VisitDto visit : visitDtos) { |
| | | //获取访客离开时间 |
| | | String departureTime = visit.getDepartureTime(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date finishTime = format.parse(departureTime); |
| | | Date date = new Date(); |
| | | if (finishTime.getTime() <= date.getTime()) { //如果访客离开时间小于当前时间,这条访客记录就失效 |
| | | VisitPo visitPo = new VisitPo(); |
| | | visitPo.setvId(visit.getvId()); |
| | | visitPo.setRecordState("1"); //预约状态 0表示有效 1表示无效 |
| | | visitInnerServiceSMOImpl.updateVisit(visitPo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.store.StoreDto; |
| | | import com.java110.intf.store.IStoreInnerServiceSMO; |
| | | import com.java110.intf.store.IStoreV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | |
| | | public class ListPropertyCmd extends AbstractServiceCmdListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListPropertyCmd.class); |
| | | |
| | | @Autowired |
| | | private IStoreV1InnerServiceSMO storeV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IStoreInnerServiceSMO storeInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | |
| | | storeDto.setUserId(""); |
| | | storeDto.setStoreTypeCd(StoreDto.STORE_TYPE_PROPERTY); |
| | | |
| | | StoreDto storeDto1 = BeanConvertUtil.covertBean(reqJson, StoreDto.class); |
| | | storeDto1.setUserId(""); |
| | | storeDto1.setStoreTypeCd(StoreDto.STORE_TYPE_PROPERTY); |
| | | |
| | | int count = storeV1InnerServiceSMOImpl.queryStoresCount(storeDto); |
| | | |
| | | List<StoreDto> storeDtos = null; |
| | | List<StoreDto> storeDtos = new ArrayList<>(); |
| | | |
| | | if (count > 0) { |
| | | storeDtos = storeV1InnerServiceSMOImpl.queryStores(storeDto); |
| | | List<StoreDto> storeList = storeV1InnerServiceSMOImpl.queryStores(storeDto); |
| | | List<StoreDto> stores = storeInnerServiceSMOImpl.getStores(storeDto1); |
| | | for (StoreDto store : storeList) { |
| | | for (StoreDto store1 : stores) { |
| | | if (store.getStoreId().equals(store1.getStoreId())) { |
| | | store.setNearByLandmarks(store1.getNearByLandmarks()); |
| | | } |
| | | } |
| | | storeDtos.add(store); |
| | | } |
| | | // storeDtos = storeV1InnerServiceSMOImpl.queryStores(storeDto); |
| | | } else { |
| | | storeDtos = new ArrayList<>(); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<StoreDto> queryStores(@RequestBody StoreDto storeDto) { |
| | | public List<StoreDto> queryStores(@RequestBody StoreDto storeDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "muId", "muId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "mId", "mId不能为空"); |
| | | // Assert.hasKeyAndValue(reqJson, "mId", "mId不能为空"); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.user.IMenuUserV1InnerServiceSMO; |
| | | import com.java110.po.menuUser.MenuUserPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.java110.dto.menuUser.MenuUserDto; |
| | | |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.slf4j.Logger; |
| | |
| | | @Java110Cmd(serviceCode = "menuUser.listMenuUser") |
| | | public class ListMenuUserCmd extends AbstractServiceCmdListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListMenuUserCmd.class); |
| | | private static Logger logger = LoggerFactory.getLogger(ListMenuUserCmd.class); |
| | | @Autowired |
| | | private IMenuUserV1InnerServiceSMO menuUserV1InnerServiceSMOImpl; |
| | | |
| | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | MenuUserDto menuUserDto = BeanConvertUtil.covertBean(reqJson, MenuUserDto.class); |
| | | menuUserDto.setStaffId(reqJson.getString("userId")); |
| | | MenuUserDto menuUserDto = BeanConvertUtil.covertBean(reqJson, MenuUserDto.class); |
| | | menuUserDto.setStaffId(reqJson.getString("userId")); |
| | | |
| | | int count = menuUserV1InnerServiceSMOImpl.queryMenuUsersCount(menuUserDto); |
| | | int count = menuUserV1InnerServiceSMOImpl.queryMenuUsersCount(menuUserDto); |
| | | |
| | | List<MenuUserDto> menuUserDtos = null; |
| | | List<MenuUserDto> menuUserDtos = null; |
| | | |
| | | if (count > 0) { |
| | | menuUserDtos = menuUserV1InnerServiceSMOImpl.queryMenuUsers(menuUserDto); |
| | | } else { |
| | | menuUserDtos = new ArrayList<>(); |
| | | } |
| | | if (count > 0) { |
| | | menuUserDtos = menuUserV1InnerServiceSMOImpl.queryMenuUsers(menuUserDto); |
| | | } else { |
| | | menuUserDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, menuUserDtos); |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, menuUserDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | } |
| | |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | |
| | | if (flag < 1) { |
| | | throw new CmdException("删除失败"); |
| | | } |
| | | OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto(); |
| | | ownerAppUserDto.setMemberId(reqJson.getString("ownerId")); |
| | | //查询app用户表 |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | if (ownerAppUserDtos != null && ownerAppUserDtos.size() > 0) { |
| | | for (OwnerAppUserDto ownerAppUser : ownerAppUserDtos) { |
| | | OwnerAppUserPo ownerAppUserPo = BeanConvertUtil.covertBean(ownerAppUser, OwnerAppUserPo.class); |
| | | flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("删除失败"); |
| | | if (reqJson.containsKey("ownerTypeCd") && !StringUtil.isEmpty(reqJson.getString("ownerTypeCd")) && reqJson.getString("ownerTypeCd").equals("1001")) { |
| | | OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto(); |
| | | ownerAppUserDto.setMemberId(reqJson.getString("ownerId")); |
| | | //查询app用户表 |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | if (ownerAppUserDtos != null && ownerAppUserDtos.size() > 0) { |
| | | for (OwnerAppUserDto ownerAppUser : ownerAppUserDtos) { |
| | | OwnerAppUserPo ownerAppUserPo = BeanConvertUtil.covertBean(ownerAppUser, OwnerAppUserPo.class); |
| | | flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("删除失败"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | * @param businessOwnerCar 车辆管理信息 |
| | | */ |
| | | protected void autoSaveDelBusinessOwnerCar(Business business, JSONObject businessOwnerCar) { |
| | | //自动插入DEL |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("memberId", businessOwnerCar.getString("memberId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | info.put("carId", businessOwnerCar.getString("carId")); |
| | | info.put("communityId", businessOwnerCar.getString("communityId")); |
| | | List<Map> currentOwnerCarInfos = getOwnerCarServiceDaoImpl().getOwnerCarInfo(info); |
| | | if (currentOwnerCarInfos == null || currentOwnerCarInfos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<MenuUserDto> queryMenuUsers(@RequestBody MenuUserDto menuUserDto) { |
| | | public List<MenuUserDto> queryMenuUsers(@RequestBody MenuUserDto menuUserDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | |
| | | package com.java110.user.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.ownerCarAttr.OwnerCarAttrDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.entity.assetImport.ImportCustomCreateFeeDto; |
| | | import com.java110.entity.assetImport.ImportRoomFee; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.user.dao.IOwnerCarAttrServiceDao; |
| | | import com.java110.user.dao.IOwnerCarServiceDao; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private IOwnerCarServiceDao ownerCarServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarAttrServiceDao ownerCarAttrServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | |
| | | |
| | | List<OwnerCarDto> ownerCars = BeanConvertUtil.covertBeanList(ownerCarServiceDaoImpl.getOwnerCarInfo(BeanConvertUtil.beanCovertMap(ownerCarDto)), OwnerCarDto.class); |
| | | |
| | | if (ownerCars != null && ownerCars.size() > 0) { |
| | | String[] carIds = getCarIds(ownerCars); |
| | | Map attrParamInfo = new HashMap(); |
| | | attrParamInfo.put("carIds", carIds); |
| | | attrParamInfo.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | List<OwnerCarAttrDto> ownerCarAttrDtoList = BeanConvertUtil.covertBeanList(ownerCarAttrServiceDaoImpl.getOwnerCarAttrInfo(attrParamInfo), OwnerCarAttrDto.class); |
| | | for (OwnerCarDto ownerCarDto1 : ownerCars) { |
| | | refreshOwnerCars(ownerCarDto1, ownerCarAttrDtoList); |
| | | } |
| | | } |
| | | return ownerCars; |
| | | } |
| | | |
| | | /** |
| | | * 获取carId 信息 |
| | | * |
| | | * @param ownerCars 房屋信息 |
| | | * @return carId |
| | | */ |
| | | private String[] getCarIds(List<OwnerCarDto> ownerCars) { |
| | | List<String> carIds = new ArrayList<String>(); |
| | | for (OwnerCarDto ownerCarDto : ownerCars) { |
| | | carIds.add(ownerCarDto.getCarId()); |
| | | } |
| | | |
| | | return carIds.toArray(new String[carIds.size()]); |
| | | } |
| | | |
| | | /** |
| | | * @param ownerCarDto |
| | | * @param ownerCarAttrDtoList |
| | | */ |
| | | private void refreshOwnerCars(OwnerCarDto ownerCarDto, List<OwnerCarAttrDto> ownerCarAttrDtoList) { |
| | | |
| | | if (ownerCarAttrDtoList == null || ownerCarAttrDtoList.size() == 0) { |
| | | return; |
| | | } |
| | | List<OwnerCarAttrDto> tmpOwnerCarAttrDtos = new ArrayList<>(); |
| | | for (OwnerCarAttrDto ownerCarAttrDto : ownerCarAttrDtoList) { |
| | | if (!ownerCarAttrDto.getCarId().equals(ownerCarDto.getCarId())) { |
| | | continue; |
| | | } |
| | | if (StringUtil.isEmpty(ownerCarAttrDto.getValueName())) { |
| | | ownerCarAttrDto.setValueName(ownerCarAttrDto.getValue()); |
| | | } |
| | | tmpOwnerCarAttrDtos.add(ownerCarAttrDto); |
| | | } |
| | | ownerCarDto.setOwnerCarAttrDto(tmpOwnerCarAttrDtos); |
| | | } |
| | | |
| | | /** |
| | |
| | | return tmpImportCarFees; |
| | | } |
| | | |
| | | public List<ImportCustomCreateFeeDto> freshCarIdsByImportCustomCreateFee(@RequestBody List<ImportCustomCreateFeeDto> tmpImportCarFees){ |
| | | public List<ImportCustomCreateFeeDto> freshCarIdsByImportCustomCreateFee(@RequestBody List<ImportCustomCreateFeeDto> tmpImportCarFees) { |
| | | List<String> carNums = new ArrayList<>(); |
| | | for (ImportCustomCreateFeeDto importRoomFee : tmpImportCarFees) { |
| | | if (StringUtil.isEmpty(importRoomFee.getCarNum())) { |