Commit b2eded42 authored by kang.nie@inzymeits.com's avatar kang.nie@inzymeits.com
Browse files

初始化代码

parent 12156d65
Pipeline #3109 failed with stages
in 0 seconds
<?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.cusc.nirvana.user.rnr.mg.dao.MgRnrCompanyInfoDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.MgRnrCompanyInfoPO" id="mgRnrCompanyInfoMap">
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="rnrBizzType" column="rnr_bizz_type" jdbcType="INTEGER"/>
<result property="companyName" column="company_name" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="companyCertType" column="company_cert_type" jdbcType="VARCHAR"/>
<result property="companyCertNumber" column="company_cert_number" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="companyCertAddress" column="company_cert_address" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="companyContactAddress" column="company_contact_address" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="companyType" column="company_type" jdbcType="VARCHAR"/>
<result property="industryType" column="industry_type" jdbcType="VARCHAR"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="routingKey" column="routing_key" jdbcType="INTEGER"/>
<result property="isDelete" column="is_delete" jdbcType="INTEGER" />
<result property="creator" column="creator" jdbcType="VARCHAR" />
<result property="createTime" column="create_time" />
<result property="operator" column="operator" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" />
</resultMap>
</mapper>
<?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.cusc.nirvana.user.rnr.mg.dao.MgRnrFileDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.MgRnrFilePO" id="mgRnrFileMap">
<id property="id" column="id" jdbcType="BIGINT" />
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="rnrBizzType" column="rnr_bizz_type" jdbcType="INTEGER"/>
<result property="rnrId" column="rnr_id" jdbcType="VARCHAR"/>
<result property="fileType" column="file_type" jdbcType="INTEGER"/>
<result property="fileSystemId" column="file_system_id" jdbcType="VARCHAR"/>
<result property="fileName" column="file_name" jdbcType="VARCHAR"/>
<result property="rnrCompanyId" column="rnr_company_id" jdbcType="VARCHAR"/>
<result property="liaisonId" column="liaison_id" jdbcType="VARCHAR"/>
<result property="isCompany" column="is_company" jdbcType="INTEGER"/>
<result property="orderNo" column="order_no" jdbcType="INTEGER"/>
<result property="routingKey" column="routing_key" jdbcType="BIGINT"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="isDelete" column="is_delete" jdbcType="INTEGER" />
<result property="creator" column="creator" jdbcType="VARCHAR" />
<result property="createTime" column="create_time" />
<result property="operator" column="operator" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" />
</resultMap>
<insert id="addRnrFileBatch" parameterType="java.util.List">
insert into mg_rnr_file
(uuid,rnr_id,rnr_bizz_type,file_type,file_system_id,file_name,rnr_company_id,liaison_id,is_company,routing_key,tenant_no,creator)
values
<foreach collection="list" item="bean" separator=",">
(#{bean.uuid},#{bean.rnrId},#{bean.rnrBizzType},#{bean.fileType},#{bean.fileSystemId},#{bean.fileName},#{bean.rnrCompanyId},#{bean.liaisonId},#{bean.isCompany},#{bean.routingKey},#{bean.tenantNo},#{bean.creator})
</foreach>
</insert>
</mapper>
<?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.cusc.nirvana.user.rnr.mg.dao.MgRnrInfoDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.MgRnrInfoPO" id="mgRnrInfoMap">
<id property="id" column="id" jdbcType="BIGINT" />
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="rnrBizzType" column="rnr_bizz_type" jdbcType="INTEGER"/>
<result property="fullName" column="full_name" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="certType" column="cert_type" jdbcType="VARCHAR"/>
<result property="certNumber" column="cert_number" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="certAddress" column="cert_address" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="effectiveDate" column="effective_date" jdbcType="TIMESTAMP"/>
<result property="expiredDate" column="expired_date" jdbcType="TIMESTAMP"/>
<result property="issuingAuthority" column="issuing_authority" jdbcType="VARCHAR"/>
<result property="contactAddress" column="contact_address" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="phone" column="phone" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="email" column="email" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="gender" column="gender" jdbcType="INTEGER"/>
<result property="birthday" column="birthday" jdbcType="TIMESTAMP"/>
<result property="nation" column="nation" jdbcType="VARCHAR"/>
<result property="country" column="country" jdbcType="VARCHAR"/>
<result property="dnCode" column="dn_code" jdbcType="VARCHAR"/>
<result property="isTrust" column="is_trust" jdbcType="INTEGER"/>
<result property="isSecondHandCar" column="is_second_hand_car" jdbcType="INTEGER"/>
<result property="isCompany" column="is_company" jdbcType="INTEGER"/>
<result property="rnrCompanyId" column="rnr_company_id" jdbcType="VARCHAR"/>
<result property="rnrStatus" column="rnr_status" jdbcType="INTEGER"/>
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
<result property="orgId" column="org_id" jdbcType="VARCHAR"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="routingKey" column="routing_key" jdbcType="INTEGER"/>
<result property="isDelete" column="is_delete" jdbcType="INTEGER" />
<result property="creator" column="creator" jdbcType="VARCHAR" />
<result property="createTime" column="create_time" />
<result property="operator" column="operator" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" />
</resultMap>
<update id="updateRnrStatus" >
update mg_rnr_info set rnr_status = #{status}
<where>
uuid = #{rnrId}
</where>
</update>
<update id="updateRnrStatusBatch">
update mg_rnr_info set rnr_status = #{status}
<where>
<foreach collection="beans" item="item" separator="," open="uuid in (" close=")">
#{item}
</foreach>
</where>
</update>
</mapper>
<?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.cusc.nirvana.user.rnr.mg.dao.MgRnrLiaisonInfoDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.MgRnrLiaisonInfoPO" id="mgRnrLiaisonInfoMap">
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="rnrId" column="rnr_id" jdbcType="VARCHAR"/>
<result property="rnrBizzType" column="rnr_bizz_type" jdbcType="INTEGER"/>
<result property="liaisonType" column="liaison_type" jdbcType="INTEGER"/>
<result property="liaisonName" column="liaison_name" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="liaisonCertType" column="liaison_cert_type" jdbcType="VARCHAR"/>
<result property="liaisonCertNumber" column="liaison_cert_number" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="liaisonCertAddress" column="liaison_cert_address" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="liaisonContactAddress" column="liaison_contact_address" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="liaisonPhone" column="liaison_phone" jdbcType="VARCHAR" javaType="encryptData"/>
<result property="liaisonGender" column="liaison_gender" jdbcType="INTEGER"/>
<result property="liaisonExpiredDate" column="liaison_expired_date" jdbcType="TIMESTAMP"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="routingKey" column="routing_key" jdbcType="INTEGER"/>
<result property="isDelete" column="is_delete" jdbcType="INTEGER" />
<result property="creator" column="creator" jdbcType="VARCHAR" />
<result property="createTime" column="create_time" />
<result property="operator" column="operator" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" />
</resultMap>
<insert id="addRnrLiaisonBatch" parameterType="java.util.List">
insert into mg_rnr_liaison_info
(uuid,rnr_bizz_type,rnr_id,liaison_type,liaison_name,liaison_cert_type,liaison_cert_number,liaison_cert_address,liaison_contact_address,liaison_phone,tenant_no,routing_key,creator)
values
<foreach collection="list" item="bean" separator=",">
(#{bean.uuid},#{bean.rnrBizzType},#{bean.rnrId},#{bean.liaisonType},#{bean.liaisonName},#{bean.liaisonCertType},#{bean.liaisonCertNumber},#{bean.liaisonCertAddress},#{bean.liaisonContactAddress},#{bean.liaisonPhone},#{bean.tenantNo},#{bean.routingKey},#{bean.creator})
</foreach>
</insert>
</mapper>
<?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.cusc.nirvana.user.rnr.mg.dao.MgRnrOperationLogDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.MgRnrOperationLogPO" id="mgRnrOperationLogMap">
<id property="id" column="id" jdbcType="BIGINT" />
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="bizUuid" column="biz_uuid" jdbcType="VARCHAR"/>
<result property="content" column="content" jdbcType="VARCHAR"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="bizType" column="biz_type" jdbcType="INTEGER"/>
<result property="optType" column="opt_type" jdbcType="INTEGER"/>
<result property="optSubType" column="opt_sub_type" jdbcType="INTEGER"/>
<result property="optTime" column="opt_time" jdbcType="TIMESTAMP"/>
<result property="reason" column="reason" jdbcType="INTEGER"/>
<result property="source" column="source" jdbcType="VARCHAR"/>
<result property="serialNumber" column="serial_number" jdbcType="VARCHAR"/>
<result property="isBatchOrder" column="is_batch_order" jdbcType="INTEGER"/>
<result property="creator" column="creator" jdbcType="VARCHAR" />
<result property="createTime" column="create_time" />
</resultMap>
<insert id="addRnrOperationLogBatch" parameterType="java.util.List">
insert into mg_rnr_operation_log
(uuid,biz_type,biz_uuid,opt_type,opt_sub_type,opt_time,reason,content,source,serial_number,is_batch_order,tenant_no,creator)
values
<foreach collection="list" item="bean" separator=",">
(#{bean.uuid},#{bean.bizType},#{bean.bizUuid},#{bean.optType},#{bean.optSubType},#{bean.optTime},#{bean.reason},#{bean.content},#{bean.source},#{bean.serialNumber},#{bean.isBatchOrder},#{bean.tenantNo},#{bean.creator})
</foreach>
</insert>
</mapper>
<?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.cusc.nirvana.user.rnr.mg.dao.MgRnrTagDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.MgRnrTagPO" id="mgRnrTagMap">
<id property="id" column="id" jdbcType="BIGINT" />
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="rnrBizzType" column="rnr_bizz_type" jdbcType="INTEGER"/>
<result property="rnrId" column="rnr_id" jdbcType="VARCHAR"/>
<result property="rnrOrderId" column="rnr_order_id" jdbcType="VARCHAR"/>
<result property="tagName" column="tag_type" jdbcType="VARCHAR"/>
<result property="tagValue" column="tag_value" jdbcType="VARCHAR"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="routingKey" column="routing_key" jdbcType="INTEGER"/>
<result property="isDelete" column="is_delete" jdbcType="INTEGER" />
<result property="creator" column="creator" jdbcType="VARCHAR" />
<result property="createTime" column="create_time" />
<result property="operator" column="operator" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" />
</resultMap>
<insert id="addRnrTagBatch" parameterType="java.util.List">
insert into mg_rnr_tag
(uuid,rnr_id,rnr_order_id,tag_name,tag_value,tenant_no,routing_key,creator)
values
<foreach collection="list" item="bean" separator=",">
(#{bean.uuid},#{bean.rnrId},#{bean.rnrOrderId},#{bean.tagName},#{bean.tagValue},#{bean.tenantNo},#{bean.routingKey},#{bean.creator})
</foreach>
</insert>
</mapper>
package com.cusc.nirvana.user.rnr.mg.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cusc.nirvana.user.rnr.mg.dao.entity.MgRnrTaskPO;
/**
* (MgRnrTask)表数据库访问层
*
* @author makejava
* @since 2022-09-24 11:26:01
*/
public interface MgRnrTaskDao extends BaseMapper<MgRnrTaskPO> {
}
<?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.cusc.nirvana.user.rnr.mg.dao.MgTenantBizzConfigDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.MgTenantBizzConfigPO" id="mgTenantBizzConfigMap">
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="orgId" column="org_id" jdbcType="VARCHAR"/>
<result property="rnrFailRetryCount" column="rnr_fail_retry_count" jdbcType="INTEGER"/>
<result property="operator" column="operator" jdbcType="VARCHAR"/>
</resultMap>
</mapper>
<?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.cusc.nirvana.user.rnr.fp.dao.FpVehicleCompanyDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.MgVehicleCompanyPO" id="mgVehicleCompanyMap">
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="orgId" column="org_id" jdbcType="VARCHAR"/>
<result property="companyName" column="company_name" jdbcType="VARCHAR"/>
<result property="companyCertType" column="company_cert_type" jdbcType="VARCHAR"/>
<result property="companyCertNumber" column="company_cert_number" jdbcType="VARCHAR"/>
<result property="companyCertAddress" column="company_cert_address" jdbcType="VARCHAR"/>
<result property="companyContactAddress" column="company_contact_address" jdbcType="VARCHAR"/>
<result property="companyType" column="company_type" jdbcType="VARCHAR"/>
<result property="industryType" column="industry_type" jdbcType="VARCHAR"/>
<result property="licenseImages" column="license_images" jdbcType="VARCHAR"/>
<result property="corporationName" column="corporation_name" jdbcType="VARCHAR"/>
<result property="corporationGender" column="corporation_gender" jdbcType="INTEGER"/>
<result property="corporationCertType" column="corporation_cert_type" jdbcType="VARCHAR"/>
<result property="corporationCertNumber" column="corporation_cert_number" jdbcType="VARCHAR"/>
<result property="corporationCertAddress" column="corporation_cert_address" jdbcType="VARCHAR"/>
<result property="corporationContactAddress" column="corporation_contact_address" jdbcType="VARCHAR"/>
<result property="corporationPhone" column="corporation_phone" jdbcType="VARCHAR"/>
<result property="corporationBirthday" column="corporation_birthday" jdbcType="TIMESTAMP"/>
<result property="corporationEffectiveDate" column="corporation_effective_date" jdbcType="TIMESTAMP"/>
<result property="corporationExpiredDate" column="corporation_expired_date" jdbcType="TIMESTAMP"/>
<result property="corporationNation" column="corporation_nation" jdbcType="VARCHAR"/>
<result property="corporationCountry" column="corporation_country" jdbcType="VARCHAR"/>
<result property="corporationIssuingAuthority" column="corporation_issuing_authority" jdbcType="VARCHAR"/>
<result property="corporationCertFront" column="corporation_cert_front" jdbcType="VARCHAR"/>
<result property="corporationCertBack" column="corporation_cert_back" jdbcType="VARCHAR"/>
<result property="companyCertAuth" column="company_cert_auth" jdbcType="VARCHAR"/>
<result property="firstRnrId" column="first_rnr_id" jdbcType="VARCHAR"/>
<result property="livenessVideoId" column="liveness_video_id" jdbcType="VARCHAR"/>
<result property="livenessStatus" column="liveness_status" jdbcType="INTEGER"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="operator" column="operator" jdbcType="VARCHAR"/>
</resultMap>
</mapper>
<?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.cusc.nirvana.user.rnr.mg.dao.OpenTenantRelationDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.OpenTenantRelationPO" id="openTenantRelationMap">
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="openTenantId" column="open_tenant_id" jdbcType="VARCHAR"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="operator" column="operator" jdbcType="VARCHAR"/>
</resultMap>
</mapper>
<?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.cusc.nirvana.user.rnr.mg.dao.RnrOrderDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.RnrOrderPO" id="rnrOrderMap">
<id property="id" column="id" jdbcType="BIGINT" />
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="rnrBizzType" column="rnr_bizz_type" jdbcType="INTEGER"/>
<result property="orderType" column="order_type" jdbcType="INTEGER"/>
<result property="rnrId" column="rnr_id" jdbcType="VARCHAR"/>
<result property="auditType" column="audit_type" jdbcType="INTEGER"/>
<result property="orderSource" column="order_source" jdbcType="VARCHAR"/>
<result property="orderStatus" column="order_status" jdbcType="INTEGER"/>
<result property="isBatchOrder" column="is_batch_order" jdbcType="INTEGER"/>
<result property="serialNumber" column="serial_number" jdbcType="VARCHAR"/>
<result property="approvalNo" column="approval_no" jdbcType="VARCHAR"/>
<result property="allocateTime" column="allocate_time" jdbcType="TIMESTAMP"/>
<result property="auditTime" column="audit_time" jdbcType="TIMESTAMP"/>
<result property="finalApproveTime" column="final_approve_time" jdbcType="TIMESTAMP"/>
<result property="updatedCode" column="updated_code" jdbcType="INTEGER"/>
<result property="verifyComments" column="comment" jdbcType="VARCHAR"/>
<result property="comment" column="comment" jdbcType="VARCHAR"/>
<result property="channelId" column="channel_id" jdbcType="VARCHAR"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="routingKey" column="routing_key" jdbcType="INTEGER"/>
<result property="orgId" column="org_id" jdbcType="VARCHAR"/>
<result property="isDelete" column="is_delete" jdbcType="INTEGER" />
<result property="creator" column="creator" jdbcType="VARCHAR" />
<result property="createTime" column="create_time" />
<result property="operator" column="operator" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" />
</resultMap>
<insert id="insertBatchOrder" parameterType="java.util.List">
insert into rnr_order
(uuid,order_type,rnr_id,audit_type,verify_comments,comment,channel_id,order_source,order_status,is_batch_order,serial_number,approval_no,allocate_time,audit_time,final_approve_time,updated_code,tenant_no,routing_key,creator)
values
<foreach collection="list" item="bean" separator=",">
(#{bean.uuid},#{bean.orderType},#{bean.rnrId},#{bean.auditType},#{bean.verifyComments},#{bean.comment},#{bean.channelId},#{bean.orderSource},#{bean.orderStatus},#{bean.isBatchOrder},#{bean.serialNumber},#{bean.approvalNo},#{bean.allocateTime},#{bean.auditTime},#{bean.finalApproveTime},#{bean.updatedCode},#{bean.tenantNo},#{bean.routingKey},#{bean.creator})
</foreach>
</insert>
<update id="updateOrderStatus">
update rnr_order set order_status = #{status}
<where>
<foreach collection="beans" item="item" separator="," open="uuid in (" close=")">
#{item}
</foreach>
</where>
</update>
<update id="updateOrderApproveNo">
update rnr_order set approval_no = #{workOrderCode}
<where>
uuid = #{uuid}
</where>
</update>
<select id="orderList" resultType="com.cusc.nirvana.user.rnr.mg.dto.LocalVerifyListDTO"
parameterType="com.cusc.nirvana.user.rnr.mg.dto.LocalVerifyListRqDTO">
SELECT
ro.uuid AS rnrOrderInfoId,
GROUP_CONCAT( DISTINCT mrc.iot_id SEPARATOR ',' ) AS vin,
GROUP_CONCAT( mrc.iccid SEPARATOR ',' ) AS iccid,
mri.full_name AS vinOwnerName,
mri.phone AS vinOwnerPhone,
DATE_FORMAT(ro.create_time,'%Y-%m-%d %H:%i:%s') AS rnrDate,
any_value(mrci.company_name) AS vinCompanyName,
eo.organ_name AS orgName,
ro.order_type AS orderType,
ro.order_status AS orderStatus
FROM
rnr_order ro
INNER JOIN mg_rnr_info mri ON ro.rnr_id = mri.uuid
INNER JOIN eiam_organization eo ON mri.org_id = eo.uuid
INNER JOIN mg_rnr_card_info mrc ON ro.rnr_id = mrc.rnr_id
LEFT JOIN mg_rnr_company_info mrci ON ro.rnr_id = mrci.rnr_id
WHERE ro.is_delete = 0 and ro.order_status in (1,2) and ro.order_type not in(6,8,9,10,12)
<if test="bean.vin != null and bean.vin != ''">
and mrc.iot_id = #{bean.vin}
</if>
<if test="bean.iccid != null and bean.iccid != ''">
and mrc.iccid = #{bean.iccid}
</if>
<if test="bean.rnrStartDate != null and bean.rnrStartDate != '' and bean.rnrEndDate != null and bean.rnrEndDate != ''">
and (ro.create_time between #{bean.rnrStartDate} and #{bean.rnrEndDate})
</if>
<if test="bean.vinOwnerName != null and bean.vinOwnerName != ''">
and mri.full_name like #{bean.vinOwnerName}
</if>
<if test="bean.vinOwnerPhone != null and bean.vinOwnerPhone != ''">
and mri.phone like #{bean.vinOwnerPhone}
</if>
<if test="bean.orderType != null and bean.orderType != ''">
and ro.order_type = #{bean.orderType}
</if>
<if test="bean.vinCompanyName != null and bean.vinCompanyName != ''">
and mrci.company_name like #{bean.vinCompanyName}
</if>
<if test="bean.orgName != null and bean.orgName != ''">
and eo.organ_name like #{bean.orgName}
</if>
GROUP BY
ro.uuid
ORDER BY ro.create_time DESC
LIMIT #{start},#{end};
</select>
<select id="orderTotal" resultType="java.lang.Integer" parameterType="com.cusc.nirvana.user.rnr.mg.dto.LocalVerifyListRqDTO">
select count(a.vin) as total from (
SELECT
mrc.iot_id AS vin
FROM
rnr_order ro
INNER JOIN mg_rnr_info mri ON ro.rnr_id = mri.uuid
INNER JOIN eiam_organization eo ON mri.org_id = eo.uuid
INNER JOIN mg_rnr_card_info mrc ON ro.rnr_id = mrc.rnr_id
LEFT JOIN mg_rnr_company_info mrci ON ro.rnr_id = mrci.rnr_id
WHERE ro.is_delete = 0 and ro.order_status in(1,2) and ro.order_type not in(6,8,9,10,12)
<if test="bean.vin != null and bean.vin != ''">
and mrc.iot_id = #{bean.vin}
</if>
<if test="bean.iccid != null and bean.iccid != ''">
and mrc.iccid = #{bean.iccid}
</if>
<if test="bean.rnrStartDate != null and bean.rnrStartDate != '' and bean.rnrEndDate != null and bean.rnrEndDate != ''">
and (ro.create_time between #{bean.rnrStartDate} and #{bean.rnrEndDate})
</if>
<if test="bean.vinOwnerName != null and bean.vinOwnerName != ''">
and mri.full_name like #{bean.vinOwnerName}
</if>
<if test="bean.vinOwnerPhone != null and bean.vinOwnerPhone != ''">
and mri.phone like #{bean.vinOwnerPhone}
</if>
<if test="bean.orderType != null and bean.orderType != ''">
and ro.order_type = #{bean.orderType}
</if>
<if test="bean.vinCompanyName != null and bean.vinCompanyName != ''">
and mrci.company_name like #{bean.vinCompanyName}
</if>
<if test="bean.orgName != null and bean.orgName != ''">
and eo.organ_name like #{bean.orgName}
</if>
GROUP BY
ro.uuid,
mrc.iot_id,
mri.full_name,
mri.phone,
ro.create_time,
mrci.company_name,
eo.organ_name,
ro.order_type,
ro.order_status
)a;
</select>
<select id="getOrganNameForOrgId" resultType="java.lang.String">
SELECT
eo.organ_name
FROM
eiam_organization eo
WHERE
eo.id = #{orgId}
</select>
<select id="getOrganNameForOrganCode" resultType="java.lang.String">
SELECT
eo.uuid
FROM
eiam_organization eo
WHERE
eo.organ_code = #{organCode}
</select>
<select id="validationRnrOrder" resultType="java.lang.Integer">
SELECT
COUNT(1)
FROM
mg_rnr_card_info m
LEFT JOIN rnr_order r ON r.rnr_id = m.rnr_id
WHERE
1=1
and m.iccid=#{iccid}
and m.iot_id=#{iotId}
and r.order_status='1'
</select>
</mapper>
<?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.cusc.nirvana.user.rnr.mg.dao.RnrOrderOperationLogDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.RnrOrderOperationLogPO" id="rnrOrderOperationLogMap">
<id property="id" column="id" jdbcType="BIGINT" />
<result property="uuid" column="uuid" jdbcType="VARCHAR"/>
<result property="orderId" column="order_id" jdbcType="VARCHAR"/>
<result property="rnrId" column="rnr_id" jdbcType="VARCHAR"/>
<result property="optType" column="opt_type" jdbcType="INTEGER"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="updatedContent" column="updated_content" jdbcType="VARCHAR"/>
<result property="optTime" column="opt_time" jdbcType="TIMESTAMP"/>
<result property="updatedCode" column="updated_code" jdbcType="INTEGER"/>
<result property="creator" column="creator" jdbcType="VARCHAR" />
<result property="createTime" column="create_time" />
</resultMap>
<insert id="insertBatchOrderOperationLog" parameterType="java.util.List">
insert into rnr_order_operation_log
(uuid,order_id,opt_type,updated_content,opt_time,rnr_id,tenant_no,creator)
values
<foreach collection="list" item="bean" separator=",">
(#{bean.uuid},#{bean.orderId},#{bean.optType},#{bean.updatedContent},#{bean.optTime},#{bean.rnrId},#{bean.tenantNo},#{bean.creator})
</foreach>
</insert>
</mapper>
<?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.cusc.nirvana.user.rnr.mg.dao.RnrNoticeTemplateConfigDao">
<resultMap type="com.cusc.nirvana.user.rnr.mg.dao.entity.RnrNoticeTemplateConfigPO" id="rnrNoticeTemplateConfigMap">
<result property="rnrBizzType" column="rnr_bizz_type" jdbcType="INTEGER"/>
<result property="noticeWay" column="notice_way" jdbcType="INTEGER"/>
<result property="tagcode" column="tagCode" jdbcType="VARCHAR"/>
<result property="templateCode" column="template_code" jdbcType="VARCHAR"/>
<result property="templateContent" column="template_content" jdbcType="VARCHAR"/>
<result property="lang" column="lang" jdbcType="VARCHAR"/>
<result property="orgId" column="org_id" jdbcType="VARCHAR"/>
<result property="tenantNo" column="tenant_no" jdbcType="VARCHAR"/>
<result property="operator" column="operator" jdbcType="VARCHAR"/>
</resultMap>
</mapper>
package com.cusc.nirvana.user.rnr.mg.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.*;
import java.util.List;
/**
* 文件上传请求
* @author jiamj
* @date 2021/11/3
*/
@Data
@ApiModel("文件上传")
public class FileBase64ReqDTO implements Serializable {
private static final long serialVersionUID = -267145861320351989L;
@ApiModelProperty("文件存储根目录,格式为:XXXX/ (前面不要斜杠,后面要斜杠)")
@NotBlank(message = "文件存储根目录不能为空")
private String rootPath;
@ApiModelProperty("文件存储自定义目录,格式为:XXXX/ (前面不要斜杠,后面要斜杠)")
private String path;
@ApiModelProperty("用户id")
private String userId;
@ApiModelProperty(value = "文件存储类型:私有private或公有public", hidden = true)
private String type;
@ApiModelProperty(value = "多个上传文件的base64")
private List<FileEntityBase64DTO> fileList;
}
package com.cusc.nirvana.user.rnr.mg.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.*;
/**
* 文件上传记录信息
* @author jiamj
* @date 2021/11/3
*/
@Data
@ApiModel("文件上传记录")
public class FileBase64RespDTO implements Serializable {
private static final long serialVersionUID = -6001558421572337083L;
@ApiModelProperty(value = "文件标识id")
private String uuid;
@ApiModelProperty(value = "文件原始名称")
private String fileName;
@ApiModelProperty(value = "存储路径")
private String path;
@ApiModelProperty(value = "文件流md5")
private String md5;
@ApiModelProperty(value = "文件存储类型:private/public")
private String useLimit;
@ApiModelProperty(value = "对象存储文件公网url")
private String accessUrl;
@ApiModelProperty(value = "文件大小(KB)")
private Double fileSize;
}
package com.cusc.nirvana.user.rnr.mg.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.*;
import java.util.List;
/**
* @author jiamj
* @date 2021/11/3
*/
@Data
@ApiModel("文件下载请求")
public class FileBatchDownloadDTO implements Serializable {
private static final long serialVersionUID = -1406102961598468694L;
@ApiModelProperty("文件uuid")
private List<String> uuids;
@ApiModelProperty(value = "文件名称", hidden = true)
private String fileName;
}
package com.cusc.nirvana.user.rnr.mg.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.*;
/**
*
* @author jiamj
* @date 2021/11/3
*/
@Data
@ApiModel("文件下载请求")
public class FileDownloadDTO implements Serializable {
private static final long serialVersionUID = -1406102961598468694L;
@ApiModelProperty("文件uuid")
private String uuid;
@ApiModelProperty(value = "文件名称", hidden = true)
private String fileName;
}
package com.cusc.nirvana.user.rnr.mg.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.*;
/**
* Description: 文件base64实体
* <br />
* CreateDate 2022-03-04 17:05:35
*
* @author yuyi
**/
@Data
@ApiModel("文件字符串上传")
public class FileEntityBase64DTO implements Serializable {
private static final long serialVersionUID = -267145861320351989L;
@ApiModelProperty("文件base64字符串")
private String base64;
@ApiModelProperty("文件名称")
private String fileName;
@ApiModelProperty("文件业务id")
private String uuid;
}
package com.cusc.nirvana.user.rnr.mg.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.*;
import java.time.LocalDateTime;
/**
* 文件上传记录信息
* @author jiamj
* @date 2021/11/3
*/
@Data
@ApiModel("文件上传记录")
public class FileRecordDTO implements Serializable {
private static final long serialVersionUID = -6001558421572337083L;
@ApiModelProperty(value = "文件标识id")
private String uuid;
@ApiModelProperty(value = "文件原始名称")
private String fileName;
@ApiModelProperty(value = "存储路径")
private String path;
@ApiModelProperty(value = "文件流md5")
private String md5;
@ApiModelProperty(value = "文件存储类型:private/public")
private String useLimit;
@ApiModelProperty(value = "对象存储文件公网url")
private String accessUrl;
@ApiModelProperty(value = "文件大小(KB)")
private Double fileSize;
@ApiModelProperty(value = "文件状态:1上传成功,0已删除,2待合并")
private Integer status;
@ApiModelProperty(value = "视频编码格式")
private String videoProtocal;
@ApiModelProperty(value = "上传时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "上传人")
private String creator;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "修改人")
private String updater;
}
package com.cusc.nirvana.user.rnr.mg.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotBlank;
import java.io.*;
/**
* 文件上传请求
* @author jiamj
* @date 2021/11/3
*/
@Data
@ApiModel("文件上传")
public class FileUploadDTO implements Serializable {
private static final long serialVersionUID = -267145861320351989L;
@ApiModelProperty("文件存储根目录,格式为:XXXX/ (前面不要斜杠,后面要斜杠)")
@NotBlank(message = "文件存储根目录不能为空")
private String rootPath;
@ApiModelProperty("文件存储自定义目录,格式为:XXXX/ (前面不要斜杠,后面要斜杠)")
@NotBlank(message = "文件存储根目录不能为空")
private String path;
@ApiModelProperty("文件唯一标识,如为空,系统自动生成")
private String uuid;
@ApiModelProperty("用户id")
private String userId;
@ApiModelProperty(value = "文件存储类型:私有private或公有public", hidden = true)
private String type;
@ApiModelProperty("上传的文件")
private MultipartFile file;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment