| | |
| | | private Date createTime; |
| | | private Date startTime; |
| | | private Date endTime; |
| | | |
| | | private String contractFee; |
| | | private String statusCd = "0"; |
| | | private String state; |
| | | private String stateName; |
| | |
| | | public void setTransferorName(String transferorName) { |
| | | this.transferorName = transferorName; |
| | | } |
| | | |
| | | public String getContractFee() { |
| | | return contractFee; |
| | | } |
| | | |
| | | public void setContractFee(String contractFee) { |
| | | this.contractFee = contractFee; |
| | | } |
| | | } |
| | |
| | | |
| | | private String receiptCode; |
| | | |
| | | //小区名称 |
| | | private String communityName; |
| | | |
| | | //物业公章 |
| | | private String officialSeal; |
| | | |
| | | //财务记账员 |
| | | private String FinancialAccountant; |
| | | |
| | | //财务收款员 |
| | | private String FinancialCashier; |
| | | |
| | | public String getCommunityName() { |
| | | return communityName; |
| | | } |
| | | |
| | | public void setCommunityName(String communityName) { |
| | | this.communityName = communityName; |
| | | } |
| | | |
| | | public String getOfficialSeal() { |
| | | return officialSeal; |
| | | } |
| | | |
| | | public void setOfficialSeal(String officialSeal) { |
| | | this.officialSeal = officialSeal; |
| | | } |
| | | |
| | | public String getFinancialAccountant() { |
| | | return FinancialAccountant; |
| | | } |
| | | |
| | | public void setFinancialAccountant(String financialAccountant) { |
| | | FinancialAccountant = financialAccountant; |
| | | } |
| | | |
| | | public String getFinancialCashier() { |
| | | return FinancialCashier; |
| | | } |
| | | |
| | | public void setFinancialCashier(String financialCashier) { |
| | | FinancialCashier = financialCashier; |
| | | } |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | | } |
| | |
| | | */ |
| | | private String operateUserId; |
| | | |
| | | /** |
| | | * 操作者姓名 |
| | | */ |
| | | private String operateUserName; |
| | | |
| | | public String getOperateUserName() { |
| | | return operateUserName; |
| | | } |
| | | |
| | | public void setOperateUserName(String operateUserName) { |
| | | this.operateUserName = operateUserName; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | |
| | | |
| | | private String communityQrCode; |
| | | |
| | | //认证状态 10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | private String auditState; |
| | | |
| | | public String getAuditState() { |
| | | return auditState; |
| | | } |
| | | |
| | | public void setAuditState(String auditState) { |
| | | this.auditState = auditState; |
| | | } |
| | | |
| | | |
| | | public String getUserId() { |
| | | return userId; |
| | |
| | | |
| | | private String storeTypeCd; |
| | | |
| | | //认证状态 10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | private String auditState; |
| | | |
| | | public String getAuditState() { |
| | | return auditState; |
| | | } |
| | | |
| | | public void setAuditState(String auditState) { |
| | | this.auditState = auditState; |
| | | } |
| | | |
| | | public String getUserId() { |
| | | return userId; |
| New file |
| | |
| | | package com.java110.vo; |
| | | |
| | | public class FeeQueryParams { |
| | | private String communityId; |
| | | private Integer startYear; |
| | | private Integer endYear; |
| | | |
| | | // getters and setters |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public Integer getStartYear() { |
| | | return startYear; |
| | | } |
| | | |
| | | public void setStartYear(Integer startYear) { |
| | | this.startYear = startYear; |
| | | } |
| | | |
| | | public Integer getEndYear() { |
| | | return endYear; |
| | | } |
| | | |
| | | public void setEndYear(Integer endYear) { |
| | | this.endYear = endYear; |
| | | } |
| | | } |
| | |
| | | importFeeName,pfc.fee_name feeName,t.payable_amount,t.payable_amount payableAmount, |
| | | mw.cur_degrees curDegrees,mw.pre_degrees preDegrees, mw.pre_reading_time preReadingTime,mw.cur_reading_time |
| | | curReadingTime,t.pay_order_id payOrderId,pfc.config_id configId,td.`name` primeRateName,pfao1.`value` |
| | | payerObjName, |
| | | payerObjName,pf.contract_fee,pf.contract_fee contractFee |
| | | t.cashier_id cashierId,t.cashier_name cashierName,pfc.fee_flag feeFlag,fr.receipt_code |
| | | receiptCode,t.open_invoice openInvoice,t.acct_amount acctAmount,t.discount_amount discountAmount,t.deduction_amount deductionAmount, |
| | | t.late_amount lateAmount,t.gift_amount giftAmount,t.invoice_no invoiceNo,t.transferor_name transferorName |
| | |
| | | </if> |
| | | <if test="ownerId != null and ownerId != ''"> |
| | | and pfao.value = #{ownerId} |
| | | </if> |
| | | <if test="contractFee !=null and contractFee != ''"> |
| | | and pf.contract_fee= #{contractFee} |
| | | </if> |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | | and t.prime_rate= #{primeRate} |
| | |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | | </if> |
| | | <if test="contractFee !=null and contractFee != ''"> |
| | | and t.contract_fee= #{contractFee} |
| | | </if> |
| | | <if test="detailIds !=null "> |
| | | and t.detail_id in |
| | | <foreach collection="detailIds" item="item" open="(" close=")" separator=","> |
| | |
| | | and t.fee_id= #{feeId} |
| | | </if> |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | and (t.payer_obj_id= #{payerObjId} or t.contract_fee = #{payerObjId}) |
| | | </if> |
| | | <if test="payerObjIds != null and payerObjIds.length > 0"> |
| | | and t.payer_obj_id in |
| 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="reportFeeServiceDaoImpl"> |
| | | <select id="repostInFee" resultType="java.util.Map"> |
| | | SELECT |
| | | pfd.community_id as communityId, |
| | | td.name AS feeTypeName, |
| | | pf.fee_type_cd AS feeTypeCode, |
| | | <foreach collection="yearList" item="year" separator=","> |
| | | SUM( |
| | | CASE |
| | | WHEN pfd.start_time < #{year}+1 AND pfd.end_time >= #{year} |
| | | THEN pfd.received_amount * |
| | | DATEDIFF( |
| | | LEAST(pfd.end_time, #{year}-12-31), |
| | | GREATEST(pfd.start_time, #{year}-01-01) |
| | | ) / DATEDIFF(pfd.end_time, pfd.start_time) |
| | | ELSE 0 |
| | | END |
| | | ) AS 'amount${year}' |
| | | </foreach> |
| | | SUM(pfd.received_amount) AS totalAmount |
| | | FROM |
| | | pay_fee_detail pfd |
| | | LEFT JOIN pay_fee pf ON pf.fee_id = pfd.fee_id |
| | | LEFT JOIN t_dict td ON td.table_name = "pay_fee_config" |
| | | AND td.table_columns = "fee_type_cd" |
| | | AND td.status_cd = pf.fee_type_cd |
| | | WHERE |
| | | pfd.status_cd = '0' AND |
| | | pfd.community_id = #{params.communityId} |
| | | AND ( |
| | | <foreach collection="yearList" item="year" separator="OR"> |
| | | (pfd.start_time < #{year}+1 AND pfd.end_time >= #{year}) |
| | | </foreach> |
| | | ) |
| | | GROUP BY |
| | | td.name, pf.fee_type_cd, pfd.community_id |
| | | ORDER BY |
| | | td.name |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | package com.java110.intf.fee; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.fee.TempCarFeeConfigDto; |
| | | import com.java110.vo.FeeQueryParams; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @FeignClient(name = "fee-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/reportFeeMonthStatisticsApi") |
| | | public interface IReportFeeInnerServiceSMO { |
| | | List<Map> repostPaidInFee(FeeQueryParams feeQueryParams); |
| | | } |
| | |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.smallProgramAdvert.*; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.common.ISmallProgramAdvertServiceSMO; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.BusinessException; |
| | | import com.java110.utils.exception.DAOException; |
| | |
| | | private ISmallProgramAdvertServiceDao smallProgramAdvertServiceDao; |
| | | @Resource |
| | | private ISmallProgramAdvertHistoryServiceDao smallProgramAdvertHistoryServiceDao; |
| | | @Resource |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public ResultVo querySmallAdverts(QuertAdvertDto quertAdvertDto) { |
| | |
| | | SmallProgramAdvertDto smallProgramAdvert = BeanConvertUtil.covertBean(map,SmallProgramAdvertDto.class); |
| | | List<Map> historyMap = smallProgramAdvertHistoryServiceDao.querySmallProgramAdvertInfoList(smallProgramAdvert.getId()); |
| | | List<SmallProgramAdvertHistoryDto> historyList = BeanConvertUtil.covertBeanList(historyMap, SmallProgramAdvertHistoryDto.class); |
| | | for(SmallProgramAdvertHistoryDto smallProgramAdvertHistoryDto : historyList){ |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(smallProgramAdvertHistoryDto.getOperateUserId()); |
| | | List<UserDto> userDtos = userInnerServiceSMOImpl.getUsers(userDto); |
| | | if(!CollectionUtils.isEmpty(userDtos)){ |
| | | smallProgramAdvertHistoryDto.setOperateUserName(userDtos.get(0).getName()); |
| | | } |
| | | } |
| | | smallProgramAdvert.setHistoryList(historyList); |
| | | return smallProgramAdvert; |
| | | }else{ |
| | |
| | | @RequestParam(value = "ownerId", required = false) String ownerId, |
| | | @RequestParam(value = "targetEndTime", required = false) String targetEndTime, |
| | | @RequestParam(value = "communityId") String communityId) { |
| | | if (StringUtil.isEmpty(payObjId) && StringUtil.isEmpty(ownerId)) { |
| | | throw new IllegalArgumentException("费用对象或者业主不能都为空"); |
| | | } |
| | | // if (StringUtil.isEmpty(payObjId) && StringUtil.isEmpty(ownerId)) { |
| | | // throw new IllegalArgumentException("费用对象或者业主不能都为空"); |
| | | // } |
| | | FeeDto feeDto = new FeeDto(); |
| | | if (!StringUtil.isEmpty(payObjId)) { |
| | | if (payObjId.contains(",")) { |
| | |
| | | package com.java110.fee.bmo.feeReceipt.impl; |
| | | |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.fee.FeeReceiptDto; |
| | |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | | import com.java110.fee.bmo.feeReceipt.IGetFeeReceiptBMO; |
| | | import com.java110.intf.community.ICommunityInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeReceiptInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IRoomInnerServiceSMO roomInnerServiceSMOImpl; |
| | | @Autowired |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param feeReceiptDto |
| | |
| | | feeReceiptDtos = feeReceiptInnerServiceSMOImpl.queryFeeReceipts(feeReceiptDto); |
| | | for (FeeReceiptDto feeReceipt : feeReceiptDtos) { |
| | | feeReceipt.setStoreName(feeReceiptDto.getStoreName()); |
| | | //查询小区名称 |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityId(feeReceipt.getCommunityId()); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | if(!CollectionUtils.isEmpty(communityDtos)){ |
| | | feeReceipt.setCommunityName(communityDtos.get(0).getName()); |
| | | } |
| | | feeReceipt.setOfficialSeal(""); |
| | | feeReceiptDto.setFinancialAccountant(""); |
| | | feeReceiptDto.setFinancialCashier(""); |
| | | } |
| | | //输入房屋信息 |
| | | freshRoomInfo(feeReceiptDtos); |
| | |
| | | //查询总记录数 |
| | | ApiFeeDetailVo apiFeeDetailVo = new ApiFeeDetailVo(); |
| | | FeeDetailDto feeDetailDto = BeanConvertUtil.covertBean(reqJson, FeeDetailDto.class); |
| | | |
| | | feeDetailDto.setContractFee(reqJson.getString("contractId")); |
| | | int total = feeDetailInnerServiceSMOImpl.queryFeeDetailsCount(feeDetailDto); |
| | | apiFeeDetailVo.setTotal(total); |
| | | if (total > 0) { |
| New file |
| | |
| | | package com.java110.fee.cmd.fee; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.intf.community.ICommunityInnerServiceSMO; |
| | | import com.java110.intf.fee.IReportFeeInnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.vo.FeeQueryParams; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Java110Cmd(serviceCode = "fee.reportFeeCmd") |
| | | public class ReportFeeCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IReportFeeInnerServiceSMO reportFeeInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | Assert.hasKey(reqJson, "communityId", "请求报文中未包含小区编号"); |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityId(reqJson.getString("communityId")); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | FeeQueryParams feeQueryParams = new FeeQueryParams(); |
| | | feeQueryParams.setCommunityId(reqJson.getString("communityId")); |
| | | feeQueryParams.setStartYear(communityDtos.get(0).getCreateTime().getYear()); |
| | | List<Map> result = reportFeeInnerServiceSMOImpl.repostPaidInFee(feeQueryParams); |
| | | context.setResponseEntity(new ResponseEntity<>(result, HttpStatus.OK)); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao; |
| | | |
| | | import com.java110.vo.FeeQueryParams; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface IReportFeeServiceDao { |
| | | List<Map> repostPaidInFee(FeeQueryParams feeQueryParams); |
| | | } |
| New file |
| | |
| | | package com.java110.fee.dao.impl; |
| | | |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.fee.dao.IInitializePayFeeServiceDao; |
| | | import com.java110.fee.dao.IReportFeeServiceDao; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.FeeQueryParams; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service("iReportFeeServiceDaoImpl") |
| | | public class IReportFeeServiceDaoImpl extends BaseServiceDao implements IReportFeeServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(InitializePayFeeServiceDaoImpl.class); |
| | | |
| | | @Override |
| | | public List<Map> repostPaidInFee(FeeQueryParams feeQueryParams) { |
| | | List<Integer> yearList = new ArrayList<>(); |
| | | for (int year = feeQueryParams.getStartYear(); year <= feeQueryParams.getEndYear(); year++) { |
| | | yearList.add(year); |
| | | } |
| | | |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("communityId", feeQueryParams.getCommunityId()); |
| | | params.put("startYear", feeQueryParams.getStartYear()); |
| | | params.put("endYear", feeQueryParams.getEndYear()); |
| | | params.put("yearList", yearList); |
| | | return sqlSessionTemplate.selectList("reportFeeServiceDaoImpl.repostInFee", params); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.fee.smo.impl; |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.fee.TempCarFeeConfigDto; |
| | | import com.java110.fee.dao.IPrestoreFeeServiceDao; |
| | | import com.java110.fee.dao.IReportFeeServiceDao; |
| | | import com.java110.intf.fee.IPrestoreFeeInnerServiceSMO; |
| | | import com.java110.intf.fee.IReportFeeInnerServiceSMO; |
| | | import com.java110.vo.FeeQueryParams; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class ReportFeeInnerServiceSMOImpl extends BaseServiceSMO implements IReportFeeInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IReportFeeServiceDao iReportFeeServiceDao; |
| | | |
| | | @Override |
| | | public List<Map> repostPaidInFee(FeeQueryParams feeQueryParams) { |
| | | return iReportFeeServiceDao.repostPaidInFee(feeQueryParams); |
| | | } |
| | | } |
| | |
| | | import org.apache.commons.net.util.Base64; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.crypto.Cipher; |
| | | import javax.crypto.spec.IvParameterSpec; |
| | |
| | | ownerAppUserDto.setLink(userDtos.get(0).getTel()); |
| | | ownerAppUserDto.setState(OwnerAppUserDto.STATE_AUDIT_SUCCESS); |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | |
| | | LoginOwnerResDto loginOwnerResDto = new LoginOwnerResDto(); |
| | | if (ListUtil.isNull(ownerAppUserDtos)) { |
| | | autoBindUserToOwner(userDtos.get(0), phoneNumber); |
| | | loginOwnerResDto.setAuditState(userDtos.get(0).getAuditState()); |
| | | communityId = smallWeChatDtos.get(0).getObjId(); |
| | | } else { |
| | | communityId = ownerAppUserDtos.get(0).getCommunityId(); |
| | | loginOwnerResDto.setAuditState(ownerAppUserDtos.get(0).getState()); |
| | | } |
| | | |
| | | CommunityDto communityDto = new CommunityDto(); |
| | |
| | | |
| | | //todo 生成登录token |
| | | String token = generatorLoginToken(tmpUserDto); |
| | | LoginOwnerResDto loginOwnerResDto = new LoginOwnerResDto(); |
| | | |
| | | |
| | | loginOwnerResDto.setCommunityId(communityDtos.get(0).getCommunityId()); |
| | | loginOwnerResDto.setCommunityName(communityDtos.get(0).getName()); |
| | |
| | | } |
| | | |
| | | private void autoBindUserToOwner(UserDto userDto, String phoneNumber) { |
| | | //查询用户是否已经有认证状态记录 |
| | | //todo 查询业主是否 认证了,如果认证了获取小区ID |
| | | OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto(); |
| | | ownerAppUserDto.setUserId(userDto.getUserId()); |
| | | ownerAppUserDto.setLink(userDto.getTel()); |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | if(CollectionUtils.isEmpty(ownerAppUserDtos)){ |
| | | // todo 查询业主或成员 |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setLink(phoneNumber); |
| | |
| | | ownerAppUserPo.setUserId(userDto.getUserId()); |
| | | ownerAppUserPo.setOpenId("-1"); |
| | | ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo); |
| | | userDto.setAuditState(ownerAppUserPo.getState()); |
| | | }else{ |
| | | userDto.setAuditState(ownerAppUserDtos.get(0).getState()); |
| | | } |
| | | } |
| | | |
| | | private void registerUser(String phoneNumber) { |
| | |
| | | Assert.hasLength(openId, "该用户不是能力开放用户"); |
| | | |
| | | OwnerAppUserDto ownerAppUserDto = BeanConvertUtil.covertBean(reqJson, OwnerAppUserDto.class); |
| | | ownerAppUserDto.setStates(new String[]{"10000", "12000"}); |
| | | ownerAppUserDto.setStates(new String[]{"10000", "11000", "12000"}); |
| | | |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | |
| | |
| | | import org.slf4j.Logger; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | List<CommunityDto> communityDtos = null; |
| | | for (OwnerDto tmpOwnerDto : ownerDtos) { |
| | | //用userId和手机号查询绑定关系,没有则新增 |
| | | OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto(); |
| | | ownerAppUserDto.setLink(reqJson.getString("link")); |
| | | ownerAppUserDto.setUserId(tmpOwnerDto.getUserId()); |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | if(!CollectionUtils.isEmpty(ownerAppUserDtos)){ |
| | | continue; |
| | | } |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setState("1100"); |
| | | communityDto.setCommunityId(tmpOwnerDto.getCommunityId()); |
| | |
| | | ownerAppUserPo.setLink(tmpOwnerDto.getLink()); |
| | | ownerAppUserPo.setOpenId("-1"); |
| | | ownerAppUserPo.setAppTypeCd("10010"); |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_AUDITING); |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_NOT_AUDIT); |
| | | ownerAppUserPo.setRemark("注册自动关联"); |
| | | ownerAppUserPo.setUserId(userPo.getUserId()); |
| | | ownerAppUserPo.setAppType(appType); |
| | |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.HashMap; |
| | |
| | | ownerAppUserDto.setLink(userDtos.get(0).getTel()); |
| | | ownerAppUserDto.setState(OwnerAppUserDto.STATE_AUDIT_SUCCESS); |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | |
| | | LoginOwnerResDto loginOwnerResDto = new LoginOwnerResDto(); |
| | | loginOwnerResDto.setAuditState(userDtos.get(0).getAuditState()); |
| | | String communityId = ""; |
| | | if (!ListUtil.isNull(ownerAppUserDtos)) { |
| | | // todo 4.0 查询小区是否存在 |
| | | communityId = ownerAppUserDtos.get(0).getCommunityId(); |
| | | loginOwnerResDto.setAuditState(ownerAppUserDtos.get(0).getState()); |
| | | } else { |
| | | SystemInfoDto systemInfoDto = new SystemInfoDto(); |
| | | List<SystemInfoDto> systemInfoDtos = systemInfoV1InnerServiceSMOImpl.querySystemInfos(systemInfoDto); |
| | |
| | | |
| | | //todo 生成登录token |
| | | String token = generatorLoginToken(tmpUserDto); |
| | | LoginOwnerResDto loginOwnerResDto = new LoginOwnerResDto(); |
| | | |
| | | |
| | | loginOwnerResDto.setCommunityId(communityDtos.get(0).getCommunityId()); |
| | | loginOwnerResDto.setCommunityName(communityDtos.get(0).getName()); |
| | |
| | | if (flag < 1) { |
| | | throw new CmdException("注册失败"); |
| | | } |
| | | |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userPo.getUserId()); |
| | | List<UserDto> userDtos = userInnerServiceSMOImpl.getUsers(userDto); |
| | | //用userId和手机号查询绑定关系,没有则新增 |
| | | OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto(); |
| | | ownerAppUserDto.setLink(userPo.getTel()); |
| | | ownerAppUserDto.setUserId(userPo.getUserId()); |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | if(CollectionUtils.isEmpty(ownerAppUserDtos)){ |
| | | OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo(); |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_NOT_AUDIT); |
| | |
| | | ownerAppUserPo.setUserId(userPo.getUserId()); |
| | | ownerAppUserPo.setOpenId("-1"); |
| | | ownerAppUserPo.setOwnerTypeCd(ownerDtos.get(0).getOwnerTypeCd()); |
| | | |
| | | queryOwnerRoom(ownerDtos.get(0), ownerAppUserPo); |
| | | |
| | | |
| | | flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("添加用户业主关系失败"); |
| | | } |
| | | |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userPo.getUserId()); |
| | | List<UserDto> userDtos = userInnerServiceSMOImpl.getUsers(userDto); |
| | | userDtos.get(0).setAuditState(ownerAppUserPo.getState()); |
| | | } |
| | | return userDtos; |
| | | } |
| | | |
| | |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | if (flag < 1) { |
| | | throw new CmdException("注册失败"); |
| | | } |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userPo.getUserId()); |
| | | List<UserDto> userDtos = userInnerServiceSMOImpl.getUsers(userDto); |
| | | //用userId和手机号查询绑定关系,没有则新增 |
| | | OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto(); |
| | | ownerAppUserDto.setLink(userPo.getTel()); |
| | | ownerAppUserDto.setUserId(userPo.getUserId()); |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | if(CollectionUtils.isEmpty(ownerAppUserDtos)){ |
| | | OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo(); |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_NOT_AUDIT); |
| | |
| | | ownerAppUserPo.setLink(ownerDtos.get(0).getLink()); |
| | | ownerAppUserPo.setUserId(userPo.getUserId()); |
| | | ownerAppUserPo.setOpenId("-1"); |
| | | |
| | | flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("添加用户业主关系失败"); |
| | | } |
| | | |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userPo.getUserId()); |
| | | List<UserDto> userDtos = userInnerServiceSMOImpl.getUsers(userDto); |
| | | userDtos.get(0).setAuditState(ownerAppUserPo.getState()); |
| | | } |
| | | return userDtos; |
| | | } |
| | | |
| | |
| | | datasource: |
| | | url: jdbc:mysql://localhost:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false |
| | | username: root |
| | | password: win2020 |
| | | password: 123456 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | |
| | | spring: |
| | | profiles: |
| | | active: devlocal |
| | | active: debug |
| | | |
| | | |
| | | # docker build -t lx . |