Browse Source

no message

FengChaoYu 9 months ago
parent
commit
b3e8f15664

+ 59 - 0
mall-server-api/src/main/java/com/gree/mall/manager/bean/settle/repair/SettleDailyBankTransferRecordVO.java

@@ -0,0 +1,59 @@
+package com.gree.mall.manager.bean.settle.repair;
+
+
+import com.gree.mall.manager.annotation.ZfireField;
+import com.gree.mall.manager.enums.repair.settle.CallStatusEnum;
+import com.gree.mall.manager.enums.repair.settle.IssueSummaryStatusEnum;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel
+@ZfireField(tbName = "a")
+public class SettleDailyBankTransferRecordVO {
+
+    @ApiModelProperty(value = "ID")
+    private String id;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "商户id")
+    private String companyWechatId;
+
+    @ApiModelProperty(value = "所属商户")
+    private String companyWechatName;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "调用时间")
+    private Date callApiTime;
+
+    @ApiModelProperty(value = "调用状态")
+    private CallStatusEnum callStatus;
+
+    @ApiModelProperty(value = "返回内容")
+    private String callBackMessage;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "发放批次")
+    private String issueBatchNo;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "结算金额")
+    private BigDecimal summaryAmount;
+
+    @ApiModelProperty(value = "发放状态")
+    private IssueSummaryStatusEnum issueStatus;
+
+    @ApiModelProperty(value = "操作人")
+    private String doBy;
+
+    @ApiModelProperty(value = "操作时间")
+    private Date doTime;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "请求序列号")
+    private String reqNo;
+}

+ 7 - 0
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/CommonMapper.java

@@ -693,4 +693,11 @@ public interface CommonMapper {
      */
     IPage<WorkerWaitBuckleVO> buckleList(Page page, @Param("ex") ZfireParamBean zfireParamBean);
 
+    /**
+     * 银行接口返回查询列表
+     * @param page
+     * @param zfireParamBean
+     * @return
+     */
+    IPage<SettleDailyBankTransferRecordVO> transferList(Page page, @Param("ex") ZfireParamBean zfireParamBean);
 }

+ 16 - 21
mall-server-api/src/main/java/com/gree/mall/manager/controller/settle/repair/BankAccountController.java

@@ -4,6 +4,7 @@ import cn.hutool.core.lang.TypeReference;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gree.mall.manager.annotation.ZfireList;
 import com.gree.mall.manager.bean.settle.repair.DailyBankAccountVO;
+import com.gree.mall.manager.bean.settle.repair.SettleDailyBankTransferRecordVO;
 import com.gree.mall.manager.constant.Constant;
 import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.helper.ResponseHelper;
@@ -11,7 +12,6 @@ import com.gree.mall.manager.logic.settle.repair.DailyTransferLogic;
 import com.gree.mall.manager.logic.settle.repair.RepairSettleAccountLogic;
 import com.gree.mall.manager.plus.entity.SettleDailyBankAccount;
 import com.gree.mall.manager.plus.entity.SettleDailyBankCardBalance;
-import com.gree.mall.manager.plus.entity.SettleDailyBankTransferRecord;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
 import io.swagger.annotations.Api;
