| @@ -6,6 +6,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxSettleMerchant; | import com.iformall.domain.po.WxSettleMerchant; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.service.WxSettleMerchantService; | import com.iformall.service.WxSettleMerchantService; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| @@ -68,6 +69,21 @@ public class WxSettleMerchantController extends BaseController { | |||||
| return new ResultData(wxSettleMerchantService.getMapDetail(wxSettleMerchant,false)); | return new ResultData(wxSettleMerchantService.getMapDetail(wxSettleMerchant,false)); | ||||
| } | } | ||||
| @ApiOperation("详细") | |||||
| @PostMapping("/delete") | |||||
| public ResultData delete(Long id) { | |||||
| if (null == id) { | |||||
| return new ResultData(Result.ERROR,"参数错误"); | |||||
| } | |||||
| WxSettleMerchant wxSettleMerchant = wxSettleMerchantService.getById(getTenantInfo(), id); | |||||
| if (null == wxSettleMerchant) { | |||||
| return new ResultData(Result.ERROR,"参数错误"); | |||||
| } | |||||
| wxSettleMerchant.setIsDel(EnumYesOrNo.YES.getCode()); | |||||
| wxSettleMerchantService.saveOrUpdate(wxSettleMerchant, getUser()); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("计算周期性费用") | @ApiOperation("计算周期性费用") | ||||
| @GetMapping("/calcute") | @GetMapping("/calcute") | ||||
| public ResultData calcutePeriodicity(@ModelAttribute WxSettleMerchant wxSettleMerchant) { | public ResultData calcutePeriodicity(@ModelAttribute WxSettleMerchant wxSettleMerchant) { | ||||
| @@ -5,7 +5,6 @@ CREATE TABLE `wx_settle_merchant` ( | |||||
| `merchant_id` bigint(20) NOT NULL COMMENT '商户编号', | `merchant_id` bigint(20) NOT NULL COMMENT '商户编号', | ||||
| `begin_time` datetime NOT NULL COMMENT '开始时间', | `begin_time` datetime NOT NULL COMMENT '开始时间', | ||||
| `end_time` datetime NOT NULL COMMENT '结束时间', | `end_time` datetime NOT NULL COMMENT '结束时间', | ||||
| `confirm_time` datetime NOT NULL COMMENT '对账时间', | |||||
| `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||||
| `update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | `update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | ||||
| `total_money` decimal(10,3) NOT NULL COMMENT '对账金额', | `total_money` decimal(10,3) NOT NULL COMMENT '对账金额', | ||||
| @@ -47,5 +46,6 @@ CREATE TABLE `wx_settle_merchant` ( | |||||
| `account_number` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '收款人账户', | `account_number` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '收款人账户', | ||||
| `create_by` bigint(20) NOT NULL COMMENT '创建人', | `create_by` bigint(20) NOT NULL COMMENT '创建人', | ||||
| `update_by` bigint(20) NOT NULL COMMENT '修改人', | `update_by` bigint(20) NOT NULL COMMENT '修改人', | ||||
| `is_del` int(1) NOT NULL DEFAULT '0', | |||||
| PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='卡券'; | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='卡券'; | ||||
| @@ -27,8 +27,6 @@ public class WxSettleMerchant extends TenantEntity { | |||||
| private Date beginTime; | private Date beginTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endTime") | @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endTime") | ||||
| private Date endTime; | private Date endTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "对账时间", name = "confirmTime") | |||||
| private Date confirmTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "对账金额", name = "totalMoney") | @io.swagger.annotations.ApiModelProperty(value = "对账金额", name = "totalMoney") | ||||
| private BigDecimal totalMoney; | private BigDecimal totalMoney; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "实际结算金额", name = "actualMoney") | @io.swagger.annotations.ApiModelProperty(value = "实际结算金额", name = "actualMoney") | ||||
| @@ -107,6 +105,8 @@ public class WxSettleMerchant extends TenantEntity { | |||||
| private Long createBy; | private Long createBy; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "修改人", name = "updateBy") | @io.swagger.annotations.ApiModelProperty(value = "修改人", name = "updateBy") | ||||
| private Long updateBy; | private Long updateBy; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否删除EnumYesOrNo", name = "isDel") | |||||
| private Integer isDel; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Date begin; | private Date begin; | ||||
| @@ -47,7 +47,7 @@ public class WxSettleMerchantServiceImpl implements WxSettleMerchantService{ | |||||
| Map<String,Object> valueMap = new HashMap<String,Object>(); | Map<String,Object> valueMap = new HashMap<String,Object>(); | ||||
| valueMap.put("beginTime", DateUtils.format(record.getBeginTime())); | valueMap.put("beginTime", DateUtils.format(record.getBeginTime())); | ||||
| valueMap.put("endTime", DateUtils.format(record.getEndTime())); | valueMap.put("endTime", DateUtils.format(record.getEndTime())); | ||||
| valueMap.put("confirmTime", DateUtils.format(record.getConfirmTime())); | |||||
| valueMap.put("confirmTime", DateUtils.format(new Date())); | |||||
| valueMap.put("merchantName", record.getMerchantName()); | valueMap.put("merchantName", record.getMerchantName()); | ||||
| valueMap.put("merchantCode", record.getMerchantCode()); | valueMap.put("merchantCode", record.getMerchantCode()); | ||||
| valueMap.put("merchantPerson", record.getMerchantPerson()); | valueMap.put("merchantPerson", record.getMerchantPerson()); | ||||
| @@ -10,7 +10,6 @@ | |||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | ||||
| <result column="begin_time" jdbcType="TIMESTAMP" property="beginTime" /> | <result column="begin_time" jdbcType="TIMESTAMP" property="beginTime" /> | ||||
| <result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> | <result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> | ||||
| <result column="confirm_time" jdbcType="TIMESTAMP" property="confirmTime" /> | |||||
| <result column="total_money" jdbcType="DECIMAL" property="totalMoney" /> | <result column="total_money" jdbcType="DECIMAL" property="totalMoney" /> | ||||
| <result column="actual_money" jdbcType="DECIMAL" property="actualMoney" /> | <result column="actual_money" jdbcType="DECIMAL" property="actualMoney" /> | ||||
| <result column="card_sale_money" jdbcType="DECIMAL" property="cardSaleMoney" /> | <result column="card_sale_money" jdbcType="DECIMAL" property="cardSaleMoney" /> | ||||
| @@ -50,15 +49,16 @@ | |||||
| <result column="account_number" jdbcType="VARCHAR" property="accountNumber" /> | <result column="account_number" jdbcType="VARCHAR" property="accountNumber" /> | ||||
| <result column="create_by" jdbcType="BIGINT" property="createBy" /> | <result column="create_by" jdbcType="BIGINT" property="createBy" /> | ||||
| <result column="update_by" jdbcType="BIGINT" property="updateBy" /> | <result column="update_by" jdbcType="BIGINT" property="updateBy" /> | ||||
| <result column="is_del" jdbcType="INTEGER" property="isDel" /> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`,`merchant_id`,`begin_time`,`end_time`,`confirm_time`,`total_money`, | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`,`merchant_id`,`begin_time`,`end_time`,`total_money`, | |||||
| `actual_money`,`card_sale_money`,`card_rate`,`card_money`,`zfb_sale_money`,`zfb_rate`,`zfb_money`,`union_sale_money`,`union_rate`, | `actual_money`,`card_sale_money`,`card_rate`,`card_money`,`zfb_sale_money`,`zfb_rate`,`zfb_money`,`union_sale_money`,`union_rate`, | ||||
| `union_money`,`wx_sale_money`,`wx_rate`,`wx_money`,`erase_zero_sale_money`,`erase_zero_rate`,`erase_zero_money`,`cash_sale_money`, | `union_money`,`wx_sale_money`,`wx_rate`,`wx_money`,`erase_zero_sale_money`,`erase_zero_rate`,`erase_zero_money`,`cash_sale_money`, | ||||
| `cash_rate`,`cash_money`,`rent_money`,`rent_contract_money`,`employee_manage_money`,`sales_slip_money`,`salary`,`earnest_money`, | `cash_rate`,`cash_money`,`rent_money`,`rent_contract_money`,`employee_manage_money`,`sales_slip_money`,`salary`,`earnest_money`, | ||||
| `other_money`,`last_remaining`,`points_rate`,`points_money`,`merchant_name`,`merchant_code`,`merchant_person`,`merchant_phone`, | `other_money`,`last_remaining`,`points_rate`,`points_money`,`merchant_name`,`merchant_code`,`merchant_person`,`merchant_phone`, | ||||
| `account_name`,`account_bank`,`account_number`,`create_by`,`update_by` | |||||
| `account_name`,`account_bank`,`account_number`,`create_by`,`update_by`,`is_del` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -95,6 +95,10 @@ | |||||
| and `create_by` = #{createBy} | and `create_by` = #{createBy} | ||||
| </if> | </if> | ||||
| <if test=" null != isDel"> | |||||
| and `is_del` >= #{isDel} | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||