| @@ -633,7 +633,7 @@ public class WxAllBillController extends BillBaseController { | |||||
| if (null == wxMerchant.getId()) { | if (null == wxMerchant.getId()) { | ||||
| return new ResultData(Result.ERROR,"请选择商户"); | return new ResultData(Result.ERROR,"请选择商户"); | ||||
| } | } | ||||
| //wxMerchant.setIsPreview(EnumYesOrNo.NO.getCode()); | |||||
| wxMerchant.setIsPreview(EnumYesOrNo.NO.getCode()); | |||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setNeedPayPreDays(getNearBillBeforeDays()); | wxMerchant.setNeedPayPreDays(getNearBillBeforeDays()); | ||||
| List<WxAllBill> list = billAllHelper.getMerchantBillList(wxMerchant); | List<WxAllBill> list = billAllHelper.getMerchantBillList(wxMerchant); | ||||
| @@ -674,7 +674,7 @@ public class WxAllBillController extends BillBaseController { | |||||
| } | } | ||||
| wxMerchant.setIsPreview(EnumYesOrNo.NO.getCode()); | wxMerchant.setIsPreview(EnumYesOrNo.NO.getCode()); | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| //wxMerchant.setToPayMerchant(EnumYesOrNo.YES.getCode()); | |||||
| wxMerchant.setToPayMerchant(EnumYesOrNo.YES.getCode()); | |||||
| List<WxAllBill> list = billAllHelper.getMerchantBillList(wxMerchant); | List<WxAllBill> list = billAllHelper.getMerchantBillList(wxMerchant); | ||||
| if (null != list && list.size() > 0 ) { | if (null != list && list.size() > 0 ) { | ||||
| List<Long> merchnatIds = new ArrayList<Long>(); | List<Long> merchnatIds = new ArrayList<Long>(); | ||||
| @@ -151,5 +151,7 @@ public class WxFinanceReceive extends TenantEntity { | |||||
| private Integer finishStatus; | private Integer finishStatus; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long finishId; | private Long finishId; | ||||
| @TableField(exist = false) | |||||
| private Integer hasExtraMoney; | |||||
| } | } | ||||
| @@ -255,7 +255,11 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| } | } | ||||
| return sum.getAdvanceList(); | return sum.getAdvanceList(); | ||||
| }else { | }else { | ||||
| faq.setType(EnumFinanceCashierType.RECEIVE.getCode()); | |||||
| faq.setReceiveType(EnumFinanceReceiveType.ADVANCE.getCode()); | |||||
| faq.setStatus(EnumFinanceReceiveStatus.NORMAL.getCode()); | |||||
| faq.setSortColumns(SortField.CreateTime_ASC); | faq.setSortColumns(SortField.CreateTime_ASC); | ||||
| faq.setHasExtraMoney(EnumYesOrNo.YES.getCode()); | |||||
| return wxFinanceReceiveMapper.findList(faq); | return wxFinanceReceiveMapper.findList(faq); | ||||
| } | } | ||||
| @@ -273,6 +277,10 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| }else { | }else { | ||||
| List<FinanceSetOffDetailVo> setoffList = bill.getSetOffDetailList(); | List<FinanceSetOffDetailVo> setoffList = bill.getSetOffDetailList(); | ||||
| for (int j = calcuteDto.getCurrentIndex(); j < calcuteDto.getAdvanceList().size() ; j++) { | for (int j = calcuteDto.getCurrentIndex(); j < calcuteDto.getAdvanceList().size() ; j++) { | ||||
| owe = new BigDecimal(bill.getOwe()); | |||||
| if (owe.compareTo(b0) <= 0) { | |||||
| break; | |||||
| } | |||||
| WxFinanceReceive advance = calcuteDto.getAdvanceList().get(j); | WxFinanceReceive advance = calcuteDto.getAdvanceList().get(j); | ||||
| BigDecimal remain = new BigDecimal(advance.getRemain()); | BigDecimal remain = new BigDecimal(advance.getRemain()); | ||||
| if (remain.compareTo(b0) > 0) { | if (remain.compareTo(b0) > 0) { | ||||
| @@ -54,6 +54,7 @@ | |||||
| <if test=" null != isPrint ">and `is_print` = #{isPrint}</if> | <if test=" null != isPrint ">and `is_print` = #{isPrint}</if> | ||||
| <if test=" null != isFinish ">and `is_finish` = #{isFinish}</if> | <if test=" null != isFinish ">and `is_finish` = #{isFinish}</if> | ||||
| <if test=" null != finishStatus ">and `status` in (1,3)</if> | <if test=" null != finishStatus ">and `status` in (1,3)</if> | ||||
| <if test=" null != hasExtraMoney ">and receive_money - IFNULL(use_money,'0') > 0</if> | |||||
| <if test=" null != merchantIdList "> | <if test=" null != merchantIdList "> | ||||
| and merchant_id in | and merchant_id in | ||||
| <foreach collection="merchantIdList" index="index" item="midItem" open="(" separator="," close=")"> | <foreach collection="merchantIdList" index="index" item="midItem" open="(" separator="," close=")"> | ||||