old mode 100644
new mode 100755
| | |
| | | import com.java110.core.base.controller.BaseController; |
| | | import com.java110.core.context.BusinessServiceDataFlow; |
| | | import com.java110.core.factory.DataTransactionFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.fee.FeeAttrDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.fee.bmo.IQueryFeeByAttr; |
| | | import com.java110.fee.bmo.IQueryOweFee; |
| | | import com.java110.fee.bmo.IQueryParkspaceFee; |
| | | import com.java110.fee.bmo.*; |
| | | import com.java110.fee.smo.IFeeServiceSMO; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.InitConfigDataException; |
| | | import com.java110.utils.exception.InitDataFlowContextException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private IQueryOweFee queryOweFeeImpl; |
| | | |
| | | @Autowired |
| | | private IPayOweFee payOweFeeImpl; |
| | | |
| | | @Autowired |
| | | private IImportRoomFee importRoomFeeImpl; |
| | | |
| | | @RequestMapping(path = "/service", method = RequestMethod.GET) |
| | | public String serviceGet(HttpServletRequest request) { |
| | |
| | | responseJson = DataTransactionFactory.createBusinessResponseJson(businessServiceDataFlow, ResponseConstant.RESULT_CODE_ERROR, e.getMessage() + e, |
| | | null); |
| | | } finally { |
| | | return responseJson.toJSONString(); |
| | | } |
| | | return responseJson.toJSONString(); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 查询欠费费用 |
| | | * @path /app/feeApi/listOweFees |
| | | * |
| | | * @param payObjId 付费方ID |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @path /app/feeApi/listOweFees |
| | | */ |
| | | @RequestMapping(value = "/listOweFees", method = RequestMethod.GET) |
| | | public ResponseEntity<String> listOweFees( |
| | | @RequestParam(value = "payObjId") String payObjId, |
| | | @RequestParam(value = "payObjType") String payObjType, |
| | | @RequestParam(value = "communityId") String communityId) { |
| | | public ResponseEntity<String> listOweFees(@RequestParam(value = "payObjId", required = false) String payObjId, |
| | | @RequestParam(value = "payObjType", required = false) String payObjType, |
| | | @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("费用对象或者业主不能都为空"); |
| | | // } |
| | | FeeDto feeDto = new FeeDto(); |
| | | feeDto.setPayerObjId(payObjId); |
| | | if (!StringUtil.isEmpty(payObjId)) { |
| | | if (payObjId.contains(",")) { |
| | | feeDto.setPayerObjIds(payObjId.split(",")); |
| | | } else { |
| | | feeDto.setPayerObjId(payObjId); |
| | | } |
| | | } |
| | | if (!StringUtil.isEmpty(targetEndTime)) { |
| | | targetEndTime = targetEndTime + " 23:59:59"; |
| | | feeDto.setTargetEndTime(targetEndTime); |
| | | } |
| | | feeDto.setPayerObjType(payObjType); |
| | | feeDto.setOwnerId(ownerId); |
| | | feeDto.setCommunityId(communityId); |
| | | return queryOweFeeImpl.query(feeDto); |
| | | } |
| | | |
| | | /** |
| | | * 查询欠费费用 |
| | | * |
| | | * @param roomId 房屋ID |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @path /app/feeApi/listAllRoomOweFees |
| | | */ |
| | | @RequestMapping(value = "/listAllRoomOweFees", method = RequestMethod.GET) |
| | | public ResponseEntity<String> listAllRoomOweFees( |
| | | @RequestParam(value = "roomId", required = false) String roomId, |
| | | @RequestParam(value = "communityId") String communityId) { |
| | | FeeDto feeDto = new FeeDto(); |
| | | feeDto.setPayerObjId(roomId); |
| | | feeDto.setPayerObjType(FeeDto.PAYER_OBJ_TYPE_ROOM); |
| | | feeDto.setCommunityId(communityId); |
| | | return queryOweFeeImpl.querys(feeDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询欠费费用(批量查询) |
| | | * |
| | | * @param num 停车位或房屋编号 |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @path /app/feeApi/getOweFees |
| | | */ |
| | | @RequestMapping(value = "/getOweFees", method = RequestMethod.GET) |
| | | public ResponseEntity<String> getOweFees( |
| | | @RequestParam(value = "payObjType") String payObjType, |
| | | @RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "billType") String billType, |
| | | @RequestParam(value = "row") int row, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "num", required = false) String num |
| | | ) { |
| | | FeeDto feeDto = new FeeDto(); |
| | | feeDto.setPayerObjId(num); |
| | | feeDto.setPayerObjType(payObjType); |
| | | feeDto.setCommunityId(communityId); |
| | | feeDto.setBillType(billType); |
| | | feeDto.setRow(row); |
| | | feeDto.setPage(page); |
| | | return queryOweFeeImpl.queryAllOwneFee(feeDto); |
| | | } |
| | | |
| | | /** |
| | | * 欠费批量缴费 |
| | | * |
| | | * @param reqJson { |
| | | * "communityId":"", |
| | | * "fees":[ |
| | | * { |
| | | * "feeId":"123123", |
| | | * "feePrice":10.00, |
| | | * <p> |
| | | * } |
| | | * <p> |
| | | * ] |
| | | * } |
| | | * @return |
| | | * @path /app/feeApi/payOweFee |
| | | */ |
| | | @RequestMapping(value = "/payOweFee", method = RequestMethod.POST) |
| | | public ResponseEntity<String> payOweFee(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | | |
| | | Assert.hasKey(reqJson, "fees", "未包含缴费项目"); |
| | | |
| | | return payOweFeeImpl.pay(reqJson); |
| | | } |
| | | |
| | | /** |
| | | * 费用导入 |
| | | * |
| | | * @param reqString |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importRoomFees", method = RequestMethod.POST) |
| | | public ResponseEntity<String> importRoomFees(@RequestBody String reqString) { |
| | | |
| | | JSONObject reqJson = JSONObject.parseObject(reqString); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "feeTypeCd", "未包含费用类型"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "未包含商户信息"); |
| | | Assert.hasKeyAndValue(reqJson, "userId", "未包含用户信息"); |
| | | Assert.hasKeyAndValue(reqJson, "batchId", "未包含用户信息"); |
| | | |
| | | return importRoomFeeImpl.importFee(reqJson); |
| | | } |
| | | |
| | | /** |
| | | * 车辆费用导入 |
| | | * /feeApi/importCarFees |
| | | * path /app/feeApi/importCarFees |
| | | * |
| | | * @param reqString |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importCarFees", method = RequestMethod.POST) |
| | | public ResponseEntity<String> importCarFees(@RequestBody String reqString) { |
| | | |
| | | JSONObject reqJson = JSONObject.parseObject(reqString); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "feeTypeCd", "未包含费用类型"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "未包含商户信息"); |
| | | Assert.hasKeyAndValue(reqJson, "userId", "未包含用户信息"); |
| | | Assert.hasKeyAndValue(reqJson, "batchId", "未包含批次信息"); |
| | | |
| | | return importRoomFeeImpl.importCarFee(reqJson); |
| | | } |
| | | |
| | | /** |
| | | * 合同费用导入 |
| | | * /feeApi/importContractFees |
| | | * path /app/feeApi/importContractFees |
| | | * |
| | | * @param reqString |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importContractFees", method = RequestMethod.POST) |
| | | public ResponseEntity<String> importContractFees(@RequestBody String reqString) { |
| | | |
| | | JSONObject reqJson = JSONObject.parseObject(reqString); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "feeTypeCd", "未包含费用类型"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "未包含商户信息"); |
| | | Assert.hasKeyAndValue(reqJson, "userId", "未包含用户信息"); |
| | | Assert.hasKeyAndValue(reqJson, "batchId", "未包含批次信息"); |
| | | |
| | | return importRoomFeeImpl.importContractFees(reqJson); |
| | | } |
| | | |
| | | } |