@@ -118,17 +118,12 @@ public class BankAccountController {
 
     @PostMapping("/transfer/list")
     @ApiOperation(value = "转帐记录列表")
-    public ResponseHelper<IPage<SettleDailyBankTransferRecord>> transferList(
-            @ApiParam(value = "服务人员编号") @RequestParam(required = false) String workerNumber,
-            @ApiParam(value = "批次号") @RequestParam(required = false) String batchNo,
-            @ApiParam(value = "开始日期") @RequestParam(required = false) String startTime,
-            @ApiParam(value = "结束日期") @RequestParam(required = false) String endTime,
-            @ApiParam(required = true, value = "页号") @RequestParam Integer pageNo,
-            @ApiParam(required = true, value = "页大小") @RequestParam Integer pageSize,
-            HttpServletRequest request
+    public ResponseHelper<IPage<SettleDailyBankTransferRecordVO>> transferList(
+            @RequestBody ZfireParamBean zfireParamBean
     ) {
-        IPage<SettleDailyBankTransferRecord> list = repairSettleAccountLogic.transferList(workerNumber, startTime, endTime, batchNo, pageNo, pageSize);
-        return ResponseHelper.success(list);
+        IPage<SettleDailyBankTransferRecordVO> page = repairSettleAccountLogic.transferList(zfireParamBean);
+        return ResponseHelper.success(page, new TypeReference<SettleDailyBankTransferRecordVO>() {
+        });
     }
 
     @PostMapping("/company/account/list")
@@ -141,16 +136,6 @@ public class BankAccountController {
         return ResponseHelper.success(list);
     }
 
-    @PostMapping("/send/msg")
-    @ApiOperation(value = "查询余额/(发放工资)发送验证码")
-    public ResponseHelper sendMsg(
-            @ApiParam(required = true, value = "手机号") @RequestParam String mobile,
-            @ApiParam(value = "类型 发放:issue , 余额:balance") @RequestParam(required = false) String type
-    ) throws Exception {
-        repairSettleAccountLogic.sendMsg(mobile, type);
-        return ResponseHelper.success();
-    }
-
     @PostMapping("/company/account/balance")
     @ApiOperation(value = "查询公司卡余额")
     public ResponseHelper<SettleDailyBankCardBalance> selBankCardBalance(
@@ -162,6 +147,16 @@ public class BankAccountController {
         return ResponseHelper.success(bean);
     }
 
+    @PostMapping("/send/msg")
+    @ApiOperation(value = "查询余额/(发放工资)发送验证码")
+    public ResponseHelper sendMsg(
+            @ApiParam(required = true, value = "手机号") @RequestParam String mobile,
+            @ApiParam(value = "类型 发放:issue , 余额:balance") @RequestParam(required = false) String type
+    ) throws Exception {
+        repairSettleAccountLogic.sendMsg(mobile, type);
+        return ResponseHelper.success();
+    }
+
     @PostMapping("/template/import")
     @ApiOperation("导入银行账户")
     public ResponseHelper importData(MultipartFile file) throws Exception {

+ 27 - 0
mall-server-api/src/main/java/com/gree/mall/manager/enums/repair/settle/CallStatusEnum.java

@@ -0,0 +1,27 @@
+package com.gree.mall.manager.enums.repair.settle;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+import com.baomidou.mybatisplus.annotation.IEnum;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.gree.mall.manager.enums.base.BaseEnum;
+import lombok.AccessLevel;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor(access = AccessLevel.PRIVATE)
+public enum CallStatusEnum implements BaseEnum, IEnum<Integer> {
+    NORMAL("1","正常"),
+    ERR("2","异常"),
+    ;
+
+    @EnumValue
+    @JsonValue
+    private final String key;
+    private final String remark;
+
+    @Override
+    public Integer getValue() {
+        return Integer.parseInt(key);
+    }
+}

+ 4 - 8
mall-server-api/src/main/java/com/gree/mall/manager/logic/settle/repair/RepairSettleAccountLogic.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gree.mall.manager.bean.admin.AdminUserCom;
 import com.gree.mall.manager.bean.settle.repair.DailyBankAccountVO;
+import com.gree.mall.manager.bean.settle.repair.SettleDailyBankTransferRecordVO;
 import com.gree.mall.manager.bean.settle.repair.cmc.BankCardInfoBean;
 import com.gree.mall.manager.commonmapper.CommonMapper;
 import com.gree.mall.manager.constant.Constant;
@@ -273,16 +274,11 @@ public class RepairSettleAccountLogic {
         smsLogic.sendSms(sendType, mobile, "BALANCE_SEL", Constant.SMS_EXPIRE);
     }
 
-    public IPage<SettleDailyBankTransferRecord> transferList(String workerNumber, String startTime, String endTime, String batchNo, Integer pageNo, Integer pageSize) {
+    public IPage<SettleDailyBankTransferRecordVO> transferList(ZfireParamBean zfireParamBean) {
         AdminUserCom adminUser = commonLogic.getAdminUser();
+        FieldUtils.supplyParam(zfireParamBean, DailyBankAccountVO.class, adminUser);
 
-        return settleDailyBankTransferRecordService.lambdaQuery()
-                .in(CollectionUtil.isNotEmpty(adminUser.getCompanyWechatIds()), SettleDailyBankTransferRecord::getCompanyWechatId, adminUser.getCompanyWechatIds())
-                .between(StringUtils.isNotEmpty(startTime) && StringUtils.isNotEmpty(endTime), SettleDailyBankTransferRecord::getCreateTime, startTime, endTime)
-                .eq(StringUtils.isNotEmpty(batchNo), SettleDailyBankTransferRecord::getIssueBatchNo, batchNo)
-                // .eq(StringUtils.isNotEmpty(workerNumber),DailyBankTransferRecord::workerNumber)
-                .orderByDesc(SettleDailyBankTransferRecord::getCreateTime)
-                .page(new Page<>(pageNo, pageSize));
+        return commonMapper.transferList(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean);
     }
 
     public IPage<SettleDailyBankCardBalance> companyAccountList(Integer pageNo, Integer pageSize) {

+ 20 - 0
mall-server-api/src/main/resources/mapper/CommonMapper.xml

@@ -1204,5 +1204,25 @@
         ${ex.orderBy}
     </select>
 
+    <select id="transferList"
+            resultType="com.gree.mall.manager.bean.settle.repair.SettleDailyBankTransferRecordVO">
+        SELECT
+            ${ex.selected}
+        FROM
+            settle_daily_bank_transfer_record a
+        ${ex.query}
+        <if test="companyWechatIds != null and companyWechatIds.size > 0">
+            AND a.company_wechat_id IN
+            <foreach item="item" index="index" collection="companyWechatIds" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="ex.orderBy == null or ex.orderBy ==''">
+            ORDER BY a.create_time DESC
+        </if>
+        ${ex.orderBy}
+
+    </select>
+
 
 </mapper>