| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.accountDetail.AccountDetailDto; |
| | | import com.java110.dto.account.AccountDetailDto; |
| | | import com.java110.intf.acct.IAccountDetailInnerServiceSMO; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.po.account.AccountDetailPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Autowired |
| | | private IAccountInnerServiceSMO accountInnerServiceSMOImpl; |
| | |
| | | accountDetailDto.setDetailType(AccountDetailDto.DETAIL_TYPE_IN); |
| | | List<AccountDetailDto> accountDetailDtos = accountDetailInnerServiceSMOImpl.queryAccountDetails(accountDetailDto); |
| | | |
| | | Assert.listOnlyOne(accountDetailDtos,"入账明细不存在"); |
| | | Assert.listOnlyOne(accountDetailDtos, "入账明细不存在"); |
| | | |
| | | AccountDetailPo accountDetailPo = new AccountDetailPo(); |
| | | accountDetailPo.setAcctId(accountDetailDtos.get(0).getAcctId()); |
| | | accountDetailPo.setObjId(accountDetailDtos.get(0).getObjId()); |
| | | accountDetailPo.setAmount(accountDetailDtos.get(0).getAmount()); |
| | | accountDetailPo.setRemark("明细:"+reqJson.getString("detailId")+"撤销,原因:"+reqJson.getString("remark")); |
| | | accountDetailPo.setRemark("明细:" + reqJson.getString("detailId") + "撤销,原因:" + reqJson.getString("remark")); |
| | | int flag = accountInnerServiceSMOImpl.withholdAccount(accountDetailPo); |
| | | if(flag < 1){ |
| | | if (flag < 1) { |
| | | throw new CmdException("撤销失败"); |
| | | } |
| | | |
| | |
| | | accountDetailPo1.setDetailId(accountDetailDtos.get(0).getDetailId()); |
| | | accountDetailPo1.setDetailType(AccountDetailDto.DETAIL_TYPE_IN_CANCEL); |
| | | flag = accountDetailInnerServiceSMOImpl.updateAccountDetails(accountDetailPo1); |
| | | if(flag < 1){ |
| | | if (flag < 1) { |
| | | throw new CmdException("撤销失败"); |
| | | } |
| | | } |