old mode 100644
new mode 100755
| | |
| | | import com.java110.dto.workflow.WorkflowDto; |
| | | import com.java110.intf.common.IWorkflowInnerServiceSMO; |
| | | import com.java110.intf.community.ICommunityInnerServiceSMO; |
| | | import com.java110.po.community.CommunityAttrPo; |
| | | import com.java110.po.community.CommunityMemberPo; |
| | | import com.java110.po.community.CommunityPo; |
| | | import com.java110.po.fee.PayFeeConfigPo; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Calendar; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Service("communityBMOImpl") |
| | | public class CommunityBMOImpl extends ApiBaseBMO implements ICommunityBMO { |
| | | |
| | | |
| | | @Autowired |
| | | private ICommunityInnerServiceSMO communityInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IWorkflowInnerServiceSMO workflowInnerServiceSMOImpl; |
| | |
| | | */ |
| | | public JSONObject addCommunityMember(JSONObject paramInJson) { |
| | | |
| | | //查询小区是否存在 |
| | | CommunityDto communityDto = new CommunityDto(); |
| | | communityDto.setCommunityId(paramInJson.getString("communityId")); |
| | | List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto); |
| | | |
| | | Assert.listOnlyOne(communityDtos, "小区不存"); |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_MEMBER_JOINED_COMMUNITY); |
| | | business.put(CommonConstant.HTTP_SEQ, 2); |
| | |
| | | businessCommunityMember.put("communityId", paramInJson.getString("communityId")); |
| | | businessCommunityMember.put("memberId", paramInJson.getString("memberId")); |
| | | businessCommunityMember.put("memberTypeCd", paramInJson.getString("memberTypeCd")); |
| | | businessCommunityMember.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | Calendar endTime = Calendar.getInstance(); |
| | | endTime.add(Calendar.MONTH,Integer.parseInt(communityDtos.get(0).getPayFeeMonth())); |
| | | businessCommunityMember.put("endTime", DateUtil.getFormatTimeString(endTime.getTime(),DateUtil.DATE_FORMATE_STRING_A)); |
| | | String auditStatusCd = MappingCache.getValue(MappingConstant.DOMAIN_COMMUNITY_MEMBER_AUDIT, paramInJson.getString("memberTypeCd")); |
| | | auditStatusCd = StringUtils.isEmpty(auditStatusCd) ? StateConstant.AGREE_AUDIT : auditStatusCd; |
| | | businessCommunityMember.put("auditStatusCd", auditStatusCd); |
| | |
| | | */ |
| | | public void addCommunityMembers(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | |
| | | JSONObject businessCommunityMember = new JSONObject(); |
| | | businessCommunityMember.put("communityMemberId", "-1"); |
| | | businessCommunityMember.put("communityId", paramInJson.getString("communityId")); |
| | |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void addAttr(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | paramInJson.put("attrId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_attrId)); |
| | | CommunityAttrPo communityAttrPo = BeanConvertUtil.covertBean(paramInJson, CommunityAttrPo.class); |
| | | super.insert(dataFlowContext, communityAttrPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_COMMUNITY_INFO); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void updateAttr(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | CommunityAttrPo communityAttrPo = BeanConvertUtil.covertBean(paramInJson, CommunityAttrPo.class); |
| | | super.insert(dataFlowContext, communityAttrPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_COMMUNITY_INFO); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void updateCommunityOne(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | CommunityPo communityPo = BeanConvertUtil.covertBean(paramInJson, CommunityPo.class); |
| | | |
| | | super.update(dataFlowContext, communityPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_COMMUNITY_INFO); |
| | | |
| | | } |
| | | } |