linwei
2024-02-03 b87c9800541483108a40804c39be99f02a073e12
二手交易
5 files modified
524 ■■■■■ changed files
src/main/java/org/springblade/modules/task/entity/TaskLabelReportingEventEntity.java 292 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml 164 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java 33 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/entity/TaskLabelReportingEventEntity.java
@@ -44,194 +44,160 @@
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    /** 主键id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 任务id
     */
    @ApiModelProperty(value = "任务id")
    /** 任务id */
    @ApiModelProperty(value = "任务id", example = "")
    @TableField("task_id")
    private Long taskId;
    /**
     * 场所ID
     */
    @ApiModelProperty(value = "场所ID")
    /** 场所ID */
    @ApiModelProperty(value = "场所ID", example = "")
    @TableField("place_id")
    private Long placeId;
//    /**
//     * 房屋ID
//     */
//    @ApiModelProperty(value = "房屋ID")
//    private String houseId;
//    /**
//     * 社区ID
//     */
//    @ApiModelProperty(value = "社区ID")
//    private String districtId;
    /**
     * 发生时间
     */
    @ApiModelProperty(value = "发生时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date happenTime;
    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private Long userId;
    /**
     * 用户姓名
     */
    @ApiModelProperty(value = "用户姓名")
    private String owner;
    /**
     * 用户手机号
     */
    @ApiModelProperty(value = "用户手机号")
    private String phoneNumber;
    /**
     * 身份证图片URLS
     */
    @ApiModelProperty(value = "身份证图片URLS")
    private String imageUrls;
    /**
     * 场所名称
     */
    @ApiModelProperty(value = "场所名称")
    /** 场所名称 */
    @ApiModelProperty(value = "场所名称", example = "")
    @TableField("district_name")
    private String districtName;
    /**
     * 事件类型 1:打金店 2:二手手机 3:二手车
     */
    @ApiModelProperty(value = "事件类型")
    /** 发生时间 */
    @ApiModelProperty(value = "发生时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("happen_time")
    private Date happenTime;
    /** 用户ID */
    @ApiModelProperty(value = "用户ID", example = "")
    @TableField("user_id")
    private Long userId;
    /** 用户姓名 */
    @ApiModelProperty(value = "用户姓名", example = "")
    @TableField("owner")
    private String owner;
    /** 用户手机号 */
    @ApiModelProperty(value = "用户手机号", example = "")
    @TableField("phone_number")
    private String phoneNumber;
    /** 身份证图片URLS */
    @ApiModelProperty(value = "身份证图片URLS", example = "")
    @TableField("image_urls")
    private String imageUrls;
    /** 位置 */
    @ApiModelProperty(value = "位置", example = "")
    @TableField("localtion")
    private String localtion;
    /** 事件类型 1.二手交易 */
    @ApiModelProperty(value = "事件类型 1.二手交易", example = "")
    @TableField("event_type")
    private String eventType;
    /**
     * 确认人ID
     */
    @ApiModelProperty(value = "确认人ID")
    private Long confirmUserId;
    /**
     * 确认时间
     */
    @ApiModelProperty(value = "确认时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date confirmTime;
    /**
     * 确认意见
     */
    @ApiModelProperty(value = "确认意见")
    private String confirmNotion;
    /**
     * 确认标记 1:待审核  2:审核通过  3:审核不通过  4:待上报(场所负责人完善,由系统下发的任务)
     */
    @ApiModelProperty(value = "确认标记 1:待审核  2:审核通过  3:审核不通过  4:待上报(场所负责人完善,由系统下发的任务)")
    /** 确认标记 1:待审核  2:审核通过  3:审核不通过 4:待接收 */
    @ApiModelProperty(value = "确认标记 1:待审核  2:审核通过  3:审核不通过 4:待接收", example = "")
    @TableField("confirm_flag")
    private String confirmFlag;
    /**
     * 位置
     */
    @ApiModelProperty(value = "位置")
    private String localtion;
//
//    /**
//     * 房屋名称
//     */
//    @ApiModelProperty(value = "房屋名称")
//    private String houseName;
//    /**
//     * 任务名称
//     */
//    @ApiModelProperty(value = "任务名称")
//    private String taskName;
    /**
     * 对象电话
     */
    @ApiModelProperty(value = "对象电话")
    /** 确认人ID */
    @ApiModelProperty(value = "确认人ID", example = "")
    @TableField("confirm_user_id")
    private Long confirmUserId;
    /** 确认时间 */
    @ApiModelProperty(value = "确认时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("confirm_time")
    private Date confirmTime;
    /** 确认意见 */
    @ApiModelProperty(value = "确认意见", example = "")
    @TableField("confirm_notion")
    private String confirmNotion;
    /** 对象电话 */
    @ApiModelProperty(value = "对象电话", example = "")
    @TableField("transaction_object_tel")
    private String transactionObjectTel;
    /**
     * 交易金额
     */
    @ApiModelProperty(value = "交易金额")
    private Double transactionMoney;
    /**
     * 物品数量
     */
    @ApiModelProperty(value = "物品数量")
    /** 交易金额 */
    @ApiModelProperty(value = "交易金额", example = "")
    @TableField("transaction_money")
    private Float transactionMoney;
    /** 物品数量 */
    @ApiModelProperty(value = "物品数量", example = "")
    @TableField("goods_nums")
    private Integer goodsNums;
    /**
     * 物品照片URLS
     */
    @ApiModelProperty(value = "物品照片URLS")
    /** 物品照片URLS */
    @ApiModelProperty(value = "物品照片URLS", example = "")
    @TableField("goods_image_urls")
    private String goodsImageUrls;
    /**
     * 交易对象
     */
    @ApiModelProperty(value = "交易对象")
    /** 交易对象/物品名称 */
    @ApiModelProperty(value = "交易对象/物品名称", example = "")
    @TableField("transaction_object")
    private String transactionObject;
    /**
     * 交易过程
     */
    @ApiModelProperty(value = "交易过程")
    /** 交易过程 */
    @ApiModelProperty(value = "交易过程", example = "")
    @TableField("transaction_process")
    private String transactionProcess;
    /**
     * 标签名称
     */
    @ApiModelProperty(value = "标签名称")
    /** 标签名称 */
    @ApiModelProperty(value = "标签名称", example = "")
    @TableField("label_name")
    private String labelName;
    /**
     * 来源: 1:主动上报  2:系统自动下发
     */
    @ApiModelProperty(value = "来源: 1:主动上报  2:系统自动下发")
    /** 1:主动上报  2:系统自动下发 */
    @ApiModelProperty(value = "1:主动上报  2:系统自动下发", example = "")
    @TableField("source")
    private Integer source;
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;
    /**
     * 创建人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createUser;
    /** 创建人 */
    @ApiModelProperty(value = "创建人", example = "")
    @TableField("create_user")
    private Long createUser;
    /**
     * 更新人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("更新人")
    @TableField(fill = FieldFill.UPDATE)
    private String updateUser;
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("update_time")
    private Date updateTime;
    /** 更新人 */
    @ApiModelProperty(value = "更新人", example = "")
    @TableField("update_user")
    private Long updateUser;
    /**
     * 是否已删除 0:否  1:是
     */
    @ApiModelProperty("是否已删除")
    /** 0否 1是 */
    @ApiModelProperty(value = "0否 1是", example = "")
    @TableField("is_deleted")
    private Integer isDeleted;
    /** 身份证号 */
    @ApiModelProperty(value = "身份证号", example = "")
    @TableField("id_card")
    private String idCard;
    /** 收据、发票 */
    @ApiModelProperty(value = "收据、发票", example = "")
    @TableField("receipt_urls")
    private String receiptUrls;
}
src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java
@@ -17,6 +17,7 @@
package org.springblade.modules.task.mapper;
import io.lettuce.core.dynamic.annotation.Param;
import org.springblade.modules.task.dto.TaskLabelReportingEventDTO;
import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -41,4 +42,20 @@
    List<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage page,TaskLabelReportingEventVO taskLabelReportingEvent);
    /**
     * 查询打金店报事
     *
     * @param id 打金店报事ID
     * @return 打金店报事
     */
    public TaskLabelReportingEventDTO selectTaskLabelReportingEventById(Long id);
    /**
     * 查询打金店报事列表
     *
     * @param taskLabelReportingEventDTO 打金店报事
     * @return 打金店报事集合
     */
    public List<TaskLabelReportingEventDTO> selectTaskLabelReportingEventList(TaskLabelReportingEventDTO taskLabelReportingEventDTO);
}
src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
@@ -4,28 +4,36 @@
    <!-- 通用查询映射结果 -->
    <resultMap id="taskLabelReportingEventResultMap" type="org.springblade.modules.task.entity.TaskLabelReportingEventEntity">
        <result column="id" property="id"/>
        <result column="task_id" property="taskId"/>
        <result column="place_id" property="placeId"/>
        <result column="happen_time" property="happenTime"/>
        <result column="user_id" property="userId"/>
        <result column="image_urls" property="imageUrls"/>
        <result column="district_name" property="districtName"/>
        <result column="event_type" property="eventType"/>
        <result column="confirm_flag" property="confirmFlag"/>
        <result column="confirm_user_id" property="confirmUserId"/>
        <result column="confirm_time" property="confirmTime"/>
        <result column="localtion" property="localtion"/>
        <result column="confirm_notion" property="confirmNotion"/>
        <result column="owner" property="owner"/>
        <result column="phone_number" property="phoneNumber"/>
        <result column="transaction_object_tel" property="transactionObjectTel"/>
        <result column="transaction_money" property="transactionMoney"/>
        <result column="goods_nums" property="goodsNums"/>
        <result column="goods_image_urls" property="goodsImageUrls"/>
        <result column="transaction_object" property="transactionObject"/>
        <result column="transaction_process" property="transactionProcess"/>
        <result column="label_name" property="labelName"/>
        <result property="id"    column="id"    />
        <result property="taskId"    column="task_id"    />
        <result property="placeId"    column="place_id"    />
        <result property="districtName"    column="district_name"    />
        <result property="happenTime"    column="happen_time"    />
        <result property="userId"    column="user_id"    />
        <result property="owner"    column="owner"    />
        <result property="phoneNumber"    column="phone_number"    />
        <result property="imageUrls"    column="image_urls"    />
        <result property="localtion"    column="localtion"    />
        <result property="eventType"    column="event_type"    />
        <result property="confirmFlag"    column="confirm_flag"    />
        <result property="confirmUserId"    column="confirm_user_id"    />
        <result property="confirmTime"    column="confirm_time"    />
        <result property="confirmNotion"    column="confirm_notion"    />
        <result property="transactionObjectTel"    column="transaction_object_tel"    />
        <result property="transactionMoney"    column="transaction_money"    />
        <result property="goodsNums"    column="goods_nums"    />
        <result property="goodsImageUrls"    column="goods_image_urls"    />
        <result property="transactionObject"    column="transaction_object"    />
        <result property="transactionProcess"    column="transaction_process"    />
        <result property="labelName"    column="label_name"    />
        <result property="source"    column="source"    />
        <result property="createTime"    column="create_time"    />
        <result property="createUser"    column="create_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="isDeleted"    column="is_deleted"    />
        <result property="idCard"    column="id_card"    />
        <result property="receiptUrls"    column="receipt_urls"    />
    </resultMap>
@@ -40,4 +48,116 @@
    </select>
    <resultMap type="org.springblade.modules.task.dto.TaskLabelReportingEventDTO" id="TaskLabelReportingEventDTOResult">
        <result property="id"    column="id"    />
        <result property="taskId"    column="task_id"    />
        <result property="placeId"    column="place_id"    />
        <result property="districtName"    column="district_name"    />
        <result property="happenTime"    column="happen_time"    />
        <result property="userId"    column="user_id"    />
        <result property="owner"    column="owner"    />
        <result property="phoneNumber"    column="phone_number"    />
        <result property="imageUrls"    column="image_urls"    />
        <result property="localtion"    column="localtion"    />
        <result property="eventType"    column="event_type"    />
        <result property="confirmFlag"    column="confirm_flag"    />
        <result property="confirmUserId"    column="confirm_user_id"    />
        <result property="confirmTime"    column="confirm_time"    />
        <result property="confirmNotion"    column="confirm_notion"    />
        <result property="transactionObjectTel"    column="transaction_object_tel"    />
        <result property="transactionMoney"    column="transaction_money"    />
        <result property="goodsNums"    column="goods_nums"    />
        <result property="goodsImageUrls"    column="goods_image_urls"    />
        <result property="transactionObject"    column="transaction_object"    />
        <result property="transactionProcess"    column="transaction_process"    />
        <result property="labelName"    column="label_name"    />
        <result property="source"    column="source"    />
        <result property="createTime"    column="create_time"    />
        <result property="createUser"    column="create_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="isDeleted"    column="is_deleted"    />
        <result property="idCard"    column="id_card"    />
        <result property="receiptUrls"    column="receipt_urls"    />
    </resultMap>
    <sql id="selectTaskLabelReportingEvent">
        select
            id,
            task_id,
            place_id,
            district_name,
            happen_time,
            user_id,
            owner,
            phone_number,
            image_urls,
            localtion,
            event_type,
            confirm_flag,
            confirm_user_id,
            confirm_time,
            confirm_notion,
            transaction_object_tel,
            transaction_money,
            goods_nums,
            goods_image_urls,
            transaction_object,
            transaction_process,
            label_name,
            source,
            create_time,
            create_user,
            update_time,
            update_user,
            is_deleted,
            id_card,
            receipt_urls
        from
            jczz_task_label_reporting_event
    </sql>
    <select id="selectTaskLabelReportingEventById" parameterType="long" resultMap="TaskLabelReportingEventDTOResult">
        <include refid="selectTaskLabelReportingEvent"/>
        where
        id = #{id}
    </select>
    <select id="selectTaskLabelReportingEventList" parameterType="org.springblade.modules.task.dto.TaskLabelReportingEventDTO" resultMap="TaskLabelReportingEventDTOResult">
        <include refid="selectTaskLabelReportingEvent"/>
        <where>
            <if test="id != null "> and id = #{id}</if>
            <if test="taskId != null "> and task_id = #{taskId}</if>
            <if test="placeId != null "> and place_id = #{placeId}</if>
            <if test="districtName != null  and districtName != ''"> and district_name = #{districtName}</if>
            <if test="happenTime != null "> and happen_time = #{happenTime}</if>
            <if test="userId != null "> and user_id = #{userId}</if>
            <if test="owner != null  and owner != ''"> and owner = #{owner}</if>
            <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
            <if test="imageUrls != null  and imageUrls != ''"> and image_urls = #{imageUrls}</if>
            <if test="localtion != null  and localtion != ''"> and localtion = #{localtion}</if>
            <if test="eventType != null  and eventType != ''"> and event_type = #{eventType}</if>
            <if test="confirmFlag != null  and confirmFlag != ''"> and confirm_flag = #{confirmFlag}</if>
            <if test="confirmUserId != null "> and confirm_user_id = #{confirmUserId}</if>
            <if test="confirmTime != null "> and confirm_time = #{confirmTime}</if>
            <if test="confirmNotion != null  and confirmNotion != ''"> and confirm_notion = #{confirmNotion}</if>
            <if test="transactionObjectTel != null  and transactionObjectTel != ''"> and transaction_object_tel = #{transactionObjectTel}</if>
            <if test="transactionMoney != null "> and transaction_money = #{transactionMoney}</if>
            <if test="goodsNums != null "> and goods_nums = #{goodsNums}</if>
            <if test="goodsImageUrls != null  and goodsImageUrls != ''"> and goods_image_urls = #{goodsImageUrls}</if>
            <if test="transactionObject != null  and transactionObject != ''"> and transaction_object = #{transactionObject}</if>
            <if test="transactionProcess != null  and transactionProcess != ''"> and transaction_process = #{transactionProcess}</if>
            <if test="labelName != null  and labelName != ''"> and label_name = #{labelName}</if>
            <if test="source != null "> and source = #{source}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="createUser != null "> and create_user = #{createUser}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
            <if test="updateUser != null "> and update_user = #{updateUser}</if>
            <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
            <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
            <if test="receiptUrls != null  and receiptUrls != ''"> and receipt_urls = #{receiptUrls}</if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
@@ -23,6 +23,8 @@
import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
import java.util.List;
/**
 * 打金店报事 服务类
 *
@@ -44,4 +46,20 @@
    Boolean saveReportingEven(TaskLabelReportingEventDTO taskLabelReportingEvent);
    Boolean updateLabelReporting(TaskLabelReportingEventVO taskLabelReportingEvent) throws Exception;
    /**
     * 查询打金店报事
     *
     * @param id 打金店报事ID
     * @return 打金店报事
     */
    public TaskLabelReportingEventDTO selectTaskLabelReportingEventById(Long id);
    /**
     * 查询打金店报事列表
     *
     * @param taskLabelReportingEventDTO 打金店报事
     * @return 打金店报事集合
     */
    public List<TaskLabelReportingEventDTO> selectTaskLabelReportingEventList(TaskLabelReportingEventDTO taskLabelReportingEventDTO);
}
src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
@@ -37,6 +37,7 @@
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
 * 打金店报事 服务实现类
