| @@ -51,12 +51,16 @@ public class WxFinancePrintController extends BaseController { | |||||
| @GetMapping("types") | @GetMapping("types") | ||||
| public ResultData types() { | public ResultData types() { | ||||
| List<Map> list = new ArrayList<Map>(); | List<Map> list = new ArrayList<Map>(); | ||||
| for (EnumFinancePrintDataType t : EnumFinancePrintDataType.values()) { | |||||
| Map m = new HashMap(); | |||||
| m.put("id", t.getCode()); | |||||
| m.put("name", t.getMessage()); | |||||
| list.add(m); | |||||
| } | |||||
| Map m = new HashMap(); | |||||
| m.put("id", EnumFinancePrintDataType.FINANCE_RECEIVE.getCode()); | |||||
| m.put("name", EnumFinancePrintDataType.FINANCE_RECEIVE.getMessage()); | |||||
| list.add(m); | |||||
| // for (EnumFinancePrintDataType t : EnumFinancePrintDataType.values()) { | |||||
| // Map m = new HashMap(); | |||||
| // m.put("id", t.getCode()); | |||||
| // m.put("name", t.getMessage()); | |||||
| // list.add(m); | |||||
| // } | |||||
| return new ResultData(list); | return new ResultData(list); | ||||
| } | } | ||||
| @@ -140,6 +144,17 @@ public class WxFinancePrintController extends BaseController { | |||||
| return new ResultData(wxFinancePrintService.parseTemplateData(record.getTenantId(),record.getId(),record.getDataIds(),null)); | return new ResultData(wxFinancePrintService.parseTemplateData(record.getTenantId(),record.getId(),record.getDataIds(),null)); | ||||
| } | } | ||||
| @ApiOperation("确认打印") | |||||
| @PostMapping("confirmPrint") | |||||
| @TenantIgnore | |||||
| public ResultData confirmPrint(@RequestBody WxFinancePrintTemplate record) { | |||||
| if (StringUtils.isBlank(record.getTenantId())||null == record.getDataId()) { | |||||
| return new ResultData(Result.ERROR,"参数不对"); | |||||
| } | |||||
| wxFinancePrintService.confirmPrint(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("") | @ApiOperation("") | ||||
| @GetMapping("needUpdate") | @GetMapping("needUpdate") | ||||
| @TenantIgnore | @TenantIgnore | ||||
| @@ -58,6 +58,8 @@ public class WxFinancePrintTemplate extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List tempItems; | private List tempItems; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| List<Long> dataIds; | |||||
| private List<Long> dataIds; | |||||
| @TableField(exist = false) | |||||
| private Long dataId; | |||||
| } | } | ||||
| @@ -28,6 +28,6 @@ public interface WxFinanceReceiveMapper extends CommonMapper<WxFinanceReceive, L | |||||
| List<WxFinanceReceivePayway> getReceivePayWaySum(WxFinanceReceive record); | List<WxFinanceReceivePayway> getReceivePayWaySum(WxFinanceReceive record); | ||||
| void updatePrint(WxFinanceReceive record); | |||||
| } | } | ||||
| @@ -17,4 +17,5 @@ public interface WxFinancePrintService { | |||||
| void copy(WxFinancePrintTemplate record); | void copy(WxFinancePrintTemplate record); | ||||
| void setTemplatesDel(WxFinancePrintTemplate record); | void setTemplatesDel(WxFinancePrintTemplate record); | ||||
| List<PrintVo> parseTemplateData(String tenantId,Long templateId,List<Long> dataIds,Object entity); | List<PrintVo> parseTemplateData(String tenantId,Long templateId,List<Long> dataIds,Object entity); | ||||
| void confirmPrint(WxFinancePrintTemplate record); | |||||
| } | } | ||||
| @@ -37,6 +37,7 @@ public interface WxFinanceService { | |||||
| void invalidReceive(WxFinanceReceive record,MallUserInfo user,String remark); | void invalidReceive(WxFinanceReceive record,MallUserInfo user,String remark); | ||||
| void redSetoffReceive(WxFinanceReceive record,MallUserInfo user); | void redSetoffReceive(WxFinanceReceive record,MallUserInfo user); | ||||
| List<Long> getReceiveBillIds(WxFinanceReceiveBill record); | List<Long> getReceiveBillIds(WxFinanceReceiveBill record); | ||||
| void updateReceivePrint(WxFinanceReceive record); | |||||
| //预收款 | //预收款 | ||||
| List<WxAllBill> calcuetSetOff(FinanceSetOffDTO dto,MallUserInfo user); | List<WxAllBill> calcuetSetOff(FinanceSetOffDTO dto,MallUserInfo user); | ||||
| FinanceBillSetoffSum getBillSetoffSum(WxFinanceReceive record); | FinanceBillSetoffSum getBillSetoffSum(WxFinanceReceive record); | ||||
| @@ -379,5 +379,19 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @Override | |||||
| public void confirmPrint(WxFinancePrintTemplate record) { | |||||
| if (record.getType().intValue() == EnumFinancePrintDataType.FINANCE_RECEIVE.getCode()) { | |||||
| WxFinanceReceive receive = wxFinanceService.getReceiveById(record, record.getDataId()); | |||||
| if (null != receive) { | |||||
| wxFinanceService.updateReceivePrint(receive); | |||||
| } | |||||
| }else if (record.getType().intValue() == EnumFinancePrintDataType.BILL.getCode()) { | |||||
| }else if(record.getType().intValue() == EnumFinancePrintDataType.RENT_OWE.getCode()) { | |||||
| } | |||||
| } | |||||
| } | } | ||||
| @@ -1052,6 +1052,11 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| return wxFinanceReceiveBillMapper.findBillIdList(record); | return wxFinanceReceiveBillMapper.findBillIdList(record); | ||||
| } | } | ||||
| @Override | |||||
| public void updateReceivePrint(WxFinanceReceive record) { | |||||
| wxFinanceReceiveMapper.updatePrint(record); | |||||
| } | |||||
| @Override | @Override | ||||
| public void redSetoffReceive(WxFinanceReceive record, MallUserInfo user) { | public void redSetoffReceive(WxFinanceReceive record, MallUserInfo user) { | ||||
| invalidReceive(record, user , true); | invalidReceive(record, user , true); | ||||
| @@ -138,6 +138,10 @@ | |||||
| update wx_finance_receive set is_finish = 1 | update wx_finance_receive set is_finish = 1 | ||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </update> | </update> | ||||
| <update id="updatePrint" parameterType="com.iformall.domain.po.WxFinanceReceive"> | |||||
| update wx_finance_receive set is_print = 1 where id = #{id} and tenant_id = #{tenantId} | |||||
| </update> | |||||
| </mapper> | </mapper> | ||||