LAPTOP-FO2T5SIU\35838 пре 7 месеци
родитељ
комит
1101506b48

+ 19 - 0
pro-base/src/main/java/com/idea/customerManagement/service/IntentionalDepositService.java

@@ -36,6 +36,9 @@ import com.idea.paymentManagement.model.PayLog;
 import com.idea.paymentManagement.model.PayLogExample;
 import com.idea.paymentManagement.model.RefundDetail;
 import com.idea.paymentManagement.model.RefundManage;
+import com.idea.transactionRecordManage.mapper.ConvertRecordMapper;
+import com.idea.transactionRecordManage.model.ConvertRecord;
+import com.idea.transactionRecordManage.model.ConvertRecordExample;
 import com.idea.util.DateUtils;
 import com.idea.util.MoneyUtils;
 import com.idea.util.ReplaceWord;
@@ -97,6 +100,8 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
     private RefundDetailMapper refundDetailMapper;
     @Autowired
     private PayLogExtendMapper payLogExtendMapper;
+    @Autowired
+    private ConvertRecordMapper convertRecordMapper;
 
 
     @Override
@@ -503,6 +508,20 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
             receiptManageService.updateByPrimaryKeySelective(manage);
         }
 
+        // 转换记录新增一条记录
+        ConvertRecord convertRecord = new ConvertRecord();
+        BeanUtil.copyProperties(model, convertRecord);
+        convertRecord.setId(IdUtil.simpleUUID());
+        convertRecord.setBusinessId(model.getId());
+        convertRecord.setBusinessType("intentional_deposit");
+        convertRecord.setConvertDate(new Date());
+        // 1-意向金转定金,2-定金转首款,3-定金转房款
+        convertRecord.setConvertType(1);
+        convertRecord.setCreatedAt(new Date());
+        convertRecord.setCreatedBy(ShiroUtils.getUserId());
+        convertRecordMapper.insertSelective(convertRecord);
+
+
         // 转定金
         model.setStatus(2);
         model.setHandleId(ShiroUtils.getUserId());

+ 1 - 1
pro-base/src/main/java/com/idea/invoice/dto/InvoiceManageDto.java

