From 9ca799d8e581731c27dc9d9a9c2684a233c74db5 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期五, 26 一月 2024 16:24:42 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java | 86 ++++++-----
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/qo/QoReissueCard.java | 35 +++++
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateSv.java | 46 ++++++
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/result/SellResultCode.java | 1
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCardOperateMapper.xml | 57 ++++++++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java | 6
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java | 39 ++++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCardOperateMapper.java | 15 ++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java | 3
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoReissueCard.java | 47 ++++++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml | 30 ++++
11 files changed, 313 insertions(+), 52 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCardOperateMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCardOperateMapper.java
index 12a6884..1acd2b6 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCardOperateMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCardOperateMapper.java
@@ -109,4 +109,19 @@
* @return
*/
List<VoActiveCardNew> getActiveCards(Map<?, ?> params);
+
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇琛ュ崱璁板綍鏁�
+ * @param params
+ * @return
+ */
+ Long getReissueCardRecordCount(Map<?, ?> params);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇琛ュ崱璁板綍
+ * @param params
+ * @return
+ */
+ List<VoReissueCard> getReissueCards(Map<?, ?> params);
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoReissueCard.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoReissueCard.java
new file mode 100644
index 0000000..694a5d0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoReissueCard.java
@@ -0,0 +1,47 @@
+package com.dy.pipIrrGlobal.voSe;
+
+import com.dy.common.po.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/1/26 9:31
+ * @LastEditTime :2024/1/26 9:31
+ * @Description
+ */
+@Data
+@Schema(title = "琛ュ崱璁板綍瑙嗗浘瀵硅薄")
+public class VoReissueCard implements BaseEntity {
+ private static final long serialVersionUID = 2024012609330001L;
+
+ @Schema(title = "ID")
+ private Long id;
+
+ @Schema(title = "鍐滄埛濮撳悕")
+ private String clientName;
+
+ @Schema(title = "鍐滄埛缂栧彿")
+ private String clientNum;
+
+ @Schema(title = "姘村崱缂栧彿")
+ private String cardNum;
+
+ @Schema(title = "鍗$墖璐圭敤")
+ private Integer cardCost;
+
+ @Schema(title = "琛ュ崱閲戦")
+ private Double reissueAmount;
+
+ @Schema(title = "鎿嶄綔浜�")
+ private String operator;
+
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @Schema(title = "鎿嶄綔鏃堕棿")
+ private Date operateDt;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
index 4b6483c..8f71ed3 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -234,12 +234,25 @@
<if test="blockName != null and blockName != ''">
AND blo.name = #{blockName}
</if>
+
+ <if test="isBinded == 0">
+ AND ge.id NOT IN(SELECT intakeId FROM pr_controller where deleted = 0)
+ </if>
+ <if test="isBinded == 1">
+ AND ge.id IN(SELECT intakeId FROM pr_controller where deleted = 0)
+ </if>
+ <if test="isBinded == null">
+
+ </if>
+ <if test="address != null and address != ''">
+ AND CONCAT(country.`name`, town.`name`, village.`name`) LIKE CONCAT('%', #{address}, '%')
+ </if>
</where>
</select>
<!--鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙h褰�-->
<select id="getIntakes" resultType="com.dy.pipIrrGlobal.voPr.VoIntake">
- SELECT (@i:=@i+1) AS id,
+ SELECT ge.id AS id,
ge.`name` AS intakeName,
divi.`name` AS divideName,
blo.`name` AS blockName,
@@ -255,7 +268,6 @@
INNER JOIN ba_district country ON ge.countyId = country.id
INNER JOIN ba_district town ON ge.townId = town.id
INNER JOIN ba_district village ON ge.villageId = village.id
- , (SELECT @i:=0) AS itable
<where>
ge.deleted = 0
AND divi.deleted = 0
@@ -263,6 +275,7 @@
<if test="intakeName != null and intakeName != ''">
AND ge.name LIKE CONCAT('%', #{intakeName}, '%')
</if>
+
<if test="divideName != null and divideName != ''">
AND divi.name LIKE CONCAT('%', #{divideName}, '%')
</if>
@@ -270,6 +283,19 @@
<if test="blockName != null and blockName != ''">
AND blo.name = #{blockName}
</if>
+
+ <if test="isBinded == 0">
+ AND ge.id NOT IN(SELECT intakeId FROM pr_controller where deleted = 0)
+ </if>
+ <if test="isBinded == 1">
+ AND ge.id IN(SELECT intakeId FROM pr_controller where deleted = 0)
+ </if>
+ <if test="isBinded == null">
+
+ </if>
+ <if test="address != null and address != ''">
+ AND CONCAT(country.`name`, town.`name`, village.`name`) LIKE CONCAT('%', #{address}, '%')
+ </if>
</where>
ORDER BY ge.operateDt DESC
<if test="pageCurr != null and pageSize != null">
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCardOperateMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCardOperateMapper.xml
index 903a820..c16ceaf 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCardOperateMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCardOperateMapper.xml
@@ -526,4 +526,61 @@
LIMIT ${pageCurr}, ${pageSize}
</if>
</select>
+
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇琛ュ崱璁板綍鏁伴噺-->
+ <select id="getReissueCardRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
+ select
+ COUNT(*) AS recordCount
+ FROM se_card_operate ope
+ INNER JOIN se_client_card card ON ope.card_id = card.id
+ INNER JOIN se_client cli ON ope.client_id = cli.id
+ <where>
+ AND ope.operate_type = 4
+ <if test = "clientName != null and clientName !=''">
+ AND cli.name like CONCAT('%',#{clientName},'%')
+ </if>
+
+ <if test = "cardNum != null and cardNum !=''">
+ AND card.cardNum like CONCAT('%',#{cardNum},'%')
+ </if>
+
+ <if test = "activeTimeStart != null and activeTimeStop != null">
+ AND ope.operate_dt BETWEEN #{reissueCardTimeStart} AND #{reissueCardTimeStop}
+ </if>
+ </where>
+ </select>
+
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇琛ュ崱璁板綍-->
+ <select id="getReissueCards" resultType="com.dy.pipIrrGlobal.voSe.VoReissueCard">
+ SELECT
+ CAST(ope.id AS char) AS id ,
+ cli.name AS clientName,
+ cli.clientNum AS clientNum,
+ card.cardNum AS cardNum,
+ ope.card_cost AS cardCost,
+ IFNULL(ope.no_trade_amount,0) AS reissueAmount,
+ (SELECT `name` FROM ba_user WHERE id = ope.operator) AS operator,
+ ope.operate_dt AS operateDt
+ FROM se_card_operate ope
+ INNER JOIN se_client_card card ON ope.card_id = card.id
+ INNER JOIN se_client cli ON ope.client_id = cli.id
+ <where>
+ AND ope.operate_type = 4
+ <if test = "clientName != null and clientName !=''">
+ AND cli.name like CONCAT('%',#{clientName},'%')
+ </if>
+
+ <if test = "cardNum != null and cardNum !=''">
+ AND card.cardNum like CONCAT('%',#{cardNum},'%')
+ </if>
+
+ <if test = "activeTimeStart != null and activeTimeStop != null">
+ AND ope.operate_dt BETWEEN #{reissueCardTimeStart} AND #{reissueCardTimeStop}
+ </if>
+ </where>
+ ORDER BY ope.operate_dt DESC
+ <if test="pageCurr != null and pageSize != null">
+ LIMIT ${pageCurr}, ${pageSize}
+ </if>
+ </select>
</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
index 0d99ab9..7372135 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
@@ -33,10 +33,7 @@
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.time.format.DateTimeFormatter;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
+import java.util.*;
/**
* @author WuZeYu
@@ -48,13 +45,14 @@
@Slf4j
@Tag(name = "鍙栨按鍙g鐞�", description = "鍙栨按鍙f搷浣�")
@RestController
-@RequestMapping(path="intake")
+@RequestMapping(path = "intake")
@RequiredArgsConstructor
public class IntakeCtrl {
private final IntakeSv intakeSv;
/**
* 瀹㈡埛绔姹傚緱鍒版墍鏈夊彇姘村彛鍚嶅瓧
+ *
* @return 鎵�鏈夊彇姘村彛鍚嶅瓧
*/
@Operation(summary = "鑾峰緱鍏ㄩ儴鍙栨按鍙�", description = "杩斿洖鍏ㄩ儴鍙栨按鍙f暟鎹�")
@@ -68,22 +66,23 @@
})
@GetMapping(path = "all")
@SsoAop()
- public BaseResponse<QueryResultVo<List<PrIntake>>> all(){
+ public BaseResponse<QueryResultVo<List<PrIntake>>> all() {
try {
QueryResultVo<List<PrIntake>> res = this.intakeSv.selectAll();
- if(res == null) {
+ if (res == null) {
return BaseResponseUtils.buildFail(ProjectResultCode.NO_INTAKES.getMessage());
- }else {
+ } else {
return BaseResponseUtils.buildSuccess(res);
}
} catch (Exception e) {
log.error("鏌ヨ鍙栨按鍙e紓甯�", e);
- return BaseResponseUtils.buildException(e.getMessage()) ;
+ return BaseResponseUtils.buildException(e.getMessage());
}
}
/**
* 寰楀埌涓�涓彇姘村彛鏁版嵁
+ *
* @return 涓�涓彇姘村彛鏁版嵁
*/
@Operation(summary = "涓�涓彇姘村彛", description = "寰楀埌涓�涓彇姘村彛鏁版嵁")
@@ -97,10 +96,10 @@
})
@GetMapping(path = "one/{id}")
@SsoAop()
- public BaseResponse<PrIntake> one(@PathVariable("id") Long id){
- if(this.intakeSv.selectById(id) == null) {
+ public BaseResponse<PrIntake> one(@PathVariable("id") Long id) {
+ if (this.intakeSv.selectById(id) == null) {
return BaseResponseUtils.buildFail(ProjectResultCode.NO_INTAKES.getMessage());
- }else {
+ } else {
return BaseResponseUtils.buildSuccess(this.intakeSv.selectById(id));
}
}
@@ -116,16 +115,16 @@
})
@GetMapping(path = "getIntakes")
@SsoAop()
- public BaseResponse<QueryResultVo<List<VoIntake>>> getIntakes(QueryVo vo){
+ public BaseResponse<QueryResultVo<List<VoIntake>>> getIntakes(QueryVo vo) {
try {
QueryResultVo<List<VoIntake>> res = intakeSv.getIntakes(vo);
- if(res == null) {
+ if (res == null) {
return BaseResponseUtils.buildFail(ProjectResultCode.NO_INTAKES.getMessage());
}
return BaseResponseUtils.buildSuccess(res);
} catch (Exception e) {
log.error("鑾峰彇鍙栨按鍙h褰曞紓甯�", e);
- return BaseResponseUtils.buildException(e.getMessage()) ;
+ return BaseResponseUtils.buildException(e.getMessage());
}
}
@@ -141,23 +140,24 @@
@PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrIntake po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrIntake po, @Parameter(hidden = true) BindingResult bindingResult) {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
- if(bindingResult != null && bindingResult.hasErrors()){
+ if (bindingResult != null && bindingResult.hasErrors()) {
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
Date operateTime = new Date();
po.setOperateDt(operateTime);
Integer rec = Optional.ofNullable(intakeSv.addIntake(po)).orElse(0);
- if(rec == 0) {
+ if (rec == 0) {
return BaseResponseUtils.buildFail(ProjectResultCode.ADD_INTAKE_FAIL.getMessage());
}
- return BaseResponseUtils.buildSuccess(true) ;
+ return BaseResponseUtils.buildSuccess(true);
}
/**
* 缂栬緫淇敼鍙栨按鍙�
+ *
* @param po 淇濆瓨鍙栨按鍙orm琛ㄥ崟瀵硅薄
* @return 鏄惁鎴愬姛
*/
@@ -172,8 +172,8 @@
})
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrIntake po, @Parameter(hidden = true) BindingResult bindingResult){
- if(bindingResult != null && bindingResult.hasErrors()){
+ public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrIntake po, @Parameter(hidden = true) BindingResult bindingResult) {
+ if (bindingResult != null && bindingResult.hasErrors()) {
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
int count;
@@ -183,18 +183,19 @@
count = this.intakeSv.update(po);
} catch (Exception e) {
log.error("淇濆瓨鍒嗘按鍙e紓甯�", e);
- return BaseResponseUtils.buildException(e.getMessage()) ;
+ return BaseResponseUtils.buildException(e.getMessage());
}
- if(count <= 0){
- return BaseResponseUtils.buildFail(ProjectResultCode.UPDATE_INTAKE.getMessage()) ;
- }else{
- return BaseResponseUtils.buildSuccess(true) ;
+ if (count <= 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.UPDATE_INTAKE.getMessage());
+ } else {
+ return BaseResponseUtils.buildSuccess(true);
}
}
/**
* 鍒犻櫎鍙栨按鍙�
- * @param id 鍙栨按鍙D
+ *
+ * @param map 鍙栨按鍙D
* @return 鏄惁鎴愬姛
*/
@Operation(summary = "鍒犻櫎鍒嗘按鍙�", description = "鎻愪氦鍙栨按鍙D锛岃繘琛岄�昏緫鍒犻櫎")
@@ -206,28 +207,32 @@
schema = @Schema(implementation = Boolean.class))}
)
})
- @GetMapping(path = "delete/{id}")
+ @PostMapping(path = "delete")
@SsoAop()
- public BaseResponse<Boolean> delete(@PathVariable("id") Long id){
- if(id == null ){
- return BaseResponseUtils.buildFail(ProjectResultCode.PLEASE_INPUT_INTAKE_ID.getMessage()) ;
+ public BaseResponse<Boolean> delete(@RequestBody Map map) {
+ if (map == null || map.size() <= 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.PLEASE_INPUT_INTAKE_ID.getMessage());
}
- int count;
+ Long id = Long.parseLong(map.get("id").toString());
try {
- count = this.intakeSv.delete(id);
+ //鍙栨按鍙D
+ Integer recordCount = Optional.ofNullable(intakeSv.delete(id)).orElse(0);
+ if (recordCount == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_INTAKE_FAIL.getMessage());
+ } else {
+ return BaseResponseUtils.buildSuccess(true);
+ }
} catch (Exception e) {
log.error("淇濆瓨鍒嗘按鍙e紓甯�", e);
- return BaseResponseUtils.buildException(e.getMessage()) ;
+ return BaseResponseUtils.buildException(e.getMessage());
}
- if(count <= 0){
- return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_INTAKE_FAIL.getMessage()) ;
- }else{
- return BaseResponseUtils.buildSuccess(true) ;
- }
+
+
}
/**
* 瀵煎嚭鍙栨按鍙e垪琛�
+ *
* @param response
* @param vo
*/
@@ -247,6 +252,7 @@
/**
* 瀵煎叆鍙栨按鍙e垪琛�
+ *
* @param file
*/
@SneakyThrows
@@ -257,7 +263,7 @@
.head(VoIntake.class)
.sheet()
.doReadSync();
- return BaseResponseUtils.buildSuccess(memberList) ;
+ return BaseResponseUtils.buildSuccess(memberList);
}
/**
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java
index 56e50c2..b1f9cfc 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java
@@ -79,6 +79,12 @@
* @return 鍙栨按鍙h褰曞垪琛�
*/
public QueryResultVo<List<VoIntake>> getIntakes(QueryVo queryVo) {
+// String isBinded = queryVo.getIsBinded();
+//
+// if(isBinded == null || isBinded.length() <= 0) {
+//
+// }
+
Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
Long itemTotal = prIntakeMapper.getRecordCount(params);
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java
index 197574d..c6d47b1 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java
@@ -29,7 +29,8 @@
public String blockName;
@Schema(description = "鏄惁缁戝畾璁惧")
- public String isBind;
+ //0鏈粦瀹� 1宸茬粦瀹�
+ public Integer isBinded;
@Schema(description = "鍦板潃")
public String address;
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java
index d3cad79..d1be98a 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java
@@ -12,13 +12,11 @@
import com.dy.pipIrrGlobal.voSe.VoActiveCard;
import com.dy.pipIrrGlobal.voSe.VoActiveCardNew;
import com.dy.pipIrrGlobal.voSe.VoRecharge;
+import com.dy.pipIrrGlobal.voSe.VoReissueCard;
import com.dy.pipIrrSell.cardOperate.converter.RechargeDtoMapper;
import com.dy.pipIrrSell.cardOperate.dto.*;
import com.dy.pipIrrSell.cardOperate.enums.OperateTypeENUM;
-import com.dy.pipIrrSell.cardOperate.qo.QoActiveCard;
-import com.dy.pipIrrSell.cardOperate.qo.QoRecharge;
-import com.dy.pipIrrSell.cardOperate.qo.QoTransaction;
-import com.dy.pipIrrSell.cardOperate.qo.QoTransactionStatistics;
+import com.dy.pipIrrSell.cardOperate.qo.*;
import com.dy.pipIrrSell.clientCard.CardStateENUM;
import com.dy.pipIrrSell.clientCard.ClientCardSv;
import com.dy.pipIrrSell.clientCard.LastOperateENUM;
@@ -835,7 +833,7 @@
})
@GetMapping(path = "/getActiveCards")
@SsoAop()
- public BaseResponse<QueryResultVo<List<VoActiveCardNew>>> get(QoActiveCard vo){
+ public BaseResponse<QueryResultVo<List<VoActiveCardNew>>> getActiveCards(QoActiveCard vo){
try {
QueryResultVo<List<VoActiveCardNew>> res = cardOperateSv.getActiveCards(vo);
if(res.itemTotal == 0) {
@@ -848,4 +846,35 @@
}
}
+
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇琛ュ崱璁板綍
+ * @param vo
+ * @return
+ */
+ @Operation(summary = "鑾峰彇琛ュ崱璁板綍", description = "杩斿洖琛ュ崱璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤佃ˉ鍗℃暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getReissueCards")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoReissueCard>>> getReissueCards(QoReissueCard vo){
+ try {
+ QueryResultVo<List<VoReissueCard>> res = cardOperateSv.getReissueCards(vo);
+ if(res.itemTotal == 0) {
+ return BaseResponseUtils.buildFail(SellResultCode.No_ReissueCards.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇琛ュ崱璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateSv.java
index be26372..b6b2a94 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateSv.java
@@ -13,10 +13,7 @@
import com.dy.pipIrrGlobal.voSe.*;
import com.dy.pipIrrSell.cardOperate.dto.DtoRecharge;
import com.dy.pipIrrSell.cardOperate.enums.OperateTypeENUM;
-import com.dy.pipIrrSell.cardOperate.qo.QoActiveCard;
-import com.dy.pipIrrSell.cardOperate.qo.QoRecharge;
-import com.dy.pipIrrSell.cardOperate.qo.QoTransaction;
-import com.dy.pipIrrSell.cardOperate.qo.QoTransactionStatistics;
+import com.dy.pipIrrSell.cardOperate.qo.*;
import com.dy.pipIrrSell.clientCard.ClientCardSv;
import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import com.dy.pipIrrSell.result.SellResultCode;
@@ -425,4 +422,45 @@
rsVo.obj = seCardOperateMapper.getActiveCards(params);
return rsVo ;
}
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇琛ュ崱璁板綍
+ * @param queryVo
+ * @return
+ */
+ public QueryResultVo<List<VoReissueCard>> getReissueCards(QoReissueCard queryVo) {
+ //瀹屽杽鏌ヨ鍏呭�艰褰曠殑璧锋鏃堕棿
+ String reissueCardTimeStart = queryVo.reissueCardTimeStart;
+ String reissueCardTimeStop = queryVo.reissueCardTimeStop;
+ if(reissueCardTimeStart != null) {
+ reissueCardTimeStart = reissueCardTimeStart + " 00:00:00";
+ queryVo.setReissueCardTimeStart(reissueCardTimeStart);
+ }
+ if(reissueCardTimeStop != null) {
+ reissueCardTimeStop = reissueCardTimeStop + " 23:59:59";
+ queryVo.setReissueCardTimeStop(reissueCardTimeStop);
+ }
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
+
+ Long itemTotal = seCardOperateMapper.getReissueCardRecordCount(params);
+
+ QueryResultVo<List<VoReissueCard>> rsVo = new QueryResultVo<>() ;
+ Integer pageCurr = 0;
+ Integer pageSize = 10000;
+ rsVo.pageCurr = 1;
+ rsVo.pageSize = 10000;
+ if(queryVo.pageSize != null && queryVo.pageCurr != null) {
+ rsVo.pageSize = queryVo.pageSize ;
+ rsVo.pageCurr = queryVo.pageCurr;
+ pageSize = queryVo.pageSize ;
+ pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString());
+ }
+ params.put("pageCurr", pageCurr);
+ params.put("pageSize", pageSize);
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = seCardOperateMapper.getReissueCards(params);
+ return rsVo ;
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/qo/QoReissueCard.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/qo/QoReissueCard.java
new file mode 100644
index 0000000..9f746b6
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/qo/QoReissueCard.java
@@ -0,0 +1,35 @@
+package com.dy.pipIrrSell.cardOperate.qo;
+
+import com.dy.common.webUtil.QueryConditionVo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/1/26 9:17
+ * @LastEditTime :2024/1/26 9:17
+ * @Description
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ToString(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@Schema(name = "IC鍗¤ˉ鍗¤褰曟煡璇㈡潯浠�")
+public class QoReissueCard extends QueryConditionVo {
+
+ @Schema(description = "鍐滄埛濮撳悕")
+ public String clientName;
+
+ @Schema(description = "IC鍗″彿")
+ //public String cardAddr;
+ public String cardNum;
+
+ @Schema(description = "琛ュ崱鏃堕棿_寮�濮�")
+ public String reissueCardTimeStart;
+
+ @Schema(description = "琛ュ崱鏃堕棿_缁撴潫")
+ public String reissueCardTimeStop;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/result/SellResultCode.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/result/SellResultCode.java
index ecb786e..f07303a 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/result/SellResultCode.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/result/SellResultCode.java
@@ -25,6 +25,7 @@
REPLACE_FAIL_WRITE_CLIENT_CARD_ERROR(10007, "琛ュ崱澶辫触-鍐滄埛鍗′慨鏀瑰紓甯�"),
REPLACE_FAIL_WRITE_RECHARGE_ERROR(10008, "琛ュ崱澶辫触-琛ュ崱璁板綍鍐欏叆寮傚父"),
No_ActiveCards(10009, "娌℃湁绗﹀悎鏉′欢鐨勫紑鍗℃暟鎹�"),
+ No_ReissueCards(10010, "娌℃湁绗﹀悎鏉′欢鐨勮ˉ鍗℃暟鎹�"),
/**
* 鍏呭��
--
Gitblit v1.8.0