| | |
| | | private String deductionAmount; |
| | | private String lateAmount; |
| | | private String giftAmount; |
| | | //发票号或者收据号 |
| | | private String invoiceNo; |
| | | |
| | | //转账人 |
| | | private String transferorName; |
| | | |
| | | public String getPrimeRate() { |
| | | return primeRate; |
| | |
| | | public void setGiftAmount(String giftAmount) { |
| | | this.giftAmount = giftAmount; |
| | | } |
| | | |
| | | public String getInvoiceNo() { |
| | | return invoiceNo; |
| | | } |
| | | |
| | | public void setInvoiceNo(String invoiceNo) { |
| | | this.invoiceNo = invoiceNo; |
| | | } |
| | | |
| | | public String getTransferorName() { |
| | | return transferorName; |
| | | } |
| | | |
| | | public void setTransferorName(String transferorName) { |
| | | this.transferorName = transferorName; |
| | | } |
| | | } |
| | |
| | | package com.java110.dto.fee; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | private String feeTypeCd; |
| | | private String secondaryFeeTypeCd; |
| | | private String secondaryFeeTypeCdName; |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date startTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date endTime; |
| | | private String communityId; |
| | | private String feeId; |
| | |
| | | |
| | | private Date deadlineTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date maxEndTime; |
| | | |
| | | private Date importFeeEndTime; |
| | |
| | | public static final String APP_TYPE_WECHAT_MINA = "WECHAT_MINA";//小程序绑定业主 |
| | | public static final String APP_TYPE_WECHAT = "WECHAT";//公众号绑定业主 |
| | | public static final String STATE_AUDITING = "10000";// 审核中 |
| | | public static final String STATE_NOT_AUDIT = "11000";//待认证 |
| | | public static final String STATE_AUDIT_SUCCESS = "12000";//审核成功 |
| | | public static final String STATE_AUDIT_ERROR = "13000";//审核失败 |
| | | |
| | |
| | | private String url; |
| | | |
| | | /** |
| | | * 广告url |
| | | */ |
| | | private String ossUrl; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | private Integer sort; |
| | |
| | | */ |
| | | private String updateUserId; |
| | | |
| | | public String getOssUrl() { |
| | | return ossUrl; |
| | | } |
| | | |
| | | public void setOssUrl(String ossUrl) { |
| | | this.ossUrl = ossUrl; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | |
| | | private String url; |
| | | |
| | | /** |
| | | * 广告url |
| | | */ |
| | | private String ossUrl; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | private Integer sort; |
| | |
| | | |
| | | private List<SmallProgramAdvertHistoryDto> historyList; |
| | | |
| | | public String getOssUrl() { |
| | | return ossUrl; |
| | | } |
| | | |
| | | public void setOssUrl(String ossUrl) { |
| | | this.ossUrl = ossUrl; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | public class SmallProgramAdvertSaveDto implements Serializable { |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String id; |
| | | |
| | | private List<String> idList; |
| | | |
| | | /** |
| | | * 广告位 |
| | |
| | | * 图片url |
| | | */ |
| | | private String picUrl; |
| | | |
| | | /** |
| | | * 广告url |
| | | */ |
| | | private String ossUrl; |
| | | |
| | | /** |
| | | * 广告url |
| | |
| | | */ |
| | | private Integer status; |
| | | |
| | | public List<String> getIdList() { |
| | | return idList; |
| | | } |
| | | |
| | | public void setIdList(List<String> idList) { |
| | | this.idList = idList; |
| | | } |
| | | |
| | | public String getOssUrl() { |
| | | return ossUrl; |
| | | } |
| | | |
| | | public void setOssUrl(String ossUrl) { |
| | | this.ossUrl = ossUrl; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | |
| | | private String lateAmount = "0"; |
| | | private String giftAmount = "0"; |
| | | |
| | | //发票号或者收据号 |
| | | private String invoiceNo; |
| | | |
| | | //转账人 |
| | | private String transferorName; |
| | | |
| | | |
| | | public String getDetailId() { |
| | | return detailId; |
| | |
| | | public void setGiftAmount(String giftAmount) { |
| | | this.giftAmount = giftAmount; |
| | | } |
| | | |
| | | public String getInvoiceNo() { |
| | | return invoiceNo; |
| | | } |
| | | |
| | | public void setInvoiceNo(String invoiceNo) { |
| | | this.invoiceNo = invoiceNo; |
| | | } |
| | | |
| | | public String getTransferorName() { |
| | | return transferorName; |
| | | } |
| | | |
| | | public void setTransferorName(String transferorName) { |
| | | this.transferorName = transferorName; |
| | | } |
| | | } |
| | |
| | | private String age; |
| | | private String link; |
| | | private String address; |
| | | //其他地址 |
| | | private String otherAddress; |
| | | private String userId; |
| | | private String remark; |
| | | private String ownerTypeCd; |
| | |
| | | public void setFaceUrl(String faceUrl) { |
| | | this.faceUrl = faceUrl; |
| | | } |
| | | |
| | | public String getOtherAddress() { |
| | | return otherAddress; |
| | | } |
| | | |
| | | public void setOtherAddress(String otherAddress) { |
| | | this.otherAddress = otherAddress; |
| | | } |
| | | } |
| | |
| | | private String deductionAmount; |
| | | private String lateAmount; |
| | | private String giftAmount; |
| | | //发票号或者收据号 |
| | | private String invoiceNo; |
| | | |
| | | //转账人 |
| | | private String transferorName; |
| | | |
| | | public String getPrimeRate() { |
| | | return primeRate; |
| | | } |
| | |
| | | public void setGiftAmount(String giftAmount) { |
| | | this.giftAmount = giftAmount; |
| | | } |
| | | |
| | | public String getInvoiceNo() { |
| | | return invoiceNo; |
| | | } |
| | | |
| | | public void setInvoiceNo(String invoiceNo) { |
| | | this.invoiceNo = invoiceNo; |
| | | } |
| | | |
| | | public String getTransferorName() { |
| | | return transferorName; |
| | | } |
| | | |
| | | public void setTransferorName(String transferorName) { |
| | | this.transferorName = transferorName; |
| | | } |
| | | } |
| | |
| | | |
| | | <!-- 查询进出场信息 add by wuxw 2018-07-03 --> |
| | | <select id="getCarInoutInfo" parameterType="Map" resultType="Map"> |
| | | SELECT |
| | | SELECT DISTINCT |
| | | t.in_time, |
| | | t.in_time AS inTime, |
| | | t.inout_id, |
| | |
| | | adverts_name as 'advertsName', |
| | | pic_url as 'picUrl', |
| | | url, |
| | | oss_url as 'ossUrl', |
| | | sort, |
| | | supplier_name as 'supplierName', |
| | | `desc`, |
| | |
| | | </if> |
| | | <if test="url != null"> |
| | | url, |
| | | </if> |
| | | <if test="ossUrl != null"> |
| | | oss_url, |
| | | </if> |
| | | <if test="sort != null"> |
| | | sort, |
| | |
| | | <if test="url != null"> |
| | | #{url,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="ossUrl != null"> |
| | | #{ossUrl,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="sort != null"> |
| | | #{sort,jdbcType=INTEGER}, |
| | | </if> |
| | |
| | | <if test="url != null"> |
| | | url = #{url,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="ossUrl != null"> |
| | | oss_url = #{ossUrl,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="sort != null"> |
| | | sort = #{sort,jdbcType=INTEGER}, |
| | | </if> |
| | |
| | | payerObjName, |
| | | 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.late_amount lateAmount,t.gift_amount giftAmount,t.invoice_no invoiceNo,t.transferor_name transferorName |
| | | from pay_fee_detail t |
| | | left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002' |
| | | left join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | |
| | | pay_fee_detail( |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,received_amount,community_id, |
| | | fee_id,state,start_time,end_time,payable_amount,cashier_name,cashier_id,open_invoice, |
| | | acct_amount,discount_amount,deduction_amount,late_amount,gift_amount |
| | | acct_amount,discount_amount,deduction_amount,late_amount,gift_amount,invoice_no,transferor_name |
| | | <if test="createTime != null and createTime != ''"> |
| | | ,create_time |
| | | </if> |
| | | ) |
| | | values(#{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{receivedAmount},#{communityId},#{feeId},#{state}, |
| | | #{startTime},#{endTime},#{payableAmount},#{cashierName},#{cashierId},#{openInvoice}, |
| | | #{acctAmount},#{discountAmount},#{deductionAmount},#{lateAmount},#{giftAmount} |
| | | #{acctAmount},#{discountAmount},#{deductionAmount},#{lateAmount},#{giftAmount},#{invoiceNo},#{transferorName} |
| | | <if test="createTime != null and createTime != ''"> |
| | | ,#{createTime} |
| | | </if> |
| | |
| | | and pfc.community_id in (#{communityId},'9999') |
| | | </if> |
| | | |
| | | <if test="isContractFee != null"> |
| | | and is_contract_fee = #{isContractFee} |
| | | </if> |
| | | <if test="isContractFee == null"> |
| | | and is_contract_fee IS NULL |
| | | </if> |
| | | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | |
| | | <!-- 批量插入费用 --> |
| | | <insert id="insertFees" parameterType="Map"> |
| | | insert into pay_fee (amount,status_cd,income_obj_id,fee_type_cd,secondary_fee_type_cd,start_time,end_time,community_id,b_id,fee_id, |
| | | user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type,batch_id,is_contract_fee,contract_fee) |
| | | user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type,batch_id,is_contract_fee,contract_fee,create_time) |
| | | VALUES |
| | | <foreach collection="payFeePos" item="item" separator=","> |
| | | (#{item.amount},'0',#{item.incomeObjId},#{item.feeTypeCd},#{item.secondaryFeeTypeCd},#{item.startTime},#{item.endTime},#{item.communityId}, |
| | | '-1',#{item.feeId},#{item.userId},#{item.payerObjId},#{item.feeFlag},#{item.state},#{item.configId},#{item.payerObjType},#{item.batchId},#{item.isContractFee},#{item.contractFee}) |
| | | '-1',#{item.feeId},#{item.userId},#{item.payerObjId},#{item.feeFlag},#{item.state},#{item.configId},#{item.payerObjType},#{item.batchId},#{item.isContractFee},#{item.contractFee} |
| | | |
| | | <if test="item.createTime != null and item.createTime != ''"> |
| | | ,#{item.createTime} |
| | | </if> |
| | | <if test="item.createTime == null or item.createTime == ''"> |
| | | ,now() |
| | | </if> |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | |
| | |
| | | insert into pay_fee_detail( |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,start_time,received_amount,state,end_time,community_id, |
| | | fee_id,b_id,payable_amount,pay_order_id,cashier_id,cashier_name,open_invoice, |
| | | acct_amount,discount_amount,deduction_amount,late_amount,gift_amount |
| | | acct_amount,discount_amount,deduction_amount,late_amount,gift_amount,invoice_no,transferor_name |
| | | <if test="createTime != null"> |
| | | ,create_time |
| | | </if> |
| | | ) values ( |
| | | #{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{startTime},#{receivedAmount},#{state},#{endTime},#{communityId}, |
| | | #{feeId},#{bId},#{payableAmount},#{payOrderId},#{cashierId},#{cashierName},#{openInvoice}, |
| | | #{acctAmount},#{discountAmount},#{deductionAmount},#{lateAmount},#{giftAmount} |
| | | #{acctAmount},#{discountAmount},#{deductionAmount},#{lateAmount},#{giftAmount},#{invoiceNo},#{transferorName} |
| | | <if test="createTime != null"> |
| | | ,#{createTime} |
| | | </if> |
| | |
| | | receivedAmount,t.state,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.fee_id,t.fee_id |
| | | feeId,t.payable_amount,t.payable_amount payableAmount,t.pay_order_id payOrderId,t.cashier_id |
| | | cashierId,t.cashier_name cashierName,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.late_amount lateAmount,t.gift_amount giftAmount,t.invoice_no invoiceNo,t.transferor_name transferorName |
| | | from pay_fee_detail t |
| | | where 1 =1 |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | |
| | | <if test="openInvoice !=null and openInvoice != ''"> |
| | | , t.open_invoice= #{openInvoice} |
| | | </if> |
| | | <if test="invoiceNo !=null and invoiceNo != ''"> |
| | | , t.invoice_no= #{invoiceNo} |
| | | </if> |
| | | <if test="transferorName !=null and transferorName != ''"> |
| | | , t.transferor_name= #{transferorName} |
| | | </if> |
| | | where 1=1 |
| | | <if test="detailId !=null and detailId != ''"> |
| | | and t.detail_id= #{detailId} |
| | |
| | | |
| | | <insert id="insertFees" parameterType="Map"> |
| | | insert into pay_fee (amount,status_cd,income_obj_id,fee_type_cd,start_time,end_time,community_id,b_id,fee_id, |
| | | user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type,batch_id) |
| | | user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type,batch_id,create_time) |
| | | VALUES |
| | | <foreach collection="payFeePos" item="item" separator=","> |
| | | (#{item.amount},'0',#{item.incomeObjId},#{item.feeTypeCd},#{item.startTime},#{item.endTime},#{item.communityId}, |
| | | '-1',#{item.feeId},#{item.userId},#{item.payerObjId},#{item.feeFlag},#{item.state},#{item.configId},#{item.payerObjType},#{item.batchId}) |
| | | '-1',#{item.feeId},#{item.userId},#{item.payerObjId},#{item.feeFlag},#{item.state},#{item.configId},#{item.payerObjType},#{item.batchId} |
| | | <if test="item.createTime != null and item.createTime != ''"> |
| | | ,#{item.createTime} |
| | | </if>) |
| | | <if test="item.createTime == null or item.createTime == ''"> |
| | | ,now() |
| | | </if>) |
| | | </foreach> |
| | | </insert> |
| | | |
| | |
| | | void updateSmallAdverts(SmallProgramAdvertSaveDto smallProgramAdvertSaveDto,String userId); |
| | | |
| | | /** |
| | | * 更新小程序广告状态 |
| | | * @param smallProgramAdvertSaveDto 数据对象分享 |
| | | * @return AdvertDto 对象数据 |
| | | */ |
| | | void updateSmallAdvertsStatus(SmallProgramAdvertSaveDto smallProgramAdvertSaveDto,String userId); |
| | | |
| | | |
| | | /** |
| | | * 删除小程序广告 |
| | | * @param smallProgramAdvertSaveDto 数据对象分享 |
| | | * @return AdvertDto 对象数据 |
| | |
| | | import com.java110.dto.importData.ImportRoomFee; |
| | | import com.java110.dto.system.ComponentValidateResult; |
| | | import com.java110.intf.fee.IPayFeeBatchV1InnerServiceSMO; |
| | | import com.java110.intf.store.IContractPartyaInnerServiceSMO; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | |
| | | // @Override |
| | | // public List analysisExcel(Workbook workbook, JSONObject paramIn, ComponentValidateResult result) throws Exception { |
| | |
| | | if((os[0] == null && os[2] == null && os[1] == null)){ |
| | | break; |
| | | } |
| | | if (os == null ||(os[0] == null && os[1] == null)|| (os[0] == null && os[2] == null)) { |
| | | throw new IllegalArgumentException("请选择费用主体+车牌号或费用主体+合同编号"); |
| | | } |
| | | String startTime = handleExcelDateString(os[5].toString()); |
| | | String endTime = handleExcelDateString(os[6].toString()); |
| | | Assert.isDate(startTime, DateUtil.DATE_FORMATE_STRING_B, (osIndex + 1) + "行开始时间格式错误 请填写YYYY/MM/DD 文本格式"); |
| | |
| | | |
| | | |
| | | importRoomFee = new ImportRoomFee(); |
| | | importRoomFee.setPayerObjName(os[0] == null || (os[0] != null && os[1] != null)?os[1].toString():os[0].toString()); |
| | | importRoomFee.setObjType(os[0] == null || (os[0] != null && os[1] != null) ? "6666" : "3333"); |
| | | if(!(os[0] == null && os[1] == null)){ |
| | | importRoomFee.setPayerObjName(os[0] == null || (os[0] != null && os[1] != null)?os[1].toString():os[0].toString()); |
| | | importRoomFee.setObjType(os[0] == null || (os[0] != null && os[1] != null) ? "6666" : "3333"); |
| | | importRoomFee.setExpenseSubject(os[0] == null || (os[0] != null && os[1] != null)?os[1].toString():os[0].toString()); |
| | | }else{ |
| | | importRoomFee.setPayerObjName(os[2] == null?null:os[2].toString()); |
| | | importRoomFee.setObjType(os[2] == null?null:os[2].toString()); |
| | | importRoomFee.setExpenseSubject(os[2] == null?null:os[2].toString()); |
| | | } |
| | | importRoomFee.setIsContractFee(os[0] != null && os[1] ==null && os[2] != null ? "O" : null); |
| | | importRoomFee.setObjType(os[0] != null && os[1] ==null && os[2] != null ? "7777" : null); |
| | | importRoomFee.setObjType(os[2] != null ? "7777" : null); |
| | | importRoomFee.setContractId(os[0] != null && os[1] ==null && os[2] != null ? os[2].toString() : null); |
| | | importRoomFee.setFeeTypeCd(os[3] == null ? null : os[3].toString()); |
| | | importRoomFee.setFeeName(os[4] == null ? null : os[4].toString()); |
| | | importRoomFee.setExpenseSubject(os[0] == null || (os[0] != null && os[1] != null)?os[1].toString():os[0].toString()); |
| | | if(startTime != null){ |
| | | importRoomFee.setStartTime(startTime); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "id", "id不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "idList", "idList不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "status", "状态不能为空"); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "position", "广告位"); |
| | | Assert.hasKeyAndValue(reqJson, "position", "广告位必传"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | QuertAdvertDto quertAdvertDto = BeanConvertUtil.covertBean(reqJson, QuertAdvertDto.class); |
| | | if(quertAdvertDto.getStatus() != null && quertAdvertDto.getStatus() == 0){ |
| | | quertAdvertDto.setStatus(null); |
| | | } |
| | | ResultVo resultVo = smallProgramAdvertService.querySmallAdverts(quertAdvertDto); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | |
| | | @Java110ParamDoc(name = "position", type = "string", length = 255, remark = "广告位"), |
| | | @Java110ParamDoc(name = "advertsName", type = "string", length = 255, remark = "广告名称"), |
| | | @Java110ParamDoc(name = "picUrl", type = "string", length = 255, remark = "图片url"), |
| | | @Java110ParamDoc(name = "url", type = "string", length = 255, remark = "查询关键字"), |
| | | @Java110ParamDoc(name = "url", type = "string", length = 255, remark = "url"), |
| | | @Java110ParamDoc(name = "ossUrl", type = "string", length = 255, remark = "广告url"), |
| | | @Java110ParamDoc(name = "sort", type = "int", length = 255, remark = "排序"), |
| | | @Java110ParamDoc(name = "supplierName", type = "string", length = 255, remark = "供应商名称"), |
| | | @Java110ParamDoc(name = "desc", type = "string", length = 255, remark = "广告说明"), |
| | |
| | | Assert.hasKeyAndValue(reqJson, "position", "广告位不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "advertsName", "广告名称不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "picUrl", "图片不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "ossUrl", "小程序广告不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "sort", "排序不能为空"); |
| | | } |
| | | |
| | |
| | | smallProgramAdvert.setAdvertsName(smallProgramAdvertSaveDto.getAdvertsName()); |
| | | smallProgramAdvert.setPicUrl(smallProgramAdvertSaveDto.getPicUrl()); |
| | | smallProgramAdvert.setUrl(smallProgramAdvertSaveDto.getUrl()); |
| | | smallProgramAdvert.setOssUrl(smallProgramAdvertSaveDto.getOssUrl()); |
| | | smallProgramAdvert.setSort(smallProgramAdvertSaveDto.getSort()); |
| | | smallProgramAdvert.setSupplierName(smallProgramAdvertSaveDto.getSupplierName()); |
| | | //初始状态为草稿 |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestHeader; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "id", "id不能为空"); |
| | | SmallProgramAdvertSaveDto smallProgramAdvertSaveDto = BeanConvertUtil.covertBean(reqJson, SmallProgramAdvertSaveDto.class); |
| | | if(CollectionUtils.isEmpty(smallProgramAdvertSaveDto.getIdList())){ |
| | | Assert.hasKeyAndValue(reqJson, "id", "id不能为空"); |
| | | }else{ |
| | | Assert.hasKeyAndValue(reqJson, "idList", "idList不能为空"); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | String userId = cmdDataFlowContext.getReqHeaders().get("user-id"); |
| | | SmallProgramAdvertSaveDto smallProgramAdvertSaveDto = BeanConvertUtil.covertBean(reqJson, SmallProgramAdvertSaveDto.class); |
| | | smallProgramAdvertService.updateSmallAdverts(smallProgramAdvertSaveDto,userId); |
| | | if(smallProgramAdvertSaveDto.getStatus() != null){ |
| | | smallProgramAdvertService.updateSmallAdvertsStatus(smallProgramAdvertSaveDto,userId); |
| | | }else{ |
| | | smallProgramAdvertService.updateSmallAdverts(smallProgramAdvertSaveDto,userId); |
| | | } |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.createResponseEntity(ResultVo.CODE_OK, "更新成功")); |
| | | } |
| | | } |
| | |
| | | for (int i = 0; i < totalSize; i++) { |
| | | CarInoutPo record = successRecords.get(i); |
| | | try { |
| | | |
| | | int existCount = carInoutServiceDaoImpl.queryCarInoutsCount(BeanConvertUtil.beanCovertMap(record)); |
| | | CarInoutPo filter = new CarInoutPo(); |
| | | filter.setCarNum(record.getCarNum()); |
| | | filter.setInTime(record.getInTime()); |
| | | filter.setOutTime(record.getOutTime()); |
| | | filter.setDirection(record.getDirection()); |
| | | int existCount = carInoutServiceDaoImpl.queryCarInoutsCount(BeanConvertUtil.beanCovertMap(filter)); |
| | | |
| | | if (existCount > 0) { |
| | | // 3. 记录已存在,标记为去重(可用2表示去重,与0/1区分) |
| | |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | if(map != null){ |
| | | SmallProgramAdvert smallProgramAdvert = BeanConvertUtil.covertBean(map,SmallProgramAdvert.class); |
| | | String operation = "更新广告"; |
| | | if(smallProgramAdvertSaveDto.getStatus() != null){ |
| | | smallProgramAdvert.setStatus(smallProgramAdvertSaveDto.getStatus()); |
| | | if(smallProgramAdvertSaveDto.getStatus() == 2){ |
| | | operation = "下线广告"; |
| | | smallProgramAdvert.setOfflineTime(new Date()); |
| | | smallProgramAdvert.setOnlineTime(null); |
| | | }else if(smallProgramAdvertSaveDto.getStatus() == 1){ |
| | | operation = "上线广告"; |
| | | smallProgramAdvert.setOnlineTime(new Date()); |
| | | smallProgramAdvert.setOfflineTime(null); |
| | | } |
| | | } |
| | | if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getPosition())){ |
| | | smallProgramAdvert.setPosition(smallProgramAdvertSaveDto.getPosition()); |
| | | } |
| | |
| | | } |
| | | if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getPicUrl())){ |
| | | smallProgramAdvert.setPicUrl(smallProgramAdvertSaveDto.getPicUrl()); |
| | | } |
| | | if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getOssUrl())){ |
| | | smallProgramAdvert.setOssUrl(smallProgramAdvertSaveDto.getOssUrl()); |
| | | } |
| | | if(!StringUtils.isEmpty(smallProgramAdvertSaveDto.getUrl())){ |
| | | smallProgramAdvert.setUrl(smallProgramAdvertSaveDto.getUrl()); |
| | |
| | | //保存更新日志 |
| | | saveHistory(BeanConvertUtil.covertBean(map,SmallProgramAdvert.class),userId,operation); |
| | | }else{ |
| | | throw new BusinessException(ResponseConstant.RESULT_PARAM_ERROR, "无此广告信息"); |
| | | throw new BusinessException(ResponseConstant.RESULT_PARAM_ERROR, "无此广告信息,广告id:"+smallProgramAdvertSaveDto.getId()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void updateSmallAdvertsStatus(SmallProgramAdvertSaveDto smallProgramAdvertSaveDto,String userId) { |
| | | if(!CollectionUtils.isEmpty(smallProgramAdvertSaveDto.getIdList())){ |
| | | for(String id : smallProgramAdvertSaveDto.getIdList()){ |
| | | smallProgramAdvertSaveDto.setId(id); |
| | | Map map = smallProgramAdvertServiceDao.queryBusinessAdvertInfo(BeanConvertUtil.beanCovertMap(smallProgramAdvertSaveDto)); |
| | | if(map != null){ |
| | | SmallProgramAdvert smallProgramAdvert = BeanConvertUtil.covertBean(map,SmallProgramAdvert.class); |
| | | String operation = "更新广告"; |
| | | if(smallProgramAdvertSaveDto.getStatus() != null){ |
| | | smallProgramAdvert.setStatus(smallProgramAdvertSaveDto.getStatus()); |
| | | if(smallProgramAdvertSaveDto.getStatus() == 2){ |
| | | operation = "下线广告"; |
| | | smallProgramAdvert.setOfflineTime(new Date()); |
| | | smallProgramAdvert.setOnlineTime(null); |
| | | }else if(smallProgramAdvertSaveDto.getStatus() == 1){ |
| | | operation = "上线广告"; |
| | | smallProgramAdvert.setOnlineTime(new Date()); |
| | | smallProgramAdvert.setOfflineTime(null); |
| | | } |
| | | } |
| | | smallProgramAdvert.setUpdateTime(new Date()); |
| | | smallProgramAdvert.setUpdateUserId(userId); |
| | | smallProgramAdvertServiceDao.updateSmallProgramAdvertInfo(BeanConvertUtil.beanCovertMap(smallProgramAdvert)); |
| | | //保存更新日志 |
| | | saveHistory(BeanConvertUtil.covertBean(map,SmallProgramAdvert.class),userId,operation); |
| | | }else{ |
| | | throw new BusinessException(ResponseConstant.RESULT_PARAM_ERROR, "无此广告信息,广告id:"+id); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void deleteSmallAdverts(SmallProgramAdvertSaveDto smallProgramAdvertSaveDto, String userId) { |
| | | Map map = smallProgramAdvertServiceDao.queryBusinessAdvertInfo(BeanConvertUtil.beanCovertMap(smallProgramAdvertSaveDto)); |
| | | if(map != null){ |
| | | SmallProgramAdvert smallProgramAdvert = BeanConvertUtil.covertBean(map,SmallProgramAdvert.class); |
| | | smallProgramAdvert.setUpdateTime(new Date()); |
| | | smallProgramAdvert.setUpdateUserId(userId); |
| | | smallProgramAdvert.setStatus(smallProgramAdvertSaveDto.getStatus()); |
| | | smallProgramAdvertServiceDao.updateSmallProgramAdvertInfo(BeanConvertUtil.beanCovertMap(smallProgramAdvert)); |
| | | //保存更新日志 |
| | | saveHistory(BeanConvertUtil.covertBean(map,SmallProgramAdvert.class),userId,"删除广告"); |
| | | }else{ |
| | | throw new BusinessException(ResponseConstant.RESULT_PARAM_ERROR, "无此广告信息"); |
| | | if(!CollectionUtils.isEmpty(smallProgramAdvertSaveDto.getIdList())){ |
| | | for(String id : smallProgramAdvertSaveDto.getIdList()){ |
| | | smallProgramAdvertSaveDto.setId(id); |
| | | Map map = smallProgramAdvertServiceDao.queryBusinessAdvertInfo(BeanConvertUtil.beanCovertMap(smallProgramAdvertSaveDto)); |
| | | if(map != null){ |
| | | SmallProgramAdvert smallProgramAdvert = BeanConvertUtil.covertBean(map,SmallProgramAdvert.class); |
| | | smallProgramAdvert.setUpdateTime(new Date()); |
| | | smallProgramAdvert.setUpdateUserId(userId); |
| | | smallProgramAdvert.setStatus(smallProgramAdvertSaveDto.getStatus()); |
| | | smallProgramAdvertServiceDao.updateSmallProgramAdvertInfo(BeanConvertUtil.beanCovertMap(smallProgramAdvert)); |
| | | //保存更新日志 |
| | | saveHistory(BeanConvertUtil.covertBean(map,SmallProgramAdvert.class),userId,"删除广告"); |
| | | }else{ |
| | | throw new BusinessException(ResponseConstant.RESULT_PARAM_ERROR, "无此广告信息,广告id:"+id); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.floor.FloorDto; |
| | | import com.java110.dto.owner.OwnerAppUserDto; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.dto.unit.UnitDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | |
| | | userPo.setUserId(GenerateCodeFactory.getUserId()); |
| | | userPo.setName(ownerPo.getName()); |
| | | userPo.setTel(ownerPo.getLink()); |
| | | userPo.setPassword(AuthenticationFactory.passwdMd5(ownerPo.getLink())); |
| | | userPo.setPassword(AuthenticationFactory.passwdMd5("888888")); |
| | | userPo.setLevelCd(UserLevelConstant.USER_LEVEL_ORDINARY); |
| | | userPo.setAge(ownerPo.getAge()); |
| | | userPo.setAddress(ownerPo.getAddress()); |
| | |
| | | } |
| | | |
| | | OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo(); |
| | | //状态类型,10000 审核中,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState("12000"); |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_NOT_AUDIT); |
| | | ownerAppUserPo.setAppTypeCd("10010"); |
| | | ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | ownerAppUserPo.setMemberId(ownerPo.getMemberId()); |
| | |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.*; |
| | | import com.java110.vo.ResultVo; |
| | | import com.java110.vo.api.fee.ApiFeeDataVo; |
| | | import com.java110.vo.api.fee.ApiFeeVo; |
| | | import com.java110.vo.api.feeConfig.ApiFeeConfigDataVo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | //去掉多余0 |
| | | feeDto.setSquarePrice(Double.parseDouble(feeDto.getSquarePrice()) + ""); |
| | | feeDto.setAdditionalAmount(Double.parseDouble(feeDto.getAdditionalAmount()) + ""); |
| | | return ResultVo.createResponseEntity(feeDto); |
| | | ApiFeeDataVo apiFeeDataVo = BeanConvertUtil.covertBeanList(feeDtos, ApiFeeDataVo.class).get(0); |
| | | apiFeeDataVo.setStartTime(apiFeeDataVo.getStartTime() == null ? null : apiFeeDataVo.getStartTime().split(" ")[0]); |
| | | apiFeeDataVo.setEndTime(apiFeeDataVo.getEndTime() == null ? null : apiFeeDataVo.getEndTime().split(" ")[0]); |
| | | apiFeeDataVo.setMaxEndTime(apiFeeDataVo.getMaxEndTime() == null ? null : apiFeeDataVo.getMaxEndTime().split(" ")[0]); |
| | | apiFeeDataVo.setDeadlineTime(apiFeeDataVo.getDeadlineTime() == null ? null : apiFeeDataVo.getDeadlineTime().split(" ")[0]); |
| | | return ResultVo.createResponseEntity(apiFeeDataVo); |
| | | } |
| | | |
| | | @Override |
| | |
| | | feeDto.setContractFee(reqJson.getString("payerObjId")); |
| | | feeDto.setPayerObjId(null); |
| | | } |
| | | if(reqJson.containsKey("contractId")){ |
| | | feeDto.setContractFee(reqJson.getString("contractId")); |
| | | } |
| | | int count = feeInnerServiceSMOImpl.queryFeesCount(feeDto); |
| | | if (count > 0) { |
| | | List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto);//查询费用项目 |
| | |
| | | computeFeePrice(feeDtos); |
| | | List<ApiFeeDataVo> apiFeeDataVos = BeanConvertUtil.covertBeanList(feeDtos, ApiFeeDataVo.class); |
| | | for (ApiFeeDataVo apiFeeDataVo : apiFeeDataVos) { |
| | | apiFeeDataVo.setStartTime(apiFeeDataVo.getStartTime() == null ? null : apiFeeDataVo.getStartTime().split(" ")[0]); |
| | | apiFeeDataVo.setEndTime(apiFeeDataVo.getEndTime() == null ? null : apiFeeDataVo.getEndTime().split(" ")[0]); |
| | | apiFeeDataVo.setMaxEndTime(apiFeeDataVo.getMaxEndTime() == null ? null : apiFeeDataVo.getMaxEndTime().split(" ")[0]); |
| | | apiFeeDataVo.setDeadlineTime(apiFeeDataVo.getDeadlineTime() == null ? null : apiFeeDataVo.getDeadlineTime().split(" ")[0]); |
| | | //获取付费对象类型 |
| | | String payerObjType = apiFeeDataVo.getPayerObjType(); |
| | | if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(payerObjType)) { |
| | |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | |
| | | Assert.hasLength(reqJson.getString("cycles"), "周期不能为空"); |
| | | Assert.hasLength(reqJson.getString("receivedAmount"), "实收金额不能为空"); |
| | | Assert.hasLength(reqJson.getString("feeId"), "费用ID不能为空"); |
| | | |
| | | //当支付方式为转账时,需要校验转账人是否为空 |
| | | String primeRate = reqJson.getString("primeRate"); |
| | | if(!StringUtils.isEmpty(primeRate) && primeRate.equals("7")){ |
| | | String transferorName = reqJson.getString("transferorName"); |
| | | if(StringUtils.isEmpty(transferorName)){ |
| | | Assert.hasLength(reqJson.getString("transferorName"), "支付方式为转账时,转账人不能为空"); |
| | | } |
| | | } |
| | | //判断是否 费用状态为缴费结束 |
| | | FeeDto feeDto = new FeeDto(); |
| | | feeDto.setFeeId(reqJson.getString("feeId")); |
| | |
| | | * 获取最近11天的日期字符串(格式:yyyy-MM-dd) |
| | | */ |
| | | private List<String> getRecent11Days() { |
| | | List<String> dates = new ArrayList<>(); |
| | | List<String> date = new ArrayList<>(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | |
| | | for (int i = 0; i < 1; i++) { |
| | | dates.add(sdf.format(calendar.getTime())); |
| | | calendar.add(Calendar.DAY_OF_YEAR, -1); // 前一天 |
| | | } |
| | | // 获取当前日期的前一天 |
| | | calendar.add(Calendar.DAY_OF_YEAR, -1); |
| | | date.add(sdf.format(calendar.getTime())); |
| | | |
| | | return dates; |
| | | return date; |
| | | } |
| | | |
| | | /** |
| | | * 记录解析结果的内部类 |
| | | */ |
| | |
| | | import com.java110.dto.log.AssetImportLogDto; |
| | | import com.java110.intf.common.IAssetImportLogDetailInnerServiceSMO; |
| | | import com.java110.intf.common.IAssetImportLogInnerServiceSMO; |
| | | import com.java110.po.log.AssetImportLogDetailPo; |
| | | import com.java110.po.log.AssetImportLogPo; |
| | | import com.java110.utils.factory.ApplicationContextFactory; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.ExceptionUtil; |
| | | import org.slf4j.Logger; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | try { |
| | | importDataAdaptImpl.importData(assetImportLogDetailDtos); |
| | | } catch (Throwable e) { |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), e); |
| | | // throw new IllegalArgumentException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | log.debug("初始化导入队列完成"); |
| | | |
| | | } |
| | | |
| | | protected void updateImportLogDetailState(String detailId, Exception e) { |
| | | String state = AssetImportLogDetailDto.STATE_FAIL_IMPORT; |
| | | String message = ExceptionUtil.getStackTrace(e); |
| | | AssetImportLogDetailPo tmpAssetImportOwnerRoomPo = new AssetImportLogDetailPo(); |
| | | tmpAssetImportOwnerRoomPo.setDetailId(detailId); |
| | | tmpAssetImportOwnerRoomPo.setState(state); |
| | | tmpAssetImportOwnerRoomPo.setMessage(message); |
| | | assetImportLogDetailInnerServiceSMOImpl.updateAssetImportLogDetail(tmpAssetImportOwnerRoomPo); |
| | | } |
| | | } |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @Service("importRoomFeeQueueData") |
| | | public class ImportRoomFeeQueueDataAdapt extends DefaultImportData implements IImportDataAdapt { |
| | |
| | | public void importData(List<AssetImportLogDetailDto> assetImportLogDetailDtos) { |
| | | |
| | | for (AssetImportLogDetailDto assetImportLogDetailDto : assetImportLogDetailDtos) { |
| | | |
| | | try { |
| | | doImportData(assetImportLogDetailDto); |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | feeConfigDto.setComputingFormula(null); |
| | | List<FeeConfigDto> feeConfigDtos = payFeeConfigV1InnerServiceSMOImpl.queryPayFeeConfigs(feeConfigDto); |
| | | if (ListUtil.isNull(feeConfigDtos)) { |
| | | |
| | | throw new IllegalArgumentException("费用项不存在,或者费用项公式不是动态费用"); |
| | | } |
| | | payFeePo = new PayFeePo(); |
| | |
| | | } |
| | | importRoomFee.setFeeTypeCd(feeConfigDtos.get(0).getFeeTypeCd()); |
| | | payFeePo.setFeeTypeCd(feeConfigDtos.get(0).getFeeTypeCd()); |
| | | payFeePo.setContractFee(importRoomFee.getContractId()); |
| | | payFeePo.setContractFee(contractDtos.get(0).getContractId()); |
| | | // payFeePo.setCreateTime(importFeeDetailPo.getC); |
| | | ContractPartyaDto contractPartyaDto = new ContractPartyaDto(); |
| | | contractPartyaDto.setPartyA(importRoomFee.getPayerObjName()); |
| | | if(importRoomFee.getPayerObjName() == null || Objects.equals(importRoomFee.getPayerObjName(), "")){ |
| | | contractPartyaDto.setPartyA(importRoomFee.getPayerObjName()); |
| | | } |
| | | else{ |
| | | contractPartyaDto.setPartyaId(contractDtos.get(0).getbPartyaId()); |
| | | } |
| | | List<ContractPartyaDto> contractPartyaDtos = iContractPartyaInnerServiceSMO.queryContractPartyas(contractPartyaDto); |
| | | if (ListUtil.isNull(contractPartyaDtos)) { |
| | | throw new IllegalArgumentException("不存在合同主体:"+importRoomFee.getPayerObjName()); |
| | | }else if (contractPartyaDtos.size() > 1){ |
| | | throw new IllegalArgumentException("合同主体"+importRoomFee.getPayerObjName()+"存在重名"); |
| | | } |
| | | importRoomFee.setOwnerName(contractPartyaDtos.get(0).getPartyA()); |
| | | payFeePo.setPayerObjId(contractPartyaDtos.get(0).getPartyaId()); |
| | | payFeePo.setPayerObjType(FeeDto.PAYER_OBJ_TYPE_CONTRACT); |
| | | payFeePo.setIsContractFee("O"); |
| | | payFeePo.setEndTime(importRoomFee.getEndTime()); |
| | | |
| | | } else if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(importRoomFee.getObjType())) { |
| | | payFeePo.setPayerObjId(importRoomFee.getCarId()); |
| | | payFeePo.setPayerObjType(FeeDto.PAYER_OBJ_TYPE_CAR); |
| | |
| | | payFeePo.setPayerObjType(FeeDto.PAYER_OBJ_TYPE_ROOM); |
| | | } |
| | | |
| | | |
| | | payFeePo.setCreateTime(importRoomFee.getCreateTime()); |
| | | FeeDto feeDto = new FeeDto(); |
| | | feeDto.setFeeTypeCd(importRoomFee.getFeeTypeCd()); |
| | | feeDto.setCommunityId(importRoomFee.getCommunityId()); |
| | |
| | | payFeePo.setBatchId(batchId); |
| | | payFeePo.setEndTime(importRoomFee.getStartTime()); |
| | | payFeePo.setStartTime(importRoomFee.getStartTime()); |
| | | if (FeeDto.PAYER_OBJ_TYPE_CONTRACT.equals(importRoomFee.getObjType())){ |
| | | // payFeePo.setEndTime(importRoomFee.getEndTime()); |
| | | } |
| | | if(payFeePo.getAmount() == null && importRoomFee.getFeeName() == null){ |
| | | throw new IllegalArgumentException("收费内容和收费金额不能同时为空"); |
| | | } |
| | |
| | | feeAttrPo.setValue(importRoomFee.getRoomName()); |
| | | } |
| | | feeAttrPo.setFeeId(payFeePo.getFeeId()); |
| | | if(feeAttrPo.getValue() == null){ |
| | | feeAttrPo.setValue(importRoomFee.getPayerObjName()); |
| | | } |
| | | feeAttrPos.add(feeAttrPo); |
| | | |
| | | //todo 不是周期性费用的场景需要写入结束时间 |
| | |
| | | feeAttrPo.setSpecCd(FeeAttrDto.SPEC_CD_OWNER_ID); |
| | | feeAttrPo.setValue(importRoomFee.getOwnerId()); |
| | | feeAttrPo.setFeeId(payFeePo.getFeeId()); |
| | | feeAttrPos.add(feeAttrPo); |
| | | if(feeAttrPo.getValue() != null){ |
| | | feeAttrPos.add(feeAttrPo); |
| | | } |
| | | |
| | | feeAttrPo = new FeeAttrPo(); |
| | | feeAttrPo.setCommunityId(importRoomFee.getCommunityId()); |
| | |
| | | import com.java110.core.factory.AuthenticationFactory; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.owner.OwnerAppUserDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.community.ICommunityInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerAppUserV1InnerServiceSMO; |
| | |
| | | userPo.setUserId(GenerateCodeFactory.getUserId()); |
| | | userPo.setName(ownerPo.getName()); |
| | | userPo.setTel(ownerPo.getLink()); |
| | | userPo.setPassword(AuthenticationFactory.passwdMd5(ownerPo.getLink())); |
| | | userPo.setPassword(AuthenticationFactory.passwdMd5("888888")); |
| | | userPo.setLevelCd(UserLevelConstant.USER_LEVEL_ORDINARY); |
| | | userPo.setAge(ownerPo.getAge()); |
| | | userPo.setAddress(ownerPo.getAddress()); |
| | |
| | | userId = userDtos.get(0).getUserId(); |
| | | |
| | | } |
| | | |
| | | //需求变更,添加业主时不要自动审核通过 |
| | | OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo(); |
| | | //状态类型,10000 审核中,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState("12000"); |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_NOT_AUDIT); |
| | | ownerAppUserPo.setAppTypeCd("10010"); |
| | | ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | ownerAppUserPo.setMemberId(ownerPo.getMemberId()); |
| | |
| | | CommunityDto tmpCommunityDto = communityDtos.get(0); |
| | | |
| | | OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo(); |
| | | //状态类型,10000 审核中,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState("12000"); |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_NOT_AUDIT); |
| | | ownerAppUserPo.setAppTypeCd("10010"); |
| | | ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | ownerAppUserPo.setMemberId(ownerDtos.get(0).getMemberId()); |
| | |
| | | JSONObject businessOwnerAppUser = new JSONObject(); |
| | | businessOwnerAppUser.putAll(reqJson); |
| | | //状态类型,10000 审核中,12000 审核成功,13000 审核失败 |
| | | businessOwnerAppUser.put("state", "12000"); |
| | | businessOwnerAppUser.put("state", OwnerAppUserDto.STATE_AUDIT_SUCCESS); |
| | | businessOwnerAppUser.put("appTypeCd", "10010"); |
| | | businessOwnerAppUser.put("appUserId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | businessOwnerAppUser.put("memberId", ownerDto.getMemberId()); |
| | |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.ListUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | Assert.listNotNull(communityDtos, "未包含小区信息"); |
| | | CommunityDto tmpCommunityDto = communityDtos.get(0); |
| | | |
| | | |
| | | OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo(); |
| | | //状态类型,10000 审核中,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_AUDITING); |
| | | ownerAppUserPo.setAppTypeCd("10010"); |
| | | ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | ownerAppUserPo.setMemberId("-1"); |
| | | ownerAppUserPo.setCommunityName(tmpCommunityDto.getName()); |
| | | ownerAppUserPo.setCommunityId(tmpCommunityDto.getCommunityId()); |
| | | ownerAppUserPo.setAppUserName(reqJson.getString("ownerName")); |
| | | ownerAppUserPo.setAppType("WECHAT"); |
| | | ownerAppUserPo.setLink(reqJson.getString("link")); |
| | | ownerAppUserPo.setUserId(userId); |
| | | ownerAppUserPo.setOpenId("-1"); |
| | | ownerAppUserPo.setRoomId(reqJson.getString("roomId")); |
| | | ownerAppUserPo.setRoomName(reqJson.getString("roomName")); |
| | | ownerAppUserPo.setOwnerTypeCd(reqJson.getString("ownerTypeCd")); |
| | | |
| | | UserAttrDto userAttrDto = new UserAttrDto(); |
| | | userAttrDto.setUserId(userId); |
| | | userAttrDto.setSpecCd(UserAttrDto.SPEC_OPEN_ID); |
| | | List<UserAttrDto> userAttrDtos = userAttrV1InnerServiceSMOImpl.queryUserAttrs(userAttrDto); |
| | | if (!ListUtil.isNull(userAttrDtos)) { |
| | | ownerAppUserPo.setOpenId(userAttrDtos.get(0).getValue()); |
| | | |
| | | //用userId查询是否有待认证记录,没有新增,有的话直接更新状态 |
| | | OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto(); |
| | | ownerAppUserDto.setUserId(userId); |
| | | List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto); |
| | | if(CollectionUtils.isEmpty(ownerAppUserDtos)){ |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_AUDIT_SUCCESS); |
| | | ownerAppUserPo.setAppTypeCd("10010"); |
| | | ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | ownerAppUserPo.setMemberId("-1"); |
| | | ownerAppUserPo.setCommunityName(tmpCommunityDto.getName()); |
| | | ownerAppUserPo.setCommunityId(tmpCommunityDto.getCommunityId()); |
| | | ownerAppUserPo.setAppUserName(reqJson.getString("ownerName")); |
| | | ownerAppUserPo.setAppType("WECHAT"); |
| | | ownerAppUserPo.setLink(reqJson.getString("link")); |
| | | ownerAppUserPo.setUserId(userId); |
| | | ownerAppUserPo.setOpenId("-1"); |
| | | ownerAppUserPo.setRoomId(reqJson.getString("roomId")); |
| | | ownerAppUserPo.setRoomName(reqJson.getString("roomName")); |
| | | ownerAppUserPo.setOwnerTypeCd(reqJson.getString("ownerTypeCd")); |
| | | UserAttrDto userAttrDto = new UserAttrDto(); |
| | | userAttrDto.setUserId(userId); |
| | | userAttrDto.setSpecCd(UserAttrDto.SPEC_OPEN_ID); |
| | | List<UserAttrDto> userAttrDtos = userAttrV1InnerServiceSMOImpl.queryUserAttrs(userAttrDto); |
| | | if (!ListUtil.isNull(userAttrDtos)) { |
| | | ownerAppUserPo.setOpenId(userAttrDtos.get(0).getValue()); |
| | | } |
| | | ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo); |
| | | }else{ |
| | | for(OwnerAppUserDto ownerAppUser : ownerAppUserDtos){ |
| | | ownerAppUserPo.setAppUserId(ownerAppUser.getAppUserId()); |
| | | if(StringUtil.isEmpty(reqJson.getString("link"))){ |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_AUDITING); |
| | | }else{ |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_AUDIT_SUCCESS); |
| | | } |
| | | ownerAppUserV1InnerServiceSMOImpl.updateOwnerAppUser(ownerAppUserPo); |
| | | } |
| | | } |
| | | |
| | | ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo); |
| | | } |
| | | } |
| | |
| | | private void addOwnerAppUser(OwnerDto ownerDto, OwnerAppUserDto ownerAppUserDto) { |
| | | |
| | | OwnerAppUserPo ownerAppUserPo = BeanConvertUtil.covertBean(ownerAppUserDto, OwnerAppUserPo.class); |
| | | //状态类型,10000 审核中,12000 审核成功,13000 审核失败 |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | ownerAppUserPo.setMemberId(ownerDto.getMemberId()); |
| | | ownerAppUserPo.setCommunityName(ownerDto.getCommunityName()); |
| | |
| | | ownerAppUserPo.setLink(tmpOwnerDto.getLink()); |
| | | ownerAppUserPo.setOpenId("-1"); |
| | | ownerAppUserPo.setAppTypeCd("10010"); |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_AUDIT_SUCCESS); |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_AUDITING); |
| | | ownerAppUserPo.setRemark("注册自动关联"); |
| | | ownerAppUserPo.setUserId(userPo.getUserId()); |
| | | ownerAppUserPo.setAppType(appType); |
| | |
| | | } |
| | | |
| | | OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo(); |
| | | //状态类型,10000 审核中,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState("12000"); |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_NOT_AUDIT); |
| | | ownerAppUserPo.setAppTypeCd("10010"); |
| | | ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | ownerAppUserPo.setMemberId(ownerDtos.get(0).getMemberId()); |
| | |
| | | import com.java110.dto.app.AppDto; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.msg.SmsDto; |
| | | import com.java110.dto.owner.OwnerAppUserDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.user.UserAttrDto; |
| | | import com.java110.dto.user.UserDto; |
| | |
| | | if (flag < 1) { |
| | | throw new CmdException("注册失败"); |
| | | } |
| | | |
| | | OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo(); |
| | | //状态类型,10000 审核中,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState("12000"); |
| | | //状态类型,10000 审核中, 11000 待认证 ,12000 审核成功,13000 审核失败 |
| | | ownerAppUserPo.setState(OwnerAppUserDto.STATE_NOT_AUDIT); |
| | | ownerAppUserPo.setAppTypeCd("10010"); |
| | | ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId)); |
| | | ownerAppUserPo.setMemberId(ownerDtos.get(0).getMemberId()); |
| | |
| | | Environment.setSystemStartWay(Environment.SPRING_BOOT); |
| | | |
| | | //刷新缓存 |
| | | // flushMainCache(args); |
| | | flushMainCache(args); |
| | | |
| | | //服务启动完成 |
| | | ServiceStartInit.printStartSuccessInfo(); |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: devlocal |
| | | |
| | | |
| | | # docker build -t lx . |
| | | # |