@@ -8,7 +8,7 @@ import java.math.BigDecimal;
 @Data
 public class InvoiceManageDto extends InvoiceManage {
 
-    private BigDecimal totalPrice;
+//    private BigDecimal totalPrice;
 
     private BigDecimal buyerMoney;
 

+ 31 - 2
pro-base/src/main/java/com/idea/paymentManagement/service/PayLogService.java

@@ -20,6 +20,7 @@ import com.idea.customerManagement.dto.ContractManageDto;
 import com.idea.customerManagement.dto.IntentionalDepositDto;
 import com.idea.customerManagement.mapper.ContractManageMapper;
 import com.idea.customerManagement.mapper.CustomerManagementMapper;
+import com.idea.customerManagement.mapper.RoomSelectionInfoMapper;
 import com.idea.customerManagement.model.*;
 import com.idea.customerManagement.service.BuyerService;
 import com.idea.invoice.dto.InvoiceManageDto;
@@ -36,6 +37,8 @@ import com.idea.paymentManagement.mapper.PayLogExtendMapper;
 import com.idea.paymentManagement.mapper.PayLogMapper;
 import com.idea.paymentManagement.model.PayLog;
 import com.idea.paymentManagement.model.PayLogExample;
+import com.idea.transactionRecordManage.mapper.ConvertRecordMapper;
+import com.idea.transactionRecordManage.model.ConvertRecord;
 import com.idea.util.DateUtils;
 import com.idea.util.MoneyUtils;
 import com.idea.util.ReplaceWord;
@@ -86,11 +89,15 @@ public class PayLogService implements BaseService<PayLog, PayLogExample> {
     @Autowired
     private ParkRoomExtendMapper roomExtendMapper;
     @Autowired
-    private ParkRoomMapper roomMapper;
+    private ParkRoomMapper parkRoomMapper;
     @Autowired
     private ParkInfoMapper parkInfoMapper;
     @Autowired
     private ParkFloorDiscMapper parkFloorDiscMapper;
+    @Autowired
+    private ConvertRecordMapper convertRecordMapper;
+    @Autowired
+    private RoomSelectionInfoMapper roomSelectionInfoMapper;
 
 
     @Override
@@ -550,19 +557,41 @@ public class PayLogService implements BaseService<PayLog, PayLogExample> {
      * @param type
      * @return
      */
+    @Transactional
     public int convertType(String id,Integer type){
         PayLog payLog = selectByPrimaryKey(id);
+        // 1-意向金转定金,2-定金转首款,3-定金转房款
+        Integer convertType = null;
         // 转首款
         if(type == 1){
             payLog.setContentType(8);
             payLog.setPaymentStatus(3);
+            convertType = 2;
         }
         // 转房款
         if(type == 2){
             payLog.setContentType(9);
             payLog.setPaymentStatus(4);
+            convertType = 3;
         }
-        return updateByPrimaryKeySelective(payLog);
+        int result = modelMapper.updateByPrimaryKeySelective(payLog);
+
+        // 新增转换记录
+        ParkRoom parkRoom = parkRoomMapper.selectByPrimaryKey(payLog.getHouseId());
+        ConvertRecord convertRecord = new ConvertRecord();
+        BeanUtil.copyProperties(payLog, convertRecord);
+        convertRecord.setGroupId(parkRoom.getGroupId());
+        convertRecord.setDiscId(parkRoom.getDiscId());
+        convertRecord.setId(IdUtil.simpleUUID());
+        convertRecord.setBusinessId(payLog.getId());
+        convertRecord.setBusinessType("pay_log");
+        convertRecord.setConvertDate(new Date());
+        convertRecord.setConvertType(convertType);
+        convertRecord.setCreatedAt(new Date());
+        convertRecord.setCreatedBy(ShiroUtils.getUserId());
+        convertRecordMapper.insertSelective(convertRecord);
+
+        return result;
     }
 
 

+ 1 - 1
pro-base/src/main/java/com/idea/transactionRecordManage/controller/TransactionRecordController.java

@@ -64,7 +64,7 @@ public class TransactionRecordController extends BaseController  {
     @PostMapping(value = "refundRecordListAll", produces = {"application/json;charset=UTF-8"})
     @ResponseBody
     public Object refundRecordListAll(NccRecordVo model) {
-        List<NccRecordVo> list = modelService.collectionRecordListAll(model);
+        List<NccRecordVo> list = modelService.refundRecordListAll(model);
         return list;
     }
 

+ 37 - 0
pro-base/src/main/java/com/idea/transactionRecordManage/mapper/ConvertRecordMapper.java

@@ -0,0 +1,37 @@
+package com.idea.transactionRecordManage.mapper;
+
+import java.util.List;
+
+import com.idea.transactionRecordManage.model.ConvertRecord;
+import com.idea.transactionRecordManage.model.ConvertRecordExample;
+import org.apache.ibatis.annotations.Param;
+
+public interface ConvertRecordMapper {
+    long countByExample(ConvertRecordExample example);
+
+    int deleteByExample(ConvertRecordExample example);
+
+    int deleteByPrimaryKey(String id);
+
+    int insert(ConvertRecord record);
+
+    int insertSelective(ConvertRecord record);
+
+    List<ConvertRecord> selectByExampleWithBLOBs(ConvertRecordExample example);
+
+    List<ConvertRecord> selectByExample(ConvertRecordExample example);
+
+    ConvertRecord selectByPrimaryKey(String id);
+
+    int updateByExampleSelective(@Param("record") ConvertRecord record, @Param("example") ConvertRecordExample example);
+
+    int updateByExampleWithBLOBs(@Param("record") ConvertRecord record, @Param("example") ConvertRecordExample example);
+
+    int updateByExample(@Param("record") ConvertRecord record, @Param("example") ConvertRecordExample example);
+
+    int updateByPrimaryKeySelective(ConvertRecord record);
+
+    int updateByPrimaryKeyWithBLOBs(ConvertRecord record);
+
+    int updateByPrimaryKey(ConvertRecord record);
+}

+ 178 - 0
pro-base/src/main/java/com/idea/transactionRecordManage/model/ConvertRecord.java

@@ -0,0 +1,178 @@
+package com.idea.transactionRecordManage.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ConvertRecord implements Serializable {
+    private String id;
+
+    private String groupId;
+
+    private String discId;
+
+    private String houseId;
+
+    private String customerManagementId;
+
+    private String businessId;
+
+    private String businessType;
+
+    private Integer convertType;
+
+    private Date convertDate;
+
+    private Integer ncSubmitStatus;
+
+    private Date ncSubmitDate;
+
+    private String ncSubmitName;
+
+    private String createdBy;
+
+    private Date createdAt;
+
+    private String updatedBy;
+
+    private Date updatedAt;
+
+    private String ncJson;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId == null ? null : groupId.trim();
+    }
+
+    public String getDiscId() {
+        return discId;
+    }
+
+    public void setDiscId(String discId) {
+        this.discId = discId == null ? null : discId.trim();
+    }
+
+    public String getHouseId() {
+        return houseId;
+    }
+
+    public void setHouseId(String houseId) {
+        this.houseId = houseId == null ? null : houseId.trim();
+    }
+
+    public String getCustomerManagementId() {
+        return customerManagementId;
+    }
+
+    public void setCustomerManagementId(String customerManagementId) {
+        this.customerManagementId = customerManagementId == null ? null : customerManagementId.trim();
+    }
+
+    public String getBusinessId() {
+        return businessId;
+    }
+
+    public void setBusinessId(String businessId) {
+        this.businessId = businessId == null ? null : businessId.trim();
+    }
+
+    public String getBusinessType() {
+        return businessType;
+    }
+
+    public void setBusinessType(String businessType) {
+        this.businessType = businessType == null ? null : businessType.trim();
+    }
+
+    public Integer getConvertType() {
+        return convertType;
+    }
+
+    public void setConvertType(Integer convertType) {
+        this.convertType = convertType;
+    }
+
+    public Date getConvertDate() {
+        return convertDate;
+    }
+
+    public void setConvertDate(Date convertDate) {
+        this.convertDate = convertDate;
+    }
+
+    public Integer getNcSubmitStatus() {
+        return ncSubmitStatus;
+    }
+
+    public void setNcSubmitStatus(Integer ncSubmitStatus) {
+        this.ncSubmitStatus = ncSubmitStatus;
+    }
+
+    public Date getNcSubmitDate() {
+        return ncSubmitDate;
+    }
+
+    public void setNcSubmitDate(Date ncSubmitDate) {
+        this.ncSubmitDate = ncSubmitDate;
+    }
+
+    public String getNcSubmitName() {
+        return ncSubmitName;
+    }
+
+    public void setNcSubmitName(String ncSubmitName) {
+        this.ncSubmitName = ncSubmitName == null ? null : ncSubmitName.trim();
+    }
+
+    public String getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(String createdBy) {
+        this.createdBy = createdBy == null ? null : createdBy.trim();
+    }
+
+    public Date getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(Date createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public String getUpdatedBy() {
+        return updatedBy;
+    }
+
+    public void setUpdatedBy(String updatedBy) {
+        this.updatedBy = updatedBy == null ? null : updatedBy.trim();
+    }
+
+    public Date getUpdatedAt() {
+        return updatedAt;
+    }
+
+    public void setUpdatedAt(Date updatedAt) {
+        this.updatedAt = updatedAt;
+    }
+
+    public String getNcJson() {
+        return ncJson;
+    }
+
+    public void setNcJson(String ncJson) {
+        this.ncJson = ncJson == null ? null : ncJson.trim();
+    }
+}

Разлика између датотеке није приказан због своје велике величине
+ 1261 - 0
pro-base/src/main/java/com/idea/transactionRecordManage/model/ConvertRecordExample.java


+ 26 - 5
pro-base/src/main/java/com/idea/transactionRecordManage/service/TransactionRecordService.java

@@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.idea.buildManage.mapper.ParkInfoMapper;
+import com.idea.buildManage.mapper.ParkRoomExtendMapper;
+import com.idea.buildManage.model.ParkFloorDisc;
 import com.idea.buildManage.model.ParkInfo;
 import com.idea.buildManage.model.ParkInfoExample;
 import com.idea.buildManage.response.ParkRoomResponse;
@@ -68,6 +70,8 @@ public class TransactionRecordService {
     private InvoiceManageMapper invoiceManageMapper;
     @Autowired
     private ParkInfoMapper parkInfoMapper;
+    @Autowired
+    private ParkRoomExtendMapper parkRoomExtendMapper;
 
     /**
      * 收款记录
@@ -119,7 +123,7 @@ public class TransactionRecordService {
      */
     public PageInfo<NccRecordVo> refundRecord(Tablepar tablepar, NccRecordVo model) {
 
-        List<Map<String, String>> contentType = sysDictService.selectDictList("CONTENT_TYPE");
+//        List<Map<String, String>> contentType = sysDictService.selectDictList("CONTENT_TYPE");
         PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
         if (StringUtils.isNotEmpty(model.getDiscIds())) {
             List<String> list = Arrays.asList(model.getDiscIds().split(","));
@@ -138,9 +142,9 @@ public class TransactionRecordService {
         return pageInfo;
     }
 
-    public List<NccRecordVo> refundRecordListAll(Tablepar tablepar, NccRecordVo model) {
+    public List<NccRecordVo> refundRecordListAll(NccRecordVo model) {
 
-        List<Map<String, String>> contentType = sysDictService.selectDictList("CONTENT_TYPE");
+//        List<Map<String, String>> contentType = sysDictService.selectDictList("CONTENT_TYPE");
         if (StringUtils.isNotEmpty(model.getDiscIds())) {
             List<String> list = Arrays.asList(model.getDiscIds().split(","));
             model.setDiscIdList(list);
@@ -166,6 +170,13 @@ public class TransactionRecordService {
      */
     public PageInfo<NccRecordVo> convertRecord(Tablepar tablepar, NccRecordVo model) {
 
+        // 查询房间名称
+        List<ParkRoomResponse> fullNames = parkRoomExtendMapper.getFullNames(null);
+        Map<String, String> nameMap = new HashMap<>();
+        for(ParkRoomResponse response : fullNames){
+            nameMap.put(response.getId(),response.getBuildName() + "-" + response.getRoomNo());
+        }
+
         PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
         if (StringUtils.isNotEmpty(model.getDiscIds())) {
             List<String> list = Arrays.asList(model.getDiscIds().split(","));
@@ -173,15 +184,25 @@ public class TransactionRecordService {
         }
         // 转换记录
         List<NccRecordVo> list = modelMapper.convertRecord(model);
-        for (NccRecordVo recordVo : list) {
-            recordVo.setContentType("7");
+        for(NccRecordVo vo : list){
+            if(nameMap.containsKey(vo.getHouseId())){
+                vo.setHouseName(nameMap.get(vo.getHouseId()));
+            }
         }
+
         PageInfo<NccRecordVo> pageInfo = new PageInfo<>(list);
         return pageInfo;
     }
 
     public List<NccRecordVo> convertRecordListAll(NccRecordVo model) {
 
+        // 查询房间名称
+        List<ParkRoomResponse> fullNames = parkRoomExtendMapper.getFullNames(null);
+        Map<String, String> nameMap = new HashMap<>();
+        for(ParkRoomResponse response : fullNames){
+            nameMap.put(response.getId(),response.getBuildName() + "-" + response.getRoomNo());
+        }
+
         if (StringUtils.isNotEmpty(model.getDiscIds())) {
             List<String> list = Arrays.asList(model.getDiscIds().split(","));
             model.setDiscIdList(list);

+ 16 - 2
pro-base/src/main/java/com/idea/transactionRecordManage/vo/NccRecordVo.java

@@ -83,8 +83,22 @@ public class NccRecordVo {
 
     private String collectionDateTo;
 
-    private String handleDateFrom;
+//    private String handleDateFrom;
+//
+//    private String handleDateTo;
 
-    private String handleDateTo;
+    /**
+     * 转换类型
+     */
+    private String convertType;
+
+    /**
+     * 转换日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date convertDate;
+
+    private String houseId;
 
 }

+ 8 - 4
pro-base/src/main/resources/mybatis/buildManage/ParkRoomExtendMapper.xml

@@ -123,10 +123,14 @@
         LEFT JOIN mnp_building ON mnp_building.id = park_room.build_id
         LEFT JOIN park_floor_disc ON park_floor_disc.id = park_room.disc_id
         LEFT JOIN park_info ON park_info.id = park_room.group_id
-    where park_room.id in
-    <foreach collection="houseIds" open="(" close=")" separator="," item="houseId">
-      #{houseId}
-    </foreach>
+    <where>
+      <if test="houseIds != null">
+        park_room.id in
+        <foreach collection="houseIds" open="(" close=")" separator="," item="houseId">
+          #{houseId}
+        </foreach>
+      </if>
+    </where>
   </select>
 
     <select id="selectNeedSendList" resultType="com.idea.buildManage.model.ParkRoom">

+ 1 - 0
pro-base/src/main/resources/mybatis/invoice/InvoiceManageExtendMapper.xml

@@ -7,6 +7,7 @@
       select i.*,cm.id contractId,cm.contract_number,cm.record_number,cm.buyer_name,cm.house_name,
              ifnull(cm.buyer_money,0) buyer_money,
              ifnull(cm.maintenance_total_price,0) maintenance_total_price,
+             ifnull(cm.total_price,0) receivable_money,
              cm.collection_status,cm.fund_collection_status
       from invoice_manage i
       left join idea_settle_down.contract_manage cm on i.contract_id = cm.id

+ 1 - 1
pro-base/src/main/resources/mybatis/paymentManagement/PayLogExtendMapper.xml

@@ -58,7 +58,7 @@
                concat(pay_log.serial_number) as serial_number
         from pay_log
         <where>
-            and ifnull(is_hide,0) != 1 and ifnull(payment_status,1) != 2
+            and ifnull(is_hide,0) != 1 and ifnull(payment_status,1) != 2 and status = 0
             <if test="contractId != null and contractId !=''">
                 and contract_id = #{contractId}
             </if>

+ 465 - 0
pro-base/src/main/resources/mybatis/transactionRecord/ConvertRecordMapper.xml

@@ -0,0 +1,465 @@
+<?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.idea.transactionRecordManage.mapper.ConvertRecordMapper">
+  <resultMap id="BaseResultMap" type="com.idea.transactionRecordManage.model.ConvertRecord">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="group_id" jdbcType="VARCHAR" property="groupId" />
+    <result column="disc_id" jdbcType="VARCHAR" property="discId" />
+    <result column="house_id" jdbcType="VARCHAR" property="houseId" />
+    <result column="customer_management_id" jdbcType="VARCHAR" property="customerManagementId" />
+    <result column="business_id" jdbcType="VARCHAR" property="businessId" />
+    <result column="business_type" jdbcType="VARCHAR" property="businessType" />
+    <result column="convert_type" jdbcType="INTEGER" property="convertType" />
+    <result column="convert_date" jdbcType="TIMESTAMP" property="convertDate" />
+    <result column="nc_submit_status" jdbcType="INTEGER" property="ncSubmitStatus" />
+    <result column="nc_submit_date" jdbcType="TIMESTAMP" property="ncSubmitDate" />
+    <result column="nc_submit_name" jdbcType="VARCHAR" property="ncSubmitName" />
+    <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
+    <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
+    <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
+    <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.idea.transactionRecordManage.model.ConvertRecord">
+    <result column="nc_json" jdbcType="LONGVARCHAR" property="ncJson" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, group_id, disc_id, house_id, customer_management_id, business_id, business_type,
+    convert_type, convert_date, nc_submit_status, nc_submit_date, nc_submit_name, created_by,
+    created_at, updated_by, updated_at
+  </sql>
+  <sql id="Blob_Column_List">
+    nc_json
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.idea.transactionRecordManage.model.ConvertRecordExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from convert_record
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.idea.transactionRecordManage.model.ConvertRecordExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from convert_record
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
+    select
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from convert_record
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from convert_record
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.idea.transactionRecordManage.model.ConvertRecordExample">
+    delete from convert_record
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.idea.transactionRecordManage.model.ConvertRecord">
+    insert into convert_record (id, group_id, disc_id,
+                                house_id, customer_management_id, business_id,
+                                business_type, convert_type, convert_date,
+                                nc_submit_status, nc_submit_date, nc_submit_name,
+                                created_by, created_at, updated_by,
+                                updated_at, nc_json)
+    values (#{id,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR}, #{discId,jdbcType=VARCHAR},
+            #{houseId,jdbcType=VARCHAR}, #{customerManagementId,jdbcType=VARCHAR}, #{businessId,jdbcType=VARCHAR},
+            #{businessType,jdbcType=VARCHAR}, #{convertType,jdbcType=INTEGER}, #{convertDate,jdbcType=TIMESTAMP},
+            #{ncSubmitStatus,jdbcType=INTEGER}, #{ncSubmitDate,jdbcType=TIMESTAMP}, #{ncSubmitName,jdbcType=VARCHAR},
+            #{createdBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR},
+            #{updatedAt,jdbcType=TIMESTAMP}, #{ncJson,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.idea.transactionRecordManage.model.ConvertRecord">
+    insert into convert_record
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="groupId != null">
+        group_id,
+      </if>
+      <if test="discId != null">
+        disc_id,
+      </if>
+      <if test="houseId != null">
+        house_id,
+      </if>
+      <if test="customerManagementId != null">
+        customer_management_id,
+      </if>
+      <if test="businessId != null">
+        business_id,
+      </if>
+      <if test="businessType != null">
+        business_type,
+      </if>
+      <if test="convertType != null">
+        convert_type,
+      </if>
+      <if test="convertDate != null">
+        convert_date,
+      </if>
+      <if test="ncSubmitStatus != null">
+        nc_submit_status,
+      </if>
+      <if test="ncSubmitDate != null">
+        nc_submit_date,
+      </if>
+      <if test="ncSubmitName != null">
+        nc_submit_name,
+      </if>
+      <if test="createdBy != null">
+        created_by,
+      </if>
+      <if test="createdAt != null">
+        created_at,
+      </if>
+      <if test="updatedBy != null">
+        updated_by,
+      </if>
+      <if test="updatedAt != null">
+        updated_at,
+      </if>
+      <if test="ncJson != null">
+        nc_json,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="groupId != null">
+        #{groupId,jdbcType=VARCHAR},
+      </if>
+      <if test="discId != null">
+        #{discId,jdbcType=VARCHAR},
+      </if>
+      <if test="houseId != null">
+        #{houseId,jdbcType=VARCHAR},
+      </if>
+      <if test="customerManagementId != null">
+        #{customerManagementId,jdbcType=VARCHAR},
+      </if>
+      <if test="businessId != null">
+        #{businessId,jdbcType=VARCHAR},
+      </if>
+      <if test="businessType != null">
+        #{businessType,jdbcType=VARCHAR},
+      </if>
+      <if test="convertType != null">
+        #{convertType,jdbcType=INTEGER},
+      </if>
+      <if test="convertDate != null">
+        #{convertDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ncSubmitStatus != null">
+        #{ncSubmitStatus,jdbcType=INTEGER},
+      </if>
+      <if test="ncSubmitDate != null">
+        #{ncSubmitDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ncSubmitName != null">
+        #{ncSubmitName,jdbcType=VARCHAR},
+      </if>
+      <if test="createdBy != null">
+        #{createdBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updatedBy != null">
+        #{updatedBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updatedAt != null">
+        #{updatedAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ncJson != null">
+        #{ncJson,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.idea.transactionRecordManage.model.ConvertRecordExample" resultType="java.lang.Long">
+    select count(*) from convert_record
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update convert_record
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.groupId != null">
+        group_id = #{record.groupId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.discId != null">
+        disc_id = #{record.discId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.houseId != null">
+        house_id = #{record.houseId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.customerManagementId != null">
+        customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.businessId != null">
+        business_id = #{record.businessId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.businessType != null">
+        business_type = #{record.businessType,jdbcType=VARCHAR},
+      </if>
+      <if test="record.convertType != null">
+        convert_type = #{record.convertType,jdbcType=INTEGER},
+      </if>
+      <if test="record.convertDate != null">
+        convert_date = #{record.convertDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.ncSubmitStatus != null">
+        nc_submit_status = #{record.ncSubmitStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.ncSubmitDate != null">
+        nc_submit_date = #{record.ncSubmitDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.ncSubmitName != null">
+        nc_submit_name = #{record.ncSubmitName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createdBy != null">
+        created_by = #{record.createdBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createdAt != null">
+        created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updatedBy != null">
+        updated_by = #{record.updatedBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.updatedAt != null">
+        updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.ncJson != null">
+        nc_json = #{record.ncJson,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update convert_record
+    set id = #{record.id,jdbcType=VARCHAR},
+    group_id = #{record.groupId,jdbcType=VARCHAR},
+    disc_id = #{record.discId,jdbcType=VARCHAR},
+    house_id = #{record.houseId,jdbcType=VARCHAR},
+    customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
+    business_id = #{record.businessId,jdbcType=VARCHAR},
+    business_type = #{record.businessType,jdbcType=VARCHAR},
+    convert_type = #{record.convertType,jdbcType=INTEGER},
+    convert_date = #{record.convertDate,jdbcType=TIMESTAMP},
+    nc_submit_status = #{record.ncSubmitStatus,jdbcType=INTEGER},
+    nc_submit_date = #{record.ncSubmitDate,jdbcType=TIMESTAMP},
+    nc_submit_name = #{record.ncSubmitName,jdbcType=VARCHAR},
+    created_by = #{record.createdBy,jdbcType=VARCHAR},
+    created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+    updated_by = #{record.updatedBy,jdbcType=VARCHAR},
+    updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
+    nc_json = #{record.ncJson,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update convert_record
+    set id = #{record.id,jdbcType=VARCHAR},
+    group_id = #{record.groupId,jdbcType=VARCHAR},
+    disc_id = #{record.discId,jdbcType=VARCHAR},
+    house_id = #{record.houseId,jdbcType=VARCHAR},
+    customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
+    business_id = #{record.businessId,jdbcType=VARCHAR},
+    business_type = #{record.businessType,jdbcType=VARCHAR},
+    convert_type = #{record.convertType,jdbcType=INTEGER},
+    convert_date = #{record.convertDate,jdbcType=TIMESTAMP},
+    nc_submit_status = #{record.ncSubmitStatus,jdbcType=INTEGER},
+    nc_submit_date = #{record.ncSubmitDate,jdbcType=TIMESTAMP},
+    nc_submit_name = #{record.ncSubmitName,jdbcType=VARCHAR},
+    created_by = #{record.createdBy,jdbcType=VARCHAR},
+    created_at = #{record.createdAt,jdbcType=TIMESTAMP},
+    updated_by = #{record.updatedBy,jdbcType=VARCHAR},
+    updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.idea.transactionRecordManage.model.ConvertRecord">
+    update convert_record
+    <set>
+      <if test="groupId != null">
+        group_id = #{groupId,jdbcType=VARCHAR},
+      </if>
+      <if test="discId != null">
+        disc_id = #{discId,jdbcType=VARCHAR},
+      </if>
+      <if test="houseId != null">
+        house_id = #{houseId,jdbcType=VARCHAR},
+      </if>
+      <if test="customerManagementId != null">
+        customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
+      </if>
+      <if test="businessId != null">
+        business_id = #{businessId,jdbcType=VARCHAR},
+      </if>
+      <if test="businessType != null">
+        business_type = #{businessType,jdbcType=VARCHAR},
+      </if>
+      <if test="convertType != null">
+        convert_type = #{convertType,jdbcType=INTEGER},
+      </if>
+      <if test="convertDate != null">
+        convert_date = #{convertDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ncSubmitStatus != null">
+        nc_submit_status = #{ncSubmitStatus,jdbcType=INTEGER},
+      </if>
+      <if test="ncSubmitDate != null">
+        nc_submit_date = #{ncSubmitDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ncSubmitName != null">
+        nc_submit_name = #{ncSubmitName,jdbcType=VARCHAR},
+      </if>
+      <if test="createdBy != null">
+        created_by = #{createdBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createdAt != null">
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updatedBy != null">
+        updated_by = #{updatedBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updatedAt != null">
+        updated_at = #{updatedAt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ncJson != null">
+        nc_json = #{ncJson,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.idea.transactionRecordManage.model.ConvertRecord">
+    update convert_record
+    set group_id = #{groupId,jdbcType=VARCHAR},
+        disc_id = #{discId,jdbcType=VARCHAR},
+        house_id = #{houseId,jdbcType=VARCHAR},
+        customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
+        business_id = #{businessId,jdbcType=VARCHAR},
+        business_type = #{businessType,jdbcType=VARCHAR},
+        convert_type = #{convertType,jdbcType=INTEGER},
+        convert_date = #{convertDate,jdbcType=TIMESTAMP},
+        nc_submit_status = #{ncSubmitStatus,jdbcType=INTEGER},
+        nc_submit_date = #{ncSubmitDate,jdbcType=TIMESTAMP},
+        nc_submit_name = #{ncSubmitName,jdbcType=VARCHAR},
+        created_by = #{createdBy,jdbcType=VARCHAR},
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+        updated_by = #{updatedBy,jdbcType=VARCHAR},
+        updated_at = #{updatedAt,jdbcType=TIMESTAMP},
+        nc_json = #{ncJson,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.idea.transactionRecordManage.model.ConvertRecord">
+    update convert_record
+    set group_id = #{groupId,jdbcType=VARCHAR},
+        disc_id = #{discId,jdbcType=VARCHAR},
+        house_id = #{houseId,jdbcType=VARCHAR},
+        customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
+        business_id = #{businessId,jdbcType=VARCHAR},
+        business_type = #{businessType,jdbcType=VARCHAR},
+        convert_type = #{convertType,jdbcType=INTEGER},
+        convert_date = #{convertDate,jdbcType=TIMESTAMP},
+        nc_submit_status = #{ncSubmitStatus,jdbcType=INTEGER},
+        nc_submit_date = #{ncSubmitDate,jdbcType=TIMESTAMP},
+        nc_submit_name = #{ncSubmitName,jdbcType=VARCHAR},
+        created_by = #{createdBy,jdbcType=VARCHAR},
+        created_at = #{createdAt,jdbcType=TIMESTAMP},
+        updated_by = #{updatedBy,jdbcType=VARCHAR},
+        updated_at = #{updatedAt,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 63 - 19
pro-base/src/main/resources/mybatis/transactionRecord/TransactionRecord.xml

@@ -106,36 +106,80 @@
     </select>
 
     <select id="convertRecord" resultType="com.idea.transactionRecordManage.vo.NccRecordVo">
-        select intentional_deposit.*,
-        intentional_deposit.received_amount money,
-        customer_management.buyer_name,
-        customer_management.house_name,
-        frame_user.truename as createdName,
-        customer_management.house_id
-        from intentional_deposit
-        left join customer_management on customer_management.id = intentional_deposit.customer_management_id
-        left join frame_user on frame_user.id = intentional_deposit.created_id
-        left join park_floor_disc on park_floor_disc.id = intentional_deposit.disc_id
+<!--        select intentional_deposit.*,-->
+<!--        intentional_deposit.received_amount money,-->
+<!--        customer_management.buyer_name,-->
+<!--        customer_management.house_name,-->
+<!--        frame_user.truename as createdName,-->
+<!--        customer_management.house_id-->
+<!--        from intentional_deposit-->
+<!--        left join customer_management on customer_management.id = intentional_deposit.customer_management_id-->
+<!--        left join frame_user on frame_user.id = intentional_deposit.created_id-->
+<!--        left join park_floor_disc on park_floor_disc.id = intentional_deposit.disc_id-->
+<!--        <where>-->
+<!--                and intentional_deposit.status != 1-->
+<!--            <if test="buyerName !=null and buyerName != '' " >-->
+<!--                and customer_management.buyer_name like concat('%',#{buyerName},'%')-->
+<!--            </if>-->
+<!--            <if test="discIdList != null">-->
+<!--                AND park_floor_disc.id in-->
+<!--                <foreach collection="discIdList" open="(" close=")" separator="," item="item">-->
+<!--                    #{item}-->
+<!--                </foreach>-->
+<!--            </if>-->
+<!--            <if test="handleDateFrom !=null and handleDateFrom != '' " >-->
+<!--                and intentional_deposit.handle_date >= date_format(#{handleDateFrom},'%Y-%m-%d')-->
+<!--            </if>-->
+<!--            <if test="handleDateTo !=null and handleDateTo != '' " >-->
+<!--                and intentional_deposit.handle_date &lt;= date_format(#{handleDateTo},'%Y-%m-%d')-->
+<!--            </if>-->
+<!--        </where>-->
+
+<!--        order by created_at desc-->
+        select * from (
+        select
+        cr.id,cr.convert_type,cr.convert_date,cr.house_id,cr.disc_id,
+        cm. buyer_name,
+        i.received_amount money,
+        i.serial_number,
+        i.bank_number,
+        u.truename createdName
+        from convert_record cr
+        left join customer_management cm on cm.id = cr.customer_management_id
+        left join intentional_deposit i on i.id = cr.business_id and i.status!= 1
+        left join frame_user u on u.id = cr.created_by
+        where cr.business_type = 'intentional_deposit'
+        union ALL
+        select
+        cr.id,cr.convert_type,cr.convert_date,cr.house_id,cr.disc_id,
+        cm. buyer_name,
+        p.pay_money money,
+        p.serial_number,
+        p.bank_number,
+        u.truename createdName
+        from convert_record cr
+        left join customer_management cm on cm.id = cr.customer_management_id
+        left join pay_log p on p.id = cr.business_id
+        left join frame_user u on u.id = cr.created_by
+        where cr.business_type = 'pay_log'
+        ) t
         <where>
-                and intentional_deposit.status != 1
             <if test="buyerName !=null and buyerName != '' " >
-                and customer_management.buyer_name like concat('%',#{buyerName},'%')
+                and buyer_name like concat('%',#{buyerName},'%')
             </if>
             <if test="discIdList != null">
-                AND park_floor_disc.id in
+                and disc_id.id in
                 <foreach collection="discIdList" open="(" close=")" separator="," item="item">
                     #{item}
                 </foreach>
             </if>
-            <if test="handleDateFrom !=null and handleDateFrom != '' " >
-                and intentional_deposit.handle_date >= date_format(#{handleDateFrom},'%Y-%m-%d')
+            <if test="collectionDateFrom !=null and collectionDateFrom != '' " >
+                and convert_date >= date_format(#{collectionDateFrom},'%Y-%m-%d')
             </if>
-            <if test="handleDateTo !=null and handleDateTo != '' " >
-                and intentional_deposit.handle_date &lt;= date_format(#{handleDateTo},'%Y-%m-%d')
+            <if test="collectionDateTo !=null and collectionDateTo != '' " >
+                and convert_date &lt;= date_format(#{collectionDateTo},'%Y-%m-%d')
             </if>
         </where>
-
-        order by created_at desc
     </select>
 
     <select id="convertListByDate" resultType="com.idea.customerManagement.dto.IntentionalDepositDto">