@@ -76,11 +77,11 @@
                name = "";
        }
        Long aLong = taskService.saveTask(1, name, 1, "", AuthUtil.getUserId(),
            taskLabelReportingEvent.getHouseCode(),taskLabelReportingEvent.getReportType(),0);
            taskLabelReportingEvent.getHouseCode(), taskLabelReportingEvent.getReportType(), 0);
        if (aLong > 0) {
            // 通过houseCode 获取场所id
            QueryWrapper<PlaceEntity> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("is_deleted",0).eq("house_code",taskLabelReportingEvent.getHouseCode());
            queryWrapper.eq("is_deleted", 0).eq("house_code", taskLabelReportingEvent.getHouseCode());
            PlaceEntity placeEntity = placeService.getOne(queryWrapper);
            taskLabelReportingEvent.setPlaceId(placeEntity.getId());
            taskLabelReportingEvent.setTaskId(aLong);
@@ -99,8 +100,8 @@
        if (aLong > 0) {
            taskLabelReportingEvent.setConfirmFlag(taskLabelReportingEvent.getStatus().toString());
            taskLabelReportingEvent.setConfirmUserId(AuthUtil.getUserId());
            if (null!=taskLabelReportingEvent.getStatus()
                && taskLabelReportingEvent.getStatus()!=4) {
            if (null != taskLabelReportingEvent.getStatus()
                && taskLabelReportingEvent.getStatus() != 4) {
                taskLabelReportingEvent.setConfirmFlag(taskLabelReportingEvent.getStatus().toString());
                taskLabelReportingEvent.setConfirmUserId(AuthUtil.getUserId());
                taskLabelReportingEvent.setConfirmTime(new Date());
@@ -113,4 +114,28 @@
        }
        return false;
    }
    /**
     * 查询打金店报事
     *
     * @param id 打金店报事ID
     * @return 打金店报事
     */
    @Override
    public TaskLabelReportingEventDTO selectTaskLabelReportingEventById(Long id) {
        return this.baseMapper.selectTaskLabelReportingEventById(id);
    }
    /**
     * 查询打金店报事列表
     *
     * @param taskLabelReportingEventDTO 打金店报事
     * @return 打金店报事集合
     */
    @Override
    public List<TaskLabelReportingEventDTO> selectTaskLabelReportingEventList(TaskLabelReportingEventDTO taskLabelReportingEventDTO) {
        return this.baseMapper.selectTaskLabelReportingEventList(taskLabelReportingEventDTO);
    }
}