| @@ -566,7 +566,6 @@ public class WxRentContractController extends WxContractBaseController { | |||
| } | |||
| @PostMapping("apply") | |||
| @SystemControllerLog(description = "租赁合同-提交审批") | |||
| public ResultData apply(@RequestBody WxRentContract wxRentContract) { | |||
| WxRentContract rentContract = wxRentContractMapper.selectById(wxRentContract.getId()); | |||
| if (null == rentContract) { | |||
| @@ -680,23 +679,6 @@ public class WxRentContractController extends WxContractBaseController { | |||
| return new ResultData(map); | |||
| } | |||
| // @GetMapping("/del") | |||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| // @SystemControllerLog(description = "租赁合同-删除") | |||
| // public ResultData delete(String id) { | |||
| // logger.debug("[" + getIpAddr() + "] WxRentContractController::delete"); | |||
| // return wxRentContractService.deleteById(id); | |||
| // } | |||
| @GetMapping("/hasRentStatus") | |||
| public ResultData hasRentStatus(@ModelAttribute WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::hasRentStatus"); | |||
| @@ -722,47 +704,25 @@ public class WxRentContractController extends WxContractBaseController { | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMerchantService.getMerchantList(wxMerchant)); | |||
| } | |||
| // @GetMapping("autolatePay") | |||
| // @SystemControllerLog(description = "autolatePay") | |||
| // public ResultData autolatePay(String startDate, String endDate) throws Exception{ | |||
| // try { | |||
| // logger.info("账单滞纳金更新开始"); | |||
| // wxBillRentMapper.insertBillAction(); | |||
| // wxBillPropertyMapper.insertBillAction(); | |||
| // /** | |||
| // * 预览账单展示,编辑账期,后端生成账单金额 | |||
| // * @param wxRentContract | |||
| // * @return | |||
| // */ | |||
| // @PostMapping("buildBillPriceList") | |||
| // public ResultData buildBillPriceList(@RequestBody WxRentContract wxRentContract) throws Exception{ | |||
| // logger.debug("[" + getIpAddr() + "] WxRentContractController::buildBillPriceList"); | |||
| // WxRentContract dbRent = wxRentContractMapper.selectById(wxRentContract.getId()); | |||
| // dbRent.setPreviewBillRentList(wxRentContract.getPreviewBillRentList()); | |||
| // | |||
| // wxBillRentMapper.autoAddLatePayPrice(); | |||
| // wxBillPropertyMapper.autoAddLatePayPrice(); | |||
| // logger.info("账单滞纳金更新结束"); | |||
| // }catch (Exception e){ | |||
| // logger.error("LatePayBillActionSchedule error! message:{}",e.getMessage()); | |||
| // logger.error("LatePayBillActionSchedule error!",e); | |||
| // if(dbRent.getRentStartType()!=null && dbRent.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ | |||
| // dbRent.setRentalStartDate(dbRent.getStartDate()); | |||
| // } | |||
| // return new ResultData(); | |||
| // List<WxAllBill> result = wxRentContractService.buildRent(getUser(),dbRent, EnumIsPreview.YES.getCode(), false); | |||
| // return new ResultData(result); | |||
| // } | |||
| /** | |||
| * 预览账单展示,编辑账期,后端生成账单金额 | |||
| * @param wxRentContract | |||
| * @return | |||
| */ | |||
| @PostMapping("buildBillPriceList") | |||
| public ResultData buildBillPriceList(@RequestBody WxRentContract wxRentContract) throws Exception{ | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::buildBillPriceList"); | |||
| WxRentContract dbRent = wxRentContractMapper.selectById(wxRentContract.getId()); | |||
| dbRent.setPreviewBillRentList(wxRentContract.getPreviewBillRentList()); | |||
| if(dbRent.getRentStartType()!=null && dbRent.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ | |||
| dbRent.setRentalStartDate(dbRent.getStartDate()); | |||
| } | |||
| List<WxAllBill> result = wxRentContractService.buildRent(getUser(),dbRent, EnumIsPreview.YES.getCode(), false); | |||
| return new ResultData(result); | |||
| } | |||
| @PostMapping("updateRentStartTime") | |||
| @SystemControllerLog(description = "租赁合同-更新租赁开始日期") | |||
| public ResultData updateRentStartTime(@RequestBody WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentStartTime"); | |||
| WxRentContract rentContract = wxRentContractMapper.selectById(wxRentContract.getId()); | |||
| @@ -778,48 +738,7 @@ public class WxRentContractController extends WxContractBaseController { | |||
| return wxRentContractService.update(rentContract, user,user.getName(), EnumFromType.SWITCH.getCode(),oldDate,false,false); | |||
| } | |||
| // @GetMapping("exportContract") | |||
| // @ApiImplicitParams({ | |||
| // @ApiImplicitParam(name = "rentId", value = "rentId", dataType = "Long", paramType = "query", required = false), | |||
| // @ApiImplicitParam(name = "propertyId", value = "propertyId", dataType = "String", paramType = "query", required = false)}) | |||
| // @SystemControllerLog(description = "租赁合同-导出合同") | |||
| // public void exportContract(Long rentId,String propertyId,HttpServletRequest request, HttpServletResponse response){ | |||
| // Long pid = null; | |||
| // try { | |||
| // pid = Long.parseLong(propertyId); | |||
| // }catch(Exception e) { | |||
| // } | |||
| // wxRentContractService.exportContract(request,response,rentId,pid); | |||
| // } | |||
| // @GetMapping("/getRentContractStatusInfo") | |||
| // @SystemControllerLog(description = "租赁合同-获取合同状态信息") | |||
| // public ResultData getRentContractStatusInfo(@ModelAttribute WxRentContract wxRentContract) { | |||
| // logger.debug("[" + getIpAddr() + "] WxRentContractController::getRentContractStatusInfo"); | |||
| // wxRentContract.updateTenantInfo(getTenantInfo()); | |||
| // return new ResultData(Result.SUCCESS, "查询成功", wxRentContractService.getRentContractStatusInfo(wxRentContract)); | |||
| // } | |||
| // @PostMapping("updateMerchant") | |||
| // @SystemControllerLog(description = "租赁合同-更新商户") | |||
| // public ResultData updateMerchant(@RequestBody WxRentContract wxRentContract) { | |||
| // logger.debug("[" + getIpAddr() + "] WxRentContractController::updateMerchant"); | |||
| // return wxRentContractService.updateMerchant(wxRentContract); | |||
| // } | |||
| // @PostMapping("updateRentContractStatus") | |||
| // @SystemControllerLog(description = "租赁合同-更新合同状态") | |||
| // public ResultData updateRentContractStatus(@RequestBody WxRentContract wxRentContract) { | |||
| // logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentContractStatus"); | |||
| // return wxRentContractService.updateRentContractStatus(wxRentContract.getId()); | |||
| // } | |||
| @PostMapping("savePayAccountInfo") | |||
| @SystemControllerLog(description = "租赁合同-保存甲方账户") | |||
| public ResultData savePayAccountInfo(@RequestBody WxPayAccountBill payAccountBill) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::savePayAccountInfo"); | |||
| if(StringUtils.isBlank(payAccountBill.getBankAccountName())) { | |||
| @@ -841,7 +760,6 @@ public class WxRentContractController extends WxContractBaseController { | |||
| } | |||
| @GetMapping("/getMerchants") | |||
| @SystemControllerLog(description = "租赁合同-获取已签约租赁合同且未有物业的商户") | |||
| public ResultData getMerchants(@ModelAttribute WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::getMerchants"); | |||
| wxRentContract.updateTenantInfo(getTenantInfo()); | |||
| @@ -850,7 +768,6 @@ public class WxRentContractController extends WxContractBaseController { | |||
| @GetMapping("/getContractByContractNumber") | |||
| @SystemControllerLog(description = "租赁合同-通过合同编号查询信息") | |||
| public ResultData getContractByContractNumber(@ModelAttribute WxRentContract wxRentContract) { | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::getContractByContractNumber"); | |||
| wxRentContract.updateTenantInfo(getTenantInfo()); | |||
| @@ -878,6 +795,69 @@ public class WxRentContractController extends WxContractBaseController { | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| //查询联营扣点,联营取高的合同 | |||
| @GetMapping("getRevenueContractList") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData getRevenueContractList(@ModelAttribute WxRentContract wxRentContract, Integer pageNum, Integer pageSize) { | |||
| if (null == wxRentContract) wxRentContract = new WxRentContract(); | |||
| wxRentContract.updateTenantInfo(getTenantInfo()); | |||
| List<Integer> typeList = new ArrayList<Integer>(); | |||
| typeList.add(EnumRentContractType.RENT_BY_JOINT.getCode()); | |||
| typeList.add(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode()); | |||
| wxRentContract.setTypeList(typeList); | |||
| List<Integer> statusList = new ArrayList<Integer>(); | |||
| statusList.add(EnumRentContractStatus.PAING.getCode()); | |||
| statusList.add(EnumRentContractStatus.READY_FOR_PAING.getCode()); | |||
| wxRentContract.setStatuss(statusList); | |||
| wxRentContract.setSortColumns(SortField.Createtime_DESC); | |||
| return new ResultData(wxRentContractService.getRentContractList(wxRentContract, pageNum, pageSize)); | |||
| } | |||
| @PostMapping("setRevenueSales") | |||
| public ResultData setRevenueSales(@RequestBody WxRentContract wxRentContract) { | |||
| WxRentContract rentContract = wxRentContractMapper.selectById(wxRentContract.getId()); | |||
| if (null == rentContract) { | |||
| return new ResultData(Result.ERROR, "编号["+wxRentContract.getId()+"]未找到租金合同"); | |||
| } | |||
| MallUserInfo user = getUser(); | |||
| //查询是否有审批流程 | |||
| if(!rentContractHasWorkFlow(rentContract)) { | |||
| return new ResultData(ErrorCode.FLOW_FAIL.getCode(),"租赁合同不存在工作流,不能提交审批。"); | |||
| } | |||
| try { | |||
| validConfilit(rentContract); | |||
| } catch (Exception e) { | |||
| return new ResultData(Result.ERROR,e.getMessage()); | |||
| } | |||
| try { | |||
| validShop(rentContract); | |||
| } catch (Exception e) { | |||
| return new ResultData(Result.ERROR,e.getMessage()); | |||
| } | |||
| //如果是租金+物业合同,如果没有物业合同或者物业合同不是草稿状态,不能提交审核 | |||
| if (rentContract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) { | |||
| if (null == wxRentContract.getPropertyId()) { | |||
| return new ResultData(Result.ERROR,"未创建物业合同,请先完善。"); | |||
| } | |||
| WxPropertyContract property = wxPropertyContractService.getSimpleDetail(wxRentContract.getPropertyId()); | |||
| if (null == property) { | |||
| return new ResultData(Result.ERROR,"未创建物业合同,请先完善。"); | |||
| } | |||
| if (property.getStatus().intValue() == EnumRentContractStatus.UNWRITE.getCode().intValue()) { | |||
| return new ResultData(Result.ERROR,"物业合同未完善,请先完善。"); | |||
| } | |||
| if (property.getStatus().intValue() != EnumRentContractStatus.DRAFT.getCode().intValue()) { | |||
| return new ResultData(Result.ERROR,"物业合同当前状态不能提交审批。"); | |||
| } | |||
| } | |||
| return wxRentContractService.apply(rentContract,user); | |||
| } | |||
| } | |||
| @@ -0,0 +1,16 @@ | |||
| CREATE TABLE `wx_rent_contract_revenue_sales` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||
| `update_time` datetime DEFAULT NULL COMMENT '更新时间', | |||
| `create_time` datetime DEFAULT NULL COMMENT '创建时间', | |||
| `rent_contract_id` bigint(20) NOT NULL COMMENT '合同编号', | |||
| `bill_id` bigint(20) NOT NULL COMMENT '账单编号', | |||
| `bill_money` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '账单应付金额', | |||
| `sale_money` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '销售金额', | |||
| `remark` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '备注', | |||
| `calcute_money` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '计算之后的金额', | |||
| PRIMARY KEY (`id`), | |||
| KEY `T_R_B` (`tenant_id`,`rent_contract_id`,`bill_id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | |||
| @@ -0,0 +1,47 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| import java.util.Date; | |||
| /** | |||
| */ | |||
| @TableName(value = "wx_rent_contract_revenue_sales") | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxRentContractRevenueSales extends TenantEntity { | |||
| private static final long serialVersionUID = 7009117540201976664L; | |||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||
| private Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||
| private Date createTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||
| private Date updateTime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "合同编号", name = "rentContractId") | |||
| private Long rentContractId; | |||
| @io.swagger.annotations.ApiModelProperty(value = "账单编号", name = "billId") | |||
| private Long billId; | |||
| @io.swagger.annotations.ApiModelProperty(value="账单应付金额",name="minMoney") | |||
| private String billMoney; | |||
| @io.swagger.annotations.ApiModelProperty(value="销售金额",name="maxMoney") | |||
| private String saleMoney; | |||
| @io.swagger.annotations.ApiModelProperty(value="计算金额",name="rentMoney") | |||
| private String calcuteMoney; | |||
| @io.swagger.annotations.ApiModelProperty(value="备注",name="remark") | |||
| private String remark; | |||
| } | |||
| @@ -0,0 +1,17 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxRentContractRevenueSales; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| public interface WxRentContractRevenueSalesMapper extends CommonMapper<WxRentContractRevenueSales, Long> { | |||
| List<WxRentContractRevenueSales> findList(WxRentContractRevenueSales wxBillRent); | |||
| WxRentContractRevenueSales selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| } | |||
| @@ -1,31 +0,0 @@ | |||
| package com.iformall.print.data; | |||
| import java.util.Map; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils; | |||
| import com.iformall.domain.po.WxEnergyFees; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| public abstract class AbstractPrintDataParser { | |||
| public JSONObject parse(String templateContent,Object re,Map<Long,WxMerchant> merchantMap,Map<Long,WxEnergyFees> feesMap) { | |||
| //把所有可能的组件里面需要的内容都解析出来 | |||
| if (StringUtils.isBlank(templateContent)) { | |||
| return null; | |||
| } | |||
| JSONObject o = JSON.parseObject(templateContent); | |||
| JSONArray items = o.getJSONArray("tempItems"); | |||
| if (null != items) { | |||
| for (int i = 0 ; i < items.size() ; i ++) { | |||
| JSONObject ov = items.getJSONObject(i); | |||
| ov.put("value", getObjectValue(ov.getString("name"),re,merchantMap,feesMap)); | |||
| } | |||
| } | |||
| return o; | |||
| } | |||
| public abstract Object getObjectValue(String name, Object o,Map<Long,WxMerchant> merchantMap,Map<Long,WxEnergyFees> feesMap); | |||
| } | |||
| @@ -11,10 +11,9 @@ import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.utils.DateUtils; | |||
| @Service | |||
| public class PrintBillDataHandler extends AbstractPrintDataParser { | |||
| public class PrintBillDataHandler{ | |||
| @Override | |||
| public Object getObjectValue(String name, Object o,Map<Long,WxMerchant> merchantMap,Map<Long,WxEnergyFees> feesMap) { | |||
| WxAllBill receive = (WxAllBill) o; | |||
| if (name.equals("id")) { | |||
| @@ -4,6 +4,7 @@ import java.util.Map; | |||
| import org.springframework.stereotype.Service; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.iformall.domain.po.WxEnergyFees; | |||
| import com.iformall.domain.po.WxFinanceReceive; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| @@ -17,10 +18,9 @@ import com.iformall.utils.DateUtils; | |||
| * | |||
| */ | |||
| @Service | |||
| public class PrintFinanceReceiveDataHandler extends AbstractPrintDataParser { | |||
| public class PrintFinanceReceiveDataHandler { | |||
| @Override | |||
| public Object getObjectValue(String name, Object o,Map<Long,WxMerchant> merchantMap,Map<Long,WxEnergyFees> feesMap) { | |||
| public Object getObjectValue(String name, Object o,Map<Long,WxMerchant> merchantMap,Map<Long,WxEnergyFees> feesMap,Map<Long,String> shopNumber) { | |||
| WxFinanceReceive receive = (WxFinanceReceive) o; | |||
| if (name.equals("id")) { | |||
| return receive.getId(); | |||
| @@ -50,6 +50,16 @@ public class PrintFinanceReceiveDataHandler extends AbstractPrintDataParser { | |||
| } | |||
| } | |||
| return ""; | |||
| }else if (name.equals("shopNumber")) { | |||
| if (null != shopNumber) { | |||
| return shopNumber.get(receive.getMerchantId()); | |||
| } | |||
| return ""; | |||
| }else if (name.equals("billList")) { | |||
| if (null != shopNumber) { | |||
| return shopNumber.get(receive.getMerchantId()); | |||
| } | |||
| return ""; | |||
| } | |||
| return null; | |||
| } | |||
| @@ -12,10 +12,9 @@ import com.iformall.domain.vo.PrintMerchantSettleVo; | |||
| import com.iformall.utils.DateUtils; | |||
| @Service | |||
| public class PrintMerchantSettleDataHandler extends AbstractPrintDataParser { | |||
| public class PrintMerchantSettleDataHandler{ | |||
| @Override | |||
| public Object getObjectValue(String name, Object o,Map<Long,WxMerchant> merchantMap,Map<Long,WxEnergyFees> feesMap) { | |||
| PrintMerchantSettleVo receive = (PrintMerchantSettleVo) o; | |||
| //根据科目来查询对应的信息 | |||
| @@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.context.annotation.Lazy; | |||
| import org.springframework.stereotype.Service; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils; | |||
| import com.iformall.common.ErrorCode; | |||
| @@ -34,6 +35,7 @@ import com.iformall.service.WxEnergyService; | |||
| import com.iformall.service.WxFinancePrintService; | |||
| import com.iformall.service.WxFinanceService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.WxShopService; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| @@ -77,6 +79,10 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||
| @Autowired | |||
| WxMerchantService wxMerchantService; | |||
| @Lazy | |||
| @Autowired | |||
| WxShopService wxShopService; | |||
| @Override | |||
| public List<WxFinancePrintData> printDataList(WxFinancePrintData record) { | |||
| return wxFinancePrintDataMapper.findList(record); | |||
| @@ -103,8 +109,8 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||
| Map map = new HashMap(); | |||
| map.put("width", 770); | |||
| map.put("height", 500); | |||
| map.put("pageWidth", 215); | |||
| map.put("pageHeight", 140); | |||
| map.put("pageWidth", 325); | |||
| map.put("pageHeight", 275); | |||
| map.put("tempItems", record.getTempItems()); | |||
| map.put("id", String.valueOf(record.getId())); | |||
| map.put("title", record.getName()); | |||
| @@ -162,12 +168,21 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||
| wxFinancePrintTemplateMapper.updateById(record); | |||
| } | |||
| @Override | |||
| public List<PrintVo> parseTemplateData(String tenantId, Long templateId, List<Long> dataIds,BaseEntity entity) { | |||
| WxFinancePrintTemplate template = this.getTemplateById(templateId); | |||
| if (null == template) { | |||
| return null; | |||
| } | |||
| if (StringUtils.isBlank(template.getContent())) { | |||
| return null; | |||
| } | |||
| JSONObject o = JSON.parseObject(template.getContent()); | |||
| if (null == o) { | |||
| return null; | |||
| } | |||
| JSONArray items = o.getJSONArray("tempItems"); | |||
| EnumFinancePrintDataType printDatatype = EnumFinancePrintDataType.getEnum(template.getType()); | |||
| WxMerchant mq = new WxMerchant(); | |||
| mq.setTenantId(tenantId); | |||
| @@ -175,7 +190,8 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||
| WxEnergyFees feq = new WxEnergyFees(); | |||
| feq.setTenantId(tenantId); | |||
| Map<Long, WxEnergyFees> feesMap = wxEnergyService.getFeesMap(feq); | |||
| //付款单 | |||
| Map<Long,String> shopNumber = wxShopService.getMerchantShopNumberMap(mq, null, null); | |||
| //收付款单 | |||
| if (printDatatype.getCode().intValue() == EnumFinancePrintDataType.FINANCE_RECEIVE.getCode()) { | |||
| WxFinanceReceive receiveq = new WxFinanceReceive(); | |||
| receiveq.setTenantId(tenantId); | |||
| @@ -189,7 +205,13 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||
| WxFinanceReceive re = receiveList.get(i); | |||
| PrintVo vo = new PrintVo(); | |||
| vo.setDataId(templateId); | |||
| vo.setTemplate(printFinanceReceiveDataHandler.parse(template.getContent(), re,merchantMap,feesMap)); | |||
| if (null != items) { | |||
| for (int j = 0 ; j < items.size() ; j ++) { | |||
| JSONObject ov = items.getJSONObject(j); | |||
| ov.put("value", printFinanceReceiveDataHandler.getObjectValue(ov.getString("name"),re,merchantMap,feesMap,shopNumber)); | |||
| } | |||
| } | |||
| vo.setTemplate(o); | |||
| voList.add(vo); | |||
| } | |||
| return voList; | |||
| @@ -206,7 +228,13 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||
| WxAllBill re = billAllList.get(i); | |||
| PrintVo vo = new PrintVo(); | |||
| vo.setDataId(templateId); | |||
| vo.setTemplate(printBillDataHandler.parse(template.getContent(), re,merchantMap,feesMap)); | |||
| if (null != items) { | |||
| for (int j = 0 ; j < items.size() ; j ++) { | |||
| JSONObject ov = items.getJSONObject(j); | |||
| ov.put("value", printBillDataHandler.getObjectValue(ov.getString("name"),re,merchantMap,feesMap)); | |||
| } | |||
| } | |||
| vo.setTemplate(o); | |||
| voList.add(vo); | |||
| } | |||
| return voList; | |||
| @@ -223,7 +251,13 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||
| PrintVo vo = new PrintVo(); | |||
| vo.setDataId(templateId); | |||
| vo.setTemplate(printMerchantSettleDataHandler.parse(template.getContent(), sv,merchantMap,feesMap)); | |||
| if (null != items) { | |||
| for (int j = 0 ; j < items.size() ; j ++) { | |||
| JSONObject ov = items.getJSONObject(j); | |||
| ov.put("value", printMerchantSettleDataHandler.getObjectValue(ov.getString("name"),sv,merchantMap,feesMap)); | |||
| } | |||
| } | |||
| vo.setTemplate(o); | |||
| voList.add(vo); | |||
| return voList; | |||
| } | |||
| @@ -60,6 +60,7 @@ import com.iformall.mapper.WxPropertyContractMapper; | |||
| import com.iformall.mapper.WxRentContractFreePeriodMapper; | |||
| import com.iformall.mapper.WxRentContractMapper; | |||
| import com.iformall.mapper.WxRentContractRevenueJumpMapper; | |||
| import com.iformall.mapper.WxRentContractRevenueSalesMapper; | |||
| import com.iformall.mapper.WxShopMapper; | |||
| import com.iformall.service.WxEnergyService; | |||
| import com.iformall.service.WxFlowRecordService; | |||
| @@ -125,6 +126,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| @Autowired | |||
| WxRentContractRevenueJumpMapper wxRentContractRevenueJumpMapper; | |||
| @Autowired | |||
| WxRentContractRevenueSalesMapper wxRentContractRevenueSalesMapper; | |||
| @Autowired | |||
| WxShopMapper wxShopMapper; | |||
| @@ -0,0 +1,57 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.iformall.mapper.WxRentContractRevenueSalesMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxRentContractRevenueSales"> | |||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||
| <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId"/> | |||
| <result column="bill_id" jdbcType="BIGINT" property="billId"/> | |||
| <result column="bill_money" jdbcType="VARCHAR" property="billMoney"/> | |||
| <result column="sale_money" jdbcType="VARCHAR" property="saleMoney"/> | |||
| <result column="calcute_money" jdbcType="VARCHAR" property="calcuteMoney"/> | |||
| <result column="remark" jdbcType="VARCHAR" property="remark"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`rent_contract_id`,`bill_id`,`bill_money`, | |||
| `sale_money`,`calcute_money`,`remark` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1=1 | |||
| <if test=" null != id ">and `id` = #{id}</if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != rentContractId ">and `rent_contract_id` = #{rentContractId}</if> | |||
| <if test=" null != billId ">and `bill_id` = #{billId}</if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxRentContractRevenueSales" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_revenue_sales | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_rent_contract_revenue_sales where id = #{id} and `tenant_id` = #{tenantId} | |||
| </select> | |||
| </mapper> | |||