| | |
| | | package com.java110.fee.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.msg.MpPaymentRecordPo; |
| | | import com.java110.fee.bmo.importFeeDetail.IDeleteImportFeeDetailBMO; |
| | | import com.java110.fee.bmo.importFeeDetail.IGetImportFeeDetailBMO; |
| | | import com.java110.fee.bmo.importFeeDetail.ISaveImportFeeDetailBMO; |
| | |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | MpPaymentRecord mpPaymentRecord = BeanConvertUtil.covertBean(reqJson, MpPaymentRecord.class); |
| | | // 由于BMO接口使用MaintenancePayment,这里需要做适配转换 |
| | | // 注意:这里需要根据实际情况调整,可能需要转换器 |
| | | MpPaymentRecord mpPaymentRecord1 = new MpPaymentRecord(); |
| | | mpPaymentRecord1.setMpId(reqJson.getString("mpId")); |
| | | ResponseEntity<String> stringResponseEntity = getImportFeeDetailBMOImpl.get(mpPaymentRecord1); |
| | | mpPaymentRecord.setPrintCount((JSONObject.parseObject(stringResponseEntity.getBody()).getInteger("total") + 1) + ""); |
| | | return saveImportFeeDetailBMOImpl.save(mpPaymentRecord); |
| | | } |
| | | |
| | | public ResponseEntity<String> saveMpPaymentRecord(MpPaymentRecordPo mpPaymentRecord) { |
| | | if (mpPaymentRecord == null) { |
| | | return new ResponseEntity<>(HttpStatus.BAD_REQUEST); |
| | | } |
| | | return saveImportFeeDetailBMOImpl.save(mpPaymentRecord); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改打印支取到账记录 |
| | |
| | | } |
| | | |
| | | // 由于BMO接口使用MaintenancePayment,这里需要做适配转换 |
| | | |
| | | return getImportFeeDetailBMOImpl.get(mpPaymentRecordDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询打印支取到账记录汇总 |
| | | * |
| | | * @param mpId 主表记录ID(必填) |
| | | * @return 响应结果 |
| | | * @serviceCode /mpPaymentRecord/queryMpPaymentRecordAll |
| | | * @path /app/mpPaymentRecord/queryMpPaymentRecordAll |
| | | */ |
| | | @RequestMapping(value = "/queryMpPaymentRecordAll", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryMpPaymentRecordAll(@RequestParam(value = "mpId") String mpId) { |
| | | // 封装查询DTO |
| | | MpPaymentRecord mpPaymentRecordDto = new MpPaymentRecord(); |
| | | mpPaymentRecordDto.setMpId(mpId); |
| | | |
| | | return getImportFeeDetailBMOImpl.queryMpPaymentRecordAll(mpPaymentRecordDto); |
| | | } |
| | | |
| | | /** |
| | | * 根据ID查询单条打印支取到账记录 |
| | | * |